2004-08-14 [colin] 0.9.12cvs60.3
authorColin Leroy <colin@colino.net>
Sat, 14 Aug 2004 11:05:25 +0000 (11:05 +0000)
committerColin Leroy <colin@colino.net>
Sat, 14 Aug 2004 11:05:25 +0000 (11:05 +0000)
* src/plugins/trayicon/trayicon.c
Put back resize callback, on size-request signal
rather than size-allocate to avoid infinite
callback loop

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/plugins/trayicon/trayicon.c

index af564def7dc7d30712eccda633208343c721e419..562b5d00638ff1ff4c786f471c0d3106a50c8884 100644 (file)
@@ -1,3 +1,10 @@
+2004-08-14 [colin]     0.9.12cvs60.3
+
+       * src/plugins/trayicon/trayicon.c
+               Put back resize callback, on size-request signal
+               rather than size-allocate to avoid infinite 
+               callback loop
+
 2004-08-13 [colin]     0.9.12cvs60.2
 
        * src/common/defs.h
index c18324387efebe32fc77ba2ce4529a5f22431789..277b8f5a14a311e5766b4c4fd93d90b936a474be 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.14.2.8 -r 1.14.2.9 src/plugins/trayicon/trayicon.c; ) > 0.9.12cvs59.1.patchset
 ( cvs diff -u -r 1.3.2.3 -r 1.3.2.4 src/folderutils.c; ) > 0.9.12cvs60.1.patchset
 ( cvs diff -u -r 1.9.2.6 -r 1.9.2.7 src/common/defs.h; ) > 0.9.12cvs60.2.patchset
+( cvs diff -u -r 1.14.2.9 -r 1.14.2.10 src/plugins/trayicon/trayicon.c; ) > 0.9.12cvs60.3.patchset
index d5b002f05cd0e605ce5be1495437423193c07ca4..126d86675b539e62110e48fb5ff69d3774e4651f 100644 (file)
@@ -13,7 +13,7 @@ INTERFACE_AGE=0
 BINARY_AGE=0
 EXTRA_VERSION=60
 EXTRA_RELEASE=
-EXTRA_GTK2_VERSION=.2
+EXTRA_GTK2_VERSION=.3
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}
index 84eae360801aa08bc3bfff36d3a3cc436f05589d..d8618157a5d4d20ca5238054209473c09eedfe0b 100644 (file)
@@ -71,11 +71,12 @@ typedef enum
        TRAYICON_NOTHING,
 } TrayIconType;
 
-static void trayicon_get_cb        ( gpointer data, guint action, GtkWidget *widget );
-static void trayicon_get_all_cb            ( gpointer data, guint action, GtkWidget *widget );
-static void trayicon_compose_cb            ( gpointer data, guint action, GtkWidget *widget );
-static void trayicon_addressbook_cb ( gpointer data, guint action, GtkWidget *widget );
-static void trayicon_exit_cb       ( gpointer data, guint action, GtkWidget *widget );
+static void trayicon_get_cb        (gpointer data, guint action, GtkWidget *widget);
+static void trayicon_get_all_cb            (gpointer data, guint action, GtkWidget *widget);
+static void trayicon_compose_cb            (gpointer data, guint action, GtkWidget *widget);
+static void trayicon_addressbook_cb (gpointer data, guint action, GtkWidget *widget);
+static void trayicon_exit_cb       (gpointer data, guint action, GtkWidget *widget);
+static void resize_cb              (GtkWidget *widget, GtkRequisition *req, gpointer user_data);
 
 static GtkItemFactoryEntry trayicon_popup_menu_entries[] =
 {
@@ -111,6 +112,7 @@ static void set_trayicon_pixmap(TrayIconType icontype)
 
        gtk_image_set_from_pixmap(GTK_IMAGE(image), pixmap, bitmap);
        gtk_widget_shape_combine_mask(GTK_WIDGET(trayicon), bitmap, GTK_WIDGET(image)->allocation.x, GTK_WIDGET(image)->allocation.y);
+
 }
 
 static void update(void)
@@ -134,6 +136,12 @@ static gboolean folder_item_update_hook(gpointer source, gpointer data)
        return FALSE;
 }
 
+static void resize_cb(GtkWidget *widget, GtkRequisition *req,
+                     gpointer user_data)
+{
+       update();
+}
+
 static gboolean click_cb(GtkWidget * widget,
                         GdkEventButton * event, gpointer user_data)
 {
@@ -198,6 +206,8 @@ static void create_trayicon()
        destroy_signal_id =
        g_signal_connect(G_OBJECT(trayicon), "destroy",
                         G_CALLBACK(destroy_cb), NULL);
+       g_signal_connect(GTK_OBJECT(trayicon), "size-request",
+                        G_CALLBACK(resize_cb), NULL);
        g_signal_connect(G_OBJECT(eventbox), "button-press-event",
                         G_CALLBACK(click_cb), NULL);