[vte/vte-next] Fix compiler warnings
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/vte-next] Fix compiler warnings
- Date: Thu, 26 May 2011 20:50:56 +0000 (UTC)
commit 5d4e48ec6af423678e9a79937d69350c62fc1fe4
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 3c16f80..376d1af 100644
--- a/src/vteapp.c
+++ b/src/vteapp.c
@@ -432,12 +432,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);
@@ -450,7 +452,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]