+SOURCE_FILES = livewp-main.c \
+ livewp-home-widget.c livewp-home-widget.h \
+ livewp-astro.c livewp-astro.h \
+ livewp-rules.c livewp-rules.h \
+ livewp-settings.c livewp-settings.h livewp-common.h \
+ livewp-config.c livewp-config.h
+
+bin_PROGRAMS = livewp
+livewp_SOURCES = $(SOURCE_FILES)
+
+livewp_CFLAGS = -Wall $(EXAMPLE_CFLAGS)
+
+livewp_LDADD = $(EXAMPLE_LIBS)
+
# We invent desktoplib_LTLIBRARIES instead of the normal lib_LTLIBRARIES,
# so we can specify the non-standard installation directory.
desktoplib_LTLIBRARIES = liblivewp-home-widget.la
desktoplibdir = $(HILDON_DESKTOP_LIB_DIR)
-liblivewp_home_widget_la_SOURCES = livewp-home-widget.c livewp-home-widget.h \
+liblivewp_home_widget_la_SOURCES = livewp-main.c \
+ livewp-home-widget.c livewp-home-widget.h \
livewp-astro.c livewp-astro.h \
livewp-rules.c livewp-rules.h \
livewp-settings.c livewp-settings.h livewp-common.h \
TRUE, 100, 255, NULL, NULL);
scene.actors = g_slist_append(scene.actors, actor);
- actor = init_object(desktop_plugin, "symbols", "symbols_without.png",
+ actor = init_object(desktop_plugin, "symbols", "symbols.png",
0, 0, 10, 800, 480,
TRUE, 100, 255, NULL, NULL);
scene.actors = g_slist_append(scene.actors, actor);
--- /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-settings.h"
+/*******************************************************************************/
+
+int
+main(int argc, char *argv[])
+{
+ GtkWidget *window;
+ gint result;
+
+ gtk_init(&argc, &argv);
+
+ window = create_settings();
+ if (window){
+ //gtk_widget_show_all(window);
+
+ result = gtk_dialog_run(GTK_DIALOG(window));
+
+ switch(result){
+ case GTK_RESPONSE_YES:
+ #if 0
+ if (hildon_button_get_value(HILDON_BUTTON (theme_button))){
+ if (priv->theme)
+ g_free(priv->theme);
+ if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _("Berlin")))
+ priv->theme = g_strdup("Berlin");
+ if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _("Modern")))
+ priv->theme = g_strdup("Modern");
+ if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _("Matrix")))
+ priv->theme = g_strdup("Matrix");
+ if (hildon_check_button_get_active (rich_animation_button))
+ priv->rich_animation = TRUE;
+ else
+ priv->rich_animation = FALSE;
+ }
+ save_config(priv);
+ reload_scene(priv->desktop_plugin);
+ #endif
+ //fprintf(stderr, "click save %s\n", hildon_button_get_value(HILDON_BUTTON(theme_button)));
+ fprintf(stderr, "click save \n");
+ break;
+ default:
+ case GTK_RESPONSE_OK:
+ break;
+ case GTK_RESPONSE_NO:
+ fprintf(stderr, "click about\n");
+ gtk_widget_destroy(window);
+ window = NULL;
+ //lw_about();
+ break;
+ }
+ //if (window)
+ // gtk_widget_destroy(window);
+ //}
+ }
+ gtk_main();
+ return 0;
+}
if (window)
gtk_widget_destroy(window);
}
+
+GtkWidget*
+create_settings(void){
+ gint result;
+ GtkWidget *window = NULL;
+ GtkWidget *save_button;
+ GtkWidget *theme_button;
+ GtkWidget *rich_animation_button;
+
+ window = gtk_dialog_new();
+ gtk_window_set_title(GTK_WINDOW(window), _("Live Wallpaper Settings"));
+ gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
+ gtk_window_set_modal(GTK_WINDOW(window), TRUE);
+ /* Create Theme button */
+ theme_button = create_themes_button("Modern");
+ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(window)->vbox),
+ theme_button, TRUE, TRUE, 5);
+ /* Create rich animation button */
+ rich_animation_button = create_rich_animation_button(TRUE);
+ gtk_box_pack_start(GTK_BOX(GTK_DIALOG(window)->vbox),
+ rich_animation_button, TRUE, TRUE, 5);
+ gtk_widget_show (theme_button);
+ gtk_widget_show (rich_animation_button);
+ gtk_widget_show (window);
+ gtk_dialog_add_button(GTK_DIALOG(window), _("About"), GTK_RESPONSE_NO);
+ save_button = gtk_dialog_add_button(GTK_DIALOG(window), _("Save"), GTK_RESPONSE_YES);
+#if 0
+ result = gtk_dialog_run(GTK_DIALOG(window));
+
+ switch(result){
+ case GTK_RESPONSE_YES:
+ if (hildon_button_get_value(HILDON_BUTTON (theme_button))){
+ if (priv->theme)
+ g_free(priv->theme);
+ if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _("Berlin")))
+ priv->theme = g_strdup("Berlin");
+ if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _("Modern")))
+ priv->theme = g_strdup("Modern");
+ if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _("Matrix")))
+ priv->theme = g_strdup("Matrix");
+ if (hildon_check_button_get_active (rich_animation_button))
+ priv->rich_animation = TRUE;
+ else
+ priv->rich_animation = FALSE;
+ }
+ save_config(priv);
+ reload_scene(priv->desktop_plugin);
+ break;
+ default:
+ case GTK_RESPONSE_OK:
+ break;
+ case GTK_RESPONSE_NO:
+ gtk_widget_destroy(window);
+ window = NULL;
+ lw_about();
+ break;
+ }
+ if (window)
+ gtk_widget_destroy(window);
+#endif
+ return window;
+}
void lw_settings(GtkWidget *widget, Animation_WallpaperPrivate *priv);
void save_config(Animation_WallpaperPrivate *priv);
void reload_scene(AWallpaperPlugin *desktop_plugin);
+GtkWidget* create_settings(void);