Skip to content

Commit

Permalink
Merge pull request #69 from turtlegarden/status-pages
Browse files Browse the repository at this point in the history
Status pages for Search and backend improvements. Thank you so much for the work done on this!
  • Loading branch information
heliguy4599 authored Nov 13, 2023
2 parents d43adae + 7ea809c commit 173fed7
Show file tree
Hide file tree
Showing 25 changed files with 981 additions and 641 deletions.
1 change: 1 addition & 0 deletions io.github.flattool.Warehouse.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"name" : "warehouse",
"builddir" : true,
"buildsystem" : "meson",
"config-opts": [ "-Dprofile=development" ],
"sources" : [
{
"type" : "dir",
Expand Down
4 changes: 1 addition & 3 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
project('warehouse',
version: '1.3.1.beta',
version: '1.3.1',
meson_version: '>= 0.62.0',
default_options: [ 'warning_level=2', 'werror=false', ],
)

i18n = import('i18n')
gnome = import('gnome')



subdir('data')
subdir('src')
subdir('po')
Expand Down
9 changes: 9 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
option(
'profile',
type: 'combo',
choices: [
'default',
'development'
],
value: 'default'
)
2 changes: 0 additions & 2 deletions src/brush-symbolic.svg

This file was deleted.

13 changes: 8 additions & 5 deletions src/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,17 @@ def getHostFlatpaks(self):
sorted_array = sorted(data, key=lambda item: item[0].lower())
return sorted_array

def getDependantRuntimes(self):
def getDependentRuntimes(self):
paks = self.getHostFlatpaks()
dependant_runtimes = []
dependent_runtimes = []
for i in range(len(paks)):
current = paks[i]
if current[13] not in dependant_runtimes and current[13] != "":
dependant_runtimes.append(current[13])
return(dependant_runtimes)
try:
if current[13] not in dependent_runtimes and current[13] != "":
dependent_runtimes.append(current[13])
except:
print("Could not get dependent runtime")
return(dependent_runtimes)

def getHostMasks(self, user_or_system):
output = subprocess.run(["flatpak-spawn", "--host", "flatpak", "mask", f"--{user_or_system}"], capture_output=True, text=True, env=self.new_env).stdout
Expand Down
8 changes: 8 additions & 0 deletions src/const.py.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!@PYTHON@
# SPDX-License-Identifier: GPL-3.0-or-later

class Config:
DEVEL = '@DEVEL@' == 'Development'
PROFILE = '@DEVEL@'
APP_ID = '@APPID@'
VERSION = '@VERSION@'
102 changes: 54 additions & 48 deletions src/downgrade.blp
Original file line number Diff line number Diff line change
@@ -1,54 +1,60 @@
using Gtk 4.0;
using Adw 1;

template DowngradeWindow : Adw.Window {
default-width: 500;
default-height: 450;
modal: true;

Adw.ToolbarView main_toolbar_view {
[top]
HeaderBar header_bar {
show-title-buttons: false;

[start]
Button cancel_button {
label: _("Cancel");
template DowngradeWindow: Adw.Window {
default-width: 500;
default-height: 450;
modal: true;

Adw.ToolbarView main_toolbar_view {
[top]
HeaderBar header_bar {
show-title-buttons: false;

[start]
Button cancel_button {
label: _("Cancel");
}

[end]
Button apply_button {
sensitive: false;
label: _("Downgrade");

styles [
"suggested-action"
]
}
}

content: Adw.ToastOverlay toast_overlay {
Stack main_stack {
Overlay main_overlay {
[overlay]
ProgressBar progress_bar {
pulse-step: 0.7;
can-target: false;

styles [
"osd"
]
}

Adw.PreferencesPage outerbox {
Adw.PreferencesGroup {
Adw.SwitchRow mask_row {
title: _("Disable Updates");
active: true;
}
}
[end]
Button apply_button {
sensitive: false;
label: _("Downgrade");
styles["suggested-action"]

Adw.PreferencesGroup versions_group {
title: _("Select a Release");
description: _("This will uninstall the current release and install the chosen one instead. Note that downgrading can cause issues.");
}
}
}
content:
Adw.ToastOverlay toast_overlay {
Stack main_stack {
Overlay main_overlay {
[overlay]
ProgressBar progress_bar {
pulse-step: 0.7;
can-target: false;
styles["osd"]
}

Adw.PreferencesPage outerbox {

Adw.PreferencesGroup {
Adw.SwitchRow mask_row {
title: _("Disable Updates");
active: true;
}
}

Adw.PreferencesGroup versions_group {
title: _("Select a Release");
description: _("This will uninstall the current release and install the chosen one instead. Note that downgrading can cause issues.");
}
}
}
}
};
}
}
}
};
}
}
172 changes: 92 additions & 80 deletions src/filter.blp
Original file line number Diff line number Diff line change
@@ -1,86 +1,98 @@
using Gtk 4.0;
using Adw 1;

template FilterWindow : Adw.Window {
default-width: 500;
default-height: 450;
title: _("Set Filters");
modal: true;

Adw.ToolbarView main_toolbar_view {
[top]
HeaderBar header_bar {
show-title-buttons: false;

[start]
Button cancel_button {
label: _("Cancel");
}
[end]
Button apply_button {
label: _("Apply");
styles["suggested-action"]
}
}
content:
Adw.ToastOverlay toast_overlay {
Stack main_stack {
Overlay main_overlay {
ScrolledWindow scrolled_window {
vexpand: true;
Adw.Clamp{
Box outerbox {
orientation: vertical;

ListBox install_type_list {
margin-top: 12;
margin-bottom: 12;
margin-start: 12;
margin-end: 12;
hexpand: true;
valign: start;
selection-mode: none;
styles["boxed-list"]

Adw.ActionRow apps_row {
title: _("Show Apps");

Switch apps_switch {
valign: center;
}

activatable-widget: apps_switch;
}
Adw.ActionRow runtimes_row {
title: _("Show Runtimes");

Switch runtimes_switch {
valign: center;
}

activatable-widget: runtimes_switch;
}
Adw.ExpanderRow remotes_expander {
enable-expansion: false;
title: _("Filter Apps by Remotes");
}
Adw.ExpanderRow runtimes_expander {
enable-expansion: false;
title: _("Filter Apps by Runtime");
}
}
// Button remove_filters_button {
// visible: false;
// margin-bottom: 18;
// halign: center;
// label: _("Clear Filters");
// styles ["pill"]
// }
}
}
template FilterWindow: Adw.Window {
default-width: 500;
default-height: 450;
title: _("Set Filters");
modal: true;

Adw.ToolbarView main_toolbar_view {
[top]
HeaderBar header_bar {
show-title-buttons: false;

[start]
Button cancel_button {
label: _("Cancel");
}

[end]
Button apply_button {
label: _("Apply");

styles [
"suggested-action"
]
}
}

content: Adw.ToastOverlay toast_overlay {
Stack main_stack {
Overlay main_overlay {
ScrolledWindow scrolled_window {
vexpand: true;

Adw.Clamp {
Box outerbox {
orientation: vertical;

ListBox install_type_list {
margin-top: 12;
margin-bottom: 12;
margin-start: 12;
margin-end: 12;
hexpand: true;
valign: start;
selection-mode: none;

styles [
"boxed-list"
]

Adw.ActionRow apps_row {
title: _("Show Apps");

Switch apps_switch {
valign: center;
}

activatable-widget: apps_switch;
}

Adw.ActionRow runtimes_row {
title: _("Show Runtimes");

Switch runtimes_switch {
valign: center;
}

activatable-widget: runtimes_switch;
}

Adw.ExpanderRow remotes_expander {
enable-expansion: false;
title: _("Filter Apps by Remotes");
}

Adw.ExpanderRow runtimes_expander {
enable-expansion: false;
title: _("Filter Apps by Runtime");
}
}

// Button remove_filters_button {
// visible: false;
// margin-bottom: 18;
// halign: center;
// label: _("Clear Filters");
// styles ["pill"]
// }
}
}
};
}
}
}
}
}
};
}
}
Loading

0 comments on commit 173fed7

Please sign in to comment.