evolution r37134 - in branches/kill-bonobo: addressbook/conduit addressbook/gui/component addressbook/printing composer doc/reference/shell doc/reference/shell/tmpl mail shell widgets/misc



Author: mbarnes
Date: Mon Jan 26 18:49:51 2009
New Revision: 37134
URL: http://svn.gnome.org/viewvc/evolution?rev=37134&view=rev

Log:
Miscellaneous stuff.


Removed:
   branches/kill-bonobo/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in
   branches/kill-bonobo/mail/mail-component-factory.c
Modified:
   branches/kill-bonobo/addressbook/conduit/address-conduit.c
   branches/kill-bonobo/addressbook/gui/component/Makefile.am
   branches/kill-bonobo/addressbook/gui/component/e-book-shell-content.c
   branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-actions.c
   branches/kill-bonobo/addressbook/gui/component/eab-composer-util.c
   branches/kill-bonobo/addressbook/gui/component/eab-composer-util.h
   branches/kill-bonobo/addressbook/printing/test-contact-print-style-editor.c
   branches/kill-bonobo/addressbook/printing/test-print.c
   branches/kill-bonobo/composer/e-msg-composer.c
   branches/kill-bonobo/doc/reference/shell/eshell-sections.txt
   branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-sidebar.sgml
   branches/kill-bonobo/mail/e-mail-reader-utils.c
   branches/kill-bonobo/mail/e-mail-reader.c
   branches/kill-bonobo/mail/e-mail-shell-module.c
   branches/kill-bonobo/mail/em-account-editor.c
   branches/kill-bonobo/mail/em-mailer-prefs.c
   branches/kill-bonobo/mail/em-network-prefs.c
   branches/kill-bonobo/mail/mail-config.c
   branches/kill-bonobo/mail/mail-folder-cache.c
   branches/kill-bonobo/mail/mail-mt.c
   branches/kill-bonobo/mail/mail-session.c
   branches/kill-bonobo/mail/mail-session.h
   branches/kill-bonobo/shell/e-shell-settings.c
   branches/kill-bonobo/shell/e-shell-settings.h
   branches/kill-bonobo/widgets/misc/e-attachment-bar.c
   branches/kill-bonobo/widgets/misc/e-attachment-bar.h
   branches/kill-bonobo/widgets/misc/e-charset-picker.c
   branches/kill-bonobo/widgets/misc/e-charset-picker.h

Modified: branches/kill-bonobo/addressbook/conduit/address-conduit.c
==============================================================================
--- branches/kill-bonobo/addressbook/conduit/address-conduit.c	(original)
+++ branches/kill-bonobo/addressbook/conduit/address-conduit.c	Mon Jan 26 18:49:51 2009
@@ -29,7 +29,6 @@
 
 #define G_LOG_DOMAIN "eaddrconduit"
 
-#include <bonobo.h>
 #include <libxml/parser.h>
 #include <pi-source.h>
 #include <pi-socket.h>

Modified: branches/kill-bonobo/addressbook/gui/component/Makefile.am
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/Makefile.am	(original)
+++ branches/kill-bonobo/addressbook/gui/component/Makefile.am	Mon Jan 26 18:49:51 2009
@@ -98,23 +98,14 @@
 	fi
 endif
 
-server_in_files = GNOME_Evolution_Addressbook.server.in.in
-server_DATA = $(server_in_files:.server.in.in=.server)
- EVO_SERVER_RULE@
- INTLTOOL_SERVER_RULE@
-
 glade_DATA =			\
 	ldap-config.glade
 
-BUILT_SOURCES = $(server_DATA)
-CLEANFILES    = $(BUILT_SOURCES)
-
 DISTCLEANFILES = $(schema_DATA)
 
 EXTRA_DIST =			\
 	$(glade_DATA)		\
 	$(schema_in_files)	\
-	$(server_in_files)	\
 	openldap-extract.h
 
 dist-hook:

Modified: branches/kill-bonobo/addressbook/gui/component/e-book-shell-content.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/e-book-shell-content.c	(original)
+++ branches/kill-bonobo/addressbook/gui/component/e-book-shell-content.c	Mon Jan 26 18:49:51 2009
@@ -50,7 +50,7 @@
 {
 	GList node = { destination, NULL, NULL };
 
-	eab_send_message (&node, EAB_DISPOSITION_AS_TO);
+	eab_send_as_to (&node);
 }
 
 static void

Modified: branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-actions.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-actions.c	(original)
+++ branches/kill-bonobo/addressbook/gui/component/e-book-shell-view-actions.c	Mon Jan 26 18:49:51 2009
@@ -306,7 +306,7 @@
 		iter->data = destination;
 	}
 
-	eab_send_message (list, EAB_DISPOSITION_AS_ATTACHMENT);
+	eab_send_as_attachment (list);
 	g_list_foreach (list, (GFunc) g_object_unref, NULL);
 	g_list_free (list);
 }
@@ -488,7 +488,7 @@
 		iter->data = destination;
 	}
 
-	eab_send_message (list, EAB_DISPOSITION_AS_TO);
+	eab_send_as_to (list);
 	g_list_foreach (list, (GFunc) g_object_unref, NULL);
 	g_list_free (list);
 }

