def __init__(self,parent,boxparent):
     BasePlugin.__init__(self,parent=parent,boxparent=boxparent)
     self._mainbox_.set_border_width(5)
     self._mainbox_.set_spacing(20)
     
     headericon   = get_icon_location("1200px-Tux.svg.png")
     headerbox    = Gtk.VBox(spacing=6)
     headerpixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(headericon,100,100)
     headerimage  = Gtk.Image.new_from_pixbuf(headerpixbuf)
     headerlabel  = Gtk.Label(_("<b>Config Boot Loader\n<span  foreground=\"red\">Be Careful</span></b>"),use_markup=True)
     headerlabel.set_line_wrap(True)
     headerlabel.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR )
     headerlabel.set_max_width_chars(13)
     headerlabel.set_justify(Gtk.Justification.CENTER)
     headerbox.pack_start(headerimage,False,False,0)
     headerbox.pack_start(headerlabel,False,False,0)
     headervseparator = Gtk.Separator()
     headervseparator.set_margin_bottom(10)
     headervseparator.set_margin_top(30)
     self.spinner = Gtk.Spinner()
     self._mainbox_.pack_start(headerbox,False,False,0)
     self._mainbox_.pack_start(headervseparator,False,False,0)
     self._mainbox_.pack_start(self.spinner,False,False,0)
     self.vb=Gtk.VBox(spacing=10)
     self._mainbox_.pack_start(self.vb,True,False,0)
     self.gui()
Esempio n. 2
0
    def __init__(self, parent, boxparent):
        BasePlugin.__init__(self, parent=parent, boxparent=boxparent)

        logo_location = get_icon_location("1200px-Tux.svg.png")
        image = Gtk.Image.new_from_file(logo_location)

        self._mainbox_.pack_start(image, False, False, 0)
    def __init__(self, parent, boxparent):
        BasePlugin.__init__(self, parent=parent, boxparent=boxparent)
        self.__parent = parent

        mainvbox = Gtk.VBox(spacing=20)
        mainvbox.set_margin_left(60)
        mainvbox.set_margin_right(60)
        vbox1 = Gtk.VBox(spacing=20)
        vbox2 = Gtk.VBox(spacing=20)

        self._mainbox_.set_border_width(10)
        self._mainbox_.set_spacing(30)

        headerbox = Gtk.VBox(spacing=6)
        headerlabel = Gtk.Label()
        headerlabel.props.label = _("<b>Hash Check</b>")
        headerlabel.props.use_markup = True
        headerlabel.get_style_context().add_class("h1")
        headerlabel.set_line_wrap(True)
        headerlabel.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
        headerlabel.set_max_width_chars(13)
        headerlabel.set_justify(Gtk.Justification.CENTER)
        headerbox.pack_start(headerlabel, False, False, 0)
        headervseparator = Gtk.Separator()

        self._mainbox_.pack_start(headerbox, False, False, 0)
        self._mainbox_.pack_start(headervseparator, False, False, 0)
        self._mainbox_.pack_start(mainvbox, False, False, 0)

        h = HashLibBin(self.__parent)
        mainvbox.add(h)
Esempio n. 4
0
    def __init__(self, parent, boxparent):
        BasePlugin.__init__(self, parent=parent, boxparent=boxparent)
        mainvbox = Gtk.VBox(spacing=20)
        mainvbox.set_margin_left(90)
        mainvbox.set_margin_right(90)
        self._mainbox_.set_border_width(5)
        self._mainbox_.pack_start(mainvbox, False, False, 0)
        headericon = get_icon_location("hdd.png")
        headerbox = Gtk.VBox(spacing=6)
        headerpixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(
            headericon, 100, 100)
        headerimage = Gtk.Image.new_from_pixbuf(headerpixbuf)
        headerlabel = Gtk.Label(_("<b>Drives Info</b>"), use_markup=True)
        headerlabel.set_line_wrap(True)
        headerlabel.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
        headerlabel.set_max_width_chars(13)
        headerlabel.set_justify(Gtk.Justification.CENTER)
        headerbox.pack_start(headerimage, False, False, 0)
        headerbox.pack_start(headerlabel, False, False, 0)
        headervseparator = Gtk.Separator()
        headervseparator.set_margin_bottom(30)
        hbox = Gtk.HBox(spacing=10)
        mainvbox.pack_start(headerbox, False, False, 0)
        mainvbox.pack_start(headervseparator, False, False, 0)
        mainvbox.pack_start(hbox, False, False, 0)

        vb = Gtk.VBox(spacing=50)
        drives = get_drives_info(get_all_devices())
        for k, v in drives.items():
            h = Gtk.HBox(spacing=50)
            vblogo = Gtk.VBox(spacing=2)
            vbinfo1 = Gtk.VBox(spacing=2)
            h.pack_start(vblogo, False, False, 0)
            h.pack_start(vbinfo1, False, False, 0)
            pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(v[0], 100, 100)
            image = Gtk.Image.new_from_pixbuf(pixbuf)
            vblogo.pack_start(image, False, False, 0)

            for l in v[1:]:
                mainlb1 = Gtk.HBox()
                label1 = Gtk.Label(l, use_markup=True)
                label1.set_line_wrap(True)
                label1.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
                label1.set_justify(Gtk.Justification.CENTER)
                mainlb1.pack_start(label1, False, False, 0)
                vbinfo1.pack_start(mainlb1, False, False, 0)

            vb.pack_start(h, False, False, 0)
        mainvbox.pack_start(vb, False, False, 0)

        fvseparator = Gtk.Separator()
        fvseparator.set_margin_top(30)
        fvseparator.set_margin_bottom(30)
        mainvbox.pack_start(fvseparator, False, False, 0)
    def __init__(self, parent, boxparent):
        BasePlugin.__init__(self, parent=parent, boxparent=boxparent)
        self._mainbox_.set_border_width(5)

        mainvbox = Gtk.VBox(spacing=20)
        mainvbox.set_border_width(10)
        mainvbox.set_margin_left(100)
        mainvbox.set_margin_right(100)
        self._mainbox_.pack_start(mainvbox, False, False, 0)
        headericon = get_icon_location("primary-exec.png")
        headerbox = Gtk.VBox(spacing=6)
        headerpixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(
            headericon, 100, 100)
        headerimage = Gtk.Image.new_from_pixbuf(headerpixbuf)
        headerlabel = Gtk.Label(_("<b>Get PCI Devices Info</b>"),
                                use_markup=True)
        headerlabel.set_line_wrap(True)
        headerlabel.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
        headerlabel.set_max_width_chars(13)
        headerlabel.set_justify(Gtk.Justification.CENTER)
        headerbox.pack_start(headerimage, False, False, 0)
        headerbox.pack_start(headerlabel, False, False, 0)
        mainvbox.pack_start(headerbox, False, False, 0)
        vseparator = Gtk.Separator()
        vseparator.set_margin_top(10)
        mainvbox.pack_start(vseparator, False, False, 0)
        treestore = Gtk.TreeStore(str)
        pci_info = self.get_pci_info()
        for info in pci_info:
            info = info.strip()
            if info.startswith("Slot:"):
                info = pci_info[pci_info.index(info) + 3].split(":",
                                                                1)[-1].strip()
                info = info[::-1].split("[", 1)[-1]
                tag_ = treestore.append(None, [info[::-1]])
                continue
            treestore.append(tag_, [info])

        treeview = Gtk.TreeView()
        treeview.set_model(treestore)
        mainvbox.pack_start(treeview, False, False, 0)

        cellrenderertext = Gtk.CellRendererText()

        treeviewcolumn = Gtk.TreeViewColumn("PCI Devices")
        treeview.append_column(treeviewcolumn)
        treeviewcolumn.pack_start(cellrenderertext, True)
        treeviewcolumn.add_attribute(cellrenderertext, "text", 0)
 def __init__(self,parent,boxparent):
     BasePlugin.__init__(self,parent=parent,boxparent=boxparent)
     self.b__ = Gtk.Button()
     self._mainbox_.set_spacing(20)
     self._mainbox_.set_margin_left(100)
     self._mainbox_.set_margin_right(100)
     headericon   = get_icon_location("primary-exec.png")
     headerbox    = Gtk.VBox(spacing=6)
     headerpixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(headericon,100,100)
     headerimage  = Gtk.Image.new_from_pixbuf(headerpixbuf)
     headerlabel  = Gtk.Label(_("<b>Drivers Manager</b>"),use_markup=True)
     headerlabel.set_line_wrap(True)
     headerlabel.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR )
     headerlabel.set_max_width_chars(13)
     headerlabel.set_justify(Gtk.Justification.CENTER)
     headerbox.pack_start(headerimage,False,False,0)
     headerbox.pack_start(headerlabel,False,False,0)
     headervseparator = Gtk.Separator()
     self._mainbox_.pack_start(headerbox,False,False,0)
     self._mainbox_.pack_start(headervseparator,False,False,0)
     
     self.statuslabel = Gtk.Label(use_markup=True)
     self.spinner = Gtk.Spinner()
     self._mainbox_.pack_start(self.spinner,True,True,0)
     self._mainbox_.pack_start(self.statuslabel,True,True,0)
     if nvidia.issucureboot():
         self.statuslabel.set_label(_("<b>SecureBoot enabled ,Disable SecureBoot From Bios And Try Again</b>"))
         return
     
     refreshbuttonhbox = Gtk.HBox(spacing=3)
     refreshbuttonhbox.set_homogeneous (True)
     self.refreshbutton = Gtk.Button(_("Refresh MetaData"))
     self.refreshbutton.connect("clicked",self.run_refresh_drivers_files)
     self.refreshbutton2 = Gtk.Button(_("Refresh"))
     self.refreshbutton2.connect("clicked",self.run_refresh_drivers)
     
     refreshbuttonhbox.pack_start(self.refreshbutton,True,True,0)
     refreshbuttonhbox.pack_start(self.refreshbutton2,True,True,0)
     self._mainbox_.pack_start(refreshbuttonhbox,False,False,0)
     
     self.mainhbox = Gtk.HBox()
     self.vb = Gtk.VBox(spacing=20)
     self.mainhbox.add(self.vb)
     self._mainbox_.pack_start(self.mainhbox,False,False,0)
     self.nvidiacard = {}
