GTK3: working plugin manager
svn: r20148
This commit is contained in:
parent
36d3973984
commit
f080cb1b3c
@ -142,7 +142,7 @@ class PluginStatus(ManagedWindow):
|
|||||||
self.__load_btn = Gtk.Button(_("Load"))
|
self.__load_btn = Gtk.Button(_("Load"))
|
||||||
hbutbox.add(self.__load_btn)
|
hbutbox.add(self.__load_btn)
|
||||||
self.__load_btn.connect('clicked', self.__load, self.list_reg, 4) # id_col
|
self.__load_btn.connect('clicked', self.__load, self.list_reg, 4) # id_col
|
||||||
vbox_reg.pack_start(hbutbox, expand=False, padding=5)
|
vbox_reg.pack_start(hbutbox, False, False, 0)
|
||||||
|
|
||||||
notebook.append_page(vbox_reg,
|
notebook.append_page(vbox_reg,
|
||||||
tab_label=Gtk.Label(label=_('Registered Plugins')))
|
tab_label=Gtk.Label(label=_('Registered Plugins')))
|
||||||
@ -199,7 +199,7 @@ class PluginStatus(ManagedWindow):
|
|||||||
self.__load_btn.set_sensitive(False)
|
self.__load_btn.set_sensitive(False)
|
||||||
hbutbox.add(self.__load_btn)
|
hbutbox.add(self.__load_btn)
|
||||||
self.__load_btn.connect('clicked', self.__load, self.list, 4) # id_col
|
self.__load_btn.connect('clicked', self.__load, self.list, 4) # id_col
|
||||||
vbox_loaded.pack_start(hbutbox, expand=False, padding=5)
|
vbox_loaded.pack_start(hbutbox, False, False, 5)
|
||||||
notebook.append_page(vbox_loaded,
|
notebook.append_page(vbox_loaded,
|
||||||
tab_label=Gtk.Label(label=_('Loaded Plugins')))
|
tab_label=Gtk.Label(label=_('Loaded Plugins')))
|
||||||
|
|
||||||
@ -236,7 +236,7 @@ class PluginStatus(ManagedWindow):
|
|||||||
self.addon_list.connect('cursor-changed', self.button_press_addon)
|
self.addon_list.connect('cursor-changed', self.button_press_addon)
|
||||||
|
|
||||||
install_row = Gtk.HBox()
|
install_row = Gtk.HBox()
|
||||||
install_row.pack_start(Gtk.Label(_("Path to Addon:", True, True, 0)), expand=False)
|
install_row.pack_start(Gtk.Label(label=_("Path to Addon:")), False, True, 0)
|
||||||
self.install_addon_path = Gtk.Entry()
|
self.install_addon_path = Gtk.Entry()
|
||||||
|
|
||||||
button = Gtk.Button()
|
button = Gtk.Button()
|
||||||
@ -245,14 +245,14 @@ class PluginStatus(ManagedWindow):
|
|||||||
button.add(img)
|
button.add(img)
|
||||||
button.connect('clicked', self.__select_file)
|
button.connect('clicked', self.__select_file)
|
||||||
install_row.pack_start(self.install_addon_path, True, True, 0)
|
install_row.pack_start(self.install_addon_path, True, True, 0)
|
||||||
install_row.pack_start(button, expand=False, fill=False)
|
install_row.pack_start(button, False, False, 0)
|
||||||
|
|
||||||
scrolled_window.add(self.addon_list)
|
scrolled_window.add(self.addon_list)
|
||||||
install_page.pack_start(scrolled_window, True, True, 0)
|
install_page.pack_start(scrolled_window, True, True, 0)
|
||||||
#add some spce under the scrollbar
|
#add some spce under the scrollbar
|
||||||
install_page.pack_start(Gtk.Label('', True, True, 0), expand=False, fill=False)
|
install_page.pack_start(Gtk.Label(label=''), False, False, 0)
|
||||||
#path to addon path line
|
#path to addon path line
|
||||||
install_page.pack_start(install_row, expand=False, fill=False)
|
install_page.pack_start(install_row, False, False, 0)
|
||||||
|
|
||||||
hbutbox = Gtk.HButtonBox()
|
hbutbox = Gtk.HButtonBox()
|
||||||
hbutbox.set_layout(Gtk.ButtonBoxStyle.SPREAD)
|
hbutbox.set_layout(Gtk.ButtonBoxStyle.SPREAD)
|
||||||
@ -265,12 +265,12 @@ class PluginStatus(ManagedWindow):
|
|||||||
self.__refresh_btn = Gtk.Button(_("Refresh Addon List"))
|
self.__refresh_btn = Gtk.Button(_("Refresh Addon List"))
|
||||||
hbutbox.add(self.__refresh_btn)
|
hbutbox.add(self.__refresh_btn)
|
||||||
self.__refresh_btn.connect('clicked', self.__refresh_addon_list)
|
self.__refresh_btn.connect('clicked', self.__refresh_addon_list)
|
||||||
install_page.pack_start(hbutbox, expand=False, padding=5)
|
install_page.pack_start(hbutbox, False, True, 5)
|
||||||
# notebook.append_page(install_page,
|
# notebook.append_page(install_page,
|
||||||
# tab_label=Gtk.Label(label=_('Install Addons')))
|
# tab_label=Gtk.Label(label=_('Install Addons')))
|
||||||
|
|
||||||
#add the notebook to the window
|
#add the notebook to the window
|
||||||
self.window.get_content_area().add(notebook)
|
self.window.get_content_area().pack_start(notebook, True, True, 0)
|
||||||
|
|
||||||
if __debug__:
|
if __debug__:
|
||||||
# Only show the "Reload" button when in debug mode
|
# Only show the "Reload" button when in debug mode
|
||||||
@ -520,6 +520,7 @@ class PluginStatus(ManagedWindow):
|
|||||||
def cursor_changed(self, obj):
|
def cursor_changed(self, obj):
|
||||||
if __debug__:
|
if __debug__:
|
||||||
selection = obj.get_selection()
|
selection = obj.get_selection()
|
||||||
|
if selection:
|
||||||
model, node = selection.get_selected()
|
model, node = selection.get_selected()
|
||||||
if node:
|
if node:
|
||||||
data = model.get_value(node, 3)
|
data = model.get_value(node, 3)
|
||||||
@ -545,6 +546,7 @@ class PluginStatus(ManagedWindow):
|
|||||||
"""
|
"""
|
||||||
import urllib
|
import urllib
|
||||||
selection = self.addon_list.get_selection()
|
selection = self.addon_list.get_selection()
|
||||||
|
if selection:
|
||||||
model, node = selection.get_selected()
|
model, node = selection.get_selected()
|
||||||
if node:
|
if node:
|
||||||
url = model.get_value(node, 9)
|
url = model.get_value(node, 9)
|
||||||
|
Loading…
Reference in New Issue
Block a user