[vte/vte-next: 103/223] Fix compiler warnings



commit 364eb1d3c284a13194cfd87f2fe4a17e052e7696
Author: Christian Persch <chpe gnome org>
Date:   Thu May 26 22:50:38 2011 +0200

    Fix compiler warnings

 src/vteapp.c |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/src/vteapp.c b/src/vteapp.c
index a3c55dc..501e542 100644
--- a/src/vteapp.c
+++ b/src/vteapp.c
@@ -436,12 +436,14 @@ take_xconsole_ownership(GtkWidget *widget, gpointer data)
 	char *name, hostname[255];
 	GdkAtom atom;
 	GtkClipboard *clipboard;
-	const GtkTargetEntry targets[] = {
-		{"UTF8_STRING", 0, 0},
-		{"COMPOUND_TEXT", 0, 0},
-		{"TEXT", 0, 0},
-		{"STRING", 0, 0},
-	};
+        GtkTargetList *target_list;
+        GtkTargetEntry *targets;
+        int n_targets;
+
+        target_list = gtk_target_list_new(NULL, 0);
+        gtk_target_list_add_text_targets(target_list, 0);
+        targets = gtk_target_table_new_from_list (target_list, &n_targets);
+        gtk_target_list_unref(target_list);
 
 	memset(hostname, '\0', sizeof(hostname));
 	gethostname(hostname, sizeof(hostname) - 1);
@@ -454,7 +456,7 @@ take_xconsole_ownership(GtkWidget *widget, gpointer data)
 
 	gtk_clipboard_set_with_owner(clipboard,
 				     targets,
-				     G_N_ELEMENTS(targets),
+				     n_targets,
 				     clipboard_get,
 				     (GtkClipboardClearFunc)gtk_main_quit,
 				     G_OBJECT(widget));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]