commit 87b209c7a711e3e460af5e1682508fa67bc594d4
parent 106dd17f2fb1db004ece0b282336388425af5646
Author: Colin Leroy <colin@colino.net>
Date: Mon, 7 Jul 2008 17:51:14 +0000
2008-07-07 [colin] 3.5.0cvs19
* src/prefs_themes.c
Make upgrading themes easier
Diffstat:
4 files changed, 22 insertions(+), 5 deletions(-)
diff --git 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
diff --git a/PATCHSETS b/PATCHSETS
@@ -3430,3 +3430,4 @@
( 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
diff --git a/configure.ac b/configure.ac
@@ -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=
diff --git a/src/prefs_themes.c b/src/prefs_themes.c
@@ -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);