summaryrefslogtreecommitdiff
path: root/src/gui/panels
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2013-01-28 20:47:30 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2013-01-28 20:47:30 (GMT)
commitb6341581220e92114b0838a15a1c1cec1078efc2 (patch)
tree08b70eee9e31a5be55bde0930ea8d2e005084d96 /src/gui/panels
parent24013fb80fc02d8918aea51ee169d6521c74ee42 (diff)
Changed the mouse pointer when moving views using the glance panel.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@334 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/gui/panels')
-rw-r--r--src/gui/panels/glance.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/gui/panels/glance.c b/src/gui/panels/glance.c
index 542cd74..d6a744e 100644
--- a/src/gui/panels/glance.c
+++ b/src/gui/panels/glance.c
@@ -102,6 +102,9 @@ static gboolean redraw_glance_area(GtkWidget *, GdkEventExpose *, GGlancePanel *
/* Assure la gestion des clics de souris sur l'aperçu. */
static gboolean on_button_press_over_glance(GtkWidget *, GdkEventButton *, GGlancePanel *);
+/* Termine la gestion des clics de souris sur l'aperçu. */
+static gboolean on_button_release_over_glance(GtkWidget *, GdkEventButton *, GGlancePanel *);
+
/* Assure la gestion du déplacement de la souris sur l'aperçu. */
static gboolean on_mouse_motion_over_glance(GtkWidget *, GdkEventMotion *, GGlancePanel *);
@@ -170,6 +173,8 @@ static void g_glance_panel_init(GGlancePanel *panel)
g_signal_connect(G_OBJECT(base->widget), "button-press-event",
G_CALLBACK(on_button_press_over_glance), panel);
+ g_signal_connect(G_OBJECT(base->widget), "button-release-event",
+ G_CALLBACK(on_button_release_over_glance), panel);
g_signal_connect(G_OBJECT(base->widget), "motion-notify-event",
G_CALLBACK(on_mouse_motion_over_glance), panel);
@@ -583,6 +588,7 @@ static gboolean on_button_press_over_glance(GtkWidget *widget, GdkEventButton *e
{
GtkAdjustment *hadj; /* Gestionnaire du défilement */
GtkAdjustment *vadj; /* Gestionnaire du défilement */
+ GdkCursor *cursor; /* Pointeur pour la surface */
if (panel->view != NULL && event->button == 1)
{
@@ -600,6 +606,41 @@ static gboolean on_button_press_over_glance(GtkWidget *widget, GdkEventButton *e
&& panel->visible.y <= panel->start_y
&& panel->start_y < (panel->visible.y + panel->visible.height));
+ if (panel->valid)
+ {
+ cursor = gdk_cursor_new(GDK_FLEUR);
+ gdk_window_set_cursor(widget->window, cursor);
+ gdk_cursor_unref(cursor);
+ }
+
+ }
+
+ return FALSE;
+
+}
+
+
+/******************************************************************************
+* *
+* Paramètres : widget = composant GTK visé par l'opération. *
+* event = informations liées à l'événement. *
+* panel = informations liées au panneau associé. *
+* *
+* Description : Termine la gestion des clics de souris sur l'aperçu. *
+* *
+* Retour : FALSE pour poursuivre la propagation de l'événement. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static gboolean on_button_release_over_glance(GtkWidget *widget, GdkEventButton *event, GGlancePanel *panel)
+{
+ if (panel->view != NULL && event->button == 1)
+ {
+ if (panel->valid)
+ gdk_window_set_cursor(widget->window, NULL);
+
}
return FALSE;