Ticket #1473 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

dbus - message "number of unreaded messages" desired

Reported by: anonymous Owned by: nk
Priority: normal Milestone: 0.10
Component: None Version: hg
Severity: trivial Keywords:
Cc: dimorph@… Blocked By:
OS: Blocking:

Description

I need a dbus-method for "number of unreaded messages"

Here is a patch:

diff -Naur gajim/src/gajim-remote.py gajim-new/src/gajim-remote.py
--- gajim/src/gajim-remote.py   2006-01-14 13:20:39.000000000 +0100
+++ gajim-new/src/gajim-remote.py       2006-01-27 16:38:11.000000000 +0100
@@ -203,6 +203,10 @@
                                                (_('account'), _(''), False)
                                        ]
                                ],                              
+                       'get_message_count': [ 
+                               _('Returns number of unreaded messages'), 
+                                       [ ] 
+                               ],
                        }
                if self.argv_len  < 2 or \
                        sys.argv[1] not in self.commands.keys(): # no args or bad args
diff -Naur gajim/src/remote_control.py gajim-new/src/remote_control.py
--- gajim/src/remote_control.py 2006-01-25 11:31:56.000000000 +0100
+++ gajim-new/src/remote_control.py     2006-01-27 16:32:42.000000000 +0100
@@ -108,6 +108,7 @@
                                self.remove_contact,
                                self.get_status,
                                self.get_status_message,
+                               self.get_message_count,
                        ])
 
        def raise_signal(self, signal, arg):
@@ -125,6 +126,9 @@
        def VcardInfo(self, *vcard):
                pass
 
+       def get_message_count(self, *args):
+               return str("Unreaded messages:"+str(gajim.interface.roster.nb_unread))
+
        def get_status(self, *args):
                '''get_status(account = None)
                returns status (show to be exact) which is the global one
@@ -499,3 +503,4 @@
                add_contact = method(INTERFACE)(add_contact)
                get_status = method(INTERFACE)(get_status)
                get_status_message = method(INTERFACE)(get_status_message)
+               get_message_count = method(INTERFACE)(get_message_count)

Attachments

unreadmsg.patch (1.6 KB) - added by dimorph@… 5 years ago.
unreadmsg.2.patch (1.1 KB) - added by dimorph@… 5 years ago.
Previous patch is wrong; new patch for revision 5327.

Change History

Changed 5 years ago by nk

  • owner changed from asterix to nk
  • milestone set to 0.10

please *ATTACH* the patch. but first fix so name is:

get_unread_msgs_number

you return what you ask. just the number not string b4 it.

thanks

Changed 5 years ago by dimorph@…

Changed 5 years ago by dimorph@…

Previous patch is wrong; new patch for revision 5327.

Changed 5 years ago by asterix

  • status changed from new to closed
  • resolution set to fixed

it's in, Thx for the patch. See [13b303190355d98b02fdd27916bd81819e24c84a]

Add/Change #1473 (dbus - message "number of unreaded messages" desired)

Author


E-mail address and user name can be saved in the Preferences.


Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Next status will be 'needinfo'
 
Note: See TracTickets for help on using tickets.