pidgin/gtkdebug.c

changeset 38714
a7b3becdc6ea
parent 38686
0c8abea27d96
parent 38707
6f4d3ab2f2ed
child 39127
7b167e080e84
child 39131
14bf4612a588
equal deleted inserted replaced
38687:46a5db31d820 38714:a7b3becdc6ea
394 GtkWidget *menu, *item; 394 GtkWidget *menu, *item;
395 const char *text[3]; 395 const char *text[3];
396 GtkToolbarStyle value[3]; 396 GtkToolbarStyle value[3];
397 int i; 397 int i;
398 398
399 if (!(event->button == 3 && event->type == GDK_BUTTON_PRESS)) 399 if (!gdk_event_triggers_context_menu((GdkEvent *)event))
400 return FALSE; 400 return FALSE;
401 401
402 text[0] = _("_Icon Only"); value[0] = GTK_TOOLBAR_ICONS; 402 text[0] = _("_Icon Only"); value[0] = GTK_TOOLBAR_ICONS;
403 text[1] = _("_Text Only"); value[1] = GTK_TOOLBAR_TEXT; 403 text[1] = _("_Text Only"); value[1] = GTK_TOOLBAR_TEXT;
404 text[2] = _("_Both Icon & Text"); value[2] = GTK_TOOLBAR_BOTH_HORIZ; 404 text[2] = _("_Both Icon & Text"); value[2] = GTK_TOOLBAR_BOTH_HORIZ;
414 gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); 414 gtk_menu_shell_append(GTK_MENU_SHELL(menu), item);
415 } 415 }
416 416
417 gtk_widget_show_all(menu); 417 gtk_widget_show_all(menu);
418 418
419 gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 3, event->time); 419 gtk_menu_popup_at_pointer(GTK_MENU(menu), (GdkEvent *)event);
420 return FALSE; 420 return FALSE;
421 } 421 }
422 422
423 static DebugWindow * 423 static DebugWindow *
424 debug_window_new(void) 424 debug_window_new(void)

mercurial