gint id;
AWallpaperPlugin *desktop_plugin = (AWallpaperPlugin *)widget;
char* child_argv[] = {"/usr/bin/livewp", "0", (char *) 0 };
+ GSList *stlist = NULL;
+ GSList *tmp = NULL;
+ GConfClient *gconf_client = NULL;
+ GConfValue *value = NULL;
+ gboolean result = TRUE;
strid = g_strdup(hd_plugin_item_get_plugin_id (HD_PLUGIN_ITEM (widget)));
desktop_plugin->priv->view = id;
g_free(strid);
+ /* Checking of running view */
+ gconf_client = gconf_client_get_default();
+ if (gconf_client){
+ stlist = gconf_client_get_list(gconf_client,
+ "/apps/osso/hildon-desktop/views/active",
+ GCONF_VALUE_INT, NULL);
+ if (stlist){
+ tmp = stlist;
+ result = FALSE;
+ while (tmp != NULL){
+ if ((id + 1) == GPOINTER_TO_INT(tmp->data))
+ result = TRUE;
+ tmp = g_slist_next(tmp);
+ }
+ g_slist_free(stlist);
+ }
+ g_object_unref(gconf_client);
+ }
+
switch (id){
case 0: child_argv[1] = "1";
break;
}
desktop_plugin->priv->one_in_all_view = get_one_in_all_views_from_config();
/* Check one theme in all view mode */
- if (!desktop_plugin->priv->one_in_all_view ||
- (desktop_plugin->priv->one_in_all_view && id == 0)){
+ if (result &&
+ (!desktop_plugin->priv->one_in_all_view ||
+ (desktop_plugin->priv->one_in_all_view && id == 0))){
/* Start a new process */
desktop_plugin->priv->pid = fork();
if (desktop_plugin->priv->pid == 0){