Esempio n. 7
0
    def __init__(self, parent, boxparent):
        BasePlugin.__init__(self, parent=parent, boxparent=boxparent)
        self._mainbox_.set_border_width(5)
        self._mainbox_.set_spacing(20)
        headericon = get_icon_location("GnomeLogoHorizontal.svg")
        headerbox = Gtk.VBox(spacing=6)
        headerpixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(
            headericon, 100, 100)
        headerimage = Gtk.Image.new_from_pixbuf(headerpixbuf)
        headerlabel = Gtk.Label(_("<b>Gnome Tweak Themes</b>"),
                                use_markup=True)
        headerlabel.set_line_wrap(True)
        headerlabel.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
        headerlabel.set_max_width_chars(13)
        headerlabel.set_justify(Gtk.Justification.CENTER)
        headerbox.pack_start(headerimage, False, False, 0)
        headerbox.pack_start(headerlabel, False, False, 0)
        self._mainbox_.pack_start(headerbox, False, False, 0)
        vseparator = Gtk.Separator()
        vseparator.set_margin_top(10)
        self._mainbox_.pack_start(vseparator, False, False, 0)

        machbox = Gtk.HBox(spacing=20)
        self._mainbox_.pack_start(machbox, False, False, 0)
        button_mac_vbox = Gtk.VBox(spacing=1)
        pixbufmac = GdkPixbuf.Pixbuf.new_from_file_at_size(
            get_icon_location("Screenshot from 2018-04-08 15-31-58.jpg"), 500,
            400)
        imagemac = Gtk.Image.new_from_pixbuf(pixbufmac)
        label_mac = Gtk.Label("Ant")
        button_mac = Gtk.Button()
        button_mac.connect("clicked", self.on_button_clicked,
                           mac_extensions_to_enable, mac_gsettings,
                           mac_gnome_terminal)
        button_mac_vbox.pack_start(imagemac, False, False, 0)
        button_mac_vbox.pack_start(label_mac, False, False, 0)
        button_mac.add(button_mac_vbox)
        machbox.pack_start(button_mac, True, False, 0)

        self.spiner = Gtk.Spinner()
        self._mainbox_.pack_start(self.spiner, False, False, 0)
    def __init__(self, parent, boxparent):
        BasePlugin.__init__(self, parent=parent, boxparent=boxparent)
        self._mainbox_.set_border_width(5)
        self._mainbox_.set_spacing(20)
        h = Gtk.HBox()
        h.set_homogeneous(True)
        v = Gtk.VBox()

        headericon = get_icon_location("1200px-Tux.svg.png")
        headerbox = Gtk.VBox(spacing=6)
        headerpixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(
            headericon, 100, 100)
        headerimage = Gtk.Image.new_from_pixbuf(headerpixbuf)
        headerlabel = Gtk.Label(_("<b>Update Boot Loader Menu</b>"),
                                use_markup=True)
        headerlabel.set_line_wrap(True)
        headerlabel.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
        headerlabel.set_max_width_chars(13)
        headerlabel.set_justify(Gtk.Justification.CENTER)
        headerbox.pack_start(headerimage, False, False, 0)
        headerbox.pack_start(headerlabel, False, False, 0)
        headervseparator = Gtk.Separator()
        headervseparator.set_margin_bottom(10)
        headervseparator.set_margin_top(30)
        self.spinner = Gtk.Spinner()
        self.t = RunTextView (self._parent_,True,[["pkexec  /usr/sbin/update-grub","free",True]],\
        cursor_visible=True,end="\n",justification=Gtk.Justification.CENTER,spinner=self.spinner)
        self.t.set_size_request(200, 200)
        button = Gtk.Button(_("Update"))
        button.connect("clicked", self.on_button_clicked)

        self._mainbox_.pack_start(headerbox, False, False, 0)
        self._mainbox_.pack_start(headervseparator, False, False, 0)
        h.pack_start(button, False, False, 0)
        v.pack_start(self.t, False, False, 0)
        self._mainbox_.pack_start(h, False, False, 0)
        self._mainbox_.pack_start(self.spinner, False, False, 0)
        self._mainbox_.pack_start(v, False, False, 0)
 def __init__(self, parent, boxparent):
     BasePlugin.__init__(self, parent=parent, boxparent=boxparent)
     self._mainbox_.set_border_width(10)
     self._mainbox_.set_spacing(30)
     headericon = get_icon_location("kacsttitle.gif")
     headerbox = Gtk.VBox(spacing=6)
     headerpixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(
         headericon, 100, 100)
     headerimage = Gtk.Image.new_from_pixbuf(headerpixbuf)
     headerlabel = Gtk.Label(_("<b>Manager Arabic Fonts</b>"),
                             use_markup=True)
     headerlabel.set_line_wrap(True)
     headerlabel.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
     headerlabel.set_max_width_chars(13)
     headerlabel.set_justify(Gtk.Justification.CENTER)
     headerbox.pack_start(headerimage, False, False, 0)
     headerbox.pack_start(headerlabel, False, False, 0)
     headervseparator = Gtk.Separator()
     self.spinner = Gtk.Spinner()
     self._mainbox_.pack_start(headerbox, False, False, 0)
     self._mainbox_.pack_start(headervseparator, False, False, 0)
     self._mainbox_.pack_start(self.spinner, False, False, 0)
     self.gui()
    def __init__(self,parent,boxparent):
        BasePlugin.__init__(self,parent=parent,boxparent=boxparent)
        self._mainbox_.set_spacing(25)
        
        
        self.base = dnf.Base()
        self.base.read_all_repos()
        self.repos=self.base.repos
        
        headericon   = get_icon_location("fedora.png")
        headerbox    = Gtk.VBox(spacing=6)
        headerpixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(headericon,100,100)
        headerimage  = Gtk.Image.new_from_pixbuf(headerpixbuf)
        headerlabel  = Gtk.Label(_("<b>Dnf Repos Manager</b>"),use_markup=True)
        headerlabel.set_line_wrap(True)
        headerlabel.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR )
        headerlabel.set_max_width_chars(13)
        headerlabel.set_justify(Gtk.Justification.CENTER)
        headerbox.pack_start(headerimage,False,False,0)
        headerbox.pack_start(headerlabel,False,False,0)
        headervseparator = Gtk.Separator()
        
        self._mainbox_.pack_start(headerbox,False,False,0)
        self._mainbox_.pack_start(headervseparator,False,False,0)
        

        searchicon = Gtk.Image()
        searchicon.set_from_icon_name("edit-find-symbolic", Gtk.IconSize.BUTTON)
        self.searchbutton = Gtk.ToggleButton()
        self.searchbutton.add(searchicon)
        hboxbutton = Gtk.HBox()
        hboxbutton.pack_start(self.searchbutton,True,False,0)
        self.searchbutton.connect("toggled", self._on_transition)
        self._mainbox_.pack_start(hboxbutton,False,False,0)
        self.revealer = Gtk.Revealer()
        hboxrevealer = Gtk.HBox()
        hboxrevealer.pack_start(self.revealer,True,False,0)
        self.entry = Gtk.SearchEntry(placeholder_text="Search Repo")
        self.entry.props.margin_left = 15
        self.entry.props.margin_right = 15
        self.entry.props.margin_top = 5
        self.entry.props.margin_bottom = 5
        self.entry.connect("search-changed", self._on_search)
        self.revealer.add(self.entry)
        self._mainbox_.pack_start(hboxrevealer,False,False,0)
        
        
        mainhbox = Gtk.HBox()

        vbox     = Gtk.VBox(spacing=20)
        
        mainhbox.pack_start(vbox,True,False,0)
        self._mainbox_.pack_start(mainhbox,False,False,0)

        
        self.listbox_dnf = Gtk.ListBox()
        self.listbox_dnf.set_filter_func(self._list_filter_func, None)
        
        vbox.pack_start(self.listbox_dnf,False,False,0)
        for name,repo in self.repos.items():
            row_dnf = Gtk.ListBoxRow(activatable=True)
            self.listbox_dnf.add(row_dnf)
            h = Gtk.HBox(spacing=10)
            row_dnf.add(h)
            h.set_homogeneous (True)
            labelhbox = Gtk.HBox()
            switchhbox = Gtk.HBox()
            label  = Gtk.Label(name)
            label.set_line_wrap(True)
            label.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR )
            headerlabel.set_max_width_chars(40)
            labelhbox.pack_start(label,False,True,0)
            
            if not repo.enabled:
                self.switch=Gtk.Switch()
            else:
                self.switch=Gtk.Switch()
                self.switch.set_active(True)
            self.switchhandler=self.switch.connect("state-set",self.on_switch_changed,name)
            switchhbox.pack_start(self.switch,True,False,0)
            h.pack_start(labelhbox,True,True,0)
            h.pack_start(switchhbox,True,True,0)
            
            
            


        self._parent_.connect("key-press-event", self._on_key_press)
 def __init__(self,parent,boxparent):
     BasePlugin.__init__(self,parent=parent,boxparent=boxparent)
     self.gui()
