static void popupmenu_activate(gchar *label) { if(!strcmp(label, "New Tab")) { mainwindow_create_tab(); } else if(!strcmp(label, "Close Tab")) { mainwindow_close_tab(NULL); } else if(!strcmp(label, "Copy")) { vte_terminal_copy_clipboard(VTE_TERMINAL(mainwindow_get_terminal_at(activetab))); } else if(!strcmp(label, "Paste")) { vte_terminal_paste_clipboard(VTE_TERMINAL(mainwindow_get_terminal_at(activetab))); } else if(!strcmp(label, "Toggle Fullscreen")) { mainwindow_toggle_fullscreen(); } else if(!strcmp(label, "Quit")) { gtk_widget_destroy(GTK_WIDGET(mainwindow)); } popupmenu_shown = FALSE; }
static void paste_action_activated (GSimpleAction *action, GVariant *parameter, gpointer userdata) { vte_terminal_paste_clipboard (window_get_term_widget (GTK_WINDOW (userdata))); }
static gint mainwindow_paste(GtkWidget *widget, gpointer user_data) { vte_terminal_paste_clipboard( VTE_TERMINAL(mainwindow_get_terminal_at(activetab)) ); return TRUE; }
void terminal::paste(paste_buffer i_buffer) { if ( m_terminal != NULL ) { if ( i_buffer == PRIMARY ) vte_terminal_paste_primary(m_terminal); else if ( i_buffer == CLIPBOARD ) vte_terminal_paste_clipboard(m_terminal); } }
static void menu_paste_cb (GtkWidget *widget, gpointer data) { DEBUG_FUNCTION ("menu_paste_cb"); DEBUG_ASSERT (widget != NULL); DEBUG_ASSERT (data != NULL); tilda_term *tt = TILDA_TERM(data); vte_terminal_paste_clipboard (VTE_TERMINAL (tt->vte_term)); }
static void on_terminal_paste_cb (GtkAction * action, TerminalPlugin *term_plugin) { VteTerminal *term; if (term_plugin->child_pid) term = VTE_TERMINAL (term_plugin->term); else term = VTE_TERMINAL (term_plugin->shell); vte_terminal_paste_clipboard(term); }
void lcrt_edit_on_copy_and_paste_activate(GtkMenuItem *menuitem, gpointer user_data) { struct lcrt_window *lwindow = (struct lcrt_window *)user_data; struct lcrt_terminal *lterminal = lwindow->w_notebook->current_terminal; if (lterminal == NULL) return; debug_where(); vte_terminal_copy_clipboard(lterminal->terminal); vte_terminal_paste_clipboard(lterminal->terminal); }
void lcrt_edit_on_paste_activate(GtkMenuItem *menuitem, gpointer user_data) { struct lcrt_window *lwindow = (struct lcrt_window *)user_data; struct lcrt_terminal *lterminal = lwindow->w_notebook->current_terminal; debug_where(); if (lterminal == NULL || lterminal->connected != LCRT_TERMINAL_CONNECTED) return; debug_print("current_terminal = %p\n", lterminal); vte_terminal_paste_clipboard(lterminal->terminal); }
static void menu_paste_cb (GSimpleAction *action, GVariant *parameter, gpointer user_data) { DEBUG_FUNCTION ("menu_paste_cb"); DEBUG_ASSERT (user_data != NULL); tilda_term *tt = TILDA_TERM(user_data); vte_terminal_paste_clipboard (VTE_TERMINAL (tt->vte_term)); }
/* key event handler */ gboolean event_key(GtkWidget *widget, GdkEventKey *event, window *w) { guint(g) = event->keyval; if ((event->state & (GDK_CONTROL_MASK|GDK_SHIFT_MASK)) == (GDK_CONTROL_MASK|GDK_SHIFT_MASK)) { if (g == GDK_N) { new_window(); return TRUE; } if (g == GDK_T) { tab_new(w); return TRUE; } if (g == GDK_H) { tab_togglebar(w); return TRUE; } if (g == GDK_W) { tab_close(NULL, w); return TRUE; } if (g == GDK_V) { vte_terminal_paste_clipboard(VTE_TERMINAL(get_current_term(w)->vte)); return TRUE; } if (g == GDK_C) { vte_terminal_copy_clipboard(VTE_TERMINAL(get_current_term(w)->vte)); return TRUE; } } if ((event->state & (GDK_MOD1_MASK) ) == (GDK_MOD1_MASK)) { if (g == GDK_Left) { tab_switch(FALSE, w); return TRUE; } if (g == GDK_Right) { tab_switch(TRUE, w); return TRUE; } if (g == GDK_F11) { if(config->fullscreen) { gtk_window_unfullscreen(GTK_WINDOW(widget)); config->fullscreen = FALSE; } else { gtk_window_fullscreen(GTK_WINDOW(widget)); config->fullscreen = TRUE; } return TRUE; } } return FALSE; }
static gboolean key_press_cb(GtkWidget *vte, GdkEventKey *event) { const GdkModifierType modifiers = event->state & gtk_accelerator_get_default_mod_mask(); if (modifiers == (GDK_CONTROL_MASK|GDK_SHIFT_MASK)) { switch (gdk_keyval_to_lower(event->keyval)) { case GDK_c: vte_terminal_copy_clipboard(VTE_TERMINAL(vte)); return TRUE; case GDK_v: vte_terminal_paste_clipboard(VTE_TERMINAL(vte)); return TRUE; } } return FALSE; }
static gboolean on_key_press (GtkWidget *terminal, GdkEventKey *event) { if (event->state == (GDK_CONTROL_MASK | GDK_SHIFT_MASK)) { switch (event->keyval) { case GDK_C: vte_terminal_copy_clipboard (VTE_TERMINAL (terminal)); return TRUE; case GDK_V: vte_terminal_paste_clipboard (VTE_TERMINAL (terminal)); return TRUE; case GDK_X: xdg_open_selection (terminal); return TRUE; } } return FALSE; }
gboolean sig_key_press(GtkWidget *widget, GdkEvent *event, gpointer data) { VteTerminal *term = VTE_TERMINAL(widget); GtkWidget *win = (GtkWidget *)data; if (((GdkEventKey *)event)->state & GDK_CONTROL_MASK) { switch (((GdkEventKey *)event)->keyval) { case GDK_KEY_C: vte_terminal_copy_clipboard(term); return TRUE; case GDK_KEY_V: vte_terminal_paste_clipboard(term); return TRUE; case GDK_KEY_KP_0: vte_terminal_set_font_scale(term, 1); vte_terminal_set_geometry_hints_for_window(VTE_TERMINAL(term), GTK_WINDOW(win)); return TRUE; case GDK_KEY_KP_1: term_set_font(win, term, 0); return TRUE; case GDK_KEY_KP_2: term_set_font(win, term, 1); return TRUE; case GDK_KEY_KP_3: term_set_font(win, term, 2); return TRUE; case GDK_KEY_KP_4: term_set_font(win, term, 3); return TRUE; case GDK_KEY_KP_5: term_set_font(win, term, 4); return TRUE; case GDK_KEY_KP_6: term_set_font(win, term, 5); return TRUE; case GDK_KEY_KP_7: term_set_font(win, term, 6); return TRUE; case GDK_KEY_KP_8: term_set_font(win, term, 7); return TRUE; case GDK_KEY_KP_9: term_set_font(win, term, 8); return TRUE; } } return FALSE; }
static VALUE rg_paste_clipboard(VALUE self) { vte_terminal_paste_clipboard(RVAL2TERM(self)); return self; }
static void on_terminal_paste(G_GNUC_UNUSED const MenuItem *menu_item) { vte_terminal_paste_clipboard(program_terminal); }
void termit_paste() { gint page = gtk_notebook_get_current_page(GTK_NOTEBOOK(termit.notebook)); TERMIT_GET_TAB_BY_INDEX(pTab, page); vte_terminal_paste_clipboard(VTE_TERMINAL(pTab->vte)); }
static VALUE rg_paste_clipboard(VALUE self) { vte_terminal_paste_clipboard(_SELF(self)); return self; }
static VALUE term_paste_clipboard(VALUE self) { vte_terminal_paste_clipboard(RVAL2TERM(self)); return Qnil; }