From b35b62402a8c2d1c3919b63b3b1292150a247c93 Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Wed, 9 Oct 2002 02:03:38 +0000 Subject: [PATCH] Added handler for view's "pointer_exit" function: clears cursor_info label. "zoom_changed" handler now updates zoom related verbs. git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@154 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- glabels2/src/window.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/glabels2/src/window.c b/glabels2/src/window.c index 8d5a5b7c..8aa91f4c 100644 --- a/glabels2/src/window.c +++ b/glabels2/src/window.c @@ -76,6 +76,9 @@ static void pointer_moved_cb (glView *view, gdouble y, glWindow *window); +static void pointer_exit_cb (glView *view, + glWindow *window); + static void name_changed_cb (glLabel *label, glWindow *window); @@ -340,6 +343,9 @@ gl_window_set_label (glWindow *window, g_signal_connect (G_OBJECT(window->view), "pointer_moved", G_CALLBACK(pointer_moved_cb), window); + g_signal_connect (G_OBJECT(window->view), "pointer_exit", + G_CALLBACK(pointer_exit_cb), window); + g_signal_connect (G_OBJECT(label), "name_changed", G_CALLBACK(name_changed_cb), window); @@ -446,6 +452,8 @@ zoom_changed_cb (glView *view, gtk_label_set_text (GTK_LABEL(window->zoom_info), string); g_free (string); + gl_ui_update_zoom_verbs (window->uic, view); + gl_debug (DEBUG_WINDOW, "END"); } @@ -479,6 +487,23 @@ pointer_moved_cb (glView *view, gl_debug (DEBUG_WINDOW, "END"); } +/*---------------------------------------------------------------------------*/ +/* PRIVATE. View "pointer exit" callback. */ +/*---------------------------------------------------------------------------*/ +static void +pointer_exit_cb (glView *view, + glWindow *window) +{ + gl_debug (DEBUG_WINDOW, "START"); + + g_return_if_fail (view && GL_IS_VIEW (view)); + g_return_if_fail (window && GL_IS_WINDOW (window)); + + gtk_label_set_text (GTK_LABEL(window->cursor_info), ""); + + gl_debug (DEBUG_WINDOW, "END"); +} + /*---------------------------------------------------------------------------*/ /* PRIVATE. Label "name changed" callback. */ /*---------------------------------------------------------------------------*/ -- 2.39.5