system-config-printer notification patch should auto-detect capabilities of notification daemon, so that it can get upstreamized

Bug #339847 reported by Till Kamppeter
8
Affects Status Importance Assigned to Milestone
System Config Printer
Fix Released
Unknown
system-config-printer (Ubuntu)
Fix Released
High
Ken VanDine

Bug Description

Binary package hint: system-config-printer

Recently the default notification daemon in Ubuntu was replaced by a notify-osd which does not support action buttons.

Therefore system-config-printer was patched to work without action buttons if needed, by using pop-up dialogs. Unfortunately this patch cannot be applied upstream, as the check for the notification daemon type is done in a Ubuntu-specific way:

if os.environ.get('GDMSESSION') == "gnome-stracciatella":

This should be replaced by a generic check on the notification daemon capabilities, using the Python equivalent of the function

GList *notify_get_server_caps(void);

(/usr/include/libnotify/notify.h). It should be "pynotify.get_server_caps()". As there are notification daemons with and without action button support, the assumption of system-config-printer to have action button support is an upstream bug which can be fixed by upstreamizing this patch.

Ken VanDine, can you please fix the patch? Thanks.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Note that this would also simplify maintaining the system-config-printer package a lot.

Changed in system-config-printer:
assignee: nobody → ken-vandine
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Martin Pitt (pitti) wrote :

For the record, I discussed that with Till on IRC. Indeed checking $GDMSESSION is wrong here. Sorry that I didn't spot this earlier when sponsoring the original patch; things were pretty hectic around UIF..

Changed in system-config-printer:
status: Unknown → New
Changed in system-config-printer:
status: New → Confirmed
Changed in system-config-printer:
milestone: none → ubuntu-9.04-beta
Revision history for this message
Matthew Paul Thomas (mpt) wrote :

None of the changes I described in <https://wiki.ubuntu.com/NotifyOSD#system-config-printer> involve using notification bubbles, with actions or without. They involve eliminating notification bubbles, and I think they're just as valid on a system where the notification server accepts actions as on a system where it doesn't. (They reduce the total surface area of the interface, so people have less to learn or think about. And in the "Printer added" and "Authentication required" cases, they make the number of clicks required either the same or less.)

So, I suggest first seeing if upstream will accept the design changes described in the spec. If they will, make the changes unconditionally. If they won't, *then* make the changes conditional on whether the notification server accepts actions.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Tim, what do you think about making the following notification behavior the upstream default in system-config-printer?

https://wiki.ubuntu.com/NotifyOSD#system-config-printer

We do away with notification bubbles in general and instead, we do the following:

* When a printer is added successfully using a matching printer driver, a “Printer added” notification bubble appears containing the text “`%s' is ready for printing.” and a “Configure” button. Instead, the Properties window for that printer should open unfocused directly.
* When a printer is added successfully using a non-matching printer driver, a “Printer added” notification bubble appears containing the text “%s' has been added, using the %s' driver.” and a “Find driver” button. (system-config-printer 1.1 will also include a “Print test page” button.) Instead, the Properties window for that printer should open unfocused.
* When you try to view jobs on a printer that requires authentication, an “Authentication required” notification bubble appears containing the text “Job requires authentication to proceed” and an “Authenticate” button that brings up an alert box saying “Authentication required for printing document `%s' (job %d)”. The notification bubble should be abolished, and the alert box should be invoked directly instead.
* When a print job gets stuck for some reason, a notification bubble appears containing text “There was a problem processing the document” or similar, containing no buttons but staying open until it is clicked. This should be converted to an error alert box with an “OK” button.

ken, pitti, Matthew, if Tim does not agree to make this behavior default, we need to have both this new and the old behavior available in the upstream code. By default, the new behavior should be used in the case that the notification facility is not supporting actions and the old behavior otherwise. In addition, a "./configure" option should also allow to force the old or the new behavior.

Changed in system-config-printer (Ubuntu):
importance: Medium → High
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Any consensus on this yet?

Revision history for this message
Martin Pitt (pitti) wrote :

Ken, for now we should just rewrite our patch to use notify_get_server_caps() instead of querying $GDMSESSION. UI changes should go into separate bug reports.

Changed in system-config-printer (Ubuntu):
milestone: ubuntu-9.04-beta → ubuntu-9.04
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Test for capabilities instead of GDMSESSION

Changed in system-config-printer:
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package system-config-printer - 1.1.3+git20090218-0ubuntu17

---------------
system-config-printer (1.1.3+git20090218-0ubuntu17) jaunty; urgency=low

  * debian/patches/26_notification.patch:
    - Check notification daemon capabilities to determine if actions are
      supported rather than check $GDMSESSION (LP: #339847)

 -- Ken VanDine <email address hidden> Tue, 31 Mar 2009 09:54:27 -0400

Changed in system-config-printer:
status: In Progress → Fix Released
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Ken VanDine, thanks for the fix, I have applied the fixed patch upstream now.

Changed in system-config-printer:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.