gentakojima / emojione-picker-ubuntu

Emoji picker for Ubuntu based on icons by Emojione
239 stars 14 forks source link

Does not appear in stalonetray #3

Closed singpolyma closed 8 years ago

singpolyma commented 8 years ago

When I run "stalonetray" and then run the ./emojione-picker nothing shows up in the tray, and nothing is printed in the console.

gentakojima commented 8 years ago

Thank you very much for taking your time to send this issue. I'm looking forward to fix this as soon as possible.

Maybe the problem could be related to the fact that stalonetray implements the freedesktop.org standard systray and KDE systray, but not the appindicator systray, which I'm using.

Currently, the app just uses python-appindicator, providing python bindings for libappindicator. That might or might not fallback to other systray implementations. I'm still unsure at this time.

I need some time to research this. I might need to fallback manually to Gtk.StatusIcon(), and that might require some additional code changes.

gentakojima commented 8 years ago

I tried it with Stalonetray 0.8.1 and it kind of works.

escritorio 1_08

Yes, the icons are huge (seems like #4), but it's definitely there. Can you check if you have all the dependencies installed?

For Ubuntu 14.04: gir1.2-rsvg-2.0 gir1.2-notify-0.7 gir1.2-appindicator3-0.1 python-gi python-pil python-notify

singpolyma commented 8 years ago
$ sudo apt-get install gir1.2-rsvg-2.0 gir1.2-notify-0.7 gir1.2-appindicator3-0.1 python-gi python-pil python-notify

Reading package lists... Done
Building dependency tree
Reading state information... Done
gir1.2-notify-0.7 is already the newest version.
gir1.2-notify-0.7 set to manually installed.
gir1.2-rsvg-2.0 is already the newest version.
python-notify is already the newest version.
python-pil is already the newest version.
gir1.2-appindicator3-0.1 is already the newest version.
gir1.2-appindicator3-0.1 set to manually installed.
python-gi is already the newest version.
python-gi set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 79 not upgraded.
singpolyma commented 8 years ago

When I insert a print before the Gtk.main() call, I do see that printed out, so it's not getting stuck launching

singpolyma commented 8 years ago

stalonetray 0.8.1 [ XPM:yes DEBUG:yes KDE:yes ]

singpolyma commented 8 years ago

I see this when I run stalonetray --log-level trace and then run emojione-picker:

Feb 16 20:02:08 stalonetray tray_main(): Unhandled event: CreateNotify, serial: 561, window: 0x7f
Feb 16 20:02:08 stalonetray tray_main(): Unhandled event: CreateNotify, serial: 561, window: 0x7f
singpolyma commented 8 years ago

Ok, so, fun fact -- I tried the GNOME3 install that is also on this laptop (in both gnome-shell and more "traditional" looking modes) and the icon doesn't show up in the tray there either... so not specific to stalonetray.

singpolyma commented 8 years ago

For fun, I built the *.deb as per the README and installed and ran that version instead. No change

singpolyma commented 8 years ago

Oh man, I'm so sorry. So, it's just really slow to load. If I wait over 30 seconds, the icon eventually shows!

gentakojima commented 8 years ago

Oops. That's ok, this is still an issue. There are a lot of icons, but it just can't take 30 seconds to show up without any output. I'll try to address this problem by putting a load indicator in the console output while I don't solve it.

Do you have a slow computer? Maybe it would be a good idea to try this on a slower machine or a resource limited virtual machine. It just takes 3~5 seconds to load on my machine.

singpolyma commented 8 years ago

My computer is a bit older, bit it has 4GB RAM, 2Ghz dual core, and an SSD.

I tried to put in more prints, but can't figure out what is taking the time. If I put a print right before the gtkmain call, that prints out after a couple seconds, but it takes much longer to appear in the tray after that.

gentakojima commented 8 years ago

I tried installing a virtual machine with 1 core and 40% of CPU speed (minimum acceptable by virtualbox) and it also takes less than 5 seconds to load.

What Ubuntu/other distro version are you using? What graphics card and driver combination?

Did you notice any difference in loading times between different desktop environments/systray implementations?

Did you notice any speed up on a second run compared to the first one?

singpolyma commented 8 years ago

I am on Trisquel, running on GNOME is the same speed issue -- maching is gluglug thinkpad X60 with SSD option -- gfx onboard intel stuff

gentakojima commented 8 years ago

I've added a settings pane with two interesting options: a low-end computer mode, and the possibility to disable skin tones or enforce a particular skin tone on all toned emojis.

I think the problem here is the old Intel card. There is a total of 1619 emojis, so that's a lot of menus to build. You must add another item by each group. There are 65*5 toned emojis, 9 categories, and about 15 subgroups, so total is about 1700 menu items.

By choosing a particular skin tone emoji or untoned emojis, the number goes down to 1294 emojis, about 1350 menu items.

The low-end computer mode removes even more icons, 224 at this point. So that's 1070 emojis, about 1110 menu items.

If you activate the low-end computer mode, you should notice a boot speed up of about 35%. I plan to continue removing emojis from this mode to leave it at about 900 emojis (to get a total speed up of about 49%), but it's a manual task and it takes time.

Currently, I still need to take a look at Activity and Travel, and remove even more emojis from Symbols. I will probably revisit later People, Food, Nature and Objects if I can't get the number down to 900.

singpolyma commented 8 years ago

Can't open settings from the dev folder: gi._glib.GError: Failed to open file '/usr/share/emojione-picker/assets/settings.glade': No such file or directory

gentakojima commented 8 years ago

The application is detecting /usr/share/emojione-picker/ as the assets directory, meaning that you previously installed an older version via Debian package.

That file contains the settings dialog definitions.

Please, uninstall the older version and try again.

singpolyma commented 8 years ago

Ok, with "low end computer mode" it went down to ~10 seconds and with also untoned emoji it went down to 5 seconds. which is a totally reasonable load time :)