pidgin/plugins/gestures/gestures.c

branch
cpw.qulogic.gtk3
changeset 26933
8e8961ef4460
parent 22782
c465a8b48510
child 32375
9ccb07c70f2a
equal deleted inserted replaced
26932:fdd6deb6896f 26933:8e8961ef4460
147 if (PIDGIN_IS_PIDGIN_CONVERSATION(conv)) 147 if (PIDGIN_IS_PIDGIN_CONVERSATION(conv))
148 attach_signals(conv); 148 attach_signals(conv);
149 } 149 }
150 150
151 #if 0 151 #if 0
152 #if GTK_CHECK_VERSION(2,4,0)
153 static void
154 mouse_button_menu_cb(GtkComboBox *opt, gpointer data)
155 {
156 int button = gtk_combo_box_get_active(opt);
157
158 gstroke_set_mouse_button(button + 2);
159 }
160 #else
152 static void 161 static void
153 mouse_button_menu_cb(GtkMenuItem *item, gpointer data) 162 mouse_button_menu_cb(GtkMenuItem *item, gpointer data)
154 { 163 {
155 int button = (int)data; 164 int button = (int)data;
156 165
157 gstroke_set_mouse_button(button + 2); 166 gstroke_set_mouse_button(button + 2);
158 } 167 }
168 #endif
159 #endif 169 #endif
160 170
161 static void 171 static void
162 toggle_draw_cb(GtkToggleButton *toggle, gpointer data) 172 toggle_draw_cb(GtkToggleButton *toggle, gpointer data)
163 { 173 {
222 GtkWidget *ret; 232 GtkWidget *ret;
223 GtkWidget *vbox; 233 GtkWidget *vbox;
224 GtkWidget *toggle; 234 GtkWidget *toggle;
225 #if 0 235 #if 0
226 GtkWidget *opt; 236 GtkWidget *opt;
237 #if GTK_CHECK_VERSION(2,4,0)
227 GtkWidget *menu, *item; 238 GtkWidget *menu, *item;
239 #endif
228 #endif 240 #endif
229 241
230 /* Outside container */ 242 /* Outside container */
231 ret = gtk_vbox_new(FALSE, 18); 243 ret = gtk_vbox_new(FALSE, 18);
232 gtk_container_set_border_width(GTK_CONTAINER(ret), 12); 244 gtk_container_set_border_width(GTK_CONTAINER(ret), 12);
233 245
234 /* Configuration frame */ 246 /* Configuration frame */
235 vbox = pidgin_make_frame(ret, _("Mouse Gestures Configuration")); 247 vbox = pidgin_make_frame(ret, _("Mouse Gestures Configuration"));
236 248
237 #if 0 249 #if 0
250 #if GTK_CHECK_VERSION(2,4,0)
251 /* Mouse button drop-down menu */
252 opt = gtk_combo_box_new_text();
253
254 gtk_combo_box_append_text(_("Middle mouse button"));
255 gtk_combo_box_append_text(_("Right mouse button"));
256 g_signal_connect(G_OBJECT(opt), "changed",
257 G_CALLBACK(mouse_button_menu_cb), NULL);
258
259 gtk_box_pack_start(GTK_BOX(vbox), opt, FALSE, FALSE, 0);
260 gtk_combo_box_set_active(GTK_COMBO_BOX(opt),
261 gstroke_get_mouse_button() - 2);
262 #else
238 /* Mouse button drop-down menu */ 263 /* Mouse button drop-down menu */
239 menu = gtk_menu_new(); 264 menu = gtk_menu_new();
240 opt = gtk_option_menu_new(); 265 opt = gtk_option_menu_new();
241 266
242 item = gtk_menu_item_new_with_label(_("Middle mouse button")); 267 item = gtk_menu_item_new_with_label(_("Middle mouse button"));
251 276
252 gtk_box_pack_start(GTK_BOX(vbox), opt, FALSE, FALSE, 0); 277 gtk_box_pack_start(GTK_BOX(vbox), opt, FALSE, FALSE, 0);
253 gtk_option_menu_set_menu(GTK_OPTION_MENU(opt), menu); 278 gtk_option_menu_set_menu(GTK_OPTION_MENU(opt), menu);
254 gtk_option_menu_set_history(GTK_OPTION_MENU(opt), 279 gtk_option_menu_set_history(GTK_OPTION_MENU(opt),
255 gstroke_get_mouse_button() - 2); 280 gstroke_get_mouse_button() - 2);
281 #endif
256 #endif 282 #endif
257 283
258 /* "Visual gesture display" checkbox */ 284 /* "Visual gesture display" checkbox */
259 toggle = gtk_check_button_new_with_mnemonic(_("_Visual gesture display")); 285 toggle = gtk_check_button_new_with_mnemonic(_("_Visual gesture display"));
260 gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0); 286 gtk_box_pack_start(GTK_BOX(vbox), toggle, FALSE, FALSE, 0);

mercurial