Modified: branches/kill-bonobo/addressbook/gui/component/eab-composer-util.c
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/eab-composer-util.c	(original)
+++ branches/kill-bonobo/addressbook/gui/component/eab-composer-util.c	Mon Jan 26 18:49:51 2009
@@ -27,7 +27,7 @@
 #include "addressbook/util/eab-book-util.h"
 #include "addressbook/gui/widgets/eab-gui-util.h"
 
-static void
+void
 eab_send_as_to (GList *destinations)
 {
 	EMsgComposer *composer;
@@ -108,7 +108,7 @@
 	return value;
 }
 
-static void
+void
 eab_send_as_attachment (GList *destinations)
 {
 	EMsgComposer *composer;
@@ -195,18 +195,3 @@
 
 	gtk_widget_show (GTK_WIDGET (composer));
 }
-
-void
-eab_send_message (GList *destinations,
-                  EABDisposition disposition)
-{
-	switch (disposition) {
-		case EAB_DISPOSITION_AS_TO:
-			eab_send_as_to (destinations);
-			break;
-
-		case EAB_DISPOSITION_AS_ATTACHMENT:
-			eab_send_as_attachment (destinations);
-			break;
-	}
-}

Modified: branches/kill-bonobo/addressbook/gui/component/eab-composer-util.h
==============================================================================
--- branches/kill-bonobo/addressbook/gui/component/eab-composer-util.h	(original)
+++ branches/kill-bonobo/addressbook/gui/component/eab-composer-util.h	Mon Jan 26 18:49:51 2009
@@ -23,13 +23,8 @@
 
 G_BEGIN_DECLS
 
-typedef enum {
-	EAB_DISPOSITION_AS_ATTACHMENT,
-	EAB_DISPOSITION_AS_TO,
-} EABDisposition;
-
-void		eab_send_message		(GList *destinations,
-						 EABDisposition  disposition);
+void		eab_send_as_to			(GList *destinations);
+void		eab_send_as_attachment		(GList *destinations);
 
 G_END_DECLS
 

Modified: branches/kill-bonobo/addressbook/printing/test-contact-print-style-editor.c
==============================================================================
--- branches/kill-bonobo/addressbook/printing/test-contact-print-style-editor.c	(original)
+++ branches/kill-bonobo/addressbook/printing/test-contact-print-style-editor.c	Mon Jan 26 18:49:51 2009
@@ -24,51 +24,35 @@
 
 #include <stdlib.h>
 #include <gtk/gtk.h>
-#include <libgnomeui/gnome-app.h>
-#include <libgnomeui/gnome-ui-init.h>
-#include <bonobo/bonobo-main.h>
 #include "e-contact-print-style-editor.h"
 
-/* This is a horrible thing to do, but it is just a test. */
-static GtkWidget *editor;
-
-static void destroy_callback(GtkWidget *app, gpointer data)
+int
+main (int argc, char *argv[])
 {
-	static int count = 2;
-	count --;
-	if ( count <= 0 )
-		exit(0);
-}
-
-int main( int argc, char *argv[] )
-{
-  GtkWidget *app;
-
-  /*  bindtextdomain (PACKAGE, GNOMELOCALEDIR);
-      textdomain (PACKAGE);*/
+	GtkWidget *editor;
+	GtkWidget *window;
+	const gchar *title;
 
-  gnome_program_init ("Contact Print Style Editor Test", VERSION,
-		      LIBGNOMEUI_MODULE,
-		      argc, argv,
-		      NULL);
+	title = "Contact Print Style Editor Test";
 
-  glade_init ();
+	gtk_init (&argc, &argv);
 
-  app = gnome_app_new("Contact Print Style Editor Test", NULL);
+	glade_init ();
 
-  editor = e_contact_print_style_editor_new("");
+	window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+	gtk_window_set_title (GTK_WINDOW (window), title);
 
-  gnome_app_set_contents( GNOME_APP( app ), editor );
+	editor = e_contact_print_style_editor_new ("");
+	gtk_container_add (GTK_CONTAINER (window), editor);
 
-  /* Connect the signals */
-  g_signal_connect( app, "destroy",
-		    G_CALLBACK ( destroy_callback ),
-		    ( gpointer ) app );
+	g_signal_connect (
+		window, "delete-event",
+		G_CALLBACK (gtk_main_quit), NULL);
 
-  gtk_widget_show_all( app );
+	gtk_widget_show_all (window);
 
-  bonobo_main();
+	gtk_main ();
 
-  /* Not reached. */
-  return 0;
+	/* Not reached. */
+	return 0;
 }

Modified: branches/kill-bonobo/addressbook/printing/test-print.c
==============================================================================
--- branches/kill-bonobo/addressbook/printing/test-print.c	(original)
+++ branches/kill-bonobo/addressbook/printing/test-print.c	Mon Jan 26 18:49:51 2009
@@ -24,35 +24,28 @@
 
 #include <stdlib.h>
 #include <gtk/gtk.h>
-#include <libgnomeui/gnome-ui-init.h>
 #include <glade/glade.h>
-#include <bonobo/bonobo-main.h>
 #include "e-contact-print.h"
 
