gnucash maint: Fix Travis failure.
John Ralls
jralls at code.gnucash.org
Tue May 7 00:18:02 EDT 2019
Updated via https://github.com/Gnucash/gnucash/commit/eec00c8a (commit)
from https://github.com/Gnucash/gnucash/commit/f1fe106d (commit)
commit eec00c8a3fbadaaf1874a6cd02e6f6cd3286ec6d
Author: John Ralls <jralls at ceridwen.us>
Date: Mon May 6 21:17:54 2019 -0700
Fix Travis failure.
diff --git a/gnucash/gnome-utils/gnc-cell-renderer-popup.c b/gnucash/gnome-utils/gnc-cell-renderer-popup.c
index 7ba11429c..6d3d9f093 100644
--- a/gnucash/gnome-utils/gnc-cell-renderer-popup.c
+++ b/gnucash/gnome-utils/gnc-cell-renderer-popup.c
@@ -271,10 +271,13 @@ gcrp_show_popup (GncCellRendererPopup *cell,
gint y2)
{
#if GTK_CHECK_VERSION(3,22,0)
- GdkWindow *win;
GdkMonitor *mon;
- GdkRectangle monitor_size;
+#else
+ GdkScreen *screen;
+ int monitor_num;
#endif
+ GdkWindow *win;
+ GdkRectangle monitor_size;
GtkAllocation alloc;
gint x, y;
gint screen_height, screen_width;
@@ -297,18 +300,19 @@ gcrp_show_popup (GncCellRendererPopup *cell,
button_height = y2 - y1;
+ win = gtk_widget_get_window (cell->popup_window);
#if GTK_CHECK_VERSION(3,22,0)
- win = gdk_screen_get_root_window (gtk_window_get_screen (GTK_WINDOW (cell->popup_window)));
- mon = gdk_display_get_monitor_at_window (gtk_widget_get_display (GTK_WIDGET(cell->popup_window)), win);
+ mon = gdk_display_get_monitor_at_window (gtk_widget_get_display (cell->popup_window), win);
gdk_monitor_get_geometry (mon, &monitor_size);
- screen_width = monitor_size.width;
- screen_height = monitor_size.height - y;
#else
- screen_width = gdk_screen_width();
- screen_height = gdk_screen_height() - y;
+ screen = gtk_window_get_screen (cell->popup_window);
+ monitor_num = gdk_screen_get_monitor_at_window (screen, win);
+ gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor_size);
#endif
-
+ screen_width = monitor_size.width;
+ screen_height = monitor_size.height - y;
+
/* Check if it fits in the available height. */
if (alloc.height > screen_height) {
/* It doesn't fit, so we see if we have the minimum space needed. */
diff --git a/gnucash/gnome/dialog-invoice.c b/gnucash/gnome/dialog-invoice.c
index cd3f6ceed..11db30780 100644
--- a/gnucash/gnome/dialog-invoice.c
+++ b/gnucash/gnome/dialog-invoice.c
@@ -1932,7 +1932,7 @@ gnc_invoice_update_window (InvoiceWindow *iw, GtkWidget *widget)
/* Setup viewer for read-only access */
gtk_widget_set_sensitive (acct_entry, FALSE);
gtk_widget_set_sensitive (iw->id_entry, FALSE);
- gtk_widget_set_selectable (iw->id_entry, TRUE);
+ gtk_widget_set_sensitive (iw->id_entry, TRUE);
gtk_widget_set_sensitive (iw->terms_menu, FALSE);
gtk_widget_set_sensitive (iw->owner_box, FALSE);
gtk_widget_set_sensitive (iw->job_box, FALSE);
Summary of changes:
gnucash/gnome-utils/gnc-cell-renderer-popup.c | 22 +++++++++++++---------
gnucash/gnome/dialog-invoice.c | 2 +-
2 files changed, 14 insertions(+), 10 deletions(-)
More information about the gnucash-changes
mailing list