From 9b39368dbbccd4dd9231776c544f17df9adec503 Mon Sep 17 00:00:00 2001 From: Colin Leroy Date: Tue, 27 Jul 2004 07:47:09 +0000 Subject: [PATCH] Add icon to alertpanel --- ChangeLog-gtk2.claws | 10 ++++++++++ PATCHSETS | 1 + configure.ac | 4 ++-- src/alertpanel.c | 14 ++++++++++---- src/passphrase.c | 12 ++++++++---- 5 files changed, 31 insertions(+), 10 deletions(-) diff --git a/ChangeLog-gtk2.claws b/ChangeLog-gtk2.claws index d93f1c761..4eb9276e7 100644 --- a/ChangeLog-gtk2.claws +++ b/ChangeLog-gtk2.claws @@ -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 diff --git a/PATCHSETS b/PATCHSETS index 942b02a12..5911a0071 100644 --- 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 diff --git a/configure.ac b/configure.ac index 4036e6ab4..08aeb14b0 100644 --- a/configure.ac +++ b/configure.ac @@ -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} diff --git a/src/alertpanel.c b/src/alertpanel.c index e44b6e603..163e0c248 100644 --- a/src/alertpanel.c +++ b/src/alertpanel.c @@ -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 diff --git a/src/passphrase.c b/src/passphrase.c index 804ce1ee9..a71a54c19 100644 --- a/src/passphrase.c +++ b/src/passphrase.c @@ -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; } -- 2.25.1