Example #1
0
static void gglk_text_paste_clipboard_selection(GglkText *tb,
						GdkAtom selection,
						GtkTextIter *iter)
{
    GtkClipboard *clipboard = gtk_widget_get_clipboard(GTK_WIDGET(tb),
						       selection);
    if(!gtk_text_iter_can_insert(iter, FALSE))
	gtk_text_buffer_get_iter_at_mark(tb->buffer, iter, tb->endedit);

    gtk_text_buffer_paste_clipboard(tb->buffer, clipboard, iter, FALSE);
}
Example #2
0
static VALUE
rg_can_insert_p(VALUE self, VALUE default_setting)
{
    return CBOOL2RVAL(gtk_text_iter_can_insert(_SELF(self), RVAL2CBOOL(default_setting)));
}