[gtk] filechooserwidget: Shorten cancel_all_operations() impl
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] filechooserwidget: Shorten cancel_all_operations() impl
- Date: Tue, 30 Apr 2019 04:02:58 +0000 (UTC)
commit 17bb1248b5f4957c8a49bca04f889bb779af9858
Author: Timm Bäder <tbaeder redhat com>
Date: Mon Apr 29 11:29:23 2019 +0200
filechooserwidget: Shorten cancel_all_operations() impl
gtk/gtkfilechooserwidget.c | 27 ++++-----------------------
1 file changed, 4 insertions(+), 23 deletions(-)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index 91b16abbb6..aa9c3156bc 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -3422,29 +3422,10 @@ cancel_all_operations (GtkFileChooserWidget *impl)
pending_select_files_free (impl);
- if (priv->file_list_drag_data_received_cancellable)
- {
- g_cancellable_cancel (priv->file_list_drag_data_received_cancellable);
- priv->file_list_drag_data_received_cancellable = NULL;
- }
-
- if (priv->update_current_folder_cancellable)
- {
- g_cancellable_cancel (priv->update_current_folder_cancellable);
- priv->update_current_folder_cancellable = NULL;
- }
-
- if (priv->should_respond_get_info_cancellable)
- {
- g_cancellable_cancel (priv->should_respond_get_info_cancellable);
- priv->should_respond_get_info_cancellable = NULL;
- }
-
- if (priv->file_exists_get_info_cancellable)
- {
- g_cancellable_cancel (priv->file_exists_get_info_cancellable);
- priv->file_exists_get_info_cancellable = NULL;
- }
+ g_clear_pointer (&priv->file_list_drag_data_received_cancellable, g_cancellable_cancel);
+ g_clear_pointer (&priv->update_current_folder_cancellable, g_cancellable_cancel);
+ g_clear_pointer (&priv->should_respond_get_info_cancellable, g_cancellable_cancel);
+ g_clear_pointer (&priv->file_exists_get_info_cancellable, g_cancellable_cancel);
search_stop_searching (impl, TRUE);
recent_stop_loading (impl);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]