all repos — tint2 @ 6ba25fa94516c748632fbcbaa925c4559231dd7f

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

tint2conf: backup config when writing

git-svn-id: http://tint2.googlecode.com/svn/trunk@765 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
o9000 o9000
commit

6ba25fa94516c748632fbcbaa925c4559231dd7f

parent

aa9e1afdf20cc17caa325f35cba909809a4eab65

1 files changed, 9 insertions(+), 1 deletions(-)

jump to
M src/tint2conf/properties.csrc/tint2conf/properties.c

@@ -22,6 +22,7 @@ #include "properties.h"

#include "properties_rw.h" #include "../launcher/apps-common.h" #include "../launcher/icon-theme-common.h" +#include "../util/common.h" #define ROW_SPACING 10 #define COL_SPACING 8

@@ -163,8 +164,15 @@

void applyClicked(GtkWidget *widget, gpointer data) { char *file = get_current_theme_file_name(); - if (file) + if (file) { + if (config_is_manual(file)) { + gchar *backup_path = g_strdup_printf("%s.backup.%ld", file, time(NULL)); + copy_file(file, backup_path); + g_free(backup_path); + } + config_save_file(file); + } int unused = system("killall -SIGUSR1 tint2"); (void)unused; g_free(file);