main
mirkobrombin 2 years ago
parent 821ae2ff1c
commit dec2f47b15

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<svg viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg">
<ellipse style="fill: rgb(221, 72, 20);" cx="250.444" cy="246.003" rx="214.92" ry="214.92"/>
<g transform="matrix(1, 0, 0, 1, -119.704704, -266.193634)" id="layer1">
<g transform="translate(925.8326,120.8762)" id="g3963">
<g transform="matrix(2.269061, 0, 0, 2.269061, -671.41095, 251.059219)" style="fill: black; fill-opacity: 1; fill-rule: nonzero; stroke: none; stroke-miterlimit: 4;" id="g3771">
<g style="fill:black;fill-opacity:1" id="g3773">
<path d="M 86.068,0 C 61.466,0 56.851,35.041 70.691,35.041 C 84.529,35.041 110.671,0 86.068,0 z " style="fill-opacity: 1; fill: rgb(255, 255, 255);" id="path3775"/>
<path d="M 45.217,30.699 C 52.586,31.149 60.671,2.577 46.821,4.374 C 32.976,6.171 37.845,30.249 45.217,30.699 z " style="fill-opacity: 1; fill: rgb(255, 255, 255);" id="path3777"/>
<path d="M 11.445,48.453 C 16.686,46.146 12.12,23.581 3.208,29.735 C -5.7,35.89 6.204,50.759 11.445,48.453 z " style="fill-opacity: 1; fill: rgb(255, 255, 255);" id="path3779"/>
<path d="M 26.212,36.642 C 32.451,35.37 32.793,9.778 21.667,14.369 C 10.539,18.961 19.978,37.916 26.212,36.642 L 26.212,36.642 z " style="fill-opacity: 1; fill: rgb(255, 255, 255);" id="path3781"/>
<path d="M 58.791,93.913 C 59.898,102.367 52.589,106.542 45.431,101.092 C 22.644,83.743 83.16,75.088 79.171,51.386 C 75.86,31.712 15.495,37.769 8.621,68.553 C 3.968,89.374 27.774,118.26 52.614,118.26 C 64.834,118.26 78.929,107.226 81.566,93.248 C 83.58,82.589 57.867,86.86 58.791,93.913 L 58.791,93.913 z " style="fill-opacity: 1; fill: rgb(255, 255, 255);" id="path3783"/>
</g>
</g>
<text x="-406.52405" y="527.92285" style="font-size: 25.8884px; font-style: normal; font-weight: normal; fill: black; fill-opacity: 1; stroke: none; stroke-width: 1pt; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1; font-family: &quot;Bitstream Vera Sans&quot;; white-space: pre;" id="text3797"> </text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<svg viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg">
<ellipse style="fill: rgb(221, 72, 20);" cx="250.444" cy="246.003" rx="214.92" ry="214.92"/>
<g transform="matrix(1, 0, 0, 1, -119.704704, -266.193634)" id="layer1">
<g transform="translate(925.8326,120.8762)" id="g3963">
<g transform="matrix(2.269061, 0, 0, 2.269061, -671.41095, 251.059219)" style="fill: black; fill-opacity: 1; fill-rule: nonzero; stroke: none; stroke-miterlimit: 4;" id="g3771">
<g style="fill:black;fill-opacity:1" id="g3773">
<path d="M 86.068,0 C 61.466,0 56.851,35.041 70.691,35.041 C 84.529,35.041 110.671,0 86.068,0 z " style="fill-opacity: 1; fill: rgb(255, 255, 255);" id="path3775"/>
<path d="M 45.217,30.699 C 52.586,31.149 60.671,2.577 46.821,4.374 C 32.976,6.171 37.845,30.249 45.217,30.699 z " style="fill-opacity: 1; fill: rgb(255, 255, 255);" id="path3777"/>
<path d="M 11.445,48.453 C 16.686,46.146 12.12,23.581 3.208,29.735 C -5.7,35.89 6.204,50.759 11.445,48.453 z " style="fill-opacity: 1; fill: rgb(255, 255, 255);" id="path3779"/>
<path d="M 26.212,36.642 C 32.451,35.37 32.793,9.778 21.667,14.369 C 10.539,18.961 19.978,37.916 26.212,36.642 L 26.212,36.642 z " style="fill-opacity: 1; fill: rgb(255, 255, 255);" id="path3781"/>
<path d="M 58.791,93.913 C 59.898,102.367 52.589,106.542 45.431,101.092 C 22.644,83.743 83.16,75.088 79.171,51.386 C 75.86,31.712 15.495,37.769 8.621,68.553 C 3.968,89.374 27.774,118.26 52.614,118.26 C 64.834,118.26 78.929,107.226 81.566,93.248 C 83.58,82.589 57.867,86.86 58.791,93.913 L 58.791,93.913 z " style="fill-opacity: 1; fill: rgb(255, 255, 255);" id="path3783"/>
</g>
</g>
<text x="-406.52405" y="527.92285" style="font-size: 25.8884px; font-style: normal; font-weight: normal; fill: black; fill-opacity: 1; stroke: none; stroke-width: 1pt; stroke-linecap: butt; stroke-linejoin: miter; stroke-opacity: 1; font-family: &quot;Bitstream Vera Sans&quot;; white-space: pre;" id="text3797"> </text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -0,0 +1,13 @@
application_id = 'pm.mirko.UbuntuSmoother'
scalable_dir = join_paths('hicolor', 'scalable', 'apps')
install_data(
join_paths(scalable_dir, ('@0@.svg').format(application_id)),
install_dir: join_paths(get_option('datadir'), 'icons', scalable_dir)
)
symbolic_dir = join_paths('hicolor', 'symbolic', 'apps')
install_data(
join_paths(symbolic_dir, ('@0@-symbolic.svg').format(application_id)),
install_dir: join_paths(get_option('datadir'), 'icons', symbolic_dir)
)

