예제 #1
0
파일: popupmenu.c 프로젝트: ashang/stjerm
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;
}
예제 #2
0
static void
paste_action_activated (GSimpleAction *action,
                        GVariant      *parameter,
                        gpointer       userdata)
{
    vte_terminal_paste_clipboard (window_get_term_widget (GTK_WINDOW (userdata)));
}
예제 #3
0
파일: mainwindow.c 프로젝트: ashang/stjerm
static gint mainwindow_paste(GtkWidget *widget, gpointer user_data) 
{
    vte_terminal_paste_clipboard(
        VTE_TERMINAL(mainwindow_get_terminal_at(activetab))
    );
    return TRUE;
}
예제 #4
0
파일: terminal.cpp 프로젝트: flocke/sterm
 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);
   }
 }
예제 #5
0
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));
}
예제 #6
0
파일: terminal.c 프로젝트: rosedu/anjuta
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);
}
예제 #7
0
파일: cedit.c 프로젝트: reyesr/lcrt
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);
}
예제 #8
0
파일: cedit.c 프로젝트: reyesr/lcrt
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);
}
예제 #9
0
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));
}
예제 #10
0
파일: svte.c 프로젝트: skawouter/svte-tmp
/* 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;
}
예제 #11
0
파일: termite.c 프로젝트: zxv/termite
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;
}
예제 #12
0
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;
}
예제 #13
0
파일: daemon.c 프로젝트: vain/xiate
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;
}
예제 #14
0
static VALUE
rg_paste_clipboard(VALUE self)
{
    vte_terminal_paste_clipboard(RVAL2TERM(self));
    return self;
}
예제 #15
0
static void on_terminal_paste(G_GNUC_UNUSED const MenuItem *menu_item)
{
	vte_terminal_paste_clipboard(program_terminal);
}
예제 #16
0
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));
}
예제 #17
0
static VALUE
rg_paste_clipboard(VALUE self)
{
    vte_terminal_paste_clipboard(_SELF(self));
    return self;
}
예제 #18
0
static VALUE
term_paste_clipboard(VALUE self)
{
    vte_terminal_paste_clipboard(RVAL2TERM(self));
    return Qnil;
}