diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2010-01-29 19:43:31 +0100 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2010-01-29 19:43:31 +0100 |
commit | 25dc2813aa5f9e0a1d6c1eb11f98868f438e670c (patch) | |
tree | f74dccb0269dd6e3fbe216092b1bd6b41c5dc99c /plugins/gtkui/callbacks.c | |
parent | f25590daf55db51fbc52dd3fff4fdd75324b8dee (diff) |
fixed gui plugin configuration regression
Diffstat (limited to 'plugins/gtkui/callbacks.c')
-rw-r--r-- | plugins/gtkui/callbacks.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/plugins/gtkui/callbacks.c b/plugins/gtkui/callbacks.c index b6ae0acc..25c47408 100644 --- a/plugins/gtkui/callbacks.c +++ b/plugins/gtkui/callbacks.c @@ -2186,30 +2186,31 @@ plugin_configure (GtkWidget *parentwin, DB_plugin_t *p) { GtkWidget *btn = gtk_button_new_with_label ("…"); gtk_box_pack_start (GTK_BOX (cont), btn, FALSE, FALSE, 0); g_signal_connect (G_OBJECT (btn), "clicked", G_CALLBACK (on_prop_browse_file), prop); - prop = cont; } if (!strcmp (type, "password")) { gtk_entry_set_visibility (GTK_ENTRY (prop), FALSE); } + GtkWidget *cont = NULL; if (label && prop) { GtkWidget *hbox = NULL; hbox = gtk_hbox_new (FALSE, 8); gtk_widget_show (hbox); gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), prop, TRUE, TRUE, 0); - prop = hbox; + cont = hbox; + } + else { + cont = prop; } if (prop) { char *keydup = strdup (key); g_object_set_data_full (G_OBJECT (prop), "key", keydup, (GDestroyNotify)free); - gtk_box_pack_start (GTK_BOX (vbox), prop, FALSE, FALSE, 0); -// gtk_table_attach (GTK_TABLE (tbl), label, 0, 1, nrows-1, nrows, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions)0, 0, 0); -// gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); -// gtk_table_attach (GTK_TABLE (tbl), cont, 1, 2, nrows-1, nrows, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions)0, 0, 0); + } + if (cont) { + gtk_box_pack_start (GTK_BOX (vbox), cont, FALSE, FALSE, 0); } } - gtk_widget_show_all (win); } |