Ejemplo n.º 1
0
 def __init__(self):
     
     Gtk.Toolbar.__init__(self)
     
     self.ocultar_controles = False
     
     self.insert(G.get_separador(draw = False,
         ancho = 0, expand = True), -1)
     
     item = Gtk.ToolItem()
     label = Gtk.Label("Ocultar Controles:")
     label.show()
     item.add(label)
     self.insert(item, -1)
     
     self.insert(G.get_separador(draw = False,
         ancho = 3, expand = False), -1)
     
     switch = Gtk.Switch()
     item = Gtk.ToolItem()
     item.set_expand(False)
     item.add(switch)
     self.insert(item, -1)
     
     self.insert(G.get_separador(draw = False,
         ancho = 0, expand = True), -1)
     
     self.show_all()
     
     switch.connect('button-press-event', self.__set_controles_view)
Ejemplo n.º 2
0
    def __init__(self):
        Gtk.Toolbar.__init__(self)
        self.modify_bg(0, Gdk.Color(65000, 65000, 65000))

        #self.insert(get_separador(draw = False, ancho = 3, expand = False), -1)
        self.insert(G.get_separador(draw=False, ancho=0, expand=True), -1)

        archivo = os.path.join(JAMediaObjectsPath, "Iconos",
                               "escalaoriginal.png")
        boton = G.get_boton(archivo,
                            flip=False,
                            color=Gdk.Color(65000, 65000, 65000),
                            pixels=G.get_pixels(0.8))
        boton.set_tooltip_text("Original")
        boton.connect("clicked", self.original)
        self.insert(boton, -1)

        self.insert(G.get_separador(draw=False, ancho=3, expand=False), -1)

        archivo = os.path.join(JAMediaObjectsPath, "Iconos", "alejar.png")
        boton = G.get_boton(archivo,
                            flip=False,
                            color=Gdk.Color(65000, 65000, 65000),
                            pixels=G.get_pixels(0.8))
        boton.set_tooltip_text("Alejar")
        boton.connect("clicked", self.alejar)
        self.insert(boton, -1)

        self.insert(G.get_separador(draw=False, ancho=3, expand=False), -1)

        archivo = os.path.join(JAMediaObjectsPath, "Iconos", "acercar.png")
        boton = G.get_boton(archivo,
                            flip=False,
                            color=Gdk.Color(65000, 65000, 65000),
                            pixels=G.get_pixels(0.8))
        boton.set_tooltip_text("Acercar")
        boton.connect("clicked", self.acercar)
        self.insert(boton, -1)
        '''
        self.insert(G.get_separador(draw = True, ancho = 0, expand = False), -1)
        
        archivo = os.path.join(JAMediaObjectsPath, "Iconos","rotar.png")
        boton = G.get_boton(archivo, flip = False, color = Gdk.Color(65000, 65000, 65000))
        boton.set_tooltip_text("Rotar")
        boton.connect("clicked", self.rotar_izquierda)
        self.insert(boton, -1)
        
        self.insert(G.get_separador(draw = False, ancho = 3, expand = False), -1)
        
        archivo = os.path.join(JAMediaObjectsPath, "Iconos","rotar.png")
        boton = G.get_boton(archivo, flip = True, color = Gdk.Color(65000, 65000, 65000))
        boton.set_tooltip_text("Rotar")
        boton.connect("clicked", self.rotar_derecha)
        self.insert(boton, -1)
        
        self.insert(G.get_separador(draw = True, ancho = 0, expand = False), -1)'''
        self.insert(G.get_separador(draw=False, ancho=0, expand=True), -1)

        self.show_all()
