[Gnucash-changes] r13288 - gnucash/trunk - Remove all explicit claiming of the selection in these files. The

David Hampton hampton at cvs.gnucash.org
Sat Feb 18 00:18:30 EST 2006


Author: hampton
Date: 2006-02-18 00:18:29 -0500 (Sat, 18 Feb 2006)
New Revision: 13288
Trac: http://svn.gnucash.org/trac/changeset/13288

Modified:
   gnucash/trunk/ChangeLog
   gnucash/trunk/src/register/register-gnome/gnucash-item-edit.c
   gnucash/trunk/src/register/register-gnome/gnucash-item-edit.h
   gnucash/trunk/src/register/register-gnome/gnucash-sheet.c
Log:
Remove all explicit claiming of the selection in these files.  The
GtkEntry they use already performs claims, and the additional just
mess things up.  Fixes #330153.


Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2006-02-18 03:02:32 UTC (rev 13287)
+++ gnucash/trunk/ChangeLog	2006-02-18 05:18:29 UTC (rev 13288)
@@ -1,5 +1,11 @@
 2006-02-17  David Hampton  <hampton at employees.org>
 
+	* src/register/register-gnome/gnucash-sheet.c:
+	* src/register/register-gnome/gnucash-item-edit.[ch]: Remove all
+	explicit claiming of the selection in these files.  The GtkEntry
+	they use already performs claims, and the additional just mess
+	things up.  Fixes #330153.
+
 	* src/register/register-gnome/gnucash-item-list.c:
 	* src/report/report-gnome/dialog-style-sheet.c:
 	* src/gnome-utils/gnc-tree-model-commodity.c:

Modified: gnucash/trunk/src/register/register-gnome/gnucash-item-edit.c
===================================================================
--- gnucash/trunk/src/register/register-gnome/gnucash-item-edit.c	2006-02-18 03:02:32 UTC (rev 13287)
+++ gnucash/trunk/src/register/register-gnome/gnucash-item-edit.c	2006-02-18 05:18:29 UTC (rev 13288)
@@ -920,38 +920,6 @@
 }
 
 
-void
-gnc_item_edit_claim_selection (GncItemEdit *item_edit, guint32 time)
-{
-        GtkEditable *editable;
-        gint start_sel, end_sel;
-
-        g_return_if_fail(item_edit != NULL);
-        g_return_if_fail(GNC_IS_ITEM_EDIT(item_edit));
-
-        editable = GTK_EDITABLE (item_edit->editor);
-
-	gtk_editable_get_selection_bounds (editable, &start_sel, &end_sel);
-
-        if (start_sel != end_sel)
-        {
-                gtk_selection_owner_set (GTK_WIDGET(item_edit->sheet),
-                                         GDK_SELECTION_PRIMARY, time);
-                item_edit->has_selection = TRUE;
-        }
-        else
-        {
-                GdkWindow *owner;
-
-                owner = gdk_selection_owner_get (GDK_SELECTION_PRIMARY);
-                if (owner == GTK_WIDGET(item_edit->sheet)->window)
-                        gtk_selection_owner_set (NULL, GDK_SELECTION_PRIMARY,
-                                                 time);
-                item_edit->has_selection = FALSE;
-        }
-}
-
-
 static void
 gnc_item_edit_cut_copy_clipboard (GncItemEdit *item_edit, guint32 time, gboolean cut)
 {

Modified: gnucash/trunk/src/register/register-gnome/gnucash-item-edit.h
===================================================================
--- gnucash/trunk/src/register/register-gnome/gnucash-item-edit.h	2006-02-18 03:02:32 UTC (rev 13287)
+++ gnucash/trunk/src/register/register-gnome/gnucash-item-edit.h	2006-02-18 05:18:29 UTC (rev 13288)
@@ -151,8 +151,6 @@
 
 void gnc_item_edit_redraw (GncItemEdit *item_edit);
 
-void gnc_item_edit_claim_selection (GncItemEdit *item_edit, guint32 time);
-
 void gnc_item_edit_cut_clipboard (GncItemEdit *item_edit, guint32 time);
 void gnc_item_edit_copy_clipboard (GncItemEdit *item_edit, guint32 time);
 void gnc_item_edit_paste_clipboard (GncItemEdit *item_edit, guint32 time);

Modified: gnucash/trunk/src/register/register-gnome/gnucash-sheet.c
===================================================================
--- gnucash/trunk/src/register/register-gnome/gnucash-sheet.c	2006-02-18 03:02:32 UTC (rev 13287)
+++ gnucash/trunk/src/register/register-gnome/gnucash-sheet.c	2006-02-18 05:18:29 UTC (rev 13288)
@@ -1164,9 +1164,6 @@
         sheet->grabbed = FALSE;
 
         gnc_item_edit_set_has_selection(GNC_ITEM_EDIT(sheet->item_editor), FALSE);
-
-        gnc_item_edit_claim_selection(GNC_ITEM_EDIT(sheet->item_editor), event->time);
-
         return TRUE;
 }
 
@@ -1300,10 +1297,6 @@
 		editable = GTK_EDITABLE(sheet->entry);
                 gtk_editable_set_position(editable, -1);
                 gtk_editable_select_region(editable, 0, -1);
-
-                gnc_item_edit_claim_selection (GNC_ITEM_EDIT(sheet->item_editor),
-                                           event->time);
-
                 return TRUE;
         }
 



More information about the gnucash-changes mailing list