Exemplo n.º 1
0
 def __init__(self):
     """"""
     Dialog.__init__(self)
     self.set_title(_("Full Log File"))
     self.set_size_request(500, 330)
     
     #containers-separators.
     #self.vbox no puede ser cambiado en gtk.Dialog. Crear variable vbox y luego meterla en self.vbox.
     vbox1 = gtk.VBox(False, 20) #gtk.VBox(homogeneous=False, spacing=0) homogeneous: mismo espacio cada hijo, spacing: espacio vertical entre hijos.
     vbox1.set_border_width(10) #outside-space
     
     #vbox1_start
     #Servers dropdown menu (ComboBox).
     #-------------------------------------------
     #frame1
     frame = gtk.Frame(_("Activity Log:"))
     
     self.text_field = gtk.TextView()
     self.text_field.set_editable(False)
     
     scroll = gtk.ScrolledWindow()
     scroll.set_shadow_type(gtk.SHADOW_ETCHED_IN)
     scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
     scroll.set_border_width(10)
     
     #arma el cuadro con los items
     scroll.add(self.text_field)
     
     frame.add(scroll)
     vbox1.pack_start(frame)
     #vbox.pack_start(child, expand=True, fill=True, padding=0) #padding = vertical-space (no horizontal)
     
     #hbox1_start
     #-------------------------------------------
     #containers-separators.
     hbox1 = gtk.HBox(False, 10) #file field and button examine.
     #gtk.HBox(homogeneous=False, spacing=0) homogeneous: mismo espacio cada hijo, spacing: espacio horizontal entre hijos.
     
     #hbox1
     self.button1 = gtk.Button(_("Close"))
     self.button1.set_size_request(80, 35)
     self.button1.connect("clicked", self.on_close)
     hbox1.add(self.button1)
     
     halign1 = gtk.Alignment(1, 0, 0, 0) #horizontal container. right liagment.
     #xalign: espacio libre a la izquierda del hijo. 0.0 = sin espacio arriba. 1.0 = todo el espacio arriba.
     #yalign: espacio libre vertical arriba del hijo. 0.0 = sin espacio arriba. 1.0 = todo el espacio arriba.
     halign1.add(hbox1)
     
     vbox1.pack_start(halign1, False)
     #vbox.pack_start(child, expand=True, fill=True, padding=0)
     #-------------------------------------------
     #hbox1_end
     
     self.load_full_log()
     
     self.connect("response", self.on_close)
     self.vbox.pack_start(vbox1)
     self.show_all()
     self.run()
Exemplo n.º 2
0
    def __init__(self,
                 parent,
                 severity_icon,
                 title,
                 message,
                 accept=False,
                 cancel=True,
                 ask=False,
                 append_widget=None):
        """"""
        Dialog.__init__(self)
        self.set_title(title)
        self.set_position(gtk.WIN_POS_CENTER)
        self.set_resizable(False)
        self.set_transient_for(parent)
        #self.vbox.set_spacing(0)
        #self.vbox.set_homogeneous(False)

        self.accepted = False
        self.append_widget = append_widget

        self.hbox = gtk.HBox()

        #aspect = gtk.AspectFrame()
        #hbox.pack_start(aspect, True, True, 10)
        #aspect.set_shadow_type(gtk.SHADOW_NONE)

        if severity_icon is not None:
            self.hbox.pack_start(gtk.image_new_from_stock(
                severity_icon, gtk.ICON_SIZE_DIALOG),
                                 padding=10)
            self.set_icon(self.render_icon(severity_icon, gtk.ICON_SIZE_MENU))

        if message is not None:
            self.label = gtk.Label(message)
            #self.label.set_width_chars(35)
            self.label.set_line_wrap(True)
            self.hbox.pack_start(self.label, padding=10)

        if append_widget is not None:
            self.hbox.pack_start(append_widget, True, True, 20)

        if cancel:
            stock_item = gtk.STOCK_NO if ask else gtk.STOCK_CANCEL
            close_btn = gtk.Button(None, stock_item)
            self.action_area.pack_start(close_btn)
            close_btn.connect("clicked", self.close)
        if accept:
            stock_item = gtk.STOCK_YES if ask else gtk.STOCK_OK
            ok_btn = gtk.Button(None, stock_item)
            self.action_area.pack_start(ok_btn)
            ok_btn.connect("clicked", self.accept)

        self.connect("response", self.close)

        self.vbox.pack_start(self.hbox, True, True, 20)

        self.show_all()
        self.run()
