summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-03-25 07:43:56 +0100
committerraveit65 <[email protected]>2021-04-08 08:14:15 +0200
commit13ea06954e8060e5dbec510321e886e786fb4fd6 (patch)
tree183b12aca8000ed1a32d0893118ef1d31e462c69
parent1fb98cded4f34135dfa99b0b6ce8eb7c1c8152e0 (diff)
downloadmate-control-center-13ea06954e8060e5dbec510321e886e786fb4fd6.tar.bz2
mate-control-center-13ea06954e8060e5dbec510321e886e786fb4fd6.tar.xz
appearance: Type column in GtkFileChooser requires gtk 3.24.12
-rw-r--r--capplets/appearance/appearance-main.c4
-rw-r--r--capplets/appearance/appearance-ui.c2
-rw-r--r--capplets/appearance/appearance.h2
3 files changed, 8 insertions, 0 deletions
diff --git a/capplets/appearance/appearance-main.c b/capplets/appearance/appearance-main.c
index 87983195..03dbff8a 100644
--- a/capplets/appearance/appearance-main.c
+++ b/capplets/appearance/appearance-main.c
@@ -190,6 +190,10 @@ main (int argc, char **argv)
capplet_set_icon (w, "preferences-desktop-theme");
gtk_widget_show_all (w);
+#if !GTK_CHECK_VERSION(3, 24, 12)
+ gtk_widget_hide (GTK_WIDGET (gtk_builder_get_object (data->ui, "filechooser_type_column_toggle")));
+#endif /* !GTK_CHECK_VERSION(3, 24, 12) */
+
g_signal_connect_after (w, "response",
(GCallback) main_window_response, data);
diff --git a/capplets/appearance/appearance-ui.c b/capplets/appearance/appearance-ui.c
index 8b21056d..5b0437d7 100644
--- a/capplets/appearance/appearance-ui.c
+++ b/capplets/appearance/appearance-ui.c
@@ -114,11 +114,13 @@ ui_init (AppearanceData *data)
"active",
G_SETTINGS_BIND_DEFAULT);
+#if GTK_CHECK_VERSION(3, 24, 12)
g_settings_bind (data->filechooser_settings,
FILECHOOSER_TYPE_COL_KEY,
gtk_builder_get_object (data->ui, "filechooser_type_column_toggle"),
"active",
G_SETTINGS_BIND_DEFAULT);
+#endif /* GTK_CHECK_VERSION(3, 24, 12) */
g_settings_bind (data->filechooser_settings,
FILECHOOSER_DIR_FIRST_KEY,
diff --git a/capplets/appearance/appearance.h b/capplets/appearance/appearance.h
index b92cf19c..4aa7cb1e 100644
--- a/capplets/appearance/appearance.h
+++ b/capplets/appearance/appearance.h
@@ -49,7 +49,9 @@
#define FILECHOOSER_DIR_FIRST_KEY "sort-directories-first"
#define FILECHOOSER_HIDDEN_ITEMS_KEY "show-hidden"
#define FILECHOOSER_SIZE_COL_KEY "show-size-column"
+#if GTK_CHECK_VERSION(3, 24, 12)
#define FILECHOOSER_TYPE_COL_KEY "show-type-column"
+#endif /* GTK_CHECK_VERSION(3, 24, 12) */
#define GTK_FONT_DEFAULT_VALUE "Sans 10"
#define GTK_FONT_KEY "font-name"
#define GTK_THEME_KEY "gtk-theme"