Ejemplo n.º 3
0
 def __init__(self):
     
     Gtk.Toolbar.__init__(self)
     
     self.insert(G.get_separador(draw = False,
         ancho = 0, expand = True), -1)
     
     archivo = os.path.join(JAMediaObjectsPath,
         "Iconos","escalaoriginal.png")
     boton = G.get_boton(archivo, flip = False,
         pixels = G.get_pixels(0.8))
     boton.set_tooltip_text("Original")
     boton.connect("clicked", self.original)
     self.insert(boton, -1)
     
     self.insert(G.get_separador(draw = False,
         ancho = 3, expand = False), -1)
     
     archivo = os.path.join(JAMediaObjectsPath,
         "Iconos","alejar.png")
     boton = G.get_boton(archivo, flip = False,
         pixels = G.get_pixels(0.8))
     boton.set_tooltip_text("Alejar")
     boton.connect("clicked", self.alejar)
     self.insert(boton, -1)
     
     self.insert(G.get_separador(draw = False,
         ancho = 3, expand = False), -1)
     
     archivo = os.path.join(JAMediaObjectsPath,
         "Iconos","acercar.png")
     boton = G.get_boton(archivo, flip = False,
         pixels = G.get_pixels(0.8))
     boton.set_tooltip_text("Acercar")
     boton.connect("clicked", self.acercar)
     self.insert(boton, -1)
     '''
     self.insert(G.get_separador(draw = True, ancho = 0, expand = False), -1)
     
     archivo = os.path.join(JAMediaObjectsPath, "Iconos","rotar.png")
     boton = G.get_boton(archivo, flip = False, color = Gdk.Color(65000, 65000, 65000))
     boton.set_tooltip_text("Rotar")
     boton.connect("clicked", self.rotar_izquierda)
     self.insert(boton, -1)
     
     self.insert(G.get_separador(draw = False, ancho = 3, expand = False), -1)
     
     archivo = os.path.join(JAMediaObjectsPath, "Iconos","rotar.png")
     boton = G.get_boton(archivo, flip = True, color = Gdk.Color(65000, 65000, 65000))
     boton.set_tooltip_text("Rotar")
     boton.connect("clicked", self.rotar_derecha)
     self.insert(boton, -1)
     
     self.insert(G.get_separador(draw = True, ancho = 0, expand = False), -1)'''
     self.insert(G.get_separador(draw = False,
         ancho = 0, expand = True), -1)
     
     self.show_all()
Ejemplo n.º 4
0
 def __init__(self, ajuste):
     Gtk.Scale.__init__(self, orientation = Gtk.Orientation.HORIZONTAL)
     self.ajuste = ajuste
     self.set_digits(0)
     self.set_draw_value(False)
     
     self.borde = G.get_pixels(0.5)
     
     icono = os.path.join(JAMediaWidgetsBASE,
         "Iconos", "iconplay.png")
     pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(icono, G.get_pixels(0.8), G.get_pixels(0.8))
     self.pixbuf = pixbuf.rotate_simple(GdkPixbuf.PixbufRotation.COUNTERCLOCKWISE)
     
     self.show_all()
Ejemplo n.º 5
0
 def __init__(self):
     Gtk.Box.__init__(self, orientation=Gtk.Orientation.HORIZONTAL)
     
     self.botonatras = G.get_boton(os.path.join(JAMediaWidgetsBASE,
         "Iconos", "siguiente.png"), True, pixels = G.get_pixels(0.8))
     self.botonatras.set_tooltip_text("Anterior")
     self.botonatras.connect("clicked", self.clickenatras)
     self.pack_start(self.botonatras, False, True, 0)
     
     self.botonplay = G.get_boton(os.path.join(JAMediaWidgetsBASE,
         "Iconos", "play.png"), pixels = G.get_pixels(0.8))
     self.botonplay.set_tooltip_text("Reproducir")
     self.botonplay.connect("clicked", self.clickenplay_pausa)
     self.pack_start(self.botonplay, False, True, 0)
     
     #self.botonpausa = G.get_boton(os.path.join(JAMediaWidgetsBASE,
     #    "Iconos", "pausa.png"), pixels = G.get_pixels(0.8))
     #self.botonpausa.set_tooltip_text("Pausar")
     #self.botonpausa.connect("clicked", self.clickenplay_pausa)
     #self.pack_start(self.botonpausa, False, True, 0)
     
     self.botonsiguiente = G.get_boton(os.path.join(JAMediaWidgetsBASE,
         "Iconos", "siguiente.png"), pixels = G.get_pixels(0.8))
     self.botonsiguiente.set_tooltip_text("Siguiente")
     self.botonsiguiente.connect("clicked", self.clickensiguiente)
     self.pack_start(self.botonsiguiente, False, True, 0)
     
     self.botonstop = G.get_boton(os.path.join(JAMediaWidgetsBASE,
         "Iconos", "stop.png"), pixels = G.get_pixels(0.8))
     self.botonstop.set_tooltip_text("Detener Reproducción")
     self.botonstop.connect("clicked", self.clickenstop)
     self.pack_start(self.botonstop, False, True, 0)
     
     self.show_all()
