diff --git a/gedit/gedit-app.c b/gedit/gedit-app.c
index 80f66e6..605f98e 100644
--- a/gedit/gedit-app.c
+++ b/gedit/gedit-app.c
@@ -375,11 +375,7 @@ quit_activated (GSimpleAction *action,
                 GVariant      *parameter,
                 gpointer       user_data)
 {
-	GApplication *app;
-
-	app = G_APPLICATION (user_data);
-
-	g_application_quit (app);
+	_gedit_cmd_file_quit (NULL, NULL);
 }
 
 static GActionEntry app_entries[] = {
diff --git a/gedit/gedit-commands-file.c b/gedit/gedit-commands-file.c
index ad75b41..7c601b2 100644
--- a/gedit/gedit-commands-file.c
+++ b/gedit/gedit-commands-file.c
@@ -1919,9 +1919,8 @@ _gedit_cmd_file_close_all (GtkAction   *action,
 }
 
 /* Quit */
-#ifdef OS_OSX
 static void
-quit_all ()
+quit_all (void)
 {
 	GList *windows;
 	GList *item;
@@ -1948,21 +1947,22 @@ quit_all ()
 
 	g_list_free (windows);
 }
-#endif
 
 void
 _gedit_cmd_file_quit (GtkAction   *action,
-		     GeditWindow *window)
+                      GeditWindow *window)
 {
 	gedit_debug (DEBUG_COMMANDS);
 
 #ifdef OS_OSX
 	if (action != NULL)
+#else
+	if (window == NULL)
+#endif
 	{
 		quit_all ();
 		return;
 	}
-#endif
 
 	g_return_if_fail (!(gedit_window_get_state (window) &
 	                    (GEDIT_WINDOW_STATE_SAVING |
diff --git a/libgd b/libgd
--- a/libgd
+++ b/libgd
@@ -1 +1 @@
-Subproject commit 33561eea68af66209af8426c9ff55cc3143f0ab5
+Subproject commit 33561eea68af66209af8426c9ff55cc3143f0ab5-dirty
