chiark / gitweb /
merge extra MIME parsing
[disorder] / disobedience / disobedience.c
index 0b3408b897d75a638b6fc7954a2e620fe7c72b74..de71101bb34ca3d6787ce9c9a9a0492e9c313b61 100644 (file)
@@ -350,20 +350,24 @@ static gboolean maybe_send_nop(gpointer attribute((unused)) data) {
 static void got_rtp_address(void attribute((unused)) *v,
                             int attribute((unused)) nvec,
                             char attribute((unused)) **vec) {
+  ++suppress_actions;
   rtp_address_in_flight = 0;
   rtp_supported = 1;
   rtp_is_running = rtp_running();
   control_monitor(0);
+  --suppress_actions;
 }
 
 /** @brief Called when a rtp-address command fails */
 static void no_rtp_address(struct callbackdata attribute((unused)) *cbd,
                            int attribute((unused)) code,
                            const char attribute((unused)) *msg) {
+  ++suppress_actions;
   rtp_address_in_flight = 0;
   rtp_supported = 0;
   rtp_is_running = 0;
   control_monitor(0);
+  --suppress_actions;
 }
 
 /** @brief Called to check whether RTP play is available */
@@ -405,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);
 }
@@ -478,7 +482,7 @@ int main(int argc, char **argv) {
   gtk_widget_show_all(toplevel);
   /* issue a NOP every so often */
   g_timeout_add_full(G_PRIORITY_LOW,
-                     1000/*interval, ms*/,
+                     2000/*interval, ms*/,
                      maybe_send_nop,
                      0/*data*/,
                      0/*notify*/);
@@ -487,6 +491,10 @@ int main(int argc, char **argv) {
   disorder_eclient_log(logclient, &log_callbacks, 0);
   /* 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);