[Gnucash-changes] r14378 - gnucash/trunk - Correctly indicate the focus state of the register. Fixes #342055.
David Hampton
hampton at cvs.gnucash.org
Fri Jun 16 23:37:55 EDT 2006
Author: hampton
Date: 2006-06-16 23:37:55 -0400 (Fri, 16 Jun 2006)
New Revision: 14378
Trac: http://svn.gnucash.org/trac/changeset/14378
Modified:
gnucash/trunk/ChangeLog
gnucash/trunk/src/register/register-gnome/gnucash-item-edit.c
Log:
Correctly indicate the focus state of the register. Fixes #342055.
Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog 2006-06-17 01:00:18 UTC (rev 14377)
+++ gnucash/trunk/ChangeLog 2006-06-17 03:37:55 UTC (rev 14378)
@@ -1,5 +1,8 @@
2006-06-16 David Hampton <hampton at employees.org>
+ * src/register/register-gnome/gnucash-item-edit.c: Correctly
+ indicate the focus state of the register. Fixes #342055.
+
* src/gnome-utils/gnc-main-window.[ch]:
* src/gnome/gnc-plugin-page-account-tree.c: Instead of marking the
first page so that it can't be closed, mark the first *accounts*
Modified: gnucash/trunk/src/register/register-gnome/gnucash-item-edit.c
===================================================================
--- gnucash/trunk/src/register/register-gnome/gnucash-item-edit.c 2006-06-17 01:00:18 UTC (rev 14377)
+++ gnucash/trunk/src/register/register-gnome/gnucash-item-edit.c 2006-06-17 03:37:55 UTC (rev 14378)
@@ -84,6 +84,7 @@
};
+static void queue_sync (GncItemEdit *item_edit);
static void gnc_item_edit_show_popup_toggle (GncItemEdit *item_edit,
gint x, gint y,
gint width, gint height,
@@ -218,7 +219,7 @@
/* Selection */
if (start_pos != end_pos)
{
- gint start_byte_pos, end_byte_pos;
+ gint start_byte_pos, end_byte_pos, color;
start_byte_pos = g_utf8_offset_to_pointer (text, start_pos) - text;
end_byte_pos = g_utf8_offset_to_pointer (text, end_pos) - text;
@@ -230,7 +231,8 @@
attr->end_index = end_byte_pos;
pango_attr_list_insert (attr_list, attr);
- attr = pango_attr_background_new (0x0, 0x0, 0x0);
+ color = GTK_WIDGET_HAS_FOCUS(item_edit->sheet) ? 0x0 : 0x7fff;
+ attr = pango_attr_background_new (color, color, color);
attr->start_index = start_byte_pos;
attr->end_index = end_byte_pos;
pango_attr_list_insert (attr_list, attr);
@@ -447,6 +449,7 @@
ev.window = GTK_WIDGET (item_edit->sheet)->window;
ev.in = TRUE;
gtk_widget_event (item_edit->editor, (GdkEvent*) &ev);
+ queue_sync(item_edit);
}
void
@@ -461,6 +464,7 @@
ev.window = GTK_WIDGET (item_edit->sheet)->window;
ev.in = FALSE;
gtk_widget_event (item_edit->editor, (GdkEvent*) &ev);
+ queue_sync(item_edit);
}
void
More information about the gnucash-changes
mailing list