chiark / gitweb /
Start on 'settings' window. Currently disabled as it's not very
[disorder] / disobedience / disobedience.c
index d6b346d05cdf9c1672c035c1946d080ef800b599..338b5afb63bef845d74adae9994a6f7ae7d55e74 100644 (file)
@@ -409,7 +409,7 @@ static void help(void) {
 
 /* display version number and terminate */
 static void version(void) {
-  xprintf("disorder version %s\n", disorder_version_string);
+  xprintf("%s", disorder_version_string);
   xfclose(stdout);
   exit(0);
 }
@@ -439,6 +439,7 @@ void register_reset(reset_callback *callback) {
 
 int main(int argc, char **argv) {
   int n;
+  gboolean gtkok;
 
   mem_init();
   /* garbage-collect PCRE's memory */
@@ -449,7 +450,7 @@ int main(int argc, char **argv) {
   g_mem_set_vtable((GMemVTable *)&glib_memvtable);
 #endif
   if(!setlocale(LC_CTYPE, "")) fatal(errno, "error calling setlocale");
-  gtk_init(&argc, &argv);
+  gtkok = gtk_init_check(&argc, &argv);
   while((n = getopt_long(argc, argv, "hVc:dtHC", options, 0)) >= 0) {
     switch(n) {
     case 'h': help();
@@ -460,6 +461,8 @@ int main(int argc, char **argv) {
     default: fatal(0, "invalid option");
     }
   }
+  if(!gtkok)
+    fatal(0, "failed to initialize GTK+");
   signal(SIGPIPE, SIG_IGN);
   init_styles();
   load_settings();
@@ -492,6 +495,9 @@ int main(int argc, char **argv) {
   /* See if RTP play supported */
   check_rtp_address();
   suppress_actions = 0;
+  /* If no password is set yet pop up a login box */
+  if(!config->password)
+    login_box();
   D(("enter main loop"));
   MTAG("misc");
   g_main_loop_run(mainloop);