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 424949 - libgnome sets program name wrong
libgnome sets program name wrong
Status: RESOLVED FIXED
Product: libgnome
Classification: Deprecated
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: libgnome maintainer
libgnome maintainer
: 168633 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-03-31 18:06 UTC by Matthias Clasen
Modified: 2007-05-05 14:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
set program name correctly (885 bytes, patch)
2007-03-31 18:07 UTC, Matthias Clasen
accepted-commit_now Details | Review

Description Matthias Clasen 2007-03-31 18:06:23 UTC
I found that almost no applets get bug-buddy support, even though quite a few of them have the necessary information in their .server files. It turns out that
libgnomoeui/gnome_segv pass the result of g_get_prgname() to bug-buddy as the application name. And from looking at the uses of g_get_prgname() through libgnome/libgnomeui/bug-buddy, it is clear that the result is expected to be the
binary name - like it is documented.

Unfortunately, gnome_program_preinit() sets the program name to the string
that was passed as "app id" to gnome_program_init(), which is e.g. for the fish
applet, "That-stupid-fish". 

I'll attach a patch which removes that and fixes the earlier call to use the
basename of argv[0]. Maybe what was indended here was to do
g_set_application_name (app_id) ?
Comment 1 Matthias Clasen 2007-03-31 18:07:08 UTC
Created attachment 85618 [details] [review]
set program name correctly
Comment 2 Loïc Minier 2007-03-31 21:52:37 UTC
I confirm this fixes bug-buddy for known applets and unknown applets are still recognized as such; thanks Matthias!
Comment 3 Kjartan Maraas 2007-04-01 10:47:06 UTC
Please commit on both branches.
Comment 4 Matthias Clasen 2007-04-01 13:45:13 UTC
Committed to trunk and gnome-2-18

2007-04-01  Matthias Clasen  <mclasen@redhat.com>

        * libgnome/gnome-program.c (gnome_program_preinit): Set
        the program name to the basename of argv[0]. This is
        expected by other parts of the stack, and e.g. makes bug-buddy
        work for applets again.  (#424949)

Comment 5 Dan Winship 2007-05-05 14:51:39 UTC
*** Bug 168633 has been marked as a duplicate of this bug. ***