diff --git a/gtk/gtkopenwith.c b/gtk/gtkopenwith.c index e5123b0726..0bd4c1ace5 100644 --- a/gtk/gtkopenwith.c +++ b/gtk/gtkopenwith.c @@ -66,3 +66,9 @@ gtk_open_with_get_app_info (GtkOpenWith *self) { return GTK_OPEN_WITH_GET_IFACE (self)->get_app_info (self); } + +void +gtk_open_with_refresh (GtkOpenWith *self) +{ + GTK_OPEN_WITH_GET_IFACE (self)->refresh (self); +} diff --git a/gtk/gtkopenwith.h b/gtk/gtkopenwith.h index 09bca2f400..c77029b5e6 100644 --- a/gtk/gtkopenwith.h +++ b/gtk/gtkopenwith.h @@ -46,6 +46,7 @@ GType gtk_open_with_get_type () G_GNUC_CONST; GAppInfo * gtk_open_with_get_app_info (GtkOpenWith *self); gchar * gtk_open_with_get_content_type (GtkOpenWith *self); +void gtk_open_with_refresh (GtkOpenWith *self); G_END_DECLS diff --git a/gtk/gtkopenwithdialog.c b/gtk/gtkopenwithdialog.c index 596b06a107..12d93b341a 100644 --- a/gtk/gtkopenwithdialog.c +++ b/gtk/gtkopenwithdialog.c @@ -106,7 +106,7 @@ search_for_mimetype_ready_cb (GObject *source, } else { - _gtk_open_with_widget_refilter (GTK_OPEN_WITH_WIDGET (self->priv->open_with_widget)); + gtk_open_with_refresh (GTK_OPEN_WITH (self->priv->open_with_widget)); } g_object_unref (online); @@ -417,6 +417,14 @@ gtk_open_with_dialog_get_app_info (GtkOpenWith *object) return app; } +static void +gtk_open_with_dialog_refresh (GtkOpenWith *object) +{ + GtkOpenWithDialog *self = GTK_OPEN_WITH_DIALOG (object); + + gtk_open_with_refresh (GTK_OPEN_WITH (self->priv->open_with_widget)); +} + static void gtk_open_with_dialog_constructed (GObject *object) { @@ -496,6 +504,7 @@ static void gtk_open_with_dialog_iface_init (GtkOpenWithIface *iface) { iface->get_app_info = gtk_open_with_dialog_get_app_info; + iface->refresh = gtk_open_with_dialog_refresh; } static void diff --git a/gtk/gtkopenwithprivate.h b/gtk/gtkopenwithprivate.h index c25b487b6e..a4205ec51b 100644 --- a/gtk/gtkopenwithprivate.h +++ b/gtk/gtkopenwithprivate.h @@ -39,8 +39,7 @@ struct _GtkOpenWithIface { GTypeInterface base_iface; GAppInfo * (* get_app_info) (GtkOpenWith *object); + void (* refresh) (GtkOpenWith *object); }; -void _gtk_open_with_widget_refilter (GtkOpenWithWidget *self); - #endif /* __GTK_OPEN_WITH_PRIVATE_H__ */ diff --git a/gtk/gtkopenwithwidget.c b/gtk/gtkopenwithwidget.c index cfe6c97f6d..8edeb6d8a4 100644 --- a/gtk/gtkopenwithwidget.c +++ b/gtk/gtkopenwithwidget.c @@ -197,7 +197,7 @@ item_forget_association_cb (GtkMenuItem *item, g_app_info_remove_supports_type (info, self->priv->content_type, NULL); } - _gtk_open_with_widget_refilter (self); + gtk_open_with_refresh (GTK_OPEN_WITH (self)); } static GtkWidget * @@ -1061,16 +1061,9 @@ gtk_open_with_widget_get_app_info (GtkOpenWith *object) } static void -gtk_open_with_widget_iface_init (GtkOpenWithIface *iface) +gtk_open_with_widget_refresh (GtkOpenWith *object) { - iface->get_app_info = gtk_open_with_widget_get_app_info; -} - -void -_gtk_open_with_widget_refilter (GtkOpenWithWidget *self) -{ - - gtk_open_with_widget_ensure_show_more_button (self); + GtkOpenWithWidget *self = GTK_OPEN_WITH_WIDGET (object); if (self->priv->program_list_store != NULL) { @@ -1085,6 +1078,13 @@ _gtk_open_with_widget_refilter (GtkOpenWithWidget *self) } } +static void +gtk_open_with_widget_iface_init (GtkOpenWithIface *iface) +{ + iface->get_app_info = gtk_open_with_widget_get_app_info; + iface->refresh = gtk_open_with_widget_refresh; +} + GtkWidget * gtk_open_with_widget_new (const gchar *content_type) {