changeset 943:04dc44e87e03

Add a automatic pestering dialog if the user has not configured XMMS-SID or the current configuration in XMMS's config file is otherwise incompatible.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 19 Nov 2012 18:24:13 +0200
parents b133f822b91e
children 7e55866f1b2d
files src/xmms-sid.c
diffstat 1 files changed, 17 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xmms-sid.c	Mon Nov 19 18:23:27 2012 +0200
+++ b/src/xmms-sid.c	Mon Nov 19 18:24:13 2012 +0200
@@ -121,6 +121,18 @@
 }
 
 
+gboolean xs_configure_pester(gpointer data)
+{
+    xs_configure();
+
+    xs_messagebox(_("Attention!"),
+    _("It seems you haven't yet configured XMMS-SID plugin, "
+    "or the configuration is from another version. "
+    "Opening the configuration dialog for it now."));
+    return FALSE;
+}
+
+
 /*
  * Initialize XMMS-SID
  */
@@ -130,7 +142,11 @@
 
     /* Initialize and get configuration */
     xs_init_configuration();
-    xs_read_configuration();
+
+    if (!xs_read_configuration())
+    {
+        g_timeout_add(1500, xs_configure_pester, NULL);
+    }
 
     /* Initialize subsystems */
     xs_reinit();