mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 797754 - Account Register scrolling stops working
In an account register, scrolling stops working when the mouse pointer re-enters the scrollbar after leaving it. This was caused by a fix for the scrollbar not being updated in earlier versions of Gtk+. Having removed this earlier fix and tried on Windows 10 and two flavours of Linux with the current version of Gtk+ the earlier problem is not evident so this commit removes that fix.
This commit is contained in:
parent
5640de09df
commit
6ee485441f
@ -543,31 +543,6 @@ gnucash_register_configure (GnucashSheet *sheet, const gchar * state_section)
|
||||
LEAVE(" ");
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gnucash_register_enter_scrollbar (GtkWidget *widget,
|
||||
GdkEvent *event, gpointer user_data)
|
||||
{
|
||||
GnucashRegister *reg = user_data;
|
||||
GnucashSheet *sheet = GNUCASH_SHEET(reg->sheet);
|
||||
GtkWidget *vscrollbar = sheet->vscrollbar;
|
||||
GtkWidget *hscrollbar = sheet->hscrollbar;
|
||||
|
||||
// There seems to be a problem with the scrollbar slider not being
|
||||
// updated as the mouse moves possibly related to the following bug
|
||||
// https://bugs.gnucash.org/show_bug.cgi?id=765410
|
||||
// If they are hidden and shown it seems to fix it.
|
||||
|
||||
gtk_widget_hide (GTK_WIDGET(vscrollbar));
|
||||
gtk_widget_show (GTK_WIDGET(vscrollbar));
|
||||
|
||||
if (gtk_widget_is_visible (hscrollbar))
|
||||
{
|
||||
gtk_widget_hide (GTK_WIDGET(hscrollbar));
|
||||
gtk_widget_show (GTK_WIDGET(hscrollbar));
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
static GtkWidget *
|
||||
gnucash_register_create_widget (Table *table)
|
||||
@ -614,9 +589,6 @@ gnucash_register_create_widget (Table *table)
|
||||
gtk_widget_show (scrollbar);
|
||||
GNUCASH_SHEET(sheet)->vscrollbar = scrollbar;
|
||||
|
||||
g_signal_connect(G_OBJECT(scrollbar), "enter-notify-event",
|
||||
G_CALLBACK(gnucash_register_enter_scrollbar), reg);
|
||||
|
||||
scrollbar = gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, GNUCASH_SHEET(sheet)->hadj);
|
||||
gtk_grid_attach (GTK_GRID(widget), GTK_WIDGET(scrollbar), 0, 2, 1, 1);
|
||||
gtk_widget_set_hexpand (GTK_WIDGET(scrollbar), TRUE);
|
||||
@ -629,9 +601,6 @@ gnucash_register_create_widget (Table *table)
|
||||
reg->hscrollbar_visible = TRUE;
|
||||
GNUCASH_SHEET(sheet)->hscrollbar = scrollbar;
|
||||
|
||||
g_signal_connect(G_OBJECT(scrollbar), "enter-notify-event",
|
||||
G_CALLBACK(gnucash_register_enter_scrollbar), reg);
|
||||
|
||||
g_signal_connect (GNUCASH_SHEET(sheet)->hadj, "changed",
|
||||
G_CALLBACK (gnucash_register_update_hadjustment), reg);
|
||||
|
||||
|
@ -1422,8 +1422,9 @@ gnucash_scroll_event (GtkWidget *widget, GdkEventScroll *event)
|
||||
|
||||
if (event->delta_y == 0)
|
||||
{
|
||||
// There are problems with the slider not tracking the value so
|
||||
// when delta_y is 0 hide and showing the scrollbar seems to fix it
|
||||
/* There are problems with the slider not tracking the value so
|
||||
when delta_y is 0 hide and showing the scrollbar seems to fix it
|
||||
observed when using mouse wheel on sheet after a page-up or down */
|
||||
gtk_widget_hide (GTK_WIDGET(sheet->vscrollbar));
|
||||
gtk_widget_show (GTK_WIDGET(sheet->vscrollbar));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user