marxjohnson / btsyncindicator

Bittorrent Sync indicator for linux desktops
GNU Lesser General Public License v3.0
41 stars 5 forks source link

Doesn't work properly in Ubuntu 13.10 #9

Closed hotice closed 10 years ago

hotice commented 11 years ago

btsyncindicator doesn't display the sync status, etc. in Ubuntu 13.10 Saucy Salamander. Here's how it looks like:

btsyncindicator

I'm using the latest version from the PPA: 1.1.70-4~saucy

marxjohnson commented 11 years ago

Hi hotice, Thanks for the report. Please can you try the following for me?

If there's no output from the terminal, I'll have to add some debugging messages.

dswd commented 11 years ago

This could be related to #10 and #11 as I had the same behavior before the fix.

marxjohnson commented 11 years ago

@dswd The screenshot is certainly consistent with requests not working

hotice commented 11 years ago

I've just tried the latest code from git and the same thing occurs. Here's the "/usr/lib/btsync-user/btsyncindicator.py" output:

usr/lib/btsync-user/btsyncindicator.py:65: Warning: /build/buildd/glib2.0-2.37.7/./gobject/gsignal.c:2475: signal 'child-added' is invalid for instance '0x1f950e0' of type 'GtkMenu' self.ind.set_menu(self.menu)

marxjohnson commented 11 years ago

Thanks for the info. It looks like the same problem as described here: https://bugs.launchpad.net/ubuntu/+source/glipper/+bug/1203888 namely that adding menu items after a menu is displayed doesn't work in Saucy. I'm not yet clear whether this is a bug or an API change, but I'll keep an eye on it and keep you updated. Hopefully it'll be sorted by the Saucy release!

hotice commented 11 years ago

Thanks!

tuxpoldo commented 11 years ago

Is there anything new about this? I've released now the version 1.1.70-5 that incorporates btsyncindicator v0.9 - perhaps this version solves the problem...

marxjohnson commented 11 years ago

The problem seems to be in libappindicator rather than in my indicator, until that's solved I dont think there's anything I can do.

hotice commented 11 years ago

By the way, there's also a packaging bug. The btsync-user package should depend on python-appindicator

tuxpoldo commented 11 years ago

Added python-appindicator dependency to the packaging project as https://github.com/tuxpoldo/btsync-deb/issues/7 Will be released with 1.1.70-6

flexiondotorg commented 11 years ago

@hotice Have you defined login and password in your btsync.conf file?

hotice commented 11 years ago

@flexiondotorg: The tray icon shows up just fine in Cinnamon for instance but not under Unity(Ubuntu 13.10) so it's not conf-related.

pjssilva commented 11 years ago

When running from console I get the following error message:

/usr/lib/btsync-user/btsyncindicator.py:106: Warning: /build/buildd/glib2.0-2.38.0/./gobject/gsignal.c:2475: signal 'child-added' is invalid for instance '0x1d9f0e0' of type 'GtkMenu'

Digging a little bit on the internet after this I found the following bug report on another indicator:

https://bugs.launchpad.net/ubuntu/+source/glipper/+bug/1203888

It seems like "trying to add menu entries after sending the menu to the indicator, which doesn't work any more in Saucy", see comment #8 on above bug report for sample code.This looks like a big problem for the bitsync indicator because reading its code it seems that it is structured after the idea of adding and removing menu entries...

I have another indicator in my panel that adds entries somehow on the fly in the panel and is working, its a another clipboard manager called ClipIt. Maybe look at its source code to get hints how this is still possible?

tuxpoldo commented 10 years ago

Anything new here?

marxjohnson commented 10 years ago

Yes, I posted a question on AskUbuntu and a developer who's been investigating the problem replied, this is a bug in the GTK library rather then the indicator, and he's working on a fix.

hotice commented 10 years ago

Here's a dirty work-around:

--- /btsyncindicator/btsyncindicator.py
+++ /btsyncindicator/btsyncindicator.py
@@ -103,7 +103,6 @@
             self.btsync_user = False

         self.menu_setup()
-        self.ind.set_menu(self.menu)

     def load_config(self):
         """
@@ -429,7 +428,7 @@
             if (topseppos == bottomseppos-1):
                 menu.remove(folderitem['topsepitem'])
                 folderitem['topsepitem'] = None
-
+        self.ind.set_menu(self.menu)

     def show_error(self, message):
marxjohnson commented 10 years ago

Nice one @hotice that does seem to work, although it takes much longer for the indicator to appear as it has to initialise and do its first update before it's displayed, and new peers or folders added after initialisation don't appear.

Anyone desperate to have something working on saucy can apply hotice's patch to their indicator script while we wait for the upstream fix.

marxjohnson commented 10 years ago

The upstream bug now has a "Fix committed", so this should be sorted soon.

hotice commented 10 years ago

The fix has landed in the Ubuntu 13.10 proposed repository: https://launchpad.net/ubuntu/+source/libdbusmenu/12.10.3+13.10.20131104-0ubuntu1

marxjohnson commented 10 years ago

Great, I just enabled proposed and installed the updated package, and it solves the problem. As soon as it hits the stable repository I'll close the bug.

marxjohnson commented 10 years ago

Looks like this snuck under my radar, it's now been released so closing.