2008-07-07 [colin] 3.5.0cvs19
authorColin Leroy <colin@colino.net>
Mon, 7 Jul 2008 17:51:14 +0000 (17:51 +0000)
committerColin Leroy <colin@colino.net>
Mon, 7 Jul 2008 17:51:14 +0000 (17:51 +0000)
* src/prefs_themes.c
Make upgrading themes easier

ChangeLog
PATCHSETS
configure.ac
src/prefs_themes.c

index 4bda753..a091e7f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-07-07 [colin]     3.5.0cvs19
+
+       * src/prefs_themes.c
+               Make upgrading themes easier
+
 2008-07-07 [colin]     3.5.0cvs18
 
        * src/mainwindow.c
index c09edbb..af64c09 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.54 -r 1.1.2.55 src/prefs_summaries.c;  ) > 3.5.0cvs16.patchset
 ( cvs diff -u -r 1.204.2.174 -r 1.204.2.175 src/prefs_common.c;  ) > 3.5.0cvs17.patchset
 ( cvs diff -u -r 1.274.2.249 -r 1.274.2.250 src/mainwindow.c;  cvs diff -u -r 1.30.2.51 -r 1.30.2.52 src/prefs_toolbar.c;  cvs diff -u -r 1.25.2.57 -r 1.25.2.58 src/stock_pixmap.c;  ) > 3.5.0cvs18.patchset
+( cvs diff -u -r 1.3.2.57 -r 1.3.2.58 src/prefs_themes.c;  ) > 3.5.0cvs19.patchset
index 3d7a9f7..4765caf 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=5
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=18
+EXTRA_VERSION=19
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index c1f1815..cb99e27 100644 (file)
@@ -544,11 +544,22 @@ static void prefs_themes_btn_install_clicked_cb(GtkWidget *widget, gpointer data
                                          themename, NULL);
        }
        if (TRUE == is_dir_exist(cinfo->dest)) {
-               alertpanel_error(_("A theme with the same name is\nalready installed in this location"));
-               goto end_inst;
+               AlertValue val = alertpanel_full(_("Theme exists"),
+                               _("A theme with the same name is\nalready installed in this location.\n\n"
+                                 "Do you want to replace it?"),
+                               GTK_STOCK_CANCEL, _("Overwrite"), NULL, FALSE,
+                               NULL, ALERT_WARNING, G_ALERTDEFAULT);
+               if (val == G_ALERTALTERNATE) {
+                       if (remove_dir_recursive(cinfo->dest) < 0) {
+                               alertpanel_error(_("Couldn't delete the old theme in %s."), cinfo->dest);
+                               goto end_inst;
+                       }
+               } else {
+                       goto end_inst;
+               }
        }
        if (0 != make_dir_hier(cinfo->dest)) {
-               alertpanel_error(_("Couldn't create destination directory"));
+               alertpanel_error(_("Couldn't create destination directory %s."), cinfo->dest);
                goto end_inst;
        }
        prefs_themes_foreach_file(source, prefs_themes_file_install, cinfo);
@@ -561,7 +572,7 @@ static void prefs_themes_btn_install_clicked_cb(GtkWidget *widget, gpointer data
                                            (gpointer)(cinfo->dest), 
                                            (GCompareFunc)strcmp2);
                if (NULL != insted) {
-                       alertpanel_notice(_("Theme installed successfully"));
+                       alertpanel_notice(_("Theme installed successfully."));
                        tdata->displayed = (gchar *)(insted->data);
                        prefs_themes_set_themes_menu(GTK_COMBO_BOX(tdata->page->op_menu), tdata);
                        prefs_themes_display_global_stats(tdata);