Commit fc475d97 authored by Dan Pascu's avatar Dan Pascu

Added keyboard shortcut to chat window for showing the main window

parent 1c156d5d
...@@ -7,7 +7,8 @@ import os ...@@ -7,7 +7,8 @@ import os
from PyQt4 import uic from PyQt4 import uic
from PyQt4.QtCore import Qt, QEasingCurve, QEvent, QPointF, QPropertyAnimation, QRect, QSettings, QTimer, pyqtSignal from PyQt4.QtCore import Qt, QEasingCurve, QEvent, QPointF, QPropertyAnimation, QRect, QSettings, QTimer, pyqtSignal
from PyQt4.QtGui import QAction, QBrush, QColor, QDesktopServices, QIcon, QLabel, QLinearGradient, QListView, QMenu, QPainter, QPalette, QPen, QPolygonF, QTextCursor, QTextDocument, QTextEdit from PyQt4.QtGui import QAction, QBrush, QColor, QIcon, QLabel, QLinearGradient, QListView, QMenu, QPainter, QPalette, QPen, QPolygonF, QTextCursor, QTextDocument, QTextEdit
from PyQt4.QtGui import QApplication, QDesktopServices
from PyQt4.QtWebKit import QWebPage, QWebSettings, QWebView from PyQt4.QtWebKit import QWebPage, QWebSettings, QWebView
from abc import ABCMeta, abstractmethod from abc import ABCMeta, abstractmethod
...@@ -731,6 +732,9 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin): ...@@ -731,6 +732,9 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
self.control_button.actions.add_audio = QAction("Add audio", self, triggered=self._AH_AddAudio) self.control_button.actions.add_audio = QAction("Add audio", self, triggered=self._AH_AddAudio)
self.control_button.actions.remove_audio = QAction("Remove audio", self, triggered=self._AH_RemoveAudio) self.control_button.actions.remove_audio = QAction("Remove audio", self, triggered=self._AH_RemoveAudio)
self.control_button.actions.dump_session = QAction("Dump session", self, triggered=self._AH_DumpSession) # remove later -Dan self.control_button.actions.dump_session = QAction("Dump session", self, triggered=self._AH_DumpSession) # remove later -Dan
self.control_button.actions.main_window = QAction("Main Window", self, triggered=self._AH_MainWindow, shortcut='Ctrl+B', shortcutContext=Qt.ApplicationShortcut)
self.addAction(self.control_button.actions.main_window) # make this active even when it's not in the contol_button's menu
self.session_list = ChatSessionListView(self) self.session_list = ChatSessionListView(self)
self.session_list.setObjectName('session_list') self.session_list.setObjectName('session_list')
...@@ -1365,6 +1369,10 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin): ...@@ -1365,6 +1369,10 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
print "conf: %r" % blink_session.client_conference print "conf: %r" % blink_session.client_conference
print "active: %r" % blink_session.active print "active: %r" % blink_session.active
def _AH_MainWindow(self):
blink = QApplication.instance()
blink.main_window.show()
def _EH_CloseSession(self): def _EH_CloseSession(self):
if self.selected_session is not None: if self.selected_session is not None:
self.selected_session.end(delete=True) self.selected_session.end(delete=True)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment