* all:
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Tue, 16 Jan 2007 00:57:37 +0000 (00:57 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Tue, 16 Jan 2007 00:57:37 +0000 (00:57 +0000)
  - small cleanups

pmo-trunk-r637

src/modest-main.c
src/modest-ui.c
src/modest-widget-factory.c
src/modest-widget-memory.c

index 30b857a..ac3821f 100644 (file)
@@ -127,7 +127,8 @@ main (int argc, char *argv[])
        fact = modest_tny_platform_factory_get_instance ();
 
        /* Check modest conf */
        fact = modest_tny_platform_factory_get_instance ();
 
        /* Check modest conf */
-       modest_conf = modest_tny_platform_factory_get_modest_conf_instance (fact);
+       modest_conf = modest_tny_platform_factory_get_conf_instance
+               (MODEST_TNY_PLATFORM_FACTORY(fact));
        if (!modest_conf) {
                g_printerr ("modest: failed to initialize config system, exiting\n");
                retval = MODEST_ERR_CONF;
        if (!modest_conf) {
                g_printerr ("modest: failed to initialize config system, exiting\n");
                retval = MODEST_ERR_CONF;
@@ -253,7 +254,8 @@ send_mail (const gchar* mailto, const gchar *cc, const gchar *bcc,
        int retval;
 
        fact = modest_tny_platform_factory_get_instance ();
        int retval;
 
        fact = modest_tny_platform_factory_get_instance ();
-       acc_mgr = modest_tny_platform_factory_get_modest_account_mgr_instance (fact);
+       acc_mgr = modest_tny_platform_factory_get_account_mgr_instance
+               (MODEST_TNY_PLATFORM_FACTORY(fact));
        acc_store = tny_platform_factory_new_account_store (fact);      
 
        accounts = TNY_LIST(tny_simple_list_new ());
        acc_store = tny_platform_factory_new_account_store (fact);      
 
        accounts = TNY_LIST(tny_simple_list_new ());
index 1136a92..a8bb6bd 100644 (file)
@@ -39,6 +39,7 @@
 #include "modest-tny-platform-factory.h"
 #include "modest-account-view-window.h"
 #include "modest-main-window.h"
 #include "modest-tny-platform-factory.h"
 #include "modest-account-view-window.h"
 #include "modest-main-window.h"
+#include <modest-widget-memory.h>
 #include <tny-error.h>
 #include <tny-simple-list.h>
 
 #include <tny-error.h>
 #include <tny-simple-list.h>
 
@@ -183,7 +184,8 @@ modest_ui_new (TnyAccountStore *account_store)
        
        priv->account_store = account_store;
 
        
        priv->account_store = account_store;
 
-       account_mgr = modest_tny_platform_factory_get_modest_account_mgr_instance (fact);
+       account_mgr = modest_tny_platform_factory_get_account_mgr_instance
+               (MODEST_TNY_PLATFORM_FACTORY(fact));
        if (!account_mgr) {
                g_printerr ("modest: could not create ModestAccountMgr instance\n");
                g_object_unref (obj);
        if (!account_mgr) {
                g_printerr ("modest: could not create ModestAccountMgr instance\n");
                g_object_unref (obj);
@@ -267,7 +269,6 @@ register_stock_icons ()
        if (!registered) {
                GdkPixbuf *pixbuf;
                GtkIconFactory *factory;
        if (!registered) {
                GdkPixbuf *pixbuf;
                GtkIconFactory *factory;
-               gchar *filename;
                gint i;
 
                static GtkStockItem items[] = {
                gint i;
 
                static GtkStockItem items[] = {
@@ -612,13 +613,13 @@ reply_forward (GtkWidget *widget,
        TnyHeader *header;
        TnyFolder *folder;
        gchar *from, *key;
        TnyHeader *header;
        TnyFolder *folder;
        gchar *from, *key;
-       ModestFolderView *folder_view;
        GetMsgAsyncHelper *helper;
        ReplyForwardHelper *rf_helper;
 
        /* Get ModestConf */
        plat_factory = modest_tny_platform_factory_get_instance ();
        GetMsgAsyncHelper *helper;
        ReplyForwardHelper *rf_helper;
 
        /* Get ModestConf */
        plat_factory = modest_tny_platform_factory_get_instance ();
-       conf = modest_tny_platform_factory_get_modest_conf_instance (plat_factory);
+       conf = modest_tny_platform_factory_get_conf_instance
+               (MODEST_TNY_PLATFORM_FACTORY(plat_factory));
 
        /* Get reply or forward type */
        key = g_strdup_printf ("%s/%s", MODEST_CONF_NAMESPACE, 
 
        /* Get reply or forward type */
        key = g_strdup_printf ("%s/%s", MODEST_CONF_NAMESPACE, 
@@ -788,7 +789,6 @@ _modest_ui_actions_on_header_selected (ModestHeaderView *folder_view,
        TnyFolder *folder;
        GetMsgAsyncHelper *helper;
        TnyList *list;
        TnyFolder *folder;
        GetMsgAsyncHelper *helper;
        TnyList *list;
-       TnyIterator *iter;
 
        if (!header)
                return;
 
        if (!header)
                return;
@@ -838,7 +838,8 @@ _modest_ui_actions_on_folder_selection_changed (ModestFolderView *folder_view,
 
        factory = modest_tny_platform_factory_get_instance ();
        header_view = modest_widget_factory_get_header_view (widget_factory);
 
        factory = modest_tny_platform_factory_get_instance ();
        header_view = modest_widget_factory_get_header_view (widget_factory);
-       conf = modest_tny_platform_factory_get_modest_conf_instance (factory);
+       conf = modest_tny_platform_factory_get_conf_instance
+               (MODEST_TNY_PLATFORM_FACTORY(factory));
        g_object_unref (G_OBJECT (widget_factory));
 
        if (!selected) { /* the folder was unselected; save it's settings  */
        g_object_unref (G_OBJECT (widget_factory));
 
        if (!selected) { /* the folder was unselected; save it's settings  */
index 41b5453..3ce6be0 100644 (file)
@@ -247,9 +247,8 @@ modest_widget_factory_get_account_view (ModestWidgetFactory *self)
        g_return_val_if_fail (self, NULL);
        priv =  MODEST_WIDGET_FACTORY_GET_PRIVATE(self);
 
        g_return_val_if_fail (self, NULL);
        priv =  MODEST_WIDGET_FACTORY_GET_PRIVATE(self);
 
-       account_mgr = 
-               modest_tny_platform_factory_get_modest_account_mgr_instance (priv->fact);
-       
+       account_mgr = modest_tny_platform_factory_get_account_mgr_instance
+               (MODEST_TNY_PLATFORM_FACTORY(priv->fact));
        return modest_account_view_new (account_mgr);
 }
 
        return modest_account_view_new (account_mgr);
 }
 
@@ -282,8 +281,9 @@ get_transports (ModestWidgetFactory *self)
        
        priv = MODEST_WIDGET_FACTORY_GET_PRIVATE(self);
 
        
        priv = MODEST_WIDGET_FACTORY_GET_PRIVATE(self);
 
-       account_mgr = 
-               modest_tny_platform_factory_get_modest_account_mgr_instance (priv->fact);
+       account_mgr =
+               modest_tny_platform_factory_get_account_mgr_instance
+               (MODEST_TNY_PLATFORM_FACTORY(priv->fact));
        cursor = accounts = modest_account_mgr_account_names (account_mgr, NULL);
        while (cursor) {
                ModestAccountData *data;
        cursor = accounts = modest_account_mgr_account_names (account_mgr, NULL);
        while (cursor) {
                ModestAccountData *data;
index 3dacf35..70af7af 100644 (file)
@@ -338,7 +338,7 @@ modest_widget_memory_save (ModestConf *conf, GObject *widget, const gchar *name)
        g_return_val_if_fail (conf, FALSE);
        g_return_val_if_fail (widget, FALSE);
        g_return_val_if_fail (name, FALSE);
        g_return_val_if_fail (conf, FALSE);
        g_return_val_if_fail (widget, FALSE);
        g_return_val_if_fail (name, FALSE);
-       
+
        if (GTK_IS_WINDOW(widget))
                return save_settings_window (conf, GTK_WINDOW(widget), name);
        else if (GTK_IS_PANED(widget))
        if (GTK_IS_WINDOW(widget))
                return save_settings_window (conf, GTK_WINDOW(widget), name);
        else if (GTK_IS_PANED(widget))