Esempio n. 12
0
 def __init__(self, parent, boxparent):
     BasePlugin.__init__(self, parent=parent, boxparent=boxparent)
     self._mainbox_.set_spacing(25)
     self.gui_()
    def __init__(self, parent, boxparent):
        BasePlugin.__init__(self, parent=parent, boxparent=boxparent)
        self.drives_dict = {}
        mainvbox = Gtk.VBox(spacing=20)
        mainvbox.set_margin_left(60)
        mainvbox.set_margin_right(60)

        vbox1 = Gtk.VBox(spacing=20)
        vbox2 = Gtk.VBox(spacing=20)

        self._mainbox_.set_border_width(10)
        self._mainbox_.set_spacing(30)

        headericon = get_icon_location("flash-chip.png")
        headerbox = Gtk.VBox(spacing=6)
        headerpixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(
            headericon, 100, 100)
        headerimage = Gtk.Image.new_from_pixbuf(headerpixbuf)
        headerlabel = Gtk.Label(
            _("<b>Fix USB Flash Memory Adter dd Command</b>"), use_markup=True)
        headerlabel.set_line_wrap(True)
        headerlabel.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
        headerlabel.set_max_width_chars(13)
        headerlabel.set_justify(Gtk.Justification.CENTER)
        headerbox.pack_start(headerimage, False, False, 0)
        headerbox.pack_start(headerlabel, False, False, 0)
        headervseparator = Gtk.Separator()

        self.fixbutton = Gtk.Button(_("Run Fix"))
        self.fixbutton.connect("clicked", self.on_fixhbutton_clicked)

        self._mainbox_.pack_start(headerbox, False, False, 0)
        self._mainbox_.pack_start(headervseparator, False, False, 0)
        self._mainbox_.pack_start(mainvbox, False, False, 0)

        self.spinner = Gtk.Spinner()
        self.spinner.hide()

        hboxforcecheckbutton = Gtk.HBox(spacing=3)
        labelforcecheckbutton = Gtk.Label(_("Force\nUmount"))
        labelforcecheckbutton.set_line_wrap(True)
        labelforcecheckbutton.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
        labelforcecheckbutton.set_max_width_chars(13)
        labelforcecheckbutton.set_justify(Gtk.Justification.CENTER)
        self.forcecheckbutton = Gtk.CheckButton()
        self.forcecheckbutton.set_active(False)
        self.forcecheckbutton.set_tooltip_text(_("Force Umount"))
        hboxforcecheckbutton.pack_start(labelforcecheckbutton, False, False, 0)
        hboxforcecheckbutton.pack_start(self.forcecheckbutton, False, False, 0)

        combobox = Gtk.HBox(spacing=10)
        refreshbutton = Gtk.Button(_("Refresh"))
        refreshbutton.connect("clicked", self.on_refreshbutton_clicked)
        self.combo = Gtk.ComboBoxText()
        self.on_refreshbutton_clicked()
        self.combo.set_active(0)
        combobox.pack_start(self.combo, True, True, 0)
        combobox.pack_start(hboxforcecheckbutton, False, False, 0)

        vbox2.pack_start(combobox, False, False, 0)
        vbox2.pack_start(self.spinner, False, False, 0)
        vbox2.pack_start(refreshbutton, False, False, 0)
        vbox2.pack_start(self.fixbutton, False, False, 0)

        mainvbox.pack_start(vbox1, False, False, 0)
        mainvbox.pack_start(vbox2, False, False, 0)
    def __init__(self, parent, boxparent):
        BasePlugin.__init__(self, parent=parent, boxparent=boxparent)
        mainvbox = Gtk.VBox(spacing=20)
        self._mainbox_.pack_start(mainvbox, False, False, 0)
        lock_ = False
        """desktop=os.getenv("XDG_CURRENT_DESKTOP")
        if desktop=="":
            if os.getenv("DESKTOP_SESSION")=="/usr/share/xsessions/openbox":
                desktop = "OpenBox"
                
        desktop_cc={"GNOME"      :["Gnome Center",get_icon_location("gnome-logo-icon-23471.png"),"/usr/bin/gnome-control-center"],
                    "KDE"        :["Kde Control Center",get_icon_location("11949942481641741323about_kde.svg.hi.png"),"/usr/bin/systemsettings5"] ,
                    "XFCE"       :["Xfce Control Center",get_icon_location("XFCE-full.sh.png"),"/usr/bin/xfce4-settings-manager"] ,
                    "X-LXQt"     :["Lxqt Control Center",get_icon_location("lxqt_logo_by_i_sty-d7rmlxd.png"),"/usr/bin/lxqt-config"] ,
                    "X-Cinnamon" :["Cinnamon Center",get_icon_location("mintlogo-kde.svg"),"/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py"],
                    "MATE"       :["Mate Control Center",get_icon_location("mate_desktop_logo.jpg"),"/usr/bin/mate-control-center"] ,
                    "X-Hawaii"   :["Hawaii Control Center",get_icon_location("clip_art_illustration_of_a_beautiful_colorful_parrot_sitting_on_a_branch_the_background_has_a_rainbow_and_palm_trees_0515-1102-0914-3316_SMU.jpg"),"/usr/bin/hawaii-system-preferences"],
                    "Openbox"    :["Openbox Manager Configuration",get_icon_location("Openbox-logo.png"),"/usr/bin/obconf"]
                    } 
        
        for k_ in desktop_cc.keys():
            if False:#skiped
                lock_ = True
                self._mainbox_.set_border_width(100)
                hbox1 = Gtk.HBox(spacing=10)
                vbox1 = Gtk.VBox(spacing=20)
                op = desktop_cc[desktop]
                vheader = Gtk.VBox(spacing=3)
                vbox1.pack_start(vheader,False,False,0)
                label = Gtk.Label("<b>"+op[0]+"</b>",use_markup=True)
                label.set_line_wrap(True)
                label.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR )
                label.set_max_width_chars(13)
                label.set_justify(Gtk.Justification.CENTER)
                pixbuf=GdkPixbuf.Pixbuf.new_from_file_at_size(op[1],100,100)
                image  = Gtk.Image.new_from_pixbuf(pixbuf)
                vheader.pack_start(image,False,False,0)
                vheader.pack_start(label,False,False,0)
                bbox = Gtk.HBox()
                button = Gtk.Button("Run")
                #button.get_style_context().add_class("destructive-action")
                button.set_size_request(150,40)
                button.connect("clicked",self.on_button_clicked,op[2])
                hseparator = Gtk.Separator()
                hseparator.set_margin_top(30)
                hseparator.set_margin_top(30)
                bbox.pack_start(button,True,False,0)
                vbox1.pack_start(bbox,False,False,0)
                if os.path.isfile("/usr/bin/gnome-tweak-tool") and "GNOME" in k_:
                    i = get_icon_location("gnome_tweak_tool_22409.png")
                    vbox2 = Gtk.VBox(spacing=20)
                    vheader2 = Gtk.VBox(spacing=3)
                    vbox2.pack_start(vheader2,False,False,0)
                    label2 = Gtk.Label("<b>Gnome Tweak Tool</b>",use_markup=True)
                    label2.set_line_wrap(True)
                    label2.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR )
                    label2.set_max_width_chars(13)
                    pixbuf2=GdkPixbuf.Pixbuf.new_from_file_at_size(i,100,100)
                    image2  = Gtk.Image.new_from_pixbuf(pixbuf2)
                    vheader2.pack_start(image2,False,False,0)
                    vheader2.pack_start(label2,False,False,0)
                    bbox2 = Gtk.HBox()
                    button2 = Gtk.Button("Run")
                    #button2.get_style_context().add_class("destructive-action")
                    button2.set_size_request(150,40)
                    button2.connect("clicked",self.on_button_clicked,"/usr/bin/gnome-tweak-tool")
                    bbox2.pack_start(button2,True,False,0)
                    vbox2.pack_start(bbox2,False,False,0)
                
                hbox1.pack_start(vbox1,True,False,0)
                if os.path.isfile("/usr/bin/gnome-tweak-tool") and "GNOME" in k_:
                    hbox1.pack_start(hseparator,True,False,0)
                    hbox1.pack_start(vbox2,True,False,0)
                    mainvbox.pack_start(hbox1,False,False,0)
                else:
                    vseparator = Gtk.Separator()
                    vseparator.set_margin_top(10)
                    mainvbox.pack_start(hbox1,False,False,0)
                    mainvbox.pack_start(vseparator,False,False,0)"""

        if not lock_:
            self._mainbox_.set_border_width(5)
            lxde_cc = [
                [_("Customize Look and Feel"), "/usr/bin/lxappearance"],
                [_("Default Applications"), "/usr/bin/lxsession-default-apps"],
                [_("Desktop Session Settings"), "/usr/bin/lxsession-edit"],
                [_("Display Settings"), "/usr/bin/lxrandr"],
                [_("Windows Manager Configuration"), "/usr/bin/obconf"],
                [_("Input Device Preferences"), "/usr/bin/lxinput"]
            ]
            lxde_logo = get_icon_location("cropped-lxde-icon.png")
            hbox1 = Gtk.HBox(spacing=10)
            vbox1 = Gtk.VBox(spacing=20)
            vheader = Gtk.VBox(spacing=3)
            vbox1.pack_start(vheader, False, False, 0)
            label = Gtk.Label(_("<b>Lxde Control Programs</b>"),
                              use_markup=True)
            label.set_line_wrap(True)
            label.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
            label.set_max_width_chars(13)
            label.set_justify(Gtk.Justification.CENTER)
            pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(
                lxde_logo, 100, 100)
            image = Gtk.Image.new_from_pixbuf(pixbuf)
            vheader.pack_start(image, False, False, 0)
            vheader.pack_start(label, False, False, 0)
            for i in lxde_cc:
                if os.path.isfile(i[1]):
                    button = Gtk.Button(i[0])
                    #button.get_style_context().add_class("destructive-action")
                    button.set_size_request(150, 40)
                    button.connect("clicked", self.on_button_clicked, i[1])
                    vbox1.pack_start(button, False, False, 0)

            vseparator = Gtk.Separator()
            vseparator.set_margin_top(10)
            hbox1.pack_start(vbox1, True, False, 0)
            mainvbox.pack_start(hbox1, False, False, 0)
            mainvbox.pack_start(vseparator, False, False, 0)
