diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-05-02 00:08:49 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-05-02 01:33:41 +0000 |
commit | 965d0e04d1be1f172afe4c6b3d38f5ec547ffcb0 (patch) | |
tree | fa453e48caaf5281272f9f414eaacaaed319a3ab /gtk/gtkpathbar.c | |
parent | d7c54920eed5e287cea00ee3b9036b3396fc6aea (diff) | |
download | gtk+-965d0e04d1be1f172afe4c6b3d38f5ec547ffcb0.tar.gz |
gtk: Use root/unroot instead of display-changed
The display-changed signal is going away
Diffstat (limited to 'gtk/gtkpathbar.c')
-rw-r--r-- | gtk/gtkpathbar.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c index a9ff9a58a4..1200e01596 100644 --- a/gtk/gtkpathbar.c +++ b/gtk/gtkpathbar.c @@ -151,8 +151,8 @@ static gboolean gtk_path_bar_slider_down_defocus (GtkWidget *widget, GdkEventButton *event, GtkPathBar *path_bar); static void gtk_path_bar_style_updated (GtkWidget *widget); -static void gtk_path_bar_display_changed (GtkWidget *widget, - GdkDisplay *previous_display); +static void gtk_path_bar_root (GtkWidget *widget); +static void gtk_path_bar_unroot (GtkWidget *widget); static void gtk_path_bar_check_icon_theme (GtkPathBar *path_bar); static void gtk_path_bar_update_button_appearance (GtkPathBar *path_bar, ButtonData *button_data, @@ -273,7 +273,8 @@ gtk_path_bar_class_init (GtkPathBarClass *path_bar_class) widget_class->measure = gtk_path_bar_measure; widget_class->size_allocate = gtk_path_bar_size_allocate; widget_class->style_updated = gtk_path_bar_style_updated; - widget_class->display_changed = gtk_path_bar_display_changed; + widget_class->root = gtk_path_bar_root; + widget_class->unroot = gtk_path_bar_unroot; container_class->add = gtk_path_bar_add; container_class->forall = gtk_path_bar_forall; @@ -729,19 +730,21 @@ gtk_path_bar_style_updated (GtkWidget *widget) } static void -gtk_path_bar_display_changed (GtkWidget *widget, - GdkDisplay *previous_display) +gtk_path_bar_root (GtkWidget *widget) { - if (GTK_WIDGET_CLASS (gtk_path_bar_parent_class)->display_changed) - GTK_WIDGET_CLASS (gtk_path_bar_parent_class)->display_changed (widget, previous_display); - - /* We might nave a new settings, so we remove the old one */ - if (previous_display) - remove_settings_signal (GTK_PATH_BAR (widget), previous_display); + GTK_WIDGET_CLASS (gtk_path_bar_parent_class)->root (widget); gtk_path_bar_check_icon_theme (GTK_PATH_BAR (widget)); } +static void +gtk_path_bar_unroot (GtkWidget *widget) +{ + remove_settings_signal (GTK_PATH_BAR (widget), gtk_widget_get_display (widget)); + + GTK_WIDGET_CLASS (gtk_path_bar_parent_class)->unroot (widget); +} + static gboolean gtk_path_bar_scroll_controller_scroll (GtkEventControllerScroll *scroll, gdouble dx, |