Updating branch refs/heads/master to b9930ddc577a4876051e49e432c6455f2f27ea80 (commit) from 2fe50cc3131476118c58fd7affb1431ddf5e3524 (commit)
commit b9930ddc577a4876051e49e432c6455f2f27ea80 Author: Christian Dywan <christ...@twotoasts.de> Date: Sat Apr 20 02:22:24 2013 +0200 Handle diagnostic dialog argument in running instance Explicitly check all individual argument arrays. Treat diagnostic dialog like a frozen instance instead of ignoring it completely. Mention bug URL in diagnostic dialog. midori/midori-frontend.c | 27 +++++++++++++++------------ 1 files changed, 15 insertions(+), 12 deletions(-) diff --git a/midori/midori-frontend.c b/midori/midori-frontend.c index b135ad7..02f58d5 100644 --- a/midori/midori-frontend.c +++ b/midori/midori-frontend.c @@ -334,9 +334,8 @@ midori_frontend_diagnostic_dialog (MidoriApp* app, dialog = gtk_message_dialog_new ( NULL, 0, GTK_MESSAGE_WARNING, GTK_BUTTONS_NONE, - _("Midori seems to have crashed the last time it was opened. " - "If this happened repeatedly, try one of the following options " - "to solve the problem.")); + _("Midori crashed the last time it was opened. You can report the problem at %s."), + PACKAGE_BUGREPORT); gtk_window_set_skip_taskbar_hint (GTK_WINDOW (dialog), FALSE); gtk_window_set_title (GTK_WINDOW (dialog), g_get_application_name ()); content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog)); @@ -442,15 +441,19 @@ midori_normal_app_new (const gchar* config, MidoriApp* app = midori_app_new (nickname); if (midori_app_instance_is_running (app)) { - gboolean result = FALSE; - GtkWidget* dialog; - - if (execute_commands != NULL && midori_app_send_command (app, execute_commands)) - return NULL; - if (open_uris != NULL && midori_app_instance_send_uris (app, open_uris)) - return NULL; - if (!execute_commands && !open_uris && midori_app_instance_send_new_browser (app)) - return NULL; + /* It makes no sense to show a crash dialog while running */ + if (!diagnostic_dialog) + { + gboolean success = FALSE; + if (execute_commands != NULL && midori_app_send_command (app, execute_commands)) + success = TRUE; + if (open_uris != NULL && midori_app_instance_send_uris (app, open_uris)) + success = TRUE; + if (!execute_commands && !open_uris && midori_app_instance_send_new_browser (app)) + success = TRUE; + if (success) + return NULL; + } /* FIXME: We mustn't lose the URL here; either instance is freezing or inside a crash dialog */ sokoke_message_dialog (GTK_MESSAGE_INFO, _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits