Gtkclipboard and gtk_clipboard_store
- From: Lorenzo Marcon <lorenzo marcon startrekitalia com>
- To: gtk-app-devel-list gnome org
- Subject: Gtkclipboard and gtk_clipboard_store
- Date: Tue, 17 Oct 2006 16:08:17 +0200
I'm trying to use Gtkclipboard, but run into problems. I can't maintain the
data in the clipboard once I close my program, even if I use
gtk_clipboard_store function.
This is my code. It's the handler of a pop-up menu that allows to copy the
selected text item of a treeview.
gboolean on_copy_to_clipboard(GtkWidget *widget, gpointer data) {
GtkWidget *clipboard;
char *selected_anagram = (char *) data;
clipboard = (GtkWidget *) gtk_clipboard_get(GDK_SELECTION_CLIPBOARD);
gtk_clipboard_set_text(GTK_CLIPBOARD(clipboard), selected_anagram, -1);
gtk_clipboard_store(GTK_CLIPBOARD(clipboard));
return TRUE;
}
Thank you for any help
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]