cosmetic
parent
273a5f926a
commit
7331a50eed
|
@ -67,12 +67,13 @@ class Browser(Gtk.Box):
|
|||
title_image = Gtk.Image()
|
||||
title_image.set_size_request(100, 100)
|
||||
title_image.set_from_file("/usr/share/icons/manjaro/maia/96x96.png")
|
||||
self.title_label = Gtk.Label()
|
||||
self.title_label.set_markup("<big>Manjaro Application Maintenance</big>\n"
|
||||
"Select/Deselect apps you want to install/remove.\n"
|
||||
"Click <b>UPDATE SYSTEM</b> button when ready.")
|
||||
self.title_box.pack_start(title_image, expand=False, fill=False, padding=0)
|
||||
self.title_box.pack_start(self.title_label, expand=True, fill=True, padding=0)
|
||||
|
||||
self.title_label = Gtk.Label()
|
||||
self.title_label.set_markup("<big>Manjaro Application Maintenance</big>\n"
|
||||
"Select/Deselect apps you want to install/remove.\n"
|
||||
"Click <b>UPDATE SYSTEM</b> button when ready.")
|
||||
# self.title_box.pack_start(title_image, expand=False, fill=False, padding=0)
|
||||
self.title_box.pack_start(self.title_label, expand=True, fill=True, padding=0)
|
||||
|
||||
# pack title box to main box
|
||||
self.application_box.pack_start(self.title_box, expand=False, fill=False, padding=0)
|
||||
|
@ -81,7 +82,7 @@ class Browser(Gtk.Box):
|
|||
self.button_box = Gtk.Box(spacing=10)
|
||||
advanced_button = Gtk.ToggleButton(label="Advanced")
|
||||
advanced_button.set_tooltip_text("Toggle an extended selection of packages...")
|
||||
advanced_button.connect("clicked", self.on_expert_clicked)
|
||||
advanced_button.connect("clicked", self.on_advanced_clicked)
|
||||
download_button = Gtk.Button(label="download")
|
||||
download_button.set_tooltip_text("Download the most recent selection of packages...")
|
||||
download_button.connect("clicked", self.on_download_clicked)
|
||||
|
@ -251,7 +252,7 @@ class Browser(Gtk.Box):
|
|||
|
||||
def set_title_box(self, html: str, color: Gtk.MessageType = Gtk.MessageType.INFO):
|
||||
if isinstance(self.config, HelloConfig):
|
||||
# self.title_box.set_message_type(color)
|
||||
self.title_box.set_message_type(color)
|
||||
self.title_label.set_markup("<big>Manjaro Application Maintenance</big>\n" + html)
|
||||
self.title_label.set_markup(html)
|
||||
self.title_box.show()
|
||||
|
@ -347,7 +348,7 @@ class Browser(Gtk.Box):
|
|||
if self.config.group != "All":
|
||||
self.tree_view.expand_all()
|
||||
|
||||
def on_expert_clicked(self, widget):
|
||||
def on_advanced_clicked(self, widget):
|
||||
"""set one filter on/off on view"""
|
||||
if widget.get_active():
|
||||
self.config.filter = "advanced"
|
||||
|
@ -379,12 +380,12 @@ class Browser(Gtk.Box):
|
|||
|
||||
def on_query_tooltip_tree_view(self, widget: Gtk.TreeView, x, y, keyboard_tip: bool, tooltip):
|
||||
"""Show tooltip only if installed"""
|
||||
is_found, x, y, model, path, itera = widget.get_tooltip_context(x, y, keyboard_tip)
|
||||
is_found, x, y, model, path, iter_a = widget.get_tooltip_context(x, y, keyboard_tip)
|
||||
if is_found:
|
||||
value = model.get(itera, INSTALLED)
|
||||
value = model.get(iter_a, INSTALLED)
|
||||
if value[0]:
|
||||
msg = "Installed"
|
||||
active = model.get(itera, ACTIVE)
|
||||
active = model.get(iter_a, ACTIVE)
|
||||
if not active[0]:
|
||||
msg = msg + " , to remove"
|
||||
tooltip.set_markup(msg)
|
||||
|
|
Loading…
Reference in New Issue