[Bug 638090] New: gnomesu cosmetic fixes (patch)
https://bugzilla.novell.com/show_bug.cgi?id=638090 https://bugzilla.novell.com/show_bug.cgi?id=638090#c0 Summary: gnomesu cosmetic fixes (patch) Classification: openSUSE Product: openSUSE 11.4 Version: Factory Platform: Other OS/Version: Other Status: NEW Severity: Minor Priority: P5 - None Component: GNOME AssignedTo: bnc-team-gnome@forge.provo.novell.com ReportedBy: rpmcruz@alunos.dcc.fc.up.pt QAContact: qa@suse.de Found By: --- Blocker: --- Created an attachment (id=388416) --> (http://bugzilla.novell.com/attachment.cgi?id=388416) Patch User-Agent: Mozilla/5.0 (X11; U; Linux i686; pt-PT; rv:1.9.2.4) Gecko/20100611 SUSE/3.6.4-3.2 Firefox/3.6.4 Coping with the times, a couple of cosmetic fixes for gnomesu: a) don't show an icon for the Continue button, if gtk-show-button-icons == false It just uses GtkButton's new convenience methods, which also greatly simplifies the code too. b) use the new GTK icon GTK_STOCK_DIALOG_AUTHENTICATION rather than the embeded auth-icon.csource You should also remove the file auth-icon.csource from the package. c) show the dialog icon as the window icon too: if an app doesn't set an icon, Metacity will use the ugly broken icon. Should we contact gnomesu's author, to get these changes upstream? Reproducible: Always -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=638090
https://bugzilla.novell.com/show_bug.cgi?id=638090#c
Ricardo Cruz
https://bugzilla.novell.com/show_bug.cgi?id=638090
https://bugzilla.novell.com/show_bug.cgi?id=638090#c1
Ricardo Cruz
https://bugzilla.novell.com/show_bug.cgi?id=638090
https://bugzilla.novell.com/show_bug.cgi?id=638090#c2
--- Comment #2 from Vincent Untz
Should we contact gnomesu's author, to get these changes upstream?
I did that a while ago. He was surprised because he assumed the project was completely dead. Anyway, the real issue is that the code moved to a read-only archive now. So if we really want to keep gnomesu in the long term, we could host it. But I'm considering some switch await from it... I'll look at your patch later, thanks! -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=638090
https://bugzilla.novell.com/show_bug.cgi?id=638090#c3
--- Comment #3 from Vincent Untz
diff -ru libgnomesu-1.0.0/src/gnomesu-auth-dialog.c libgnomesu-1.0.0-rpmcruz//src/gnomesu-auth-dialog.c --- libgnomesu-1.0.0/src/gnomesu-auth-dialog.c 2005-05-17 16:23:20.000000000 +0100 +++ libgnomesu-1.0.0-rpmcruz//src/gnomesu-auth-dialog.c 2010-08-23 04:43:16.208000252 +0100 @@ -24,7 +24,6 @@ #include
#include "gnomesu-auth-dialog.h" -#include "auth-icon.csource" #include "utils.h"
Does that mean we can remove all the stuff generating auth-icon.csource?
- if (!pixbuf) - pixbuf = gdk_pixbuf_new_from_inline (sizeof (auth_icon), auth_icon, FALSE, NULL); - else - g_object_ref (pixbuf); - gtk_image_set_from_pixbuf (GTK_IMAGE (dialog->_priv->icon), pixbuf); - g_object_unref (pixbuf); + GtkImage *image = GTK_IMAGE (dialog->_priv->icon); + if (pixbuf) { + g_object_ref (G_OBJECT (pixbuf)); + gtk_image_set_from_pixbuf (image, pixbuf); + } + else { + gtk_image_set_from_stock (image, GTK_STOCK_DIALOG_AUTHENTICATION, GTK_ICON_SIZE_DIALOG); + + pixbuf = gtk_widget_render_icon (GTK_WIDGET (dialog), GTK_STOCK_DIALOG_AUTHENTICATION, GTK_ICON_SIZE_DIALOG, NULL);
I'd probably use the "dialog-password" icon name, which makes it possible to skip gtk_widget_render_icon() and call gtk_window_set_icon_name() for this case.
+ } + + gtk_window_set_icon (GTK_WINDOW (dialog), pixbuf); + g_object_unref (G_OBJECT (pixbuf)); }
In the case of -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=638090
https://bugzilla.novell.com/show_bug.cgi?id=638090#c4
--- Comment #4 from Ricardo Cruz
#include "gnomesu-auth-dialog.h" -#include "auth-icon.csource" #include "utils.h"
Does that mean we can remove all the stuff generating auth-icon.csource?
I think auth-icon.csource was manually generated. But yes, we can obliterate the thing.
I'd probably use the "dialog-password" icon name, which makes it possible to skip gtk_widget_render_icon() and call gtk_window_set_icon_name() for this case.
Oh, I only noticed the set_icon() and set_icon_list(). Yeah, we should do that. Not only does it save code, but it allows GTK to setup different sizes. (one for the window title, another for the Alt+Tab.) Anyhow, notice that GTK_STOCK_DIALOG_AUTHENTICATION is only a define for "gtk-dialog-authentication", so I'd rather use it, given GTK developers may have had flexibility in mind when doing that... #define GTK_STOCK_DIALOG_AUTHENTICATION "gtk-dialog-authentication"
+ gtk_window_set_icon (GTK_WINDOW (dialog), pixbuf); + g_object_unref (G_OBJECT (pixbuf));
In the case of
I think you were going to say I shouldn't had unref() it. You're right, the documentation doesn't say anything about it, but, looking at gtkwindow.c, it seems that the code doesn't increment the counter itself, as you'd expect in other contexts. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=638090
https://bugzilla.novell.com/show_bug.cgi?id=638090#c5
--- Comment #5 from Ricardo Cruz
https://bugzilla.novell.com/show_bug.cgi?id=638090
https://bugzilla.novell.com/show_bug.cgi?id=638090#c6
--- Comment #6 from Vincent Untz
Anyhow, notice that GTK_STOCK_DIALOG_AUTHENTICATION is only a define for "gtk-dialog-authentication", so I'd rather use it, given GTK developers may have had flexibility in mind when doing that...
And you'll see that the gtk-dialog-authentication icons are symlinks to the dialog-password ones. Because dialog-password is the current name :-) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=638090
https://bugzilla.novell.com/show_bug.cgi?id=638090#c7
--- Comment #7 from Vincent Untz
https://bugzilla.novell.com/show_bug.cgi?id=638090
https://bugzilla.novell.com/show_bug.cgi?id=638090#c8
--- Comment #8 from Ricardo Cruz
And you'll see that the gtk-dialog-authentication icons are symlinks to the dialog-password ones. Because dialog-password is the current name :-)
Ok, I see what you mean now. With regard to gksu-polkit, I hope it gets adopted. I'm running Ubuntu, and gksu (apparently, the previous "generation") runs well, is configurable, and looks very nice too. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=638090
https://bugzilla.novell.com/show_bug.cgi?id=638090#c9
Vincent Untz
https://bugzilla.novell.com/show_bug.cgi?id=638090
https://bugzilla.novell.com/show_bug.cgi?id=638090#c10
Vincent Untz
https://bugzilla.novell.com/show_bug.cgi?id=638090
https://bugzilla.novell.com/show_bug.cgi?id=638090#c11
Ricardo Cruz
https://bugzilla.novell.com/show_bug.cgi?id=638090
https://bugzilla.novell.com/show_bug.cgi?id=638090#c12
Vincent Untz
Probably you merged my fixes, and don't remember doing so now? ;-)
Hrm, I doubt so: those changes were done for 11.2 ;-)
Anyhow, with regard to fix 2), we may want to apply a change like:
- create_stock_button (NULL, _("Continue")) + create_stock_button (GTK_STOCK_OK, _("Continue"))
It looks a bit ugly when you use buttons_have_icons=True that the Cancel button has an icon assigned, but not the Continue one.
Fix submitted: sr#59159. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com