changeset 121:b59bca84e3cd trunk

[svn] - add xmms-alarm port
author nenolod
date Thu, 26 Oct 2006 00:10:28 -0700
parents 7ce296248b5c
children 96fc1ef32c99
files ChangeLog configure.ac src/alarm/Makefile src/alarm/alarm.c src/alarm/alarm.h src/alarm/callbacks.h src/alarm/interface.c src/alarm/interface.h src/alarm/support.h
diffstat 9 files changed, 2691 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Oct 25 13:41:36 2006 -0700
+++ b/ChangeLog	Thu Oct 26 00:10:28 2006 -0700
@@ -1,3 +1,11 @@
+2006-10-25 20:41:36 +0000  Tony Vroon <chainsaw@gentoo.org>
+  revision [240]
+  669 is 2-byte, not 4-byte. Thanks to a report from Kevin Korb on #audacious.
+  trunk/src/modplug/modplugbmp.cxx |    2 +-
+  trunk/src/modplug/modplugbmp.h   |    2 +-
+  2 files changed, 2 insertions(+), 2 deletions(-)
+
+
 2006-10-25 07:28:43 +0000  William Pitcock <nenolod@nenolod.net>
   revision [238]
   - typo :<
--- a/configure.ac	Wed Oct 25 13:41:36 2006 -0700
+++ b/configure.ac	Thu Oct 26 00:10:28 2006 -0700
@@ -88,7 +88,7 @@
 INPUT_PLUGINS="tonegen console sexypsf wav cue alac"
 OUTPUT_PLUGINS="disk_writer"
 EFFECT_PLUGINS="audiocompress ladspa voice_removal"
-GENERAL_PLUGINS="song_change"
+GENERAL_PLUGINS="song_change alarm"
 VISUALIZATION_PLUGINS="blur_scope"
 CONTAINER_PLUGINS="m3u pls"
 
@@ -1131,6 +1131,7 @@
 echo
 echo "  General"
 echo "  -------"
+echo "  Alarm:                                  yes"
 echo "  Song Change:                            yes"
 echo "  LIRC:                                   $have_lirc"
 echo "  AudioScrobbler Client:                  $scrobbler"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alarm/Makefile	Thu Oct 26 00:10:28 2006 -0700
