1 /* vim: set sw=4 ts=4 et: */
3 * This file is part of Live Wallpaper (livewp)
5 * Copyright (C) 2010 Vlad Vasiliev
6 * Copyright (C) 2010 Tanya Makova
9 * This software is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public License
11 * as published by the Free Software Foundation; either version 2.1 of
12 * the License, or (at your option) any later version.
14 * This software is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this software; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
24 /*******************************************************************************/
25 #include "livewp-common.h"
26 #include "livewp-settings.h"
27 /*******************************************************************************/
30 main(int argc, char *argv[])
32 GtkWidget *main_widget = NULL;
36 osso_context_t *osso_context=NULL;
37 Animation_WallpaperPrivate *priv = g_new0 (Animation_WallpaperPrivate, 1);
40 setlocale(LC_ALL, "");
41 bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
42 bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
43 textdomain(GETTEXT_PACKAGE);
46 hildon_gtk_init (&argc, &argv);
47 app = HILDON_PROGRAM (hildon_program_get_instance());
48 g_set_application_name (PACKAGE);
50 osso_context = osso_initialize("org.maemo.livewp", VERSION, TRUE, NULL);
52 fprintf(stderr,"osso_initialize failed\n");
60 main_widget = hildon_stackable_window_new ();
61 gtk_window_set_title(GTK_WINDOW(main_widget), PACKAGE);
62 hildon_program_add_window(app, HILDON_WINDOW(main_widget));
64 gtk_widget_show_all(GTK_WIDGET(main_widget));
66 window = create_settings();
68 //gtk_widget_show_all(window);
70 result = gtk_dialog_run(GTK_DIALOG(window));
73 case GTK_RESPONSE_YES:
75 if (hildon_button_get_value(HILDON_BUTTON (theme_button))){
78 if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _("Berlin")))
79 priv->theme = g_strdup("Berlin");
80 if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _("Modern")))
81 priv->theme = g_strdup("Modern");
82 if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _("Matrix")))
83 priv->theme = g_strdup("Matrix");
84 if (hildon_check_button_get_active (rich_animation_button))
85 priv->rich_animation = TRUE;
87 priv->rich_animation = FALSE;
90 reload_scene(priv->desktop_plugin);
92 //fprintf(stderr, "click save %s\n", hildon_button_get_value(HILDON_BUTTON(theme_button)));
93 fprintf(stderr, "click save \n");
99 fprintf(stderr, "click about\n");
100 gtk_widget_destroy(window);
106 // gtk_widget_destroy(window);
110 fprintf(stderr,"start fdf\n");