diff options
author | Chenthill Palanisamy <pchen@src.gnome.org> | 2006-01-13 19:02:32 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchen@src.gnome.org> | 2006-01-13 19:02:32 +0800 |
commit | 8a35fece1b96e7b3d3938a2e9bfe7467908fbf42 (patch) | |
tree | 92e81e3699e6cc2f20af543e02fc966a449ae32a /calendar/gui/dialogs | |
parent | f4f4f94e728d3973f7d780ca9390795c31e07578 (diff) | |
download | gsoc2013-evolution-8a35fece1b96e7b3d3938a2e9bfe7467908fbf42.tar gsoc2013-evolution-8a35fece1b96e7b3d3938a2e9bfe7467908fbf42.tar.gz gsoc2013-evolution-8a35fece1b96e7b3d3938a2e9bfe7467908fbf42.tar.bz2 gsoc2013-evolution-8a35fece1b96e7b3d3938a2e9bfe7467908fbf42.tar.lz gsoc2013-evolution-8a35fece1b96e7b3d3938a2e9bfe7467908fbf42.tar.xz gsoc2013-evolution-8a35fece1b96e7b3d3938a2e9bfe7467908fbf42.tar.zst gsoc2013-evolution-8a35fece1b96e7b3d3938a2e9bfe7467908fbf42.zip |
fixes #213660
svn path=/trunk/; revision=31167
Diffstat (limited to 'calendar/gui/dialogs')
-rw-r--r-- | calendar/gui/dialogs/alarm-dialog.c | 16 | ||||
-rw-r--r-- | calendar/gui/dialogs/alarm-dialog.glade | 2 |
2 files changed, 16 insertions, 2 deletions
diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c index e730b00065..e030d007f4 100644 --- a/calendar/gui/dialogs/alarm-dialog.c +++ b/calendar/gui/dialogs/alarm-dialog.c @@ -97,6 +97,7 @@ typedef struct { GtkWidget *aalarm_group; GtkWidget *aalarm_sound; GtkWidget *aalarm_attach; + GtkWidget *aalarm_file_entry; /* Mail alarm widgets */ const char *email; @@ -554,6 +555,7 @@ get_widgets (Dialog *dialog) dialog->aalarm_group = GW ("aalarm-group"); dialog->aalarm_sound = GW ("aalarm-sound"); dialog->aalarm_attach = GW ("aalarm-attach"); + dialog->aalarm_file_entry = GW ("aalarm-file-entry"); dialog->malarm_group = GW ("malarm-group"); dialog->malarm_address_group = GW ("malarm-address-group"); @@ -584,6 +586,7 @@ get_widgets (Dialog *dialog) && dialog->aalarm_group && dialog->aalarm_sound && dialog->aalarm_attach + && dialog->aalarm_file_entry && dialog->malarm_group && dialog->malarm_address_group && dialog->malarm_addressbook @@ -678,11 +681,18 @@ repeat_toggle_toggled_cb (GtkToggleButton *toggle, gpointer data) static void check_custom_sound (Dialog *dialog) { - char *str; + char *str, *dir; gboolean sens; str = e_dialog_editable_get (dialog->aalarm_attach); + if ( str && *str ) { + dir = g_path_get_dirname (str); + if ( dir && *dir ) { + calendar_config_set_dir_path (dir); + } + } + sens = e_dialog_toggle_get (dialog->aalarm_sound) ? str && *str : TRUE; gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog->toplevel), GTK_RESPONSE_OK, sens); @@ -827,6 +837,7 @@ static void action_selection_done_cb (GtkMenuShell *menu_shell, gpointer data) { Dialog *dialog = data; + char *dir; ECalComponentAlarmAction action; int page = 0, i; @@ -842,6 +853,9 @@ action_selection_done_cb (GtkMenuShell *menu_shell, gpointer data) switch (action) { case E_CAL_COMPONENT_ALARM_AUDIO: + dir = calendar_config_get_dir_path (); + if ( dir && *dir ) + gnome_file_entry_set_default_path (dialog->aalarm_file_entry, dir); check_custom_sound (dialog); break; diff --git a/calendar/gui/dialogs/alarm-dialog.glade b/calendar/gui/dialogs/alarm-dialog.glade index adcb53262b..fb44f24b25 100644 --- a/calendar/gui/dialogs/alarm-dialog.glade +++ b/calendar/gui/dialogs/alarm-dialog.glade @@ -764,7 +764,7 @@ </child> <child> - <widget class="GnomeFileEntry" id="file-entry1"> + <widget class="GnomeFileEntry" id="aalarm-file-entry"> <property name="visible">True</property> <property name="max_saved">10</property> <property name="directory_entry">False</property> |