diff --git a/Linux/Bungloo.py b/Linux/Bungloo.py index 59eeedc..42610f1 100755 --- a/Linux/Bungloo.py +++ b/Linux/Bungloo.py @@ -13,7 +13,6 @@ import shutil class Bungloo: def __init__(self): - print __file__ self.app = QtGui.QApplication(sys.argv) self.new_message_windows = [] self.controller = Controller(self) @@ -36,7 +35,7 @@ class Bungloo: return Helper.Helper.get_resource_path() def resources_uri(self): - return "file://localhost" + os.path.abspath(os.path.join(self.resources_path(), "WebKit")) + return "file://localhost/" + os.path.abspath(os.path.join(self.resources_path(), "WebKit")) def login_with_entity(self, entity): self.controller.setStringForKey(entity, "entity") diff --git a/Linux/Helper.py b/Linux/Helper.py index 50910fa..21b2212 100644 --- a/Linux/Helper.py +++ b/Linux/Helper.py @@ -62,12 +62,12 @@ class WebViewCreator(QtWebKit.QWebView): js_plugin_path = os.path.expanduser('~/.bungloo/Plugin.js') if os.access(js_plugin_path, os.R_OK): - func = "setTimeout(function() { loadJsPlugin('file://localhost" + js_plugin_path + "') }, 1000);" + func = "setTimeout(function() { loadJsPlugin('file://localhost/" + js_plugin_path + "') }, 1000);" frame.evaluateJavaScript(func) css_plugin_path = os.path.expanduser('~/.bungloo/Plugin.css') if os.access(css_plugin_path, os.R_OK): - func = "setTimeout(function() { loadCssPlugin('file://localhost" + css_plugin_path + "') }, 1000);" + func = "setTimeout(function() { loadCssPlugin('file://localhost/" + css_plugin_path + "') }, 1000);" frame.evaluateJavaScript(func) if callback: diff --git a/Linux/Windows.py b/Linux/Windows.py index 0495d24..ee1fc0c 100644 --- a/Linux/Windows.py +++ b/Linux/Windows.py @@ -294,6 +294,11 @@ class NewPost(Helper.RestorableWindow): sendPostAction.setStatusTip("Send post") sendPostAction.triggered.connect(self.sendMessage) + togglePrivateAction = QtGui.QAction("&Toggle private", self) + togglePrivateAction.setShortcut("Ctrl+P") + togglePrivateAction.setStatusTip("Toogle if private post") + togglePrivateAction.triggered.connect(self.toggleIsPrivate) + exitAction = QtGui.QAction("&Exit", self) exitAction.setShortcut("Ctrl+Q") exitAction.setStatusTip("Exit Bungloo") @@ -303,6 +308,7 @@ class NewPost(Helper.RestorableWindow): fileMenu = menubar.addMenu("&File") fileMenu.addAction(newPostAction) fileMenu.addAction(sendPostAction) + fileMenu.addAction(togglePrivateAction) fileMenu.addAction(exitAction) timelineAction = QtGui.QAction("&Timeline", self) @@ -315,6 +321,11 @@ class NewPost(Helper.RestorableWindow): mentionsAction.setStatusTip("Show Mentions") mentionsAction.triggered.connect(self.app.mentions_show) + findEntityAction = QtGui.QAction("&Open Profile", self) + findEntityAction.setShortcut("Ctrl+u") + findEntityAction.setStatusTip("Find entity and open its profile view") + findEntityAction.triggered.connect(self.app.find_entity_show) + hideAction = QtGui.QAction("&Hide window", self) hideAction.setShortcut("Ctrl+W") hideAction.setStatusTip("Hide this window") @@ -323,6 +334,7 @@ class NewPost(Helper.RestorableWindow): windowMenu = menubar.addMenu("&Windows") windowMenu.addAction(timelineAction) windowMenu.addAction(mentionsAction) + windowMenu.addAction(findEntityAction) windowMenu.addAction(hideAction) self.statusBar().showMessage('256') @@ -331,7 +343,8 @@ class NewPost(Helper.RestorableWindow): self.addButton.setToolTip("Add photo") self.addButton.clicked.connect(self.openFileDialog) self.addButton.setAutoRaise(True) - addIcon = QtGui.QIcon.fromTheme("insert-image", QtGui.QIcon(self.app.resources_path() + "/images/Actions-insert-image-icon.png")); + #addIcon = QtGui.QIcon.fromTheme("insert-image", QtGui.QIcon(self.app.resources_path() + "/images/Actions-insert-image-icon.png")) + addIcon = QtGui.QIcon(self.app.resources_path() + "/images/glyphicons_138_picture.png") self.addButton.setIcon(addIcon) self.statusBar().addPermanentWidget(self.addButton) @@ -339,8 +352,10 @@ class NewPost(Helper.RestorableWindow): self.isPrivateButton.setToolTip("Make private") self.isPrivateButton.clicked.connect(self.toggleIsPrivate) self.isPrivateButton.setAutoRaise(True) - self.isPrivateIcon = QtGui.QIcon(self.app.resources_path() + "/images/Lock-Lock-icon.png") - self.isNotPrivateIcon = QtGui.QIcon(self.app.resources_path() + "/images/Lock-Unlock-icon.png") + #self.isPrivateIcon = QtGui.QIcon(self.app.resources_path() + "/images/Lock-Lock-icon.png") + self.isPrivateIcon = QtGui.QIcon(self.app.resources_path() + "/images/glyphicons_203_lock.png") + #self.isNotPrivateIcon = QtGui.QIcon(self.app.resources_path() + "/images/Lock-Unlock-icon.png") + self.isNotPrivateIcon = QtGui.QIcon(self.app.resources_path() + "/images/glyphicons_204_unlock.png") self.isPrivateButton.setIcon(self.isNotPrivateIcon) self.statusBar().addPermanentWidget(self.isPrivateButton) @@ -348,7 +363,8 @@ class NewPost(Helper.RestorableWindow): self.sendButton.setToolTip("Send") self.sendButton.clicked.connect(self.sendMessage) self.sendButton.setAutoRaise(True) - sendIcon = QtGui.QIcon.fromTheme("mail-send", QtGui.QIcon(self.app.resources_path() + "/images/send-icon.png")) + #sendIcon = QtGui.QIcon.fromTheme("mail-send", QtGui.QIcon(self.app.resources_path() + "/images/send-icon.png")) + sendIcon = QtGui.QIcon(self.app.resources_path() + "/images/glyphicons_123_message_out.png") self.sendButton.setIcon(sendIcon) self.statusBar().addPermanentWidget(self.sendButton) diff --git a/images/glyphicons_123_message_out.png b/images/glyphicons_123_message_out.png new file mode 100644 index 0000000..76126c3 Binary files /dev/null and b/images/glyphicons_123_message_out.png differ diff --git a/images/glyphicons_138_picture.png b/images/glyphicons_138_picture.png new file mode 100644 index 0000000..226e21d Binary files /dev/null and b/images/glyphicons_138_picture.png differ diff --git a/images/glyphicons_203_lock.png b/images/glyphicons_203_lock.png new file mode 100644 index 0000000..b0de244 Binary files /dev/null and b/images/glyphicons_203_lock.png differ diff --git a/images/glyphicons_204_unlock.png b/images/glyphicons_204_unlock.png new file mode 100644 index 0000000..b38e078 Binary files /dev/null and b/images/glyphicons_204_unlock.png differ