eel r2057 - in trunk: . eel



Author: chpe
Date: Wed Feb 13 15:00:06 2008
New Revision: 2057
URL: http://svn.gnome.org/viewvc/eel?rev=2057&view=rev

Log:
2008-02-13  Christian Persch  <chpe gnome org>

	* eel/eel-editable-label.c:
	(eel_editable_label_select_region_index): Update text targets list.
	Bug #516230.

Modified:
   trunk/ChangeLog
   trunk/eel/eel-editable-label.c

Modified: trunk/eel/eel-editable-label.c
==============================================================================
--- trunk/eel/eel-editable-label.c	(original)
+++ trunk/eel/eel-editable-label.c	Wed Feb 13 15:00:06 2008
@@ -1921,12 +1921,6 @@
 					gint      anchor_index,
 					gint      end_index)
 {
-  static const GtkTargetEntry targets[] = {
-    { "STRING", 0, 0 },
-    { "TEXT",   0, 0 }, 
-    { "COMPOUND_TEXT", 0, 0 },
-    { "UTF8_STRING", 0, 0 }
-  };
   GtkClipboard *clipboard;
 
   g_return_if_fail (EEL_IS_EDITABLE_LABEL (label));
@@ -1945,12 +1939,23 @@
       
   if (anchor_index != end_index)
     {
+      GtkTargetList *list;
+      GtkTargetEntry *targets;
+      guint n_targets;
+
+      list = gtk_target_list_new (NULL, 0);
+      gtk_target_list_add_text_targets (list, 0);
+      targets = gtk_target_table_new_from_list (list, &n_targets);
+
       gtk_clipboard_set_with_owner (clipboard,
-				    targets,
-				    G_N_ELEMENTS (targets),
+				    targets, n_targets,
 				    get_text_callback,
 				    clear_text_callback,
 				    G_OBJECT (label));
+
+      gtk_clipboard_set_can_store (clipboard, NULL, 0);
+      gtk_target_table_free (targets, n_targets);
+      gtk_target_list_unref (list);
     }
   else
     {



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