-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat[close #340]: Propose the Vanilla OS VM image on virtual machines
- Loading branch information
1 parent
fd73446
commit cbd85be
Showing
8 changed files
with
123 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ sources = [ | |
'disk.py', | ||
'encryption.py', | ||
'nvidia.py', | ||
'vm.py', | ||
'conn_check.py', | ||
'network.py', | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# vm.py | ||
# | ||
# Copyright 2023 mirkobrombin | ||
# | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundationat version 3 of the License. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
from gi.repository import Adw, Gtk | ||
|
||
|
||
@Gtk.Template(resource_path="/org/vanillaos/Installer/gtk/default-vm.ui") | ||
class VanillaDefaultVm(Adw.Bin): | ||
__gtype_name__ = "VanillaDefaultVm" | ||
|
||
btn_no = Gtk.Template.Child() | ||
btn_yes = Gtk.Template.Child() | ||
|
||
use_vm_tools = None | ||
|
||
def __init__(self, window, distro_info, key, step, **kwargs): | ||
super().__init__(**kwargs) | ||
self.__window = window | ||
self.__distro_info = distro_info | ||
self.__key = key | ||
self.__step = step | ||
|
||
self.btn_yes.connect("clicked", self.use_vm_tools_fn) | ||
self.btn_no.connect("clicked", self.skip_vm_tools_fn) | ||
|
||
def get_finals(self): | ||
return { | ||
"vm": { | ||
"use-vm-tools": self.use_vm_tools, | ||
} | ||
} | ||
|
||
def skip_vm_tools_fn(self, _): | ||
self.use_vm_tools = False | ||
self.__window.next() | ||
|
||
def use_vm_tools_fn(self, _): | ||
self.use_vm_tools = True | ||
self.__window.next() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<interface> | ||
<requires lib="gtk" version="4.0"/> | ||
<template class="VanillaDefaultVm" parent="AdwBin"> | ||
<property name="halign">0</property> | ||
<property name="valign">0</property> | ||
<property name="hexpand">true</property> | ||
<child> | ||
<object class="AdwStatusPage" id="status_page"> | ||
<property name="halign">0</property> | ||
<property name="valign">0</property> | ||
<property name="hexpand">true</property> | ||
<property name="icon-name">video-display-symbolic</property> | ||
<property name="title" translatable="yes">VM Tools</property> | ||
<property name="description" translatable="yes">Choose whether to install VM Tools for better compatibility and performance.</property> | ||
<child> | ||
<object class="GtkBox"> | ||
<property name="orientation">1</property> | ||
<property name="vexpand">true</property> | ||
<property name="hexpand">true</property> | ||
<property name="valign">3</property> | ||
<child> | ||
<object class="GtkBox"> | ||
<property name="valign">3</property> | ||
<property name="spacing">10</property> | ||
<property name="halign">3</property> | ||
<child> | ||
<object class="GtkButton" id="btn_no"> | ||
<property name="label" translatable="yes">Skip</property> | ||
<property name="halign">3</property> | ||
<style> | ||
<class name="pill"/> | ||
</style> | ||
</object> | ||
</child> | ||
<child> | ||
<object class="GtkButton" id="btn_yes"> | ||
<property name="label" translatable="yes">Install (Recommended)</property> | ||
<property name="halign">3</property> | ||
<style> | ||
<class name="pill"/> | ||
<class name="suggested-action"/> | ||
</style> | ||
</object> | ||
</child> | ||
</object> | ||
</child> | ||
</object> | ||
</child> | ||
</object> | ||
</child> | ||
</template> | ||
</interface> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters