summaryrefslogtreecommitdiffstats
path: root/gtk/src/preview.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-04-06 06:17:50 +0000
committerjstebbins <[email protected]>2009-04-06 06:17:50 +0000
commit7ca544fec43a9d3f68830d8d47840f6d06563ffa (patch)
treeef026c918057c45b5e39e48cbc9de59de8168ba3 /gtk/src/preview.c
parent9cad799608299f5f56a3ae6cfce3ec761c23b8fb (diff)
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
Diffstat (limited to 'gtk/src/preview.c')
-rw-r--r--gtk/src/preview.c30
1 files changed, 7 insertions, 23 deletions
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,36 +1056,16 @@ 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,
GdkEventConfigure *event,