aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-04-14 20:24:25 +0800
committerChristian Persch <chpe@src.gnome.org>2004-04-14 20:24:25 +0800
commitee977e745eb423e3ad6de9031f412021b6dd9bdf (patch)
treeee96bddb434ad6691ee29f40ddd231bfa952e9f7 /lib
parentb7e5c1f5940fac73daa92ad788f0f195ff9dedaa (diff)
downloadgsoc2013-epiphany-ee977e745eb423e3ad6de9031f412021b6dd9bdf.tar
gsoc2013-epiphany-ee977e745eb423e3ad6de9031f412021b6dd9bdf.tar.gz
gsoc2013-epiphany-ee977e745eb423e3ad6de9031f412021b6dd9bdf.tar.bz2
gsoc2013-epiphany-ee977e745eb423e3ad6de9031f412021b6dd9bdf.tar.lz
gsoc2013-epiphany-ee977e745eb423e3ad6de9031f412021b6dd9bdf.tar.xz
gsoc2013-epiphany-ee977e745eb423e3ad6de9031f412021b6dd9bdf.tar.zst
gsoc2013-epiphany-ee977e745eb423e3ad6de9031f412021b6dd9bdf.zip
Add "Downloads" folder shortcut to our file chooser dialogues.
2004-04-14 Christian Persch <chpe@cvs.gnome.org> * lib/ephy-file-chooser.c: (ephy_file_chooser_constructor), (ephy_file_chooser_class_init): Add "Downloads" folder shortcut to our file chooser dialogues.
Diffstat (limited to 'lib')
-rw-r--r--lib/ephy-file-chooser.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/ephy-file-chooser.c b/lib/ephy-file-chooser.c
index a7f610336..72d265230 100644
--- a/lib/ephy-file-chooser.c
+++ b/lib/ephy-file-chooser.c
@@ -101,6 +101,26 @@ ephy_file_chooser_init (EphyFileChooser *dialog)
dialog->priv->persist_key = NULL;
}
+static GObject *
+ephy_file_chooser_constructor (GType type,
+ guint n_construct_properties,
+ GObjectConstructParam *construct_params)
+
+{
+ GObject *object;
+ char *downloads_dir;
+
+ object = parent_class->constructor (type, n_construct_properties,
+ construct_params);
+
+ downloads_dir = ephy_file_downloads_dir ();
+ gtk_file_chooser_add_shortcut_folder
+ (GTK_FILE_CHOOSER (object), downloads_dir, NULL);
+ g_free (downloads_dir);
+
+ return object;
+}
+
static void
ephy_file_chooser_finalize (GObject *object)
{
@@ -193,6 +213,7 @@ ephy_file_chooser_class_init (EphyFileChooserClass *klass)
parent_class = g_type_class_peek_parent (klass);
+ object_class->constructor = ephy_file_chooser_constructor;
object_class->finalize = ephy_file_chooser_finalize;
object_class->get_property = ephy_file_chooser_get_property;
object_class->set_property = ephy_file_chooser_set_property;