Skip to content

Commit

Permalink
Remove remote removal with apps feature
Browse files Browse the repository at this point in the history
Remove the feature that was planned to allow apps to be removed when the remote was removed
  • Loading branch information
heliguy4599 committed Sep 22, 2023
1 parent a5cacfc commit 75490a3
Showing 1 changed file with 1 addition and 32 deletions.
33 changes: 1 addition & 32 deletions src/remotes.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,6 @@ def remove_on_response(self, _dialog, response_id, _function, index):
self.generate_list()

def remove_handler(self, _widget, index):
def remove_apps_check_handler(button):
if button.get_active():
apps_box.prepend(apps_scroll)
apps_box.prepend(label)
else:
apps_box.remove(label)
apps_box.remove(apps_scroll)
name = self.host_remotes[index][0]
title = self.host_remotes[index][1]
install_type = self.host_remotes[index][7]
Expand All @@ -166,30 +159,6 @@ def remove_apps_check_handler(button):
dialog.add_response("continue", _("Remove"))
dialog.set_response_appearance("continue", Adw.ResponseAppearance.DESTRUCTIVE)
dialog.connect("response", self.remove_on_response, dialog.choose_finish, index)

label = Gtk.Label(label=_("These apps will be uninstalled"))
remove_apps = Gtk.CheckButton(label=_("Uninstall apps from this remote"))
remove_apps.connect("toggled", remove_apps_check_handler)

height = 400
apps_box = Gtk.Box(orientation="vertical")
apps_scroll = Gtk.ScrolledWindow(vexpand=True, min_content_height=height, margin_top=6, margin_bottom=6)
apps_list = Gtk.ListBox(selection_mode="none", valign="start")
apps_list.add_css_class("boxed-list")
apps_box.append(remove_apps)
#apps_box.append(apps_scroll)

for i in range(len(self.host_flatpaks)):
if self.host_flatpaks[i][6] != name:
continue
if self.host_flatpaks[i][7] != install_type:
continue

app_row = Adw.ActionRow(title=self.host_flatpaks[i][0])
apps_list.append(app_row)

apps_scroll.set_child(apps_list)
dialog.set_extra_child(apps_box)
dialog.present()

def generate_list(self):
Expand Down Expand Up @@ -220,9 +189,9 @@ def generate_list(self):

def __init__(self, main_window, **kwargs):
super().__init__(**kwargs)
self.my_utils = myUtils(self)

# Create Variables
self.my_utils = myUtils(self)
self.window_title = _("Manage Remotes")
self.host_remotes = []
self.host_flatpaks = []
Expand Down

0 comments on commit 75490a3

Please sign in to comment.