summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2016-07-14 16:55:06 -0400
committerraveit65 <[email protected]>2016-07-20 20:28:33 +0200
commitfb2849550b6916b6d0399a163a756ec3b911d704 (patch)
tree0d5fd28d76b70f09ac91ac4bf571abeda3844727
parentee1dfee25ee5aefecfd987db05c830a40a290e34 (diff)
downloadcaja-fb2849550b6916b6d0399a163a756ec3b911d704.tar.bz2
caja-fb2849550b6916b6d0399a163a756ec3b911d704.tar.xz
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.
-rw-r--r--src/file-manager/fm-properties-window.c5
1 files changed, 4 insertions, 1 deletions
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,