-int main( int argc, char *argv[] )
+int
+main (int argc, char *argv[])
 {
-  GList *shown_fields = NULL;
+	GList *shown_fields = NULL;
 
-  /*  bindtextdomain (PACKAGE, GNOMELOCALEDIR);
-      textdomain (PACKAGE);*/
+	gtk_init (&argc, &argv);
 
-  gnome_program_init ("Contact Print Test", VERSION,
-		      LIBGNOMEUI_MODULE,
-		      argc, argv,
-		      NULL);
+	glade_init ();
 
-  glade_init ();
+	shown_fields = g_list_append (shown_fields, "First field");
+	shown_fields = g_list_append (shown_fields, "Second field");
+	shown_fields = g_list_append (shown_fields, "Third field");
+	shown_fields = g_list_append (shown_fields, "Fourth field");
 
-  shown_fields = g_list_append(shown_fields, "First field");
-  shown_fields = g_list_append(shown_fields, "Second field");
-  shown_fields = g_list_append(shown_fields, "Third field");
-  shown_fields = g_list_append(shown_fields, "Fourth field");
+	/* does nothing */
+	e_contact_print (NULL, NULL, NULL, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG);
 
-  /* does nothing */
-  e_contact_print (NULL, NULL, NULL, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG);
+	gtk_main ();
 
-  bonobo_main();
-
-  /* Not reached. */
-  return 0;
+	/* Not reached. */
+	return 0;
 }

Modified: branches/kill-bonobo/composer/e-msg-composer.c
==============================================================================
--- branches/kill-bonobo/composer/e-msg-composer.c	(original)
+++ branches/kill-bonobo/composer/e-msg-composer.c	Mon Jan 26 18:49:51 2009
@@ -1375,9 +1375,8 @@
 
 	 */
 
-	g_object_get (
-		shell_settings, "composer-top-signature",
-		&reply_signature_on_top, NULL);
+	reply_signature_on_top = e_shell_settings_get_boolean (
+		shell_settings, "composer-top-signature");
 
 	if (set_signature && reply_signature_on_top) {
 		gchar *tmp = NULL;
@@ -2099,12 +2098,13 @@
 
 	/* Honor User Preferences */
 
-	g_object_get (shell_settings, "composer-format-html", &active, NULL);
+	active = e_shell_settings_get_boolean (
+		shell_settings, "composer-format-html");
 	gtkhtml_editor_set_html_mode (GTKHTML_EDITOR (composer), active);
 
 	action = GTK_TOGGLE_ACTION (ACTION (REQUEST_READ_RECEIPT));
-	g_object_get (
-		shell_settings, "composer-request-receipt", &active, NULL);
+	active = e_shell_settings_get_boolean (
+		shell_settings, "composer-request-receipt");
 	gtk_toggle_action_set_active (action, active);
 
 	spell_languages = e_load_spell_languages ();

Modified: branches/kill-bonobo/doc/reference/shell/eshell-sections.txt
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/eshell-sections.txt	(original)
+++ branches/kill-bonobo/doc/reference/shell/eshell-sections.txt	Mon Jan 26 18:49:51 2009
@@ -122,6 +122,12 @@
 EShellSettings
 e_shell_settings_install_property
 e_shell_settings_bind_to_gconf
+e_shell_settings_get_boolean
+e_shell_settings_set_boolean
+e_shell_settings_get_int
+e_shell_settings_set_int
+e_shell_settings_get_string
+e_shell_settings_set_string
 <SUBSECTION Standard>
 E_SHELL_SETTINGS
 E_IS_SHELL_SETTINGS

Modified: branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-sidebar.sgml
==============================================================================
--- branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-sidebar.sgml	(original)
+++ branches/kill-bonobo/doc/reference/shell/tmpl/e-shell-sidebar.sgml	Mon Jan 26 18:49:51 2009
@@ -23,6 +23,11 @@
 </para>
 
 
+<!-- ##### ARG EShellSidebar:icon-name ##### -->
+<para>
+
+</para>
+
 <!-- ##### ARG EShellSidebar:primary-text ##### -->
 <para>
 

Modified: branches/kill-bonobo/mail/e-mail-reader-utils.c
==============================================================================
--- branches/kill-bonobo/mail/e-mail-reader-utils.c	(original)
+++ branches/kill-bonobo/mail/e-mail-reader-utils.c	Mon Jan 26 18:49:51 2009
@@ -87,9 +87,8 @@
 
 	folder = message_list->folder;
 
-	g_object_get (
-		shell_settings, "mail-prompt-delete-in-vfolder",
-		&prompt_delete_in_vfolder, NULL);
+	prompt_delete_in_vfolder = e_shell_settings_get_boolean (
+		shell_settings, "mail-prompt-delete-in-vfolder");
 
 	if (!CAMEL_IS_VEE_STORE (folder->parent_store))
 		return TRUE;
@@ -114,11 +113,11 @@
 	response = gtk_dialog_run (GTK_DIALOG (dialog));
 
 	if (response == GTK_RESPONSE_OK)
-		g_object_set (
+		e_shell_settings_set_boolean (
 			shell_settings,
 			"mail-prompt-delete-in-vfolder",
 			gtk_toggle_button_get_active (
-			GTK_TOGGLE_BUTTON (check_button)), NULL);
+			GTK_TOGGLE_BUTTON (check_button)));
 
 	gtk_widget_destroy (dialog);
 

