After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 317375 - theme-manager (saving) sometimes needlessly asks whether to overwrite
theme-manager (saving) sometimes needlessly asks whether to overwrite
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: [obsolete] theme-manager
2.12.x
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-09-27 20:34 UTC by John Spray
Modified: 2006-04-27 21:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to ask to overwrite only if ~/.themes/Theme/index.theme already exists (1.74 KB, patch)
2005-09-27 20:43 UTC, John Spray
needs-work Details | Review
look for index.them, fix a leak (1002 bytes, patch)
2006-01-08 19:35 UTC, Sebastien Bacher
committed Details | Review

Description John Spray 2005-09-27 20:34:28 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.
Comment 1 John Spray 2005-09-27 20:43:17 UTC
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.
Comment 2 Thomas Wood 2005-12-30 15:32:37 UTC
Sounds like a reasonable request to me. The patch looks ok too, but I haven't tested it yet.
Comment 3 Thomas Wood 2006-01-08 15:43:43 UTC
Sebastian, any comments on the patch?
Comment 4 Sebastien Bacher 2006-01-08 19:32:47 UTC
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
Comment 5 Sebastien Bacher 2006-01-08 19:35:06 UTC
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
Comment 6 Thomas Wood 2006-01-09 12:36:27 UTC
Looks good. We ought to run gnome-theme-manager through valgrind, since I already found a few leaks else where (in the theme-installer).
Comment 7 Sebastien Bacher 2006-01-09 13:06:45 UTC
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 :)
Comment 8 Thomas Wood 2006-04-27 21:59:50 UTC
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