aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog13
-rw-r--r--calendar/gui/calendar-config-keys.h1
-rw-r--r--calendar/gui/calendar-config.c16
-rw-r--r--calendar/gui/calendar-config.h3
-rw-r--r--calendar/gui/dialogs/alarm-dialog.c16
-rw-r--r--calendar/gui/dialogs/alarm-dialog.glade2
-rw-r--r--calendar/gui/e-select-names-editable.c2
7 files changed, 49 insertions, 4 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 336a58d8a5..a4bd318540 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,4 +1,15 @@
-2005-12-20 Chenthill Palanisamy <pchenthill@novell.com>
+2005-01-13 Johnny Jacob <johnnyjacob@gmail.com>
+
+ Fixes #213660
+ * gui/dialogs/alarm-dialog.c (check_custom_sound):
+ Save the directory path in gconf.
+ (action_selection_done_cb) : Read from gconf and set
+ the default path for the file entry.
+ * gui/dialogs/calendar-config.ch (calendar_config_set_dir): Added.
+ save the path in gconf.
+ (calendar_config_get_dir_path): Added. Retrive the path from gconf.
+
+2005-01-13 Chenthill Palanisamy <pchenthill@novell.com>
Fixes #320101
* gui/e-select-names-editable.c:
diff --git a/calendar/gui/calendar-config-keys.h b/calendar/gui/calendar-config-keys.h
index 08706d293a..e1f8a49470 100644
--- a/calendar/gui/calendar-config-keys.h
+++ b/calendar/gui/calendar-config-keys.h
@@ -89,6 +89,7 @@ G_BEGIN_DECLS
/* Free/Busy settings */
#define CALENDAR_CONFIG_TEMPLATE CALENDAR_CONFIG_PREFIX"/publish/template"
+#define CALENDAR_CONFIG_SAVE_DIR "/apps/evolution/mail/save_dir"
G_END_DECLS
#endif
diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c
index 6128931476..e8de54d1af 100644
--- a/calendar/gui/calendar-config.c
+++ b/calendar/gui/calendar-config.c
@@ -1331,3 +1331,19 @@ calendar_config_add_notification_free_busy_template (GConfClientNotifyFunc func,
return id;
}
+
+void
+calendar_config_set_dir_path (const gchar *path)
+{
+ gconf_client_set_string (config, CALENDAR_CONFIG_SAVE_DIR, path, NULL);
+}
+
+char *
+calendar_config_get_dir_path (void)
+{
+ char *path;
+
+ path = gconf_client_get_string (config, CALENDAR_CONFIG_SAVE_DIR, NULL);
+
+ return path;
+}
diff --git a/calendar/gui/calendar-config.h b/calendar/gui/calendar-config.h
index b111dbe04c..e99265e784 100644
--- a/calendar/gui/calendar-config.h
+++ b/calendar/gui/calendar-config.h
@@ -251,4 +251,7 @@ void calendar_config_check_timezone_set (void);
supports 12-hour time format. */
gboolean calendar_config_locale_supports_12_hour_format(void);
+void calendar_config_set_dir_path (const char *);
+char * calendar_config_get_dir_path (void);
+
#endif /* _CALENDAR_CONFIG_H_ */
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>
diff --git a/calendar/gui/e-select-names-editable.c b/calendar/gui/e-select-names-editable.c
index 6be5ec9bf8..c6bca611b2 100644
--- a/calendar/gui/e-select-names-editable.c
+++ b/calendar/gui/e-select-names-editable.c
@@ -193,7 +193,7 @@ GList *
e_select_names_editable_get_names (ESelectNamesEditable *esne)
{
EDestinationStore *destination_store;
- GList *destinations;
+ GList *destinations, *l;
EDestination *destination;
GList *result = NULL;