mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Correctly indicate the focus state of the register. Fixes #342055.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14378 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
1e57748bee
commit
6d38ef1457
@ -1,5 +1,8 @@
|
||||
2006-06-16 David Hampton <hampton@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*
|
||||
|
@ -84,6 +84,7 @@ struct _TextDrawInfo
|
||||
};
|
||||
|
||||
|
||||
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 @@ gnc_item_edit_draw_info (GncItemEdit *item_edit, int x, int y, TextDrawInfo *inf
|
||||
/* 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 @@ gnc_item_edit_draw_info (GncItemEdit *item_edit, int x, int y, TextDrawInfo *inf
|
||||
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 @@ gnc_item_edit_focus_in (GncItemEdit *item_edit)
|
||||
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 @@ gnc_item_edit_focus_out (GncItemEdit *item_edit)
|
||||
ev.window = GTK_WIDGET (item_edit->sheet)->window;
|
||||
ev.in = FALSE;
|
||||
gtk_widget_event (item_edit->editor, (GdkEvent*) &ev);
|
||||
queue_sync(item_edit);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user