evolution r37523 - in branches/kill-bonobo: mail shell widgets/misc



Author: mbarnes
Date: Tue Apr 14 19:03:37 2009
New Revision: 37523
URL: http://svn.gnome.org/viewvc/evolution?rev=37523&view=rev

Log:
Make the selected attachment view and file chooser folder persistent.


Modified:
   branches/kill-bonobo/mail/e-mail-attachment-bar.c
   branches/kill-bonobo/shell/apps_evolution_shell.schemas.in
   branches/kill-bonobo/shell/e-shell.c
   branches/kill-bonobo/shell/e-shell.h
   branches/kill-bonobo/widgets/misc/e-attachment-paned.c
   branches/kill-bonobo/widgets/misc/e-attachment-store.c

Modified: branches/kill-bonobo/mail/e-mail-attachment-bar.c
==============================================================================
--- branches/kill-bonobo/mail/e-mail-attachment-bar.c	(original)
+++ branches/kill-bonobo/mail/e-mail-attachment-bar.c	Tue Apr 14 19:03:37 2009
@@ -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 @@
 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 @@
 	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

Modified: branches/kill-bonobo/shell/apps_evolution_shell.schemas.in
==============================================================================
--- branches/kill-bonobo/shell/apps_evolution_shell.schemas.in	(original)
+++ branches/kill-bonobo/shell/apps_evolution_shell.schemas.in	Tue Apr 14 19:03:37 2009
@@ -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>

Modified: branches/kill-bonobo/shell/e-shell.c
==============================================================================
--- branches/kill-bonobo/shell/e-shell.c	(original)
+++ branches/kill-bonobo/shell/e-shell.c	Tue Apr 14 19:03:37 2009
@@ -804,16 +804,6 @@
 	/* 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,

Modified: branches/kill-bonobo/shell/e-shell.h
==============================================================================
--- branches/kill-bonobo/shell/e-shell.h	(original)
+++ branches/kill-bonobo/shell/e-shell.h	Tue Apr 14 19:03:37 2009
@@ -59,8 +59,6 @@
 typedef struct _EShellClass EShellClass;
 typedef struct _EShellPrivate EShellPrivate;
 
-typedef enum _EShellLineStatus EShellLineStatus;
-
 /**
  * EShell:
  *

Modified: branches/kill-bonobo/widgets/misc/e-attachment-paned.c
==============================================================================
--- branches/kill-bonobo/widgets/misc/e-attachment-paned.c	(original)
+++ branches/kill-bonobo/widgets/misc/e-attachment-paned.c	Tue Apr 14 19:03:37 2009
@@ -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 @@
 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 @@
 	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 *

Modified: branches/kill-bonobo/widgets/misc/e-attachment-store.c
==============================================================================
--- branches/kill-bonobo/widgets/misc/e-attachment-store.c	(original)
+++ branches/kill-bonobo/widgets/misc/e-attachment-store.c	Tue Apr 14 19:03:37 2009
@@ -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 @@
 }
 
 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 @@
 	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,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]