diff options
author | Marco Pesenti Gritti <marco@gnome.org> | 2004-04-17 06:32:22 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2004-04-17 06:32:22 +0800 |
commit | bacfe4d52721a0ececa736c3f8d3d9aa4d90b71a (patch) | |
tree | 0132bdb0474a24680fc0657256874d347b585fc0 | |
parent | 89b04928135f31570ed73da6c440f6bef674e901 (diff) | |
download | gsoc2013-epiphany-bacfe4d52721a0ececa736c3f8d3d9aa4d90b71a.tar.gz gsoc2013-epiphany-bacfe4d52721a0ececa736c3f8d3d9aa4d90b71a.tar.zst gsoc2013-epiphany-bacfe4d52721a0ececa736c3f8d3d9aa4d90b71a.zip |
Resync with egg
2004-04-17 Marco Pesenti Gritti <marco@gnome.org>
* lib/egg/Makefile.am:
* lib/egg/egg-editable-toolbar.c: (set_drag_cursor):
* lib/egg/egg-toolbar-editor.c: (set_drag_cursor):
* lib/egg/eggstatusicon.c: (egg_status_icon_init),
(egg_status_icon_button_press), (egg_status_icon_button_release):
Resync with egg
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | lib/egg/Makefile.am | 2 | ||||
-rwxr-xr-x | lib/egg/egg-editable-toolbar.c | 2 | ||||
-rwxr-xr-x | lib/egg/egg-toolbar-editor.c | 2 | ||||
-rw-r--r-- | lib/egg/eggstatusicon.c | 21 |
5 files changed, 33 insertions, 4 deletions
@@ -1,3 +1,13 @@ +2004-04-17 Marco Pesenti Gritti <marco@gnome.org> + + * lib/egg/Makefile.am: + * lib/egg/egg-editable-toolbar.c: (set_drag_cursor): + * lib/egg/egg-toolbar-editor.c: (set_drag_cursor): + * lib/egg/eggstatusicon.c: (egg_status_icon_init), + (egg_status_icon_button_press), (egg_status_icon_button_release): + + Resync with egg + 2004-04-16 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/MozDownload.cpp: (InitiateMozillaDownload): diff --git a/lib/egg/Makefile.am b/lib/egg/Makefile.am index 66e4b29fe..09de92ac5 100644 --- a/lib/egg/Makefile.am +++ b/lib/egg/Makefile.am @@ -1,6 +1,6 @@ INCLUDES = \ $(EPIPHANY_DEPENDENCY_CFLAGS) \ - -DCURSOR_DIR=\"$(pkgdatadir)\" \ + -DCURSOR_DIR=\"$(pkgdatadir)/art\" \ -DGTK_DISABLE_DEPRECATED \ -DGDK_DISABLE_DEPRECATED \ -DG_DISABLE_DEPRECATED diff --git a/lib/egg/egg-editable-toolbar.c b/lib/egg/egg-editable-toolbar.c index b9eb0e840..7b44fd427 100755 --- a/lib/egg/egg-editable-toolbar.c +++ b/lib/egg/egg-editable-toolbar.c @@ -266,7 +266,7 @@ set_drag_cursor (GtkWidget *widget) GdkCursor *cursor; GdkPixbuf *pixbuf; - pixbuf = gdk_pixbuf_new_from_file (CURSOR_DIR "/art/hand-open.png", NULL); + pixbuf = gdk_pixbuf_new_from_file (CURSOR_DIR "/hand-open.png", NULL); cursor = gdk_cursor_new_from_pixbuf (gdk_display_get_default (), pixbuf, 12, 12); gdk_window_set_cursor (widget->window, cursor); diff --git a/lib/egg/egg-toolbar-editor.c b/lib/egg/egg-toolbar-editor.c index 34cbd6b48..dbbb9bd69 100755 --- a/lib/egg/egg-toolbar-editor.c +++ b/lib/egg/egg-toolbar-editor.c @@ -407,7 +407,7 @@ set_drag_cursor (GtkWidget *widget) GdkCursor *cursor; GdkPixbuf *pixbuf; - pixbuf = gdk_pixbuf_new_from_file (CURSOR_DIR "/art/hand-open.png", NULL); + pixbuf = gdk_pixbuf_new_from_file (CURSOR_DIR "/hand-open.png", NULL); cursor = gdk_cursor_new_from_pixbuf (gdk_display_get_default (), pixbuf, 12, 12); gdk_window_set_cursor (widget->window, cursor); diff --git a/lib/egg/eggstatusicon.c b/lib/egg/eggstatusicon.c index 1893d4459..72dcef518 100644 --- a/lib/egg/eggstatusicon.c +++ b/lib/egg/eggstatusicon.c @@ -80,6 +80,7 @@ struct _EggStatusIconPrivate guint blinking : 1; guint blink_off : 1; + guint button_down : 1; }; static void egg_status_icon_class_init (EggStatusIconClass *klass); @@ -99,6 +100,8 @@ static void egg_status_icon_size_allocate (EggStatusIcon *status_icon, GtkAllocation *allocation); static gboolean egg_status_icon_button_press (EggStatusIcon *status_icon, GdkEventButton *event); +static gboolean egg_status_icon_button_release (EggStatusIcon *status_icon, + GdkEventButton *event); static void egg_status_icon_disable_blinking (EggStatusIcon *status_icon); static void egg_status_icon_reset_image_data (EggStatusIcon *status_icon); @@ -256,6 +259,8 @@ egg_status_icon_init (EggStatusIcon *status_icon) g_signal_connect_swapped (status_icon->priv->tray_icon, "button-press-event", G_CALLBACK (egg_status_icon_button_press), status_icon); + g_signal_connect_swapped (status_icon->priv->tray_icon, "button-release-event", + G_CALLBACK (egg_status_icon_button_release), status_icon); status_icon->priv->image = gtk_image_new (); gtk_container_add (GTK_CONTAINER (status_icon->priv->tray_icon), @@ -558,8 +563,22 @@ static gboolean egg_status_icon_button_press (EggStatusIcon *status_icon, GdkEventButton *event) { - if (event->button == 1 && event->type == GDK_2BUTTON_PRESS) + if (event->button == 1 && !status_icon->priv->button_down) + { + status_icon->priv->button_down = TRUE; + return TRUE; + } + + return FALSE; +} + +static gboolean +egg_status_icon_button_release (EggStatusIcon *status_icon, + GdkEventButton *event) +{ + if (event->button == 1 && status_icon->priv->button_down) { + status_icon->priv->button_down = FALSE; emit_activate_signal (status_icon); return TRUE; } |