1 /*
2  * alarm-settings.h -- Alarm settings dialog
3  *
4  * Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19  *
20  * Authors:
21  * 		Johannes H. Jensen <joh@pseudoberries.com>
22  */
23 
24 #ifndef EDITALARM_H_
25 #define EDITALARM_H_
26 
27 #include "alarm.h"
28 #include "player.h"
29 
30 typedef struct _AlarmSettingsDialog AlarmSettingsDialog;
31 
32 #include "alarm-applet.h"
33 
34 struct _AlarmSettingsDialog {
35 
36 	AlarmApplet *applet;
37 	Alarm *alarm;
38 
39 	/* Media player for previews */
40 	MediaPlayer *player;
41 
42 	GtkWidget *dialog;
43 	GtkWidget *clock_toggle, *timer_toggle;
44 	GtkWidget *label_entry;
45 	GtkWidget *hour_spin, *min_spin, *sec_spin;
46 
47 	/* Repeat */
48 	GtkWidget *repeat_expand;
49 	GtkWidget *repeat_label;
50 	GtkWidget *repeat_check[7];		/* Mon, tue, ..., sun check boxes */
51 
52 	/* Notification */
53 	GtkWidget *notify_sound_radio;
54 	GtkWidget *notify_sound_box;
55 	GtkWidget *notify_sound_stock;
56 	GtkWidget *notify_sound_combo;
57 	GtkWidget *notify_sound_loop_check;
58 	GtkWidget *notify_sound_preview;
59 
60 	GtkWidget *notify_app_radio;
61 	GtkWidget *notify_app_box;
62 	GtkWidget *notify_app_combo;
63 	GtkWidget *notify_app_command_box;
64 	GtkWidget *notify_app_command_entry;
65 
66 };
67 
68 AlarmSettingsDialog *
69 alarm_settings_dialog_new (AlarmApplet *applet);
70 
71 void
72 alarm_settings_dialog_show (AlarmSettingsDialog *dialog, Alarm *alarm);
73 
74 void
75 display_edit_alarm_dialog (AlarmApplet *applet, Alarm *alarm);
76 
77 void
78 alarm_settings_dialog_close (AlarmSettingsDialog *dialog);
79 
80 gboolean
81 alarm_settings_output_time (GtkSpinButton *spin, gpointer data);
82 
83 void
84 alarm_settings_sound_preview (GtkButton *button, gpointer data);
85 
86 void
87 alarm_settings_dialog_response (GtkDialog *dialog, gint rid, gpointer data);
88 
89 #endif /*EDITALARM_H_*/
90