Skip to content

Commit

Permalink
Only one button visible at a time (install or remove)
Browse files Browse the repository at this point in the history
  • Loading branch information
Clement Lefebvre committed Sep 19, 2009
1 parent a6b05bd commit 1aa67d6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions usr/lib/linuxmint/mintInstall/frontend.glade
Expand Up @@ -235,12 +235,12 @@
</child>
<child>
<widget class="GtkButton" id="button_install">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<child>
<widget class="GtkHBox" id="hbox3">
<property name="visible">True</property>
<property name="spacing">2</property>
<child>
<widget class="GtkImage" id="image2">
<property name="visible">True</property>
Expand Down Expand Up @@ -270,12 +270,12 @@
</child>
<child>
<widget class="GtkButton" id="button_remove">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<child>
<widget class="GtkHBox" id="hbox5">
<property name="visible">True</property>
<property name="spacing">2</property>
<child>
<widget class="GtkImage" id="image6">
<property name="visible">True</property>
Expand Down Expand Up @@ -311,6 +311,7 @@
<child>
<widget class="GtkHBox" id="hbox4">
<property name="visible">True</property>
<property name="spacing">2</property>
<child>
<widget class="GtkImage" id="image5">
<property name="visible">True</property>
Expand Down Expand Up @@ -346,6 +347,7 @@
<child>
<widget class="GtkHBox" id="hbox10">
<property name="visible">True</property>
<property name="spacing">2</property>
<child>
<widget class="GtkImage" id="image1">
<property name="visible">True</property>
Expand Down
8 changes: 4 additions & 4 deletions usr/lib/linuxmint/mintInstall/frontend.py
Expand Up @@ -47,8 +47,8 @@ def close_window(widget, window):
def show_item(selection, model, wTree, username):
(model_applications, iter) = selection.get_selected()
if (iter != None):
wTree.get_widget("button_install").set_sensitive(False)
wTree.get_widget("button_remove").set_sensitive(False)
wTree.get_widget("button_install").hide()
wTree.get_widget("button_remove").hide()
wTree.get_widget("label_install").set_text(_("Install"))
wTree.get_widget("label_install").set_tooltip_text("")
wTree.get_widget("label_remove").set_text(_("Remove"))
Expand Down Expand Up @@ -676,11 +676,11 @@ def run(self):
short_version = version

if (installed):
self.wTree.get_widget("button_remove").set_sensitive(True)
self.wTree.get_widget("button_remove").show()
self.wTree.get_widget("label_remove").set_text(_("Remove %s") % ("v" + str(short_version)))
self.wTree.get_widget("label_remove").set_tooltip_text(_("Remove %s") % ("v" + str(version)))
else:
self.wTree.get_widget("button_install").set_sensitive(True)
self.wTree.get_widget("button_install").show()
self.wTree.get_widget("label_install").set_text(_("Install %s") % ("v" + str(short_version)))
self.wTree.get_widget("label_install").set_tooltip_text(_("Install %s") % ("v" + str(version)))

Expand Down

0 comments on commit 1aa67d6

Please sign in to comment.