/cpw/tomkiewicz/masterpassword: daf255359b96: Use GtkSizeGroup f...
Tomasz Wasilczyk
tomkiewicz at cpw.pidgin.im
Sat May 11 10:37:18 EDT 2013
Changeset: daf255359b960e990565f2738f9b619e3a85c545
Author: Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date: 2013-05-11 16:37 +0200
Branch: soc.2008.masterpassword
URL: https://hg.pidgin.im/cpw/tomkiewicz/masterpassword/rev/daf255359b96
Description:
Use GtkSizeGroup for keyring settings
diffstat:
pidgin/gtkprefs.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diffs (54 lines):
diff --git a/pidgin/gtkprefs.c b/pidgin/gtkprefs.c
--- a/pidgin/gtkprefs.c
+++ b/pidgin/gtkprefs.c
@@ -2668,7 +2668,8 @@ keyring_page_settings_string_changed(Gtk
}
static GtkWidget *
-keyring_page_add_settings_field(GtkBox *vbox, PurpleRequestField *setting)
+keyring_page_add_settings_field(GtkBox *vbox, PurpleRequestField *setting,
+ GtkSizeGroup *sg)
{
GtkWidget *widget, *hbox;
PurpleRequestFieldType field_type;
@@ -2698,7 +2699,7 @@ keyring_page_add_settings_field(GtkBox *
}
g_object_set_data(G_OBJECT(widget), "setting", setting);
- hbox = pidgin_add_widget_to_vbox(vbox, label, NULL, widget,
+ hbox = pidgin_add_widget_to_vbox(vbox, label, sg, widget,
FALSE, NULL);
return ((void*)hbox == (void*)vbox) ? widget : hbox;
}
@@ -2708,9 +2709,9 @@ static GList *
keyring_page_add_settings(PurpleRequestFields *settings)
{
GList *it, *groups, *added_fields;
+ GtkSizeGroup *sg;
added_fields = NULL;
-
groups = purple_request_fields_get_groups(settings);
for (it = g_list_first(groups); it != NULL; it = g_list_next(it)) {
GList *it2, *fields;
@@ -2728,15 +2729,19 @@ keyring_page_add_settings(PurpleRequestF
} else
vbox = keyring_vbox;
+ sg = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
+
fields = purple_request_field_group_get_fields(group);
for (it2 = g_list_first(fields); it2 != NULL;
it2 = g_list_next(it2)) {
GtkWidget *added = keyring_page_add_settings_field(vbox,
- it2->data);
+ it2->data, sg);
if (added == NULL || vbox != keyring_vbox)
continue;
added_fields = g_list_prepend(added_fields, added);
}
+
+ g_object_unref(sg);
}
return added_fields;
More information about the Commits
mailing list