static void vte_popup_menu_clicked(GtkMenuItem *menuitem, gpointer user_data) { switch (GPOINTER_TO_INT(user_data)) { case POPUP_COPY: { if (vf->vte_terminal_get_has_selection(VTE_TERMINAL(vc->vte))) vf->vte_terminal_copy_clipboard(VTE_TERMINAL(vc->vte)); break; } case POPUP_PASTE: { vf->vte_terminal_paste_clipboard(VTE_TERMINAL(vc->vte)); break; } case POPUP_SELECTALL: { vte_select_all(); break; } case POPUP_CHANGEPATH: { GeanyDocument *doc = document_get_current(); if (doc != NULL) vte_cwd(doc->file_name, TRUE); break; } case POPUP_RESTARTTERMINAL: { vte_restart(vc->vte); break; } case POPUP_PREFERENCES: { GtkWidget *notebook, *tab_page; prefs_show_dialog(); notebook = ui_lookup_widget(ui_widgets.prefs_dialog, "notebook2"); tab_page = ui_lookup_widget(ui_widgets.prefs_dialog, "frame_term"); gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook), gtk_notebook_page_num(GTK_NOTEBOOK(notebook), GTK_WIDGET(tab_page))); break; } } }
void on_preferences1_activate(GtkMenuItem *menuitem, gpointer user_data) { prefs_show_dialog(); }
static PyObject * Prefs_show_dialog(PyObject *module) { prefs_show_dialog(); Py_RETURN_NONE; }