* some tiny changes in modest-tny-platform-factory
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Tue, 16 Jan 2007 00:53:31 +0000 (00:53 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Tue, 16 Jan 2007 00:53:31 +0000 (00:53 +0000)
pmo-trunk-r634

src/gtk/modest-account-view-window.c
src/gtk/modest-edit-msg-window.c
src/gtk/modest-main-window.c
src/modest-tny-platform-factory.c
src/modest-tny-platform-factory.h

index ec778e2..55000b6 100644 (file)
@@ -157,7 +157,8 @@ on_remove_button_clicked (GtkWidget *button, ModestAccountViewWindow *self)
        
        priv = MODEST_ACCOUNT_VIEW_WINDOW_GET_PRIVATE(self);
        fact = modest_tny_platform_factory_get_instance ();
        
        priv = MODEST_ACCOUNT_VIEW_WINDOW_GET_PRIVATE(self);
        fact = modest_tny_platform_factory_get_instance ();
-       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));
 
        account_name = modest_account_view_get_selected_account (priv->account_view);
 
 
        account_name = modest_account_view_get_selected_account (priv->account_view);
 
@@ -216,7 +217,8 @@ on_add_button_clicked (GtkWidget *button, ModestAccountViewWindow *self)
        
        priv = MODEST_ACCOUNT_VIEW_WINDOW_GET_PRIVATE(self);
        fact = modest_tny_platform_factory_get_instance ();
        
        priv = MODEST_ACCOUNT_VIEW_WINDOW_GET_PRIVATE(self);
        fact = modest_tny_platform_factory_get_instance ();
-       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));
 
        assistant = modest_account_assistant_new (account_mgr,
                                                  priv->widget_factory);
 
        assistant = modest_account_assistant_new (account_mgr,
                                                  priv->widget_factory);
index c8caffe..dfd1fb4 100644 (file)
@@ -137,7 +137,8 @@ save_settings (ModestEditMsgWindow *self)
        ModestConf *conf;
 
        priv = MODEST_EDIT_MSG_WINDOW_GET_PRIVATE(self);
        ModestConf *conf;
 
        priv = MODEST_EDIT_MSG_WINDOW_GET_PRIVATE(self);
-       conf = modest_tny_platform_factory_get_modest_conf_instance (priv->fact);
+       conf = modest_tny_platform_factory_get_conf_instance
+               (MODEST_TNY_PLATFORM_FACTORY(priv->fact));
 
        modest_widget_memory_save (conf, G_OBJECT(self), "modest-edit-msg-window");
 }
 
        modest_widget_memory_save (conf, G_OBJECT(self), "modest-edit-msg-window");
 }
@@ -150,8 +151,8 @@ restore_settings (ModestEditMsgWindow *self)
        ModestConf *conf;
 
        priv = MODEST_EDIT_MSG_WINDOW_GET_PRIVATE(self);
        ModestConf *conf;
 
        priv = MODEST_EDIT_MSG_WINDOW_GET_PRIVATE(self);
-       conf = modest_tny_platform_factory_get_modest_conf_instance (priv->fact);
-
+       conf = modest_tny_platform_factory_get_conf_instance
+               (MODEST_TNY_PLATFORM_FACTORY(priv->fact));
        modest_widget_memory_restore (conf, G_OBJECT(self), "modest-edit-msg-window");
 }
 
        modest_widget_memory_restore (conf, G_OBJECT(self), "modest-edit-msg-window");
 }
 
@@ -385,7 +386,7 @@ modest_edit_msg_window_get_msg_data (ModestEditMsgWindow *edit_window)
 
        /* don't free these (except from) */
        data = g_slice_new0 (MsgData);
 
        /* don't free these (except from) */
        data = g_slice_new0 (MsgData);
-       data->from    =  g_strdup_printf ("%s <%s>", account_data->full_name, account_data->email) ;
+       data->from    =  g_strdup_printf ("%s <%s>", account_data->fullname, account_data->email) ;
        data->to      =  (gchar*) gtk_entry_get_text (GTK_ENTRY(priv->to_field));
        data->cc      =  (gchar*) gtk_entry_get_text (GTK_ENTRY(priv->cc_field));
        data->bcc     =  (gchar*) gtk_entry_get_text (GTK_ENTRY(priv->bcc_field));
        data->to      =  (gchar*) gtk_entry_get_text (GTK_ENTRY(priv->to_field));
        data->cc      =  (gchar*) gtk_entry_get_text (GTK_ENTRY(priv->cc_field));
        data->bcc     =  (gchar*) gtk_entry_get_text (GTK_ENTRY(priv->bcc_field));
