Log In
New Account
  
Home My Page Project Cloud Code Snippets Project Openings modest
Summary Lists SCM Wiki

Modest Ui Actions And Dimmingmanager

Modest UI actions and dimming manager

In Modest we put most of the application user actions logic in the methods called "UI actions".

"UI actions" are methods expected to be launched from events, common to all platforms, so that we share as much as possible of logic implementation among toolkits and platforms.

In Modest we also provide a system to handle dimming of UI actions and widgets depending on the possibility to do the action.

UI actions

The UI actions are all in file src/modest-ui-actions.c.

The includes are in:

  • src/modest-ui-actions.h: general ui actions, not exposed through plugin API
  • src/modest-plugin-ui-actions.h: ui actions exposed through plugin API, to be used by plugins.

Dimming manager

The dimming manager is a registry of widgets and runtime rules for being "dimmed" or "hidden".

The policy of being dimmed or hidden depends on the toolkit and platform. I.e. in hildon2.2 the menu buttons are hidden when they're not available., and the toolbar buttons are dimmed.

The ModestWindow instance should have a ui dimming manager, where the implementation will register the widgets.

THe dimming manager provides two ways to register dimming rules:

  • Associating it to a GtkUIManager, and setting the path for the GtkAction the rule applies.
  • Directly associating it to a widget.

The dimming rules are stored in groups, and the rules are evaluated per group too. The typical thing is having the rules grouped per evaluation point needed:

  • A group for rules that change on changing the clipboard
  • A group for rules that should be evaluated on showing the menus
  • ...

The dimming rules are all in file src/modest-ui-dimming-rules.c.


(last edited February 23, 2010) - Read Only [info] [diff])
FindPage by browsing or searching
5 best incoming links: ModestArchitecture (5), RecentChanges (5)
5 best outgoing links:
5 most popular nearby: ModestArchitecture (3125), RecentChanges (463)

Terms of Use    Privacy Policy    Contribution Guidelines    Feedback

Powered By GForge Collaborative Development Environment