[vte/vte-next: 102/114] Fix compiler warnings
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte/vte-next: 102/114] Fix compiler warnings
- Date: Mon, 30 May 2011 17:15:19 +0000 (UTC)
commit 03700c0bf35963c438d2d2138bb915b49b89c892
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 7480b22..8233375 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]