From: jstebbins Date: Mon, 6 Apr 2009 06:17:50 +0000 (+0000) Subject: LinGui: improve behavior of hud enter/leave and timout events X-Git-Tag: 0.9.4~657 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7ca544fec43a9d3f68830d8d47840f6d06563ffa;p=handbrake LinGui: improve behavior of hud enter/leave and timout events git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2305 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui index 7d4fc799c..797463353 100644 --- a/gtk/src/ghb.ui +++ b/gtk/src/ghb.ui @@ -4876,11 +4876,11 @@ location as the movie. True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_LEAVE_NOTIFY_MASK + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK + True - @@ -4902,8 +4902,10 @@ location as the movie. True 500 True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK + False + GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK + True @@ -4924,6 +4926,8 @@ location as the movie. adjustment19 0 bottom + GDK_ENTER_NOTIFY_MASK + @@ -4942,6 +4946,8 @@ location as the movie. True True none + GDK_ENTER_NOTIFY_MASK + @@ -4961,6 +4967,8 @@ location as the movie. preview_progress_adj False right + GDK_ENTER_NOTIFY_MASK + @@ -4983,7 +4991,8 @@ location as the movie. 16 True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK + False @@ -5034,6 +5043,8 @@ location as the movie. True adjustment21 True + GDK_ENTER_NOTIFY_MASK + @@ -5052,6 +5063,8 @@ location as the movie. True View Fullscreen Preview Fullscreen + GDK_ENTER_NOTIFY_MASK + @@ -5065,6 +5078,8 @@ location as the movie. True Open Picture Settings Settings + GDK_ENTER_NOTIFY_MASK + diff --git a/gtk/src/preview.c b/gtk/src/preview.c index 511e8f7b4..c7e825eac 100644 --- a/gtk/src/preview.c +++ b/gtk/src/preview.c @@ -988,6 +988,7 @@ hud_timeout(signal_user_data_t *ud) { GtkWidget *widget; + g_debug("hud_timeout()"); widget = GHB_WIDGET(ud->builder, "preview_hud"); gtk_widget_hide(widget); hud_timeout_id = 0; @@ -1000,6 +1001,7 @@ hud_enter_cb( GdkEventCrossing *event, signal_user_data_t *ud) { + g_debug("hud_enter_cb()"); if (hud_timeout_id != 0) { GMainContext *mc; @@ -1022,6 +1024,7 @@ preview_leave_cb( GdkEventCrossing *event, signal_user_data_t *ud) { + g_debug("hud_leave_cb()"); if (hud_timeout_id != 0) { GMainContext *mc; @@ -1042,6 +1045,7 @@ preview_motion_cb( GdkEventMotion *event, signal_user_data_t *ud) { + //g_debug("hud_motion_cb %d", hud_timeout_id); if (hud_timeout_id != 0) { GMainContext *mc; @@ -1052,35 +1056,15 @@ preview_motion_cb( if (source != NULL) g_source_destroy(source); } - else + widget = GHB_WIDGET(ud->builder, "preview_hud"); + if (!GTK_WIDGET_VISIBLE(widget)) { - GtkWidget *widget; - - widget = GHB_WIDGET(ud->builder, "preview_hud"); gtk_widget_show(widget); } - hud_timeout_id = g_timeout_add_seconds(10, (GSourceFunc)hud_timeout, ud); + hud_timeout_id = g_timeout_add_seconds(4, (GSourceFunc)hud_timeout, ud); return FALSE; } -G_MODULE_EXPORT gboolean -preview_image_configure_cb( - GtkWidget *widget, - GdkEventConfigure *event, - signal_user_data_t *ud) -{ - static gint w = 0, h = 0; - - g_debug("preview_image_configure_cb()"); - if ((w != event->width) || (h != event->height)) - { - w = event->width; - h = event->height; - } - return FALSE; -} - - G_MODULE_EXPORT gboolean preview_configure_cb( GtkWidget *widget,