Exemplo n.º 3
0
 def __init__(self, parent, severity_icon, title, message, accept=False, cancel=True, ask=False, append_widget=None):
     """"""
     Dialog.__init__(self)
     self.set_title(title)
     self.set_position(gtk.WIN_POS_CENTER)
     self.set_resizable(False)
     self.set_transient_for(parent)
     #self.vbox.set_spacing(0)
     #self.vbox.set_homogeneous(False)
     
     self.accepted = False
     self.append_widget = append_widget
     
     self.hbox = gtk.HBox()
     
     #aspect = gtk.AspectFrame()
     #hbox.pack_start(aspect, True, True, 10)
     #aspect.set_shadow_type(gtk.SHADOW_NONE)
     
     if severity_icon is not None:
         self.hbox.pack_start(gtk.image_new_from_stock(severity_icon, gtk.ICON_SIZE_DIALOG), padding=10)
         self.set_icon(self.render_icon(severity_icon, gtk.ICON_SIZE_MENU))
     
     if message is not None:
         self.label = gtk.Label(message)
         #self.label.set_width_chars(35)
         self.label.set_line_wrap(True)
         self.hbox.pack_start(self.label, padding=10)
     
     if append_widget is not None:
         self.hbox.pack_start(append_widget, True, True, 20)
     
     if cancel:
         stock_item = gtk.STOCK_NO if ask else gtk.STOCK_CANCEL
         close_btn = gtk.Button(None, stock_item)
         self.action_area.pack_start(close_btn)
         close_btn.connect("clicked", self.close)
     if accept:
         stock_item = gtk.STOCK_YES if ask else gtk.STOCK_OK
         ok_btn = gtk.Button(None, stock_item)
         self.action_area.pack_start(ok_btn)
         ok_btn.connect("clicked", self.accept)
     
     self.connect("response", self.close)
     
     self.vbox.pack_start(self.hbox, True, True, 20)
     
     self.show_all()
     self.run()
