static void palette_editor_entry_context (GimpPaletteView *view, GimpPaletteEntry *entry, GimpPaletteEditor *editor) { gimp_editor_popup_menu (GIMP_EDITOR (editor), NULL, NULL); }
static gboolean gimp_component_editor_button_press (GtkWidget *widget, GdkEventButton *bevent, GimpComponentEditor *editor) { GtkTreeViewColumn *column; GtkTreePath *path; editor->clicked_component = -1; if (gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (widget), bevent->x, bevent->y, &path, &column, NULL, NULL)) { GtkTreeIter iter; GimpChannelType channel; gboolean active; active = gtk_tree_selection_path_is_selected (editor->selection, path); gtk_tree_model_get_iter (editor->model, &iter, path); gtk_tree_path_free (path); gtk_tree_model_get (editor->model, &iter, COLUMN_CHANNEL, &channel, -1); editor->clicked_component = channel; switch (bevent->button) { case 1: if (column != editor->eye_column && bevent->type == GDK_BUTTON_PRESS) { GimpImage *image = GIMP_IMAGE_EDITOR (editor)->image; gimp_image_set_component_active (image, channel, ! active); gimp_image_flush (image); } break; case 2: break; case 3: gimp_editor_popup_menu (GIMP_EDITOR (editor), NULL, NULL); break; default: break; } } return FALSE; }
static gboolean gimp_container_grid_view_popup_menu (GtkWidget *widget) { GimpContainerGridView *grid_view = GIMP_CONTAINER_GRID_VIEW (widget); return gimp_editor_popup_menu (GIMP_EDITOR (widget), gimp_container_grid_view_menu_position, grid_view); }
static void gimp_container_editor_real_context_item (GimpContainerEditor *editor, GimpViewable *viewable) { GimpContainer *container = gimp_container_view_get_container (editor->view); if (viewable && gimp_container_have (container, GIMP_OBJECT (viewable))) { gimp_editor_popup_menu (GIMP_EDITOR (editor->view), NULL, NULL); } }
static gboolean gimp_error_console_button_press (GtkWidget *widget, GdkEventButton *bevent, GimpErrorConsole *console) { if (gimp_button_event_triggers_context_menu (bevent)) { return gimp_editor_popup_menu (GIMP_EDITOR (console), NULL, NULL); } return FALSE; }
static gboolean gimp_container_grid_view_button_press (GtkWidget *widget, GdkEventButton *bevent, GimpContainerGridView *grid_view) { switch (bevent->button) { case 3: gimp_editor_popup_menu (GIMP_EDITOR (grid_view), NULL, NULL); break; default: break; } return TRUE; }