Ejemplo n.º 6
0
 def __init__(self, label, min, max):
     
     Gtk.Toolbar.__init__(self)
     
     self.modify_fg(0, Gdk.Color(65000, 65000, 65000))
     self.modify_bg(0, Gdk.Color(0, 0, 0))
     
     self.titulo = label
     self.min, self.max = (min, max)
     
     self.escala = BarraProgreso()
     self.escala.set_size_request(-1, G.get_pixels(0.8))
     #self.escala.escala.borde = G.get_pixels(0.2)
     
     item = Gtk.ToolItem()
     self.frame = Gtk.Frame()
     self.frame.set_label(self.titulo)
     self.frame.set_label_align(0.5, 1.0)
     self.frame.add(self.escala)
     self.frame.show()
     item.set_expand(True)
     item.add(self.frame)
     self.insert(item, -1)
     
     self.show_all()
     
     self.escala.connect("user-set-value", self.user_set_value)
Ejemplo n.º 7
0
 def agregar_items(self, elementos):
     """ Recibe lista de: [texto para mostrar, path oculto] y
     Agrega un item a la lista segun esos datos."""
     
     for item in elementos:
         texto, path = item
         descripcion = JAMF.describe_uri(path)
         
         icono = None
         if descripcion:
             if descripcion[2]:
                 # Es un Archivo
                 tipo = JAMF.describe_archivo(path)
                 if 'video' in tipo:
                     icono = os.path.join(JAMediaWidgetsBASE, "Iconos", "video.png")
                 elif 'audio' in tipo:
                     icono = os.path.join(JAMediaWidgetsBASE, "Iconos", "sonido.png")
                 elif 'image' in tipo:
                     icono = os.path.join(path) # exige rendimiento
                     #icono = os.path.join(JAMediaWidgetsBASE, "Iconos", "imagen.png")
                 elif 'pdf' in tipo:
                     icono = os.path.join(JAMediaWidgetsBASE, "Iconos", "pdf.png")
                 elif 'zip' in tipo or 'rar' in tipo:
                     icono = os.path.join(JAMediaWidgetsBASE, "Iconos", "zip.png")
                 else:
                     icono = os.path.join(JAMediaWidgetsBASE,"Iconos", "archivo.png")
         else:
             icono = os.path.join(JAMediaWidgetsBASE,"Iconos", "archivo.png")
             
         try:
             pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(icono, G.get_pixels(0.8), -1)
             self.modelo.append([ pixbuf, texto, path])
         except:
             pass
Ejemplo n.º 8
0
    def __init__(self):
        Gtk.Toolbar.__init__(self)

        self.ocultar_controles = False

        self.modify_bg(0, Gdk.Color(0, 0, 0))
        self.modify_fg(0, Gdk.Color(65000, 65000, 65000))

        self.insert(G.get_separador(draw=False, ancho=0, expand=True), -1)

        item = Gtk.ToolItem()
        boton = Gtk.CheckButton("Ocultar Controles Automáticamente.")
        boton.connect("toggled", self.emit_controles_view)
        boton.show()
        item.add(boton)
        self.insert(item, -1)

        self.insert(G.get_separador(draw=False, ancho=0, expand=True), -1)
        self.show_all()
