xsnowthemedir = $(datadir)/livewp/theme/Xsnow
xsnowtheme_DATA = theme/Xsnow/*
+externalthemedir = $(datadir)/livewp/external_themes
+externaltheme_DATA = external_themes/*
+
dbus_servicedir = $(datadir)/dbus-1/services
dbus_service_DATA = org.maemo.livewp.service
$(acceltheme_DATA) \
$(videotheme_DATA) \
$(xshowtheme_DATA) \
+ $(externaltheme_DATA) \
$(dbus_service_DATA)
--- /dev/null
+<theme>
+ <name>Xsnow</name>
+ <exec_path>/usr/bin/xsnow</exec_path>
+</theme>
+live-wallpaper (0.8) unstable; urgency=low
+
+ * New
+
+ -- Vlad Vasiliev <vlad@gas.by> Thu, 03 Aug 2010 21:39:10 +0200
+
live-wallpaper (0.7.1) unstable; urgency=low
* Fixed problem in settings for non English locales
livewp-config.c livewp-config.h \
livewp-dbus.c livewp-dbus.h \
livewp-actor.c livewp-actor.h \
+ livewp-exthemes.c livewp-exthemes.h \
livewp-scene.c livewp-scene.h
panellibdir = $(HILDON_PANEL_LIB_DIR)
liblivewp_panel_widget_la_SOURCES = livewp-settings.c livewp-settings.h livewp-common.h \
- livewp-config.c livewp-config.h \
+ livewp-config.c livewp-config.h \
+ livewp-exthemes.c livewp-exthemes.h \
livewp-control-widget.c livewp-control-widget.h \
livewp-dbus.c livewp-dbus.h
liblivewp_panel_widget_la_LIBADD = $(MAEMO_LIBS) $(OSSO_LIBS) $(CONTROLPANEL_LIBS)
#define Ystartposition 480
#define THEME_PATH "/usr/share/livewp/theme"
+#define EXTHEME_PATH "/usr/share/livewp/external_themes/"
#define SHORT_TIMER 75 /* 100 milisecond */
//#define LONG_TIMER 5*60*1000 /* 10 minutes */
#define LONG_TIMER 20*1000 /* 20 seconds */
--- /dev/null
+/* 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 Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 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
+ * 02110-1301 USA
+*/
+/*******************************************************************************/
+#include "livewp-exthemes.h"
+/*******************************************************************************/
+
+GHashTable *
+parse_theme(gchar *file){
+ GHashTable *hash;
+ hash = g_hash_table_new(g_str_hash, g_str_equal);
+ g_hash_table_insert(hash, g_strdup("name"), g_strdup("Xsnow"));
+ g_hash_table_insert(hash, g_strdup("exec_path"), g_strdup("/usr/bin/xsnow"));
+ return hash;
+}
+
+GSList *
+get_list_exthemes(void){
+ Dirent *dp;
+ DIR *dir_fd;
+ GSList *store = NULL;
+
+ dir_fd = opendir(EXTHEME_PATH);
+ if(dir_fd){
+
+ while((dp = readdir(dir_fd))){
+
+ if(!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, ".."))
+ continue;
+ if(dp->d_type == DT_REG || dp->d_type == DT_LNK){
+ store = g_slist_append(store, parse_theme(dp->d_name));
+ }
+ }
+ closedir(dir_fd);
+ }
+ return store;
+}
--- /dev/null
+/* 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 Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 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
+ * 02110-1301 USA
+*/
+/*******************************************************************************/
+#include "livewp-common.h"
+#include <dirent.h>
+#include <linux/fs.h>
+typedef struct dirent Dirent;
+/*******************************************************************************/
+
+GSList * get_list_exthemes(void);
+
gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
gtk_window_set_modal(GTK_WINDOW(window), TRUE);
vbox = gtk_vbox_new (FALSE, 5);
- label_about = gtk_label_new (_("Live Wallpaper Version 0.7.1 \n Copyright(c) 2010\n \
+ label_about = gtk_label_new (_("Live Wallpaper Version 0.8 \n Copyright(c) 2010\n \
Tanya Makova\n Vlad Vasiliev\n \
Copyright(c) 2010 for design themes Berlin, Modern and Accel Vasya Bobrikov\n \
Copyright(c) 2010 for design theme Matrix Andrew Zhilin\n \
/*******************************************************************************/
GtkWidget *
create_theme_selector (void){
- GtkWidget *selector;
-
- selector = hildon_touch_selector_new_text ();
+ GtkWidget *selector;
+ GSList * store = get_list_exthemes();
+
+ selector = hildon_touch_selector_new_text ();
+
+ hildon_touch_selector_append_text (HILDON_TOUCH_SELECTOR (selector), _("Berlin"));
+ hildon_touch_selector_append_text (HILDON_TOUCH_SELECTOR (selector), _("Modern"));
+ hildon_touch_selector_append_text (HILDON_TOUCH_SELECTOR (selector), _("Matrix"));
+ hildon_touch_selector_append_text (HILDON_TOUCH_SELECTOR (selector), _("Accel"));
+ hildon_touch_selector_append_text (HILDON_TOUCH_SELECTOR (selector), _("Video"));
+ while (store){
+ hildon_touch_selector_append_text (HILDON_TOUCH_SELECTOR (selector), g_hash_table_lookup(store->data, "name"));
+ store = g_slist_next(store);
+ }
- hildon_touch_selector_append_text (HILDON_TOUCH_SELECTOR (selector), _("Berlin"));
- hildon_touch_selector_append_text (HILDON_TOUCH_SELECTOR (selector), _("Modern"));
- hildon_touch_selector_append_text (HILDON_TOUCH_SELECTOR (selector), _("Matrix"));
- hildon_touch_selector_append_text (HILDON_TOUCH_SELECTOR (selector), _("Accel"));
- hildon_touch_selector_append_text (HILDON_TOUCH_SELECTOR (selector), _("Video"));
- hildon_touch_selector_append_text (HILDON_TOUCH_SELECTOR (selector), _("Xsnow"));
- return selector;
+ return selector;
}
/*******************************************************************************/
void
if (!strcmp(choice, _("Matrix"))){
rich_animation_additional_parametr(vbox,priv);
}
- if (!strcmp(choice, _("Xsnow"))){
- rich_animation_additional_parametr(vbox,priv);
- }
if (!strcmp(choice, _("Accel"))){
rich_animation_additional_parametr(vbox,priv);
hildon_touch_selector_set_active (HILDON_TOUCH_SELECTOR (selector), 0, 4);
hildon_button_set_value(HILDON_BUTTON(button), _("Video"));
}
- if (!strcmp(theme, "Xsnow")){
- hildon_touch_selector_set_active (HILDON_TOUCH_SELECTOR (selector), 0, 5);
- hildon_button_set_value(HILDON_BUTTON(button), _("Xsnow"));
- }
}
return button;
if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _("Berlin"))||
!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _("Matrix"))||
!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _("Accel"))||
- !strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _("Xsnow"))||
!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _("Modern"))){
rich_animation_additional_parametr(vbox, priv);
}
priv->theme = g_strdup("Matrix");
if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _("Accel")))
priv->theme = g_strdup("Accel");
- if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _("Xsnow")))
- priv->theme = g_strdup("Xsnow");
if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _("Video"))){
priv->theme = g_strdup("Video");
button1 = g_object_get_data(G_OBJECT(priv->window), "filename_button");
*/
/*******************************************************************************/
#include "livewp-common.h"
+
#include <hildon-fm-2/hildon/hildon-file-chooser-dialog.h>
#include <unistd.h>
void lw_main_settings(Animation_WallpaperPrivate *priv, gpointer data);
void theme_button_clicked(GtkButton *button, Animation_WallpaperPrivate *priv);
void rich_animation_additional_parametr(GtkWidget *vbox, Animation_WallpaperPrivate *priv);
void additional_parametr_for_theme_video(GtkWidget *vbox, Animation_WallpaperPrivate *priv);
-
+GSList * get_list_exthemes(void);