[gtk+/gtk-2-24] filechooserentry: Fold function into other
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24] filechooserentry: Fold function into other
- Date: Thu, 10 Mar 2016 21:27:57 +0000 (UTC)
commit 9c5b7b78924dfa484c0d9f41a6da1db831c4ff18
Author: Benjamin Otte <otte redhat com>
Date: Fri Oct 28 13:19:15 2011 -0700
filechooserentry: Fold function into other
There's no need to discard the current folder's file without also
discarding the folder object.
gtk/gtkfilechooserentry.c | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)
---
diff --git a/gtk/gtkfilechooserentry.c b/gtk/gtkfilechooserentry.c
index 170305e..9b47dcf 100644
--- a/gtk/gtkfilechooserentry.c
+++ b/gtk/gtkfilechooserentry.c
@@ -260,7 +260,7 @@ gtk_file_chooser_entry_finalize (GObject *object)
}
static void
-discard_current_folder (GtkFileChooserEntry *chooser_entry)
+discard_loading_and_current_folder_file (GtkFileChooserEntry *chooser_entry)
{
if (chooser_entry->current_folder)
{
@@ -269,11 +269,6 @@ discard_current_folder (GtkFileChooserEntry *chooser_entry)
g_object_unref (chooser_entry->current_folder);
chooser_entry->current_folder = NULL;
}
-}
-
-static void
-discard_loading_and_current_folder_file (GtkFileChooserEntry *chooser_entry)
-{
if (chooser_entry->load_folder_cancellable)
{
g_cancellable_cancel (chooser_entry->load_folder_cancellable);
@@ -304,7 +299,6 @@ gtk_file_chooser_entry_dispose (GObject *object)
GtkFileChooserEntry *chooser_entry = GTK_FILE_CHOOSER_ENTRY (object);
remove_completion_feedback (chooser_entry);
- discard_current_folder (chooser_entry);
discard_loading_and_current_folder_file (chooser_entry);
if (chooser_entry->start_autocompletion_idle_id != 0)
@@ -1433,8 +1427,6 @@ load_directory_get_folder_callback (GCancellable *cancellable,
beep (chooser_entry);
pop_up_completion_feedback (chooser_entry, error->message);
}
-
- discard_current_folder (chooser_entry);
}
if (cancelled || error)
@@ -1499,7 +1491,6 @@ reload_current_folder (GtkFileChooserEntry *chooser_entry,
if (chooser_entry->current_folder_file)
{
- discard_current_folder (chooser_entry);
discard_loading_and_current_folder_file (chooser_entry);
}
@@ -1595,7 +1586,6 @@ refresh_current_folder_and_file_part (GtkFileChooserEntry *chooser_entry,
}
else
{
- discard_current_folder (chooser_entry);
discard_loading_and_current_folder_file (chooser_entry);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]