Ejemplo n.º 9
0
 def __init__(self):
     Gtk.EventBox.__init__(self)
     self.modify_bg(0, Gdk.Color(65000, 65000, 65000))
     self.escala = ProgressBar(Gtk.Adjustment(0.0, 0.0, 101.0, 0.1, 1.0, 1.0))
     
     self.valor = 0
     
     self.add(self.escala)
     self.show_all()
     
     self.escala.connect('user-set-value', self.emit_valor)
     self.set_size_request(-1, G.get_pixels(1.2))
Ejemplo n.º 10
0
 def __init__(self):
     
     Gtk.Box.__init__(self, orientation=Gtk.Orientation.HORIZONTAL)
     
     self.botonsiguiente = G.get_boton(os.path.join(JAMediaObjectsPath,
         "Iconos", "siguiente.png"), pixels = G.get_pixels(0.8))
     self.botonsiguiente.set_tooltip_text("Siguiente")
     self.botonsiguiente.connect("clicked", self.clickensiguiente)
     self.pack_end(self.botonsiguiente, False, True, 3)
     
     self.label = Gtk.Label("pág: - de ----")
     self.pack_end(self.label, False, True, 3)
     
     self.botonatras = G.get_boton(os.path.join(JAMediaObjectsPath,
         "Iconos", "siguiente.png"), flip = True,
         pixels = G.get_pixels(0.8))
     self.botonatras.set_tooltip_text("Anterior")
     self.botonatras.connect("clicked", self.clickenatras)
     self.pack_end(self.botonatras, False, True, 0)
     
     self.show_all()
Ejemplo n.º 11
0
    def __init__(self):
        Gtk.Toolbar.__init__(self)
        self.modify_bg(0, Gdk.Color(0, 0, 0))

        self.insert(G.get_separador(draw=False, ancho=3, expand=False), -1)

        item = Gtk.ToolItem()
        self.label = Gtk.Label("")
        self.label.modify_fg(0, Gdk.Color(65000, 65000, 65000))
        self.label.show()
        item.add(self.label)
        self.insert(item, -1)

        self.show_all()
Ejemplo n.º 12
0
 def __init__(self):
     
     Gtk.Toolbar.__init__(self)
     
     self.insert(G.get_separador(draw = False,
         ancho = 3, expand = False), -1)
     
     item = Gtk.ToolItem()
     self.label = Gtk.Label("")
     self.label.show()
     item.add(self.label)
     self.insert(item, -1)
     
     self.show_all()
Ejemplo n.º 13
0
    def __init__(self):
        Gtk.Toolbar.__init__(self)
        self.modify_bg(0, Gdk.Color(65000,65000,65000))
        
        self.lista = None
        self.accion = None
        self.iter = None
        
        self.insert(G.get_separador(draw = False, ancho = 0, expand = True), -1)
        
        archivo = os.path.join(JAMediaWidgetsBASE, "Iconos", "alejar.png")
        boton = G.get_boton(archivo, flip = False,
            color = Gdk.Color(65000, 65000, 65000), pixels = G.get_pixels(0.8))
        boton.set_tooltip_text("Cancelar")
        boton.connect("clicked", self.cancelar)
        self.insert(boton, -1)
        
        self.insert(G.get_separador(draw = False, ancho = 3, expand = False), -1)
        
        item = Gtk.ToolItem()
        self.label = Gtk.Label("")
        self.label.show()
        item.add(self.label)
        self.insert(item, -1)
        
        self.insert(G.get_separador(draw = False, ancho = 3, expand = False), -1)
        
        archivo = os.path.join(JAMediaWidgetsBASE, "Iconos", "acercar.png")
        boton = G.get_boton(archivo, flip = False,
            color = Gdk.Color(65000, 65000, 65000), pixels = G.get_pixels(0.8))
        boton.set_tooltip_text("Aceptar")
        boton.connect("clicked", self.realizar_accion)
        self.insert(boton, -1)

        self.insert(G.get_separador(draw = False, ancho = 0, expand = True), -1)
        
        self.show_all()
