From 8fc032f2f64f4b7eb022adb0b1255a5a68df109f Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 22 Oct 2017 19:09:22 -0400 Subject: Merge branch 'gobjectification' --- (limited to 'src/application.c') diff --git a/src/application.c b/src/application.c index f5edc7f..0047b0c 100644 --- a/src/application.c +++ b/src/application.c @@ -19,17 +19,25 @@ * along with Marquee. If not, see . */ +#include "application.h" + #include #include #include -#include "application.h" +#include "about.h" #include "config.h" #include "web-settings.h" -#include "about.h" #include "window.h" +struct MqApplication { + GList *windows; + MqConfig *config; + WebKitSettings *settings; + gboolean marquee_mode; +}; + static void set_webkit_settings(MqApplication *application) { @@ -122,9 +130,15 @@ mq_application_quit(MqApplication *application, GtkWindow *parent) } /* Message */ - message = g_strdup_printf("You are about to close %d tabs " - "in %d windows. Are you sure you want to continue?", - num_tabs, num_windows); + if (num_windows == 1) { + message = g_strdup_printf("You are about to close %d tabs " + "in %d window. Are you sure you want to continue?", + num_tabs, num_windows); + } else { + message = g_strdup_printf("You are about to close %d tabs " + "in %d windows. Are you sure you want to continue?", + num_tabs, num_windows); + } message_label = gtk_label_new(message); g_free(message); @@ -163,6 +177,8 @@ mq_application_quit(MqApplication *application, GtkWindow *parent) hbox); g_signal_connect(dialog, "response", G_CALLBACK(quit_confirm_response_cb), NULL); + gtk_widget_grab_focus(gtk_dialog_get_widget_for_response( + GTK_DIALOG(dialog), GTK_RESPONSE_OK)); gtk_widget_show_all(dialog); return; -- cgit v0.9.1