Exemplo n.º 1
0
static void
manager_select_theme_for_job (GSManager *manager,
                              GSJob     *job)
{
	const char *theme;

	theme = select_theme (manager);

	if (theme != NULL)
	{
		GSThemeInfo    *info;
		const char     *command;

		command = NULL;

		info = gs_theme_manager_lookup_theme_info (manager->priv->theme_manager, theme);
		if (info != NULL)
		{
			command = gs_theme_info_get_exec (info);
		}
		else
		{
			gs_debug ("Could not find information for theme: %s",
			          theme);
		}

		gs_job_set_command (job, command);


		if (info != NULL)
		{
			gs_theme_info_unref (info);
		}
	}
	else
	{
		gs_job_set_command (job, NULL);
	}
}
static void
job_set_theme (GSJob      *job,
               const char *theme)
{
	GSThemeInfo *info;
	const char  *command;

	command = NULL;

	info = gs_theme_manager_lookup_theme_info (theme_manager, theme);
	if (info != NULL)
	{
		command = gs_theme_info_get_exec (info);
	}

	gs_job_set_command (job, command);

	if (info != NULL)
	{
		gs_theme_info_unref (info);
	}
}