mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-07-30 08:08:15 -05:00
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. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13288 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
2006-02-17 David Hampton <hampton@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:
|
||||
|
||||
@@ -920,38 +920,6 @@ gnc_item_edit_configure (GncItemEdit *item_edit)
|
||||
}
|
||||
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -151,8 +151,6 @@ gboolean gnc_item_edit_set_cursor_pos (GncItemEdit *item_edit,
|
||||
|
||||
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);
|
||||
|
||||
@@ -1164,9 +1164,6 @@ gnucash_button_release_event (GtkWidget *widget, GdkEventButton *event)
|
||||
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 @@ gnucash_button_press_event (GtkWidget *widget, GdkEventButton *event)
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user