[easytag/wip/application-window: 73/74] Avoid warnings when updating the scan dialog



commit b27ab6a8e20c8f1577d0da2cbe4eb7cf4b4798f9
Author: David King <amigadave amigadave com>
Date:   Fri Aug 1 21:30:14 2014 +0100

    Avoid warnings when updating the scan dialog

 src/application_window.c |   23 +++++++++++++++++++----
 src/application_window.h |    1 +
 src/easytag.c            |    2 +-
 3 files changed, 21 insertions(+), 5 deletions(-)
---
diff --git a/src/application_window.c b/src/application_window.c
index 5de7a9f..bd97c0f 100644
--- a/src/application_window.c
+++ b/src/application_window.c
@@ -1303,7 +1303,7 @@ on_go_first (GSimpleAction *action,
     }
 
     et_application_window_update_actions (self);
-    et_scan_dialog_update_previews (ET_SCAN_DIALOG (et_application_window_get_scan_dialog (self)));
+    et_application_window_scan_dialog_update_previews (self);
 
     if (!g_settings_get_boolean (MainSettings, "tag-preserve-focus"))
     {
@@ -1342,7 +1342,7 @@ on_go_previous (GSimpleAction *action,
     }
 
     et_application_window_update_actions (self);
-    et_scan_dialog_update_previews (ET_SCAN_DIALOG (et_application_window_get_scan_dialog (self)));
+    et_application_window_scan_dialog_update_previews (self);
 
     if (!g_settings_get_boolean (MainSettings, "tag-preserve-focus"))
     {
@@ -1381,7 +1381,7 @@ on_go_next (GSimpleAction *action,
     }
 
     et_application_window_update_actions (self);
-    et_scan_dialog_update_previews (ET_SCAN_DIALOG (et_application_window_get_scan_dialog (self)));
+    et_application_window_scan_dialog_update_previews (self);
 
     if (!g_settings_get_boolean (MainSettings, "tag-preserve-focus"))
     {
@@ -1420,7 +1420,7 @@ on_go_last (GSimpleAction *action,
     }
 
     et_application_window_update_actions (self);
-    et_scan_dialog_update_previews (ET_SCAN_DIALOG (et_application_window_get_scan_dialog (self)));
+    et_application_window_scan_dialog_update_previews (self);
 
     if (!g_settings_get_boolean (MainSettings, "tag-preserve-focus"))
     {
@@ -1761,6 +1761,21 @@ et_application_window_show_log_area (EtApplicationWindow *self)
     gtk_widget_hide (priv->log_area);
 }
 
+void
+et_application_window_scan_dialog_update_previews (EtApplicationWindow *self)
+{
+    EtApplicationWindowPrivate *priv;
+
+    g_return_if_fail (self != NULL);
+
+    priv = et_application_window_get_instance_private (self);
+
+    if (priv->scan_dialog)
+    {
+        et_scan_dialog_update_previews (ET_SCAN_DIALOG (priv->scan_dialog));
+    }
+}
+
 GtkWidget *
 et_application_window_get_log_area (EtApplicationWindow *self)
 {
diff --git a/src/application_window.h b/src/application_window.h
index b98ed87..271fd58 100644
--- a/src/application_window.h
+++ b/src/application_window.h
@@ -87,6 +87,7 @@ void et_application_window_browser_refresh_file_in_list (EtApplicationWindow *se
 void et_application_window_browser_refresh_sort (EtApplicationWindow *self);
 void et_application_window_hide_log_area (EtApplicationWindow *self);
 void et_application_window_show_log_area (EtApplicationWindow *self);
+void et_application_window_scan_dialog_update_previews (EtApplicationWindow *self);
 
 G_END_DECLS
 
diff --git a/src/easytag.c b/src/easytag.c
index 5dd4dcd..465abb6 100644
--- a/src/easytag.c
+++ b/src/easytag.c
@@ -439,7 +439,7 @@ void Action_Select_Nth_File_By_Etfile (ET_File *ETFile)
     ET_Display_File_Data_To_UI(ETFile);
 
     et_application_window_update_actions (ET_APPLICATION_WINDOW (MainWindow));
-    et_scan_dialog_update_previews (ET_SCAN_DIALOG (et_application_window_get_scan_dialog 
(ET_APPLICATION_WINDOW (MainWindow))));
+    et_application_window_scan_dialog_update_previews (ET_APPLICATION_WINDOW (MainWindow));
 }
 
 /*


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]