Modified: branches/kill-bonobo/mail/e-mail-reader.c
==============================================================================
--- branches/kill-bonobo/mail/e-mail-reader.c	(original)
+++ branches/kill-bonobo/mail/e-mail-reader.c	Mon Jan 26 18:49:51 2009
@@ -1846,10 +1846,10 @@
 	e_shell_event (shell, "mail-icon", "evolution-mail");
 
 	/* Determine whether to mark the message as read. */
-	g_object_get (
-		shell_settings,
-		"mail-mark-seen", &mark_read,
-		"mail-mark-seen-timeout", &timeout_interval, NULL);
+	mark_read = e_shell_settings_get_boolean (
+		shell_settings, "mail-mark-seen");
+	timeout_interval = e_shell_settings_get_int (
+		shell_settings, "mail-mark-seen-timeout");
 
 	g_object_set_data_full (
 		G_OBJECT (reader), "mark-read-uid",

Modified: branches/kill-bonobo/mail/e-mail-shell-module.c
==============================================================================
--- branches/kill-bonobo/mail/e-mail-shell-module.c	(original)
+++ branches/kill-bonobo/mail/e-mail-shell-module.c	Mon Jan 26 18:49:51 2009
@@ -819,10 +819,12 @@
 {
 	EShell *shell;
 	EShellModule *shell_module;
+	EShellSettings *shell_settings;
 	gboolean enable_search_folders;
 
 	shell_module = E_SHELL_MODULE (type_module);
 	shell = e_shell_module_get_shell (shell_module);
+	shell_settings = e_shell_get_shell_settings (shell);
 
 	e_shell_module_set_info (
 		shell_module, &module_info,
@@ -892,10 +894,8 @@
 	e_mail_shell_module_init_settings (shell);
 	mail_shell_module_init_preferences (shell);
 
-	g_object_get (
-		e_shell_get_shell_settings (shell),
-		"mail-enable-search-folders",
-		&enable_search_folders, NULL);
+	enable_search_folders = e_shell_settings_get_boolean (
+		shell_settings, "mail-enable-search-folders");
 	if (enable_search_folders)
 		vfolder_load_storage ();
 

Modified: branches/kill-bonobo/mail/em-account-editor.c
==============================================================================
--- branches/kill-bonobo/mail/em-account-editor.c	(original)
+++ branches/kill-bonobo/mail/em-account-editor.c	Mon Jan 26 18:49:51 2009
@@ -670,8 +670,8 @@
 	shell_settings = e_shell_get_shell_settings (shell);
 	parent = gtk_widget_get_toplevel (w);
 
-	g_object_get (
-		shell_settings, "composer-format-html", &html_mode, NULL);
+	html_mode = e_shell_settings_get_boolean (
+		shell_settings, "composer-format-html");
 
 	em_composer_prefs_new_signature (GTK_WINDOW (parent), html_mode);
 }

Modified: branches/kill-bonobo/mail/em-mailer-prefs.c
==============================================================================
--- branches/kill-bonobo/mail/em-mailer-prefs.c	(original)
+++ branches/kill-bonobo/mail/em-mailer-prefs.c	Mon Jan 26 18:49:51 2009
@@ -25,6 +25,7 @@
 #endif
 
 #include <string.h>
+#include <glib/gi18n-lib.h>
 
 #include "em-mailer-prefs.h"
 #include "em-format.h"
@@ -33,7 +34,6 @@
 #include <gtkhtml/gtkhtml-properties.h>
 #include <libxml/tree.h>
 #include "misc/e-charset-picker.h"
-#include <bonobo/bonobo-generic-factory.h>
 
 #include <glade/glade.h>
 

Modified: branches/kill-bonobo/mail/em-network-prefs.c
==============================================================================
--- branches/kill-bonobo/mail/em-network-prefs.c	(original)
+++ branches/kill-bonobo/mail/em-network-prefs.c	Mon Jan 26 18:49:51 2009
@@ -32,8 +32,6 @@
 
 #include "em-network-prefs.h"
 
-#include <bonobo/bonobo-generic-factory.h>
-
 #include <gdk/gdkkeysyms.h>
 #include <gconf/gconf-client.h>
 #include <glade/glade.h>

Modified: branches/kill-bonobo/mail/mail-config.c
==============================================================================
--- branches/kill-bonobo/mail/mail-config.c	(original)
+++ branches/kill-bonobo/mail/mail-config.c	Mon Jan 26 18:49:51 2009
@@ -37,6 +37,7 @@
 
 #include <gtk/gtk.h>
 #include <glib/gstdio.h>
+#include <glib/gi18n-lib.h>
 
 #ifndef G_OS_WIN32
 #include <sys/wait.h>
@@ -48,12 +49,6 @@
 #include <libxml/tree.h>
 #include <libxml/parser.h>
 
-#include <bonobo/bonobo-object.h>
-#include <bonobo/bonobo-generic-factory.h>
-#include <bonobo/bonobo-context.h>
-#include <bonobo/bonobo-moniker-util.h>
-#include <bonobo/bonobo-exception.h>
-
 #include <libedataserver/e-data-server-util.h>
 #include <e-util/e-util.h>
 #include <misc/e-gui-utils.h>

Modified: branches/kill-bonobo/mail/mail-folder-cache.c
==============================================================================
--- branches/kill-bonobo/mail/mail-folder-cache.c	(original)
+++ branches/kill-bonobo/mail/mail-folder-cache.c	Mon Jan 26 18:49:51 2009
@@ -39,7 +39,6 @@
 
 #include <libgnome/gnome-sound.h>
 #include <glib/gi18n.h>
-#include <bonobo/bonobo-exception.h>
 #include <camel/camel-store.h>
 #include <camel/camel-folder.h>
 #include <camel/camel-vtrash-folder.h>

Modified: branches/kill-bonobo/mail/mail-mt.c
==============================================================================
--- branches/kill-bonobo/mail/mail-mt.c	(original)
+++ branches/kill-bonobo/mail/mail-mt.c	Mon Jan 26 18:49:51 2009
@@ -1071,6 +1071,5 @@
 	if (last == sensitive)
 		return;
 
-	/*bonobo_ui_component_set_prop (uic, "/commands/MailStop", "sensitive", sensitive ? "1" : "0", NULL);*/
 	last = sensitive;
 }

Modified: branches/kill-bonobo/mail/mail-session.c
==============================================================================
--- branches/kill-bonobo/mail/mail-session.c	(original)
+++ branches/kill-bonobo/mail/mail-session.c	Mon Jan 26 18:49:51 2009
@@ -784,13 +784,6 @@
 }
 
 void
