Merge branch 'main' into main

main
Mateus B. Melchiades 2 years ago committed by GitHub
commit 022212049f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1 +1 @@
1.5.9 1.6.0

8
debian/changelog vendored

@ -1,4 +1,10 @@
vanilla-first-setup (1.5.9) kinetic; urgency=critical vanilla-first-setup (1.6.0) kinetic; urgency=critical
* Skip applications view with no pkg manager selected
-- Mirko Brombin <send@mirko.pm> Thu, 29 Dec 2022 16:29:00 +0000
vanilla-first-setup (1.5.9) kinetic; urgency=critical
* Fix reboot button not being hidden * Fix reboot button not being hidden
* Add open-vm-tools-desktop to recipe.json * Add open-vm-tools-desktop to recipe.json

@ -81,6 +81,13 @@
"title": "AppImage", "title": "AppImage",
"subtitle": "Install necessary dependencies to run AppImages.", "subtitle": "Install necessary dependencies to run AppImages.",
"default": true "default": true
},
{
"id": "-",
"title": "-",
"subtitle": "-",
"disabled": true,
"default": true
} }
], ],
"final": [ "final": [

@ -38,6 +38,7 @@ class VanillaLayoutApplications(Adw.Bin):
# signals # signals
self.btn_next.connect("clicked", self.__next_step) self.btn_next.connect("clicked", self.__next_step)
self.__window.connect("page-changed", self.__on_page_changed)
@property @property
def step_id(self): def step_id(self):
@ -153,7 +154,17 @@ class VanillaLayoutApplications(Adw.Bin):
self.__register_widgets.append((item["id"], _switcher, _index)) self.__register_widgets.append((item["id"], _switcher, _index))
_index += 1 _index += 1
def __next_step(self, widget): def __on_page_changed(self, widget, page):
if page == self.__key:
if True not in [
self.__window.builder.get_temp_finals("packages")["vars"]["flatpak"],
self.__window.builder.get_temp_finals("packages")["vars"]["snap"]
]:
self.bundles_list.set_sensitive(False)
else:
self.bundles_list.set_sensitive(True)
def __next_step(self, *args):
self.__window.next() self.__window.next()
def get_finals(self): def get_finals(self):

@ -111,6 +111,7 @@ class Processor:
# fake the process if VANILLA_FAKE is set # fake the process if VANILLA_FAKE is set
if "VANILLA_FAKE" in os.environ: if "VANILLA_FAKE" in os.environ:
logger.info("VANILLA_FAKE is set, skipping the commands")
return True, "" return True, ""
cmd = ["pkexec", "sh", f.name] cmd = ["pkexec", "sh", f.name]

@ -15,7 +15,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import time import time
from gi.repository import Gtk, Adw import contextlib
from gi.repository import Gtk, GObject, Adw
from vanilla_first_setup.utils.builder import Builder from vanilla_first_setup.utils.builder import Builder
from vanilla_first_setup.utils.parser import Parser from vanilla_first_setup.utils.parser import Parser
@ -30,6 +31,9 @@ from vanilla_first_setup.views.post_script import VanillaPostScript
@Gtk.Template(resource_path='/io/github/vanilla-os/FirstSetup/gtk/window.ui') @Gtk.Template(resource_path='/io/github/vanilla-os/FirstSetup/gtk/window.ui')
class VanillaWindow(Adw.ApplicationWindow): class VanillaWindow(Adw.ApplicationWindow):
__gtype_name__ = 'VanillaWindow' __gtype_name__ = 'VanillaWindow'
__gsignals__ = {
"page-changed": (GObject.SignalFlags.RUN_FIRST, None, (str,)),
}
carousel = Gtk.Template.Child() carousel = Gtk.Template.Child()
carousel_indicator_dots = Gtk.Template.Child() carousel_indicator_dots = Gtk.Template.Child()
@ -108,6 +112,7 @@ class VanillaWindow(Adw.ApplicationWindow):
self.carousel.append(self.__view_done) self.carousel.append(self.__view_done)
def __on_page_changed(self, *args): def __on_page_changed(self, *args):
def process(): def process():
# this parses the finals to compatible commands, by replacing the # this parses the finals to compatible commands, by replacing the
# placeholders with the actual values and generating shell commands # placeholders with the actual values and generating shell commands
@ -132,6 +137,11 @@ class VanillaWindow(Adw.ApplicationWindow):
cur_index = self.carousel.get_position() cur_index = self.carousel.get_position()
page = self.carousel.get_nth_page(cur_index) page = self.carousel.get_nth_page(cur_index)
with contextlib.suppress(AttributeError):
self.emit("page-changed", page.step_id)
print("Page changed to", cur_index, page)
if page not in pages_check: if page not in pages_check:
self.btn_back.set_visible(cur_index != 0.0) self.btn_back.set_visible(cur_index != 0.0)
self.carousel_indicator_dots.set_visible(cur_index != 0.0) self.carousel_indicator_dots.set_visible(cur_index != 0.0)

Loading…
Cancel
Save