chiark / gitweb /
DisOrder 4.1
[disorder] / disobedience / login.c
index edefe29cd36b329b311333b4effdfaeaf7635656..b1047d689fd2ea15b5b50a91f8b277349bb6610b 100644 (file)
  * window remains.
  *
  * It you hit Cancel then the window disappears without saving anything.
+ *
+ * TODO
+ * - escape and return should work
+ * - cancel/close should be consistent with properties
  */
 
 #include "disobedience.h"
@@ -153,7 +157,7 @@ static void login_ok(GtkButton attribute((unused)) *button,
   if(!disorder_connect(c)) {
     /* Success; save the config and start using it */
     login_save_config();
-    reset();
+    logged_in();
     /* Pop down login window */
     gtk_widget_destroy(login_window);
   } else {
@@ -170,16 +174,18 @@ static void login_cancel(GtkButton attribute((unused)) *button,
 }
 
 /* Buttons that appear at the bottom of the window */
-static const struct button buttons[] = {
+static struct button buttons[] = {
   {
     "Login",
     login_ok,
     "(Re-)connect using these settings",
+    0
   },
   {
     GTK_STOCK_CLOSE,
     login_cancel,
-    "Discard changes and close window"
+    "Discard changes and close window",
+    0
   },
 };
 
@@ -232,7 +238,7 @@ void login_box(void) {
                      TRUE/*expand*/, TRUE/*fill*/, 1/*padding*/);
   gtk_box_pack_start(GTK_BOX(vbox), buttonbox,
                      FALSE/*expand*/, FALSE/*fill*/, 1/*padding*/);
-  gtk_container_add(GTK_CONTAINER(login_window), vbox);
+  gtk_container_add(GTK_CONTAINER(login_window), frame_widget(vbox, NULL));
   gtk_window_set_transient_for(GTK_WINDOW(login_window),
                                GTK_WINDOW(toplevel));
   gtk_widget_show_all(login_window);