Ejemplo n.º 14
0
    def __init__(self):
        Gtk.Toolbar.__init__(self)
        self.modify_bg(0, Gdk.Color(0, 0, 0))

        self.insert(G.get_separador(draw=False, ancho=3, expand=False), -1)

        imagen = Gtk.Image()
        icono = os.path.join(JAMediaObjectsPath, "Iconos", "JAMediaLector.png")
        pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(
            icono, -1, G.get_pixels(0.8))
        imagen.set_from_pixbuf(pixbuf)
        imagen.modify_bg(0, Gdk.Color(0, 0, 0))
        imagen.show()
        item = Gtk.ToolItem()
        item.add(imagen)
        self.insert(item, -1)

        #self.insert(G.get_separador(draw = False, ancho = 1, expand = False), -1)

        archivo = os.path.join(JAMediaObjectsPath, "Iconos", "iconplay.png")
        self.abrir = G.get_boton(archivo,
                                 flip=False,
                                 color=Gdk.Color(0, 0, 0),
                                 pixels=G.get_pixels(1))
        self.abrir.set_tooltip_text("Abrir un Archivo.")
        self.abrir.connect("clicked", self.emit_abrir)
        self.insert(self.abrir, -1)

        #self.insert(G.get_separador(draw = False, ancho = 1, expand = False), -1)

        archivo = os.path.join(JAMediaObjectsPath, "Iconos", "configurar.png")
        self.configurar = G.get_boton(archivo,
                                      flip=False,
                                      color=Gdk.Color(0, 0, 0),
                                      pixels=G.get_pixels(1))
        self.configurar.set_tooltip_text("Configuraciones.")
        self.configurar.connect("clicked", self.emit_config)
        self.insert(self.configurar, -1)

        self.insert(G.get_separador(draw=False, ancho=0, expand=True), -1)

        imagen = Gtk.Image()
        icono = os.path.join(JAMediaObjectsPath, "Iconos", "ceibaljam.png")
        pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(
            icono, -1, G.get_pixels(0.8))
        imagen.set_from_pixbuf(pixbuf)
        imagen.modify_bg(0, Gdk.Color(0, 0, 0))
        imagen.show()
        item = Gtk.ToolItem()
        item.add(imagen)
        self.insert(item, -1)

        #self.insert(G.get_separador(draw = False, ancho = 1, expand = False), -1)

        imagen = Gtk.Image()
        icono = os.path.join(JAMediaObjectsPath, "Iconos", "uruguay.png")
        pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(
            icono, -1, G.get_pixels(0.8))
        imagen.set_from_pixbuf(pixbuf)
        imagen.modify_bg(0, Gdk.Color(0, 0, 0))
        imagen.show()
        item = Gtk.ToolItem()
        item.add(imagen)
        self.insert(item, -1)

        #self.insert(G.get_separador(draw = False, ancho = 1, expand = False), -1)

        imagen = Gtk.Image()
        icono = os.path.join(JAMediaObjectsPath, "Iconos", "licencia.png")
        pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(
            icono, -1, G.get_pixels(0.8))
        imagen.set_from_pixbuf(pixbuf)
        imagen.modify_bg(0, Gdk.Color(0, 0, 0))
        imagen.show()
        item = Gtk.ToolItem()
        item.add(imagen)
        self.insert(item, -1)

        #self.insert(G.get_separador(draw = False, ancho = 3, expand = False), -1)

        item = Gtk.ToolItem()
        self.label = Gtk.Label("*****@*****.**")
        self.label.modify_fg(0, Gdk.Color(65000, 65000, 65000))
        self.label.show()
        item.add(self.label)
        self.insert(item, -1)

        self.insert(G.get_separador(draw=False, ancho=0, expand=True), -1)

        archivo = os.path.join(JAMediaObjectsPath, "Iconos", "salir.png")
        boton = G.get_boton(archivo,
                            flip=False,
                            color=Gdk.Color(0, 0, 0),
                            pixels=G.get_pixels(1))
        boton.set_tooltip_text("Salir")
        boton.connect("clicked", self.salir)
        self.insert(boton, -1)

        self.insert(G.get_separador(draw=False, ancho=3, expand=False), -1)

        self.show_all()
