Merge branch 'master' of https://vcs.maemo.org/git/livewp
authorVlad <vlad@gas.by>
Tue, 21 Sep 2010 06:05:55 +0000 (09:05 +0300)
committerVlad <vlad@gas.by>
Tue, 21 Sep 2010 06:05:55 +0000 (09:05 +0300)
applet/data/external_themes/colorflood.xml
applet/data/external_themes/conky.xml
applet/src/livewp-settings.c

index b0b62c2..4583daa 100644 (file)
@@ -1,5 +1,6 @@
 <theme>
-<name>Colorflood</name>
+ <name>Colorflood</name>
+ <associated_package>colorflood</associated_package>
  <exec_path>/usr/bin/colorflood --livewallpaper</exec_path>
  <window_name>colorflood</window_name>
  <category>Game</category>
index d727a65..2d9ec68 100644 (file)
@@ -6,5 +6,5 @@
     <icon_off>/usr/share/livewp/theme/Conky/icond.png</icon_off>       
     <window_id>-w</window_id>
     <check_path>/usr/bin/conky</check_path>
-    <install_file>http://maemo.org/downloads/product/raw/Maemo5/conky?get_installfile</install_file>                                                                               
+    <install_file>http://maemo.org/downloads/product/raw/Maemo5/conky?get_installfile</install_file>
 </theme>
index d661c40..83f110e 100644 (file)
@@ -601,9 +601,20 @@ rich_animation_additional_parametr(GtkWidget *vbox, Animation_WallpaperPrivate *
 }
 /*******************************************************************************/
 void
+link_button_clicked(GtkButton *button, gchar *url){
+
+  gchar * cmd = g_strdup_printf("dbus-send --print-reply --dest=com.nokia.osso_browser \
+         /com/nokia/osso_browser/service com.nokia.osso_browser.open_new_window string:%s", url);
+  fprintf(stderr, "system %s\n", cmd);
+  system(cmd);
+  g_free(cmd);
+}
+/*******************************************************************************/
+void
 additional_parametr_for_theme_video(GtkWidget *vbox, Animation_WallpaperPrivate *priv){
 
     GtkWidget *file_button;
+    GtkWidget *link_button;
     GtkWidget *smoothing_button;
     GtkWidget *rich_animation_button;
 
@@ -630,9 +641,18 @@ additional_parametr_for_theme_video(GtkWidget *vbox, Animation_WallpaperPrivate
     gtk_box_pack_start(GTK_BOX(vbox),
                                    smoothing_button, TRUE, TRUE, 5);
     g_object_set_data(G_OBJECT(priv->window), "smoothing_button", smoothing_button);
+
+    link_button = hildon_button_new_with_text (HILDON_SIZE_FINGER_HEIGHT,HILDON_BUTTON_ARRANGEMENT_VERTICAL,
+                                                   _("Press me for"), _("download more video"));
+
+    g_signal_connect (link_button, "clicked", G_CALLBACK (link_button_clicked), "http://talk.maemo.org/showthread.php?t=60185");
+    gtk_box_pack_start(GTK_BOX(vbox),
+                                   link_button, TRUE, TRUE, 5);
+
     gtk_widget_show (smoothing_button);
     gtk_widget_show (file_button);
     gtk_widget_show (rich_animation_button);
+    gtk_widget_show (link_button);
 
 }
 /*******************************************************************************/
@@ -667,8 +687,10 @@ lw_theme_settings(GtkWidget *button, Animation_WallpaperPrivate *priv) {
     GtkWidget *temp_button;
     GtkWidget *button1 = NULL;
     GtkWidget *rich_animation_button = NULL;
+    GtkWidget *confirm;
     gint view = priv->view;
     gint count;
+    gchar *text;
 
     window = gtk_dialog_new();
     priv->window = window;
@@ -815,15 +837,28 @@ lw_theme_settings(GtkWidget *button, Animation_WallpaperPrivate *priv) {
                        gchar *check_path = g_hash_table_lookup(store->data, "check_path");
                        if (check_path){
                                if (access(check_path, F_OK) != 0){
-                                       show_problem_package(button, g_hash_table_lookup(store->data, "name"));
                                        gchar * install_file = g_hash_table_lookup(store->data, "install_file");
                                        if (install_file){
-                                               gchar * cmd = g_strdup_printf("dbus-send --print-reply --dest=com.nokia.osso_browser /com/nokia/osso_browser/service com.nokia.osso_browser.open_new_window string:%s",
-                                                                                                                                       install_file);
-                                               fprintf(stderr, "system %s\n", cmd);
-                                               system(cmd);
-                                               g_free(cmd);
-                                       }
+                                    if (g_hash_table_lookup(store->data, "associated_package"))
+                                        text = g_strdup_printf(_("You haven't got the installed package %s. Do you want to install it via using Application Manager?"),
+                                                (gchar *) g_hash_table_lookup(store->data, "associated_package"));
+                                    else
+                                        text = g_strdup_printf(_("You haven't got the installed package %s. Do you want to install it via using Application Manager?"),
+                                                (gchar *)g_hash_table_lookup(store->data, "name"));
+                                    confirm = hildon_note_new_confirmation(GTK_WINDOW(window), text);
+                                    if(GTK_RESPONSE_OK == gtk_dialog_run(GTK_DIALOG(confirm))){
+                                        gchar * cmd = g_strdup_printf("dbus-send --print-reply --dest=com.nokia.osso_browser /com/nokia/osso_browser/service com.nokia.osso_browser.open_new_window string:%s", install_file);
+                                        fprintf(stderr, "system %s\n", cmd);
+                                        system(cmd);
+                                        g_free(cmd);
+                                    }
+                                    g_free(text);
+                                    gtk_widget_destroy(confirm);
+                                       }else
+                                    if (g_hash_table_lookup(store->data, "associated_package"))
+                                               show_problem_package(button, g_hash_table_lookup(store->data, "associated_package"));
+                                    else
+                                               show_problem_package(button, g_hash_table_lookup(store->data, "name"));
                                        /* if not success exit from without saving */
                                        break;
                                }