|
|
732a263 |
diff -up driconf-0.9.1/driconf_complexui.py.toolbar driconf-0.9.1/driconf_complexui.py
|
|
|
732a263 |
--- driconf-0.9.1/driconf_complexui.py.toolbar 2008-06-05 16:21:09.000000000 -0700
|
|
|
732a263 |
+++ driconf-0.9.1/driconf_complexui.py 2008-06-05 17:02:03.000000000 -0700
|
|
|
732a263 |
@@ -838,42 +838,73 @@ class MainWindow (gtk.Window):
|
|
|
732a263 |
self.paned.show()
|
|
|
732a263 |
self.toolbar = gtk.Toolbar ()
|
|
|
732a263 |
iconSize = self.toolbar.get_icon_size()
|
|
|
732a263 |
- self.saveButton = self.toolbar.insert_stock (
|
|
|
732a263 |
- "gtk-save", _("Save selected configuration file"),
|
|
|
732a263 |
- "priv", self.configTree.saveConfig, None, -1)
|
|
|
732a263 |
- self.reloadButton = self.toolbar.insert_stock (
|
|
|
732a263 |
- "gtk-revert-to-saved", _("Reload selected configuration file"),
|
|
|
732a263 |
- "priv", self.configTree.reloadConfig, None, -1)
|
|
|
732a263 |
- self.toolbar.append_space()
|
|
|
732a263 |
- self.newButton = self.toolbar.insert_stock (
|
|
|
732a263 |
- "gtk-new", _("Create a new device or application"),
|
|
|
732a263 |
- "priv", self.configTree.newItem, None, -1)
|
|
|
732a263 |
- self.removeButton = self.toolbar.insert_stock (
|
|
|
732a263 |
- "gtk-delete", _("Remove selected device or application"),
|
|
|
732a263 |
- "priv", self.configTree.removeItem, None, -1)
|
|
|
732a263 |
- self.upButton = self.toolbar.insert_stock (
|
|
|
732a263 |
- "gtk-go-up", _("Move selected item up"),
|
|
|
732a263 |
- "priv", self.configTree.moveUp, None, -1)
|
|
|
732a263 |
- self.downButton = self.toolbar.insert_stock (
|
|
|
732a263 |
- "gtk-go-down", _("Move selected item down"),
|
|
|
732a263 |
- "priv", self.configTree.moveDown, None, -1)
|
|
|
732a263 |
- self.propertiesButton = self.toolbar.insert_stock (
|
|
|
732a263 |
- "gtk-properties", _("Properties of selected device or application"),
|
|
|
732a263 |
- "priv", self.configTree.properties, None, -1)
|
|
|
732a263 |
- self.toolbar.append_space()
|
|
|
732a263 |
+
|
|
|
732a263 |
+ self.saveButton = gtk.ToolButton("gtk-save")
|
|
|
732a263 |
+ self.saveButton.set_tooltip_text(_("Save selected configuration file"))
|
|
|
732a263 |
+ self.saveButton.connect("clicked", self.configTree.saveConfig)
|
|
|
732a263 |
+ self.saveButton.show()
|
|
|
732a263 |
+ self.toolbar.insert(self.saveButton, -1)
|
|
|
732a263 |
+ self.reloadButton = gtk.ToolButton("gtk-revert-to-saved")
|
|
|
732a263 |
+ self.reloadButton.set_tooltip_text(_("Reload selected configuration file"))
|
|
|
732a263 |
+ self.reloadButton.connect("clicked", self.configTree.reloadConfig)
|
|
|
732a263 |
+ self.reloadButton.show()
|
|
|
732a263 |
+ self.toolbar.insert(self.reloadButton, -1)
|
|
|
732a263 |
+
|
|
|
732a263 |
+ separator = gtk.SeparatorToolItem()
|
|
|
732a263 |
+ separator.show()
|
|
|
732a263 |
+ self.toolbar.insert(separator, -1)
|
|
|
732a263 |
+
|
|
|
732a263 |
+ self.newButton = gtk.ToolButton("gtk-new")
|
|
|
732a263 |
+ self.newButton.set_tooltip_text(_("Create a new device or application"))
|
|
|
732a263 |
+ self.newButton.connect("clicked", self.configTree.newItem)
|
|
|
732a263 |
+ self.newButton.show()
|
|
|
732a263 |
+ self.toolbar.insert(self.newButton, -1)
|
|
|
732a263 |
+ self.removeButton = gtk.ToolButton("gtk-delete")
|
|
|
732a263 |
+ self.removeButton.set_tooltip_text(_("Remove selected device or application"))
|
|
|
732a263 |
+ self.removeButton.connect("clicked", self.configTree.removeItem)
|
|
|
732a263 |
+ self.removeButton.show()
|
|
|
732a263 |
+ self.toolbar.insert(self.removeButton, -1)
|
|
|
732a263 |
+ self.upButton = gtk.ToolButton("gtk-go-up")
|
|
|
732a263 |
+ self.upButton.set_tooltip_text(_("Move selected item up"))
|
|
|
732a263 |
+ self.upButton.connect("clicked", self.configTree.moveUp)
|
|
|
732a263 |
+ self.upButton.show()
|
|
|
732a263 |
+ self.toolbar.insert(self.upButton, -1)
|
|
|
732a263 |
+ self.downButton = gtk.ToolButton("gtk-go-down")
|
|
|
732a263 |
+ self.downButton.set_tooltip_text(_("Move selected item down"))
|
|
|
732a263 |
+ self.downButton.connect("clicked", self.configTree.moveDown)
|
|
|
732a263 |
+ self.downButton.show()
|
|
|
732a263 |
+ self.toolbar.insert(self.downButton, -1)
|
|
|
732a263 |
+ self.propertiesButton = gtk.ToolButton("gtk-properties")
|
|
|
732a263 |
+ self.propertiesButton.set_tooltip_text(_("Properties of selected device or application"))
|
|
|
732a263 |
+ self.propertiesButton.connect("clicked", self.configTree.properties)
|
|
|
732a263 |
+ self.propertiesButton.show()
|
|
|
732a263 |
+ self.toolbar.insert(self.propertiesButton, -1)
|
|
|
732a263 |
+
|
|
|
732a263 |
+ separator = gtk.SeparatorToolItem()
|
|
|
732a263 |
+ separator.show()
|
|
|
732a263 |
+ self.toolbar.insert(separator, -1)
|
|
|
732a263 |
+
|
|
|
732a263 |
# The gtk-about stock item is available with gtk >= 2.6.
|
|
|
732a263 |
# It's definitely not available with gtk 2.2. Not sure about 2.4.
|
|
|
732a263 |
if gtk.gtk_version[0] == 2 and gtk.gtk_version[1] < 6:
|
|
|
732a263 |
aboutStock = "gtk-dialog-info"
|
|
|
732a263 |
else:
|
|
|
732a263 |
aboutStock = "gtk-about"
|
|
|
732a263 |
- self.aboutButton = self.toolbar.insert_stock (
|
|
|
732a263 |
- aboutStock, _("About DRIconf"), "priv",
|
|
|
732a263 |
- self.aboutHandler, None, -1)
|
|
|
732a263 |
- self.toolbar.append_space()
|
|
|
732a263 |
- self.exitButton = self.toolbar.insert_stock (
|
|
|
732a263 |
- "gtk-quit", _("Exit DRIconf"), "priv",
|
|
|
732a263 |
- self.exitHandler, None, -1)
|
|
|
732a263 |
+ self.aboutButton = gtk.ToolButton(aboutStock)
|
|
|
732a263 |
+ self.aboutButton.set_tooltip_text(_("About DRIconf"))
|
|
|
732a263 |
+ self.aboutButton.connect("clicked", self.aboutHandler)
|
|
|
732a263 |
+ self.aboutButton.show()
|
|
|
732a263 |
+ self.toolbar.insert(self.aboutButton, -1)
|
|
|
732a263 |
+
|
|
|
732a263 |
+ separator = gtk.SeparatorToolItem()
|
|
|
732a263 |
+ separator.show()
|
|
|
732a263 |
+ self.toolbar.insert(separator, -1)
|
|
|
732a263 |
+
|
|
|
732a263 |
+ self.exitButton = gtk.ToolButton("gtk-quit")
|
|
|
732a263 |
+ self.exitButton.set_tooltip_text(_("Exit DRIconf"))
|
|
|
732a263 |
+ self.exitButton.connect("clicked", self.exitHandler)
|
|
|
732a263 |
+ self.exitButton.show()
|
|
|
732a263 |
+ self.toolbar.insert(self.exitButton, -1)
|
|
|
732a263 |
if len(configList) != 0:
|
|
|
732a263 |
self.activateConfigButtons (configList[0])
|
|
|
732a263 |
self.toolbar.show()
|