Mercurial > pidgin.yaz
comparison pidgin/gtkpluginpref.c @ 15501:d75099d2567e
gaim_gtk to pidgin. I hope
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sat, 03 Feb 2007 07:23:11 +0000 |
parents | 5fe8042783c1 |
children | cebfc6af3eb5 |
comparison
equal
deleted
inserted
replaced
15500:45ecefd0ce3a | 15501:d75099d2567e |
---|---|
78 pref_label = gaim_plugin_pref_get_label(pref); | 78 pref_label = gaim_plugin_pref_get_label(pref); |
79 format = gaim_plugin_pref_get_format_type(pref); | 79 format = gaim_plugin_pref_get_format_type(pref); |
80 | 80 |
81 switch(gaim_plugin_pref_get_type(pref)) { | 81 switch(gaim_plugin_pref_get_type(pref)) { |
82 case GAIM_PLUGIN_PREF_CHOICE: | 82 case GAIM_PLUGIN_PREF_CHOICE: |
83 gtk_label = gaim_gtk_prefs_dropdown_from_list(parent, pref_label, | 83 gtk_label = pidgin_prefs_dropdown_from_list(parent, pref_label, |
84 GAIM_PREF_STRING, pref_name, | 84 GAIM_PREF_STRING, pref_name, |
85 gaim_plugin_pref_get_choices(pref)); | 85 gaim_plugin_pref_get_choices(pref)); |
86 gtk_misc_set_alignment(GTK_MISC(gtk_label), 0, 0.5); | 86 gtk_misc_set_alignment(GTK_MISC(gtk_label), 0, 0.5); |
87 | 87 |
88 if(sg) | 88 if(sg) |
140 | 140 |
141 spacer = gtk_label_new(" "); | 141 spacer = gtk_label_new(" "); |
142 gtk_box_pack_start(GTK_BOX(hbox), spacer, FALSE, FALSE, 0); | 142 gtk_box_pack_start(GTK_BOX(hbox), spacer, FALSE, FALSE, 0); |
143 gtk_widget_show(spacer); | 143 gtk_widget_show(spacer); |
144 | 144 |
145 frame = gaim_gtk_create_imhtml(TRUE, &imhtml, &toolbar, NULL); | 145 frame = pidgin_create_imhtml(TRUE, &imhtml, &toolbar, NULL); |
146 if (!(format & GAIM_STRING_FORMAT_TYPE_HTML)) | 146 if (!(format & GAIM_STRING_FORMAT_TYPE_HTML)) |
147 gtk_widget_destroy(toolbar); | 147 gtk_widget_destroy(toolbar); |
148 | 148 |
149 gtk_imhtml_append_text(GTK_IMHTML(imhtml), gaim_prefs_get_string(pref_name), | 149 gtk_imhtml_append_text(GTK_IMHTML(imhtml), gaim_prefs_get_string(pref_name), |
150 (format & GAIM_STRING_FORMAT_TYPE_MULTILINE) ? 0 : GTK_IMHTML_NO_NEWLINE); | 150 (format & GAIM_STRING_FORMAT_TYPE_MULTILINE) ? 0 : GTK_IMHTML_NO_NEWLINE); |
172 pref_name = gaim_plugin_pref_get_name(pref); | 172 pref_name = gaim_plugin_pref_get_name(pref); |
173 pref_label = gaim_plugin_pref_get_label(pref); | 173 pref_label = gaim_plugin_pref_get_label(pref); |
174 | 174 |
175 switch(gaim_plugin_pref_get_type(pref)) { | 175 switch(gaim_plugin_pref_get_type(pref)) { |
176 case GAIM_PLUGIN_PREF_CHOICE: | 176 case GAIM_PLUGIN_PREF_CHOICE: |
177 gtk_label = gaim_gtk_prefs_dropdown_from_list(parent, pref_label, | 177 gtk_label = pidgin_prefs_dropdown_from_list(parent, pref_label, |
178 GAIM_PREF_INT, pref_name, gaim_plugin_pref_get_choices(pref)); | 178 GAIM_PREF_INT, pref_name, gaim_plugin_pref_get_choices(pref)); |
179 gtk_misc_set_alignment(GTK_MISC(gtk_label), 0, 0.5); | 179 gtk_misc_set_alignment(GTK_MISC(gtk_label), 0, 0.5); |
180 | 180 |
181 if(sg) | 181 if(sg) |
182 gtk_size_group_add_widget(sg, gtk_label); | 182 gtk_size_group_add_widget(sg, gtk_label); |
183 | 183 |
184 break; | 184 break; |
185 case GAIM_PLUGIN_PREF_NONE: | 185 case GAIM_PLUGIN_PREF_NONE: |
186 default: | 186 default: |
187 gaim_plugin_pref_get_bounds(pref, &min, &max); | 187 gaim_plugin_pref_get_bounds(pref, &min, &max); |
188 gaim_gtk_prefs_labeled_spin_button(parent, pref_label, | 188 pidgin_prefs_labeled_spin_button(parent, pref_label, |
189 pref_name, min, max, sg); | 189 pref_name, min, max, sg); |
190 break; | 190 break; |
191 } | 191 } |
192 } | 192 } |
193 | 193 |
201 gtk_widget_show(gtk_label); | 201 gtk_widget_show(gtk_label); |
202 } | 202 } |
203 | 203 |
204 | 204 |
205 GtkWidget * | 205 GtkWidget * |
206 gaim_gtk_plugin_pref_create_frame(GaimPluginPrefFrame *frame) { | 206 pidgin_plugin_pref_create_frame(GaimPluginPrefFrame *frame) { |
207 GtkWidget *ret, *parent; | 207 GtkWidget *ret, *parent; |
208 GtkSizeGroup *sg; | 208 GtkSizeGroup *sg; |
209 GList *pp; | 209 GList *pp; |
210 | 210 |
211 g_return_val_if_fail(frame, NULL); | 211 g_return_val_if_fail(frame, NULL); |
230 continue; | 230 continue; |
231 | 231 |
232 if(gaim_plugin_pref_get_type(pref) == GAIM_PLUGIN_PREF_INFO) { | 232 if(gaim_plugin_pref_get_type(pref) == GAIM_PLUGIN_PREF_INFO) { |
233 make_info_pref(parent, pref); | 233 make_info_pref(parent, pref); |
234 } else { | 234 } else { |
235 parent = gaim_gtk_make_frame(ret, label); | 235 parent = pidgin_make_frame(ret, label); |
236 gtk_widget_show(parent); | 236 gtk_widget_show(parent); |
237 } | 237 } |
238 | 238 |
239 continue; | 239 continue; |
240 } | 240 } |
241 | 241 |
242 switch(gaim_prefs_get_type(name)) { | 242 switch(gaim_prefs_get_type(name)) { |
243 case GAIM_PREF_BOOLEAN: | 243 case GAIM_PREF_BOOLEAN: |
244 gaim_gtk_prefs_checkbox(label, name, parent); | 244 pidgin_prefs_checkbox(label, name, parent); |
245 break; | 245 break; |
246 case GAIM_PREF_INT: | 246 case GAIM_PREF_INT: |
247 make_int_pref(parent, pref, sg); | 247 make_int_pref(parent, pref, sg); |
248 break; | 248 break; |
249 case GAIM_PREF_STRING: | 249 case GAIM_PREF_STRING: |