@@ -0,0 +1,18 @@
+include ../../mk/rules.mk
+include ../../mk/init.mk
+
+SUBDIRS = 
+
+OBJECTIVE_LIBS = libalarm$(SHARED_SUFFIX)
+
+LIBDIR = $(plugindir)/$(GENERAL_PLUGIN_DIR)
+
+LIBADD += $(GTK_LIBS)
+
+SOURCES = alarm.c interface.c
+
+CFLAGS += $(PICFLAGS) $(GTK_CFLAGS) $(BEEP_DEFINES) -I../../intl -I../..
+
+OBJECTS = ${SOURCES:.c=.o}
+
+include ../../mk/objective.mk
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alarm/alarm.c	Thu Oct 26 00:10:28 2006 -0700
@@ -0,0 +1,1031 @@
+/*
+ * Copyright (C) Adam Feakin <adamf@snika.uklinux.net>
+ *
+ * modified by Daniel Stodden <stodden@in.tum.de>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+/*
+ * xmms-alarm.c - a XMMS plugin which allows you to set a time for it to
+ * start playing a playlist with the volume fading up and more things
+ * the next time I get bored
+ */
+
+/* this file really should get split/cleaned up sometime ;) */
+#include "config.h"
+
+#if STDC_HEADERS
+# include <stdlib.h>
+#endif
+
+#include <time.h>
+#if TM_IN_SYS_TIME
+# include <sys/time.h>
+#endif
+
+#include <string.h>
+#include <stdio.h>
+#include <audacious/plugin.h>
+#include <audacious/beepctrl.h>
+#include <audacious/configdb.h>
+#include <gdk/gdk.h>
+#include <gtk/gtk.h>
+#include <pthread.h>
+#include <assert.h>
+#include <math.h>
+
+#include "alarm.h"
+#include "interface.h"
+#include "callbacks.h"
+
+static pthread_t start_tid;	       /* thread id of alarm loop */
+static pthread_t stop_tid;	       /* thread id of stop loop */
+static pthread_mutex_t fader_lock = PTHREAD_MUTEX_INITIALIZER;
+
+static GeneralPlugin alarm_plugin;
+
+/* string tokens to allow loops and shorten code */
+static char day_cb[7][7] = {"sun_cb", "mon_cb", "tue_cb",
+                           "wed_cb", "thu_cb", "fri_cb", "sat_cb"};
+
+static char day_flags[7][10] = {"sun_flags", "mon_flags", "tue_flags",
+                              "wed_flags", "thu_flags", "fri_flags", "sat_flags"};
+
+static char day_h[7][6] = {"sun_h", "mon_h", "tue_h",
+                          "wed_h", "thu_h", "fri_h", "sat_h"};
+
+static char day_m[7][6] = {"sun_m", "mon_m", "tue_m",
+                          "wed_m", "thu_m", "fri_m", "sat_m"};
+
+static char day_def[7][8] = {"sun_def", "mon_def", "tue_def",
+                            "wed_def", "thu_def", "fri_def", "sat_def"};
+
+static struct
+{
+   GtkSpinButton *alarm_h;
+   GtkSpinButton *alarm_m;
+
+   GtkToggleButton *stop_on;
+   GtkSpinButton *stop_h;
+   GtkSpinButton *stop_m;
+
+   GtkRange *volume;
+   GtkRange *quietvol;
+
+   GtkSpinButton *fading;
+
+   GtkEntry *cmdstr;
+   GtkToggleButton *cmd_on;
+
+   GtkEntry *playlist;
+
+   int default_hour;
+   int default_min;
+
+   // array allows looping of days
+   alarmday day[7];
+
+
+   GtkEntry *reminder;
+   GtkToggleButton *reminder_cb;
+   gchar *reminder_msg;
+   gboolean reminder_on;
+}
+alarm_conf;
+
+static gint alarm_h, alarm_m;
+
+static gboolean stop_on;
+static gint stop_h, stop_m;
+
+static gint volume, quietvol;
+
+static gint fading;
+
+static gchar *cmdstr = NULL;
+static gboolean cmd_on;
+
+static gchar *playlist = NULL;
+
+static GtkWidget *config_dialog = NULL;
+static GtkWidget *alarm_dialog = NULL;
+
+static GtkWidget *lookup_widget(GtkWidget *w, const gchar *name)
+{
+   GtkWidget *widget;
+
+   widget = (GtkWidget*) gtk_object_get_data(GTK_OBJECT(w),
+					     name);
+   g_return_val_if_fail(widget != NULL, NULL);
+
+   return widget;
+}
+
+static void dialog_destroyed(GtkWidget *dialog, gpointer data)
+{
+   DEBUG("dialog destroyed\n");
+   *(GtkObject**)data = NULL;
+}
+
+static inline gboolean dialog_visible(GtkWidget *dialog)
+{
+   return(((dialog != NULL) && GTK_WIDGET_VISIBLE(dialog)));
+}
+
+/*
+ * tell the user about that bug
+ */
+static void alarm_warning(void)
+{
+
+   static GtkWidget *warning_dialog = NULL;
+
+   if(dialog_visible(warning_dialog))
+     return;
+
+   warning_dialog = create_warning_dialog();
+
+   gtk_signal_connect(GTK_OBJECT(warning_dialog), "destroy",
+		      GTK_SIGNAL_FUNC(dialog_destroyed), &warning_dialog);
+
+   gtk_widget_show_all(warning_dialog);
+
+   return;
+}
+
+/*
+ * the callback function that is called when the save button is
+ * pressed saves configuration to ~/.bmp/alarmconfig
+ */
+void alarm_save(GtkButton *w, gpointer data)
+{
+   int daynum = 0;  // used to identify day number
+   ConfigDb *conf;
+
+   DEBUG("alarm_save\n");
+
+   conf = bmp_cfg_db_open();
+
+   /*
+    * update the live values and write them out
+    */
+   alarm_h = alarm_conf.default_hour = 
+     gtk_spin_button_get_value_as_int(alarm_conf.alarm_h);
+   bmp_cfg_db_set_int(conf, "alarm", "alarm_h", alarm_h);
+
+   alarm_m = alarm_conf.default_min = 
+     gtk_spin_button_get_value_as_int(alarm_conf.alarm_m);
+   bmp_cfg_db_set_int(conf, "alarm", "alarm_m", alarm_m);
+
+
+   stop_h =
+     gtk_spin_button_get_value_as_int( alarm_conf.stop_h);
+
+   stop_m =
+     gtk_spin_button_get_value_as_int(alarm_conf.stop_m);
+
+   stop_on =
+     gtk_toggle_button_get_active(alarm_conf.stop_on);
+
+   /* days of the week */
+   for(; daynum < 7; daynum++)
+   {
+     if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(alarm_conf.day[daynum].cb)))
+       alarm_conf.day[daynum].flags = 0;
+     else
+       alarm_conf.day[daynum].flags = ALARM_OFF;
+   
+     if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(alarm_conf.day[daynum].cb_def)))
+       alarm_conf.day[daynum].flags |= ALARM_DEFAULT;
+
+     alarm_conf.day[daynum].hour = 
+       gtk_spin_button_get_value_as_int(alarm_conf.day[daynum].spin_hr);
+     alarm_conf.day[daynum].min = 
+       gtk_spin_button_get_value_as_int(alarm_conf.day[daynum].spin_min);
+
+     bmp_cfg_db_set_int(conf, "alarm", day_flags[daynum], alarm_conf.day[daynum].flags);
+     bmp_cfg_db_set_int(conf, "alarm", day_h[daynum], alarm_conf.day[daynum].hour);
+     bmp_cfg_db_set_int(conf, "alarm", day_m[daynum], alarm_conf.day[daynum].min);
+   }
+
+   /* END: days of week */
+
+   volume =
+     gtk_range_get_adjustment(alarm_conf.volume)->value;
+   bmp_cfg_db_set_int(conf, "alarm", "volume", volume);
+
+   quietvol =
+     gtk_range_get_adjustment(alarm_conf.quietvol)->value;
+   bmp_cfg_db_set_int(conf, "alarm", "quietvol", quietvol);
+
+   fading =
+     gtk_spin_button_get_value_as_int(alarm_conf.fading);
+   //xmms_cfg_write_int(conf, "alarm", "fading", fading);
+
+   /* lets check to see if we need to show the bug warning */
+   if((stop_on == TRUE) &&
+      ((((stop_h * 60) + stop_m) * 60) < (fading + 65)))
+   {
+	   DEBUG("Displaying bug warning, stop %dh %dm, fade %d\n",
+	         stop_h, stop_m, fading);
+	   alarm_warning();
+   }
+   else if((stop_on == TRUE) && (fading < 10))
+   {
+     DEBUG("Displaying bug warning, stop %dh %dm, fade %d\n",
+           stop_h, stop_m, fading);
+     alarm_warning();
+   }
+   else
+   {
+	   /* write the new values */
+	   bmp_cfg_db_set_int(conf, "alarm", "stop_h", stop_h);
+	   bmp_cfg_db_set_int(conf, "alarm", "stop_m", stop_m);
+	   bmp_cfg_db_set_int(conf, "alarm", "fading", fading);
+	   bmp_cfg_db_set_bool(conf, "alarm", "stop_on", stop_on);
+   }
+
+
+   g_free(cmdstr);
+   cmdstr = gtk_editable_get_chars(GTK_EDITABLE(alarm_conf.cmdstr),
+				   0, -1);
+   bmp_cfg_db_set_string(conf, "alarm", "cmdstr", cmdstr);
+
+   cmd_on =
+     gtk_toggle_button_get_active(alarm_conf.cmd_on);
+   bmp_cfg_db_set_bool(conf, "alarm", "cmd_on", cmd_on);
+
+   g_free(playlist);
+   playlist = gtk_editable_get_chars(GTK_EDITABLE(alarm_conf.playlist),
+				     0, -1);
+   bmp_cfg_db_set_string(conf, "alarm", "playlist", playlist);
+
+   /* reminder */
+   g_free(alarm_conf.reminder_msg);
+   alarm_conf.reminder_msg = gtk_editable_get_chars(GTK_EDITABLE(alarm_conf.reminder),
+       0, -1);
+   bmp_cfg_db_set_string(conf, "alarm", "reminder_msg", alarm_conf.reminder_msg);
+   
+   alarm_conf.reminder_on = 
+     gtk_toggle_button_get_active(alarm_conf.reminder_cb);
+   bmp_cfg_db_set_bool(conf, "alarm", "reminder_on", alarm_conf.reminder_on);
+
+   bmp_cfg_db_close(conf);
+}
+
+/*
+ * read the current configuration from the file
+ */
+static void alarm_read_config()
+{
+   int daynum = 0;   // used for day number
+   ConfigDb *conf;
+
+   DEBUG("alarm_read_config\n");
+
+   conf = bmp_cfg_db_open();
+
+   if(!bmp_cfg_db_get_int(conf, "alarm", "alarm_h", &alarm_h))
+     alarm_h = DEFAULT_ALARM_HOUR;
+   if(!bmp_cfg_db_get_int(conf, "alarm", "alarm_m", &alarm_m))
+     alarm_m = DEFAULT_ALARM_MIN;
+
+   /* save them here too */
+   alarm_conf.default_hour = alarm_h;
+   alarm_conf.default_min = alarm_m;
+
+   if(!bmp_cfg_db_get_int( conf, "alarm", "stop_h", &stop_h))
+     stop_h = DEFAULT_STOP_HOURS;
+   if(!bmp_cfg_db_get_int( conf, "alarm", "stop_m", &stop_m))
+     stop_m = DEFAULT_STOP_MINS;
+   if(!bmp_cfg_db_get_bool(conf, "alarm", "stop_on", &stop_on))
+     stop_on = TRUE;
+
+   if(!bmp_cfg_db_get_int(conf, "alarm", "volume", &volume))
+     volume = DEFAULT_VOLUME;
+   if(!bmp_cfg_db_get_int(conf, "alarm", "quietvol", &quietvol))
+     quietvol = DEFAULT_QUIET_VOL;
+
+   if(!bmp_cfg_db_get_int(conf, "alarm", "fading", &fading))
+     fading = DEFAULT_FADING;
+
+   if(!bmp_cfg_db_get_string(conf, "alarm", "cmdstr", &cmdstr))
+     cmdstr = g_strdup("");
+   if(!bmp_cfg_db_get_bool(conf, "alarm", "cmd_on", &cmd_on))
+     cmd_on = FALSE;
+
+   if(!bmp_cfg_db_get_string(conf, "alarm", "playlist", &playlist))
+     playlist = g_strdup("");
+
+   if(!bmp_cfg_db_get_string(conf, "alarm", "reminder_msg", &alarm_conf.reminder_msg))
+     alarm_conf.reminder_msg = g_strdup("");
+   if(!bmp_cfg_db_get_bool(conf, "alarm", "reminder_on", &alarm_conf.reminder_on))
+     alarm_conf.reminder_on = FALSE;
+
+   /* day flags and times */
+   for(; daynum < 7; daynum++)
+   {
+     /* read the flags */
+     if(!bmp_cfg_db_get_int(conf, "alarm", day_flags[daynum], &alarm_conf.day[daynum].flags)) {
+       // only turn alarm off by default on a sunday
+       if(daynum != 0)
+         alarm_conf.day[daynum].flags = DEFAULT_FLAGS;
+       else
+         alarm_conf.day[daynum].flags = DEFAULT_FLAGS | ALARM_OFF;
+     }
+
+     /* read the times */
+     if(!bmp_cfg_db_get_int(conf, "alarm", day_h[daynum], &alarm_conf.day[daynum].hour))
+       alarm_conf.day[daynum].hour = DEFAULT_ALARM_HOUR;
+
+     if(!bmp_cfg_db_get_int(conf, "alarm", day_m[daynum], &alarm_conf.day[daynum].min))
+       alarm_conf.day[daynum].min = DEFAULT_ALARM_MIN;
+   }
+
+   DEBUG("END alarm_read_config\n");
+}
+
+/*
+ * display an about box
+ */
+static void alarm_about()
+{
+   static GtkWidget *about_dialog = NULL;
+
+   DEBUG("alarm_about\n");
+
+   if(dialog_visible(about_dialog))
+     return;
+
+   about_dialog = create_about_dialog();
+
+   gtk_signal_connect(GTK_OBJECT(about_dialog), "destroy",
+		      GTK_SIGNAL_FUNC(dialog_destroyed), &about_dialog);
+
+   gtk_widget_show_all(about_dialog);
+
+   return;
+}
+
+/*
+ * create a playlist file selection dialog
+ */
+static void alarm_playlist_browse(GtkButton *button, gpointer data)
+{
+   GtkWidget *fs;
+   gchar *dirname, *path;
+
+   dirname = g_dirname(playlist);
+   DEBUG("dirname = %s\n", dirname);
+   path = g_strdup_printf("%s/", dirname);
+   DEBUG("path = %s\n", path);
+   g_free(dirname);
+
+   fs = create_playlist_fileselection();
+
+   gtk_file_selection_set_filename(GTK_FILE_SELECTION(fs), path);
+   g_free(path);
+
+   gtk_widget_show_all(fs);
+}
+
+/*
+ * save selected playlist to the corresponding text entry
+ */
+void alarm_store_playlistname(GtkButton *button, gpointer data)
+{
+   GtkFileSelection *fs = GTK_FILE_SELECTION(data);
+   gchar *plist;
+
+   DEBUG("alarm_store_playlistname\n");
+
+   plist = gtk_file_selection_get_filename(fs);
+
+   gtk_entry_set_text(alarm_conf.playlist, plist);
+}
+
+/*
+ * displays the configuration window and opens the config file.
+ */
+static void alarm_configure(void)
+{
+   int daynum = 0;  // used to loop days
+   GtkWidget *w;
+
+   DEBUG("alarm_configure\n");
+
+   /*
+    * dont want to show more than one config window
+    */
+   if(dialog_visible(config_dialog))
+     return;
+
+   alarm_read_config();
+
+   /*
+    * Create the widgets
+    */
+   config_dialog = create_config_dialog();
+
+   w = lookup_widget(config_dialog, "alarm_h_spin");
+   alarm_conf.alarm_h = GTK_SPIN_BUTTON(w);
+   gtk_spin_button_set_value(alarm_conf.alarm_h, alarm_h);
+
+   w = lookup_widget(config_dialog, "alarm_m_spin");
+   alarm_conf.alarm_m =  GTK_SPIN_BUTTON(w);
+   gtk_spin_button_set_value(alarm_conf.alarm_m, alarm_m);
+
+   w = lookup_widget(config_dialog, "stop_h_spin");
+   alarm_conf.stop_h = GTK_SPIN_BUTTON(w);
+   gtk_spin_button_set_value(alarm_conf.stop_h, stop_h);
+
+   w = lookup_widget(config_dialog, "stop_m_spin");
+   alarm_conf.stop_m = GTK_SPIN_BUTTON(w);
+   gtk_spin_button_set_value(alarm_conf.stop_m, stop_m);
+
+   w = lookup_widget(config_dialog, "stop_checkb");
+   alarm_conf.stop_on = GTK_TOGGLE_BUTTON(w);
+   gtk_toggle_button_set_active(alarm_conf.stop_on, stop_on);
+
+   w = lookup_widget(config_dialog, "vol_scale");
+   alarm_conf.volume = GTK_RANGE(w);
+   gtk_range_set_adjustment(alarm_conf.volume,
+			    GTK_ADJUSTMENT(gtk_adjustment_new(volume,
+							      0,
+							      100, 1,
+							      5, 0)));
+
+   w = lookup_widget(config_dialog, "quiet_vol_scale");
+   alarm_conf.quietvol = GTK_RANGE(w);
+   gtk_range_set_adjustment(alarm_conf.quietvol,
+			    GTK_ADJUSTMENT(gtk_adjustment_new(quietvol,
+							      0,
+							      100, 1,
+							      5, 0)));
+
+   /* days of week */
+   for(; daynum < 7; daynum++)
+   {
+     w = lookup_widget(config_dialog, day_cb[daynum]);
+     alarm_conf.day[daynum].cb = GTK_CHECK_BUTTON(w);
+     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(alarm_conf.day[daynum].cb),
+				!(alarm_conf.day[daynum].flags & ALARM_OFF));
+
+     w = lookup_widget(config_dialog, day_def[daynum]);
+     alarm_conf.day[daynum].cb_def = GTK_CHECK_BUTTON(w);
+     gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(alarm_conf.day[daynum].cb_def),
+         alarm_conf.day[daynum].flags & ALARM_DEFAULT);
+
+   
+     /* Changed to show default time instead of set time when ALARM_DEFAULT set,
+      * as suggested by Mark Brown
+      */
+/*     w = lookup_widget(config_dialog, day_h[daynum]);
+     alarm_conf.day[daynum].spin_hr = GTK_SPIN_BUTTON(w);
+     gtk_spin_button_set_value(alarm_conf.day[daynum].spin_hr, alarm_conf.day[daynum].hour);
+
+     w = lookup_widget(config_dialog, day_m[daynum]);
+     alarm_conf.day[daynum].spin_min = GTK_SPIN_BUTTON(w);
+     gtk_spin_button_set_value(alarm_conf.day[daynum].spin_min, alarm_conf.day[daynum].min);
+*/
+     if(alarm_conf.day[daynum].flags & ALARM_DEFAULT)
+     {
+       w = lookup_widget(config_dialog, day_h[daynum]);
+       alarm_conf.day[daynum].spin_hr = GTK_SPIN_BUTTON(w);
+       gtk_spin_button_set_value(alarm_conf.day[daynum].spin_hr, alarm_conf.default_hour);
+
+       w = lookup_widget(config_dialog, day_m[daynum]);
+       alarm_conf.day[daynum].spin_min = GTK_SPIN_BUTTON(w);
+       gtk_spin_button_set_value(alarm_conf.day[daynum].spin_min, alarm_conf.default_min);
+
+       gtk_widget_set_sensitive((GtkWidget *)alarm_conf.day[daynum].spin_hr, FALSE);
+       gtk_widget_set_sensitive((GtkWidget *)alarm_conf.day[daynum].spin_min, FALSE);
+     }
+     else
+     {
+       w = lookup_widget(config_dialog, day_h[daynum]);
+       alarm_conf.day[daynum].spin_hr = GTK_SPIN_BUTTON(w);
+       gtk_spin_button_set_value(alarm_conf.day[daynum].spin_hr, alarm_conf.day[daynum].hour);
+
+       w = lookup_widget(config_dialog, day_m[daynum]);
+       alarm_conf.day[daynum].spin_min = GTK_SPIN_BUTTON(w);
+       gtk_spin_button_set_value(alarm_conf.day[daynum].spin_min, alarm_conf.day[daynum].min);
+
+       gtk_widget_set_sensitive((GtkWidget *)alarm_conf.day[daynum].spin_hr, TRUE);
+       gtk_widget_set_sensitive((GtkWidget *)alarm_conf.day[daynum].spin_min, TRUE);
+     }
+   }
+
+   /* END: days of week */
+
+   w = lookup_widget(config_dialog,"fading_spin");
+   alarm_conf.fading = GTK_SPIN_BUTTON(w);
+   gtk_spin_button_set_value(alarm_conf.fading, fading);
+
+   w = lookup_widget(config_dialog, "cmd_entry");
+   alarm_conf.cmdstr = GTK_ENTRY(w);
+   gtk_entry_set_text(alarm_conf.cmdstr, cmdstr);
+
+   w = lookup_widget(config_dialog, "cmd_checkb");
+   alarm_conf.cmd_on = GTK_TOGGLE_BUTTON(w);
+   gtk_toggle_button_set_active(alarm_conf.cmd_on, cmd_on);
+
+   w = lookup_widget(config_dialog, "playlist");
+   alarm_conf.playlist = GTK_ENTRY(w);
+   gtk_entry_set_text(alarm_conf.playlist, playlist);
+
+   w = lookup_widget(config_dialog, "reminder_text");
+   alarm_conf.reminder = GTK_ENTRY(w);
+   gtk_entry_set_text(alarm_conf.reminder, alarm_conf.reminder_msg);
+
+   w = lookup_widget(config_dialog, "reminder_cb");
+   alarm_conf.reminder_cb = GTK_TOGGLE_BUTTON(w);
+   gtk_toggle_button_set_active(alarm_conf.reminder_cb, alarm_conf.reminder_on);
+
+   w = lookup_widget(config_dialog, "playlist_browse_button");
+   gtk_signal_connect(GTK_OBJECT(w), "clicked",
+		      GTK_SIGNAL_FUNC(alarm_playlist_browse), NULL);
+
+   gtk_signal_connect(GTK_OBJECT(config_dialog), "destroy",
+		      GTK_SIGNAL_FUNC(dialog_destroyed), &config_dialog);
+
+   gtk_widget_show_all(config_dialog);
+
+   DEBUG("END alarm_configure\n");
+}
+
+/* functions for greying out the time for days */
+void on_day_def_toggled(GtkToggleButton *togglebutton, gpointer user_data, int daynum)
+{
+   GtkWidget *w;
+
+   /* change the time shown too */
+   w = lookup_widget(config_dialog, day_h[daynum]);
+   if(w == NULL)
+     return;
+
+   if(gtk_toggle_button_get_active(togglebutton) == TRUE)
+   {
+     gtk_spin_button_set_value(GTK_SPIN_BUTTON(w), alarm_conf.default_hour);
+     gtk_widget_set_sensitive(w, FALSE);
+   }
+   else
+   {
+     gtk_spin_button_set_value(GTK_SPIN_BUTTON(w), alarm_conf.day[daynum].hour);
+     gtk_widget_set_sensitive(w, TRUE);
+   }
+
+   w = lookup_widget(config_dialog, day_m[daynum]);
+   if(gtk_toggle_button_get_active(togglebutton) == TRUE)
+   {
+     gtk_spin_button_set_value(GTK_SPIN_BUTTON(w), alarm_conf.default_min);
+     gtk_widget_set_sensitive(w, FALSE);
+   }
+   else
+   {
+     gtk_spin_button_set_value(GTK_SPIN_BUTTON(w), alarm_conf.day[daynum].min);
+     gtk_widget_set_sensitive(w, TRUE);
+   }
+}
+
+void on_sun_def_toggled(GtkToggleButton *togglebutton, gpointer user_data)
+{
+   on_day_def_toggled(togglebutton, user_data, 0);
+}
+
+void on_mon_def_toggled(GtkToggleButton *togglebutton, gpointer user_data)
+{
+   on_day_def_toggled(togglebutton, user_data, 1);
+}
+
+void on_tue_def_toggled(GtkToggleButton *togglebutton, gpointer user_data)
+{
+   on_day_def_toggled(togglebutton, user_data, 2);
+}
+
+void on_wed_def_toggled(GtkToggleButton *togglebutton, gpointer user_data)
+{
+   on_day_def_toggled(togglebutton, user_data, 3);
+}
+
+void on_thu_def_toggled(GtkToggleButton *togglebutton, gpointer user_data)
+{
+   on_day_def_toggled(togglebutton, user_data, 4);
+}
+
+void on_fri_def_toggled(GtkToggleButton *togglebutton, gpointer user_data)
+{
+   on_day_def_toggled(togglebutton, user_data, 5);
+}
+
+void on_sat_def_toggled(GtkToggleButton *togglebutton, gpointer user_data)
+{
+   on_day_def_toggled(togglebutton, user_data, 6);
+}
+
+/* END: greying things */
+
+void alarm_current_volume(GtkButton *button, gpointer data)
+{
+   gint vol;
+   GtkAdjustment *adj;
+
+   DEBUG("on_current_button_clicked\n");
+
+   vol = xmms_remote_get_main_volume(alarm_plugin.xmms_session);
+
+   adj = gtk_range_get_adjustment(alarm_conf.volume);
+   gtk_adjustment_set_value(adj, (gfloat)vol);
+}
+
+GeneralPlugin *get_gplugin_info()
+{
+   return &alarm_plugin;
+}
+
+/*
+ * a thread safe sleeping function -
+ * and it even works in solaris (I think)
+ */
+static void threadsleep(float x)
+{
+   struct timespec rqtp, rmtp;
+
+   DEBUG("threadsleep: waiting %f seconds\n", x);
+
+   rqtp.tv_sec = x;
+   rqtp.tv_nsec = (int)((float)(x - (int)x) * 1000000000.0);
+
+   nanosleep(&rqtp, &rmtp);
+
+   return;
+}
+
+static inline pthread_t alarm_thread_create(void *(*start_routine)(void *), void *args, unsigned int detach)
+{
+   pthread_t tid;
+   pthread_attr_t attr;
+
+   pthread_attr_init(&attr);
+
+   if(detach != 0)
+    pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+    
+   pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
+   pthread_attr_setschedpolicy(&attr, SCHED_OTHER);
+   pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM);
+
+   pthread_create(&tid, &attr, start_routine, args);
+
+   return(tid);
+}
+
+static void *alarm_fade(void *arg)
+{
+   fader *vols = (fader *)arg;
+   guint i;
+   gint inc, diff, adiff;
+
+   /* lock */
+   pthread_mutex_lock(&fader_lock);
+
+   /* slide volume */
+   /* the Kaspar Giger way of fading, check the current mixer volume and 
+    * increment from there so that if you have some other app lowering the
+    * volume at the same time xmms-alarm will not ignore it.  If you have some
+    * other app increasing the volume, then it could get louder that you expect
+    * though - because the loop does not recalculate the difference each time.
+    */
+
+   /* difference between the 2 volumes */
+   diff = vols->end - vols->start;
+   adiff = abs(diff);
+
+   /* Are we going up or down? */
+   if(diff < 0)
+     inc = -1;
+   else
+     inc = 1;
+   
+   xmms_remote_set_main_volume(alarm_plugin.xmms_session, (gint)vols->start);
+   //for(i=0;i<(vols->end - vols->start);i++)
+   for(i=0;i<adiff;i++)
+   {
+     //threadsleep((gfloat)fading / (vols->end - vols->start));
+     threadsleep((gfloat)fading / (gfloat)adiff);
+     xmms_remote_set_main_volume(alarm_plugin.xmms_session, 
+         (gint)(xmms_remote_get_main_volume(alarm_plugin.xmms_session) + inc));
+   }
+   /* Setting the volume to the end volume sort of defeats the point if having
+    * the code in there to allow other apps to control volume too :)
+    */
+   //xmms_remote_set_main_volume(alarm_plugin.xmms_session, (gint)vols->end);
+
+   /* and */
+   pthread_mutex_unlock(&fader_lock);
+
+   DEBUG("volume = %f%%\n", (gdouble)vols->end);
+   return(0);
+}
+
+static void *alarm_stop_thread( void *args )
+{
+   gint currvol;
+   fader fade_vols;
+   pthread_t f_tid;
+
+   DEBUG("alarm_stop_thread\n");
+
+
+   /* sleep for however long we are meant to be sleeping for until
+    * its time to shut up
+    */
+   threadsleep(((stop_h * 60) + stop_m) * 60);
+
+   DEBUG("alarm_stop triggered\n");
+
+   if (dialog_visible(alarm_dialog))
+     gtk_widget_destroy(alarm_dialog);
+
+   currvol = xmms_remote_get_main_volume(alarm_plugin.xmms_session),
+
+   /* fade back to zero */
+   fade_vols.start = currvol;
+   fade_vols.end = 0;
+
+   /* The fader thread locks the fader_mutex now */
+   f_tid = alarm_thread_create(alarm_fade, &fade_vols, 0);
+
+   pthread_join(f_tid, NULL);
+   xmms_remote_stop(alarm_plugin.xmms_session);
+
+   /* might as well set the volume to something higher than zero so we
+    * dont confuse the poor people who just woke up and cant work out why
+    * theres no music playing when they press the little play button :)
+    */
+   xmms_remote_set_main_volume(alarm_plugin.xmms_session, currvol);
+
+   DEBUG("alarm_stop done\n");
+   return(NULL);
+}
+
+void alarm_stop_cancel(GtkButton *w, gpointer data)
+{
+   DEBUG("alarm_stop_cancel\n");
+   pthread_cancel(stop_tid);
+}
+
+/* the main alarm thread */
+static void *alarm_start_thread(void *args)
+{
+   struct tm *currtime;
+   time_t timenow;
+   unsigned int play_start = 0;
+   guint today;
+
+   /* give it time to set start_tid to something */
+   threadsleep(1);
+
+   while(start_tid != 0)
+   {
+     /* sit around and wait for the faders to not be doing anything */
+     DEBUG("Waiting for fader to be unlocked..");
+     pthread_mutex_lock(&fader_lock);
+     DEBUG("Ok\n");
+     pthread_mutex_unlock(&fader_lock);
+
+     DEBUG("Getting time\n");
+     timenow = time(NULL);
+     currtime = localtime(&timenow);
+     today = currtime->tm_wday;
+     DEBUG("Today is %d\n", today);
+
+     /* see if its time to do something */
+     DEBUG("Checking Day\n");
+
+     /* Had to put something here so I put the hour string.
+     ** Its only debug stuff anyway */
+     DEBUG(day_h[today]);
+
+     if(alarm_conf.day[today].flags & ALARM_OFF)
+     {
+       threadsleep(8.5);
+       continue;
+     }
+     else
+     {
+       /* set the alarm_h and alarm_m for today, if not default */
+       if(!(alarm_conf.day[today].flags & ALARM_DEFAULT))
+       {
+         alarm_h = alarm_conf.day[today].hour;
+         alarm_m = alarm_conf.day[today].min;
+       }
+       else
+       {
+         alarm_h = alarm_conf.default_hour;
+         alarm_m = alarm_conf.default_min;
+       }
+     }
+
+     DEBUG("Alarm time is %d:%d (def: %d:%d)\n", alarm_h, alarm_m,
+        alarm_conf.default_hour, alarm_conf.default_min);
+
+     DEBUG("Checking time (%d:%d)\n", currtime->tm_hour, currtime->tm_min);
+     if((currtime->tm_hour != alarm_h) || (currtime->tm_min != alarm_m))
+     {
+       threadsleep(8.5);
+       continue;
+     }
+
+     if(cmd_on == TRUE)
+     {
+       DEBUG("Executing %s, cmd_on is true\n", cmdstr);
+       system(cmdstr);
+     }
+
+     DEBUG("strcmp playlist, playlist is [%s]\n", playlist);
+     if(strcmp(playlist, ""))
+     {
+       DEBUG("playlist is not blank, aparently\n");
+       /* Is this a url? */
+       /* Thanks Thomer */
+       if(!strncmp(playlist, "http://", 7))
+       {
+         /* Yes */
+         DEBUG("This looks like a URL to me...\n");
+         /* If I just add the url and it turns out to be a playlist then xmms
+          * will sort that out.. It should also work for radio streams, I guess
+          */
+         xmms_remote_playlist_clear(alarm_plugin.xmms_session);
+         xmms_remote_playlist_add_url_string(alarm_plugin.xmms_session, playlist);
+       }
+       else
+       {
+         /* No, its probably a local file */
+         /* Does that mean we want to go through it and add files to the list
+          * properly, or just use this semi-hack to let xmms do the playlist
+          * parsing?
+          */
+         xmms_remote_playlist_clear(alarm_plugin.xmms_session);
+         xmms_remote_playlist(alarm_plugin.xmms_session, 
+             &playlist, 1, TRUE);
+       }
+     }
+
+     if(fading)
+     {
+       fader fade_vols;
+       
+       DEBUG("Fading is true\n");
+       xmms_remote_set_main_volume(alarm_plugin.xmms_session, quietvol);
+
+       /* start playing */
+       play_start = time(NULL);
+       xmms_remote_play(alarm_plugin.xmms_session);
+
+       /* fade volume */
+       fade_vols.start = quietvol;
+       fade_vols.end = volume;
+
+       //alarm_fade(quietvol, volume);
+       alarm_thread_create(alarm_fade, &fade_vols, 0);
+     }
+     else
+     {
+       /* no fading */
+
+       /* set volume */
+       xmms_remote_set_main_volume(alarm_plugin.xmms_session, volume);
+
+       /* start playing */
+       play_start = time(NULL);
+       xmms_remote_play(alarm_plugin.xmms_session);
+     }
+
+     if(alarm_conf.reminder_on == TRUE)
+     {
+       GtkWidget *reminder_dialog;
+       DEBUG("Showing reminder '%s'\n", alarm_conf.reminder_msg);
+
+       GDK_THREADS_ENTER();
+       reminder_dialog = create_reminder_dialog(alarm_conf.reminder_msg);
+       gtk_signal_connect(GTK_OBJECT(reminder_dialog), "destroy",
+       GTK_SIGNAL_FUNC(dialog_destroyed), &reminder_dialog);
+       gtk_widget_show_all(reminder_dialog);
+       GDK_THREADS_LEAVE();
+     }
+
+     /* bring up the wakeup call dialog if stop_on is set TRUE, this
+      * has been moved to after making xmms play so that it doesnt
+      * get in the way for people with manual window placement turned on
+      *
+      * this means that the dialog doesnt get shown until the volume has
+      * finished fading though !, so thats something else to fix
+      */
+      if(stop_on == TRUE)
+      {
+         /* ok, so when we want to open dialogs in threaded programs
+          * we use this do we?
+          * anyone?
+          */
+          GDK_THREADS_ENTER();
+          {
+            DEBUG("stop_on is true\n");
+            alarm_dialog = create_alarm_dialog();
+            DEBUG("created alarm dialog, %p\n", alarm_dialog);
+
+            gtk_signal_connect(GTK_OBJECT(alarm_dialog), "destroy",
+            GTK_SIGNAL_FUNC(dialog_destroyed), &alarm_dialog);
+            DEBUG("attached destroy signal to alarm dialog, %p\n", alarm_dialog);
+            gtk_widget_show_all(alarm_dialog);
+            DEBUG("dialog now showing\n");
+
+            DEBUG("now starting stop thread\n");
+            stop_tid = alarm_thread_create(alarm_stop_thread, NULL, 0);
+            DEBUG("Created wakeup dialog and started stop thread(%d)\n", (int)stop_tid);
+
+	        }
+	        GDK_THREADS_LEAVE();
+
+          /* now wait for the stop thread */
+          DEBUG("Waiting for stop to stop.... (%d)", (int)stop_tid);
+          pthread_join(stop_tid, NULL);
+          /* loop until we are out of the starting minute */
+          while(time(NULL) < (play_start + 61))
+          {
+            DEBUG("Waiting until out of starting minute\n");
+            threadsleep(5.0);
+          }
+          DEBUG("OK\n");
+      }
+      /* loop until we are out of the starting minute */
+      while(time(NULL) < (play_start + 61))
+      {
+        threadsleep(5.0);
+      }
+      threadsleep(fading);
+   }
+
+   DEBUG("Main thread has gone...\n");
+   return NULL;
+}
+
+/*
+ * initialization
+ * opens the config file and reads the value, creates a new
+ * config in memory if the file doesnt exist and sets default vals
+ */
+static void alarm_init()
+{
+   DEBUG("alarm_init\n");
+
+   alarm_read_config();
+
+   /* start the main thread running */
+   start_tid = alarm_thread_create(alarm_start_thread, NULL, 1);
+}
+
+/*
+ * kill the main thread
+ */
+static void alarm_cleanup()
+{
+   DEBUG("alarm_cleanup\n");
+
+   pthread_cancel(start_tid);
+   start_tid = 0;
+   if(stop_tid)
+     pthread_cancel(stop_tid);
+}
+
+/*
+ * for xmms to get the function names
+ */
+static GeneralPlugin alarm_plugin =
+{
+   NULL,
+     NULL,
+     -1,
+     "Alarm "VERSION,
+     alarm_init,
+     alarm_about,
+     alarm_configure,
+     alarm_cleanup,
+};
+
+/*
+ * vi:ai:expandtab:ts=2 sts=2 shiftwidth=2:nowrap:
+ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alarm/alarm.h	Thu Oct 26 00:10:28 2006 -0700
@@ -0,0 +1,58 @@
+/*
+ * $Id: alarm.h,v 1.2 2003/11/23 19:29:36 adamf Exp $
+ * alarm.h
+ *
+ * Adam Feakin
+ * adamf@snika.uklinux.net
+ *
+ * we need some struct to hold the info about the days
+ */
+#ifndef __ALARM_H
+#define __ALARM_H
+
+#include "config.h"
+
+#include <gtk/gtk.h>
+
+/* flags */
+#define ALARM_OFF     (1 << 0)
+#define ALARM_DEFAULT (1 << 1)
+
+/* defaults */
+#define DEFAULT_ALARM_HOUR      06
+#define DEFAULT_ALARM_MIN       30
+#define DEFAULT_STOP_HOURS      01
+#define DEFAULT_STOP_MINS       00
+#define DEFAULT_VOLUME          80
+#define DEFAULT_FADING          60
+#define DEFAULT_QUIET_VOL       25
+#define DEFAULT_FLAGS           ALARM_DEFAULT
+
+/* debug ? */
+#ifdef ENABLE_DEBUG
+# define DEBUG( args... ) fprintf( stderr, args )
+#else
+# define DEBUG( args... )
+#endif
+
+
+typedef struct AlarmDay {
+  GtkCheckButton *cb;
+  GtkCheckButton *cb_def;
+  GtkSpinButton *spin_hr;
+  GtkSpinButton *spin_min;
+  int flags;
+  int hour;
+  int min;
+} alarmday;
+
+
+typedef struct Fader {
+  guint start, end;
+} fader;
+
+
+#endif /* __ALARM_H */
+/*
+ * vi:ai:expandtab:ts=2 sts=2 shiftwidth=2:nowrap:
+ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alarm/callbacks.h	Thu Oct 26 00:10:28 2006 -0700
@@ -0,0 +1,49 @@
+#include <gtk/gtk.h>
+
+
+void
+alarm_current_volume                   (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+alarm_save                             (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+alarm_stop_cancel                      (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+alarm_store_playlistname               (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_mon_def_toggled                     (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_tue_def_toggled                     (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_wed_def_toggled                     (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_thu_def_toggled                     (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_fri_def_toggled                     (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_sat_def_toggled                     (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_sun_def_toggled                     (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+/*
+ * vi:ai:expandtab:ts=2 sts=2 shiftwidth=2:nowrap:
+ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alarm/interface.c	Thu Oct 26 00:10:28 2006 -0700
@@ -0,0 +1,1506 @@
+/*
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <string.h>
+
+#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk.h>
+
+#include "callbacks.h"
+#include "interface.h"
+#include "support.h"
+
+GtkWidget*
+create_about_dialog (void)
+{
+  GtkWidget *about_dialog;
+  GtkWidget *dialog_vbox2;
+  GtkWidget *frame6;
+  GtkWidget *label18;
+  GtkWidget *dialog_action_area2;
+  GtkWidget *close;
+
+  about_dialog = gtk_dialog_new ();
+  gtk_widget_set_name (about_dialog, "about_dialog");
+  gtk_object_set_data (GTK_OBJECT (about_dialog), "about_dialog", about_dialog);
+  gtk_window_set_title (GTK_WINDOW (about_dialog), "About XMMS Alarm");
+/*
+ * GTK2 hack
+ * GTK_WINDOW (about_dialog)->type = GTK_WINDOW_DIALOG;
+ */
+  GTK_WINDOW (about_dialog)->type = GTK_WINDOW_TOPLEVEL;
+  gtk_window_set_policy (GTK_WINDOW (about_dialog), FALSE, FALSE, TRUE);
+
+  dialog_vbox2 = GTK_DIALOG (about_dialog)->vbox;
+  gtk_widget_set_name (dialog_vbox2, "dialog_vbox2");
+  gtk_object_set_data (GTK_OBJECT (about_dialog), "dialog_vbox2", dialog_vbox2);
+  gtk_widget_show (dialog_vbox2);
+
+  frame6 = gtk_frame_new ("XMMS Alarm");
+  gtk_widget_set_name (frame6, "frame6");
+  gtk_widget_ref (frame6);
+  gtk_object_set_data_full (GTK_OBJECT (about_dialog), "frame6", frame6,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (frame6);
+  gtk_box_pack_start (GTK_BOX (dialog_vbox2), frame6, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame6), 10);
+
+  label18 = gtk_label_new ("An XMMS plugin which can be used\nto start playing at a certain time.\n\nSend all complaints to:\nAdam Feakin <adamf@snika.uklinux.net>\nDaniel Stodden <stodden@in.tum.de>\n\nhttp://www.snika.uklinux.net/xmms-alarm/");
+  gtk_widget_set_name (label18, "label18");
+  gtk_widget_ref (label18);
+  gtk_object_set_data_full (GTK_OBJECT (about_dialog), "label18", label18,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label18);
+  gtk_container_add (GTK_CONTAINER (frame6), label18);
+  gtk_misc_set_padding (GTK_MISC (label18), 10, 20);
+
+  dialog_action_area2 = GTK_DIALOG (about_dialog)->action_area;
+  gtk_widget_set_name (dialog_action_area2, "dialog_action_area2");
+  gtk_object_set_data (GTK_OBJECT (about_dialog), "dialog_action_area2", dialog_action_area2);
+  gtk_widget_show (dialog_action_area2);
+  gtk_container_set_border_width (GTK_CONTAINER (dialog_action_area2), 10);
+
+  close = gtk_button_new_with_label ("Close");
+  gtk_widget_set_name (close, "close");
+  gtk_widget_ref (close);
+  gtk_object_set_data_full (GTK_OBJECT (about_dialog), "close", close,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (close);
+  gtk_box_pack_start (GTK_BOX (dialog_action_area2), close, FALSE, TRUE, 0);
+  GTK_WIDGET_SET_FLAGS (close, GTK_CAN_DEFAULT);
+
+  gtk_signal_connect_object (GTK_OBJECT (close), "clicked",
+                             GTK_SIGNAL_FUNC (gtk_widget_destroy),
+                             GTK_OBJECT (about_dialog));
+
+  gtk_widget_grab_focus (close);
+  gtk_widget_grab_default (close);
+  return about_dialog;
+}
+
+GtkWidget*
+create_alarm_dialog (void)
+{
+  GtkWidget *alarm_dialog;
+  GtkWidget *dialog_vbox3;
+  GtkWidget *label19;
+  GtkWidget *dialog_action_area3;
+  GtkWidget *button9;
+
+  alarm_dialog = gtk_dialog_new ();
+  gtk_widget_set_name (alarm_dialog, "alarm_dialog");
+  gtk_object_set_data (GTK_OBJECT (alarm_dialog), "alarm_dialog", alarm_dialog);
+  gtk_window_set_title (GTK_WINDOW (alarm_dialog), "Alarm");
+  gtk_window_set_policy (GTK_WINDOW (alarm_dialog), FALSE, FALSE, FALSE);
+
+  dialog_vbox3 = GTK_DIALOG (alarm_dialog)->vbox;
+  gtk_widget_set_name (dialog_vbox3, "dialog_vbox3");
+  gtk_object_set_data (GTK_OBJECT (alarm_dialog), "dialog_vbox3", dialog_vbox3);
+  gtk_widget_show (dialog_vbox3);
+
+  label19 = gtk_label_new ("This is your wakeup call.");
+  gtk_widget_set_name (label19, "label19");
+  gtk_widget_ref (label19);
+  gtk_object_set_data_full (GTK_OBJECT (alarm_dialog), "label19", label19,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label19);
+  gtk_box_pack_start (GTK_BOX (dialog_vbox3), label19, FALSE, TRUE, 0);
+  gtk_misc_set_padding (GTK_MISC (label19), 10, 10);
+
+  dialog_action_area3 = GTK_DIALOG (alarm_dialog)->action_area;
+  gtk_widget_set_name (dialog_action_area3, "dialog_action_area3");
+  gtk_object_set_data (GTK_OBJECT (alarm_dialog), "dialog_action_area3", dialog_action_area3);
+  gtk_widget_show (dialog_action_area3);
+  gtk_container_set_border_width (GTK_CONTAINER (dialog_action_area3), 10);
+
+  button9 = gtk_button_new_with_label ("OK");
+  gtk_widget_set_name (button9, "button9");
+  gtk_widget_ref (button9);
+  gtk_object_set_data_full (GTK_OBJECT (alarm_dialog), "button9", button9,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (button9);
+  gtk_box_pack_start (GTK_BOX (dialog_action_area3), button9, FALSE, TRUE, 0);
+  GTK_WIDGET_SET_FLAGS (button9, GTK_CAN_DEFAULT);
+
+  gtk_signal_connect (GTK_OBJECT (button9), "clicked",
+                      GTK_SIGNAL_FUNC (alarm_stop_cancel),
+                      NULL);
+  gtk_signal_connect_object (GTK_OBJECT (button9), "clicked",
+                             GTK_SIGNAL_FUNC (gtk_widget_destroy),
+                             GTK_OBJECT (alarm_dialog));
+
+  gtk_widget_grab_focus (button9);
+  gtk_widget_grab_default (button9);
+  return alarm_dialog;
+}
+
+GtkWidget*
+create_playlist_fileselection (void)
+{
+  GtkWidget *playlist_fileselection;
+  GtkWidget *ok_button1;
+  GtkWidget *cancel_button1;
+
+  playlist_fileselection = gtk_file_selection_new ("Select Playlist");
+  gtk_widget_set_name (playlist_fileselection, "playlist_fileselection");
+  gtk_object_set_data (GTK_OBJECT (playlist_fileselection), "playlist_fileselection", playlist_fileselection);
+  gtk_container_set_border_width (GTK_CONTAINER (playlist_fileselection), 10);
+  gtk_window_set_modal (GTK_WINDOW (playlist_fileselection), TRUE);
+
+  ok_button1 = GTK_FILE_SELECTION (playlist_fileselection)->ok_button;
+  gtk_widget_set_name (ok_button1, "ok_button1");
+  gtk_object_set_data (GTK_OBJECT (playlist_fileselection), "ok_button1", ok_button1);
+  gtk_widget_show (ok_button1);
+  GTK_WIDGET_SET_FLAGS (ok_button1, GTK_CAN_DEFAULT);
+
+  cancel_button1 = GTK_FILE_SELECTION (playlist_fileselection)->cancel_button;
+  gtk_widget_set_name (cancel_button1, "cancel_button1");
+  gtk_object_set_data (GTK_OBJECT (playlist_fileselection), "cancel_button1", cancel_button1);
+  gtk_widget_show (cancel_button1);
+  GTK_WIDGET_SET_FLAGS (cancel_button1, GTK_CAN_DEFAULT);
+
+  gtk_signal_connect (GTK_OBJECT (ok_button1), "clicked",
+                      GTK_SIGNAL_FUNC (alarm_store_playlistname),
+                      playlist_fileselection);
+  gtk_signal_connect_object (GTK_OBJECT (ok_button1), "clicked",
+                             GTK_SIGNAL_FUNC (gtk_widget_destroy),
+                             GTK_OBJECT (playlist_fileselection));
+  gtk_signal_connect_object (GTK_OBJECT (cancel_button1), "clicked",
+                             GTK_SIGNAL_FUNC (gtk_widget_destroy),
+                             GTK_OBJECT (playlist_fileselection));
+
+  return playlist_fileselection;
+}
+
+GtkWidget*
+create_warning_dialog (void)
+{
+  GtkWidget *warning_dialog;
+  GtkWidget *dialog_vbox4;
+  GtkWidget *frame9;
+  GtkWidget *label70;
+  GtkWidget *dialog_action_area4;
+  GtkWidget *button10;
+
+  warning_dialog = gtk_dialog_new ();
+  gtk_widget_set_name (warning_dialog, "warning_dialog");
+  gtk_object_set_data (GTK_OBJECT (warning_dialog), "warning_dialog", warning_dialog);
+  gtk_window_set_title (GTK_WINDOW (warning_dialog), "Sorry");
+  gtk_window_set_policy (GTK_WINDOW (warning_dialog), FALSE, FALSE, FALSE);
+
+  dialog_vbox4 = GTK_DIALOG (warning_dialog)->vbox;
+  gtk_widget_set_name (dialog_vbox4, "dialog_vbox4");
+  gtk_object_set_data (GTK_OBJECT (warning_dialog), "dialog_vbox4", dialog_vbox4);
+  gtk_widget_show (dialog_vbox4);
+
+  frame9 = gtk_frame_new ("Warning");
+  gtk_widget_set_name (frame9, "frame9");
+  gtk_widget_ref (frame9);
+  gtk_object_set_data_full (GTK_OBJECT (warning_dialog), "frame9", frame9,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (frame9);
+  gtk_box_pack_start (GTK_BOX (dialog_vbox4), frame9, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame9), 10);
+
+  label70 = gtk_label_new ("For safety reasons the \"quiet\" time must be at least 65 seconds longer than the fading time, it must also be more than 10 seconds.  This basically means that there is a bug in the code and until I find a way of really fixing it this message will appear :)\n\nYour fading settings have NOT been saved\n\n--\nAdam");
+  gtk_widget_set_name (label70, "label70");
+  gtk_widget_ref (label70);
+  gtk_object_set_data_full (GTK_OBJECT (warning_dialog), "label70", label70,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label70);
+  gtk_container_add (GTK_CONTAINER (frame9), label70);
+  gtk_label_set_line_wrap (GTK_LABEL (label70), TRUE);
+  gtk_misc_set_padding (GTK_MISC (label70), 10, 20);
+
+  dialog_action_area4 = GTK_DIALOG (warning_dialog)->action_area;
+  gtk_widget_set_name (dialog_action_area4, "dialog_action_area4");
+  gtk_object_set_data (GTK_OBJECT (warning_dialog), "dialog_action_area4", dialog_action_area4);
+  gtk_widget_show (dialog_action_area4);
+  gtk_container_set_border_width (GTK_CONTAINER (dialog_action_area4), 10);
+
+  button10 = gtk_button_new_with_label ("Oh Well");
+  gtk_widget_set_name (button10, "button10");
+  gtk_widget_ref (button10);
+  gtk_object_set_data_full (GTK_OBJECT (warning_dialog), "button10", button10,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (button10);
+  gtk_box_pack_start (GTK_BOX (dialog_action_area4), button10, FALSE, TRUE, 0);
+  GTK_WIDGET_SET_FLAGS (button10, GTK_CAN_DEFAULT);
+
+  gtk_signal_connect_object (GTK_OBJECT (button10), "clicked",
+                             GTK_SIGNAL_FUNC (gtk_widget_destroy),
+                             GTK_OBJECT (warning_dialog));
+
+  gtk_widget_grab_focus (button10);
+  gtk_widget_grab_default (button10);
+  return warning_dialog;
+}
+
+GtkWidget*
+create_config_dialog (void)
+{
+  GtkWidget *config_dialog;
+  GtkWidget *dialog_vbox5;
+  GtkWidget *notebook1;
+  GtkWidget *frame10;
+  GtkWidget *table3;
+  GtkWidget *hbox21;
+  GtkObject *stop_h_spin_adj;
+  GtkWidget *stop_h_spin;
+  GtkWidget *label75;
+  GtkWidget *hbox22;
+  GtkObject *alarm_h_spin_adj;
+  GtkWidget *alarm_h_spin;
+  GtkWidget *label76;
+  GtkWidget *hbox23;
+  GtkObject *alarm_m_spin_adj;
+  GtkWidget *alarm_m_spin;
+  GtkWidget *label77;
+  GtkWidget *hbox24;
+  GtkObject *stop_m_spin_adj;
+  GtkWidget *stop_m_spin;
+  GtkWidget *label78;
+  GtkWidget *stop_checkb;
+  GtkWidget *label79;
+  GtkWidget *label80;
+  GtkWidget *label71;
+  GtkWidget *frame15;
+  GtkWidget *table4;
+  GtkWidget *hbox31;
+  GtkWidget *mon_def;
+  GtkObject *mon_h_adj;
+  GtkWidget *mon_h;
+  GtkWidget *label89;
+  GtkObject *mon_m_adj;
+  GtkWidget *mon_m;
+  GtkWidget *hbox32;
+  GtkWidget *tue_def;
+  GtkObject *tue_h_adj;
+  GtkWidget *tue_h;
+  GtkWidget *label90;
+  GtkObject *tue_m_adj;
+  GtkWidget *tue_m;
+  GtkWidget *hbox33;
+  GtkWidget *wed_def;
+  GtkObject *wed_h_adj;
+  GtkWidget *wed_h;
+  GtkWidget *label91;
+  GtkObject *wed_m_adj;
+  GtkWidget *wed_m;
+  GtkWidget *hbox34;
+  GtkWidget *thu_def;
+  GtkObject *thu_h_adj;
+  GtkWidget *thu_h;
+  GtkWidget *label92;
+  GtkObject *thu_m_adj;
+  GtkWidget *thu_m;
+  GtkWidget *hbox35;
+  GtkWidget *fri_def;
+  GtkObject *fri_h_adj;
+  GtkWidget *fri_h;
+  GtkWidget *label93;
+  GtkObject *fri_m_adj;
+  GtkWidget *fri_m;
+  GtkWidget *hbox36;
+  GtkWidget *sat_def;
+  GtkObject *sat_h_adj;
+  GtkWidget *sat_h;
+  GtkWidget *label94;
+  GtkObject *sat_m_adj;
+  GtkWidget *sat_m;
+  GtkWidget *hbox37;
+  GtkWidget *sun_def;
+  GtkObject *sun_h_adj;
+  GtkWidget *sun_h;
+  GtkWidget *label95;
+  GtkObject *sun_m_adj;
+  GtkWidget *sun_m;
+  GtkWidget *label87;
+  GtkWidget *label88;
+  GtkWidget *tue_cb;
+  GtkWidget *wed_cb;
+  GtkWidget *thu_cb;
+  GtkWidget *fri_cb;
+  GtkWidget *sat_cb;
+  GtkWidget *sun_cb;
+  GtkWidget *mon_cb;
+  GtkWidget *label72;
+  GtkWidget *vbox8;
+  GtkWidget *frame11;
+  GtkWidget *alignment10;
+  GtkWidget *hbox25;
+  GtkObject *fading_spin_adj;
+  GtkWidget *fading_spin;
+  GtkWidget *label81;
+  GtkWidget *frame12;
+  GtkWidget *vbox9;
+  GtkWidget *alignment11;
+  GtkWidget *current_button;
+  GtkWidget *label82;
+  GtkWidget *hbox26;
+  GtkWidget *quiet_vol_scale;
+  GtkWidget *label83;
+  GtkWidget *hseparator2;
+  GtkWidget *label84;
+  GtkWidget *hbox27;
+  GtkWidget *vol_scale;
+  GtkWidget *label85;
+  GtkWidget *label73;
+  GtkWidget *vbox10;
+  GtkWidget *frame13;
+  GtkWidget *hbox28;
+  GtkWidget *cmd_entry;
+  GtkWidget *cmd_checkb;
+  GtkWidget *frame14;
+  GtkWidget *hbox29;
+  GtkWidget *playlist;
+  GtkWidget *playlist_browse_button;
+  GtkWidget *frame18;
+  GtkWidget *hbox38;
+  GtkWidget *reminder_cb;
+  GtkWidget *reminder_text;
+  GtkWidget *label74;
+  GtkWidget *frame16;
+  GtkWidget *scrolledwindow1;
+  GtkWidget *text1;
+  GtkWidget *label86;
+  GtkWidget *dialog_action_area5;
+  GtkWidget *hbox20;
+  GtkWidget *ok_button;
+  GtkWidget *cancel_button;
+  GtkTooltips *tooltips;
+
+  tooltips = gtk_tooltips_new ();
+
+  config_dialog = gtk_dialog_new ();
+  gtk_widget_set_name (config_dialog, "config_dialog");
+  gtk_object_set_data (GTK_OBJECT (config_dialog), "config_dialog", config_dialog);
+  gtk_window_set_title (GTK_WINDOW (config_dialog), "Alarm Settings");
+  gtk_window_set_policy (GTK_WINDOW (config_dialog), FALSE, FALSE, FALSE);
+
+  dialog_vbox5 = GTK_DIALOG (config_dialog)->vbox;
+  gtk_widget_set_name (dialog_vbox5, "dialog_vbox5");
+  gtk_object_set_data (GTK_OBJECT (config_dialog), "dialog_vbox5", dialog_vbox5);
+  gtk_widget_show (dialog_vbox5);
+
+  notebook1 = gtk_notebook_new ();
+  gtk_widget_set_name (notebook1, "notebook1");
+  gtk_widget_ref (notebook1);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "notebook1", notebook1,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (notebook1);
+  gtk_box_pack_start (GTK_BOX (dialog_vbox5), notebook1, TRUE, TRUE, 0);
+
+  frame10 = gtk_frame_new ("Time");
+  gtk_widget_set_name (frame10, "frame10");
+  gtk_widget_ref (frame10);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "frame10", frame10,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (frame10);
+  gtk_container_add (GTK_CONTAINER (notebook1), frame10);
+  gtk_container_set_border_width (GTK_CONTAINER (frame10), 10);
+
+  table3 = gtk_table_new (2, 3, FALSE);
+  gtk_widget_set_name (table3, "table3");
+  gtk_widget_ref (table3);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "table3", table3,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (table3);
+  gtk_container_add (GTK_CONTAINER (frame10), table3);
+  gtk_container_set_border_width (GTK_CONTAINER (table3), 8);
+  gtk_table_set_row_spacings (GTK_TABLE (table3), 5);
+  gtk_table_set_col_spacings (GTK_TABLE (table3), 15);
+
+  hbox21 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_set_name (hbox21, "hbox21");
+  gtk_widget_ref (hbox21);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "hbox21", hbox21,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hbox21);
+  gtk_table_attach (GTK_TABLE (table3), hbox21, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
+
+  stop_h_spin_adj = gtk_adjustment_new (0, 0, 100, 1, 10, 10);
+  stop_h_spin = gtk_spin_button_new (GTK_ADJUSTMENT (stop_h_spin_adj), 1, 0);
+  gtk_widget_set_name (stop_h_spin, "stop_h_spin");
+  gtk_widget_ref (stop_h_spin);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "stop_h_spin", stop_h_spin,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (stop_h_spin);
+  gtk_box_pack_start (GTK_BOX (hbox21), stop_h_spin, FALSE, FALSE, 0);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (stop_h_spin), TRUE);
+  gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (stop_h_spin), GTK_UPDATE_IF_VALID);
+
+  label75 = gtk_label_new ("hours");
+  gtk_widget_set_name (label75, "label75");
+  gtk_widget_ref (label75);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label75", label75,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label75);
+  gtk_box_pack_start (GTK_BOX (hbox21), label75, FALSE, FALSE, 0);
+
+  hbox22 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_set_name (hbox22, "hbox22");
+  gtk_widget_ref (hbox22);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "hbox22", hbox22,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hbox22);
+  gtk_table_attach (GTK_TABLE (table3), hbox22, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
+
+  alarm_h_spin_adj = gtk_adjustment_new (6, 0, 23, 1, 10, 10);
+  alarm_h_spin = gtk_spin_button_new (GTK_ADJUSTMENT (alarm_h_spin_adj), 1, 0);
+  gtk_widget_set_name (alarm_h_spin, "alarm_h_spin");
+  gtk_widget_ref (alarm_h_spin);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "alarm_h_spin", alarm_h_spin,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (alarm_h_spin);
+  gtk_box_pack_start (GTK_BOX (hbox22), alarm_h_spin, FALSE, FALSE, 0);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (alarm_h_spin), TRUE);
+  gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (alarm_h_spin), GTK_UPDATE_IF_VALID);
+  gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (alarm_h_spin), TRUE);
+
+  label76 = gtk_label_new (":");
+  gtk_widget_set_name (label76, "label76");
+  gtk_widget_ref (label76);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label76", label76,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label76);
+  gtk_box_pack_start (GTK_BOX (hbox22), label76, FALSE, FALSE, 0);
+  gtk_misc_set_padding (GTK_MISC (label76), 5, 0);
+
+  hbox23 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_set_name (hbox23, "hbox23");
+  gtk_widget_ref (hbox23);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "hbox23", hbox23,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hbox23);
+  gtk_table_attach (GTK_TABLE (table3), hbox23, 2, 3, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (GTK_FILL), 0, 0);
+
+  alarm_m_spin_adj = gtk_adjustment_new (30, 0, 59, 1, 10, 10);
+  alarm_m_spin = gtk_spin_button_new (GTK_ADJUSTMENT (alarm_m_spin_adj), 1, 0);
+  gtk_widget_set_name (alarm_m_spin, "alarm_m_spin");
+  gtk_widget_ref (alarm_m_spin);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "alarm_m_spin", alarm_m_spin,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (alarm_m_spin);
+  gtk_box_pack_start (GTK_BOX (hbox23), alarm_m_spin, FALSE, TRUE, 0);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (alarm_m_spin), TRUE);
+  gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (alarm_m_spin), GTK_UPDATE_IF_VALID);
+  gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (alarm_m_spin), TRUE);
+
+  label77 = gtk_label_new ("h");
+  gtk_widget_set_name (label77, "label77");
+  gtk_widget_ref (label77);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label77", label77,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label77);
+  gtk_box_pack_start (GTK_BOX (hbox23), label77, FALSE, FALSE, 0);
+
+  hbox24 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_set_name (hbox24, "hbox24");
+  gtk_widget_ref (hbox24);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "hbox24", hbox24,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hbox24);
+  gtk_table_attach (GTK_TABLE (table3), hbox24, 2, 3, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (GTK_FILL), 0, 0);
+
+  stop_m_spin_adj = gtk_adjustment_new (0, 0, 59, 1, 10, 10);
+  stop_m_spin = gtk_spin_button_new (GTK_ADJUSTMENT (stop_m_spin_adj), 1, 0);
+  gtk_widget_set_name (stop_m_spin, "stop_m_spin");
+  gtk_widget_ref (stop_m_spin);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "stop_m_spin", stop_m_spin,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (stop_m_spin);
+  gtk_box_pack_start (GTK_BOX (hbox24), stop_m_spin, FALSE, FALSE, 0);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (stop_m_spin), TRUE);
+  gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (stop_m_spin), GTK_UPDATE_IF_VALID);
+  gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (stop_m_spin), TRUE);
+
+  label78 = gtk_label_new ("minutes");
+  gtk_widget_set_name (label78, "label78");
+  gtk_widget_ref (label78);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label78", label78,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label78);
+  gtk_box_pack_start (GTK_BOX (hbox24), label78, FALSE, FALSE, 0);
+
+  stop_checkb = gtk_check_button_new ();
+  gtk_widget_set_name (stop_checkb, "stop_checkb");
+  gtk_widget_ref (stop_checkb);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "stop_checkb", stop_checkb,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (stop_checkb);
+  gtk_table_attach (GTK_TABLE (table3), stop_checkb, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+
+  label79 = gtk_label_new ("Quiet after:");
+  gtk_widget_set_name (label79, "label79");
+  gtk_widget_ref (label79);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label79", label79,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label79);
+  gtk_container_add (GTK_CONTAINER (stop_checkb), label79);
+  gtk_label_set_justify (GTK_LABEL (label79), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label79), 0, 0.5);
+
+  label80 = gtk_label_new ("Alarm at (default):");
+  gtk_widget_set_name (label80, "label80");
+  gtk_widget_ref (label80);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label80", label80,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label80);
+  gtk_table_attach (GTK_TABLE (table3), label80, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_justify (GTK_LABEL (label80), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label80), 0, 0.5);
+
+  label71 = gtk_label_new ("Time");
+  gtk_widget_set_name (label71, "label71");
+  gtk_widget_ref (label71);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label71", label71,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label71);
+  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), label71);
+
+  frame15 = gtk_frame_new ("Choose the days for the alarm to come on");
+  gtk_widget_set_name (frame15, "frame15");
+  gtk_widget_ref (frame15);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "frame15", frame15,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (frame15);
+  gtk_container_add (GTK_CONTAINER (notebook1), frame15);
+  gtk_container_set_border_width (GTK_CONTAINER (frame15), 10);
+
+  table4 = gtk_table_new (8, 2, FALSE);
+  gtk_widget_set_name (table4, "table4");
+  gtk_widget_ref (table4);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "table4", table4,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (table4);
+  gtk_container_add (GTK_CONTAINER (frame15), table4);
+  gtk_container_set_border_width (GTK_CONTAINER (table4), 5);
+
+  hbox31 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_set_name (hbox31, "hbox31");
+  gtk_widget_ref (hbox31);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "hbox31", hbox31,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hbox31);
+  gtk_table_attach (GTK_TABLE (table4), hbox31, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
+
+  mon_def = gtk_check_button_new_with_label ("Default");
+  gtk_widget_set_name (mon_def, "mon_def");
+  gtk_widget_ref (mon_def);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "mon_def", mon_def,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (mon_def);
+  gtk_box_pack_start (GTK_BOX (hbox31), mon_def, FALSE, FALSE, 0);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (mon_def), TRUE);
+
+  mon_h_adj = gtk_adjustment_new (6, 0, 23, 1, 10, 10);
+  mon_h = gtk_spin_button_new (GTK_ADJUSTMENT (mon_h_adj), 1, 0);
+  gtk_widget_set_name (mon_h, "mon_h");
+  gtk_widget_ref (mon_h);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "mon_h", mon_h,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (mon_h);
+  gtk_box_pack_start (GTK_BOX (hbox31), mon_h, TRUE, TRUE, 0);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (mon_h), TRUE);
+
+  label89 = gtk_label_new (":");
+  gtk_widget_set_name (label89, "label89");
+  gtk_widget_ref (label89);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label89", label89,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label89);
+  gtk_box_pack_start (GTK_BOX (hbox31), label89, FALSE, FALSE, 0);
+
+  mon_m_adj = gtk_adjustment_new (30, 0, 59, 1, 10, 10);
+  mon_m = gtk_spin_button_new (GTK_ADJUSTMENT (mon_m_adj), 1, 0);
+  gtk_widget_set_name (mon_m, "mon_m");
+  gtk_widget_ref (mon_m);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "mon_m", mon_m,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (mon_m);
+  gtk_box_pack_start (GTK_BOX (hbox31), mon_m, TRUE, TRUE, 0);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (mon_m), TRUE);
+  gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (mon_m), TRUE);
+
+  hbox32 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_set_name (hbox32, "hbox32");
+  gtk_widget_ref (hbox32);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "hbox32", hbox32,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hbox32);
+  gtk_table_attach (GTK_TABLE (table4), hbox32, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
+
+  tue_def = gtk_check_button_new_with_label ("Default");
+  gtk_widget_set_name (tue_def, "tue_def");
+  gtk_widget_ref (tue_def);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "tue_def", tue_def,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (tue_def);
+  gtk_box_pack_start (GTK_BOX (hbox32), tue_def, FALSE, FALSE, 0);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tue_def), TRUE);
+
+  tue_h_adj = gtk_adjustment_new (6, 0, 23, 1, 10, 10);
+  tue_h = gtk_spin_button_new (GTK_ADJUSTMENT (tue_h_adj), 1, 0);
+  gtk_widget_set_name (tue_h, "tue_h");
+  gtk_widget_ref (tue_h);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "tue_h", tue_h,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (tue_h);
+  gtk_box_pack_start (GTK_BOX (hbox32), tue_h, TRUE, TRUE, 0);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (tue_h), TRUE);
+
+  label90 = gtk_label_new (":");
+  gtk_widget_set_name (label90, "label90");
+  gtk_widget_ref (label90);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label90", label90,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label90);
+  gtk_box_pack_start (GTK_BOX (hbox32), label90, FALSE, FALSE, 0);
+
+  tue_m_adj = gtk_adjustment_new (30, 0, 59, 1, 10, 10);
+  tue_m = gtk_spin_button_new (GTK_ADJUSTMENT (tue_m_adj), 1, 0);
+  gtk_widget_set_name (tue_m, "tue_m");
+  gtk_widget_ref (tue_m);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "tue_m", tue_m,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (tue_m);
+  gtk_box_pack_start (GTK_BOX (hbox32), tue_m, TRUE, TRUE, 0);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (tue_m), TRUE);
+  gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (tue_m), TRUE);
+
+  hbox33 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_set_name (hbox33, "hbox33");
+  gtk_widget_ref (hbox33);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "hbox33", hbox33,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hbox33);
+  gtk_table_attach (GTK_TABLE (table4), hbox33, 1, 2, 3, 4,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
+
+  wed_def = gtk_check_button_new_with_label ("Default");
+  gtk_widget_set_name (wed_def, "wed_def");
+  gtk_widget_ref (wed_def);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "wed_def", wed_def,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (wed_def);
+  gtk_box_pack_start (GTK_BOX (hbox33), wed_def, FALSE, FALSE, 0);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wed_def), TRUE);
+
+  wed_h_adj = gtk_adjustment_new (6, 0, 23, 1, 10, 10);
+  wed_h = gtk_spin_button_new (GTK_ADJUSTMENT (wed_h_adj), 1, 0);
+  gtk_widget_set_name (wed_h, "wed_h");
+  gtk_widget_ref (wed_h);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "wed_h", wed_h,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (wed_h);
+  gtk_box_pack_start (GTK_BOX (hbox33), wed_h, TRUE, TRUE, 0);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wed_h), TRUE);
+
+  label91 = gtk_label_new (":");
+  gtk_widget_set_name (label91, "label91");
+  gtk_widget_ref (label91);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label91", label91,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label91);
+  gtk_box_pack_start (GTK_BOX (hbox33), label91, FALSE, FALSE, 0);
+
+  wed_m_adj = gtk_adjustment_new (30, 0, 59, 1, 10, 10);
+  wed_m = gtk_spin_button_new (GTK_ADJUSTMENT (wed_m_adj), 1, 0);
+  gtk_widget_set_name (wed_m, "wed_m");
+  gtk_widget_ref (wed_m);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "wed_m", wed_m,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (wed_m);
+  gtk_box_pack_start (GTK_BOX (hbox33), wed_m, TRUE, TRUE, 0);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wed_m), TRUE);
+  gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (wed_m), TRUE);
+
+  hbox34 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_set_name (hbox34, "hbox34");
+  gtk_widget_ref (hbox34);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "hbox34", hbox34,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hbox34);
+  gtk_table_attach (GTK_TABLE (table4), hbox34, 1, 2, 4, 5,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
+
+  thu_def = gtk_check_button_new_with_label ("Default");
+  gtk_widget_set_name (thu_def, "thu_def");
+  gtk_widget_ref (thu_def);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "thu_def", thu_def,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (thu_def);
+  gtk_box_pack_start (GTK_BOX (hbox34), thu_def, FALSE, FALSE, 0);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (thu_def), TRUE);
+
+  thu_h_adj = gtk_adjustment_new (6, 0, 23, 1, 10, 10);
+  thu_h = gtk_spin_button_new (GTK_ADJUSTMENT (thu_h_adj), 1, 0);
+  gtk_widget_set_name (thu_h, "thu_h");
+  gtk_widget_ref (thu_h);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "thu_h", thu_h,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (thu_h);
+  gtk_box_pack_start (GTK_BOX (hbox34), thu_h, TRUE, TRUE, 0);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (thu_h), TRUE);
+
+  label92 = gtk_label_new (":");
+  gtk_widget_set_name (label92, "label92");
+  gtk_widget_ref (label92);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label92", label92,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label92);
+  gtk_box_pack_start (GTK_BOX (hbox34), label92, FALSE, FALSE, 0);
+
+  thu_m_adj = gtk_adjustment_new (30, 0, 59, 1, 10, 10);
+  thu_m = gtk_spin_button_new (GTK_ADJUSTMENT (thu_m_adj), 1, 0);
+  gtk_widget_set_name (thu_m, "thu_m");
+  gtk_widget_ref (thu_m);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "thu_m", thu_m,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (thu_m);
+  gtk_box_pack_start (GTK_BOX (hbox34), thu_m, TRUE, TRUE, 0);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (thu_m), TRUE);
+  gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (thu_m), TRUE);
+
+  hbox35 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_set_name (hbox35, "hbox35");
+  gtk_widget_ref (hbox35);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "hbox35", hbox35,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hbox35);
+  gtk_table_attach (GTK_TABLE (table4), hbox35, 1, 2, 5, 6,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
+
+  fri_def = gtk_check_button_new_with_label ("Default");
+  gtk_widget_set_name (fri_def, "fri_def");
+  gtk_widget_ref (fri_def);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "fri_def", fri_def,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (fri_def);
+  gtk_box_pack_start (GTK_BOX (hbox35), fri_def, FALSE, FALSE, 0);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fri_def), TRUE);
+
+  fri_h_adj = gtk_adjustment_new (6, 0, 23, 1, 10, 10);
+  fri_h = gtk_spin_button_new (GTK_ADJUSTMENT (fri_h_adj), 1, 0);
+  gtk_widget_set_name (fri_h, "fri_h");
+  gtk_widget_ref (fri_h);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "fri_h", fri_h,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (fri_h);
+  gtk_box_pack_start (GTK_BOX (hbox35), fri_h, TRUE, TRUE, 0);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (fri_h), TRUE);
+
+  label93 = gtk_label_new (":");
+  gtk_widget_set_name (label93, "label93");
+  gtk_widget_ref (label93);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label93", label93,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label93);
+  gtk_box_pack_start (GTK_BOX (hbox35), label93, FALSE, FALSE, 0);
+
+  fri_m_adj = gtk_adjustment_new (30, 0, 59, 1, 10, 10);
+  fri_m = gtk_spin_button_new (GTK_ADJUSTMENT (fri_m_adj), 1, 0);
+  gtk_widget_set_name (fri_m, "fri_m");
+  gtk_widget_ref (fri_m);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "fri_m", fri_m,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (fri_m);
+  gtk_box_pack_start (GTK_BOX (hbox35), fri_m, TRUE, TRUE, 0);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (fri_m), TRUE);
+  gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (fri_m), TRUE);
+
+  hbox36 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_set_name (hbox36, "hbox36");
+  gtk_widget_ref (hbox36);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "hbox36", hbox36,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hbox36);
+  gtk_table_attach (GTK_TABLE (table4), hbox36, 1, 2, 6, 7,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
+
+  sat_def = gtk_check_button_new_with_label ("Default");
+  gtk_widget_set_name (sat_def, "sat_def");
+  gtk_widget_ref (sat_def);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "sat_def", sat_def,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (sat_def);
+  gtk_box_pack_start (GTK_BOX (hbox36), sat_def, FALSE, FALSE, 0);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sat_def), TRUE);
+
+  sat_h_adj = gtk_adjustment_new (6, 0, 23, 1, 10, 10);
+  sat_h = gtk_spin_button_new (GTK_ADJUSTMENT (sat_h_adj), 1, 0);
+  gtk_widget_set_name (sat_h, "sat_h");
+  gtk_widget_ref (sat_h);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "sat_h", sat_h,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (sat_h);
+  gtk_box_pack_start (GTK_BOX (hbox36), sat_h, TRUE, TRUE, 0);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (sat_h), TRUE);
+
+  label94 = gtk_label_new (":");
+  gtk_widget_set_name (label94, "label94");
+  gtk_widget_ref (label94);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label94", label94,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label94);
+  gtk_box_pack_start (GTK_BOX (hbox36), label94, FALSE, FALSE, 0);
+
+  sat_m_adj = gtk_adjustment_new (30, 0, 59, 1, 10, 10);
+  sat_m = gtk_spin_button_new (GTK_ADJUSTMENT (sat_m_adj), 1, 0);
+  gtk_widget_set_name (sat_m, "sat_m");
+  gtk_widget_ref (sat_m);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "sat_m", sat_m,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (sat_m);
+  gtk_box_pack_start (GTK_BOX (hbox36), sat_m, TRUE, TRUE, 0);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (sat_m), TRUE);
+  gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (sat_m), TRUE);
+
+  hbox37 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_set_name (hbox37, "hbox37");
+  gtk_widget_ref (hbox37);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "hbox37", hbox37,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hbox37);
+  gtk_table_attach (GTK_TABLE (table4), hbox37, 1, 2, 7, 8,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
+
+  sun_def = gtk_check_button_new_with_label ("Default");
+  gtk_widget_set_name (sun_def, "sun_def");
+  gtk_widget_ref (sun_def);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "sun_def", sun_def,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (sun_def);
+  gtk_box_pack_start (GTK_BOX (hbox37), sun_def, FALSE, FALSE, 0);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sun_def), TRUE);
+
+  sun_h_adj = gtk_adjustment_new (6, 0, 23, 1, 10, 10);
+  sun_h = gtk_spin_button_new (GTK_ADJUSTMENT (sun_h_adj), 1, 0);
+  gtk_widget_set_name (sun_h, "sun_h");
+  gtk_widget_ref (sun_h);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "sun_h", sun_h,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (sun_h);
+  gtk_box_pack_start (GTK_BOX (hbox37), sun_h, TRUE, TRUE, 0);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (sun_h), TRUE);
+
+  label95 = gtk_label_new (":");
+  gtk_widget_set_name (label95, "label95");
+  gtk_widget_ref (label95);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label95", label95,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label95);
+  gtk_box_pack_start (GTK_BOX (hbox37), label95, FALSE, FALSE, 0);
+
+  sun_m_adj = gtk_adjustment_new (30, 0, 59, 1, 10, 10);
+  sun_m = gtk_spin_button_new (GTK_ADJUSTMENT (sun_m_adj), 1, 0);
+  gtk_widget_set_name (sun_m, "sun_m");
+  gtk_widget_ref (sun_m);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "sun_m", sun_m,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (sun_m);
+  gtk_box_pack_start (GTK_BOX (hbox37), sun_m, TRUE, TRUE, 0);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (sun_m), TRUE);
+  gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (sun_m), TRUE);
+
+  label87 = gtk_label_new ("Day");
+  gtk_widget_set_name (label87, "label87");
+  gtk_widget_ref (label87);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label87", label87,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label87);
+  gtk_table_attach (GTK_TABLE (table4), label87, 0, 1, 0, 1,
+                    (GtkAttachOptions) (0),
+                    (GtkAttachOptions) (0), 0, 0);
+
+  label88 = gtk_label_new ("Time");
+  gtk_widget_set_name (label88, "label88");
+  gtk_widget_ref (label88);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label88", label88,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label88);
+  gtk_table_attach (GTK_TABLE (table4), label88, 1, 2, 0, 1,
+                    (GtkAttachOptions) (0),
+                    (GtkAttachOptions) (0), 0, 0);
+
+  tue_cb = gtk_check_button_new_with_label ("Tuesday");
+  gtk_widget_set_name (tue_cb, "tue_cb");
+  gtk_widget_ref (tue_cb);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "tue_cb", tue_cb,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (tue_cb);
+  gtk_table_attach (GTK_TABLE (table4), tue_cb, 0, 1, 2, 3,
+                    (GtkAttachOptions) (0),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (tue_cb), TRUE);
+
+  wed_cb = gtk_check_button_new_with_label ("Wednesday");
+  gtk_widget_set_name (wed_cb, "wed_cb");
+  gtk_widget_ref (wed_cb);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "wed_cb", wed_cb,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (wed_cb);
+  gtk_table_attach (GTK_TABLE (table4), wed_cb, 0, 1, 3, 4,
+                    (GtkAttachOptions) (0),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wed_cb), TRUE);
+
+  thu_cb = gtk_check_button_new_with_label ("Thursday");
+  gtk_widget_set_name (thu_cb, "thu_cb");
+  gtk_widget_ref (thu_cb);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "thu_cb", thu_cb,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (thu_cb);
+  gtk_table_attach (GTK_TABLE (table4), thu_cb, 0, 1, 4, 5,
+                    (GtkAttachOptions) (0),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (thu_cb), TRUE);
+
+  fri_cb = gtk_check_button_new_with_label ("Friday");
+  gtk_widget_set_name (fri_cb, "fri_cb");
+  gtk_widget_ref (fri_cb);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "fri_cb", fri_cb,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (fri_cb);
+  gtk_table_attach (GTK_TABLE (table4), fri_cb, 0, 1, 5, 6,
+                    (GtkAttachOptions) (0),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (fri_cb), TRUE);
+
+  sat_cb = gtk_check_button_new_with_label ("Saturday");
+  gtk_widget_set_name (sat_cb, "sat_cb");
+  gtk_widget_ref (sat_cb);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "sat_cb", sat_cb,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (sat_cb);
+  gtk_table_attach (GTK_TABLE (table4), sat_cb, 0, 1, 6, 7,
+                    (GtkAttachOptions) (0),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (sat_cb), TRUE);
+
+  sun_cb = gtk_check_button_new_with_label ("Sunday");
+  gtk_widget_set_name (sun_cb, "sun_cb");
+  gtk_widget_ref (sun_cb);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "sun_cb", sun_cb,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (sun_cb);
+  gtk_table_attach (GTK_TABLE (table4), sun_cb, 0, 1, 7, 8,
+                    (GtkAttachOptions) (0),
+                    (GtkAttachOptions) (0), 0, 0);
+
+  mon_cb = gtk_check_button_new_with_label ("Monday");
+  gtk_widget_set_name (mon_cb, "mon_cb");
+  gtk_widget_ref (mon_cb);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "mon_cb", mon_cb,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (mon_cb);
+  gtk_table_attach (GTK_TABLE (table4), mon_cb, 0, 1, 1, 2,
+                    (GtkAttachOptions) (0),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (mon_cb), TRUE);
+
+  label72 = gtk_label_new ("Days");
+  gtk_widget_set_name (label72, "label72");
+  gtk_widget_ref (label72);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label72", label72,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label72);
+  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 1), label72);
+
+  vbox8 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_set_name (vbox8, "vbox8");
+  gtk_widget_ref (vbox8);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "vbox8", vbox8,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (vbox8);
+  gtk_container_add (GTK_CONTAINER (notebook1), vbox8);
+
+  frame11 = gtk_frame_new ("Fading");
+  gtk_widget_set_name (frame11, "frame11");
+  gtk_widget_ref (frame11);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "frame11", frame11,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (frame11);
+  gtk_box_pack_start (GTK_BOX (vbox8), frame11, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame11), 10);
+
+  alignment10 = gtk_alignment_new (0, 0.5, 0.1, 1);
+  gtk_widget_set_name (alignment10, "alignment10");
+  gtk_widget_ref (alignment10);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "alignment10", alignment10,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (alignment10);
+  gtk_container_add (GTK_CONTAINER (frame11), alignment10);
+  gtk_container_set_border_width (GTK_CONTAINER (alignment10), 8);
+
+  hbox25 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_set_name (hbox25, "hbox25");
+  gtk_widget_ref (hbox25);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "hbox25", hbox25,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hbox25);
+  gtk_container_add (GTK_CONTAINER (alignment10), hbox25);
+
+  fading_spin_adj = gtk_adjustment_new (120, 0, 3600, 1, 10, 10);
+  fading_spin = gtk_spin_button_new (GTK_ADJUSTMENT (fading_spin_adj), 1, 0);
+  gtk_widget_set_name (fading_spin, "fading_spin");
+  gtk_widget_ref (fading_spin);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "fading_spin", fading_spin,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (fading_spin);
+  gtk_box_pack_start (GTK_BOX (hbox25), fading_spin, TRUE, TRUE, 0);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (fading_spin), TRUE);
+  gtk_spin_button_set_update_policy (GTK_SPIN_BUTTON (fading_spin), GTK_UPDATE_IF_VALID);
+
+  label81 = gtk_label_new ("seconds");
+  gtk_widget_set_name (label81, "label81");
+  gtk_widget_ref (label81);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label81", label81,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label81);
+  gtk_box_pack_start (GTK_BOX (hbox25), label81, FALSE, TRUE, 0);
+
+  frame12 = gtk_frame_new ("Volume");
+  gtk_widget_set_name (frame12, "frame12");
+  gtk_widget_ref (frame12);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "frame12", frame12,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (frame12);
+  gtk_box_pack_start (GTK_BOX (vbox8), frame12, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame12), 10);
+
+  vbox9 = gtk_vbox_new (FALSE, 10);
+  gtk_widget_set_name (vbox9, "vbox9");
+  gtk_widget_ref (vbox9);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "vbox9", vbox9,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (vbox9);
+  gtk_container_add (GTK_CONTAINER (frame12), vbox9);
+  gtk_container_set_border_width (GTK_CONTAINER (vbox9), 8);
+
+  alignment11 = gtk_alignment_new (1, 0.5, 0.1, 1);
+  gtk_widget_set_name (alignment11, "alignment11");
+  gtk_widget_ref (alignment11);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "alignment11", alignment11,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (alignment11);
+  gtk_box_pack_end (GTK_BOX (vbox9), alignment11, FALSE, FALSE, 0);
+
+  current_button = gtk_button_new_with_label ("Current");
+  gtk_widget_set_name (current_button, "current_button");
+  gtk_widget_ref (current_button);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "current_button", current_button,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (current_button);
+  gtk_container_add (GTK_CONTAINER (alignment11), current_button);
+  gtk_tooltips_set_tip (tooltips, current_button, "reset to current output volume", NULL);
+
+  label82 = gtk_label_new ("Start at");
+  gtk_widget_set_name (label82, "label82");
+  gtk_widget_ref (label82);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label82", label82,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label82);
+  gtk_box_pack_start (GTK_BOX (vbox9), label82, FALSE, FALSE, 0);
+  gtk_label_set_justify (GTK_LABEL (label82), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label82), 7.45058e-09, 0.5);
+
+  hbox26 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_set_name (hbox26, "hbox26");
+  gtk_widget_ref (hbox26);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "hbox26", hbox26,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hbox26);
+  gtk_box_pack_start (GTK_BOX (vbox9), hbox26, TRUE, TRUE, 0);
+
+  quiet_vol_scale = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (20, 0, 100, 1, 5, 0)));
+  gtk_widget_set_name (quiet_vol_scale, "quiet_vol_scale");
+  gtk_widget_ref (quiet_vol_scale);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "quiet_vol_scale", quiet_vol_scale,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (quiet_vol_scale);
+  gtk_box_pack_start (GTK_BOX (hbox26), quiet_vol_scale, TRUE, TRUE, 0);
+  gtk_scale_set_value_pos (GTK_SCALE (quiet_vol_scale), GTK_POS_RIGHT);
+  gtk_scale_set_digits (GTK_SCALE (quiet_vol_scale), 0);
+
+  label83 = gtk_label_new ("%");
+  gtk_widget_set_name (label83, "label83");
+  gtk_widget_ref (label83);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label83", label83,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label83);
+  gtk_box_pack_start (GTK_BOX (hbox26), label83, FALSE, FALSE, 0);
+
+  hseparator2 = gtk_hseparator_new ();
+  gtk_widget_set_name (hseparator2, "hseparator2");
+  gtk_widget_ref (hseparator2);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "hseparator2", hseparator2,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hseparator2);
+  gtk_box_pack_start (GTK_BOX (vbox9), hseparator2, TRUE, TRUE, 0);
+
+  label84 = gtk_label_new ("Final");
+  gtk_widget_set_name (label84, "label84");
+  gtk_widget_ref (label84);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label84", label84,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label84);
+  gtk_box_pack_start (GTK_BOX (vbox9), label84, FALSE, FALSE, 0);
+  gtk_label_set_justify (GTK_LABEL (label84), GTK_JUSTIFY_LEFT);
+  gtk_misc_set_alignment (GTK_MISC (label84), 0, 0.5);
+
+  hbox27 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_set_name (hbox27, "hbox27");
+  gtk_widget_ref (hbox27);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "hbox27", hbox27,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hbox27);
+  gtk_box_pack_start (GTK_BOX (vbox9), hbox27, TRUE, TRUE, 0);
+
+  vol_scale = gtk_hscale_new (GTK_ADJUSTMENT (gtk_adjustment_new (80, 0, 100, 1, 5, 0)));
+  gtk_widget_set_name (vol_scale, "vol_scale");
+  gtk_widget_ref (vol_scale);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "vol_scale", vol_scale,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (vol_scale);
+  gtk_box_pack_start (GTK_BOX (hbox27), vol_scale, TRUE, TRUE, 0);
+  gtk_scale_set_value_pos (GTK_SCALE (vol_scale), GTK_POS_RIGHT);
+  gtk_scale_set_digits (GTK_SCALE (vol_scale), 0);
+
+  label85 = gtk_label_new ("%");
+  gtk_widget_set_name (label85, "label85");
+  gtk_widget_ref (label85);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label85", label85,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label85);
+  gtk_box_pack_start (GTK_BOX (hbox27), label85, FALSE, TRUE, 0);
+  gtk_label_set_justify (GTK_LABEL (label85), GTK_JUSTIFY_FILL);
+
+  label73 = gtk_label_new ("Volume");
+  gtk_widget_set_name (label73, "label73");
+  gtk_widget_ref (label73);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label73", label73,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label73);
+  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 2), label73);
+
+  vbox10 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_set_name (vbox10, "vbox10");
+  gtk_widget_ref (vbox10);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "vbox10", vbox10,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (vbox10);
+  gtk_container_add (GTK_CONTAINER (notebook1), vbox10);
+
+  frame13 = gtk_frame_new ("Additional Command");
+  gtk_widget_set_name (frame13, "frame13");
+  gtk_widget_ref (frame13);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "frame13", frame13,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (frame13);
+  gtk_box_pack_start (GTK_BOX (vbox10), frame13, FALSE, FALSE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame13), 10);
+
+  hbox28 = gtk_hbox_new (FALSE, 5);
+  gtk_widget_set_name (hbox28, "hbox28");
+  gtk_widget_ref (hbox28);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "hbox28", hbox28,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hbox28);
+  gtk_container_add (GTK_CONTAINER (frame13), hbox28);
+  gtk_container_set_border_width (GTK_CONTAINER (hbox28), 8);
+
+  cmd_entry = gtk_entry_new ();
+  gtk_widget_set_name (cmd_entry, "cmd_entry");
+  gtk_widget_ref (cmd_entry);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "cmd_entry", cmd_entry,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (cmd_entry);
+  gtk_box_pack_start (GTK_BOX (hbox28), cmd_entry, TRUE, TRUE, 0);
+
+  cmd_checkb = gtk_check_button_new_with_label ("enable");
+  gtk_widget_set_name (cmd_checkb, "cmd_checkb");
+  gtk_widget_ref (cmd_checkb);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "cmd_checkb", cmd_checkb,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (cmd_checkb);
+  gtk_box_pack_start (GTK_BOX (hbox28), cmd_checkb, FALSE, FALSE, 0);
+
+  frame14 = gtk_frame_new ("Playlist (optional)");
+  gtk_widget_set_name (frame14, "frame14");
+  gtk_widget_ref (frame14);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "frame14", frame14,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (frame14);
+  gtk_box_pack_start (GTK_BOX (vbox10), frame14, FALSE, FALSE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame14), 10);
+
+  hbox29 = gtk_hbox_new (FALSE, 5);
+  gtk_widget_set_name (hbox29, "hbox29");
+  gtk_widget_ref (hbox29);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "hbox29", hbox29,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hbox29);
+  gtk_container_add (GTK_CONTAINER (frame14), hbox29);
+  gtk_container_set_border_width (GTK_CONTAINER (hbox29), 8);
+
+  playlist = gtk_entry_new ();
+  gtk_widget_set_name (playlist, "playlist");
+  gtk_widget_ref (playlist);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "playlist", playlist,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (playlist);
+  gtk_box_pack_start (GTK_BOX (hbox29), playlist, TRUE, TRUE, 0);
+
+  playlist_browse_button = gtk_button_new_with_label ("Browse...");
+  gtk_widget_set_name (playlist_browse_button, "playlist_browse_button");
+  gtk_widget_ref (playlist_browse_button);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "playlist_browse_button", playlist_browse_button,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (playlist_browse_button);
+  gtk_box_pack_start (GTK_BOX (hbox29), playlist_browse_button, FALSE, FALSE, 0);
+
+  frame18 = gtk_frame_new ("Reminder");
+  gtk_widget_set_name (frame18, "frame18");
+  gtk_widget_ref (frame18);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "frame18", frame18,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (frame18);
+  gtk_box_pack_start (GTK_BOX (vbox10), frame18, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame18), 10);
+
+  hbox38 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_set_name (hbox38, "hbox38");
+  gtk_widget_ref (hbox38);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "hbox38", hbox38,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hbox38);
+  gtk_container_add (GTK_CONTAINER (frame18), hbox38);
+
+  reminder_cb = gtk_check_button_new_with_label ("Use reminder");
+  gtk_widget_set_name (reminder_cb, "reminder_cb");
+  gtk_widget_ref (reminder_cb);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "reminder_cb", reminder_cb,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (reminder_cb);
+  gtk_box_pack_start (GTK_BOX (hbox38), reminder_cb, FALSE, FALSE, 0);
+
+  reminder_text = gtk_entry_new ();
+  gtk_widget_set_name (reminder_text, "reminder_text");
+  gtk_widget_ref (reminder_text);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "reminder_text", reminder_text,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (reminder_text);
+  gtk_box_pack_start (GTK_BOX (hbox38), reminder_text, TRUE, TRUE, 5);
+
+  label74 = gtk_label_new ("Options");
+  gtk_widget_set_name (label74, "label74");
+  gtk_widget_ref (label74);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label74", label74,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label74);
+  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 3), label74);
+
+  frame16 = gtk_frame_new ("What do these options mean?");
+  gtk_widget_set_name (frame16, "frame16");
+  gtk_widget_ref (frame16);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "frame16", frame16,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (frame16);
+  gtk_container_add (GTK_CONTAINER (notebook1), frame16);
+  gtk_container_set_border_width (GTK_CONTAINER (frame16), 10);
+
+  scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
+  gtk_widget_set_name (scrolledwindow1, "scrolledwindow1");
+  gtk_widget_ref (scrolledwindow1);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "scrolledwindow1", scrolledwindow1,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (scrolledwindow1);
+  gtk_container_add (GTK_CONTAINER (frame16), scrolledwindow1);
+  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
+
+  text1 = gtk_text_new (NULL, NULL);
+  gtk_widget_set_name (text1, "text1");
+  gtk_widget_ref (text1);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "text1", text1,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (text1);
+  gtk_container_add (GTK_CONTAINER (scrolledwindow1), text1);
+  gtk_text_insert (GTK_TEXT (text1), NULL, NULL, NULL,
+                   "Time\n  Alarm at: \n    The time for the alarm to come on.\n\n  Quiet After: \n    Stop alarm after this amount of time.\n       (if the wakeup dialog is not closed)\n\n\nDays\n  Day:\n    Select the days for the alarm to activate.\n\n  Time:\n    Choose the time for the alarm on each day,\n    or select the toggle button to use the default\n    time.\n\n\nVolume\n  Fading: \n    Fade the volume up to the chosen volume \n    for this amount of time.\n\n  Start at: \n    Start fading from this volume.\n\n  Final: \n    The volume to stop fading at.  If the fading\n    time is 0 then set volume to this and start\n    playing.\n\n\nOptions:\n  Additional Command:\n    Run this command at the alarm time.\n\n  Playlist: \n    Load this playlist for playing songs from \n    (must have .m3u extension).  If no playlist\n    is given then the songs which are currently\n    in the list will be used.\n    The URL of an mp3/ogg stream can also be\n    entered here, but loading of playlists from\n    URLs is not currently supported by xmms.\n\n  Reminder:\n    Display a reminder when the alarm goes off,\n    type the reminder in the box and turn on the\n    toggle button if you want it to be shown.", 1143);
+
+  label86 = gtk_label_new ("Help");
+  gtk_widget_set_name (label86, "label86");
+  gtk_widget_ref (label86);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "label86", label86,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (label86);
+  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 4), label86);
+
+  dialog_action_area5 = GTK_DIALOG (config_dialog)->action_area;
+  gtk_widget_set_name (dialog_action_area5, "dialog_action_area5");
+  gtk_object_set_data (GTK_OBJECT (config_dialog), "dialog_action_area5", dialog_action_area5);
+  gtk_widget_show (dialog_action_area5);
+  gtk_container_set_border_width (GTK_CONTAINER (dialog_action_area5), 10);
+
+  hbox20 = gtk_hbox_new (TRUE, 5);
+  gtk_widget_set_name (hbox20, "hbox20");
+  gtk_widget_ref (hbox20);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "hbox20", hbox20,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (hbox20);
+  gtk_box_pack_start (GTK_BOX (dialog_action_area5), hbox20, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (hbox20), 10);
+
+  ok_button = gtk_button_new_with_label ("OK");
+  gtk_widget_set_name (ok_button, "ok_button");
+  gtk_widget_ref (ok_button);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "ok_button", ok_button,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (ok_button);
+  gtk_box_pack_start (GTK_BOX (hbox20), ok_button, FALSE, TRUE, 0);
+  GTK_WIDGET_SET_FLAGS (ok_button, GTK_CAN_DEFAULT);
+
+  cancel_button = gtk_button_new_with_label ("Cancel");
+  gtk_widget_set_name (cancel_button, "cancel_button");
+  gtk_widget_ref (cancel_button);
+  gtk_object_set_data_full (GTK_OBJECT (config_dialog), "cancel_button", cancel_button,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (cancel_button);
+  gtk_box_pack_start (GTK_BOX (hbox20), cancel_button, FALSE, TRUE, 0);
+  GTK_WIDGET_SET_FLAGS (cancel_button, GTK_CAN_DEFAULT);
+
+  gtk_signal_connect (GTK_OBJECT (mon_def), "toggled",
+                      GTK_SIGNAL_FUNC (on_mon_def_toggled),
+                      NULL);
+  gtk_signal_connect (GTK_OBJECT (tue_def), "toggled",
+                      GTK_SIGNAL_FUNC (on_tue_def_toggled),
+                      NULL);
+  gtk_signal_connect (GTK_OBJECT (wed_def), "toggled",
+                      GTK_SIGNAL_FUNC (on_wed_def_toggled),
+                      NULL);
+  gtk_signal_connect (GTK_OBJECT (thu_def), "toggled",
+                      GTK_SIGNAL_FUNC (on_thu_def_toggled),
+                      NULL);
+  gtk_signal_connect (GTK_OBJECT (fri_def), "toggled",
+                      GTK_SIGNAL_FUNC (on_fri_def_toggled),
+                      NULL);
+  gtk_signal_connect (GTK_OBJECT (sat_def), "toggled",
+                      GTK_SIGNAL_FUNC (on_sat_def_toggled),
+                      NULL);
+  gtk_signal_connect (GTK_OBJECT (sun_def), "toggled",
+                      GTK_SIGNAL_FUNC (on_sun_def_toggled),
+                      NULL);
+  gtk_signal_connect (GTK_OBJECT (current_button), "clicked",
+                      GTK_SIGNAL_FUNC (alarm_current_volume),
+                      NULL);
+  gtk_signal_connect (GTK_OBJECT (ok_button), "clicked",
+                      GTK_SIGNAL_FUNC (alarm_save),
+                      NULL);
+  gtk_signal_connect_object (GTK_OBJECT (ok_button), "clicked",
+                             GTK_SIGNAL_FUNC (gtk_widget_destroy),
+                             GTK_OBJECT (config_dialog));
+  gtk_signal_connect_object (GTK_OBJECT (cancel_button), "clicked",
+                             GTK_SIGNAL_FUNC (gtk_widget_destroy),
+                             GTK_OBJECT (config_dialog));
+
+  gtk_widget_grab_default (ok_button);
+  gtk_object_set_data (GTK_OBJECT (config_dialog), "tooltips", tooltips);
+
+  return config_dialog;
+}
+
+GtkWidget*
+create_reminder_dialog (gchar *reminder_msg)
+{
+  GtkWidget *reminder_dialog;
+  GtkWidget *dialog_vbox6;
+  GtkWidget *frame19;
+  GtkWidget *reminder_entry;
+  GtkWidget *dialog_action_area6;
+  GtkWidget *button11;
+
+  reminder_dialog = gtk_dialog_new ();
+  gtk_widget_set_name (reminder_dialog, "reminder_dialog");
+  gtk_object_set_data (GTK_OBJECT (reminder_dialog), "reminder_dialog", reminder_dialog);
+  gtk_window_set_title (GTK_WINDOW (reminder_dialog), "Reminder");
+  gtk_window_set_policy (GTK_WINDOW (reminder_dialog), TRUE, TRUE, FALSE);
+
+  dialog_vbox6 = GTK_DIALOG (reminder_dialog)->vbox;
+  gtk_widget_set_name (dialog_vbox6, "dialog_vbox6");
+  gtk_object_set_data (GTK_OBJECT (reminder_dialog), "dialog_vbox6", dialog_vbox6);
+  gtk_widget_show (dialog_vbox6);
+
+  frame19 = gtk_frame_new ("Your reminder for today is..");
+  gtk_widget_set_name (frame19, "frame19");
+  gtk_widget_ref (frame19);
+  gtk_object_set_data_full (GTK_OBJECT (reminder_dialog), "frame19", frame19,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (frame19);
+  gtk_box_pack_start (GTK_BOX (dialog_vbox6), frame19, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame19), 10);
+
+  reminder_entry = gtk_entry_new ();
+  gtk_widget_set_name (reminder_entry, "reminder_entry");
+  gtk_widget_ref (reminder_entry);
+  gtk_object_set_data_full (GTK_OBJECT (reminder_dialog), "reminder_entry", reminder_entry,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (reminder_entry);
+  gtk_container_add (GTK_CONTAINER (frame19), reminder_entry);
+  gtk_entry_set_editable (GTK_ENTRY (reminder_entry), FALSE);
+  gtk_entry_set_text (GTK_ENTRY (reminder_entry), reminder_msg);
+
+  dialog_action_area6 = GTK_DIALOG (reminder_dialog)->action_area;
+  gtk_widget_set_name (dialog_action_area6, "dialog_action_area6");
+  gtk_object_set_data (GTK_OBJECT (reminder_dialog), "dialog_action_area6", dialog_action_area6);
+  gtk_widget_show (dialog_action_area6);
+  gtk_container_set_border_width (GTK_CONTAINER (dialog_action_area6), 10);
+
+  button11 = gtk_button_new_with_label ("Thankyou");
+  gtk_widget_set_name (button11, "button11");
+  gtk_widget_ref (button11);
+  gtk_object_set_data_full (GTK_OBJECT (reminder_dialog), "button11", button11,
+                            (GtkDestroyNotify) gtk_widget_unref);
+  gtk_widget_show (button11);
+  gtk_box_pack_start (GTK_BOX (dialog_action_area6), button11, FALSE, FALSE, 0);
+
+  gtk_signal_connect_object (GTK_OBJECT (button11), "clicked",
+                      GTK_SIGNAL_FUNC (gtk_widget_destroy),
+                      GTK_OBJECT(reminder_dialog));
+
+  return reminder_dialog;
+}
+
+/*
+ * vi:ai:expandtab:ts=2 sts=2 shiftwidth=2:nowrap:
+ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alarm/interface.h	Thu Oct 26 00:10:28 2006 -0700
@@ -0,0 +1,12 @@
+/*
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
+ */
+
+GtkWidget* create_about_dialog (void);
+GtkWidget* create_alarm_dialog (void);
+GtkWidget* create_playlist_fileselection (void);
+GtkWidget* create_warning_dialog (void);
+GtkWidget* create_config_dialog (void);
+/*
+ * vi:ai:expandtab:ts=2 sts=2 shiftwidth=2:nowrap:
+ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/alarm/support.h	Thu Oct 26 00:10:28 2006 -0700
@@ -0,0 +1,7 @@
+/*
+ * needed for glade
+ */
+
+/*
+ * vi:ai:expandtab:ts=2 sts=2 shiftwidth=2:nowrap:
+ */