def _button_clicked(self, button): self._calendar_window = ga_Gtk.Window(ga_Gtk.WindowType.TOPLEVEL) self._calendar_window.set_type_hint(ga_Gdk.WindowTypeHint.DIALOG) self._calendar_window.set_modal(True) self._calendar_window.set_title(_("Date Selection")) self._calendar.select_month(self._date.month - 1, self._date.year) self._calendar.select_day(self._date.day) vbox = ga_Gtk.VBox(spacing=3) vbox.set_border_width(2) vbox.pack_start(self._calendar, True, True, 0) button_box = ga_Gtk.HButtonBox() button_box.set_layout(ga_Gtk.ButtonBoxStyle.END) vbox.pack_start(button_box, True, True, 0) button = ga_Gtk.Button(_("Today")) button.connect("clicked", self._today_clicked) button_box.pack_start(button, True, True, 0) frame = ga_Gtk.Frame() frame.add(vbox) self._calendar_window.add(frame) self._calendar_window.set_position(ga_Gtk.WindowPosition.MOUSE) self._calendar_window.show_all() self._calendar.connect("day-selected-double-click", self._calendar_clicked)
def createScreen(self): """ Create a new instance of gtk.VBox, pulling in child widgets from the glade file. """ self.vbox = ga_Gtk.VBox() # self.vbox.pack_start(self.get_widget("register_widget"), False, False, 0) self.vbox.pack_start(self.register_widget.register_widget, False, False, 0) self.register_widget.connect('finished', self.on_finished) self.register_widget.connect('register-error', self.on_register_error) self.register_widget.connect('register-message', self.on_register_message) # In firstboot, we leverage the RHN setup proxy settings already # presented to the user, so hide the choose server screen's proxy # text and button. But, if we are standalone, show our versions. if not self.standalone: screen = self.register_widget._screens[registergui.CHOOSE_SERVER_PAGE] screen.proxy_frame.destroy()