gnucash unstable: Multiple changes pushed

Geert Janssens gjanssens at code.gnucash.org
Wed Feb 28 12:26:51 EST 2018


Updated	 via  https://github.com/Gnucash/gnucash/commit/7da9a3ba (commit)
	 via  https://github.com/Gnucash/gnucash/commit/8353b569 (commit)
	from  https://github.com/Gnucash/gnucash/commit/ad166460 (commit)



commit 7da9a3ba58be00ace20efe32d4fca0482500705f
Merge: ad16646 8353b56
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Wed Feb 28 18:16:10 2018 +0100

    Merge branch 'reg-item' of https://github.com/Bob-IT/gnucash into unstable


commit 8353b5693ef27a658d5c0de083a5c27e5228f0ef
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Wed Feb 28 16:33:54 2018 +0000

    With register obscured the sheet kept being redrawn
    
    When the register is obscured by another window, the sheet would get
    lot of draw events. This was tracked down to getting the foreground
    colour for the item-edit widget for the state GTK_STATE_FLAG_NORMAL.
    Changed this to use the value obtained from gtk_widget_get_state_flags.

diff --git a/gnucash/register/register-gnome/gnucash-item-edit.c b/gnucash/register/register-gnome/gnucash-item-edit.c
index 04e6da9..7a2a3b4 100644
--- a/gnucash/register/register-gnome/gnucash-item-edit.c
+++ b/gnucash/register/register-gnome/gnucash-item-edit.c
@@ -502,6 +502,7 @@ draw_text_cursor_cb (GtkWidget *widget, cairo_t *cr, gpointer user_data)
     GncItemEdit *item_edit = GNC_ITEM_EDIT(user_data);
     GtkEditable *editable = GTK_EDITABLE(widget);
     GtkStyleContext *stylectxt = gtk_widget_get_style_context (GTK_WIDGET(widget));
+    GtkStateFlags flags = gtk_widget_get_state_flags (GTK_WIDGET(widget));
     gint height = gtk_widget_get_allocated_height (widget);
     const gchar *text;
     GdkRGBA *fg_color;
@@ -514,7 +515,7 @@ draw_text_cursor_cb (GtkWidget *widget, cairo_t *cr, gpointer user_data)
 
     // Get the foreground color
     gdk_rgba_parse (&color, "black");
-    gtk_style_context_get_color (stylectxt, GTK_STATE_FLAG_NORMAL, &color);
+    gtk_style_context_get_color (stylectxt, flags, &color);
     fg_color = &color;
 
     text = gtk_entry_get_text (GTK_ENTRY (widget));



Summary of changes:
 gnucash/register/register-gnome/gnucash-item-edit.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)



More information about the gnucash-changes mailing list