Ejemplo n.º 1
0
    def _create_widgets(self):

        #Username
        self.username_label = HIGLabel(_("Username"))
        self.username_entry = HIGTextEntry()
        self.username_entry.set_activates_default(True)

        #Password
        self.password_label = HIGLabel(_("Password"))
        self.password_entry = HIGPasswordEntry()
        self.password_entry.set_activates_default(True)

        #Logo
        self.logo_openmonitor = gtk.gdk.pixbuf_new_from_file\
                                    (os.path.join(IMAGES_DIR, 'logoOM.png'))
        self.logo_image = gtk.Image()
        self.logo_image.set_from_pixbuf(self.logo_openmonitor)
        #self.login_text = gtk.Label(_("Log into your ICM agent."))

        #Register
        #self.register_button = HIGStockButton(gtk.STOCK_DIALOG_INFO,_("Register"))
        self.register_label = \
            gtk.Label(_("<span foreground='blue'>" \
                        "Register id</span>"))
        self.register_label.set_use_markup(True)
        self.register_button = gtk.Button()
        self.register_button.add(self.register_label)
        self.register_button.set_relief(gtk.RELIEF_NONE)

        #Forget Password
        self.forgot_password_label = \
            gtk.Label(_("<span foreground='blue'>" \
                        "Forgot password?</span>"))
        self.forgot_password_label.set_use_markup(True)
        self.forgot_password = gtk.Button()
        self.forgot_password.add(self.forgot_password_label)
        self.forgot_password.set_relief(gtk.RELIEF_NONE)

        #Auto Login
        self.auto_login_checkbtn = gtk.CheckButton(_("Auto login"))

        #Settings
        self.settings_button = HIGStockButton(gtk.STOCK_DIALOG_INFO,
                                              _("settings"))

        #Container
        self.hbox = HIGHBox(False, 2)
        self.table = HIGTable(8, 4, False)
        self.table.set_row_spacings(5)
        self.table.set_col_spacings(10)
        self.action_area.set_homogeneous(False)

        #tab orders
        self.orders = [
            self.username_entry, self.password_entry, self.register_button,
            self.forgot_password
        ]
    def _create_widgets(self):
        self.category_label = HIGHintSectionLabel(
            _("Category (optional)"),
            _("If you know in which section of the program "
              "is the bug, please, select it from the choosebox. "
              "If you don't know what section to choose, leave it blank."))
        self.category_list = gtk.ListStore(str, str)
        self.category_combo = gtk.ComboBoxEntry(self.category_list, 0)

        self.email_label = HIGHintSectionLabel(
            _("Email"),
            _("Please inform a valid e-mail address from "
              "where you can be reached to be notified when the bug gets "
              "fixed. Not used for other purposes."))
        self.email_entry = gtk.Entry()

        self.summary_label = HIGHintSectionLabel(
            _("Summary"),
            _("This should be a quick description of the issue. "
              "Try to be clear and concise."))
        self.summary_entry = gtk.Entry()

        self.description_label = HIGHintSectionLabel(
            _("Description"),
            _("This is where you should write about the bug, "
              "describing it as clear as possible and giving as many "
              "informations as you can and how to reproduce the bug."))
        self.description_scrolled = gtk.ScrolledWindow()
        self.description_text = gtk.TextView()

        self.bug_icon = gtk.Image()
        self.bug_text = gtk.Label(
            _("This Bug Report dialog allows you "
              "to easily tell us about a problem that you may have found on "
              "Open Monitor. Doing so, you help us to help you, by fixing and "
              "improving Open Monitor faster than usual."))

        if self.crashreport:
            # Create a button to show details
            self.show_details = HIGStockButton(gtk.STOCK_DIALOG_INFO,
                                               _("Show Details"))

        self.hbox = HIGHBox()
        self.table = HIGTable()
Ejemplo n.º 3
0
 def __create_widgets(self):
     # Main widgets
     self.hpaned = gtk.HPaned()
     self.add(self.hpaned)
     
     self.vbox = HIGVBox()
     self.btn_box  = gtk.HButtonBox()
     self.btn_box1 = gtk.HButtonBox()
     self.btn_box2 = gtk.HButtonBox()
     
     self.ok_button = gtk.Button(stock=gtk.STOCK_OK)
     self.ok_button.connect('clicked', lambda x: self.clicked_ok())
     self.help_button   = HIGStockButton(gtk.STOCK_DIALOG_INFO,_("help"))
     self.help_button.connect('clicked', lambda x: self.help_direct())
     #self.apply_button = gtk.Button(stock=gtk.STOCK_APPLY)
     #self.apply_button.connect('clicked', lambda x: self.save_preference())
     self.cancel_button = gtk.Button(stock=gtk.STOCK_CANCEL)
     self.cancel_button.connect('clicked', lambda x: self.destroy())
     # notebook
     self.notebook = gtk.Notebook()
     # General Preference page
     self.general_page = GeneralPage()
     self.notebook.append_page(self.general_page, gtk.Label(_("General")))
     # Peer Info Page
     self.peer_page = PeerInfoPage()
     self.notebook.append_page(self.peer_page, gtk.Label(_("PeerInfo")))
     # Tests page
     self.test_page = TestPage()
     self.notebook.append_page(self.test_page, gtk.Label(_("Tests")))
     # Feedback page
     self.feedback_page = FeedbackPage()
     self.notebook.append_page(self.feedback_page, gtk.Label(_("Feedback")))
     # Update page
     self.update_page = UpdatePage()
     self.notebook.append_page(self.update_page, gtk.Label(_("Update")))
     # Advanced Page
     self.advanced_page = AdvancedPage()
     self.notebook.append_page(self.advanced_page, gtk.Label(_("Advanced")))