BluABK / sane-subfeed

A sane subscription feed that - unlike YouTube - actually shows you the feed as-is. No silly omission of videos.
GNU Affero General Public License v3.0
7 stars 1 forks source link

Replace hardcoded Qt.QMouseEvent with configurable hotkeys.ini ones #3

Open BluABK opened 6 years ago

BluABK commented 6 years ago

Currently all mouse events/hotkeys are hardcoded.

This mostly concerns GridViews like SubfeedView and PlayView:

    def mousePressEvent(self, QMouseEvent):  # FIXME: Make mouse hotkeys based on hotkeys.ini
        """
        Override mousePressEvent to support mouse button actions
        :param QMouseEvent:
        :return:
        """
        if QMouseEvent.button() == Qt.MidButton:
            self.decrease_prio()
        elif QMouseEvent.button() == Qt.LeftButton and QApplication.keyboardModifiers() == Qt.ControlModifier:
            self.decrease_prio()
        elif QMouseEvent.button() == Qt.LeftButton and QApplication.keyboardModifiers() == Qt.AltModifier:
            self.mark_discarded()
        elif QMouseEvent.button() == Qt.LeftButton and QApplication.keyboardModifiers() == Qt.ShiftModifier:
            self.config_play_video(self.video.vid_path, self.get_default_player(), mark_watched=False)
        elif QMouseEvent.button() == Qt.LeftButton:
            self.config_play_video(self.video.vid_path, self.get_default_player())
BluABK commented 6 years ago

Related issues: #3 and #15.

BluABK commented 5 years ago

Hotfixed for Subfeed View in commit 3111c833096c28ea9390fa8ec7add948b2ca5cd6