GNOME Bugzilla – Bug 317375
theme-manager (saving) sometimes needlessly asks whether to overwrite
Last modified: 2006-04-27 21:59:50 UTC
Install a theme MyTheme in ~/.themes/ with, for example, gtk-2.0 and metacity-1 themes. Select these metacity and gtk+ themes, then try to save this new setup as "MyTheme". theme-manager asks whether the user wants to overwrite, because it sees that ~/.themes/MyTheme already exists. It should test for the existance of "~/.themes/MyTheme/index.theme" instead. Patch follows.
Created attachment 52746 [details] [review] Patch to ask to overwrite only if ~/.themes/Theme/index.theme already exists Kind of unnecessary extra gchar* variable, wanted a different name for clarity. Dialog code appears changed because I replaced some tabs with spaces to make it consistant with the rest of the file. Untested.
Sounds like a reasonable request to me. The patch looks ok too, but I haven't tested it yet.
Sebastian, any comments on the patch?
I don't really like that patch, no need of 2 new variables for a small function like that and the indentation changes are not required
Created attachment 56981 [details] [review] look for index.them, fix a leak What do you think about that variant? No new variable used. It fixes a leak in the cancel case too
Looks good. We ought to run gnome-theme-manager through valgrind, since I already found a few leaks else where (in the theme-installer).
Valgrind doesn't spot that leak though, or I don't use the right option ... if somebody knows why I'm curious to know about it :)
2006-04-27 Thomas Wood <thos@gnome.org> * gnome-theme-save.c: (str_remove_slash), (setup_directory_structure): Fix bug 317375 - theme-manager (saving) sometimes needlessly asks whether to overwrite