aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-01-24 19:36:04 +0800
committerChristian Persch <chpe@src.gnome.org>2004-01-24 19:36:04 +0800
commit949f432f56914a7c1a71de6783b21cb506f1b921 (patch)
tree5e4f0a65c7b3282d7b7d8706f595afa291572b15
parentae865c906e03be544167c899ae6e3b5f2d6f6a8e (diff)
downloadgsoc2013-epiphany-949f432f56914a7c1a71de6783b21cb506f1b921.tar
gsoc2013-epiphany-949f432f56914a7c1a71de6783b21cb506f1b921.tar.gz
gsoc2013-epiphany-949f432f56914a7c1a71de6783b21cb506f1b921.tar.bz2
gsoc2013-epiphany-949f432f56914a7c1a71de6783b21cb506f1b921.tar.lz
gsoc2013-epiphany-949f432f56914a7c1a71de6783b21cb506f1b921.tar.xz
gsoc2013-epiphany-949f432f56914a7c1a71de6783b21cb506f1b921.tar.zst
gsoc2013-epiphany-949f432f56914a7c1a71de6783b21cb506f1b921.zip
Use our eel_gconf_set_path() function to persist the directory.
2004-01-24 Christian Persch <chpe@cvs.gnome.org> * lib/ephy-file-chooser.c: (ephy_file_chooser_get_type), (current_folder_changed_cb): Use our eel_gconf_set_path() function to persist the directory.
-rw-r--r--ChangeLog7
-rw-r--r--lib/ephy-file-chooser.c26
2 files changed, 17 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 853cf1432..b77bacc5f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-01-24 Christian Persch <chpe@cvs.gnome.org>
+
+ * lib/ephy-file-chooser.c: (ephy_file_chooser_get_type),
+ (current_folder_changed_cb):
+
+ Use our eel_gconf_set_path() function to persist the directory.
+
2004-01-24 Marco Pesenti Gritti <marco@gnome.org>
* lib/ephy-dialog.c: (setup_default_size), (ephy_dialog_init),
diff --git a/lib/ephy-file-chooser.c b/lib/ephy-file-chooser.c
index ecbd329f9..6a59bff5a 100644
--- a/lib/ephy-file-chooser.c
+++ b/lib/ephy-file-chooser.c
@@ -52,9 +52,9 @@ static GObjectClass *parent_class = NULL;
GType
ephy_file_chooser_get_type (void)
{
- static GType ephy_file_chooser_type = 0;
+ static GType type = 0;
- if (ephy_file_chooser_type == 0)
+ if (type == 0)
{
static const GTypeInfo our_info =
{
@@ -69,32 +69,26 @@ ephy_file_chooser_get_type (void)
(GInstanceInitFunc) ephy_file_chooser_init
};
- ephy_file_chooser_type = g_type_register_static (GTK_TYPE_FILE_CHOOSER_DIALOG,
- "EphyFileChooser",
- &our_info, 0);
+ type = g_type_register_static (GTK_TYPE_FILE_CHOOSER_DIALOG,
+ "EphyFileChooser",
+ &our_info, 0);
}
- return ephy_file_chooser_type;
+ return type;
}
static void
current_folder_changed_cb (GtkFileChooser *chooser, EphyFileChooser *dialog)
{
- if (dialog->priv->persist_key)
+ if (dialog->priv->persist_key != NULL)
{
- char *dir, *converted;
+ char *dir;
dir = gtk_file_chooser_get_current_folder (chooser);
- if (dir != NULL)
- {
- converted = g_filename_to_utf8 (dir, -1, NULL, NULL, NULL);
-
- eel_gconf_set_string (dialog->priv->persist_key, dir);
+ eel_gconf_set_path (dialog->priv->persist_key, dir);
- g_free (converted);
- g_free (dir);
- }
+ g_free (dir);
}
}