aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2009-04-15 03:03:37 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2009-04-15 03:03:37 +0800
commit582ec45a59973e3beed7370c3476edaeb16c9eac (patch)
tree20fb87db9605a2d4b7e4ea98c3d1382273744a66
parent4279d2042844fddc4429b8690a550778740222e3 (diff)
downloadgsoc2013-evolution-582ec45a59973e3beed7370c3476edaeb16c9eac.tar
gsoc2013-evolution-582ec45a59973e3beed7370c3476edaeb16c9eac.tar.gz
gsoc2013-evolution-582ec45a59973e3beed7370c3476edaeb16c9eac.tar.bz2
gsoc2013-evolution-582ec45a59973e3beed7370c3476edaeb16c9eac.tar.lz
gsoc2013-evolution-582ec45a59973e3beed7370c3476edaeb16c9eac.tar.xz
gsoc2013-evolution-582ec45a59973e3beed7370c3476edaeb16c9eac.tar.zst
gsoc2013-evolution-582ec45a59973e3beed7370c3476edaeb16c9eac.zip
Make the selected attachment view and file chooser folder persistent.
svn path=/branches/kill-bonobo/; revision=37523
-rw-r--r--mail/e-mail-attachment-bar.c14
-rw-r--r--shell/apps_evolution_shell.schemas.in30
-rw-r--r--shell/e-shell.c10
-rw-r--r--shell/e-shell.h2
-rw-r--r--widgets/misc/e-attachment-paned.c14
-rw-r--r--widgets/misc/e-attachment-store.c14
6 files changed, 71 insertions, 13 deletions
diff --git a/mail/e-mail-attachment-bar.c b/mail/e-mail-attachment-bar.c
index 5323a7d359..731b52164a 100644
--- a/mail/e-mail-attachment-bar.c
+++ b/mail/e-mail-attachment-bar.c
@@ -22,7 +22,10 @@
#include "e-mail-attachment-bar.h"
#include <glib/gi18n.h>
+
#include "e-util/e-binding.h"
+#include "e-util/gconf-bridge.h"
+
#include "e-attachment-store.h"
#include "e-attachment-icon-view.h"
#include "e-attachment-tree-view.h"
@@ -267,9 +270,15 @@ static void
mail_attachment_bar_constructed (GObject *object)
{
EMailAttachmentBarPrivate *priv;
+ GConfBridge *bridge;
+ const gchar *key;
priv = E_MAIL_ATTACHMENT_BAR_GET_PRIVATE (object);
+ bridge = gconf_bridge_get ();
+
+ /* Set up property-to-property bindings. */
+
e_mutual_binding_new (
G_OBJECT (object), "active-view",
G_OBJECT (priv->combo_box), "active");
@@ -293,6 +302,11 @@ mail_attachment_bar_constructed (GObject *object)
e_mutual_binding_new (
G_OBJECT (object), "expanded",
G_OBJECT (priv->vbox), "visible");
+
+ /* Set up property-to-GConf bindings. */
+
+ key = "/apps/evolution/shell/attachment_view";
+ gconf_bridge_bind_property (bridge, key, object, "active-view");
}
static void
diff --git a/shell/apps_evolution_shell.schemas.in b/shell/apps_evolution_shell.schemas.in
index 1c79c6f132..c908de65e5 100644
--- a/shell/apps_evolution_shell.schemas.in
+++ b/shell/apps_evolution_shell.schemas.in
@@ -41,7 +41,35 @@
</locale>
</schema>
- <!-- Offline Mode -->
+ <!-- Initial attachment view (icon or list) -->
+
+ <schema>
+ <key>/schemas/apps/evolution/shell/attachment_view</key>
+ <applyto>/apps/evolution/shell/attachment_view</applyto>
+ <owner>evolution</owner>
+ <type>int</type>
+ <default>0</default>
+ <locale name="C">
+ <short>Initial attachment view</short>
+ <long>Initial view for attachment bar widgets.
+ "0" is Icon View, "1" is List View.</long>
+ </locale>
+ </schema>
+
+ <!-- Initial GtkFileChooser Folder -->
+
+ <schema>
+ <key>/schemas/apps/evolution/shell/current_folder</key>
+ <applyto>/apps/evolution/shell/current-folder</applyto>
+ <owner>evolution</owner>
+ <type>string</type>
+ <locale name="C">
+ <short>Initial file chooser folder</short>
+ <long>Initial folder for GtkFileChooser dialogs.</long>
+ </locale>
+ </schema>
+
+ <!-- Offline Mode -->
<schema>
<key>/schemas/apps/evolution/shell/start_offline</key>
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 49292c0c35..2c5f00460a 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -804,16 +804,6 @@ shell_class_init (EShellClass *class)
/* Install some application-wide settings. */
e_shell_settings_install_property (
- g_param_spec_int (
- "attachment-view",
- NULL,
- NULL,
- 0,
- 1,
- 0,
- G_PARAM_READWRITE));
-
- e_shell_settings_install_property (
g_param_spec_boolean (
"disable-application-handlers",
NULL,
diff --git a/shell/e-shell.h b/shell/e-shell.h
index 16b26adce8..35095e1352 100644
--- a/shell/e-shell.h
+++ b/shell/e-shell.h
@@ -59,8 +59,6 @@ typedef struct _EShell EShell;
typedef struct _EShellClass EShellClass;
typedef struct _EShellPrivate EShellPrivate;
-typedef enum _EShellLineStatus EShellLineStatus;
-
/**
* EShell:
*
diff --git a/widgets/misc/e-attachment-paned.c b/widgets/misc/e-attachment-paned.c
index 9502f41296..a09fef0a66 100644
--- a/widgets/misc/e-attachment-paned.c
+++ b/widgets/misc/e-attachment-paned.c
@@ -22,7 +22,10 @@
#include "e-attachment-paned.h"
#include <glib/gi18n.h>
+
#include "e-util/e-binding.h"
+#include "e-util/gconf-bridge.h"
+
#include "e-attachment-view.h"
#include "e-attachment-store.h"
#include "e-attachment-icon-view.h"
@@ -272,9 +275,15 @@ static void
attachment_paned_constructed (GObject *object)
{
EAttachmentPanedPrivate *priv;
+ GConfBridge *bridge;
+ const gchar *key;
priv = E_ATTACHMENT_PANED_GET_PRIVATE (object);
+ bridge = gconf_bridge_get ();
+
+ /* Set up property-to-property bindings. */
+
e_mutual_binding_new (
G_OBJECT (object), "active-view",
G_OBJECT (priv->combo_box), "active");
@@ -302,6 +311,11 @@ attachment_paned_constructed (GObject *object)
e_mutual_binding_new (
G_OBJECT (object), "expanded",
G_OBJECT (priv->notebook), "visible");
+
+ /* Set up property-to-GConf bindings. */
+
+ key = "/apps/evolution/shell/attachment_view";
+ gconf_bridge_bind_property (bridge, key, object, "active-view");
}
static EAttachmentViewPrivate *
diff --git a/widgets/misc/e-attachment-store.c b/widgets/misc/e-attachment-store.c
index 4a74bab915..0b6e5a2baa 100644
--- a/widgets/misc/e-attachment-store.c
+++ b/widgets/misc/e-attachment-store.c
@@ -27,6 +27,7 @@
#include "e-util/e-util.h"
#include "e-util/e-mktemp.h"
+#include "e-util/gconf-bridge.h"
#define E_ATTACHMENT_STORE_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
@@ -134,6 +135,18 @@ attachment_store_finalize (GObject *object)
}
static void
+attachment_store_constructed (GObject *object)
+{
+ GConfBridge *bridge;
+ const gchar *key;
+
+ bridge = gconf_bridge_get ();
+
+ key = "/apps/evolution/shell/current_folder";
+ gconf_bridge_bind_property (bridge, key, object, "current-folder");
+}
+
+static void
attachment_store_class_init (EAttachmentStoreClass *class)
{
GObjectClass *object_class;
@@ -146,6 +159,7 @@ attachment_store_class_init (EAttachmentStoreClass *class)
object_class->get_property = attachment_store_get_property;
object_class->dispose = attachment_store_dispose;
object_class->finalize = attachment_store_finalize;
+ object_class->constructed = attachment_store_constructed;
g_object_class_install_property (
object_class,