rewrote show message
authorvlad <vlad@vlanout.(none)>
Mon, 23 Aug 2010 17:27:47 +0000 (20:27 +0300)
committervlad <vlad@vlanout.(none)>
Mon, 23 Aug 2010 17:27:47 +0000 (20:27 +0300)
applet/debian/changelog
applet/src/livewp-settings.c
applet/src/livewp-settings.h

index d3fc649..85b7121 100644 (file)
@@ -1,5 +1,11 @@
 live-wallpaper (0.8.5) unstable; urgency=low
 
+  * Added theme Conky 
+
+ -- Vlad Vasiliev <vlad@gas.by>  Sun, 23 Aug 2010 07:10:10 +0200
+
+live-wallpaper (0.8.5) unstable; urgency=low
+
   * Fixed number version in dialog "About" 
 
  -- Vlad Vasiliev <vlad@gas.by>  Sun, 23 Aug 2010 07:10:10 +0200
index 93e88af..956b95f 100644 (file)
@@ -159,7 +159,6 @@ set_button_image(GtkWidget * button, Animation_WallpaperPrivate *priv, gboolean
 /********************************************************************************/
 GtkWidget *
 create_image_button (gint view, DBusConnection *conn_sess){
-    GtkWidget *button;
     GtkWidget *event_box;
 
     Animation_WallpaperPrivate *priv = g_new0(Animation_WallpaperPrivate, 1);
@@ -245,8 +244,7 @@ changed_value_category_cb (HildonPickerButton *picker, Animation_WallpaperPrivat
     if (choice){
         if (!strcmp(choice,"Xscreensaver"))
             if (access("/usr/bin/xscreensaver", F_OK) != 0){
-                hildon_banner_show_information(GTK_WIDGET(picker), NULL, 
-                _("You haven't got the installed package Xscreensaver. Please install it via using Application Manager"));
+                show_problem_package((GtkWidget *)picker, "Xscreensaver");
             }
 
     }
@@ -573,6 +571,14 @@ additional_parametr_for_theme_video(GtkWidget *vbox, Animation_WallpaperPrivate
 
 }
 /*******************************************************************************/
+void
+show_problem_package (GtkWidget *widget, gchar *package_name){
+    gchar *text;
+    text = g_strdup_printf(_("You haven't got the installed package %s. Please install it via using Application Manager"), package_name);
+    hildon_banner_show_information(GTK_WIDGET(widget), NULL, text);
+    g_free(text);
+}
+/*******************************************************************************/
 void 
 lw_theme_settings(GtkWidget *button, Animation_WallpaperPrivate *priv) {
     gint result;
@@ -583,7 +589,6 @@ lw_theme_settings(GtkWidget *button, Animation_WallpaperPrivate *priv) {
     GtkWidget *category_button;
     GtkWidget *enable_button;
     GtkWidget *vbox;
-    GtkWidget *temp_button;
     GtkWidget *area_vbox;
     GtkWidget *button1 = NULL;
     GtkWidget *rich_animation_button = NULL;
@@ -652,8 +657,7 @@ lw_theme_settings(GtkWidget *button, Animation_WallpaperPrivate *priv) {
                 /* Check Xsnow program */
                 if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), _("Xsnow"))){
                     if (access("/usr/bin/xsnow", F_OK) != 0){
-                        hildon_banner_show_information(GTK_WIDGET(button), NULL, 
-                        _("You haven't got the installed package Xsnow. Please install it via using Application Manager"));
+                        show_problem_package(button, "Xsnow");
                         /* if not scuccess exit from wthout saving */ 
                         break;
                     }
@@ -661,8 +665,7 @@ lw_theme_settings(GtkWidget *button, Animation_WallpaperPrivate *priv) {
                 /* Check Xsnow program */
                 if (!strcmp(hildon_button_get_value(HILDON_BUTTON (theme_button)), "Shermans Aquarium")){
                     if (access("/usr/bin/shermans", F_OK) != 0){
-                        hildon_banner_show_information(GTK_WIDGET(button), NULL, 
-                        _("You haven't got the installed package 'Sherman's Aquarium'. Please install it via using Application Manager"));
+                        show_problem_package(button,"'Sherman's Aquarium'");
                         /* if not scuccess exit from wthout saving */ 
                         break;
                     }
index df26288..587a701 100644 (file)
@@ -43,4 +43,4 @@ void theme_button_clicked(GtkWidget *button, GdkEventButton *event, Animation_Wa
 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);
-
+void show_problem_package (GtkWidget *widget, gchar *package_name);