From 8e8922b78e3d0ac8efee155cdd6afe253004ceb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Cort=C3=A9z?= Date: Thu, 2 Jun 2016 13:12:42 -0500 Subject: [PATCH] Added friends buffer to the list of supported timelines --- changelog.md | 6 ++++++ src/controller/mainController.py | 7 +++---- src/wxUI/dialogs/timeline.py | 8 ++++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/changelog.md b/changelog.md index de413ac..75f1a85 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,12 @@ ## Changes for the current build () +* Removed platform from "last seen" column in the friends list as it could cause some problems and it was being not so exact. +* Now deleted audios are not parsed and displayed as "audio removed from library". They are silently ignored. +* It's possible to open a friends timeline for others. + +## Changes on build 2016.05.25 + * Added grouped controls in the audio searches dialogue. It will be more accessible so screen readers could detect and read the label for radio buttons. * Added documents to the list of supported attachments in the post viewer. The action for this kind of attachments is to open the default web browser, pointing to the URL address of that file. * Now It's possible to add photos to the wall, by uploading files to the VK servers. Check the attachments button in the new post dialogue for this. Basically it is possible to add some photos and when the post is sent, photos will start to be uploaded before. At the moment it is not possible to add descriptions to photos. Take in to account that photos will be uploaded when the send button is pressed and the post could take some time before being posted. diff --git a/src/controller/mainController.py b/src/controller/mainController.py index d61a61b..358d95b 100644 --- a/src/controller/mainController.py +++ b/src/controller/mainController.py @@ -155,7 +155,6 @@ class Controller(object): player.player.play_all(audios) def view_post(self, post_object, controller_): -# print post_object p = getattr(posts, controller_)(self.session, post_object) p.dialog.get_response() p.dialog.Destroy() @@ -221,10 +220,7 @@ class Controller(object): b = self.get_current_buffer() if not hasattr(b, "get_users"): b = self.search("home_timeline") -# ids = b.get_users() d = [] -# for i in ids: -# d.append((i, self.session.get_user_name(i))) for i in self.session.db["users"]: d.append((i, self.session.get_user_name(i))) for i in self.session.db["groups"]: @@ -246,6 +242,9 @@ class Controller(object): elif buffertype == "wall": buffer = buffers.feedBuffer(parent=self.window.tb, name="{0}_feed".format(user_id,), composefunc="compose_status", session=self.session, endpoint="get", parent_endpoint="wall", extended=1, count=self.session.settings["buffers"]["count_for_wall_buffers"], owner_id=user_id) name_ = _(u"{0}'s wall posts").format(user,) + elif buffertype == "friends": + buffer = buffers.peopleBuffer(parent=self.window.tb, name="friends_{0}".format(user_id,), composefunc="compose_person", session=self.session, endpoint="get", parent_endpoint="friends", count=5000, fields="uid, first_name, last_name, last_seen", user_id=user_id) + name_ = _(u"{0}'s friends").format(user,) self.buffers.append(buffer) call_threaded(self.complete_buffer_creation, buffer=buffer, name_=name_, position=self.window.search("timelines")) diff --git a/src/wxUI/dialogs/timeline.py b/src/wxUI/dialogs/timeline.py index c198f9a..98e7092 100644 --- a/src/wxUI/dialogs/timeline.py +++ b/src/wxUI/dialogs/timeline.py @@ -16,10 +16,12 @@ class timelineDialog(widgetUtils.BaseDialog): userSizer.Add(self.cb, 0, wx.ALL, 5) actionsstatic = wx.StaticBox(panel, label=_(u"Buffer type")) self.wall = wx.RadioButton(panel, wx.NewId(), _(u"&Wall posts"), style=wx.RB_GROUP) - self.audio = wx.RadioButton(panel, wx.NewId(), _(u"&Audio")) + self.audio = wx.RadioButton(panel, wx.NewId(), _(u"Audio")) + self.friends = wx.RadioButton(panel, wx.NewId(), _(u"Friends")) radioSizer = wx.StaticBoxSizer(actionsstatic, wx.HORIZONTAL) radioSizer.Add(self.wall, 0, wx.ALL, 5) radioSizer.Add(self.audio, 0, wx.ALL, 5) + radioSizer.Add(self.friends, 0, wx.ALL, 5) sizer.Add(radioSizer, 0, wx.ALL, 5) ok = wx.Button(panel, wx.ID_OK, _(u"&OK")) ok.SetDefault() @@ -38,4 +40,6 @@ class timelineDialog(widgetUtils.BaseDialog): if self.audio.GetValue() == True: return "audio" elif self.wall.GetValue() == True: - return "wall" \ No newline at end of file + return "wall" + elif self.friends.GetValue() == True: + return "friends" \ No newline at end of file