chiark / gitweb /
title and better prompts for overwrite window
[disorder] / disobedience / login.c
index 8a00a597265bdb50260a06fac6bc344d61e42164..c6e91ec5b85fa391ecaf8ca5f9ed9fb8096fdd68 100644 (file)
@@ -125,10 +125,12 @@ static void login_save(GtkButton attribute((unused)) *button,
        GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
        GTK_MESSAGE_QUESTION,
        GTK_BUTTONS_NONE,
-       "File %s already exists", path);
+       "File %s already exists.", path);
+    gtk_window_set_title(GTK_WINDOW(yorn),
+                         "Configuration file already exists");
     gtk_dialog_add_buttons(GTK_DIALOG(yorn),
-                           "Overwrite", GTK_RESPONSE_ACCEPT,
-                           "Cancel", GTK_RESPONSE_REJECT,
+                           "Overwrite it", GTK_RESPONSE_ACCEPT,
+                           "Don't save after all", GTK_RESPONSE_REJECT,
                            (char *)0);
     if(gtk_dialog_run(GTK_DIALOG(yorn)) != GTK_RESPONSE_ACCEPT)
       goto done;
@@ -172,9 +174,6 @@ static void login_save(GtkButton attribute((unused)) *button,
 done:
   if(yorn)
     gtk_widget_destroy(yorn);
-  /* OS X WM likes to hide it */
-  if(login_window)
-    gtk_window_present(GTK_WINDOW(login_window));
 }
 
 static void login_cancel(GtkButton attribute((unused)) *button,
@@ -247,6 +246,8 @@ void login_box(void) {
   gtk_box_pack_start(GTK_BOX(vbox), buttonbox,
                      FALSE/*expand*/, FALSE/*fill*/, 1/*padding*/);
   gtk_container_add(GTK_CONTAINER(login_window), vbox);
+  gtk_window_set_transient_for(GTK_WINDOW(login_window),
+                               GTK_WINDOW(toplevel));
   gtk_widget_show_all(login_window);
 }