Example #1
0
    def display_add_dialog_for(self, current, c):
        dialog = SCCueDialog(self.__main_window, c)
        result = dialog.run()
        dialog.destroy()

        if result == Gtk.ResponseType.OK:
            self.__main_window.add_cue_relative_to(current, c)
        else:
            pass
Example #2
0
 def on_click(self, view, event):
     x, y = int(event.x), int(event.y)
     path = self.__tree_view.get_path_at_pos(x, y)
     if path:
         cue = self.__model.get_cue_at(path[0])
         if cue is not None:
             if event.button is Gdk.BUTTON_SECONDARY:
                 self.__popover.popover_cue(cue, x, y)
             elif (
                 event.button is Gdk.BUTTON_PRIMARY
                 and event.type == Gdk.EventType.DOUBLE_BUTTON_PRESS
                 and not self.__main_window.locked
             ):
                 dialog = SCCueDialog(self.__main_window, cue)
                 dialog.run()
                 dialog.destroy()
         else:
             logger.debug("Queried cue was None (Path index was {0})".format(path[0].get_indices()[0]))
     else:
         logger.debug("Queried path was None")
Example #3
0
 def on_edit(self, button):
     self.hide()
     dialog = SCCueDialog(self.__main_window, self.__focused_cue)
     dialog.run()
     dialog.destroy()