-mail_session_forget_passwords (BonoboUIComponent *uih, void *user_data,
-			       const char *path)
-{
-	e_passwords_forget_passwords ();
-}
-
-void
 mail_session_flush_filter_log (void)
 {
 	MailSession *ms = (MailSession *) session;

Modified: branches/kill-bonobo/mail/mail-session.h
==============================================================================
--- branches/kill-bonobo/mail/mail-session.h	(original)
+++ branches/kill-bonobo/mail/mail-session.h	Mon Jan 26 18:49:51 2009
@@ -24,7 +24,6 @@
 #define MAIL_SESSION_H
 
 #include <glib.h>
-#include <bonobo/bonobo-ui-component.h>
 #include <camel/camel-session.h>
 #include <shell/e-shell-module.h>
 
@@ -43,8 +42,6 @@
 				     gboolean async);
 char *mail_session_get_password (const char *url);
 void mail_session_add_password (const char *url, const char *passwd);
-void mail_session_forget_passwords (BonoboUIComponent *uih, void *user_data,
-				    const char *path);
 void mail_session_remember_password (const char *url);
 
 void mail_session_forget_password (const char *key);

Modified: branches/kill-bonobo/shell/e-shell-settings.c
==============================================================================
--- branches/kill-bonobo/shell/e-shell-settings.c	(original)
+++ branches/kill-bonobo/shell/e-shell-settings.c	Mon Jan 26 18:49:51 2009
@@ -142,6 +142,15 @@
 	return type;
 }
 
+/**
+ * e_shell_settings_install_property:
+ * @pspec: a #GParamSpec
+ *
+ * Installs a new class property for #EShellSettings.  This is usually
+ * done during initialization of a #EShellModule or plugin, followed by
+ * a call to e_shell_settings_bind_to_gconf() to bind the property to a
+ * GConf key.
+ **/
 void
 e_shell_settings_install_property (GParamSpec *pspec)
 {
@@ -186,6 +195,23 @@
 	}
 }
 
+/**
+ * e_shell_settings_bind_to_gconf:
+ * @shell_settings: an #EShellSettings
+ * @property_name: the name of the property to bind
+ * @gconf_key: the GConf key to bind the property to
+ *
+ * Binds @property_name to @gconf_key, causing them to have the same value
+ * at all times.
+ *
+ * The types of @property_name and @gconf_key should be compatible.  Floats
+ * and doubles, and ints, uints, longs, unlongs, int64s, uint64s, chars,
+ * uchars and enums can be matched up.  Booleans and strings can only be
+ * matched to their respective types.
+ *
+ * On calling this function, @property_name is initialized to the current
+ * value of @gconf_key.
+ **/
 void
 e_shell_settings_bind_to_gconf (EShellSettings *shell_settings,
                                 const gchar *property_name,
@@ -199,3 +225,177 @@
 		gconf_bridge_get (), gconf_key,
 		G_OBJECT (shell_settings), property_name);
 }
