Skip to content

Commit

Permalink
notebook: Name the first tab the same for all update types
Browse files Browse the repository at this point in the history
There's no need to call it Description for APT and Information for
Flatpak... call it Information all the time.

Also, don't set its label dynamically.

Probably fixes linuxmint/mint22-beta#182
  • Loading branch information
clefebvre committed Jul 18, 2024
1 parent 9425c82 commit f31d1e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
7 changes: 0 additions & 7 deletions usr/lib/linuxmint/mintUpdate/mintUpdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2018,12 +2018,9 @@ def display_selected_update(self, selection):
desc = "%s\n\n%s: %s" % (description, latest_change_str, update.commit_msg)

self.textview_description.set_text(desc)

self.notebook_details.get_nth_page(TAB_PACKAGES).hide()
self.notebook_details.get_nth_page(TAB_CHANGELOG).hide()

self.notebook_details.set_current_page(TAB_DESC)
self.notebook_details.set_tab_label_text(desc_tab, _("Information"))
elif update.type == "flatpak":
if update.link is not None:
website_label_str = _("Website: %s") % update.link
Expand All @@ -2032,18 +2029,14 @@ def display_selected_update(self, selection):
description = "%s" % update.description

self.textview_description.set_text(description)

self.notebook_details.get_nth_page(TAB_PACKAGES).show()
self.notebook_details.get_nth_page(TAB_CHANGELOG).hide()

self.notebook_details.set_current_page(TAB_DESC)
self.notebook_details.set_tab_label_text(desc_tab, _("Information"))
self.display_package_list(update, is_flatpak=True)
else:
self.textview_description.set_text(description)
self.notebook_details.get_nth_page(TAB_PACKAGES).show()
self.notebook_details.get_nth_page(TAB_CHANGELOG).show()
self.notebook_details.set_tab_label_text(desc_tab, _("Description"))
self.display_package_list(update)

if self.notebook_details.get_current_page() == 2:
Expand Down
8 changes: 4 additions & 4 deletions usr/share/linuxmint/mintupdate/main.ui
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 +412,10 @@
</object>
</child>
<child type="tab">
<object class="GtkLabel" id="l_description">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Description</property>
<property name="label" translatable="yes">Information</property>
</object>
<packing>
<property name="tab-fill">False</property>
Expand Down Expand Up @@ -447,7 +447,7 @@
</packing>
</child>
<child type="tab">
<object class="GtkLabel" id="l_packages">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Packages</property>
Expand Down Expand Up @@ -480,7 +480,7 @@
</packing>
</child>
<child type="tab">
<object class="GtkLabel" id="l_changelog">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Changelog</property>
Expand Down

0 comments on commit f31d1e4

Please sign in to comment.