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

Modest Windows And Window Management

Modest windows and window management

Window management

In modest, we have an object called ModestWindowMgr. This is used to implement policies about when to open or close windows, and also for storing the status of current opened windows set.

The main idea is implementing specific policies adapted to the window management proper of each platform.

We provide two window manager implementations:

  • Hildon2.2 one. Using HildonStackableWindow
  • Gtk one: Using the ModestShell (available since Modest 3.90.x).

The main methods of the window manager object are:

  • register_window: registers a window created, to be shown. This will show the view.
  • unregister_window: used to remove the window from the window manager, and close it properly.
  • close_all_windows: close all windows in modest (or tries to close).
  • close_all_but_initial: closes all windows but the initial one.
  • show_initial_window: shows the initial window for modest (i.e. ModestAccountsWindow in hildon2.2, or accounts window inside the ModestShell in gtk).
  • set/get_fullscreen_mode: sets the global fullscreen mode.
  • set_modal: register a window as modal of another one, taking into account all hacks and exceptions we need in !Modest. This is important as we cannot simply rely on window manager (very important in Fremantle as window manager is broken and may fail to show proper window on top, the one with keyboard focus).
  • get_modal. obtains the window with current input focus.
  • find_registered_header and find_registered_uid: checks if there's already a window opened for an specific header or uid.
  • get_window_list: allows to get all registered ModestWindow instances.

It also provide these signals:

  • window-list-empty: used to notify there's no window visible, and that it may happen that modest can be closed (no windows and no mail operations running).
  • progress-list-changed: the list of mail operations in progress has changed.


All Modest toplevel views inherit from ModestWindow.

It provides virtual methods for:

  • Zoom handling. Allows to control zoom level of views through this.
  • Toolbars: a ModestWindow always has the capability to add/remove toolbars.
  • Setting title (since modest 3.90.x): set the title of the window.
  • Add items to app menu (since modest 3.90.x): add items to the menu, items created from toolkit factory.
  • Edit mode handling: in hildon2.2 it provides integration with edit modes.

Depending on the platform, ModestWindow inherits from a different window:

  • In hildon2.2 it inherits from HildonStackableWindow
  • In gtk it's not even a GtkWindow, but a GtkContainer. This is because the views in Modest gtk 3.90.x are just embedded into the ModestShell, which is the real ModestWindow.

Hildon window manager

In Hildon2.2 platform we have the stackable windows framework. The idea is that you only see one app at a time, and each "app view" is a stack of views (windows) you can browse.

To provide proper integration into Fremantle, we provide a window manager following and using stackables behavior.

Gtk window manager and ModestShell? (since Modest 3.90.x).

In gtk we provide a UI based on a single window containing all the view. This window is ModestShell. The goal of ModestShell is showing a behavior similar to Hildon 2.2 window stacks, but without Hildon nor window management help.

It provides:

  • A button showing current window title and path. Tapping on it shows the current view menu.
  • Back button, to close current window and go to the previous one.
  • New message button.
  • Progress animation.
  • THe current view, embedded (it uses a GtkNotebook inside).

Modest windows

The ModestWindow objects provided by Modest are specific views for each UI state:

  • ModestAccountsWindow: initial view. Shows the list of accounts set up in !Modest. The list is implemented using ModestAccountView widget. Tapping on account it opens a ModestFolderWindow with the list of folders for that account, or a ModestMailboxesWindow (in case the account is a multimailbox one).
  • ModestMailboxesWindow. List of mailboxes of a multimailbox account. THe list is implemented using a ModestFolderView.
  • ModestFolderWindow. List of folders of an account, and the local and MMC archive folders. The list is implemented using a ModestFolderView. It supports edit modes in Hildon 2.2 with single selection for moving, renaming or deleting folders.
  • !ModestHeaderWIndow. List of messages in a folder. The list is implemented using the ModestHeaderView widget. It supports edit modes in hildon 2.2 with multiple selection for moving and deleting messages.
  • ModestMsgViewWindow: shows a message or an attached message. The view is implemented using one of the ModestMsgViewWindow implementations: gtkhtml (default), mozembed (deprecated) and webkit (experimental).
  • ModestMsgEditWindow: edits a message. It uses the widget WpTextView from wpeditor library.

(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: ModestShell (2)ModestWindow (2)
5 most popular nearby: ModestArchitecture (3994), RecentChanges (685), ModestShell (148), ModestWindow (111)

Terms of Use    Privacy Policy    Contribution Guidelines    Feedback

Powered By GForge Collaborative Development Environment