{"action":"created","issue":{"url":"https://api.github.com/repos/syncthing/syncthing-gtk/issues/96","labels_url":"https://api.github.com/repos/syncthing/syncthing-gtk/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/syncthing/syncthing-gtk/issues/96/comments","events_url":"https://api.github.com/repos/syncthing/syncthing-gtk/issues/96/events","html_url":"https://github.com/syncthing/syncthing-gtk/pull/96","id":58505737,"number":96,"title":"Added StatusNotifier backend for KDE 4 (and 5)","user":{"login":"alexander255","id":246386,"avatar_url":"https://avatars.githubusercontent.com/u/246386?v=3","gravatar_id":"","url":"https://api.github.com/users/alexander255","html_url":"https://github.com/alexander255","followers_url":"https://api.github.com/users/alexander255/followers","following_url":"https://api.github.com/users/alexander255/following{/other_user}","gists_url":"https://api.github.com/users/alexander255/gists{/gist_id}","starred_url":"https://api.github.com/users/alexander255/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexander255/subscriptions","organizations_url":"https://api.github.com/users/alexander255/orgs","repos_url":"https://api.github.com/users/alexander255/repos","events_url":"https://api.github.com/users/alexander255/events{/privacy}","received_events_url":"https://api.github.com/users/alexander255/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-22T15:14:36Z","updated_at":"2015-02-23T10:04:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/syncthing/syncthing-gtk/pulls/96","html_url":"https://github.com/syncthing/syncthing-gtk/pull/96","diff_url":"https://github.com/syncthing/syncthing-gtk/pull/96.diff","patch_url":"https://github.com/syncthing/syncthing-gtk/pull/96.patch"},"body":"Fix for #73 \r\n\r\nThis code has been tested in several desktop environments (see the \"compatibility table\" in `syncthing_gtk/statusicon.py`).\r\nI tried to minimize the amount of the desktop probing as far as possible, but some checks remain. By default the `gtk.StatusIcon()`-based back-end will be loaded and will then check whether GTK succeeded in embedding the icon (`.is_embedded()`). If it didn't work, the other backends are tried in order (AppIndicator, KDE4, Dummy on Unity; KDE4, AppIndicator, Dummy on non-Unity) until one of them initializes correctly. Note that the GTK back-end will always fail on Unity and KDE.\r\nThere also used to also be a Qt5-based back-end but it was very unstable and required several hacks to prevent it from crashing the application. (Somehow, after calling `PyQt5.Qt.QApplication()`, every attempt by GTK/Cairo/Pango to query `Xrdb` would cause a crash inside of Xlib...) As I couldn't find a convincing way to prevent the crashes (one that doesn't look like it's going to break tomorrow) I decided to ditch it entirely ([historical reference](http://pastebin.com/VxaU0L2p)).\r\n\r\nOther things:\r\n\r\n  * The menu item `Show/Hide window` is now always visible. It could be hidden on back-ends that support right-clicking but it wouldn't be worth it IMHO... (If you really insist on it I'll try adding that of course)\r\n  * The main window isn't forcibly shown anymore when it's clear that no icon is shown. I could add a signal that is dispatched whenever the Dummy back-end is loaded, but just because a back-end loads correctly it DOES NOT mean that an icon will be visible so that would be pretty unreliable at best. (Yes, I'd add that as well if you insist ;-) )"},"comment":{"url":"https://api.github.com/repos/syncthing/syncthing-gtk/issues/comments/75516026","html_url":"https://github.com/syncthing/syncthing-gtk/pull/96#issuecomment-75516026","issue_url":"https://api.github.com/repos/syncthing/syncthing-gtk/issues/96","id":75516026,"user":{"login":"kozec","id":1282500,"avatar_url":"https://avatars.githubusercontent.com/u/1282500?v=3","gravatar_id":"","url":"https://api.github.com/users/kozec","html_url":"https://github.com/kozec","followers_url":"https://api.github.com/users/kozec/followers","following_url":"https://api.github.com/users/kozec/following{/other_user}","gists_url":"https://api.github.com/users/kozec/gists{/gist_id}","starred_url":"https://api.github.com/users/kozec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kozec/subscriptions","organizations_url":"https://api.github.com/users/kozec/orgs","repos_url":"https://api.github.com/users/kozec/repos","events_url":"https://api.github.com/users/kozec/events{/privacy}","received_events_url":"https://api.github.com/users/kozec/received_events","type":"User","site_admin":false},"created_at":"2015-02-23T10:04:13Z","updated_at":"2015-02-23T10:04:13Z","body":"Looks good, I'll do some testing as well. Only two things:\r\n\r\n> The main window isn't forcibly shown anymore when it's clear that no icon is shown. I could add a signal that is dispatched whenever the Dummy back-end is loaded\r\n\r\nShowing window is certainly better than doing nothing visible, even if chances of being ran on DE that doesn't support any notifications at all areprobably slim.\r\n\r\nAnd second, I'm slightly worried about\r\n```\r\nfrom gi.repository import GObject as gobject\r\nfrom gi.repository import GLib    as glib\r\nfrom gi.repository import Gtk     as gtk\r\n```\r\nRest of code imports G* stuff capitalized and having one file that does it in other way would break at least code completion, if nothing else ;)"}}