+
+/**
+ * e_shell_settings_get_boolean:
+ * @shell_settings: an #EShellSettings
+ * @property_name: an installed property name
+ *
+ * Return the contents of an #EShellSettings property of type
+ * #G_TYPE_BOOLEAN.
+ *
+ * Returns: boolean contents of @property_name
+ **/
+gboolean
+e_shell_settings_get_boolean (EShellSettings *shell_settings,
+                              const gchar *property_name)
+{
+	GObject *object;
+	GValue value = { 0, };
+	gboolean v_boolean;
+
+	g_return_val_if_fail (E_IS_SHELL_SETTINGS (shell_settings), FALSE);
+	g_return_val_if_fail (property_name != NULL, FALSE);
+
+	object = G_OBJECT (shell_settings);
+	g_value_init (&value, G_TYPE_BOOLEAN);
+	g_object_get_property (object, property_name, &value);
+	v_boolean = g_value_get_boolean (&value);
+	g_value_unset (&value);
+
+	return v_boolean;
+}
+
+/**
+ * e_shell_settings_set_boolean:
+ * @shell_settings: an #EShellSettings
+ * @property_name: an installed property name
+ * @v_boolean: boolean value to be set
+ *
+ * Sets the contents of an #EShellSettings property of type #G_TYPE_BOOLEAN
+ * to @v_boolean.  If @property_name is bound to a GConf key, the GConf key
+ * will also be set to @v_boolean.
+ **/
+void
+e_shell_settings_set_boolean (EShellSettings *shell_settings,
+                              const gchar *property_name,
+                              gboolean v_boolean)
+{
+	GObject *object;
+	GValue value = { 0, };
+
+	g_return_if_fail (E_IS_SHELL_SETTINGS (shell_settings));
+	g_return_if_fail (property_name != NULL);
+
+	object = G_OBJECT (shell_settings);
+	g_value_init (&value, G_TYPE_BOOLEAN);
+	g_value_set_boolean (&value, v_boolean);
+	g_object_set_property (object, property_name, &value);
+	g_value_unset (&value);
+}
+
+/**
+ * e_shell_settings_get_int:
+ * @shell_settings: an #EShellSettings
+ * @property_name: an installed property name
+ *
+ * Returns the contents of an #EShellSettings property of type
+ * #G_TYPE_INT.
+ *
+ * Returns: integer contents of @property_name
+ **/
+gint
+e_shell_settings_get_int (EShellSettings *shell_settings,
+                          const gchar *property_name)
+{
+	GObject *object;
+	GValue value = { 0, };
+	gint v_int;
+
+	g_return_val_if_fail (E_IS_SHELL_SETTINGS (shell_settings), 0);
+	g_return_val_if_fail (property_name != NULL, 0);
+
+	object = G_OBJECT (shell_settings);
+	g_value_init (&value, G_TYPE_INT);
+	g_object_get_property (object, property_name, &value);
+	v_int = g_value_get_int (&value);
+	g_value_unset (&value);
+
+	return v_int;
+}
+
+/**
+ * e_shell_settings_set_int:
+ * @shell_settings: an #EShellSettings
+ * @property_name: an installed property name
+ * @v_int: integer value to be set
+ *
+ * Sets the contents of an #EShellSettings property of type #G_TYPE_INT
+ * to @v_int.  If @property_name is bound to a GConf key, the GConf key
+ * will also be set to @v_int.
+ **/
+void
+e_shell_settings_set_int (EShellSettings *shell_settings,
+                          const gchar *property_name,
+                          gint v_int)
+{
+	GObject *object;
+	GValue value = { 0, };
+
+	g_return_if_fail (E_IS_SHELL_SETTINGS (shell_settings));
+	g_return_if_fail (property_name != NULL);
+
+	object = G_OBJECT (shell_settings);
+	g_value_init (&value, G_TYPE_INT);
+	g_value_set_int (&value, v_int);
+	g_object_set_property (object, property_name, &value);
+	g_value_unset (&value);
+}
+
+/**
+ * e_shell_settings_get_string:
+ * @shell_settings: an #EShellSettings
+ * @property_name: an installed property name
+ *
+ * Returns the contents of an #EShellSettings property of type
+ * #G_TYPE_STRING.  The returned string should be freed using g_free().
+ *
+ * Returns: string contents of @property_name
+ **/
+gchar *
+e_shell_settings_get_string (EShellSettings *shell_settings,
+                             const gchar *property_name)
+{
+	GObject *object;
+	GValue value = { 0, };
+	gchar *v_string;
+
+	g_return_val_if_fail (E_IS_SHELL_SETTINGS (shell_settings), NULL);
+	g_return_val_if_fail (property_name != NULL, NULL);
+
+	object = G_OBJECT (shell_settings);
+	g_value_init (&value, G_TYPE_STRING);
+	g_object_get_property (object, property_name, &value);
+	v_string = g_value_dup_string (&value);
+	g_value_unset (&value);
+
+	return v_string;
+}
+
+/**
+ * e_shell_settings_set_string:
+ * @shell_settings: an #EShellSettings
+ * @property_name: an installed property name
+ * @v_string: string to be set
+ *
+ * Sets the contents of an #EShellSettings property of type #G_TYPE_STRING
+ * to @v_string.  If @property_name is bound to a GConf key, the GConf key
+ * will also be set to @v_string.
+ **/
+void
+e_shell_settings_set_string (EShellSettings *shell_settings,
+                             const gchar *property_name,
+                             const gchar *v_string)
+{
+	GObject *object;
+	GValue value = { 0, };
+
+	g_return_if_fail (E_IS_SHELL_SETTINGS (shell_settings));
+	g_return_if_fail (property_name != NULL);
+
+	object = G_OBJECT (shell_settings);
+	g_value_init (&value, G_TYPE_STRING);
+	g_value_set_string (&value, v_string);
+	g_object_set_property (object, property_name, &value);
+	g_value_unset (&value);
+}

