X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-widget-factory.h;h=694f0ee879b6c4d12e51d3779e3c38386139dc53;hp=b87618fd7433a50558b9fc735b6e042231ec5ce6;hb=62d983888e426a7c4c483fc16f6a4ded65e583e3;hpb=a20ef3cbb6081c6d0bc18e24165a02f3187a72f6 diff --git a/src/modest-widget-factory.h b/src/modest-widget-factory.h index b87618f..694f0ee 100644 --- a/src/modest-widget-factory.h +++ b/src/modest-widget-factory.h @@ -30,14 +30,14 @@ #ifndef __MODEST_WIDGET_FACTORY_H__ #define __MODEST_WIDGET_FACTORY_H__ -#include #include "modest-account-mgr.h" #include "modest-tny-account-store.h" - #include "widgets/modest-header-view.h" #include "widgets/modest-folder-view.h" #include "widgets/modest-msg-view.h" #include "widgets/modest-account-view.h" +#include "widgets/modest-toolbar.h" +#include "widgets/modest-combo-box.h" G_BEGIN_DECLS @@ -63,6 +63,17 @@ struct _ModestWidgetFactoryClass { /* void (* my_event) (ModestWidgetFactory* obj); */ }; + +typedef enum _ModestComboBoxType { + MODEST_COMBO_BOX_TYPE_STORE_PROTOS, + MODEST_COMBO_BOX_TYPE_TRANSPORT_PROTOS, + MODEST_COMBO_BOX_TYPE_SECURITY_PROTOS, + MODEST_COMBO_BOX_TYPE_AUTH_PROTOS, + MODEST_COMBO_BOX_TYPE_TRANSPORTS +} ModestComboBoxType; +/* typedef enum _ModestComboBoxType ModestComboBoxType; */ + + /** * modest_widget_factory_get_type * @@ -78,17 +89,12 @@ GType modest_widget_factory_get_type (void) G_GNUC_CONST; * @conf: a modest conf instance * @acc_store: a modest account store instance * @acc_mgr: a modest account mgr instance - * @autoconnect: should we autoconnect the widgets (ie. depedent widgets are update - * automagically) * * instantiates a ModestWidgetFactory * * Returns: a new ModestWidgetFactory, or NULL in case of error */ -ModestWidgetFactory* modest_widget_factory_new (ModestConf *conf, - ModestTnyAccountStore *acc_store, - ModestAccountMgr *account_mgr, - gboolean auto_connect); +ModestWidgetFactory* modest_widget_factory_new (void); /** * modest_widget_factory_get_folder_view * @self: a ModestWidgetFactory instance @@ -179,22 +185,71 @@ GtkWidget* modest_widget_factory_get_progress_bar (ModestWidgetFactory *se */ GtkWidget* modest_widget_factory_get_status_bar (ModestWidgetFactory *self); - +/** + * modest_widget_factory_get_store + * @self: a ModestWidgetFactory instance + * @type: the type of items we want a combo box for + * + * return a combobox with with the given items + * + * Returns: the combo box + */ +GtkWidget* modest_widget_factory_get_combo_box (ModestWidgetFactory *self, + ModestComboBoxType type); /** - * modest_widget_factory_get_store + * modest_widget_factory_get_online_combo * @self: a ModestWidgetFactory instance * - * return a combobox with all the store protocols + * return a toggle which with one can see whether online/offline mode is active. + * In case of auto-connect, this will automatically be sync'd with the + * account_store / device * * Returns: the combo box */ -GtkWidget* modest_widget_factory_get_store_combo (ModestWidgetFactory *self); +GtkWidget* modest_widget_factory_get_online_toggle (ModestWidgetFactory *self); +/** + * modest_widget_factory_get_folder_info_label + * @self: a ModestWidgetFactory instance + * + * return a label with the number of items, unread items in the current folder + * + * Returns: the label + */ +GtkWidget* modest_widget_factory_get_folder_info_label (ModestWidgetFactory *self); + + +/** + * modest_widget_factory_get_main_toolbar + * @self: a ModestWidgetFactory instance + * @items: a list of ModestToolbarButtons (button_ids) + * + * returns the main toolbar widget; their enabled/disabled state synchronized with + * the other widgets. Note that after the first calling, this function will + * always return the same toolbar, regardless of the items + * + * Returns: the toolbar + */ +ModestToolbar *modest_widget_factory_get_main_toolbar (ModestWidgetFactory *self, + GSList *items); + +/** + * modest_widget_factory_get_edit_toolbar + * @self: a ModestWidgetFactory instance + * @items: a list of ModestToolbarButtons (button_ids) + * + * returns the toolbar widget for edit windows; the enabled/disabled + * state synchronized with the other widgets. + * + * Returns: the toolbar + */ +ModestToolbar *modest_widget_factory_get_edit_toolbar (ModestWidgetFactory *self, + GSList *items); G_END_DECLS