diff options
author | Necoro <> | 2007-10-15 19:40:10 +0000 |
---|---|---|
committer | Necoro <> | 2007-10-15 19:40:10 +0000 |
commit | 14becdcb2d4c40becb3eb263aa3ff793d8aff3c9 (patch) | |
tree | a424028e4ec0b01162c236bd9aecb70e92fdd246 /portato/gui | |
parent | fe2547bc8e7698846aa1894760f499a49b36adc9 (diff) | |
download | portato-14becdcb2d4c40becb3eb263aa3ff793d8aff3c9.tar.gz portato-14becdcb2d4c40becb3eb263aa3ff793d8aff3c9.tar.bz2 portato-14becdcb2d4c40becb3eb263aa3ff793d8aff3c9.zip |
added tooltips, added ebuild.lang, restructured constants
Diffstat (limited to 'portato/gui')
-rw-r--r-- | portato/gui/gtk/basic.py | 4 | ||||
-rw-r--r-- | portato/gui/gtk/windows.py | 7 | ||||
-rw-r--r-- | portato/gui/templates/portato.glade | 150 |
3 files changed, 143 insertions, 18 deletions
diff --git a/portato/gui/gtk/basic.py b/portato/gui/gtk/basic.py index 3737607..02caaf5 100644 --- a/portato/gui/gtk/basic.py +++ b/portato/gui/gtk/basic.py @@ -19,11 +19,11 @@ import gobject from functools import wraps -from ...constants import DATA_DIR, APP_ICON, APP, LOCALE_DIR +from ...constants import TEMPLATE_DIR, APP_ICON, APP, LOCALE_DIR gtk.glade.bindtextdomain (APP, LOCALE_DIR) gtk.glade.textdomain (APP) -GLADE_FILE = DATA_DIR+"portato.glade" +GLADE_FILE = TEMPLATE_DIR+"portato.glade" class Window (object): def __init__ (self): diff --git a/portato/gui/gtk/windows.py b/portato/gui/gtk/windows.py index dc3dc35..456d962 100644 --- a/portato/gui/gtk/windows.py +++ b/portato/gui/gtk/windows.py @@ -28,7 +28,7 @@ from gettext import lgettext as _ # our backend stuff from ... import listener, plugin from ...helper import debug, warning, error, unique_array -from ...constants import CONFIG_LOCATION, VERSION, APP_ICON +from ...constants import CONFIG_LOCATION, VERSION, APP_ICON, DATA_DIR from ...backend import flags, system from ...backend.exceptions import PackageNotFoundException, BlockedException @@ -390,10 +390,11 @@ class EbuildWindow (AbstractDialog): self.view = gtk.TextView(self.buf) else: man = gtksourceview2.LanguageManager() + man.set_search_path(man.get_search_path()+[DATA_DIR]) language = man.get_language("ebuild") if language is None: - info(_("No ebuild language file installed. Falling back to shell.")) + warning(_("No ebuild language file installed. Falling back to shell.")) language = man.get_language("sh") # set buffer and view @@ -713,10 +714,8 @@ class PackageTable: if self.doEmerge: # set emerge-button-label if not self.actual_package().is_installed(): - self.emergeBtn.set_label(_("E_merge")) self.unmergeBtn.set_sensitive(False) else: - self.emergeBtn.set_label(_("Re_merge")) self.unmergeBtn.set_sensitive(True) self.table.show_all() diff --git a/portato/gui/templates/portato.glade b/portato/gui/templates/portato.glade index 76d437c..a42bc25 100644 --- a/portato/gui/templates/portato.glade +++ b/portato/gui/templates/portato.glade @@ -93,7 +93,7 @@ <widget class="GtkImage" id="menu-item-image9"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK</property> - <property name="stock">gtk-go-forward</property> + <property name="stock">gtk-add</property> </widget> </child> </widget> @@ -107,7 +107,7 @@ <widget class="GtkImage" id="menu-item-image10"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK</property> - <property name="stock">gtk-go-back</property> + <property name="stock">gtk-remove</property> </widget> </child> </widget> @@ -513,19 +513,69 @@ <child> <widget class="GtkButton" id="pkgEmergeBtn"> <property name="visible">True</property> - <property name="label" translatable="yes">E_merge</property> - <property name="use_underline">True</property> + <property name="tooltip" translatable="yes">Mark package for installation</property> <property name="response_id">0</property> <signal name="clicked" handler="cb_package_emerge_clicked"/> + <child> + <widget class="GtkHBox" id="hbox4"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <child> + <widget class="GtkImage" id="image3"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="stock">gtk-add</property> + </widget> + </child> + <child> + <widget class="GtkLabel" id="emergeBtnLabel"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Add to E_merge Queue</property> + <property name="use_underline">True</property> + <property name="single_line_mode">True</property> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + </widget> + </child> </widget> </child> <child> <widget class="GtkButton" id="pkgUnmergeBtn"> <property name="visible">True</property> - <property name="label" translatable="yes">_Unmerge</property> - <property name="use_underline">True</property> + <property name="tooltip" translatable="yes">Mark package for deinstallation</property> <property name="response_id">0</property> <signal name="clicked" handler="cb_package_unmerge_clicked"/> + <child> + <widget class="GtkHBox" id="hbox5"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <child> + <widget class="GtkImage" id="image4"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="stock">gtk-remove</property> + </widget> + </child> + <child> + <widget class="GtkLabel" id="label9"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Add to _Unmerge Queue</property> + <property name="use_underline">True</property> + <property name="single_line_mode">True</property> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + </widget> + </child> </widget> <packing> <property name="position">1</property> @@ -534,10 +584,33 @@ <child> <widget class="GtkButton" id="pkgRevertBtn"> <property name="visible">True</property> - <property name="label" translatable="yes">Re_vert</property> - <property name="use_underline">True</property> <property name="response_id">0</property> <signal name="clicked" handler="cb_package_revert_clicked"/> + <child> + <widget class="GtkHBox" id="hbox6"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <child> + <widget class="GtkImage" id="image5"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="stock">gtk-undo</property> + </widget> + </child> + <child> + <widget class="GtkLabel" id="label8"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Re_vert</property> + <property name="use_underline">True</property> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + </widget> + </child> </widget> <packing> <property name="position">2</property> @@ -546,6 +619,7 @@ <child> <widget class="GtkButton" id="pkgEbuildBtn"> <property name="visible">True</property> + <property name="tooltip" translatable="yes">Show the ebuild for this package</property> <property name="label" translatable="yes">E_build</property> <property name="use_underline">True</property> <property name="response_id">0</property> @@ -718,19 +792,69 @@ <child> <widget class="GtkButton" id="emergeBtn"> <property name="visible">True</property> - <property name="label" translatable="yes">E_merge</property> - <property name="use_underline">True</property> + <property name="tooltip" translatable="yes">Install all packages in the "Emerge Queue"</property> <property name="response_id">0</property> <signal name="clicked" handler="cb_emerge_clicked"/> + <child> + <widget class="GtkHBox" id="hbox7"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <child> + <widget class="GtkImage" id="image6"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="stock">gtk-add</property> + </widget> + </child> + <child> + <widget class="GtkLabel" id="label12"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">E_merge</property> + <property name="use_underline">True</property> + <property name="single_line_mode">True</property> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + </widget> + </child> </widget> </child> <child> <widget class="GtkButton" id="unmergeBtn"> <property name="visible">True</property> - <property name="label" translatable="yes">_Unmerge</property> - <property name="use_underline">True</property> + <property name="tooltip" translatable="yes">Deinstall all packages in the "Unmerge Queue"</property> <property name="response_id">0</property> <signal name="clicked" handler="cb_unmerge_clicked"/> + <child> + <widget class="GtkHBox" id="hbox8"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <child> + <widget class="GtkImage" id="image7"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="stock">gtk-remove</property> + </widget> + </child> + <child> + <widget class="GtkLabel" id="label13"> + <property name="visible">True</property> + <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_Unmerge</property> + <property name="use_underline">True</property> + <property name="single_line_mode">True</property> + </widget> + <packing> + <property name="position">1</property> + </packing> + </child> + </widget> + </child> </widget> <packing> <property name="position">1</property> @@ -739,6 +863,7 @@ <child> <widget class="GtkButton" id="updateBtn"> <property name="visible">True</property> + <property name="tooltip" translatable="yes">Calculate the packages which will be installed during an "update world"</property> <property name="label" translatable="yes">Update _World</property> <property name="use_underline">True</property> <property name="response_id">0</property> @@ -751,6 +876,7 @@ <child> <widget class="GtkButton" id="removeBtn"> <property name="visible">True</property> + <property name="tooltip" translatable="yes">Remove the selected package from the queue</property> <property name="label" translatable="yes">_Remove</property> <property name="use_underline">True</property> <property name="response_id">0</property> |