]> granicus.if.org Git - handbrake/commitdiff
LinGui: fix parent window of dialogs
authorjstebbins <jstebbins.hb@gmail.com>
Sun, 11 Jan 2015 20:45:21 +0000 (20:45 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Sun, 11 Jan 2015 20:45:21 +0000 (20:45 +0000)
libgtk has started complaining about floating dialogs

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6734 b64f7644-9d1e-0410-96f1-a4d463321fa5

gtk/src/callbacks.c
gtk/src/callbacks.h
gtk/src/ghb-3.14.ui
gtk/src/hb-backend.c
gtk/src/hb-backend.h
gtk/src/presets.c
gtk/src/preview.c
gtk/src/queuehandler.c

index 4dae08a23d3b07a04253b239ee7c96a8c5015f04..4cdf210ea734d0c14148c1379008499413a0918f 100644 (file)
@@ -1551,11 +1551,13 @@ destination_browse_clicked_cb(GtkButton *button, signal_user_data_t *ud)
     GtkEntry *entry;
     gchar *destname;
     gchar *basename;
+    GtkWindow *hb_window;
 
     g_debug("destination_browse_clicked_cb ()");
+    hb_window = GTK_WINDOW(GHB_WIDGET(ud->builder, "hb_window"));
     destname = ghb_settings_get_string(ud->settings, "destination");
-    dialog = gtk_file_chooser_dialog_new ("Choose Destination",
-                      NULL,
+    dialog = gtk_file_chooser_dialog_new("Choose Destination",
+                      hb_window,
                       GTK_FILE_CHOOSER_ACTION_SAVE,
                       GHB_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
                       GHB_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
@@ -2531,6 +2533,7 @@ ghb_countdown_dialog(
     signal_user_data_t *ud,
     gint timeout)
 {
+    GtkWindow *hb_window;
     GtkWidget *dialog;
     GtkResponseType response;
     guint timeout_id;
@@ -2542,7 +2545,8 @@ ghb_countdown_dialog(
     cd.ud = ud;
 
     // Toss up a warning dialog
-    dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL,
+    hb_window = GTK_WINDOW(GHB_WIDGET(ud->builder, "hb_window"));
+    dialog = gtk_message_dialog_new(hb_window, GTK_DIALOG_MODAL,
                             type, GTK_BUTTONS_NONE,
                             _("%s\n\n%s in %d seconds ..."),
                             message, action, timeout);
@@ -2567,13 +2571,13 @@ ghb_countdown_dialog(
 }
 
 gboolean
-ghb_message_dialog(GtkMessageType type, const gchar *message, const gchar *no, const gchar *yes)
+ghb_message_dialog(GtkWindow *parent, GtkMessageType type, const gchar *message, const gchar *no, const gchar *yes)
 {
     GtkWidget *dialog;
     GtkResponseType response;
 
     // Toss up a warning dialog
-    dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL,
+    dialog = gtk_message_dialog_new(parent, GTK_DIALOG_MODAL,
                             type, GTK_BUTTONS_NONE,
                             "%s", message);
     gtk_dialog_add_buttons( GTK_DIALOG(dialog),
@@ -2589,12 +2593,12 @@ ghb_message_dialog(GtkMessageType type, const gchar *message, const gchar *no, c
 }
 
 void
-ghb_error_dialog(GtkMessageType type, const gchar *message, const gchar *cancel)
+ghb_error_dialog(GtkWindow *parent, GtkMessageType type, const gchar *message, const gchar *cancel)
 {
     GtkWidget *dialog;
 
     // Toss up a warning dialog
-    dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL,
+    dialog = gtk_message_dialog_new(parent, GTK_DIALOG_MODAL,
                             type, GTK_BUTTONS_NONE,
                             "%s", message);
     gtk_dialog_add_buttons( GTK_DIALOG(dialog),
@@ -2606,12 +2610,14 @@ ghb_error_dialog(GtkMessageType type, const gchar *message, const gchar *cancel)
 void
 ghb_cancel_encode(signal_user_data_t *ud, const gchar *extra_msg)
 {
+    GtkWindow *hb_window;
     GtkWidget *dialog;
     GtkResponseType response;
 
     if (extra_msg == NULL) extra_msg = "";
     // Toss up a warning dialog
-    dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL,
+    hb_window = GTK_WINDOW(GHB_WIDGET(ud->builder, "hb_window"));
+    dialog = gtk_message_dialog_new(hb_window, GTK_DIALOG_MODAL,
                 GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE,
                 _("%sYour movie will be lost if you don't continue encoding."),
                 extra_msg);
@@ -2646,12 +2652,14 @@ ghb_cancel_encode(signal_user_data_t *ud, const gchar *extra_msg)
 gboolean
 ghb_cancel_encode2(signal_user_data_t *ud, const gchar *extra_msg)
 {
+    GtkWindow *hb_window;
     GtkWidget *dialog;
     GtkResponseType response;
 
     if (extra_msg == NULL) extra_msg = "";
     // Toss up a warning dialog
-    dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL,
+    hb_window = GTK_WINDOW(GHB_WIDGET(ud->builder, "hb_window"));
+    dialog = gtk_message_dialog_new(hb_window, GTK_DIALOG_MODAL,
                 GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE,
                 _("%sYour movie will be lost if you don't continue encoding."),
                 extra_msg);
@@ -4874,11 +4882,13 @@ tweak_setting_cb(
                 ghb_settings_set_string(ud->settings, tweak_name, tweak);
             else
             {
+                GtkWindow *hb_window;
                 gchar *message;
+                hb_window = GTK_WINDOW(GHB_WIDGET(ud->builder, "hb_window"));
                 message = g_strdup_printf(
                             _("Invalid Settings:\n%s"),
                             tweak);
-                ghb_message_dialog(GTK_MESSAGE_ERROR, message, _("Cancel"), NULL);
+                ghb_message_dialog(hb_window, GTK_MESSAGE_ERROR, message, _("Cancel"), NULL);
                 g_free(message);
             }
         }
index ce5ae3b9b2eb95fa213bfe2a37826dfceddbff2d..eb7c02260ba77d0700a85e8e5e5b5cb3094e3927 100644 (file)
@@ -52,10 +52,11 @@ void ghb_hbfd(signal_user_data_t *ud, gboolean hbfd);
 gboolean ghb_file_menu_add_dvd(signal_user_data_t *ud);
 void ghb_udev_init(void);
 gboolean ghb_message_dialog(
-    GtkMessageType type, const gchar *message,
+    GtkWindow *parent, GtkMessageType type, const gchar *message,
     const gchar *no, const gchar *yes);
 void ghb_error_dialog(
-    GtkMessageType type, const gchar *message, const gchar *cancel);
+    GtkWindow *parent, GtkMessageType type,
+    const gchar *message, const gchar *cancel);
 void ghb_init_dep_map(void);
 void ghb_cancel_encode(signal_user_data_t *ud, const gchar *extra_msg);
 gboolean ghb_cancel_encode2(signal_user_data_t *ud, const gchar *extra_msg);
index de5997bcdd28e6075104d92f939bcd1fc9985531..a057ced78effd4479a63baf7170985c67b4b536b 100644 (file)
@@ -338,6 +338,7 @@ conjunction with the "Forced" option.</property>
     <property name="page_increment">1</property>
   </object>
   <object class="GtkAboutDialog" id="hb_about">
+    <property name="transient_for">hb_window</property>
     <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">About HandBrake</property>
@@ -6504,6 +6505,7 @@ Resets all queue jobs to pending and ready to run again.</property>
     <property name="page_increment">10</property>
   </object>
   <object class="GtkDialog" id="titla_add_multiple_dialog">
+    <property name="transient_for">hb_window</property>
     <property name="can_focus">False</property>
     <property name="type_hint">dialog</property>
     <child internal-child="vbox">
@@ -6701,6 +6703,7 @@ Resets all queue jobs to pending and ready to run again.</property>
     </action-widgets>
   </object>
   <object class="GtkDialog" id="prefs_dialog">
+    <property name="transient_for">hb_window</property>
     <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="title" translatable="yes">Preferences</property>
@@ -7429,6 +7432,7 @@ Check this if you want the queue to clean itself up by deleting completed jobs.<
     </action-widgets>
   </object>
   <object class="GtkDialog" id="preset_new_folder_dialog">
+    <property name="transient_for">hb_window</property>
     <property name="can_focus">False</property>
     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
     <property name="border_width">5</property>
@@ -7591,6 +7595,7 @@ Check this if you want the queue to clean itself up by deleting completed jobs.<
     </action-widgets>
   </object>
   <object class="GtkDialog" id="preset_save_dialog">
+    <property name="transient_for">hb_window</property>
     <property name="can_focus">False</property>
     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
     <property name="border_width">5</property>
@@ -8390,6 +8395,7 @@ Setting this to 0 means there is no maximum height.</property>
     </action-widgets>
   </object>
   <object class="GtkDialog" id="subtitle_dialog">
+    <property name="transient_for">hb_window</property>
     <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="modal">True</property>
@@ -8780,6 +8786,7 @@ in your output.</property>
     </action-widgets>
   </object>
   <object class="GtkDialog" id="audio_dialog">
+    <property name="transient_for">hb_window</property>
     <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="modal">True</property>
@@ -9307,6 +9314,7 @@ DRC allows you to 'compress' the range by making loud sounds softer and soft sou
     </action-widgets>
   </object>
   <object class="GtkDialog" id="update_dialog">
+    <property name="transient_for">hb_window</property>
     <property name="can_focus">False</property>
     <property name="border_width">5</property>
     <property name="modal">True</property>
index f84049b1f16d6ad62241d587eadb146100e4f1ee..da7252f78b73f6e87bb5174fbdd61353bfab1548 100644 (file)
@@ -3869,7 +3869,7 @@ ghb_validate_filter_string(const gchar *str, gint max_fields)
 }
 
 gboolean
-ghb_validate_filters(GValue *settings)
+ghb_validate_filters(GValue *settings, GtkWindow *parent)
 {
     gchar *str;
     gint index;
@@ -3886,7 +3886,8 @@ ghb_validate_filters(GValue *settings)
             message = g_strdup_printf(
                         _("Invalid Deinterlace Settings:\n\n%s\n"),
                         str);
-            ghb_message_dialog(GTK_MESSAGE_ERROR, message, _("Cancel"), NULL);
+            ghb_message_dialog(parent, GTK_MESSAGE_ERROR,
+                               message, _("Cancel"), NULL);
             g_free(message);
             g_free(str);
             return FALSE;
@@ -3903,7 +3904,8 @@ ghb_validate_filters(GValue *settings)
             message = g_strdup_printf(
                         _("Invalid Detelecine Settings:\n\n%s\n"),
                         str);
-            ghb_message_dialog(GTK_MESSAGE_ERROR, message, _("Cancel"), NULL);
+            ghb_message_dialog(parent, GTK_MESSAGE_ERROR,
+                               message, _("Cancel"), NULL);
             g_free(message);
             g_free(str);
             return FALSE;
@@ -3920,7 +3922,8 @@ ghb_validate_filters(GValue *settings)
             message = g_strdup_printf(
                         _("Invalid Decomb Settings:\n\n%s\n"),
                         str);
-            ghb_message_dialog(GTK_MESSAGE_ERROR, message, _("Cancel"), NULL);
+            ghb_message_dialog(parent, GTK_MESSAGE_ERROR,
+                               message, _("Cancel"), NULL);
             g_free(message);
             g_free(str);
             return FALSE;
@@ -3933,7 +3936,7 @@ ghb_validate_filters(GValue *settings)
 }
 
 gboolean
-ghb_validate_video(GValue *settings)
+ghb_validate_video(GValue *settings, GtkWindow *parent)
 {
     gint vcodec;
     gchar *message;
@@ -3951,7 +3954,8 @@ ghb_validate_video(GValue *settings)
                     _("Theora is not supported in the MP4 container.\n\n"
                     "You should choose a different video codec or container.\n"
                     "If you continue, FFMPEG will be chosen for you."));
-        if (!ghb_message_dialog(GTK_MESSAGE_WARNING, message, _("Cancel"), _("Continue")))
+        if (!ghb_message_dialog(parent, GTK_MESSAGE_WARNING,
+                                message, _("Cancel"), _("Continue")))
         {
             g_free(message);
             return FALSE;
@@ -3965,7 +3969,7 @@ ghb_validate_video(GValue *settings)
 }
 
 gboolean
-ghb_validate_subtitles(GValue *settings)
+ghb_validate_subtitles(GValue *settings, GtkWindow *parent)
 {
     gint title_id, titleindex;
     const hb_title_t * title;
@@ -3999,7 +4003,8 @@ ghb_validate_subtitles(GValue *settings)
             _("Only one subtitle may be burned into the video.\n\n"
                 "You should change your subtitle selections.\n"
                 "If you continue, some subtitles will be lost."));
-            if (!ghb_message_dialog(GTK_MESSAGE_WARNING, message, _("Cancel"), _("Continue")))
+            if (!ghb_message_dialog(parent, GTK_MESSAGE_WARNING,
+                                    message, _("Cancel"), _("Continue")))
             {
                 g_free(message);
                 return FALSE;
@@ -4022,7 +4027,7 @@ ghb_validate_subtitles(GValue *settings)
                 _("Srt file does not exist or not a regular file.\n\n"
                     "You should choose a valid file.\n"
                     "If you continue, this subtitle will be ignored."));
-                if (!ghb_message_dialog(GTK_MESSAGE_WARNING, message,
+                if (!ghb_message_dialog(parent, GTK_MESSAGE_WARNING, message,
                     _("Cancel"), _("Continue")))
                 {
                     g_free(message);
@@ -4037,7 +4042,7 @@ ghb_validate_subtitles(GValue *settings)
 }
 
 gboolean
-ghb_validate_audio(GValue *settings)
+ghb_validate_audio(GValue *settings, GtkWindow *parent)
 {
     gint title_id, titleindex;
     const hb_title_t * title;
@@ -4086,7 +4091,8 @@ ghb_validate_audio(GValue *settings)
                         _("The source does not support Pass-Thru.\n\n"
                         "You should choose a different audio codec.\n"
                         "If you continue, one will be chosen for you."));
-            if (!ghb_message_dialog(GTK_MESSAGE_WARNING, message, _("Cancel"), _("Continue")))
+            if (!ghb_message_dialog(parent, GTK_MESSAGE_WARNING,
+                                    message, _("Cancel"), _("Continue")))
             {
                 g_free(message);
                 return FALSE;
@@ -4126,7 +4132,8 @@ ghb_validate_audio(GValue *settings)
                         _("%s is not supported in the %s container.\n\n"
                         "You should choose a different audio codec.\n"
                         "If you continue, one will be chosen for you."), a_unsup, mux_s);
-            if (!ghb_message_dialog(GTK_MESSAGE_WARNING, message, _("Cancel"), _("Continue")))
+            if (!ghb_message_dialog(parent, GTK_MESSAGE_WARNING,
+                                    message, _("Cancel"), _("Continue")))
             {
                 g_free(message);
                 return FALSE;
@@ -4150,7 +4157,8 @@ ghb_validate_audio(GValue *settings)
                         _("The source audio does not support %s mixdown.\n\n"
                         "You should choose a different mixdown.\n"
                         "If you continue, one will be chosen for you."), mix_unsup);
-            if (!ghb_message_dialog(GTK_MESSAGE_WARNING, message, _("Cancel"), _("Continue")))
+            if (!ghb_message_dialog(parent, GTK_MESSAGE_WARNING,
+                                    message, _("Cancel"), _("Continue")))
             {
                 g_free(message);
                 return FALSE;
index 4d946fc0de7b22dba09e04197de826499995468b..fd6e5a6415bd1169c0a6a79994887d02092bb60c 100644 (file)
@@ -144,10 +144,10 @@ gint ghb_subtitle_track_source(GValue *settings, gint track);
 const gchar* ghb_subtitle_track_lang(GValue *settings, gint track);
 
 gboolean ghb_validate_vquality(GValue *settings);
-gboolean ghb_validate_audio(GValue *settings);
-gboolean ghb_validate_subtitles(GValue *settings);
-gboolean ghb_validate_video(GValue *settings);
-gboolean ghb_validate_filters(GValue *settings);
+gboolean ghb_validate_audio(GValue *settings, GtkWindow *parent);
+gboolean ghb_validate_subtitles(GValue *settings, GtkWindow *parent);
+gboolean ghb_validate_video(GValue *settings, GtkWindow *parent);
+gboolean ghb_validate_filters(GValue *settings, GtkWindow *parent);
 gboolean ghb_validate_filter_string(const gchar *str, gint max_fields);
 void ghb_hb_cleanup(gboolean partial);
 gint ghb_lookup_combo_int(const gchar *name, const GValue *gval);
index cfd68a1688cc3fcffe3eeec4891bbecde510ee8a..ab07d14f3cd0a88de8f1b1da1055e50ce6c5fc30 100644 (file)
@@ -3163,12 +3163,15 @@ settings_save(signal_user_data_t *ud, const GValue *path)
     {
         if (ghb_presets_get_folder(presetsPlist, indices, len))
         {
+            GtkWindow *hb_window;
             gchar *message;
+            hb_window = GTK_WINDOW(GHB_WIDGET(ud->builder, "hb_window"));
             message = g_strdup_printf(
                       _("%s: Folder already exists.\n"
                         "You can not replace it with a preset."),
                         name);
-            ghb_message_dialog(GTK_MESSAGE_ERROR, message, _("Cancel"), NULL);
+            ghb_message_dialog(hb_window, GTK_MESSAGE_ERROR,
+                               message, _("Cancel"), NULL);
             g_free(message);
             return;
         }
@@ -3253,12 +3256,15 @@ folder_save(signal_user_data_t *ud, const GValue *path)
     {
         if (!ghb_presets_get_folder(presetsPlist, indices, len))
         {
+            GtkWindow *hb_window;
             gchar *message;
+            hb_window = GTK_WINDOW(GHB_WIDGET(ud->builder, "hb_window"));
             message = g_strdup_printf(
                       _("%s: Preset already exists.\n"
                         "You can not replace it with a folder."),
                         name);
-            ghb_message_dialog(GTK_MESSAGE_ERROR, message, _("Cancel"), NULL);
+            ghb_message_dialog(hb_window, GTK_MESSAGE_ERROR,
+                               message, _("Cancel"), NULL);
             g_free(message);
             g_free(indices);
             return;
index c582813060f3ffb969b6d29f1a7ee68a1eb3d7c2..cb78fce7e343893c78a7ea08aa3ceb0bb4f4f0b1 100644 (file)
@@ -546,6 +546,8 @@ live_preview_cb(GstBus *bus, GstMessage *msg, gpointer data)
         //printf("element\n");
         if (gst_is_missing_plugin_message(msg))
         {
+            GtkWindow *hb_window;
+            hb_window = GTK_WINDOW(GHB_WIDGET(ud->builder, "hb_window"));
             gst_element_set_state(ud->preview->play, GST_STATE_PAUSED);
             gchar *message, *desc;
             desc = gst_missing_plugin_message_get_description(msg);
@@ -553,7 +555,8 @@ live_preview_cb(GstBus *bus, GstMessage *msg, gpointer data)
                         _("Missing GStreamer plugin\n"
                         "Audio or Video may not play as expected\n\n%s"),
                         desc);
-            ghb_message_dialog(GTK_MESSAGE_WARNING, message, "Ok", NULL);
+            ghb_message_dialog(hb_window, GTK_MESSAGE_WARNING,
+                               message, "Ok", NULL);
             g_free(message);
             gst_element_set_state(ud->preview->play, GST_STATE_PLAYING);
         }
index 021c569130696e2bb60ff458f5af87ffa6934afc..a7bd80ec4000ad11ce09e16fe49e670be0ce9176 100644 (file)
@@ -780,6 +780,9 @@ validate_settings(signal_user_data_t *ud, GValue *settings, gint batch)
     gint count, ii;
     gint title_id, titleindex;
     const hb_title_t *title;
+    GtkWindow *hb_window;
+
+    hb_window = GTK_WINDOW(GHB_WIDGET(ud->builder, "hb_window"));
 
     title_id = ghb_settings_get_int(settings, "title");
     title = ghb_lookup_title(title_id, &titleindex);
@@ -800,7 +803,8 @@ validate_settings(signal_user_data_t *ud, GValue *settings, gint batch)
                         "Another queued job has specified the same destination.\n"
                         "Do you want to overwrite?"),
                         dest);
-            if (!ghb_message_dialog(GTK_MESSAGE_QUESTION, message, _("Cancel"), _("Overwrite")))
+            if (!ghb_message_dialog(hb_window, GTK_MESSAGE_QUESTION,
+                                    message, _("Cancel"), _("Overwrite")))
             {
                 g_free(message);
                 return FALSE;
@@ -816,7 +820,8 @@ validate_settings(signal_user_data_t *ud, GValue *settings, gint batch)
                     _("Destination: %s\n\n"
                     "This is not a valid directory."),
                     destdir);
-        ghb_message_dialog(GTK_MESSAGE_ERROR, message, _("Cancel"), NULL);
+        ghb_message_dialog(hb_window, GTK_MESSAGE_ERROR,
+                           message, _("Cancel"), NULL);
         g_free(message);
         g_free(destdir);
         return FALSE;
@@ -829,7 +834,8 @@ validate_settings(signal_user_data_t *ud, GValue *settings, gint batch)
                     _("Destination: %s\n\n"
                     "Can not read or write the directory."),
                     destdir);
-        ghb_message_dialog(GTK_MESSAGE_ERROR, message, _("Cancel"), NULL);
+        ghb_message_dialog(hb_window, GTK_MESSAGE_ERROR,
+                           message, _("Cancel"), NULL);
         g_free(message);
         g_free(destdir);
         return FALSE;
@@ -859,7 +865,8 @@ validate_settings(signal_user_data_t *ud, GValue *settings, gint batch)
                                 _("Destination filesystem is almost full: %uM free\n\n"
                                 "Encode may be incomplete if you proceed.\n"),
                                 (guint)(size / (1024L*1024L)));
-                    if (!ghb_message_dialog(GTK_MESSAGE_QUESTION, message, _("Cancel"), _("Proceed")))
+                    if (!ghb_message_dialog(hb_window, GTK_MESSAGE_QUESTION,
+                                            message, _("Cancel"), _("Proceed")))
                     {
                         g_free(message);
                         g_free(destdir);
@@ -881,7 +888,8 @@ validate_settings(signal_user_data_t *ud, GValue *settings, gint batch)
                     "File already exists.\n"
                     "Do you want to overwrite?"),
                     dest);
-        if (!ghb_message_dialog(GTK_MESSAGE_QUESTION, message, _("Cancel"), _("Overwrite")))
+        if (!ghb_message_dialog(hb_window, GTK_MESSAGE_QUESTION,
+                                message, _("Cancel"), _("Overwrite")))
         {
             g_free(message);
             return FALSE;
@@ -890,22 +898,22 @@ validate_settings(signal_user_data_t *ud, GValue *settings, gint batch)
         g_unlink(dest);
     }
     // Validate audio settings
-    if (!ghb_validate_audio(settings))
+    if (!ghb_validate_audio(settings, hb_window))
     {
         return FALSE;
     }
     // Validate audio settings
-    if (!ghb_validate_subtitles(settings))
+    if (!ghb_validate_subtitles(settings, hb_window))
     {
         return FALSE;
     }
     // Validate video settings
-    if (!ghb_validate_video(settings))
+    if (!ghb_validate_video(settings, hb_window))
     {
         return FALSE;
     }
     // Validate filter settings
-    if (!ghb_validate_filters(settings))
+    if (!ghb_validate_filters(settings, hb_window))
     {
         return FALSE;
     }
@@ -1968,10 +1976,13 @@ find_pid:
 
     if (unfinished)
     {
+        GtkWindow *hb_window;
+        hb_window = GTK_WINDOW(GHB_WIDGET(ud->builder, "hb_window"));
         message = g_strdup_printf(
                     _("You have %d unfinished job(s) in a saved queue.\n\n"
                     "Would you like to reload them?"), unfinished);
-        if (ghb_message_dialog(GTK_MESSAGE_QUESTION, message, _("No"), _("Yes")))
+        if (ghb_message_dialog(hb_window, GTK_MESSAGE_QUESTION,
+                               message, _("No"), _("Yes")))
         {
             GtkWidget *widget = GHB_WIDGET(ud->builder, "show_queue");
             gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(widget), TRUE);