@ -0,0 +1,43 @@
desktop_file = i18n.merge_file(
input: 'pm.mirko.UbuntuSmoother.desktop.in',
output: 'pm.mirko.UbuntuSmoother.desktop',
type: 'desktop',
po_dir: '../po',
install: true,
install_dir: join_paths(get_option('datadir'), 'applications')
)
desktop_utils = find_program('desktop-file-validate', required: false)
if desktop_utils.found()
test('Validate desktop file', desktop_utils,
args: [desktop_file]
)
endif
appstream_file = i18n.merge_file(
input: 'pm.mirko.UbuntuSmoother.appdata.xml.in',
output: 'pm.mirko.UbuntuSmoother.appdata.xml',
po_dir: '../po',
install: true,
install_dir: join_paths(get_option('datadir'), 'appdata')
)
appstream_util = find_program('appstream-util', required: false)
if appstream_util.found()
test('Validate appstream file', appstream_util,
args: ['validate', appstream_file]
)
endif
install_data('pm.mirko.UbuntuSmoother.gschema.xml',
install_dir: join_paths(get_option('datadir'), 'glib-2.0/schemas')
)
compile_schemas = find_program('glib-compile-schemas', required: false)
if compile_schemas.found()
test('Validate schema file', compile_schemas,
args: ['--strict', '--dry-run', meson.current_source_dir()]
)
endif
subdir('icons')

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>pm.mirko.UbuntuSmoother.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0-only</project_license>
<name translatable="no">Ubuntu Smoother</name>
<summary>Tweak your Ubuntu Vanilla GNOME installation.</summary>
<developer_name translatable="no">Mirko Brombin</developer_name>
<description>
<p>No description</p>
</description>
<screenshots></screenshots>
<translation type="gettext">pm.mirko.UbuntuSmoother</translation>
<content_rating type="oars-1.1"/>
<recommends>
<control>pointing</control>
<control>keyboard</control>
<control>touch</control>
</recommends>
<requires>
<display_length compare="ge">768</display_length>
</requires>
<releases>
<release version="1.0.1" date="2022-09-03">
<description>
<p>First release</p>
</description>
</release>
</releases>
</component>

@ -0,0 +1,8 @@
[Desktop Entry]
Name=Ubuntu Smoother
Exec=ubuntu-smoother
Icon=pm.mirko.UbuntuSmoother
Terminal=false
Type=Application
Categories=GTK;
StartupNotify=true

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<schemalist gettext-domain="ubuntu-smoother">
<schema id="pm.mirko.UbuntuSmoother" path="/pm/mirko/UbuntuSmoother/">
</schema>
</schemalist>

@ -0,0 +1,21 @@
project('pm.mirko.UbuntuSmoother',
version: '0.0.1',
meson_version: '>= 0.59.0',
default_options: [ 'warning_level=2',
'werror=false',
],
)
i18n = import('i18n')
gnome = import('gnome')
subdir('data')
subdir('ubuntu_smoother')
subdir('po')
gnome.post_install(
glib_compile_schemas: true,
gtk_update_icon_cache: true,
update_desktop_database: true,
)

@ -0,0 +1 @@
i18n.gettext('ubuntu-smoother', preset: 'glib')

