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 113831 - Default panel toplevel configuration sometimes only partially created.
Default panel toplevel configuration sometimes only partially created.
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: panel
2.3.x
Other Linux
: Normal normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
new-toplevel-todo
Depends on:
Blocks:
 
 
Reported: 2003-05-27 12:52 UTC by Ray Strode
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.3/2.4


Attachments
Use g_strdup_printf() instead of panel_gconf_sprintf() (685 bytes, patch)
2003-05-29 17:16 UTC, Ray Strode
none Details | Review

Description Ray Strode 2003-05-27 12:52:27 UTC
Under certain (not fully known) circumstances, when the panel is creating a
default configuration (for instance, when it is run the first time), the
/apps/panel/profiles/default/toplevels/bottom_panel/background 
and 
/apps/panel/profiles/default/toplevels/top_panel/background 
gconf keys (and their subkeys) aren't created.

See <A HREF="http://bugzilla.gnome.org/show_bug.cgi?id=113655">Bug 113655</A>.
Comment 1 Ray Strode 2003-05-29 17:16:59 UTC
Created attachment 16959 [details] [review]
Use g_strdup_printf() instead of panel_gconf_sprintf()
Comment 2 Ray Strode 2003-05-29 17:26:21 UTC
The static string convenience function panel_gconf_sprintf() was being
used for two strings with overlapping life times.  This caused the
value of the schema base path to get overwritten before it could be
used for key association.
Comment 3 Ray Strode 2003-05-29 17:33:36 UTC
As a side note, this bug probably wouldn't have surfaced itself,
except for the fact that the default setup entries file doesn't
contain a full set of keys.  Is that intentional, or has it just
become out of date?
Comment 4 Mark McLoughlin 2003-05-30 08:51:47 UTC
Oh god. panel_gconf_sprintf causes so many problems like this. Its on
crack :/

Thanks for tracking this down ... the fix looks great :-)

As for your side note ... the default setup file doesn't set every key
because we want to respect the defaults from the schemas for most
things. E.g. we don't set a background, so if some changes the
defaults for the background it applies to all default panels.
Comment 5 Ray Strode 2003-05-30 11:20:10 UTC
Okay commited:

2003-05-30  Ray Strode  <halfline@hawaii.rr.com>
                                                                     
          
        * panel-profile.c: (panel_profile_copy_defaults_for_screen):
        Use g_strdup_printf instead of panel_gconf_sprintf. Fixes
        problem where schemas weren't always being associated with
        new toplevels (bug #113831).