Mercurial > pidgin.yaz
comparison pidgin/plugins/gestures/gestures.c @ 29804:93876452633b
Pull in GtkComboBox changes from GTK+3 branch.
Refs #1332, since I seem to have just found it.
*** Plucked rev c27b04bb38032682dfa343b38090df1c6eea4edd (qulogic@pidgin.im):
Use GtkComboBox instead of GtkOptionMenu in the choice request field for
GTK+ 2.4 and up.
*** Plucked rev d440cb6510a85d0451248d51de56b02a3a60afd2 (qulogic@pidgin.im):
Replace the GtkOptionMenu with a GtkComboBox for the privacy options list
on GTK+ 2.4 and up.
*** Plucked rev c32e5afffcda0d82fe8b69752ae91ce3dc3bcc61 (qulogic@pidgin.im):
Replace GtkOptionMenu with GtkComboBox in the saved status editor for GTK+
2.4 and up.
*** Plucked rev fbe77efc06ba98af604ef878b97fd55924daa018 (qulogic@pidgin.im):
Replace GtkOptionMenu with GtkComboBox in the gestures plugin for GTK+ 2.4
and up. But that code's commented out, so this is totally untested.
*** Plucked rev 9d8f789a57f4477db7d3cfbb9752b7842ff790dd (qulogic@pidgin.im):
Add an enumeration to replace a couple hardcoded numbers in the combo box
code for saved statuses.
*** Plucked rev c27b04bb38032682dfa343b38090df1c6eea4edd (qulogic@pidgin.im):
Use GtkComboBox instead of GtkOptionMenu in the choice request field for
GTK+ 2.4 and up.
*** Plucked rev d440cb6510a85d0451248d51de56b02a3a60afd2 (qulogic@pidgin.im):
Replace the GtkOptionMenu with a GtkComboBox for the privacy options list
on GTK+ 2.4 and up.
*** Plucked rev c32e5afffcda0d82fe8b69752ae91ce3dc3bcc61 (qulogic@pidgin.im):
Replace GtkOptionMenu with GtkComboBox in the saved status editor for GTK+
2.4 and up.
*** Plucked rev fbe77efc06ba98af604ef878b97fd55924daa018 (qulogic@pidgin.im):
Replace GtkOptionMenu with GtkComboBox in the gestures plugin for GTK+ 2.4
and up. But that code's commented out, so this is totally untested.
*** Plucked rev 9d8f789a57f4477db7d3cfbb9752b7842ff790dd (qulogic@pidgin.im):
Add an enumeration to replace a couple hardcoded numbers in the combo box
code for saved statuses.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Fri, 19 Feb 2010 07:29:30 +0000 |
parents | 21277e69e06c |
children | 1223abf2eaf2 |
comparison
equal
deleted
inserted
replaced
29800:fa8a25b46252 | 29804:93876452633b |
---|---|
143 if (PIDGIN_IS_PIDGIN_CONVERSATION(conv)) | 143 if (PIDGIN_IS_PIDGIN_CONVERSATION(conv)) |
144 attach_signals(conv); | 144 attach_signals(conv); |
145 } | 145 } |
146 | 146 |
147 #if 0 | 147 #if 0 |
148 #if GTK_CHECK_VERSION(2,4,0) | |
149 static void | |
150 mouse_button_menu_cb(GtkComboBox *opt, gpointer data) | |
151 { | |
152 int button = gtk_combo_box_get_active(opt); | |
153 | |
154 gstroke_set_mouse_button(button + 2); | |
155 } | |
156 #else | |
148 static void | 157 static void |
149 mouse_button_menu_cb(GtkMenuItem *item, gpointer data) | 158 mouse_button_menu_cb(GtkMenuItem *item, gpointer data) |
150 { | 159 { |
151 int button = (int)data; | 160 int button = (int)data; |
152 | 161 |
153 gstroke_set_mouse_button(button + 2); | 162 gstroke_set_mouse_button(button + 2); |
154 } | 163 } |
164 #endif | |
155 #endif | 165 #endif |
156 | 166 |
157 static void | 167 static void |
158 toggle_draw_cb(GtkToggleButton *toggle, gpointer data) | 168 toggle_draw_cb(GtkToggleButton *toggle, gpointer data) |
159 { | 169 { |
218 GtkWidget *ret; | 228 GtkWidget *ret; |
219 GtkWidget *vbox; | 229 GtkWidget *vbox; |
220 GtkWidget *toggle; | 230 GtkWidget *toggle; |
221 #if 0 | 231 #if 0 |
222 GtkWidget *opt; | 232 GtkWidget *opt; |
233 #if GTK_CHECK_VERSION(2,4,0) | |
223 GtkWidget *menu, *item; | 234 GtkWidget *menu, *item; |
235 #endif | |
224 #endif | 236 #endif |
225 | 237 |
226 /* Outside container */ | 238 /* Outside container */ |
227 ret = gtk_vbox_new(FALSE, 18); | 239 ret = gtk_vbox_new(FALSE, 18); |
228 gtk_container_set_border_width(GTK_CONTAINER(ret), 12); | 240 gtk_container_set_border_width(GTK_CONTAINER(ret), 12); |
229 | 241 |
230 /* Configuration frame */ | 242 /* Configuration frame */ |
231 vbox = pidgin_make_frame(ret, _("Mouse Gestures Configuration")); | 243 vbox = pidgin_make_frame(ret, _("Mouse Gestures Configuration")); |
232 | 244 |
233 #if 0 | 245 #if 0 |
246 #if GTK_CHECK_VERSION(2,4,0) | |
247 /* Mouse button drop-down menu */ | |
248 opt = gtk_combo_box_new_text(); | |
249 | |
250 gtk_combo_box_append_text(_("Middle mouse button")); | |
251 gtk_combo_box_append_text(_("Right mouse button")); | |
252 g_signal_connect(G_OBJECT(opt), "changed", | |
253 G_CALLBACK(mouse_button_menu_cb), NULL); | |
254 | |
255 gtk_box_pack_start(GTK_BOX(vbox), opt, FALSE, FALSE, 0); | |
256 gtk_combo_box_set_active(GTK_COMBO_BOX(opt), | |
257 gstroke_get_mouse_button() - 2); | |
258 #else | |
234 /* Mouse button drop-down menu */ | 259 /* Mouse button drop-down menu */ |
235 menu = gtk_menu_new(); | 260 menu = gtk_menu_new(); |
236 opt = gtk_option_menu_new(); | 261 opt = gtk_option_menu_new(); |
237 | 262 |
238 item = gtk_menu_item_new_with_label(_("Middle mouse button")); | 263 item = gtk_menu_item_new_with_label(_("Middle mouse button")); |
247 | 272 |
248 gtk_box_pack_start(GTK_BOX(vbox), opt, FALSE, FALSE, 0); | 273 gtk_box_pack_start(GTK_BOX(vbox), opt, FALSE, FALSE, 0); |
249 gtk_option_menu_set_menu(GTK_OPTION_MENU(opt), menu); | 274 gtk_option_menu_set_menu(GTK_OPTION_MENU(opt), menu); |
250 gtk_option_menu_set_history(GTK_OPTION_MENU(opt), | 275 gtk_option_menu_set_history(GTK_OPTION_MENU(opt), |
251 gstroke_get_mouse_button() - 2); | 276 gstroke_get_mouse_button() - 2); |
277 #endif | |
252 #endif | 278 #endif |
253 | 279 |
254 /* "Visual gesture display" checkbox */ | 280 /* "Visual gesture display" checkbox */ |
255 toggle = gtk_check_button_new_with_mnemonic(_("_Visual gesture display")); | 281 toggle = gtk_check_button_new_with_mnemonic(_("_Visual gesture display")); |
256 gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); | 282 gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); |