2005-11-18 [cleroy] 1.9.100cvs17

* src/gtk/inputdialog.c
		Fix icon staying the first one
This commit is contained in:
Colin Leroy 2005-11-18 07:54:56 +00:00
parent 4de45f159f
commit b7e729616b
4 changed files with 31 additions and 10 deletions

View file

@ -1,3 +1,8 @@
2005-11-18 [cleroy] 1.9.100cvs17
* src/gtk/inputdialog.c
Fix icon staying the first one
2005-11-17 [wwp] 1.9.100cvs16
fix possible problem showing some quicksearch buttons, and a bad
call to g_return_if_fail in a function that returns a value (both

View file

@ -1000,3 +1000,4 @@
( cvs diff -u -r 1.1.2.23 -r 1.1.2.24 src/gtk/quicksearch.c; ) > 1.9.100cvs14.patchset
( cvs diff -u -r 1.1.2.24 -r 1.1.2.25 src/gtk/quicksearch.c; ) > 1.9.100cvs15.patchset
( ) > 1.9.100cvs16.patchset
( cvs diff -u -r 1.2.2.12 -r 1.2.2.13 src/gtk/inputdialog.c; ) > 1.9.100cvs17.patchset

View file

@ -11,7 +11,7 @@ MINOR_VERSION=9
MICRO_VERSION=100
INTERFACE_AGE=0
BINARY_AGE=0
EXTRA_VERSION=16
EXTRA_VERSION=17
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=

View file

@ -64,6 +64,7 @@ static GtkWidget *msg_label;
static GtkWidget *entry;
static GtkWidget *combo;
static GtkWidget *ok_button;
static GtkWidget *icon_q, *icon_p;
static void input_dialog_create (gboolean is_password);
static gchar *input_dialog_open (const gchar *title,
@ -98,6 +99,9 @@ gchar *input_dialog(const gchar *title, const gchar *message,
type = INPUT_DIALOG_NORMAL;
gtk_widget_hide(combo);
gtk_widget_show(entry);
gtk_widget_show(icon_q);
gtk_widget_hide(icon_p);
gtk_entry_set_visibility(GTK_ENTRY(entry), TRUE);
return input_dialog_open(title, message, default_string);
@ -114,6 +118,9 @@ gchar *input_dialog_with_invisible(const gchar *title, const gchar *message,
type = INPUT_DIALOG_INVISIBLE;
gtk_widget_hide(combo);
gtk_widget_show(entry);
gtk_widget_hide(icon_q);
gtk_widget_show(icon_p);
gtk_entry_set_visibility(GTK_ENTRY(entry), FALSE);
return input_dialog_open(title, message, default_string);
@ -132,6 +139,9 @@ gchar *input_dialog_combo(const gchar *title, const gchar *message,
gtk_widget_hide(entry);
gtk_widget_show(combo);
gtk_widget_show(icon_q);
gtk_widget_hide(icon_p);
if (!list) {
GList empty_list;
@ -168,7 +178,6 @@ static void input_dialog_create(gboolean is_password)
GtkWidget *vbox;
GtkWidget *cancel_button;
GtkWidget *confirm_area;
GtkWidget *icon;
dialog = gtk_dialog_new();
@ -192,14 +201,14 @@ static void input_dialog_create(gboolean is_password)
/* for title label */
w_hbox = gtk_hbox_new(FALSE, 0);
if (!is_password)
icon = gtk_image_new_from_stock(GTK_STOCK_DIALOG_QUESTION,
GTK_ICON_SIZE_DIALOG);
else
icon = gtk_image_new_from_stock(GTK_STOCK_DIALOG_AUTHENTICATION,
GTK_ICON_SIZE_DIALOG);
gtk_misc_set_alignment (GTK_MISC (icon), 0.5, 0.0);
gtk_box_pack_start (GTK_BOX (hbox), icon, FALSE, FALSE, 0);
icon_q = gtk_image_new_from_stock(GTK_STOCK_DIALOG_QUESTION,
GTK_ICON_SIZE_DIALOG);
gtk_misc_set_alignment (GTK_MISC (icon_q), 0.5, 0.0);
gtk_box_pack_start (GTK_BOX (hbox), icon_q, FALSE, FALSE, 0);
icon_p = gtk_image_new_from_stock(GTK_STOCK_DIALOG_AUTHENTICATION,
GTK_ICON_SIZE_DIALOG);
gtk_misc_set_alignment (GTK_MISC (icon_p), 0.5, 0.0);
gtk_box_pack_start (GTK_BOX (hbox), icon_p, FALSE, FALSE, 0);
vbox = gtk_vbox_new (FALSE, 12);
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
@ -254,6 +263,11 @@ static void input_dialog_create(gboolean is_password)
gtk_widget_show_all(GTK_DIALOG(dialog)->vbox);
if (is_password)
gtk_widget_hide(icon_q);
else
gtk_widget_hide(icon_p);
gtk_widget_grab_default(ok_button);
g_signal_connect(G_OBJECT(ok_button), "clicked",
@ -274,6 +288,7 @@ static gchar *input_dialog_open(const gchar *title, const gchar *message,
input_dialog_set(title, message, default_string);
gtk_widget_show(dialog);
gtk_window_set_modal(GTK_WINDOW(dialog), TRUE);
manage_window_set_transient(GTK_WINDOW(dialog));