/* vim: set sw=4 ts=4 et: */
/*
* This file is part of Live Wallpaper (livewp)
- *
+ *
* Copyright (C) 2010 Vlad Vasiliev
* Copyright (C) 2010 Tanya Makova
* for the code
- *
+ *
* This software is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
- *
+ *
* This software is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
/*******************************************************************************/
#include "livewp-config.h"
/*******************************************************************************/
-gint
+gint
current_active_view(void){
GConfClient *gconf_client = NULL;
gint result = -1;
/*******************************************************************************/
#ifdef APPLICATION
-void
+void
fill_priv(Animation_WallpaperPrivate *priv)
{
/* Reset data */
priv->scene_func = (gpointer)&init_scene_Matrix;
if (!strcmp(priv->theme, "Video"))
priv->scene_func = (gpointer)&init_scene_Video;
-
+ if (!strcmp(priv->theme, "Slideshow"))
+ priv->scene_func = (gpointer)&init_scene_Slideshow;
+
priv->extheme_list = get_list_exthemes();
GSList *store = priv->extheme_list;
while (store){
}
#endif
/*******************************************************************************/
-gint
+gint
read_config(Animation_WallpaperPrivate *priv) {
GConfClient *gconf_client = NULL;
str = g_strdup_printf("%s%i", GCONF_KEY_THEME, id);
tmp = gconf_client_get_string(gconf_client,
str, NULL);
- if (str){
+ if (str){
g_free(str);
str = NULL;
- }
+ }
if (tmp){
priv->theme = tmp;
}else
/* get Rich animation default TRUE */
str = g_strdup_printf("%s%i", GCONF_KEY_RANIMATION, id);
value = gconf_client_get(gconf_client, str, NULL);
- if (str){
+ if (str){
g_free(str);
str = NULL;
- }
+ }
if (value) {
priv->rich_animation = gconf_value_get_bool(value);
gconf_value_free(value);
/* get theme additional bool aparametr 1 default TRUE */
str = g_strdup_printf("%s%i", GCONF_KEY_ADDITIONAL_BOOL_1, id);
value = gconf_client_get(gconf_client, str, NULL);
- if (str){
+ if (str){
g_free(str);
str = NULL;
- }
+ }
if (value) {
priv->theme_bool_parametr1 = gconf_value_get_bool(value);
gconf_value_free(value);
/* get theme additional parameter 1 */
str = g_strdup_printf("%s%i", GCONF_KEY_ADDITIONAL_STRING_1 , id);
value = gconf_client_get(gconf_client, str, NULL);
- if (str){
+ if (str){
g_free(str);
str = NULL;
- }
+ }
if (value) {
priv->theme_string_parametr1 = g_strdup(gconf_value_get_string(value));
gconf_value_free(value);
- }
+ }
/* get parameter one theme in all view */
priv->one_in_all_view = get_one_in_all_views_from_config();
return 0;
fprintf(stderr, _("Failed to initialize GConf. Quitting.\n"));
return;
}
-
+
if (priv->theme){
str = g_strdup_printf("%s%i", GCONF_KEY_THEME, id);
gconf_client_set_string(gconf_client,
for (i=1; i<=9; i++){
str = g_strdup_printf("%s%i", GCONF_KEY_THEME, i);
value = gconf_client_get_string(gconf_client, str, NULL);
- if (str){
+ if (str){
g_free(str);
str = NULL;
- }
+ }
if (value && !strcmp(value, theme_name)){
count++;
}