summaryrefslogtreecommitdiff
path: root/src/caja-pathbar.c
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-05-30 22:52:08 +0200
committerraveit65 <[email protected]>2016-05-30 22:52:08 +0200
commitabec93de17fb483764ab27c5c781204cef561261 (patch)
tree618b2382b6d4d892fe0248fb54de79369d75b818 /src/caja-pathbar.c
parent469c6d88a8a37bf09b9b75d610f53cdf90629168 (diff)
downloadcaja-abec93de17fb483764ab27c5c781204cef561261.tar.bz2
caja-abec93de17fb483764ab27c5c781204cef561261.tar.xz
GTK+3 sidebars and caja-places: port style_set to style_updated
Diffstat (limited to 'src/caja-pathbar.c')
-rw-r--r--src/caja-pathbar.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/caja-pathbar.c b/src/caja-pathbar.c
index ded4595d..82d4e31d 100644
--- a/src/caja-pathbar.c
+++ b/src/caja-pathbar.c
@@ -140,8 +140,10 @@ static void caja_path_bar_grab_notify (GtkWidget *widget,
gboolean was_grabbed);
static void caja_path_bar_state_changed (GtkWidget *widget,
GtkStateType previous_state);
-#if !GTK_CHECK_VERSION (3, 0, 0)
-static void caja_path_bar_style_set (GtkWidget *widget,
+#if GTK_CHECK_VERSION (3, 0, 0)
+static void caja_path_bar_style_updated (GtkWidget *widget);
+#else
+static void caja_path_bar_style_set (GtkWidget *widget),
GtkStyle *previous_style);
#endif
static void caja_path_bar_screen_changed (GtkWidget *widget,
@@ -403,7 +405,9 @@ caja_path_bar_class_init (CajaPathBarClass *path_bar_class)
#endif
widget_class->unmap = caja_path_bar_unmap;
widget_class->size_allocate = caja_path_bar_size_allocate;
-#if !GTK_CHECK_VERSION (3, 0, 0)
+#if GTK_CHECK_VERSION (3, 0, 0)
+ widget_class->style_updated = caja_path_bar_style_updated;
+#else
widget_class->style_set = caja_path_bar_style_set;
#endif
widget_class->screen_changed = caja_path_bar_screen_changed;
@@ -960,18 +964,24 @@ caja_path_bar_size_allocate (GtkWidget *widget,
}
}
-#if !GTK_CHECK_VERSION (3, 0, 0)
static void
+#if GTK_CHECK_VERSION (3, 0, 0)
+caja_path_bar_style_updated (GtkWidget *widget)
+{
+ if (GTK_WIDGET_CLASS (caja_path_bar_parent_class)->style_updated)
+ {
+ GTK_WIDGET_CLASS (caja_path_bar_parent_class)->style_updated (widget);
+#else
caja_path_bar_style_set (GtkWidget *widget, GtkStyle *previous_style)
{
if (GTK_WIDGET_CLASS (caja_path_bar_parent_class)->style_set)
{
GTK_WIDGET_CLASS (caja_path_bar_parent_class)->style_set (widget, previous_style);
+#endif
}
caja_path_bar_check_icon_theme (CAJA_PATH_BAR (widget));
}
-#endif
static void
caja_path_bar_screen_changed (GtkWidget *widget,
@@ -986,9 +996,7 @@ caja_path_bar_screen_changed (GtkWidget *widget,
{
remove_settings_signal (CAJA_PATH_BAR (widget), previous_screen);
}
-#if !GTK_CHECK_VERSION (3, 0, 0)
caja_path_bar_check_icon_theme (CAJA_PATH_BAR (widget));
-#endif
}
static gboolean
@@ -1389,7 +1397,7 @@ settings_notify_cb (GObject *object,
change_icon_theme (path_bar);
}
}
-#if !GTK_CHECK_VERSION (3, 0, 0)
+
static void
caja_path_bar_check_icon_theme (CajaPathBar *path_bar)
{
@@ -1405,7 +1413,7 @@ caja_path_bar_check_icon_theme (CajaPathBar *path_bar)
change_icon_theme (path_bar);
}
-#endif
+
/* Public functions and their helpers */
void
caja_path_bar_clear_buttons (CajaPathBar *path_bar)