app: Add a 'restore_func' to GimpDialogFactoryEntry

In gimp_session_info_restore() there is code to create a dialog from a
session info. GimpSessionInfo lives in the widgets module. Thus we
can't add restoration code that depends on a higher level module. In
particular, we can't add code to restore docks in an GimpImageWindow
since GimpImageWindow lives in the display module. And we need such
code to be able to restore a single-window mode session.

Since dialogs are defined in the dialogs module, it makes sense to
also have the code that restores a dialog in that module.

So, add a 'restore_func' member to GimpRestoreDialogFunc of type
GimpRestoreDialogFunc and move the code there.
This commit is contained in:
Martin Nordholts
2011-05-27 17:16:04 +02:00
parent c73ff51b82
commit 396d5fd5e8
6 changed files with 208 additions and 147 deletions

View File

@ -66,6 +66,7 @@ void gimp_session_info_read_geometry (GimpSe
void gimp_session_info_get_info (GimpSessionInfo *info);
void gimp_session_info_get_info_with_widget (GimpSessionInfo *info,
GtkWidget *widget);
GList * gimp_session_info_get_aux_info (GimpSessionInfo *info);
void gimp_session_info_clear_info (GimpSessionInfo *info);
gboolean gimp_session_info_is_singleton (GimpSessionInfo *info);
gboolean gimp_session_info_is_session_managed (GimpSessionInfo *info);