index 1f72df2..3e1fe2e 100644 (file)
@@ -66,7 +66,7 @@ struct _ModestMainWindowPrivate {
        GtkUIManager *ui_manager;
        ModestWidgetFactory *widget_factory;
        TnyPlatformFactory *factory;
        GtkUIManager *ui_manager;
        ModestWidgetFactory *widget_factory;
        TnyPlatformFactory *factory;
-       TnyAccountStore *account_store;
+       ModestTnyAccountStore *account_store;
        
        GtkWidget *toolbar;
        GtkWidget *menubar;
        
        GtkWidget *toolbar;
        GtkWidget *menubar;
@@ -213,7 +213,8 @@ restore_sizes (ModestMainWindow *self)
        ModestMainWindowPrivate *priv;
        
        priv = MODEST_MAIN_WINDOW_GET_PRIVATE(self);
        ModestMainWindowPrivate *priv;
        
        priv = MODEST_MAIN_WINDOW_GET_PRIVATE(self);
-       conf = modest_tny_platform_factory_get_modest_conf_instance (priv->factory);
+       conf = modest_tny_platform_factory_get_conf_instance
+               (MODEST_TNY_PLATFORM_FACTORY(priv->factory));
 
        modest_widget_memory_restore (conf, G_OBJECT(priv->folder_paned),
                                      "modest-folder-paned");
 
        modest_widget_memory_restore (conf, G_OBJECT(priv->folder_paned),
                                      "modest-folder-paned");
@@ -235,7 +236,8 @@ save_sizes (ModestMainWindow *self)
        ModestConf *conf;
        
        priv = MODEST_MAIN_WINDOW_GET_PRIVATE(self);
        ModestConf *conf;
        
        priv = MODEST_MAIN_WINDOW_GET_PRIVATE(self);
-       conf = modest_tny_platform_factory_get_modest_conf_instance (priv->factory);
+       conf = modest_tny_platform_factory_get_conf_instance
+               (MODEST_TNY_PLATFORM_FACTORY(priv->factory));
        
        modest_widget_memory_save (conf,G_OBJECT(self), "modest-main-window");
        modest_widget_memory_save (conf, G_OBJECT(priv->folder_paned),
        
        modest_widget_memory_save (conf,G_OBJECT(self), "modest-main-window");
        modest_widget_memory_save (conf, G_OBJECT(priv->folder_paned),
@@ -380,7 +382,7 @@ modest_main_window_new (ModestWidgetFactory *widget_factory,
        gtk_window_set_icon  (GTK_WINDOW(obj),
                              modest_icon_factory_get_icon (MODEST_APP_ICON));  
        gtk_widget_show_all (main_vbox);
        gtk_window_set_icon  (GTK_WINDOW(obj),
                              modest_icon_factory_get_icon (MODEST_APP_ICON));  
        gtk_widget_show_all (main_vbox);
-
+       
        g_signal_connect (G_OBJECT(obj), "delete-event",
                          G_CALLBACK(on_delete_event), obj);
        
        g_signal_connect (G_OBJECT(obj), "delete-event",
                          G_CALLBACK(on_delete_event), obj);
        
index f968dfb..dcf393f 100644 (file)
@@ -218,7 +218,7 @@ modest_tny_platform_factory_new_account_store (TnyPlatformFactory *self)
 
        if (!priv->account_store) {
                if (!priv->account_mgr)
 
        if (!priv->account_store) {
                if (!priv->account_mgr)
-                       modest_tny_platform_factory_get_modest_account_mgr_instance (self);
+                       modest_tny_platform_factory_get_account_mgr_instance (self);
 
                priv->account_store = modest_tny_account_store_new (priv->account_mgr);
        }
 
                priv->account_store = modest_tny_account_store_new (priv->account_mgr);
        }
@@ -235,7 +235,7 @@ modest_tny_platform_factory_new_device (TnyPlatformFactory *self)
 #elif MODEST_PLATFORM_ID==2
        return TNY_DEVICE (tny_maemo_device_new ());
 #else
 #elif MODEST_PLATFORM_ID==2
        return TNY_DEVICE (tny_maemo_device_new ());
 #else
-       return NULL;
+       g_return_val_if_reached (NULL);
 #endif /* MODEST_PLATFORM */
 }
 
 #endif /* MODEST_PLATFORM */
 }
 
@@ -268,7 +268,7 @@ modest_tny_platform_factory_new_header (TnyPlatformFactory *self)
 
 
 ModestAccountMgr *
 
 
 ModestAccountMgr *
-modest_tny_platform_factory_get_modest_account_mgr_instance (TnyPlatformFactory *fact)
+modest_tny_platform_factory_get_account_mgr_instance (ModestTnyPlatformFactory *fact)
 {
        ModestTnyPlatformFactoryPrivate *priv;
 
 {
        ModestTnyPlatformFactoryPrivate *priv;
 
@@ -276,8 +276,7 @@ modest_tny_platform_factory_get_modest_account_mgr_instance (TnyPlatformFactory
 
        if (!priv->account_mgr) {
                if (!priv->conf)
 
        if (!priv->account_mgr) {
                if (!priv->conf)
-                       modest_tny_platform_factory_get_modest_conf_instance (fact);
-
+                       modest_tny_platform_factory_get_conf_instance (fact);
                priv->account_mgr = modest_account_mgr_new (priv->conf);
        }
 
                priv->account_mgr = modest_account_mgr_new (priv->conf);
        }
 
@@ -285,7 +284,7 @@ modest_tny_platform_factory_get_modest_account_mgr_instance (TnyPlatformFactory
 }
 
 ModestConf *
 }
 
 ModestConf *
-modest_tny_platform_factory_get_modest_conf_instance (TnyPlatformFactory *fact)
+modest_tny_platform_factory_get_conf_instance (ModestTnyPlatformFactory *fact)
 {
        ModestTnyPlatformFactoryPrivate *priv;
 
 {
        ModestTnyPlatformFactoryPrivate *priv;
 
@@ -298,7 +297,7 @@ modest_tny_platform_factory_get_modest_conf_instance (TnyPlatformFactory *fact)
 }
 
 ModestMailOperationQueue*   
 }
 
 ModestMailOperationQueue*   
-modest_tny_platform_factory_get_modest_mail_operation_queue_instance (TnyPlatformFactory *fact)
+modest_tny_platform_factory_get_mail_operation_queue_instance (ModestTnyPlatformFactory *fact)
 {
        ModestTnyPlatformFactoryPrivate *priv;
 
 {
        ModestTnyPlatformFactoryPrivate *priv;
 
index 053b821..fdd92ea 100644 (file)
@@ -75,7 +75,7 @@ GType        modest_tny_platform_factory_get_type    (void) G_GNUC_CONST;
 TnyPlatformFactory*    modest_tny_platform_factory_get_instance         (void);
 
 /**
 TnyPlatformFactory*    modest_tny_platform_factory_get_instance         (void);
 
 /**
- * modest_tny_platform_factory_get_modest_account_mgr_instance:
+ * modest_tny_platform_factory_get_account_mgr_instance:
  * @fact: the #TnyPlatformFactory that holds the #ModestAccountMgr instance
  * 
  * Gets a new instance of a #ModestAccountMgr if it is the first call
  * @fact: the #TnyPlatformFactory that holds the #ModestAccountMgr instance
  * 
  * Gets a new instance of a #ModestAccountMgr if it is the first call
@@ -84,10 +84,10 @@ TnyPlatformFactory*    modest_tny_platform_factory_get_instance         (void);
  * 
  * Returns: an instance of a #ModestAccountMgr
  **/
  * 
  * Returns: an instance of a #ModestAccountMgr
  **/
-ModestAccountMgr*  modest_tny_platform_factory_get_modest_account_mgr_instance (TnyPlatformFactory *fact);
+ModestAccountMgr*  modest_tny_platform_factory_get_account_mgr_instance (ModestTnyPlatformFactory *fact);
 
 /**
 
 /**
- * modest_tny_platform_factory_get_modest_conf_instance:
+ * modest_tny_platform_factory_get_conf_instance:
  * @fact: the #TnyPlatformFactory that holds the #ModestConf instance
  * 
  * Gets a new instance of a #ModestConf if it is the first call to the
  * @fact: the #TnyPlatformFactory that holds the #ModestConf instance
  * 
  * Gets a new instance of a #ModestConf if it is the first call to the
@@ -96,10 +96,10 @@ ModestAccountMgr*  modest_tny_platform_factory_get_modest_account_mgr_instance (
  * 
  * Returns: an instance of a #ModestConf
  **/
  * 
  * Returns: an instance of a #ModestConf
  **/
-ModestConf*     modest_tny_platform_factory_get_modest_conf_instance (TnyPlatformFactory *fact);
+ModestConf*     modest_tny_platform_factory_get_conf_instance (ModestTnyPlatformFactory *fact);
 
 /**
 
 /**
- * modest_tny_platform_factory_get_modest_mail_operation_queue_instance:
+ * modest_tny_platform_factory_get_mail_operation_queue_instance:
  * @fact: the #TnyPlatformFactory that holds the #ModestMailOperationQueue instance
  * 
  * Gets a new instance of a #ModestMailOperationQueue if it is the
  * @fact: the #TnyPlatformFactory that holds the #ModestMailOperationQueue instance
  * 
  * Gets a new instance of a #ModestMailOperationQueue if it is the
@@ -108,7 +108,7 @@ ModestConf*     modest_tny_platform_factory_get_modest_conf_instance (TnyPlatfor
  * 
  * Returns: an instance of a #ModestMailOperationQueue
  **/
  * 
  * Returns: an instance of a #ModestMailOperationQueue
  **/
-ModestMailOperationQueue*   modest_tny_platform_factory_get_modest_mail_operation_queue_instance (TnyPlatformFactory *fact);
+ModestMailOperationQueue*   modest_tny_platform_factory_get_mail_operation_queue_instance (ModestTnyPlatformFactory *fact);
 
 G_END_DECLS
 
 
 G_END_DECLS