[gtk/ebassi/finish-template: 21/24] filechooserwidget: Use gtk_widget_clear_template()
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/ebassi/finish-template: 21/24] filechooserwidget: Use gtk_widget_clear_template()
- Date: Mon, 11 Jul 2022 16:36:58 +0000 (UTC)
commit e7d7ea0542e7e400b75b592666ce142cdfb5b8f0
Author: Emmanuele Bassi <ebassi gnome org>
Date: Thu Jul 7 13:58:51 2022 +0100
filechooserwidget: Use gtk_widget_clear_template()
gtk/gtkfilechooserwidget.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index 6e212f5ab2..2d39c38eda 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -515,7 +515,7 @@ static GSList *get_selected_infos (GtkFileChooserWidget *impl);
static void search_setup_widgets (GtkFileChooserWidget *impl);
static void search_stop_searching (GtkFileChooserWidget *impl,
gboolean remove_query);
-static void search_clear_model (GtkFileChooserWidget *impl,
+static void search_clear_model (GtkFileChooserWidget *impl,
gboolean remove_from_treeview);
static void search_entry_activate_cb (GtkFileChooserWidget *impl);
static void search_entry_stop_cb (GtkFileChooserWidget *impl);
@@ -720,8 +720,8 @@ error_creating_folder_dialog (GtkFileChooserWidget *impl,
GFile *file,
GError *error)
{
- error_dialog (impl,
- _("The folder could not be created"),
+ error_dialog (impl,
+ _("The folder could not be created"),
error);
}
@@ -3122,10 +3122,11 @@ gtk_file_chooser_widget_dispose (GObject *object)
GtkFileChooserWidget *impl = (GtkFileChooserWidget *) object;
cancel_all_operations (impl);
- g_clear_pointer (&impl->rename_file_popover, gtk_widget_unparent);
+
+ /* browse_files_popover is not a template child */
g_clear_pointer (&impl->browse_files_popover, gtk_widget_unparent);
- g_clear_object (&impl->extra_widget);
g_clear_pointer (&impl->bookmarks_manager, _gtk_bookmarks_manager_free);
+ g_clear_object (&impl->extra_widget);
if (impl->external_entry && impl->location_entry == impl->external_entry)
{
@@ -3133,9 +3134,10 @@ gtk_file_chooser_widget_dispose (GObject *object)
location_entry_disconnect (impl);
impl->external_entry = NULL;
}
+
remove_settings_signal (impl);
- g_clear_pointer (&impl->box, gtk_widget_unparent);
+ gtk_widget_clear_template (GTK_WIDGET (impl), GTK_TYPE_FILE_CHOOSER_WIDGET);
G_OBJECT_CLASS (gtk_file_chooser_widget_parent_class)->dispose (object);
}
@@ -6258,7 +6260,7 @@ gtk_file_chooser_widget_should_respond (GtkFileChooserWidget *impl)
case SAVE_ENTRY:
goto save_entry;
- case NOT_REACHED:
+ case NOT_REACHED:
default:
g_assert_not_reached ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]