Modified: branches/kill-bonobo/shell/e-shell-settings.h
==============================================================================
--- branches/kill-bonobo/shell/e-shell-settings.h	(original)
+++ branches/kill-bonobo/shell/e-shell-settings.h	Mon Jan 26 18:49:51 2009
@@ -77,6 +77,26 @@
 						 const gchar *property_name,
 						 const gchar *gconf_key);
 
+/* Getters and setters for common EShellSettings property types.
+ * Add more types as needed.  If GObject ever adds similar functions,
+ * kill these. */
+
+gboolean	e_shell_settings_get_boolean	(EShellSettings *shell_settings,
+						 const gchar *property_name);
+void		e_shell_settings_set_boolean	(EShellSettings *shell_settings,
+						 const gchar *property_name,
+						 gboolean v_boolean);
+gint		e_shell_settings_get_int	(EShellSettings *shell_settings,
+						 const gchar *property_name);
+void		e_shell_settings_set_int	(EShellSettings *shell_settings,
+						 const gchar *property_name,
+						 gint v_int);
+gchar *		e_shell_settings_get_string	(EShellSettings *shell_settings,
+						 const gchar *property_name);
+void		e_shell_settings_set_string	(EShellSettings *shell_settings,
+						 const gchar *property_name,
+						 const gchar *v_string);
+
 G_END_DECLS
 
 #endif /* E_SHELL_SETTINGS_H */

Modified: branches/kill-bonobo/widgets/misc/e-attachment-bar.c
==============================================================================
--- branches/kill-bonobo/widgets/misc/e-attachment-bar.c	(original)
+++ branches/kill-bonobo/widgets/misc/e-attachment-bar.c	Mon Jan 26 18:49:51 2009
@@ -76,9 +76,6 @@
 struct _EAttachmentBarPrivate {
 	GtkWidget *attach;	/* attachment file dialogue, if active */
 
-	/* Recent documents. Use this widget directly when bonoboui is obsoleted */
-	GtkWidget *recent;
-
 	gboolean batch_unref;
 	GPtrArray *attachments;
 	char *path;
@@ -791,9 +788,6 @@
 		if (priv->attach)
 			gtk_widget_destroy (priv->attach);
 
-		if (priv->recent)
-			gtk_widget_destroy (priv->recent);
-
 		if (priv->path)
 			g_free (priv->path);
 
@@ -1065,14 +1059,6 @@
 	priv->batch_unref = FALSE;
 	priv->attachments = g_ptr_array_new ();
 
-	priv->recent = gtk_recent_chooser_menu_new ();
-	gtk_recent_chooser_menu_set_show_numbers (GTK_RECENT_CHOOSER_MENU (priv->recent), TRUE);
-	gtk_recent_chooser_set_sort_type (GTK_RECENT_CHOOSER (priv->recent), GTK_RECENT_SORT_MRU);
-	gtk_recent_chooser_set_show_not_found (GTK_RECENT_CHOOSER (priv->recent), FALSE);
-	gtk_recent_chooser_set_show_private (GTK_RECENT_CHOOSER (priv->recent), FALSE);
-	gtk_recent_chooser_set_show_icons (GTK_RECENT_CHOOSER (priv->recent), TRUE);
-	gtk_recent_chooser_set_show_tips (GTK_RECENT_CHOOSER (priv->recent), TRUE);
-
 	priv->path = NULL;
 
 	bar->priv = priv;
@@ -1297,7 +1283,6 @@
 e_attachment_bar_refresh (EAttachmentBar *bar)
 {
 	update (bar);
-
 }
 
 int
@@ -1352,92 +1337,6 @@
 	add_from_mime_part (bar, part);
 }
 
