GTG

Notification area plugin raises warnings when adding a task

Bug #1009689 reported by Roquentin
This bug report is a duplicate of:  Bug #785852: Menu reordering does not work. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GTG
Confirmed
Low
Unassigned

Bug Description

The problem only affects the version in trunk (rev. 1180 here). Steps to reproduce:

1. Enable the notification area plugin
2. Add a task (either from the main window or from the notification area)

The following warning is raised:

(gtg:3172): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that doesn't believe we're it's parent.

Tags: plugin
Revision history for this message
Izidor Matušov (izidor) wrote :

I've played with this and the reason is updating the label or rearranging the menu items. At the moment, the plugin removes and inserts items to accomplish this. Maybe usage of better API can solve this.

Changed in gtg:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Roquentin (antonio-roquentin-deactivatedaccount) wrote :

I experimented a little bit:

* I disabled the appindicator module, using only the system tray for the notification icon. No warnings were raised.

* I tried on a different machine with a very similar setup (always ubuntu 12.04 but from an upgrade, not a fresh install). To my suprise, no warnings were raised there, not even with appindicator on as by default. Don't know what is causing the difference.

* Warnings started to be raised after the major plugin rewriting in rev 1045.

Revision history for this message
Izidor Matušov (izidor) wrote :

Yes, the warnings were introduced by me. However, they didn't occurred back then.

I played with the plugin too. The warnings are issued when updating or moving an item in the menu. At the moment, it means that an item is removed from the menu and then readded to the correct place. An example: I create a new task and set its title. In the first step the task is created with "(no title)" and added into the menu. In the second step, the title is set, "(no title)" item is removed and immediately inserted as "title".

Using a more sophisiticated API call my solve this problem. Is there any update item? Or move item to the position A?

Changed in gtg:
assignee: nobody → Antonio Roquentin (antonio-roquentin)
Revision history for this message
Roquentin (antonio-roquentin-deactivatedaccount) wrote :

I started working on this issue here: lp:~gtg-user/gtg/bugfix-1009689

Now when we modify an item, we do not remove/readd the item to the menu, but simply change its label. The warnings are gone :-) The ordering of the entries in the menu is sort of weird (new elements are added in reverse order) but this should be easy to fix.

I left a debug print statement, just to know when items get modified.

Changed in gtg:
status: Confirmed → In Progress
Revision history for this message
Roquentin (antonio-roquentin-deactivatedaccount) wrote :

There is still one issue in that, after changing due date of a task, the entries in the menu of the indicator applet are not sorted. Actually the entries of gtk.Menu instance *are* updated, it's only the displayed applet menu that does not get updated.

This looks like a problem of the indicator applet. When disabling the indicator and using the systray everything works fine.

I filed Bug #1026791 in libindicator to track this problem. I believe the code is correct and the problem is elsewhere, but I may be wrong.

Izidor: what do you think? Either (1) we keep the warnings but have a proper ordering of the entries or (2) have this branch that removes the warnings and uses a better api (modify instead of remove/add) but cannot sort the menu. (1) is more conservative, but with large collections the number of warnings may become embarassing... also it may take some time before this problem is fixed in libindicator (assuming it's their problem).

Revision history for this message
Izidor Matušov (izidor) wrote :

Hi Antonio,

I believe the solution 1 is working for now quite long time. Users don't run GTG from console and don't see the warnings. It would be nice if it were solved, but it has just a low priority. I think the bug won't be solved any time soon and a workaround is needed for the solution. Did you try to "force" label updates? I.e. calling show() method on the menu item, combination of .hide()/.show() immediately, or even updating labels and then changing it back?

You gave your best effort and there are more bugs/feature requests which would have a bigger impact.

Revision history for this message
Roquentin (antonio-roquentin-deactivatedaccount) wrote :

I had tried those workarounds (hide/show), they don't fix the problem. I totally agree there are more important bugs to work on :-) but I hope it will get fixed one day.

Revision history for this message
Roquentin (antonio-roquentin-deactivatedaccount) wrote :

Marking this as duplicate of the bug in appindicator.

Revision history for this message
Izidor Matušov (izidor) wrote :

You can't mark this as a duplicate of that another bug. Even when it is solved, we need to merge you patch using reorder_child().

Changed in gtg:
status: In Progress → Confirmed
Revision history for this message
Roquentin (antonio-roquentin-deactivatedaccount) wrote :

OK, sorry. I had marked that bug as affecting gtg (is it appropriate?), so I thought one bug was enough.

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.