X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fwidgets%2Fmodest-window.h;h=03acc1c0c600eb39eb045a127a3bed74c1ddd2d9;hb=bc6ade609440e9f083c8f8d7a5ed4af4531f4365;hp=be1c722fe645c573560d6f5f1e28ac6e59ab2032;hpb=362784ce756b3f0e31cd451d9ac5e69b909d4053;p=modest diff --git a/src/widgets/modest-window.h b/src/widgets/modest-window.h index be1c722..03acc1c 100644 --- a/src/widgets/modest-window.h +++ b/src/widgets/modest-window.h @@ -40,7 +40,7 @@ G_BEGIN_DECLS #endif /*HAVE_CONFIG_H*/ #include - + /* * admittedly, the ifdefs for gtk and maemo are rather ugly; still * this way is probably the easiest to maintain @@ -66,6 +66,22 @@ typedef HildonWindowClass ModestWindowParentClass; #endif /*MODEST_PLATFORM_MAEMO */ +/* Dimmed state variables */ +typedef struct _DimmedState { + guint n_selected; + guint already_opened_msg; + gboolean any_marked_as_deleted; + gboolean all_marked_as_deleted; + gboolean any_marked_as_seen; + gboolean all_marked_as_seen; + gboolean any_marked_as_cached; + gboolean all_marked_as_cached; + gboolean any_has_attachments; + gboolean all_has_attachments; + gboolean sent_in_progress; + gboolean all_selected; +} DimmedState; + /* convenience macros */ #define MODEST_TYPE_WINDOW (modest_window_get_type()) #define MODEST_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),MODEST_TYPE_WINDOW,ModestWindow)) @@ -121,7 +137,8 @@ const gchar* modest_window_get_active_account (ModestWindow *self); * @self: a modest window instance * @active_account: a new active account name for this window * - * set the active account for this window + * set the active account for this window. + * NOTE: this must be a valid, non-pseudo account. * */ void modest_window_set_active_account (ModestWindow *self, const gchar *active_account); @@ -189,6 +206,31 @@ void modest_window_save_state (ModestWindow *window); /** + * modest_window_set_dimming_state: + * @window: a #ModestWindow instance object + * @state: the #DimmedState state at specific time + * + * Set basic dimming variables from selected headers at + * specific moment. + **/ +void +modest_window_set_dimming_state (ModestWindow *window, + DimmedState *state); + +/** + * modest_window_set_dimming_state: + * @window: a #ModestWindow instance object + * + * Set basic dimming variables from selected headers at + * specific moment. + * + * @Returns: a #DimmedState state saved previously. + **/ +const DimmedState * +modest_window_get_dimming_state (ModestWindow *window); + + +/** * modest_window_get_action: * @window: a #ModestWindow instance object * @action_path: the full path of required action. @@ -233,6 +275,26 @@ void modest_window_check_dimming_rules_group (ModestWindow *self, const gchar *group_name); +/** + * modest_window_enable_dimming: + * @self: a #ModestWindow instance object + * + * Enables UI dimming rules checking. + * + **/ +void modest_window_enable_dimming (ModestWindow *self); + + +/** + * modest_window_disable_dimming: + * @self: a #ModestWindow instance object + * + * Disables UI dimming rules checking. + * + **/ +void modest_window_disable_dimming (ModestWindow *self); + + void modest_window_disconnect_signals (ModestWindow *self);