comparison pidgin/plugins/gestures/gestures.c @ 32680:33d15efe7dca

Remove unnecessary GTK+ version checks now that we depend on 2.10.0. I thought I did some of this already, though.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sat, 08 Oct 2011 22:35:05 +0000
parents 1223abf2eaf2
children
comparison
equal deleted inserted replaced
32679:6142c3f0868f 32680:33d15efe7dca
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 148 static void
150 mouse_button_menu_cb(GtkComboBox *opt, gpointer data) 149 mouse_button_menu_cb(GtkComboBox *opt, gpointer data)
151 { 150 {
152 int button = gtk_combo_box_get_active(opt); 151 int button = gtk_combo_box_get_active(opt);
153 152
154 gstroke_set_mouse_button(button + 2); 153 gstroke_set_mouse_button(button + 2);
155 } 154 }
156 #else
157 static void
158 mouse_button_menu_cb(GtkMenuItem *item, gpointer data)
159 {
160 int button = (int)data;
161
162 gstroke_set_mouse_button(button + 2);
163 }
164 #endif
165 #endif 155 #endif
166 156
167 static void 157 static void
168 toggle_draw_cb(GtkToggleButton *toggle, gpointer data) 158 toggle_draw_cb(GtkToggleButton *toggle, gpointer data)
169 { 159 {
228 GtkWidget *ret; 218 GtkWidget *ret;
229 GtkWidget *vbox; 219 GtkWidget *vbox;
230 GtkWidget *toggle; 220 GtkWidget *toggle;
231 #if 0 221 #if 0
232 GtkWidget *opt; 222 GtkWidget *opt;
233 #if GTK_CHECK_VERSION(2,4,0)
234 GtkWidget *menu, *item;
235 #endif
236 #endif 223 #endif
237 224
238 /* Outside container */ 225 /* Outside container */
239 ret = gtk_vbox_new(FALSE, 18); 226 ret = gtk_vbox_new(FALSE, 18);
240 gtk_container_set_border_width(GTK_CONTAINER(ret), 12); 227 gtk_container_set_border_width(GTK_CONTAINER(ret), 12);
241 228
242 /* Configuration frame */ 229 /* Configuration frame */
243 vbox = pidgin_make_frame(ret, _("Mouse Gestures Configuration")); 230 vbox = pidgin_make_frame(ret, _("Mouse Gestures Configuration"));
244 231
245 #if 0 232 #if 0
246 #if GTK_CHECK_VERSION(2,4,0)
247 /* Mouse button drop-down menu */ 233 /* Mouse button drop-down menu */
248 opt = gtk_combo_box_new_text(); 234 opt = gtk_combo_box_new_text();
249 235
250 gtk_combo_box_append_text(_("Middle mouse button")); 236 gtk_combo_box_append_text(_("Middle mouse button"));
251 gtk_combo_box_append_text(_("Right mouse button")); 237 gtk_combo_box_append_text(_("Right mouse button"));
253 G_CALLBACK(mouse_button_menu_cb), NULL); 239 G_CALLBACK(mouse_button_menu_cb), NULL);
254 240
255 gtk_box_pack_start(GTK_BOX(vbox), opt, FALSE, FALSE, 0); 241 gtk_box_pack_start(GTK_BOX(vbox), opt, FALSE, FALSE, 0);
256 gtk_combo_box_set_active(GTK_COMBO_BOX(opt), 242 gtk_combo_box_set_active(GTK_COMBO_BOX(opt),
257 gstroke_get_mouse_button() - 2); 243 gstroke_get_mouse_button() - 2);
258 #else
259 /* Mouse button drop-down menu */
260 menu = gtk_menu_new();
261 opt = gtk_option_menu_new();
262
263 item = gtk_menu_item_new_with_label(_("Middle mouse button"));
264 g_signal_connect(G_OBJECT(item), "activate",
265 G_CALLBACK(mouse_button_menu_cb), opt);
266 gtk_menu_append(menu, item);
267
268 item = gtk_menu_item_new_with_label(_("Right mouse button"));
269 g_signal_connect(G_OBJECT(item), "activate",
270 G_CALLBACK(mouse_button_menu_cb), opt);
271 gtk_menu_append(menu, item);
272
273 gtk_box_pack_start(GTK_BOX(vbox), opt, FALSE, FALSE, 0);
274 gtk_option_menu_set_menu(GTK_OPTION_MENU(opt), menu);
275 gtk_option_menu_set_history(GTK_OPTION_MENU(opt),
276 gstroke_get_mouse_button() - 2);
277 #endif
278 #endif 244 #endif
279 245
280 /* "Visual gesture display" checkbox */ 246 /* "Visual gesture display" checkbox */
281 toggle = gtk_check_button_new_with_mnemonic(_("_Visual gesture display")); 247 toggle = gtk_check_button_new_with_mnemonic(_("_Visual gesture display"));
282 gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); 248 gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0);