@ -0,0 +1,122 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<requires lib="libadwaita" version="1.0" />
<template class="UbuntuSmootherWindow" parent="AdwApplicationWindow">
<property name="default-width">800</property>
<property name="default-height">600</property>
<property name="title">Ubuntu Smoother</property>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="AdwHeaderBar">
<property name="title_widget">
<object class="AdwCarouselIndicatorDots">
<property name="carousel">carousel</property>
<property name="orientation">horizontal</property>
</object>
</property>
<style>
<class name="flat" />
</style>
</object>
</child>
<child>
<object class="AdwCarousel" id="carousel">
<property name="vexpand">True</property>
<property name="hexpand">True</property>
<property name="allow_scroll_wheel">True</property>
<property name="allow_mouse_drag">True</property>
<property name="allow_long_swipes">True</property>
<child>
<object class="AdwStatusPage">
<property name="icon-name">pm.mirko.UbuntuSmoother</property>
<property name="title">Welcome!</property>
<property name="description">Make your choices, this wizard will take care of everything.</property>
<property name="halign">fill</property>
<property name="valign">fill</property>
<property name="hexpand">true</property>
<child>
<object class="GtkButton">
<property name="label">Let's Start</property>
<property name="halign">center</property>
<style>
<class name="pill" />
<class name="suggested-action" />
</style>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="vexpand">True</property>
<property name="hexpand">True</property>
<property name="valign">center</property>
<child>
<object class="AdwPreferencesPage">
<child>
<object class="AdwPreferencesGroup">
<property name="title">How Will you Install the Software?</property>
<child>
<object class="AdwActionRow">
<property name="title">Snap</property>
<property name="subtitle">Will replace GNOME Software with Snap store if the only package manager.</property>
<child>
<object class="GtkSwitch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title">Flatpak</property>
<property name="subtitle">Will also configure the Flathub repository.</property>
<child>
<object class="GtkSwitch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<property name="title">Extra</property>
<child>
<object class="AdwActionRow">
<property name="title">Apport</property>
<property name="subtitle">Do you want to keep the Bug Reporter utility?</property>
<child>
<object class="GtkSwitch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkButton">
<property name="label">Save Changes</property>
<property name="halign">center</property>
<style>
<class name="pill" />
<class name="suggested-action" />
</style>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</template>
</interface>

@ -0,0 +1,70 @@
# main.py
#
# Copyright 2022 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/>.
import sys
import gi
gi.require_version('Gtk', '4.0')
gi.require_version('Adw', '1')
from gi.repository import Gtk, Gio, Adw
from ubuntu_smoother.window import UbuntuSmootherWindow
class UbuntuSmootherApplication(Adw.Application):
"""The main application singleton class."""
def __init__(self):
super().__init__(application_id='pm.mirko.UbuntuSmoother',
flags=Gio.ApplicationFlags.FLAGS_NONE)
self.create_action('quit', self.close, ['<primary>q'])
def do_activate(self):
"""Called when the application is activated.
We raise the application's main window, creating it if
necessary.
"""
win = self.props.active_window
if not win:
win = UbuntuSmootherWindow(application=self)
win.present()
def create_action(self, name, callback, shortcuts=None):
"""Add an application action.
Args:
name: the name of the action
callback: the function to be called when the action is
activated
shortcuts: an optional list of accelerators
"""
action = Gio.SimpleAction.new(name, None)
action.connect("activate", callback)
self.add_action(action)
if shortcuts:
self.set_accels_for_action(f"app.{name}", shortcuts)
def close(self, *args):
"""Close the application."""
self.quit()
def main(version):
"""The application's entry point."""
app = UbuntuSmootherApplication()
return app.run(sys.argv)

@ -0,0 +1,34 @@
pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
moduledir = join_paths(pkgdatadir, 'ubuntu_smoother')
gnome = import('gnome')
gnome.compile_resources('ubuntu-smoother',
'ubuntu-smoother.gresource.xml',
gresource_bundle: true,
install: true,
install_dir: pkgdatadir,
)
python = import('python')
conf = configuration_data()
conf.set('PYTHON', python.find_installation('python3').path())
conf.set('VERSION', meson.project_version())
conf.set('localedir', join_paths(get_option('prefix'), get_option('localedir')))
conf.set('pkgdatadir', pkgdatadir)
configure_file(
input: 'ubuntu-smoother.in',
output: 'ubuntu-smoother',
configuration: conf,
install: true,
install_dir: get_option('bindir')
)
ubuntu_smoother_sources = [
'__init__.py',
'main.py',
'window.py',
]
install_data(ubuntu_smoother_sources, install_dir: moduledir)

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/pm/mirko/UbuntuSmoother">
<file>gtk/window.ui</file>
</gresource>
</gresources>

@ -0,0 +1,43 @@
#!@PYTHON@
# ubuntu-smoother.in
#
# Copyright 2022 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/>.
import os
import sys
import signal
import locale
import gettext
VERSION = '@VERSION@'
pkgdatadir = '@pkgdatadir@'
localedir = '@localedir@'
sys.path.insert(1, pkgdatadir)
signal.signal(signal.SIGINT, signal.SIG_DFL)
locale.bindtextdomain('ubuntu_smoother', localedir)
locale.textdomain('ubuntu_smoother')
gettext.install('ubuntu_smoother', localedir)
if __name__ == '__main__':
import gi
from gi.repository import Gio
resource = Gio.Resource.load(os.path.join(pkgdatadir, 'ubuntu-smoother.gresource'))
resource._register()
from ubuntu_smoother import main
sys.exit(main.main(VERSION))

@ -0,0 +1,25 @@
# window.py
#
# Copyright 2022 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 Gtk, Gio, Adw
@Gtk.Template(resource_path='/pm/mirko/UbuntuSmoother/gtk/window.ui')
class UbuntuSmootherWindow(Adw.ApplicationWindow):
__gtype_name__ = 'UbuntuSmootherWindow'
def __init__(self, **kwargs):
super().__init__(**kwargs)
Loading…
Cancel
Save