Ejemplo n.º 15
0
    def __init__(self):
        
        Gtk.Toolbar.__init__(self)
        
        self.insert(G.get_separador(draw = False,
            ancho = 3, expand = False), -1)
        
        imagen = Gtk.Image()
        icono = os.path.join(JAMediaObjectsPath,
            "Iconos", "JAMediaLector.png")
        pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(icono,
            -1, G.get_pixels(0.8))
        imagen.set_from_pixbuf(pixbuf)
        imagen.show()
        item = Gtk.ToolItem()
        item.add(imagen)
        self.insert(item, -1)
        
        archivo = os.path.join(JAMediaObjectsPath,
            "Iconos", "iconplay.png")
        self.abrir = G.get_boton(archivo, flip = False,
            pixels = G.get_pixels(1))
        self.abrir.set_tooltip_text("Abrir un Archivo.")
        self.abrir.connect("clicked", self.emit_abrir)
        self.insert(self.abrir, -1)

        archivo = os.path.join(JAMediaObjectsPath,
            "Iconos", "configurar.png")
        self.configurar = G.get_boton(archivo, flip = False,
            pixels = G.get_pixels(1))
        self.configurar.set_tooltip_text("Configuraciones.")
        self.configurar.connect("clicked", self.emit_config)
        self.insert(self.configurar, -1)
        
        self.insert(G.get_separador(draw = False,
            ancho = 0, expand = True), -1)
        
        imagen = Gtk.Image()
        icono = os.path.join(JAMediaObjectsPath,
            "Iconos","ceibaljam.png")
        pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(icono,
            -1, G.get_pixels(0.8))
        imagen.set_from_pixbuf(pixbuf)
        imagen.show()
        item = Gtk.ToolItem()
        item.add(imagen)
        self.insert(item, -1)
        
        imagen = Gtk.Image()
        icono = os.path.join(JAMediaObjectsPath,
            "Iconos","uruguay.png")
        pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(icono,
            -1, G.get_pixels(0.8))
        imagen.set_from_pixbuf(pixbuf)
        imagen.show()
        item = Gtk.ToolItem()
        item.add(imagen)
        self.insert(item, -1)
        
        imagen = Gtk.Image()
        icono = os.path.join(JAMediaObjectsPath,
            "Iconos","licencia.png")
        pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(icono,
            -1, G.get_pixels(0.8))
        imagen.set_from_pixbuf(pixbuf)
        imagen.show()
        item = Gtk.ToolItem()
        item.add(imagen)
        self.insert(item, -1)
        
        item = Gtk.ToolItem()
        self.label = Gtk.Label("*****@*****.**")
        self.label.show()
        item.add(self.label)
        self.insert(item, -1)
        
        self.insert(G.get_separador(draw = False,
            ancho = 0, expand = True), -1)
        
        archivo = os.path.join(JAMediaObjectsPath,
            "Iconos","salir.png")
        boton = G.get_boton(archivo, flip = False,
            pixels = G.get_pixels(1))
        boton.set_tooltip_text("Salir")
        boton.connect("clicked", self.salir)
        self.insert(boton, -1)
        
        self.insert(G.get_separador(draw = False,
            ancho = 3, expand = False), -1)
        
        self.show_all()