2
* alarms-list.h -- Alarm list window
4
* Copyright (C) 2007-2008 Johannes H. Jensen <joh@pseudoberries.com>
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.
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.
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.
21
* Johannes H. Jensen <joh@pseudoberries.com>
24
#ifndef ALARM_LIST_WINDOW_H_
25
#define ALARM_LIST_WINDOW_H_
29
typedef struct _AlarmListWindow AlarmListWindow;
31
#include "alarm-applet.h"
46
SORTID_TIME_REMAINING = 0,
49
struct _AlarmListWindow {
52
Alarm *selected_alarm;
53
gboolean reordered; // Indicates that rows have just been reordered
54
gboolean toggled; // Indicates that an alarm has just been toggled
58
GtkTreeView *tree_view;
60
GtkWidget *new_button;
61
GtkWidget *edit_button;
62
GtkWidget *delete_button;
63
GtkWidget *enable_button;
64
GtkWidget *stop_button;
65
GtkWidget *snooze_button;
66
GtkWidget *snooze_menu;
68
GtkAccelGroup *accel_group;
71
//#define TIME_COL_FORMAT "<span font='Bold 11'>%H:%M:%S</span>"
72
// TODO: Does fixing the font size give a11y problems?
73
#define TIME_COL_CLOCK_FORMAT "<span font='Bold 11'> %H:%M</span><span font='Bold 7'>:%S</span>"
74
#define TIME_COL_TIMER_FORMAT "<span font='Bold 11'>-%H:%M</span><span font='Bold 7'>:%S</span>"
75
#define TIME_COL_REPEAT_FORMAT "\n <sup>%s</sup>"
76
#define LABEL_COL_FORMAT "%s"
77
#define LABEL_COL_TRIGGERED_FORMAT "<b>%s</b>"
79
#define CLOCK_FORMAT "%H:%M"
80
#define TIMER_FORMAT "-%H:%M"
82
#define DELETE_DIALOG_TITLE _("Delete %s?")
83
#define DELETE_DIALOG_TEXT _("<big>Delete %s <b>%s</b>?</big>")
84
#define DELETE_DIALOG_SECONDARY _("Are you sure you want to delete the %s labeled <b>%s</b> scheduled at <b>%s</b>? This action cannot be undone.")
87
alarm_list_window_new (AlarmApplet *applet);
90
alarm_list_window_show (AlarmListWindow *list_window);
93
alarm_list_window_hide (AlarmListWindow *list_window);
96
alarm_list_window_toggle (AlarmListWindow *list_window);
99
alarm_list_window_alarm_add (AlarmListWindow *list_window, Alarm *alarm);
102
alarm_list_window_alarm_update (AlarmListWindow *list_window, Alarm *alarm);
105
alarm_list_window_alarm_remove (AlarmListWindow *list_window, Alarm *alarm);
108
alarm_list_window_alarms_add (AlarmListWindow *list_window, GList *alarms);
111
alarm_list_window_find_alarm (GtkTreeModel *model, Alarm *alarm, GtkTreeIter *iter);
114
alarm_list_window_contains (AlarmListWindow *list_window, Alarm *alarm);
117
alarm_list_window_get_selected_alarm (AlarmListWindow *list_window);
119
#endif /*ALARM_LIST_WINDOW_H_*/