[Commits] [SCM] claws branch, gtk2, updated. 3.19.1-88-g59e878ed6
paul at claws-mail.org
paul at claws-mail.org
Wed Oct 25 06:01:15 UTC 2023
The branch, gtk2 has been updated
via 59e878ed6a997bd9021e00172c0707ac14d0768c (commit)
from 0f183ae060c35cb23727498b01c9b4d4747c615e (commit)
Summary of changes:
src/prefs_themes.c | 38 ++++++++------------------------------
1 file changed, 8 insertions(+), 30 deletions(-)
- Log -----------------------------------------------------------------
commit 59e878ed6a997bd9021e00172c0707ac14d0768c
Author: Paul <paul at claws-mail.org>
Date: Wed Oct 25 06:58:04 2023 +0100
no longer allow installing or removing system themes
this eliminates bug 4710, 'Write error on system wide icon theme install'
diff --git a/src/prefs_themes.c b/src/prefs_themes.c
index d01a5bc90..09168d622 100644
--- a/src/prefs_themes.c
+++ b/src/prefs_themes.c
@@ -496,17 +496,10 @@ static void prefs_themes_btn_remove_clicked_cb(GtkWidget *widget, gpointer data)
gchar *theme_str;
gchar *alert_title = NULL;
AlertValue val = 0;
- gchar *tmp = NULL;
theme_str = tdata->displayed;
- tmp = g_path_get_basename(theme_str);
- if (IS_SYSTEM_THEME(theme_str)) {
- alert_title = g_strdup_printf(_("Remove system theme '%s'"), tmp);
- } else {
- alert_title = g_strdup_printf(_("Remove theme '%s'"), tmp);
- }
- g_free(tmp);
+ alert_title = g_strdup_printf(_("Remove theme '%s'"), g_path_get_basename(theme_str));
val = alertpanel(alert_title,
_("Are you sure you want to remove this theme?"),
@@ -573,26 +566,10 @@ static void prefs_themes_btn_install_clicked_cb(GtkWidget *widget, gpointer data
}
}
- val = alertpanel(alert_title,
- _("Do you want to install theme for all users?"),
- GTK_STOCK_NO, GTK_STOCK_YES, NULL, ALERTFOCUS_FIRST);
- g_free(alert_title);
- switch (val) {
- case G_ALERTALTERNATE:
- cinfo->dest = stock_pixmap_get_system_theme_dir_for_theme(
- themename);
- break;
- case G_ALERTDEFAULT:
- break;
- default:
- goto end_inst;
- }
+ cinfo->dest = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
+ PIXMAP_THEME_DIR, G_DIR_SEPARATOR_S,
+ themename, NULL);
- if (cinfo->dest == NULL) {
- cinfo->dest = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
- PIXMAP_THEME_DIR, G_DIR_SEPARATOR_S,
- themename, NULL);
- }
if (TRUE == is_dir_exist(cinfo->dest)) {
AlertValue val = alertpanel_full(_("Theme exists"),
_("A theme with the same name is\n"
@@ -829,10 +806,11 @@ static void prefs_themes_checkbtn_scaling_auto_toggled_cb(GtkWidget *widget, gpo
static void prefs_themes_update_buttons(const ThemesData *tdata)
{
ThemesPage *theme = tdata->page;
- gboolean can_rem, can_use;
+ gboolean can_rem;
- can_use = !IS_CURRENT_THEME(tdata->displayed);
- can_rem = can_use && !IS_INTERNAL_THEME(tdata->displayed);
+ can_rem = !IS_CURRENT_THEME(tdata->displayed) &&
+ !IS_INTERNAL_THEME(tdata->displayed) &&
+ !IS_SYSTEM_THEME(tdata->displayed);
if (theme->btn_remove != NULL)
gtk_widget_set_sensitive(theme->btn_remove, can_rem);
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list