Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to install proprietary codecs #92

Draft
wants to merge 44 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
4d41f82
Satisfy linter
meisenzahl Sep 19, 2020
a96ed4a
Add view to install third party software
meisenzahl Sep 19, 2020
6fa525d
Add packages for additional media formats to list
meisenzahl Sep 19, 2020
2f0d8cb
Merge branch 'master' into option-to-install-proprietary-codecs
meisenzahl Sep 19, 2020
d690122
Update src/Views/ThirdPartySoftwareView.vala
meisenzahl Sep 19, 2020
d625297
Rename to software
meisenzahl Sep 19, 2020
61dba02
Remove unused class
meisenzahl Sep 21, 2020
6da68e8
Rearrange views
meisenzahl Sep 21, 2020
67de351
Merge branch 'master' into option-to-install-proprietary-codecs
meisenzahl Sep 21, 2020
2b8233a
Add packagekit as dependency
meisenzahl Sep 21, 2020
2d0dbaa
Install libpackagekit-glib2-dev for CI job
meisenzahl Sep 21, 2020
a021056
Install additional packages
meisenzahl Sep 21, 2020
da6e15e
Satisfy linter
meisenzahl Sep 21, 2020
df0f281
Merge branch 'master' into option-to-install-proprietary-codecs
meisenzahl Oct 21, 2020
01f0a07
Merge branch 'master' into option-to-install-proprietary-codecs
meisenzahl Oct 25, 2020
6a4ef57
Merge branch 'master' into option-to-install-proprietary-codecs
cassidyjames Nov 5, 2020
deef4ef
Merge branch 'master' into option-to-install-proprietary-codecs
meisenzahl Nov 14, 2020
c28b625
Merge branch 'master' into option-to-install-proprietary-codecs
meisenzahl Dec 15, 2020
41183fa
Merge branch 'master' into option-to-install-proprietary-codecs
meisenzahl Dec 28, 2020
1375424
Merge branch 'master' into option-to-install-proprietary-codecs
meisenzahl Jan 30, 2021
81b29c1
Merge branch 'master' into option-to-install-proprietary-codecs
meisenzahl Feb 11, 2021
bdadb7e
Merge branch 'master' into option-to-install-proprietary-codecs
meisenzahl Feb 17, 2021
f2b74d5
Merge branch 'master' into option-to-install-proprietary-codecs
meisenzahl Feb 24, 2021
aa41dcd
Merge branch 'master' into option-to-install-proprietary-codecs
meisenzahl Mar 2, 2021
7ac87fc
Merge branch 'master' into option-to-install-proprietary-codecs
meisenzahl Mar 8, 2021
f65354e
Merge branch 'master' into option-to-install-proprietary-codecs
meisenzahl Mar 14, 2021
834f17f
Merge branch 'master' into option-to-install-proprietary-codecs
meisenzahl Mar 30, 2021
bbdf337
Merge branch 'master' into option-to-install-proprietary-codecs
meisenzahl Apr 6, 2021
f599d59
Merge branch 'master' into option-to-install-proprietary-codecs
meisenzahl May 2, 2021
93b28c4
Merge branch 'master' into option-to-install-proprietary-codecs
meisenzahl May 28, 2021
b0957c8
Merge branch 'master' into option-to-install-proprietary-codecs
meisenzahl Jun 1, 2021
6f9d14e
Merge branch 'master' into option-to-install-proprietary-codecs
meisenzahl Jul 17, 2021
9a89167
Merge branch 'master' into option-to-install-proprietary-codecs
meisenzahl Aug 11, 2021
b164ed1
Merge branch 'master' into option-to-install-proprietary-codecs
meisenzahl Oct 17, 2021
776112f
Fix merge errors
meisenzahl Oct 17, 2021
f980bd1
Merge branch 'master' into option-to-install-proprietary-codecs
meisenzahl Jan 6, 2023
c42e7f4
Merge branch 'master' into option-to-install-proprietary-codecs
meisenzahl Jan 6, 2023
fc75a34
Add logic to install Flatpak runtime
meisenzahl Jan 6, 2023
6ad7ed5
Merge branch 'master' into option-to-install-proprietary-codecs
meisenzahl Jan 6, 2023
0f66e28
Satisfy linter
meisenzahl Jan 6, 2023
1b8b480
GitHub Actions: Install libflatpak-dev
meisenzahl Jan 7, 2023
58529b9
Sync changes
meisenzahl Jan 7, 2023
5c69ca3
Sync changes
meisenzahl Jan 7, 2023
b02f8b1
Merge branch 'master' into option-to-install-proprietary-codecs
meisenzahl Jan 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/Config.vala.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace Build {
public const string GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@";
public const string LANG_LIST = "@LANG_LIST@";
public const string PREFERRED_LANG_LIST = "@PREFERRED_LANG_LIST@";
public const string XKB_BASE = "@XKB_BASE@";
public const string ISO_CODES_LOCATION = "@ISO_CODES_LOCATION@";
public const string GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@";
public const string LANG_LIST = "@LANG_LIST@";
public const string PREFERRED_LANG_LIST = "@PREFERRED_LANG_LIST@";
public const string XKB_BASE = "@XKB_BASE@";
public const string ISO_CODES_LOCATION = "@ISO_CODES_LOCATION@";
}
18 changes: 16 additions & 2 deletions src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class Installer.MainWindow : Hdy.Window {
private AccountView account_view;
private LanguageView language_view;
private KeyboardLayoutView keyboard_layout_view;
private ThirdPartySoftwareView third_party_software_view;
meisenzahl marked this conversation as resolved.
Show resolved Hide resolved

public MainWindow () {
Object (
Expand Down Expand Up @@ -65,7 +66,20 @@ public class Installer.MainWindow : Hdy.Window {
stack.add (keyboard_layout_view);
stack.visible_child = keyboard_layout_view;

keyboard_layout_view.next_step.connect (() => load_account_view ());
keyboard_layout_view.next_step.connect (() => load_third_party_software_view ());
}

private void load_third_party_software_view () {
if (third_party_software_view != null) {
third_party_software_view.destroy ();
}

third_party_software_view = new ThirdPartySoftwareView ();
third_party_software_view.previous_view = keyboard_layout_view;
stack.add (third_party_software_view);
stack.visible_child = third_party_software_view;

third_party_software_view.next_step.connect (() => load_account_view ());
}

private void load_account_view () {
Expand All @@ -74,7 +88,7 @@ public class Installer.MainWindow : Hdy.Window {
}

account_view = new AccountView ();
account_view.previous_view = keyboard_layout_view;
account_view.previous_view = third_party_software_view;
stack.add (account_view);
stack.visible_child = account_view;

Expand Down
1 change: 1 addition & 0 deletions src/Objects/Configuration.vala
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ public class Configuration : GLib.Object {
public string? country { get; set; default = null; }
public string keyboard_layout { get; set; }
public string? keyboard_variant { get; set; default = null; }
public bool install_additional_media_formats { get; set; default = false; }
}
82 changes: 82 additions & 0 deletions src/Views/ThirdPartySoftwareView.vala
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
/*-
meisenzahl marked this conversation as resolved.
Show resolved Hide resolved
* Copyright 2020 elementary, Inc. (https://elementary.io)
*
* 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 Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* 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/>.
* Authored by: Marius Meisenzahl <mariusmeisenzahl@gmail.com>
*/

public class Installer.ThirdPartySoftwareView : AbstractInstallerView {
construct {
var image = new Gtk.Image.from_icon_name ("emblem-synchronized", Gtk.IconSize.DIALOG);
image.valign = Gtk.Align.END;

var title_label = new Gtk.Label (_("Third Party Software"));
title_label.get_style_context ().add_class (Granite.STYLE_CLASS_H2_LABEL);
title_label.valign = Gtk.Align.START;

var form_grid = new Gtk.Grid ();
form_grid.row_spacing = 3;
form_grid.valign = Gtk.Align.CENTER;
form_grid.vexpand = true;

var additional_media_formats_name_label = new Gtk.Label (_("Install additional media formats"));
additional_media_formats_name_label.get_style_context ().add_class (Granite.STYLE_CLASS_H3_LABEL);
additional_media_formats_name_label.halign = Gtk.Align.START;
additional_media_formats_name_label.hexpand = true;

var additional_media_formats_description_label = new Gtk.Label (_("This software is subject to license terms included with its documentation. Some is propietary."));
meisenzahl marked this conversation as resolved.
Show resolved Hide resolved
additional_media_formats_description_label.wrap = true;
additional_media_formats_description_label.xalign = 0;

var additional_media_formats_switch = new Gtk.Switch ();
additional_media_formats_switch.valign = Gtk.Align.CENTER;

unowned Configuration configuration = Configuration.get_default ();
configuration.bind_property ("install_additional_media_formats", additional_media_formats_switch, "active", BindingFlags.BIDIRECTIONAL);

form_grid.attach (additional_media_formats_name_label, 0, 0);
form_grid.attach (additional_media_formats_description_label, 0, 1);
form_grid.attach (additional_media_formats_switch, 1, 0, 1, 2);

content_area.attach (image, 0, 0, 1, 1);
content_area.attach (title_label, 0, 1, 1, 1);
content_area.attach (form_grid, 1, 0, 1, 2);

var back_button = new Gtk.Button.with_label (_("Back"));

var next_button = new Gtk.Button.with_label (_("Select"));
next_button.sensitive = true;
next_button.get_style_context ().add_class (Gtk.STYLE_CLASS_SUGGESTED_ACTION);

action_area.add (back_button);
action_area.add (next_button);

back_button.clicked.connect (() => ((Gtk.Stack) get_parent ()).visible_child = previous_view);
next_button.clicked.connect (on_next_button_clicked);

show_all ();
}

private void on_next_button_clicked () {
unowned Configuration configuration = Configuration.get_default ();
var additional_packages_to_install = new List<string> ();
if (configuration.install_additional_media_formats) {
additional_packages_to_install.append ("gstreamer1.0-libav");
additional_packages_to_install.append ("gstreamer1.0-plugins-bad");
additional_packages_to_install.append ("gstreamer1.0-plugins-ugly");
}

next_step ();
}
}
1 change: 1 addition & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ vala_files = [
'Views/AccountView.vala',
'Views/KeyboardLayoutView.vala',
'Views/LanguageView.vala',
'Views/ThirdPartySoftwareView.vala',
'Widgets/LayoutWidget.vala',
'Widgets/VariantWidget.vala'
]
Expand Down