def __init__(self, parent, icon):
        Dialog.__init__(
            self,
            _("Confirm makepkg as root"),
            parent,
            DIALOG_MODAL | DIALOG_DESTROY_WITH_PARENT,
            (STOCK_OK, RESPONSE_ACCEPT, STOCK_CANCEL, RESPONSE_REJECT),
        )

        self.add_button(_("Run as root"), 1000)

        lab = Label(
            _(
                "Running makepkg as root is a bad idea.\nSelect an alternate user or confirm that you want to run it as root"
            )
        )

        uname_frame = Frame(_("Username:"******"Password"))

        self.uname_entry = Entry()

        uname_frame.add(self.uname_entry)

        self.vbox.pack_start(lab)
        self.vbox.pack_start(uname_frame)
        self.vbox.show_all()
Example #2
0
	def __set_properties(self):
		from Utils import never_focus
		never_focus(self.__toolbar)
		self.__toolbar.set_property("sensitive", True)
		from gtk import TEXT_WINDOW_WIDGET, ORIENTATION_HORIZONTAL, EventBox
		from gtk import TOOLBAR_ICONS, Frame, SHADOW_IN, ICON_SIZE_SMALL_TOOLBAR
		self.__toolbar.set_property("icon-size", ICON_SIZE_SMALL_TOOLBAR)
		self.__toolbar.set_style(TOOLBAR_ICONS)
		self.__toolbar.set_orientation(ORIENTATION_HORIZONTAL)
		self.__editor.set_data("Toolbar", self.__toolbar)
		frame = Frame()
		frame.add(self.__toolbar)
		frame.set_shadow_type(SHADOW_IN)
		box = EventBox()
		box.add(frame)
		self.__editor.set_data("ToolContainer", box)
		self.__editor.textview.add_child_in_window(box, TEXT_WINDOW_WIDGET, -3, -3)
		return
    def _setup_layout(self):

        hpaned = HPaned()
        label = Label(_("Are you sure you want to install/remove those packages?"))
        label.show()
        inst_frame = Frame(_("Packages to install"))
        rem_frame = Frame(_("Packages to remove"))

        inst_scroll = ScrolledWindow()
        inst_scroll.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)

        rem_scroll = ScrolledWindow()
        rem_scroll.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)

        inst_scroll.add(self.install_tree)
        rem_scroll.add(self.remove_tree)
        
        inst_frame.add(inst_scroll)
        rem_frame.add(rem_scroll)

        hpaned.pack1(inst_frame, False, False)
        hpaned.pack2(rem_frame, False, False)
        
        hpaned.show_all()

        self.vbox.pack_start(label, False, False, 0)
        self.vbox.pack_start(hpaned, True, True, 0)
        self.set_default_size(600,300)
        return
    def _setup_layout(self):

        hpaned = HPaned()
        label = Label(_("Are you sure you want to install/remove those packages?"))
        label.show()
        inst_frame = Frame(_("Packages to install"))
        rem_frame = Frame(_("Packages to remove"))
        
        inst_frame.add(self.install_tree)
        rem_frame.add(self.remove_tree)

        hpaned.add1(inst_frame)
        hpaned.add2(rem_frame)
        
        hpaned.show_all()

        self.vbox.pack_start(label, False, False, 0)
        self.vbox.pack_start(hpaned, True, True, 0)
        return
Example #5
0
 def __set_properties(self):
     from Utils import never_focus
     never_focus(self.__toolbar)
     self.__toolbar.set_property("sensitive", True)
     from gtk import TEXT_WINDOW_WIDGET, ORIENTATION_HORIZONTAL, EventBox
     from gtk import TOOLBAR_ICONS, Frame, SHADOW_IN, ICON_SIZE_SMALL_TOOLBAR
     self.__toolbar.set_property("icon-size", ICON_SIZE_SMALL_TOOLBAR)
     self.__toolbar.set_style(TOOLBAR_ICONS)
     self.__toolbar.set_orientation(ORIENTATION_HORIZONTAL)
     self.__editor.set_data("Toolbar", self.__toolbar)
     frame = Frame()
     frame.add(self.__toolbar)
     frame.set_shadow_type(SHADOW_IN)
     box = EventBox()
     box.add(frame)
     self.__editor.set_data("ToolContainer", box)
     self.__editor.textview.add_child_in_window(box, TEXT_WINDOW_WIDGET, -3,
                                                -3)
     return