app: Clarify session_init() a bit

Clarify session_init() by adding comments and using
gimp_config_deserialize() and g_str_equal() in sessionrc parsing.
This commit is contained in:
Martin Nordholts 2009-09-19 18:00:15 +02:00
parent a0923b62ee
commit c8853243ea
1 changed files with 10 additions and 5 deletions

View File

@ -147,19 +147,24 @@ session_init (Gimp *gimp)
info = gimp_session_info_new ();
if (strcmp (entry_name, "dock"))
/* "dock" entries in the "dock" factory are just dummy
* entries and don't have any dialog factory entry, so
* don't bother looking for entires for them
*/
if (!g_str_equal (entry_name, "dock"))
{
info->toplevel_entry = gimp_dialog_factory_find_entry (factory,
entry_name);
/* If we expected a dialog factory entry but failed
* to find one, skip to add this session info object
*/
skip = (info->toplevel_entry == NULL);
}
g_free (entry_name);
if (GIMP_CONFIG_GET_INTERFACE (info)->deserialize (GIMP_CONFIG (info),
scanner,
1,
NULL))
if (gimp_config_deserialize (GIMP_CONFIG (info), scanner, 1, NULL))
{
if (! skip)
{