Merge lp:~larsu/gwibber/libmessaging-menu-port into lp:gwibber
| Status: | Merged |
|---|---|
| Merged at revision: | 1375 |
| Proposed branch: | lp:~larsu/gwibber/libmessaging-menu-port |
| Merge into: | lp:gwibber |
| Diff against target: |
249 lines (+37/-120) 2 files modified
data/gwibber.desktop.in.in (+6/-0) gwibber/microblog/dispatcher.py (+31/-120) |
| To merge this branch: | bzr merge lp:~larsu/gwibber/libmessaging-menu-port |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Ken VanDine | 2012-08-23 | Approve on 2012-08-24 | |
|
Review via email:
|
|||
- 1376. By Lars Karlitski on 2012-08-23
-
Add "Update Status" shortcut to the messaging menu
| Ken VanDine (ken-vandine) wrote : | # |
| Lars Karlitski (larsu) wrote : | # |
What you're seeing is indeed a bug in libmessaging-menu. Gio's g_menu_
By the way, I changed gwibber to not always show all streams in the messaging menu, but only the ones that have new messages. The "old" way of showing all streams all the time doesn't work anymore because libmessaging-menu removes sources as soon as they are activated. Thus, the activate callback calling the mmapp.remove_source in your example is redundant. Sorry that this isn't documented very well yet.
| Ken VanDine (ken-vandine) wrote : | # |
Oh, well is it also a bug that the count isn't getting removed? Is that the same bug that you mentioned?
| Ken VanDine (ken-vandine) wrote : | # |
Looks like all the remaining issues are really bugs in libmessaging-menu, so aprroved. Thanks!


I am inclined to approve this, it looks fine however I am seeing some strange behavior. Perhaps it's a just a bug in libmessaging-menu. Should remove_source on the count remove the menu item or make it insensitive? Here's a simple example script:
from gi.repository import MessagingMenu
from gi.repository import GObject
from gi.repository import Gio
from gettext import lgettext as _
def activated (mmapp, source): set_source_ count(source, 0) remove_ source( source)
print "%s has been activated" % source
mmapp.
mmapp.
if __name__ == "__main__": App.new ("gwibber.desktop") append_ source_ with_count ("messages", None, MESSAGES, 0) append_ source_ with_count ("replies", None, REPLIES, 0) append_ source_ with_count ("private", None, PRIVATE, 0) set_source_ count ("messages", 123) draw_attention ("replies") connect( "activate- source" , activated) MainLoop( ).run()
MESSAGES = _("Messages")
REPLIES = _("Replies")
PRIVATE = _("Private")
mmapp = MessagingMenu.
mmapp.register ()
mmapp.
mmapp.
mmapp.
mmapp.
mmapp.
mmapp.
GObject.