コード例 #1
0
ファイル: JAMedia.py プロジェクト: fdanesse/Historico
    def __click_derecho_en_lista(self, widget, event):
        """
        Esto es para abrir un menu de opciones cuando
        el usuario hace click derecho sobre un elemento en
        la lista de reproduccion, permitiendo copiar, mover y
        borrar el archivo o streaming o simplemente quitarlo
        de la lista.
        """

        self.__cancel_toolbars_flotantes()

        # FIXME: Desactivar __cargar_reproducir

        boton = event.button
        pos = (event.x, event.y)
        tiempo = event.time
        path, columna, xdefondo, ydefondo = (None, None, None, None)

        try:
            path, columna, xdefondo, ydefondo = widget.get_path_at_pos(
                int(pos[0]), int(pos[1]))

        except:
            return

        # TreeView.get_path_at_pos(event.x, event.y) devuelve:
        # * La ruta de acceso en el punto especificado (x, y),
        # en relación con las coordenadas widget
        # * El gtk.TreeViewColumn en ese punto
        # * La coordenada X en relación con el fondo de la celda
        # * La coordenada Y en relación con el fondo de la celda

        if boton == 1:
            return

        elif boton == 3:
            from Widgets import MenuList

            menu = MenuList(widget, boton, pos, tiempo, path, widget.modelo)
            menu.connect('accion', self.__set_accion)
            gtk.Menu.popup(menu, None, None, None, boton, tiempo)

        elif boton == 2:
            return
コード例 #2
0
    def __click_derecho_en_lista(self, widget, event):
        """
        Esto es para abrir un menu de opciones cuando
        el usuario hace click derecho sobre un elemento en
        la lista de imágenes, permitiendo copiar, mover y
        borrar el archivo o simplemente quitarlo
        de la lista.
        """

        boton = event.button
        pos = (event.x, event.y)
        tiempo = event.time

        if boton == 1:
            return

        elif boton == 3:

            path = widget.get_path_at_pos(
                int(pos[0]), int(pos[1]))
            #iter = widget.get_model().get_iter(path)

            from Widgets import MenuList

            menu = MenuList(
                widget, boton, pos,
                tiempo, path, widget.get_model(),
                self.path)

            menu.connect('accion', self.__set_menu_accion)
            menu.popup(None, None, None, None, boton, tiempo)

        elif boton == 2:
            return
コード例 #3
0
ファイル: UbuntuRadio.py プロジェクト: fdanesse/JAMediaSuite
    def __get_menu_lista(self, widget, event):
        """
        Despliega menu contextual de elemento en lista.
        """

        boton = event.button
        pos = (event.x, event.y)
        tiempo = event.time
        path, columna, xdefondo, ydefondo = (None, None, None, None)

        try:
            path_pos = widget.get_path_at_pos(int(pos[0]), int(pos[1]))
            path, columna, xdefondo, ydefondo = path_pos

        except:
            return

        from Widgets import MenuList

        menu = MenuList(widget, boton, pos, tiempo, path, widget.get_model())

        menu.connect('accion', self.__set_accion)
        gtk.Menu.popup(menu, None, None, None, boton, tiempo)
コード例 #4
0
ファイル: UbuntuRadio.py プロジェクト: fdanesse/JAMediaSuite
    def __get_menu_lista(self, widget, event):
        """
        Despliega menu contextual de elemento en lista.
        """

        boton = event.button
        pos = (event.x, event.y)
        tiempo = event.time
        path, columna, xdefondo, ydefondo = (None, None, None, None)

        try:
            path_pos = widget.get_path_at_pos(int(pos[0]), int(pos[1]))
            path, columna, xdefondo, ydefondo = path_pos

        except:
            return

        from Widgets import MenuList

        menu = MenuList(widget, boton, pos,
            tiempo, path, widget.get_model())

        menu.connect('accion', self.__set_accion)
        gtk.Menu.popup(menu, None, None, None, boton, tiempo)
コード例 #5
0
    def __click_derecho_en_lista(self, widget, event):
        """
        Esto es para abrir un menu de opciones cuando
        el usuario hace click derecho sobre un elemento en
        la lista de reproduccion, permitiendo copiar, mover y
        borrar el archivo o streaming o simplemente quitarlo
        de la lista.
        """

        self.__cancel_toolbars_flotantes()

        # FIXME: Desactivar __cargar_reproducir

        boton = event.button
        pos = (event.x, event.y)
        tiempo = event.time
        path, columna, xdefondo, ydefondo = (None, None, None, None)

        try:
            path, columna, xdefondo, ydefondo = widget.get_path_at_pos(
                int(pos[0]), int(pos[1]))

        except:
            return

        # TreeView.get_path_at_pos(event.x, event.y) devuelve:
        # * La ruta de acceso en el punto especificado (x, y),
        # en relación con las coordenadas widget
        # * El gtk.TreeViewColumn en ese punto
        # * La coordenada X en relación con el fondo de la celda
        # * La coordenada Y en relación con el fondo de la celda

        if boton == 1:
            return

        elif boton == 3:
            from Widgets import MenuList

            menu = MenuList(widget, boton, pos, tiempo, path,
                            widget.get_model())
            menu.connect('accion', self.__set_accion)
            menu.popup(None, None, None, None, boton, tiempo)

        elif boton == 2:
            return