-/* FIXME: Remove this API if nobody uses it */
-void 
-e_attachment_bar_bonobo_ui_populate_with_recent (BonoboUIComponent *uic, const char *path,
-						 EAttachmentBar *bar, 
-						 BonoboUIVerbFn verb_cb, gpointer user_data)
-{
-	struct _EAttachmentBarPrivate *priv;
-	GList *items, *l;
-	gint limit, i;
-	GString *menuitems;
-	char *encoded_label, *label;
-
-	g_return_if_fail (E_IS_ATTACHMENT_BAR (bar));
-
-	priv = bar->priv;
-	limit = gtk_recent_chooser_get_limit (GTK_RECENT_CHOOSER (priv->recent));
-	items = gtk_recent_chooser_get_items (GTK_RECENT_CHOOSER (priv->recent));
-
-	menuitems = g_string_new ("<submenu");
-	g_string_append (menuitems, " name=\"RecentDocsSubmenu\"");
-	g_string_append_printf (menuitems, " sensitive=\"%s\"", items ? "1" : "0");
-	g_string_append_printf (menuitems, " label=\"%s\"", _("Recent _Documents"));
-	g_string_append (menuitems, ">\n");
-
-	for (l = g_list_first (items), i = 1; l && i <= limit; l = l->next, ++i) {
-		GtkRecentInfo *info = ((GtkRecentInfo *)(l->data));
-		const gchar *info_dn = gtk_recent_info_get_display_name (info);
-		char *display_name, *u;
-
-		/* escape _'s in the display name so that it doesn't become an underline in a GtkLabel */
-		if ((u = strchr (info_dn, '_'))) {
-			int extra = 1;
-			char *d;
-			const char *s;
-
-			while ((u = strchr (u + 1, '_')))
-				extra++;
-
-			d = display_name = g_alloca (strlen (info_dn) + extra + 1);
-			s = info_dn;
-			while (*s != '\0') {
-				if (*s == '_')
-					*d++ = '_';
-				*d++ = *s++;
-			}
-			*d = '\0';
-		} else
-			display_name = (char *) info_dn;
-
-		/* Add menu item */
-		label = g_strdup (display_name);
-		encoded_label = bonobo_ui_util_encode_str (label);
-		g_string_append_printf (menuitems, 
-					"  <menuitem name=\"Recent-%d\" verb=\"\" label=\"%s\"/>\n",
-					i, encoded_label);
-		g_free (encoded_label);
-		g_free (label);
-	}
-
-	g_string_append (menuitems, "</submenu>\n");
-
-	bonobo_ui_component_set (uic, path, menuitems->str, NULL);
-
-	g_string_free (menuitems, TRUE);
-
-	/* Add uri prop */
-	for (l = g_list_first (items), i = 1; l && i <= limit; l = l->next, ++i) {
-		GtkRecentInfo *info = ((GtkRecentInfo *)(l->data));
-		const gchar *info_uri = gtk_recent_info_get_uri (info);
-		label = g_strdup_printf ("/commands/Recent-%d", i);
-		bonobo_ui_component_set_prop (uic, label, "uri", info_uri, NULL);
-		g_free (label);
-	}
-
-	/* Add verb */
-	for (l = g_list_first (items), i = 1; l && i <= limit; l = l->next, ++i) {
-		label = g_strdup_printf ("Recent-%d", i);
-		bonobo_ui_component_add_verb (uic, label, verb_cb, user_data);
-		g_free (label);
-	}
-
-	for (l = g_list_first (items); l; l = l->next)
-		gtk_recent_info_unref ((GtkRecentInfo *)(l->data));
-	g_list_free (items);
-}
-
 static void
 action_recent_cb (GtkAction *action, 
 		  EAttachmentBar *attachment_bar)

Modified: branches/kill-bonobo/widgets/misc/e-attachment-bar.h
==============================================================================
--- branches/kill-bonobo/widgets/misc/e-attachment-bar.h	(original)
+++ branches/kill-bonobo/widgets/misc/e-attachment-bar.h	Mon Jan 26 18:49:51 2009
@@ -24,11 +24,9 @@
 #ifndef __E_ATTACHMENT_BAR_H__
 #define __E_ATTACHMENT_BAR_H__
 
+#include <gtk/gtk.h>
 #include <libgnomeui/gnome-icon-list.h>
 
-#include <bonobo/bonobo-ui-node.h>
-#include <bonobo/bonobo-ui-util.h>
-
 #include <camel/camel-multipart.h>
 #include "e-attachment.h"
 
@@ -85,10 +83,6 @@
 void e_attachment_bar_set_width(EAttachmentBar *bar, int bar_width);
 GSList * e_attachment_bar_get_all_attachments (EAttachmentBar *bar);
 void e_attachment_bar_create_attachment_cache (EAttachment *attachment);
-void 
-e_attachment_bar_bonobo_ui_populate_with_recent (BonoboUIComponent *uic, const char *path,
-						 EAttachmentBar *bar, 
-						 BonoboUIVerbFn verb_cb, gpointer user_data);
 GtkAction *
 e_attachment_bar_recent_action_new (EAttachmentBar *bar, 
 				const gchar *action_name,

Modified: branches/kill-bonobo/widgets/misc/e-charset-picker.c
==============================================================================
--- branches/kill-bonobo/widgets/misc/e-charset-picker.c	(original)
+++ branches/kill-bonobo/widgets/misc/e-charset-picker.c	Mon Jan 26 18:49:51 2009
@@ -31,9 +31,6 @@
 
 #include <glib/gi18n-lib.h>
 
-#include <bonobo/bonobo-ui-node.h>
-#include <bonobo/bonobo-ui-util.h>
-
 typedef enum {
 	E_CHARSET_UNKNOWN,
 	E_CHARSET_ARABIC,

Modified: branches/kill-bonobo/widgets/misc/e-charset-picker.h
==============================================================================
--- branches/kill-bonobo/widgets/misc/e-charset-picker.h	(original)
+++ branches/kill-bonobo/widgets/misc/e-charset-picker.h	Mon Jan 26 18:49:51 2009
@@ -22,7 +22,6 @@
 #define E_CHARSETPICKER_H
 
 #include <gtk/gtk.h>
-#include <bonobo/bonobo-ui-component.h>
 
 G_BEGIN_DECLS
 



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