Exemplo n.º 4
0
 def __init__(self, parent=None):
     """"""
     Dialog.__init__(self)
     self.set_title(_("Host Accounts"))
     self.set_size_request(500, 500)
     self.set_transient_for(parent)
     
     self.host_accounts = host_accounts #instancia de clase Host_Accounts
     self.update_flag = False
     self.stop_update = False
     
     #Estructura-General:
     #-------------------vbox1_start---------------
     #-------------------hbox1_start---------------
     #-------------------frame2----------------------Accounts
     #-------------------hbox1_end----------------
     #-------------------hbox3_start--------------
     #-------------------frame3----------------------Login
     #-------------------hbox3_end----------------
     #-------------------hbox6-----------------------Exit-Buttons
     #-------------------vbox1_end----------------
     
     #Estructura-Accounts
     #-------------------frame2_start-------------
     #-------------------vbox3_start--------------
     #---------------------------------------------------ScrollWindow
     #-------------------hbox2-----------------------Buttons
     #-------------------vbox3_end----------------
     #-------------------frame2_end---------------
     
     #Estructura-Login
     #-------------------frame3_start-------------
     #-------------------vbox4_start--------------
     #-------------------hbox4_start--------------
     #-------------------vbox5-----------------------Label
     #-------------------vbox6-----------------------Entry
     #-------------------hbox4_end----------------
     #-------------------hbox5-----------------------Button
     #-------------------vbox4_end----------------
     #-------------------frame3_end---------------
     
     
     #containers-separators.
     #self.vbox no puede ser cambiado en gtk.Dialog. Crear variable vbox y luego meterla en self.vbox.
     vbox1 = gtk.VBox(False, 20) #gtk.VBox(homogeneous=False, spacing=0) homogeneous: mismo espacio cada hijo, spacing: espacio vertical entre hijos.
     vbox1.set_border_width(10) #outside-space
     
     #vbox1_start
     #hbox1_start
     #-------------------------------------------
     #containers-separators.
     hbox1 = gtk.HBox(False, 10) #file field and button examine.
     #gtk.HBox(homogeneous=False, spacing=0) homogeneous: mismo espacio cada hijo, spacing: espacio horizontal entre hijos.
     
     #Accounts list
     #frame2
     frame2 = gtk.Frame(_("Accounts:"))
     
     #vbox3
     #containers-separators.
     vbox3 = gtk.VBox(False, 10)
     vbox3.set_border_width(10) #outside-space
     hbox2 = gtk.HBox(False, 10) #Buttons.
     
     scroll = gtk.ScrolledWindow()
     scroll.set_shadow_type(gtk.SHADOW_ETCHED_IN)
     scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
     
     self.store = gtk.ListStore(str, str, str, str, str, bool)#modelo de columnas. (3 columnas de strings)
     
     #arma el cuadro con los items
     self.treeView = gtk.TreeView(self.store)
     self.treeView.set_rules_hint(True) #turna el color de los items, creo.
     scroll.add(self.treeView)
     
     self.row_selected = None #fila seleccionada, se cambia en el on_selected
     self.treeView.get_selection().connect("changed", self.on_selected) #item seleccionado
     
     
     #Columns item names.
     col_list = ["hidden_id_account", _("Host"), _("Status"), _("Username"), _("Password"), _("Enable")] #podria usar un frozenset, no se si lo soporta cython.
     self.create_columns(col_list)
     
     check_btn = gtk.CheckButton()
     check_btn.set_active(True)
     #check_btn.unset_flags(gtk.CAN_FOCUS)
     
     #self.store.append(["YES", "CRAP", "CRAP", "premium", False]) 
     
     vbox3.add(scroll)
     
     #hbox2
     self.button1 = gtk.Button(_("Remove"))
     self.button1.set_size_request(80, 35)
     self.button1.set_sensitive(False)
     self.button1.connect("clicked", self.on_remove)
     hbox2.add(self.button1)
     
     self.button2 = gtk.Button(_("Check"))
     self.button2.set_size_request(80, 35)
     self.button2.set_sensitive(False)
     self.button2.connect("clicked", self.on_check)
     hbox2.add(self.button2)
     
     halign1 = gtk.Alignment(1, 0, 0, 0) #horizontal container. right liagment.
     #xalign: espacio libre a la izquierda del hijo. 0.0 = sin espacio arriba. 1.0 = todo el espacio arriba.
     #yalign: espacio libre vertical arriba del hijo. 0.0 = sin espacio arriba. 1.0 = todo el espacio arriba.
     halign1.add(hbox2)
     
     vbox3.pack_start(halign1, False)
     
     #Let's pack.
     frame2.add(vbox3)
     hbox1.add(frame2)
     vbox1.pack_start(hbox1)
     #vbox.pack_start(child, expand=True, fill=True, padding=0)
     #-------------------------------------------
     #hbox1_end
     
     #hbox3_start
     #-------------------------------------------
     #containers-separators.
     hbox3 = gtk.HBox(False, 10) #buttons
     #gtk.HBox(homogeneous=False, spacing=0) homogeneous: mismo espacio cada hijo, spacing: espacio horizontal entre hijos.
     
     #Login fields
     #frame3
     frame3 = gtk.Frame(_("Login:"******"Server:"))
     label_server.set_alignment(0, 0.5) #set_alignment(xalign, yalign), 0=left, 0.5=middle
     vbox5.add(label_server)
     label1 = gtk.Label(_("Username:"******"Password:"******"changed", self.on_changed")
     premium_services = [service for service, plugin_config in plugins_parser.services_dict.items() if plugin_config.get_premium_available()]
     for service in sorted(premium_services):
         self.cb.append_text(service)
     self.cb.set_active(0)
     
     vbox6.add(self.cb)
     
     #entry...
     self.entry1 = gtk.Entry()
     self.entry1.add_events(gtk.gdk.KEY_RELEASE_MASK)
     self.entry1.set_width_chars(40) #entry width
     
     vbox6.add(self.entry1)
     
     #entry...
     self.entry2 = gtk.Entry()
     self.entry2.add_events(gtk.gdk.KEY_RELEASE_MASK)
     self.entry2.set_width_chars(40) #entry width
     
     vbox6.add(self.entry2)
     
     hbox4.add(vbox6)
     
     vbox4.add(hbox4)
     
     #hbox5
     button3 = gtk.Button(_("Add"))
     button3.set_size_request(80, 35)
     button3.connect("clicked", self.on_add)
     hbox5.add(button3)
     
     
     halign2 = gtk.Alignment(1, 0, 0, 0) #horizontal container. right liagment.
     #xalign: espacio libre a la izquierda del hijo. 0.0 = sin espacio arriba. 1.0 = todo el espacio arriba.
     #yalign: espacio libre vertical arriba del hijo. 0.0 = sin espacio arriba. 1.0 = todo el espacio arriba.
     halign2.add(hbox5)
     
     vbox4.add(halign2)
     
     #Let's pack.
     frame3.add(vbox4)
     hbox3.add(frame3)
     vbox1.pack_start(hbox3, False)
     #vbox.pack_start(child, expand=True, fill=True, padding=0)
     #-------------------------------------------
     #hbox3_end
     
     #buttom.
     #-------------------------------------------
     #containers-separators.
     hbox6 = gtk.HBox(False, 10) #buttons
     #gtk.HBox(homogeneous=False, spacing=0) homogeneous: mismo espacio cada hijo, spacing: espacio horizontal entre hijos.
     
     #hbox6
     button4 = gtk.Button(_("Cancel"))
     button4.set_size_request(80, 35)
     button4.connect("clicked", self.on_close)
     hbox6.add(button4)
     
     button5 = gtk.Button(_("Done"))
     button5.set_size_request(80, 35)
     button5.connect("clicked", self.on_done)
     hbox6.add(button5)
     
     halign3 = gtk.Alignment(1, 0, 0, 0) #horizontal container. right liagment.
     #xalign: espacio libre a la izquierda del hijo. 0.0 = sin espacio arriba. 1.0 = todo el espacio arriba.
     #yalign: espacio libre vertical arriba del hijo. 0.0 = sin espacio arriba. 1.0 = todo el espacio arriba.
     halign3.set_padding(15, 0, 0, 0) #set_padding(top, bottom, left, right)
     halign3.add(hbox6)
     
     vbox1.pack_start(halign3, False)
     #vbox.pack_start(child, expand=True, fill=True, padding=0)
     #-------------------------------------------
     #vbox1_end
     
     
     self.connect("response", self.on_close)
     self.vbox.pack_start(vbox1)
     
     #cargar cuentas.
     if self.cb.get_active_text() is not None:
         self.load_accounts()
     else:
         button3.set_sensitive(False)
     
     self.start_update()
     
     self.show_all()
     self.run()
Exemplo n.º 5
0
    def __init__(self):
        """"""
        Dialog.__init__(self)
        self.set_title(_("Full Log File"))
        self.set_size_request(500, 330)

        #containers-separators.
        #self.vbox no puede ser cambiado en gtk.Dialog. Crear variable vbox y luego meterla en self.vbox.
        vbox1 = gtk.VBox(
            False, 20
        )  #gtk.VBox(homogeneous=False, spacing=0) homogeneous: mismo espacio cada hijo, spacing: espacio vertical entre hijos.
        vbox1.set_border_width(10)  #outside-space

        #vbox1_start
        #Servers dropdown menu (ComboBox).
        #-------------------------------------------
        #frame1
        frame = gtk.Frame(_("Activity Log:"))

        self.text_field = gtk.TextView()
        self.text_field.set_editable(False)

        scroll = gtk.ScrolledWindow()
        scroll.set_shadow_type(gtk.SHADOW_ETCHED_IN)
        scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
        scroll.set_border_width(10)

        #arma el cuadro con los items
        scroll.add(self.text_field)

        frame.add(scroll)
        vbox1.pack_start(frame)
        #vbox.pack_start(child, expand=True, fill=True, padding=0) #padding = vertical-space (no horizontal)

        #hbox1_start
        #-------------------------------------------
        #containers-separators.
        hbox1 = gtk.HBox(False, 10)  #file field and button examine.
        #gtk.HBox(homogeneous=False, spacing=0) homogeneous: mismo espacio cada hijo, spacing: espacio horizontal entre hijos.

        #hbox1
        self.button1 = gtk.Button(_("Close"))
        self.button1.set_size_request(80, 35)
        self.button1.connect("clicked", self.on_close)
        hbox1.add(self.button1)

        halign1 = gtk.Alignment(1, 0, 0,
                                0)  #horizontal container. right liagment.
        #xalign: espacio libre a la izquierda del hijo. 0.0 = sin espacio arriba. 1.0 = todo el espacio arriba.
        #yalign: espacio libre vertical arriba del hijo. 0.0 = sin espacio arriba. 1.0 = todo el espacio arriba.
        halign1.add(hbox1)

        vbox1.pack_start(halign1, False)
        #vbox.pack_start(child, expand=True, fill=True, padding=0)
        #-------------------------------------------
        #hbox1_end

        self.load_full_log()

        self.connect("response", self.on_close)
        self.vbox.pack_start(vbox1)
        self.show_all()
        self.run()
Exemplo n.º 6
0
    def __init__(self, parent=None):
        """"""
        Dialog.__init__(self)
        self.set_title(_("Host Accounts"))
        self.set_size_request(500, 500)
        self.set_transient_for(parent)

        self.host_accounts = host_accounts  #instancia de clase Host_Accounts
        self.update_flag = False
        self.stop_update = False

        #Estructura-General:
        #-------------------vbox1_start---------------
        #-------------------hbox1_start---------------
        #-------------------frame2----------------------Accounts
        #-------------------hbox1_end----------------
        #-------------------hbox3_start--------------
        #-------------------frame3----------------------Login
        #-------------------hbox3_end----------------
        #-------------------hbox6-----------------------Exit-Buttons
        #-------------------vbox1_end----------------

        #Estructura-Accounts
        #-------------------frame2_start-------------
        #-------------------vbox3_start--------------
        #---------------------------------------------------ScrollWindow
        #-------------------hbox2-----------------------Buttons
        #-------------------vbox3_end----------------
        #-------------------frame2_end---------------

        #Estructura-Login
        #-------------------frame3_start-------------
        #-------------------vbox4_start--------------
        #-------------------hbox4_start--------------
        #-------------------vbox5-----------------------Label
        #-------------------vbox6-----------------------Entry
        #-------------------hbox4_end----------------
        #-------------------hbox5-----------------------Button
        #-------------------vbox4_end----------------
        #-------------------frame3_end---------------

        #containers-separators.
        #self.vbox no puede ser cambiado en gtk.Dialog. Crear variable vbox y luego meterla en self.vbox.
        vbox1 = gtk.VBox(
            False, 20
        )  #gtk.VBox(homogeneous=False, spacing=0) homogeneous: mismo espacio cada hijo, spacing: espacio vertical entre hijos.
        vbox1.set_border_width(10)  #outside-space

        #vbox1_start
        #hbox1_start
        #-------------------------------------------
        #containers-separators.
        hbox1 = gtk.HBox(False, 10)  #file field and button examine.
        #gtk.HBox(homogeneous=False, spacing=0) homogeneous: mismo espacio cada hijo, spacing: espacio horizontal entre hijos.

        #Accounts list
        #frame2
        frame2 = gtk.Frame(_("Accounts:"))

        #vbox3
        #containers-separators.
        vbox3 = gtk.VBox(False, 10)
        vbox3.set_border_width(10)  #outside-space
        hbox2 = gtk.HBox(False, 10)  #Buttons.

        scroll = gtk.ScrolledWindow()
        scroll.set_shadow_type(gtk.SHADOW_ETCHED_IN)
        scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)

        self.store = gtk.ListStore(
            str, str, str, str, str,
            bool)  #modelo de columnas. (3 columnas de strings)

        #arma el cuadro con los items
        self.treeView = gtk.TreeView(self.store)
        self.treeView.set_rules_hint(True)  #turna el color de los items, creo.
        scroll.add(self.treeView)

        self.row_selected = None  #fila seleccionada, se cambia en el on_selected
        self.treeView.get_selection().connect(
            "changed", self.on_selected)  #item seleccionado

        #Columns item names.
        col_list = [
            "hidden_id_account",
            _("Host"),
            _("Status"),
            _("Username"),
            _("Password"),
            _("Enable")
        ]  #podria usar un frozenset, no se si lo soporta cython.
        self.create_columns(col_list)

        check_btn = gtk.CheckButton()
        check_btn.set_active(True)
        #check_btn.unset_flags(gtk.CAN_FOCUS)

        #self.store.append(["YES", "CRAP", "CRAP", "premium", False])

        vbox3.add(scroll)

        #hbox2
        self.button1 = gtk.Button(_("Remove"))
        self.button1.set_size_request(80, 35)
        self.button1.set_sensitive(False)
        self.button1.connect("clicked", self.on_remove)
        hbox2.add(self.button1)

        self.button2 = gtk.Button(_("Check"))
        self.button2.set_size_request(80, 35)
        self.button2.set_sensitive(False)
        self.button2.connect("clicked", self.on_check)
        hbox2.add(self.button2)

        halign1 = gtk.Alignment(1, 0, 0,
                                0)  #horizontal container. right liagment.
        #xalign: espacio libre a la izquierda del hijo. 0.0 = sin espacio arriba. 1.0 = todo el espacio arriba.
        #yalign: espacio libre vertical arriba del hijo. 0.0 = sin espacio arriba. 1.0 = todo el espacio arriba.
        halign1.add(hbox2)

        vbox3.pack_start(halign1, False)

        #Let's pack.
        frame2.add(vbox3)
        hbox1.add(frame2)
        vbox1.pack_start(hbox1)
        #vbox.pack_start(child, expand=True, fill=True, padding=0)
        #-------------------------------------------
        #hbox1_end

        #hbox3_start
        #-------------------------------------------
        #containers-separators.
        hbox3 = gtk.HBox(False, 10)  #buttons
        #gtk.HBox(homogeneous=False, spacing=0) homogeneous: mismo espacio cada hijo, spacing: espacio horizontal entre hijos.

        #Login fields
        #frame3
        frame3 = gtk.Frame(_("Login:"******"Server:"))
        label_server.set_alignment(
            0, 0.5)  #set_alignment(xalign, yalign), 0=left, 0.5=middle
        vbox5.add(label_server)
        label1 = gtk.Label(_("Username:"******"Password:"******"changed", self.on_changed")
        premium_services = [
            service
            for service, plugin_config in plugins_parser.services_dict.items()
            if plugin_config.get_premium_available()
        ]
        for service in sorted(premium_services):
            self.cb.append_text(service)
        self.cb.set_active(0)

        vbox6.add(self.cb)

        #entry...
        self.entry1 = gtk.Entry()
        self.entry1.add_events(gtk.gdk.KEY_RELEASE_MASK)
        self.entry1.set_width_chars(40)  #entry width

        vbox6.add(self.entry1)

        #entry...
        self.entry2 = gtk.Entry()
        self.entry2.add_events(gtk.gdk.KEY_RELEASE_MASK)
        self.entry2.set_width_chars(40)  #entry width

        vbox6.add(self.entry2)

        hbox4.add(vbox6)

        vbox4.add(hbox4)

        #hbox5
        button3 = gtk.Button(_("Add"))
        button3.set_size_request(80, 35)
        button3.connect("clicked", self.on_add)
        hbox5.add(button3)

        halign2 = gtk.Alignment(1, 0, 0,
                                0)  #horizontal container. right liagment.
        #xalign: espacio libre a la izquierda del hijo. 0.0 = sin espacio arriba. 1.0 = todo el espacio arriba.
        #yalign: espacio libre vertical arriba del hijo. 0.0 = sin espacio arriba. 1.0 = todo el espacio arriba.
        halign2.add(hbox5)

        vbox4.add(halign2)

        #Let's pack.
        frame3.add(vbox4)
        hbox3.add(frame3)
        vbox1.pack_start(hbox3, False)
        #vbox.pack_start(child, expand=True, fill=True, padding=0)
        #-------------------------------------------
        #hbox3_end

        #buttom.
        #-------------------------------------------
        #containers-separators.
        hbox6 = gtk.HBox(False, 10)  #buttons
        #gtk.HBox(homogeneous=False, spacing=0) homogeneous: mismo espacio cada hijo, spacing: espacio horizontal entre hijos.

        #hbox6
        button4 = gtk.Button(_("Cancel"))
        button4.set_size_request(80, 35)
        button4.connect("clicked", self.on_close)
        hbox6.add(button4)

        button5 = gtk.Button(_("Done"))
        button5.set_size_request(80, 35)
        button5.connect("clicked", self.on_done)
        hbox6.add(button5)

        halign3 = gtk.Alignment(1, 0, 0,
                                0)  #horizontal container. right liagment.
        #xalign: espacio libre a la izquierda del hijo. 0.0 = sin espacio arriba. 1.0 = todo el espacio arriba.
        #yalign: espacio libre vertical arriba del hijo. 0.0 = sin espacio arriba. 1.0 = todo el espacio arriba.
        halign3.set_padding(15, 0, 0,
                            0)  #set_padding(top, bottom, left, right)
        halign3.add(hbox6)

        vbox1.pack_start(halign3, False)
        #vbox.pack_start(child, expand=True, fill=True, padding=0)
        #-------------------------------------------
        #vbox1_end

        self.connect("response", self.on_close)
        self.vbox.pack_start(vbox1)

        #cargar cuentas.
        if self.cb.get_active_text() is not None:
            self.load_accounts()
        else:
            button3.set_sensitive(False)

        self.start_update()

        self.show_all()
        self.run()