Esempio n. 15
0
    def __init__(self, parent, boxparent):
        BasePlugin.__init__(self, parent=parent, boxparent=boxparent)
        self._mainbox_.set_border_width(5)

        mainvbox = Gtk.VBox(spacing=20)
        mainvbox.set_border_width(10)
        mainvbox.set_margin_left(100)
        mainvbox.set_margin_right(100)
        self._mainbox_.pack_start(mainvbox, False, False, 0)
        headericon = get_icon_location("primary-exec.png")
        headerbox = Gtk.VBox(spacing=6)
        headerpixbuf = GdkPixbuf.Pixbuf.new_from_file_at_size(
            headericon, 100, 100)
        headerimage = Gtk.Image.new_from_pixbuf(headerpixbuf)
        headerlabel = Gtk.Label(_("<b>Get Exec</b>"), use_markup=True)
        headerlabel.set_line_wrap(True)
        headerlabel.set_line_wrap_mode(Pango.WrapMode.WORD_CHAR)
        headerlabel.set_max_width_chars(13)
        headerlabel.set_justify(Gtk.Justification.CENTER)
        headerbox.pack_start(headerimage, False, False, 0)
        headerbox.pack_start(headerlabel, False, False, 0)
        mainvbox.pack_start(headerbox, False, False, 0)
        vseparator = Gtk.Separator()
        vseparator.set_margin_top(10)
        mainvbox.pack_start(vseparator, False, False, 0)

        vb = Gtk.VBox(spacing=10)
        hb = Gtk.HBox(spacing=10)
        vmainbox = Gtk.VBox(spacing=30)
        hbox1 = Gtk.HBox(spacing=10)
        hbox2 = Gtk.HBox(spacing=10)
        hbox3 = Gtk.HBox(spacing=10)
        hbox4 = Gtk.HBox(spacing=10)
        hbox5 = Gtk.HBox(spacing=10)
        hbox6 = Gtk.HBox(spacing=10)
        hbox0 = Gtk.HBox(spacing=10)

        self.filenameentry = Gtk.Entry()
        self.filenameentry.set_placeholder_text(_("Enter Program Name..."))
        self.filenameentry.set_max_length(63)

        argv_check_vbox = Gtk.VBox(spacing=2)
        argv_label = Gtk.Label("argv")
        self.argv_check = Gtk.CheckButton()
        self.argv_check.set_tooltip_text(_("Get Command with  argv"))
        self.argv_check.set_active(True)

        self.label1 = Gtk.Label(_("Name : "))
        self.label2 = Gtk.Label(_("Command : "))
        self.label3 = Gtk.Label(_("Path : "))
        self.label0 = Gtk.Label(_("File : "))

        self.label1.set_line_wrap(True)
        self.label2.set_line_wrap(True)
        self.label3.set_line_wrap(True)
        self.label0.set_line_wrap(True)

        self.label1_ = Gtk.Label()
        self.label2_ = Gtk.Label()
        self.label3_ = Gtk.Label()
        self.label0_ = Gtk.Label()

        self.label1_.set_line_wrap(True)
        self.label2_.set_line_wrap(True)
        self.label3_.set_line_wrap(True)
        self.label0_.set_line_wrap(True)
        self.label1_.set_selectable(True)
        self.label2_.set_selectable(True)
        self.label3_.set_selectable(True)
        self.label0_.set_selectable(True)

        button_vbox = Gtk.VBox(spacing=5)
        run_button = Gtk.Button(_("Get"))
        run_button.connect("clicked", self.on_run_button_clicked)

        argv_check_vbox.pack_start(argv_label, True, True, 0)
        argv_check_vbox.pack_start(self.argv_check, True, True, 0)
        hbox1.pack_start(self.filenameentry, True, True, 0)
        hbox1.pack_start(argv_check_vbox, False, False, 0)

        hbox2.pack_start(self.label1, False, False, 0)
        hbox2.pack_start(self.label1_, False, False, 0)
        hbox3.pack_start(self.label2, False, False, 0)
        hbox3.pack_start(self.label2_, False, False, 0)
        hbox4.pack_start(self.label3, False, False, 0)
        hbox4.pack_start(self.label3_, False, False, 0)
        hbox0.pack_start(self.label0, False, False, 0)
        hbox0.pack_start(self.label0_, False, False, 0)
        hbox5.pack_start(run_button, True, True, 0)

        button_vbox.pack_start(hbox5, True, True, 0)

        vmainbox.pack_start(hbox1, True, True, 0)
        vmainbox.pack_start(hbox2, True, True, 0)
        vmainbox.pack_start(hbox3, True, True, 0)
        vmainbox.pack_start(hbox4, True, True, 0)
        vmainbox.pack_start(hbox0, True, True, 0)
        vmainbox.pack_start(button_vbox, True, True, 0)
        hb.pack_start(vmainbox, True, True, 0)
        vb.pack_start(hb, True, True, 0)
        mainvbox.pack_start(vb, False, False, 0)
        vseparator = Gtk.Separator()
        vseparator.set_margin_top(10)
        mainvbox.pack_start(vseparator, False, False, 0)