From fb2849550b6916b6d0399a163a756ec3b911d704 Mon Sep 17 00:00:00 2001 From: lukefromdc Date: Thu, 14 Jul 2016 16:55:06 -0400 Subject: GTK 3.21: stop properties window going full height Stop the properties window from ballooning to full screen height when built and run with GTK 3.21/22. In GTK 3.21 the "emblems" tab's scrolled window will expand to the entire height of the screen attempting to accomodate all icons unless this is explicitly limited using the new command gtk_scrolled_window_set_max_content_height(). Unfortunately that command is GTK 3.21 and later only, so this forces GTK 3.21 builds to be run only with Gtk 3.21 and later. Thus this is put behind a GTK 3.21 selector and packages built from it must depend on GTK 3.21 and later. Fortunately no distro is going to ship any file manager built with newer GTK 3 than they ship. A GTK 3.21 build of this will actually open in 3.20 but hit the undefined symbol and crash if you select "properties" on any item, exactly as I would expect it to so. --- src/file-manager/fm-properties-window.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/file-manager') diff --git a/src/file-manager/fm-properties-window.c b/src/file-manager/fm-properties-window.c index fb1b9170..db5e173c 100644 --- a/src/file-manager/fm-properties-window.c +++ b/src/file-manager/fm-properties-window.c @@ -4009,7 +4009,10 @@ create_emblems_page (FMPropertiesWindow *window) scroller = eel_scrolled_wrap_table_new (TRUE, GTK_SHADOW_NONE, &emblems_table); gtk_container_set_border_width (GTK_CONTAINER (emblems_table), 12); - +/*stop GTK 3.22 builds from ballooning the properties dialog to full screen height */ +#if GTK_CHECK_VERSION(3,21,0) + gtk_scrolled_window_set_max_content_height(scroller, 300); +#endif gtk_widget_show (scroller); gtk_notebook_append_page (window->details->notebook, -- cgit v1.2.1