Add icon to alertpanel
authorColin Leroy <colin@colino.net>
Tue, 27 Jul 2004 07:47:09 +0000 (07:47 +0000)
committerColin Leroy <colin@colino.net>
Tue, 27 Jul 2004 07:47:09 +0000 (07:47 +0000)
ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/alertpanel.c
src/passphrase.c

index d93f1c761e6d05959ab0104e3922af81cf67a628..4eb9276e77bc9678f67c84c97fe47997710ece06 100644 (file)
@@ -1,3 +1,13 @@
+2004-07-27 [colin]     0.9.12cvs35.1
+
+       * src/alertpanel.c
+               Add an icon
+       * src/passphrase.c
+               Add debug output - maybe someone will
+               want to look at the problem with Grab
+               Input :)
+       Bump version as we're synced with HEAD
+
 2004-07-26 [colin]     0.9.12cvs33.26
 
        * src/pop.c
index 942b02a1245f471c47e7849537c2a45dafc4507e..5911a0071a35902789933577f98e34a82fe5b8a3 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
@@ -80,3 +80,4 @@
 ( cvs diff -u -r 1.17.2.2 -r 1.17.2.3 src/alertpanel.c; ) > 0.9.12cvs33.24.patchset
 ( cvs diff -u -r 1.5.2.8 -r 1.5.2.9 src/gtk/menu.c; cvs diff -u -r 1.274.2.12 -r 1.274.2.13 src/mainwindow.c; ) > 0.9.12cvs33.25.patchset
 ( cvs diff -u -r 1.56.2.20 -r 1.56.2.21 src/pop.c; ) > 0.9.12cvs33.26.patchset
+( cvs diff -u -r 1.17.2.3 -r 1.17.2.4 src/alertpanel.c; cvs diff -u -r 1.12.2.2 -r 1.12.2.3 src/passphrase.c; ) > 0.9.12cvs35.1.patchset
index 4036e6ab4e9bb91884620a3fc7dfa528600a759d..08aeb14b00815e74adffeedbf9483d2f782a69fa 100644 (file)
@@ -11,9 +11,9 @@ MINOR_VERSION=9
 MICRO_VERSION=12
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=33
+EXTRA_VERSION=35
 EXTRA_RELEASE=
-EXTRA_GTK2_VERSION=.26
+EXTRA_GTK2_VERSION=.1
 
 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 e44b6e603b4b22c0de942ef231e7d5684ab5e1fa..163e0c2489113cf73400f0c4bf58afe430394235 100644 (file)
@@ -222,6 +222,7 @@ static void alertpanel_create(const gchar *title,
 {
        static PangoFontDescription *font_desc;
        GtkWidget *label;
+       GtkWidget *w_hbox;
        GtkWidget *hbox;
        GtkWidget *vbox;
        GtkWidget *spc_vbox;
@@ -231,6 +232,7 @@ static void alertpanel_create(const gchar *title,
        GtkWidget *button1;
        GtkWidget *button2;
        GtkWidget *button3;
+       GtkWidget *icon;
        const gchar *label2;
        const gchar *label3;
 
@@ -251,15 +253,19 @@ static void alertpanel_create(const gchar *title,
        gtk_widget_realize(dialog);
 
        /* for title label */
+       w_hbox = gtk_hbox_new(FALSE, 0);
+       icon = gtk_image_new_from_stock(GTK_STOCK_DIALOG_WARNING,
+                                       GTK_ICON_SIZE_DIALOG); 
+       gtk_box_pack_start(GTK_BOX(w_hbox), icon, FALSE, FALSE, 16);
        hbox = gtk_hbox_new(FALSE, 0);
+       gtk_box_pack_start(GTK_BOX(w_hbox), hbox, FALSE, FALSE, 2);
        gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),
-                          hbox, TRUE, TRUE, 16);
+                          w_hbox, TRUE, TRUE, 16);
+
 
-       /* title label */
-       /* pixmapwid = create_pixmapwid(dialog, GNUstep_xpm); */
-       /* gtk_box_pack_start(GTK_BOX(hbox), pixmapwid, FALSE, FALSE, 16); */
        label = gtk_label_new(title);
        gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
+       gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
        if (!font_desc) {
                gchar *fontstr = prefs_common.titlefont
                                        ? prefs_common.titlefont
index 804ce1ee92ff6b25ec43c4e2e651d4a09d43f5ce..a71a54c194353511d31c5495c9c51b5d3eb6aed4 100644 (file)
@@ -82,6 +82,7 @@ passphrase_mbox (const gchar *desc)
     GtkWidget *pass_entry;
     GtkWidget *ok_button;
     GtkWidget *cancel_button;
+    gint       grab_result;
 
     window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
     gtk_window_set_title(GTK_WINDOW(window), _("Passphrase"));
@@ -162,21 +163,24 @@ passphrase_mbox (const gchar *desc)
 #ifdef GDK_WINDOWING_X11
         XGrabServer(GDK_DISPLAY());
 #endif /* GDK_WINDOWING_X11 */
-        if ( gdk_pointer_grab ( window->window, TRUE, 0,
+        if ( grab_result = gdk_pointer_grab ( window->window, TRUE, 0,
                                 NULL, NULL, GDK_CURRENT_TIME)) {
 #ifdef GDK_WINDOWING_X11
             XUngrabServer ( GDK_DISPLAY() );
 #endif /* GDK_WINDOWING_X11 */
-            g_warning ("OOPS: Could not grab mouse\n");
+            g_warning ("OOPS: Could not grab mouse (grab status %d)\n",
+                       grab_result);
             gtk_widget_destroy (window);
             return NULL;
         }
-        if ( gdk_keyboard_grab( window->window, FALSE, GDK_CURRENT_TIME )) {
+        if ( grab_result = gdk_keyboard_grab( window->window, FALSE, 
+                                               GDK_CURRENT_TIME )) {
             gdk_pointer_ungrab (GDK_CURRENT_TIME);
 #ifdef GDK_WINDOWING_X11
             XUngrabServer ( GDK_DISPLAY() );
 #endif /* GDK_WINDOWING_X11 */
-            g_warning ("OOPS: Could not grab keyboard\n");
+            g_warning ("OOPS: Could not grab keyboard (grab status %d)\n",
+                       grab_result);
             gtk_widget_destroy (window);
             return NULL;
         }