diff --git a/Qt/Bungloo.py b/Qt/Bungloo.py index 72d04f2..82567d4 100755 --- a/Qt/Bungloo.py +++ b/Qt/Bungloo.py @@ -89,7 +89,10 @@ class Bungloo: self.oauth_implementation.log_out() self.timeline.hide() self.preferences.show() - self.timeline.evaluateJavaScript("bungloo.sidebar.logout()") + self.timeline.evaluateJavaScript("bungloo.sidebar.logout();") + + def next_show(self): + self.timeline.evaluateJavaScript("bungloo.sidebar.showContentForNext();") class Controller(QtCore.QObject): diff --git a/Qt/Windows.py b/Qt/Windows.py index 1a1bfb3..4d67936 100644 --- a/Qt/Windows.py +++ b/Qt/Windows.py @@ -154,12 +154,19 @@ class Timeline: searchAction.setStatusTip("Show Search") searchAction.triggered.connect(self.app.search_show) + nextAction = QtGui.QAction("&Next", self.window) + nextAction.setShortcut("Ctrl+6") + nextAction.setStatusTip("Show Next") + nextAction.triggered.connect(self.app.next_show) + windowMenu = menubar.addMenu("&View") windowMenu.addAction(timelineAction) windowMenu.addAction(mentionsAction) windowMenu.addAction(conversationAction) windowMenu.addAction(profileAction) windowMenu.addAction(searchAction) + windowMenu.addSeparator() + windowMenu.addAction(nextAction) aboutAction = QtGui.QAction("&About Bungloo", self.window) aboutAction.setStatusTip("Open about page in Webbrowser") diff --git a/WebKit/scripts/controller/Sidebar.js b/WebKit/scripts/controller/Sidebar.js index fa5f0ad..7aa04c7 100644 --- a/WebKit/scripts/controller/Sidebar.js +++ b/WebKit/scripts/controller/Sidebar.js @@ -169,6 +169,29 @@ function(HostApp, Paths, Cache) { img.src = img.src_active; } + Sidebar.prototype.showContentForNext = function() { + + var parts = [ + "timeline", + "mentions", + "conversation", + "entityProfile", + "search" + ]; + + for (var i = 0; i < parts.length; i++) { + var part = parts[i]; + var img = this.menu[part].getElementsByTagName("img")[0]; + if (img.src.endsWith(img.src_active)) { + var next = parts[(i+1)%parts.length]; + this.showContentFor(bungloo[next], this.menu[next]); + return; + } + } + + + } + Sidebar.prototype.setUnreadMentions = function(count) { this.unreadMentionsSpan.innerHTML = count == 0 ? "" : count; if (count > 0) { diff --git a/WebKit/scripts/controller/Timeline.js b/WebKit/scripts/controller/Timeline.js index 4b5e222..19f9981 100644 --- a/WebKit/scripts/controller/Timeline.js +++ b/WebKit/scripts/controller/Timeline.js @@ -14,7 +14,7 @@ function(Core, Paths, HostApp, URI) { this.action = "timeline"; this.reload_blocked = false; - this.max_length = 200; + this.max_length = 20; this.timeout = 10 * 1000; // every 10 seconds this.since_id = null; this.since_id_entity = null;