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 534515 - Add a tray icon + other cleanups
Add a tray icon + other cleanups
Status: RESOLVED FIXED
Product: krb5-auth-dialog
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Christopher Aillon
Christopher Aillon
: 331656 (view as bug list)
Depends on:
Blocks: 534736 538163
 
 
Reported: 2008-05-23 16:29 UTC by Guido Günther
Modified: 2009-01-10 13:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-set-icon-to-gtk-dialog-authentication (835 bytes, patch)
2008-05-23 16:32 UTC, Guido Günther
committed Details | Review
0002-use-gtk-instead-of-gnome-headers.patch (2.54 KB, patch)
2008-05-23 16:33 UTC, Guido Günther
committed Details | Review
0003-use-gboolean-instead-of-int.patch (1.05 KB, patch)
2008-05-23 16:34 UTC, Guido Günther
committed Details | Review
0004-check-for-dbus-development-files.patch (617 bytes, patch)
2008-05-23 16:35 UTC, Guido Günther
committed Details | Review
0005-add-a-tray-icon.patch (13.97 KB, patch)
2008-05-23 16:35 UTC, Guido Günther
none Details | Review
0006-install-the-icons.patch (4.89 KB, patch)
2008-05-23 16:36 UTC, Guido Günther
none Details | Review
add trayicon (47.24 KB, patch)
2008-06-10 19:30 UTC, Guido Günther
none Details | Review
desktop file cleanup (757 bytes, patch)
2008-06-10 19:39 UTC, Guido Günther
none Details | Review
minor manpage fixup (679 bytes, patch)
2008-06-10 19:40 UTC, Guido Günther
none Details | Review

Description Guido Günther 2008-05-23 16:29:01 UTC
Please describe the problem:
Colin asked me to put these into Bugzilla: 

When working with a laptop a tray icon indicating the current state of
the kerberos ticket is convenient (since we can't acquire one on login,
etc.). The attached patches implement this.

The tray icon shows the remaining time in the tooltip and indicates if
we have a valid ticket via the tray icon itself. The context menu allows
to drop the credentials cache entirely or to quit and has an about box
(of course!).

The patches in detail are:

0001-set-icon-to-gtk-dialog-authentication.patch:
   Set an icon that shows up in the window list when the dialog is
   displayed

0002-use-gtk-instead-of-gnome-headers.patch:
   we don't need any gnome specific stuff, so we can drop this
   dependency

0003-use-gboolean-instead-of-int.patch:
   minor cleanup

0004-check-for-dbus-development-files.patch:
   fixup autoconf, we don't need to look for gnome anymore but should
   look for dbus

0005-add-a-tray-icon.patch:
   this adds the actual tray icon

0006-install-the-icons.patch:
   these are the icons for the tray icon, these can certainly be
   improved

Can these be applied? As you can see the changes to the actual
krb5-auth-dialog-code are quiet minimal. Future versions might indicate
the remaining time via a progress bar or list the available service
tickets.


Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Guido Günther 2008-05-23 16:32:13 UTC
Created attachment 111418 [details] [review]
0001-set-icon-to-gtk-dialog-authentication

Set an icon that shows up in the window list when the dialog is displayed
Comment 2 Guido Günther 2008-05-23 16:33:16 UTC
Created attachment 111419 [details] [review]
0002-use-gtk-instead-of-gnome-headers.patch

we don't need any gnome specific stuff, so we can drop this dependency
Comment 3 Guido Günther 2008-05-23 16:34:11 UTC
Created attachment 111420 [details] [review]
0003-use-gboolean-instead-of-int.patch

minor cleanup
Comment 4 Guido Günther 2008-05-23 16:35:03 UTC
Created attachment 111421 [details] [review]
0004-check-for-dbus-development-files.patch

fixup autoconf, we don't need to look for gnome anymore but should look for dbus
Comment 5 Guido Günther 2008-05-23 16:35:38 UTC
Created attachment 111422 [details] [review]
0005-add-a-tray-icon.patch

add the actual tray icon
Comment 6 Guido Günther 2008-05-23 16:36:19 UTC
Created attachment 111423 [details] [review]
0006-install-the-icons.patch

these are the icons for the tray icon, these can certainly be improved
Comment 7 Colin Walters 2008-06-09 19:43:01 UTC
The tray icon is a pretty big change.  It has some advantages and disadvantages.  Off the top of my head:

* Advantages: Would give us cleaner integration with the notification system; we could use libnotify notification pointing to the icon instead of a sudden dialog for renewal.  Gives user visual indication that they're signed in.
* Disadvantages: Another tray icon =/

On the code:

There's a fair amount of inconsistent spacing, e.g. between function names and the paren, indentation level.

+		err = _("Failure to setup icons");

We should just g_error () on this stuff.  It's a non-recoverable deployment/system error, there's no point in showing the user a dialog they can't do anything to fix.

Otherwise looks OK at a high level.  

I should note I don't personally use Kerberos anymore so my testing isn't very good.
Comment 8 Colin Walters 2008-06-09 19:47:13 UTC
One other thought is to integrate this into the NetworkManager applet.
Comment 9 Colin Walters 2008-06-09 20:04:56 UTC
*** Bug 331656 has been marked as a duplicate of this bug. ***
Comment 10 Guido Günther 2008-06-10 19:30:23 UTC
Created attachment 112500 [details] [review]
add trayicon
Comment 11 Guido Günther 2008-06-10 19:33:35 UTC
I've reworked the patch fixing up (hopefully) most of the indentation issues. The patch has more of my follow up patches included (like libnotify and gconf support). This allows to disable the trayicon via a gconf setting (which hopefully adresses your "yet another tray icon concerns"). The patch is quiet large but the updates to existing code aren't very intrusive so I decided not to split up things further. Can this be applied?

Comment 12 Guido Günther 2008-06-10 19:39:12 UTC
Created attachment 112502 [details] [review]
desktop file cleanup
Comment 13 Guido Günther 2008-06-10 19:40:23 UTC
Created attachment 112503 [details] [review]
minor manpage fixup
Comment 14 Guido Günther 2008-09-26 15:29:38 UTC
Except for the trayicon everything in this patch is applied now. If nobody objects I'll apply that one too. 

Adding this to NM doesn't make that much sense - I think - since the kerberos part will grow quit complex in the future. We might want to handle several credential caches as well as pkinit, etc so an extra applet is probaly justified.

Just as a side note: I already pkinit support here:
 http://honk.sigxcpu.org/con/krb5_auth_dialog_pkinit_support.html
I'll merge this after the applet stuff.
Comment 15 Guido Günther 2009-01-04 13:15:54 UTC
Current git with these patches is at:
 http://honk.sigxcpu.org/git/krb5-auth-dialog.git/
I'll push this onto a branch in SVN soonish.
Comment 16 Guido Günther 2009-01-04 16:06:46 UTC
I've merged things onto:

http://svn.gnome.org/svn/krb5-auth-dialog/branches/pkinit

now. Christopher, Collin: I'll wait a couple of days and merge to trunk if I hear no objections, o.k.?
Comment 17 Guido Günther 2009-01-10 13:28:10 UTC
All committed to trunk now. O.k. to tag a 0.8 release? Could someone give me the necessary permissions to close the bugzilla bugs?
Comment 18 Guido Günther 2009-01-10 13:31:37 UTC
Fixed on trunk.