fixed prgname in gui apps

- fixes problem with lowres icons in gnome3
This commit is contained in:
Jiri Moskovcak 2011-05-08 21:27:35 +02:00
commit efd038221e
2 changed files with 58 additions and 1 deletions

View file

@ -10,7 +10,7 @@
Summary: Automatic bug detection and reporting tool
Name: abrt
Version: 2.0.2
Release: 3%{?dist}
Release: 4%{?dist}
License: GPLv2+
Group: Applications/System
URL: https://fedorahosted.org/abrt/
@ -23,6 +23,7 @@ Patch1: blacklist.patch
Patch2: allow_bz_for_koops.patch
Patch3: retrace_addr.patch
Patch4: retrace_client_flush.patch
Patch5: prgname.patch
BuildRequires: dbus-devel
BuildRequires: gtk2-devel
BuildRequires: curl-devel
@ -264,6 +265,7 @@ generation service over a network using HTTP protocol.
%patch2 -p1 -b bz_for_oops
%patch3 -p1 -b retrace_addr
%patch4 -p1 -b flush_messages
%patch5 -p1 -b prgname
%build
autoconf
@ -648,6 +650,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_infodir}/abrt-retrace-server*
%changelog
* Sun May 08 2011 Jiri Moskovcak <jmoskovc@redhat.com> 2.0.2-4
- fixed prgname, fixes problem where Gnome3 shows lowres icons instead
nice highres ones
* Fri May 06 2011 Christopher Aillon <caillon@redhat.com> - 2.0.2-3
- Update icon cache scriptlet per packaging guidelines

51
prgname.patch Normal file
View file

@ -0,0 +1,51 @@
commit e4200116d227ac159d45d84bfbdbaf85d188c4bb
Author: Denys Vlasenko <dvlasenk@redhat.com>
Date: Fri May 6 22:27:40 2011 +0200
reinstated g_set_prgname("abrt")
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
diff --git a/src/applet/applet.c b/src/applet/applet.c
index e965a3b..aff8284 100644
--- a/src/applet/applet.c
+++ b/src/applet/applet.c
@@ -221,7 +221,7 @@ int main(int argc, char** argv)
/* Parse options */
int opt;
- while ((opt = getopt(argc, argv, "dv")) != -1)
+ while ((opt = getopt(argc, argv, "v")) != -1)
{
switch (opt)
{
diff --git a/src/gui-gtk/main.c b/src/gui-gtk/main.c
index e9b175a..39d9f7e 100644
--- a/src/gui-gtk/main.c
+++ b/src/gui-gtk/main.c
@@ -204,6 +204,8 @@ int main(int argc, char **argv)
* desktops which uses the name to find the corresponding .desktop file
* trac#180
*/
+ g_set_prgname("abrt");
+
gtk_init(&argc, &argv);
/* Can't keep these strings/structs static: _() doesn't support that */
diff --git a/src/gui-wizard-gtk/main.c b/src/gui-wizard-gtk/main.c
index d1341b4..cdcf9e4 100644
--- a/src/gui-wizard-gtk/main.c
+++ b/src/gui-wizard-gtk/main.c
@@ -69,6 +69,12 @@ int main(int argc, char **argv)
textdomain(PACKAGE);
#endif
+ /* without this the name is set to argv[0] which confuses
+ * desktops which uses the name to find the corresponding .desktop file
+ * trac#180
+ */
+ g_set_prgname("abrt");
+
gtk_init(&argc, &argv);
/* Can't keep these strings/structs static: _() doesn't support that */