Mercurial > pidgin.yaz
comparison src/gtkaccount.c @ 5644:213e999fa5cc
[gaim-migrate @ 6058]
Added a generic function for creating and automatically filling a drop-down
with a list of loaded protocols plugins, and used it in the new account
editor.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 01 Jun 2003 23:14:31 +0000 |
parents | 5e9babc828c4 |
children | 0cc2d99b7c44 |
comparison
equal
deleted
inserted
replaced
5643:eb685809108b | 5644:213e999fa5cc |
---|---|
95 } | 95 } |
96 | 96 |
97 /************************************************************************** | 97 /************************************************************************** |
98 * Add/Modify Account dialog | 98 * Add/Modify Account dialog |
99 **************************************************************************/ | 99 **************************************************************************/ |
100 static GtkWidget * | 100 static void |
101 __make_protocol_menu(AccountPrefsDialog *dialog) | 101 __set_account_protocol(GtkWidget *item, GaimProtocol protocol) |
102 { | 102 { |
103 return gtk_button_new(); | 103 AccountPrefsDialog *dialog; |
104 | |
105 dialog = g_object_get_data(G_OBJECT(item), "user_data"); | |
104 } | 106 } |
105 | 107 |
106 static GtkWidget * | 108 static GtkWidget * |
107 __add_pref_box(AccountPrefsDialog *dialog, GtkWidget *parent, | 109 __add_pref_box(AccountPrefsDialog *dialog, GtkWidget *parent, |
108 const char *text, GtkWidget *widget) | 110 const char *text, GtkWidget *widget) |
146 vbox = gtk_vbox_new(FALSE, 6); | 148 vbox = gtk_vbox_new(FALSE, 6); |
147 gtk_container_add(GTK_CONTAINER(frame), vbox); | 149 gtk_container_add(GTK_CONTAINER(frame), vbox); |
148 gtk_widget_show(vbox); | 150 gtk_widget_show(vbox); |
149 | 151 |
150 /* Protocol */ | 152 /* Protocol */ |
151 dialog->protocol_menu = __make_protocol_menu(dialog); | 153 dialog->protocol_menu = gaim_gtk_protocol_option_menu_new(-1, |
154 G_CALLBACK(__set_account_protocol), dialog); | |
155 | |
152 __add_pref_box(dialog, vbox, _("Protocol:"), dialog->protocol_menu); | 156 __add_pref_box(dialog, vbox, _("Protocol:"), dialog->protocol_menu); |
153 | 157 |
154 /* Screen Name */ | 158 /* Screen Name */ |
155 dialog->screenname_entry = gtk_entry_new(); | 159 dialog->screenname_entry = gtk_entry_new(); |
156 __add_pref_box(dialog, vbox, _("Screenname:"), dialog->screenname_entry); | 160 __add_pref_box(dialog, vbox, _("Screenname:"), dialog->screenname_entry); |