From: Alfons Hoogervorst Date: Mon, 9 Jun 2003 15:16:07 +0000 (+0000) Subject: * src/prefs_common.c X-Git-Tag: rel_0_9_3~89 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=2bc6045a566593fe73808eed6bd21eefe5bf1d5c;hp=c1490b1eed42acd15f9708d9a61d8a6a7bfd3c7f * src/prefs_common.c fix bug #163 "Icon switching doesnt work properly" by preventing early freeing of prefs_common.pixmap_theme_path. --- diff --git a/ChangeLog.claws b/ChangeLog.claws index d3a7903a9..5ff16e136 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,9 @@ +2003-06-09 [alfons] 0.9.0claws25 + + * src/prefs_common.c + fix bug #163 "Icon switching doesnt work properly" by + preventing early freeing of prefs_common.pixmap_theme_path. + 2003-06-09 [christoph] 0.9.0claws24 * src/gtk/gtkaspell.c diff --git a/configure.ac b/configure.ac index ad40c92ff..c198e67c4 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=9 MICRO_VERSION=0 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=claws24 +EXTRA_VERSION=claws25 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION dnl set $target diff --git a/src/prefs_common.c b/src/prefs_common.c index 0879664d0..b40ee09b8 100644 --- a/src/prefs_common.c +++ b/src/prefs_common.c @@ -4231,6 +4231,7 @@ static void prefs_common_apply(void) { gchar *entry_pixmap_theme_str; gboolean update_pixmap_theme; + gchar *backup_theme_path; entry_pixmap_theme_str = gtk_entry_get_text(GTK_ENTRY(interface.entry_pixmap_theme)); if (entry_pixmap_theme_str && @@ -4238,16 +4239,25 @@ static void prefs_common_apply(void) update_pixmap_theme = TRUE; else update_pixmap_theme = FALSE; - + + /*!< FIXME: prefs_set_data_from_dialog() clears and frees all strings, + * but prefs_common.pixmap_theme_path is stored in the StockPixmapData + * in stock_pixmap.c::pixmaps[].icon_path, and used when reflecting + * the pixmap changes. Work around by saving the old one and freeing + * it later. */ + backup_theme_path = prefs_common.pixmap_theme_path; + prefs_common.pixmap_theme_path = g_strdup(backup_theme_path); prefs_set_data_from_dialog(param); sock_set_io_timeout(prefs_common.io_timeout_secs); - if (update_pixmap_theme) - { + if (update_pixmap_theme) { main_window_reflect_prefs_all_real(TRUE); compose_reflect_prefs_pixmap_theme(); } else main_window_reflect_prefs_all_real(FALSE); + + /*!< FIXME: Now it's safe to delete the backup path */ + g_free(backup_theme_path); prefs_common_save_config();