Skip to content
Commits on Source (90)
include:
- remote: 'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/11fe3571905faceef51c7253dfdaf79ece8cf062/templates/fedora.yml'
- remote: 'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/c5626190ec14b475271288dda7a7dae8dbe0cd76/templates/arch.yml'
variables:
FDO_UPSTREAM_REPO: gnome/gnome-initial-setup
......@@ -8,20 +8,19 @@ stages:
- prepare
- build
.fedora.container.common:
.arch.container.common:
variables:
# When branching a stable release, change 'main'
# to the release number/branch to ensure that
# a new image will be created, tailored for the
# stable branch.
FDO_DISTRIBUTION_TAG: '2022-02-19.2-main'
FDO_DISTRIBUTION_VERSION: 34
FDO_DISTRIBUTION_TAG: '2022-07-25.10-main'
# See also https://gitlab.freedesktop.org/freedesktop/ci-templates
build.container.fedora@x86_64:
build.container.arch@x86_64:
extends:
- '.fdo.container-build@fedora'
- '.fedora.container.common'
- '.fdo.container-build@arch'
- '.arch.container.common'
stage: 'prepare'
variables:
# no need to pull the whole tree for rebuilding the image
......@@ -29,75 +28,44 @@ build.container.fedora@x86_64:
# Expiry sets fdo.expires on the image
FDO_EXPIRES_AFTER: 8w
FDO_DISTRIBUTION_PACKAGES: >-
@c-development @development-tools
accountsservice-devel
ccache
cheese-libs-devel
cheese-libs-devel
desktop-file-utils
flatpak-devel
fontconfig-devel
gdm-devel
geoclue2-devel
geocode-glib-devel
accountsservice
appstream
base-devel
flatpak
fontconfig
gdm
geoclue
geocode-glib
git
glib2-devel
gnome-online-accounts-devel
gobject-introspection-devel
gstreamer1-devel
gtk3-devel
gtk4-devel
gnome-desktop-4
gnome-online-accounts
gsettings-desktop-schemas
gobject-introspection
gtk4
gtk-doc
ibus-devel
iso-codes-devel
krb5-devel
libnma-devel
libpwquality-devel
libseccomp-devel
libsecret-devel
malcontent-ui-devel
itstool
json-glib
krb5
libadwaita
libglib-testing
libgweather-4
libibus
libmalcontent
libnm
libnma-gtk4
libpwquality
librest
libsecret
meson
NetworkManager-libnm-devel
ninja-build
polkit-devel
rest-devel
webkit2gtk3-devel
xkeyboard-config-devel
FDO_DISTRIBUTION_EXEC: |-
mkdir /tmp/deps && \
pushd /tmp/deps && \
git clone --depth 1 https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas.git && \
cd gsettings-desktop-schemas && \
meson . _build --prefix=/usr/local && \
ninja -C _build -v && \
ninja -C _build -v install && \
cd .. && \
git clone --depth 1 https://gitlab.gnome.org/GNOME/libgweather.git && \
cd libgweather && \
meson . _build --prefix=/usr/local -Denable_vala=false -Dgtk_doc=false -Dintrospection=false -Dtests=false && \
ninja -C _build -v && \
ninja -C _build -v install && \
cd .. && \
git clone --depth 1 https://gitlab.gnome.org/GNOME/gnome-desktop.git && \
cd gnome-desktop && \
meson . _build --prefix=/usr/local -Dwerror=false -Dgtk_doc=false -Ddesktop_docs=false -Dlegacy_library=false && \
ninja -C _build -v && \
ninja -C _build -v install && \
cd .. && \
git clone --depth 1 https://gitlab.gnome.org/GNOME/libhandy.git && \
cd libhandy && \
meson . _build --prefix=/usr/local -Dexamples=false -Dglade_catalog=disabled -Dgtk_doc=false -Dintrospection=disabled -Dprofiling=false -Dtests=false -Dvapi=false && \
ninja -C _build -v && \
ninja -C _build -v install && \
cd .. && \
popd && \
rm -rf /tmp/deps
polkit
sassc
webkit2gtk-5.0
yelp-tools
.job_template: &job_definition
extends:
- '.fdo.distribution-image@fedora'
- '.fedora.container.common'
- '.fdo.distribution-image@arch'
- '.arch.container.common'
stage: build
......@@ -105,13 +73,12 @@ build.container.fedora@x86_64:
# In general, we would like warnings to be fatal. However, code copied from
# gnome-control-center uses many deprecated functions. Until we have a good
# answer to sharing that code (#68), make those warnings non-fatal.
- meson
- meson setup
-Dsystemd=${EXPLICIT_FEATURES}
--auto-features ${AUTO_FEATURES}
${OPTIONS}
-Dwerror=true -Dc_args=-Wno-error=deprecated-declarations
${EXTRA_PARAMETERS}
--wrap-mode=nodownload
_build
.
- cd _build
......
42.2
----
43.beta
-------
* Initial Setup has been ported to GTK 4, libadwaita, and friends, thanks to
Georges Stavracas. As a result:
- libnma-gtk4 is now required, rather than libnma.
- GTK 4 is required in addition to GTK 3. This is because goa-backend does
not have a GTK 4 port. Like in gnome-control-center, the use of goa-backend
is split out into a separate process.
- webkit2gtk5 is now required. (However, goa-backend brings a transitive
dependency on webkit2gtk4.)
- Since webkit2gtk5 requires libsoup 3, the soup2=true configuration option
has been removed. Initial Setup depends on geocode-glib-2.0, and versions
of librest and gweather4 built against libsoup 3.
- Support for taking a selfie as your account avatar has been removed, since
libcheese-gtk lacks a GTK 4 port, and the optional libcheese[-gtk]
dependency is no more.
- Parental controls support requires malcontent 0.11 which is not released
at the time of writing.
There is a known regression from the port: selecting a timezone by typing the
name of a city and picking a location from the dropdown does not work. To
work around this, click a location on the map to select a timezone. This is
tracked as https://gitlab.gnome.org/GNOME/gnome-initial-setup/-/issues/145
and will be addressed in a future release.
* When systemd support is enabled, Initial Setup now installs a sysusers.d
snippet for its user, thanks to David King.
* Translation updates:
- Abkhazian
- Chinese (China)
- Galician
- Georgian
- Hebrew
- Indonesian
- Persian
- Portuguese
- Russian
- Spanish
- Swedish
- Turkish
- Ukrainian
43.alpha.1
----------
* When built with -Dsoup2=false (the default), Initial Setup now depends on
geocode-glib-2.0, introduced in geocode-glib 3.26.3 as a parallel-installable,
soup3-flavoured version of the library. When built with -Dsoup2=true, Initial
Setup continues to depend on geocode-glib-1.0.
* Initial Setup's build system tries to detect when its dependencies are built
against an incompatible libsoup, but there is one known case that is not
detected at build time. If Initial Setup is built with parental controls
enabled, the malcontent parental controls library brings with it a dependency
on libflatpak and libostree. Neither of these libraries can currently be built
against libsoup3. Either they must be built against libcurl rather than
libsoup; or Initial Setup must be built with -Dsoup2=true; or Initial Setup
must be built with -Dparental_controls=disabled; or Initial Setup will abort
on startup.
43.alpha
--------
* Initial Setup now builds against rest-1.0 if available, falling back to
rest-0.7 if not. There is no meson option to control this.
* Initial Setup now builds against libsoup 3 by default. As a transitional
measure, you can opt to build against libsoup 2 by passing -Dsoup2=true
to meson setup. geocode-glib-1.0, gweather4, and rest (1.0 or 0.7) must
have been built against the same version of libsoup.
* A number of Meson .wrap files for dependencies such as gweather4 have been
removed. These dependencies are now widely available in stable distros and
container images thereof.
* Initial Setup no longer reads gnome-version.xml to determine the GNOME
version in the fallback case when no OS information is available from
/etc/os-release. gnome-version.xml has been removed from GNOME 43.
* Translation updates:
- French
......
......@@ -13,7 +13,7 @@ good defaults:
* Create a user account
* Set the correct timezone / location
* Set up online accounts
* Learn some basics about GNOME 3
* Learn some basics about GNOME
The desired experience is that the system boots straight into the
initial-setup tool, and when the setup tasks are completed, we smoothly
......
# sysusers.d snippet for creating the gnome-inital-setup system user. See
# sysusers.d(5) for details.
u gnome-initial-setup - "GNOME Initial Setup" /run/gnome-initial-setup
......@@ -97,6 +97,8 @@ if enable_systemd
install_dir: systemd_userunitdir / 'gnome-session@@0@.target.d'.format(
meson.project_name()),
)
install_data('gnome-initial-setup.conf', install_dir: systemd_sysusersdir)
endif
......
gnome-initial-setup (43~beta-0ubuntu1) UNRELEASED; urgency=medium
* New upstream release
* Switch to gtk4, libadwaita, and libsoup3
* Drop obsolete cheese dependency
* Build-Depend on libxml2-utils for xmllint
* Temporarily disable malcontent integration
-- Jeremy Bicha <jbicha@ubuntu.com> Wed, 24 Aug 2022 19:37:11 -0400
gnome-initial-setup (42.2-1ubuntu2) kinetic; urgency=medium
* Rebuild against latest gnome-desktop
......
......@@ -7,41 +7,40 @@ Section: gnome
Priority: optional
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
XSBC-Original-Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
Uploaders: Jeremy Bicha <jbicha@ubuntu.com>, Laurent Bigonville <bigon@debian.org>, Sebastien Bacher <seb128@debian.org>
Uploaders: Jeremy Bicha <jbicha@ubuntu.com>, Laurent Bigonville <bigon@debian.org>
Build-Depends: debhelper-compat (= 13),
dh-sequence-gnome,
gsettings-desktop-schemas-dev (>= 3.37.1),
itstool,
libaccountsservice-dev,
libcheese-gtk-dev (>= 3.28),
libadwaita-1-dev (>= 1.2~alpha),
libfontconfig1-dev,
libgdm-dev (>= 3.8.3),
libgeoclue-2-dev (>= 2.3.1),
libgeocode-glib-dev,
libglib2.0-dev (>= 2.63.1),
libgnome-desktop-4-dev,
libgoa-1.0-dev,
libgoa-backend-1.0-dev,
libgtk-3-dev (>= 3.19.12),
libgweather-4-dev,
libhandy-1-dev (>= 1.5.90),
libgoa-1.0-dev (>= 3.45.1),
libgoa-backend-1.0-dev (>= 3.45.1),
libgtk-4-dev,
libgweather-4-dev (>= 4.1),
libibus-1.0-dev (>= 1.5.2),
libjson-glib-dev,
libkrb5-dev,
libmalcontent-0-dev [amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el s390x hppa powerpc powerpcspe ppc64],
libmalcontent-ui-0-dev [amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el s390x hppa powerpc powerpcspe ppc64],
# libmalcontent-0-dev [amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el s390x hppa powerpc powerpcspe ppc64],
# libmalcontent-ui-0-dev [amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el s390x hppa powerpc powerpcspe ppc64],
libnm-dev (>= 1.2),
libnma-dev (>= 1.0),
libnma-gtk4-dev (>= 1.0),
libpango1.0-dev (>= 1.32.5),
libpolkit-gobject-1-dev (>= 0.103),
libpwquality-dev,
librest-dev,
librest-dev (>= 0.9.1),
libsecret-1-dev (>= 0.18.8),
libsnapd-glib-dev,
libsoup2.4-dev,
libsysmetrics-dev,
libsystemd-dev [linux-any],
libwebkit2gtk-4.0-dev (>= 2.26),
libwebkit2gtk-5.0-dev,
libxml2-utils,
meson (>= 0.50.0),
polkitd,
......@@ -65,7 +64,7 @@ Depends: ${shlibs:Depends},
Recommends: accountsservice,
geoclue-2.0 (>= 2.3.1),
gnome-keyring,
${malcontent:Recommends}
# ${malcontent:Recommends}
Suggests: gdm3,
Description: Initial GNOME system setup helper
After acquiring or installing a new system there are a few essential things
......
......@@ -9,35 +9,34 @@ Build-Depends: debhelper-compat (= 13),
gsettings-desktop-schemas-dev (>= 3.37.1),
itstool,
libaccountsservice-dev,
libcheese-gtk-dev (>= 3.28),
libadwaita-1-dev (>= 1.2~alpha),
libfontconfig1-dev,
libgdm-dev (>= 3.8.3),
libgeoclue-2-dev (>= 2.3.1),
libgeocode-glib-dev,
libglib2.0-dev (>= 2.63.1),
libgnome-desktop-4-dev,
libgoa-1.0-dev,
libgoa-backend-1.0-dev,
libgtk-3-dev (>= 3.19.12),
libgweather-4-dev,
libhandy-1-dev (>= 1.5.90),
libgoa-1.0-dev (>= 3.45.1),
libgoa-backend-1.0-dev (>= 3.45.1),
libgtk-4-dev,
libgweather-4-dev (>= 4.1),
libibus-1.0-dev (>= 1.5.2),
libjson-glib-dev,
libkrb5-dev,
libmalcontent-0-dev [amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el s390x hppa powerpc powerpcspe ppc64],
libmalcontent-ui-0-dev [amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el s390x hppa powerpc powerpcspe ppc64],
# libmalcontent-0-dev [amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el s390x hppa powerpc powerpcspe ppc64],
# libmalcontent-ui-0-dev [amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el s390x hppa powerpc powerpcspe ppc64],
libnm-dev (>= 1.2),
libnma-dev (>= 1.0),
libnma-gtk4-dev (>= 1.0),
libpango1.0-dev (>= 1.32.5),
libpolkit-gobject-1-dev (>= 0.103),
libpwquality-dev,
librest-dev,
librest-dev (>= 0.9.1),
libsecret-1-dev (>= 0.18.8),
libsnapd-glib-dev,
libsoup2.4-dev,
libsysmetrics-dev,
libsystemd-dev [linux-any],
libwebkit2gtk-4.0-dev (>= 2.26),
libwebkit2gtk-5.0-dev,
libxml2-utils,
meson (>= 0.50.0),
polkitd,
......@@ -61,7 +60,7 @@ Depends: ${shlibs:Depends},
Recommends: accountsservice,
geoclue-2.0 (>= 2.3.1),
gnome-keyring,
${malcontent:Recommends}
# ${malcontent:Recommends}
Suggests: gdm3,
Description: Initial GNOME system setup helper
After acquiring or installing a new system there are a few essential things
......
......@@ -120,11 +120,11 @@ index 0000000..12c7bf0
+</locatingRules>
\ No newline at end of file
diff --git a/data/meson.build b/data/meson.build
index 31fa2f9..0fbb7d1 100644
index ba8d78e..9a1dc5a 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -99,6 +99,14 @@ if enable_systemd
)
@@ -101,6 +101,14 @@ if enable_systemd
install_data('gnome-initial-setup.conf', install_dir: systemd_sysusersdir)
endif
+i18n.merge_file(
......@@ -139,7 +139,7 @@ index 31fa2f9..0fbb7d1 100644
rules_dir = join_paths(data_dir, 'polkit-1', 'rules.d')
configure_file(
diff --git a/gnome-initial-setup/gis-driver.c b/gnome-initial-setup/gis-driver.c
index 77434ee..f0f50c9 100644
index b24644b..57eb9dc 100644
--- a/gnome-initial-setup/gis-driver.c
+++ b/gnome-initial-setup/gis-driver.c
@@ -101,6 +101,9 @@ struct _GisDriver {
......@@ -151,8 +151,8 @@ index 77434ee..f0f50c9 100644
+ gboolean quit_requested;
};
G_DEFINE_TYPE (GisDriver, gis_driver, GTK_TYPE_APPLICATION)
@@ -979,6 +982,33 @@ gis_driver_save_data (GisDriver *driver,
G_DEFINE_TYPE (GisDriver, gis_driver, ADW_TYPE_APPLICATION)
@@ -933,6 +936,33 @@ gis_driver_save_data (GisDriver *driver,
return gis_assistant_save_data (driver->assistant, error);
}
......@@ -187,10 +187,10 @@ index 77434ee..f0f50c9 100644
gis_driver_new (GisDriverMode mode)
{
diff --git a/gnome-initial-setup/gis-driver.h b/gnome-initial-setup/gis-driver.h
index 467b419..3dcb706 100644
index 9b935e2..fc5ed02 100644
--- a/gnome-initial-setup/gis-driver.h
+++ b/gnome-initial-setup/gis-driver.h
@@ -120,6 +120,12 @@ gchar *gis_driver_conf_get_string (GisDriver *driver,
@@ -121,6 +121,12 @@ gchar *gis_driver_conf_get_string (GisDriver *driver,
const gchar *group,
const gchar *key);
......@@ -204,10 +204,10 @@ index 467b419..3dcb706 100644
G_END_DECLS
diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c
index a4c6711..81281d8 100644
index 81df249..7246e4c 100644
--- a/gnome-initial-setup/gnome-initial-setup.c
+++ b/gnome-initial-setup/gnome-initial-setup.c
@@ -44,6 +44,9 @@
@@ -41,6 +41,9 @@
#include "pages/parental-controls/gis-parental-controls-page.h"
#include "pages/password/gis-password-page.h"
#include "pages/summary/gis-summary-page.h"
......@@ -217,7 +217,7 @@ index a4c6711..81281d8 100644
#define VENDOR_PAGES_GROUP "pages"
#define VENDOR_SKIP_KEY "skip"
@@ -83,6 +86,17 @@ static PageData page_table[] = {
@@ -80,6 +83,17 @@ static PageData page_table[] = {
{ NULL },
};
......@@ -235,8 +235,8 @@ index a4c6711..81281d8 100644
#undef PAGE
static gboolean
@@ -180,6 +194,25 @@ destroy_pages_after (GisAssistant *assistant,
}
@@ -192,6 +206,25 @@ destroy_page (gpointer data)
gis_assistant_remove_page (GIS_ASSISTANT (assistant), page);
}
+static gboolean
......@@ -261,7 +261,7 @@ index a4c6711..81281d8 100644
static void
rebuild_pages_cb (GisDriver *driver)
{
@@ -192,7 +225,11 @@ rebuild_pages_cb (GisDriver *driver)
@@ -204,7 +237,11 @@ rebuild_pages_cb (GisDriver *driver)
assistant = gis_driver_get_assistant (driver);
current_page = gis_assistant_get_current_page (assistant);
......@@ -273,8 +273,8 @@ index a4c6711..81281d8 100644
+ page_data = page_table;
g_ptr_array_free (skipped_pages, TRUE);
skipped_pages = g_ptr_array_new_with_free_func ((GDestroyNotify) gtk_widget_destroy);
@@ -200,7 +237,7 @@ rebuild_pages_cb (GisDriver *driver)
skipped_pages = g_ptr_array_new_with_free_func (destroy_page);
@@ -212,7 +249,7 @@ rebuild_pages_cb (GisDriver *driver)
if (current_page != NULL) {
destroy_pages_after (assistant, current_page);
......@@ -284,19 +284,19 @@ index a4c6711..81281d8 100644
break;
diff --git a/gnome-initial-setup/meson.build b/gnome-initial-setup/meson.build
index 43321ec..60edab8 100644
index fac8d1b..1189e70 100644
--- a/gnome-initial-setup/meson.build
+++ b/gnome-initial-setup/meson.build
@@ -52,6 +52,9 @@ dependencies = [
dependency ('libsecret-1', version: '>= 0.18.8'),
@@ -62,6 +62,9 @@ dependencies = [
dependency ('pwquality'),
dependency ('webkit2gtk-4.0', version: '>= 2.26.0'),
+ dependency ('snapd-glib'),
+ dependency ('libsoup-2.4'),
dependency ('rest-1.0'),
dependency ('webkit2gtk-5.0'),
+ dependency ('snapd-glib-2'),
+ dependency ('libsoup-3.0'),
+ dependency ('sysmetrics'),
cheese_dep,
cheese_gtk_dep,
ibus_dep,
libmalcontent_dep,
libmalcontent_ui_dep,
diff --git a/gnome-initial-setup/pages/apps/apps.gresource.xml b/gnome-initial-setup/pages/apps/apps.gresource.xml
new file mode 100644
index 0000000..e89e744
......@@ -1764,7 +1764,7 @@ index 0000000..09bfb69
+#endif /* __GIS_AUTH_DIALOG_H__ */
diff --git a/gnome-initial-setup/pages/livepatch/gis-auth-dialog.ui b/gnome-initial-setup/pages/livepatch/gis-auth-dialog.ui
new file mode 100644
index 0000000..2f3c742
index 0000000..0fe40b2
--- /dev/null
+++ b/gnome-initial-setup/pages/livepatch/gis-auth-dialog.ui
@@ -0,0 +1,231 @@
......@@ -2818,10 +2818,10 @@ index 3230501..32f615b 100644
if libmalcontent_dep.found() and libmalcontent_ui_dep.found()
diff --git a/gnome-initial-setup/pages/privacy/gis-privacy-page.c b/gnome-initial-setup/pages/privacy/gis-privacy-page.c
index 80c40c3..0774ec4 100644
index 40cfd88..af674cd 100644
--- a/gnome-initial-setup/pages/privacy/gis-privacy-page.c
+++ b/gnome-initial-setup/pages/privacy/gis-privacy-page.c
@@ -243,7 +243,7 @@ activate_link (GtkLabel *label,
@@ -228,7 +228,7 @@ activate_link (GtkLabel *label,
static void
gis_privacy_page_locale_changed (GisPage *page)
{
......@@ -2831,10 +2831,10 @@ index 80c40c3..0774ec4 100644
static void
diff --git a/gnome-initial-setup/pages/summary/gis-summary-page.c b/gnome-initial-setup/pages/summary/gis-summary-page.c
index b1e0f78..c14eb94 100644
index 8d86cce..53e4dee 100644
--- a/gnome-initial-setup/pages/summary/gis-summary-page.c
+++ b/gnome-initial-setup/pages/summary/gis-summary-page.c
@@ -190,7 +190,7 @@ done_cb (GtkButton *button, GisSummaryPage *page)
@@ -189,7 +189,7 @@ done_cb (GtkButton *button, GisSummaryPage *page)
log_user_in (page);
break;
case GIS_DRIVER_MODE_EXISTING_USER:
......@@ -3339,10 +3339,10 @@ index 0000000..8c1d52c
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="Layer_1" x="0px" y="0px" width="150px" height="150px" viewBox="0 0 400 400" style="enable-background:new 0 0 400 400;" xml:space="preserve"> <style type="text/css"> .st0{fill:#666666; fill-opacity:0.25;} </style> <g> <path class="st0" d="M301.4,372.4C271.7,390,237,400,200,400C89.5,400,0,310.5,0,200C0,89.5,89.5,0,200,0c110.5,0,200,89.5,200,200 c0,36.4-9.7,70.6-26.8,100l0,0L400,400l-100-26.8L301.4,372.4L301.4,372.4z"/> </g> </svg>
diff --git a/meson.build b/meson.build
index fa67311..d7ec0f0 100644
index bab863a..3c5fd19 100644
--- a/meson.build
+++ b/meson.build
@@ -73,6 +73,9 @@ libmalcontent_ui_dep = dependency ('malcontent-ui-0',
@@ -76,6 +76,9 @@ libmalcontent_ui_dep = dependency ('malcontent-ui-0',
have_parental_controls = libmalcontent_dep.found() and libmalcontent_ui_dep.found()
conf.set('HAVE_PARENTAL_CONTROLS', have_parental_controls)
......@@ -3353,15 +3353,17 @@ index fa67311..d7ec0f0 100644
configuration: conf)
config_h_dir = include_directories('.')
diff --git a/po/POTFILES.in b/po/POTFILES.in
index f0310ef..9b1b23f 100644
index 9bc7c20..e7d8d61 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,3 +1,4 @@
@@ -1,5 +1,6 @@
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
+data/com.ubuntu.welcome.policy.in
data/gnome-initial-setup-first-login.desktop.in.in
data/gnome-initial-setup.desktop.in.in
gnome-initial-setup/cc-common-language.c
@@ -41,3 +42,12 @@ gnome-initial-setup/pages/timezone/gis-timezone-page.c
@@ -44,3 +45,12 @@ gnome-initial-setup/pages/timezone/gis-timezone-page.c
gnome-initial-setup/pages/timezone/gis-timezone-page.ui
gnome-initial-setup/pages/welcome/gis-welcome-page.c
gnome-initial-setup/pages/welcome/gis-welcome-page.ui
......
......@@ -12,7 +12,7 @@ Subject: [PATCH 4/6] Make summary page explicitly request navigation buttons
5 files changed, 54 insertions(+), 3 deletions(-)
diff --git a/gnome-initial-setup/gis-assistant.c b/gnome-initial-setup/gis-assistant.c
index 8405357..b71cd07 100644
index 8b62f25..f0c24e5 100644
--- a/gnome-initial-setup/gis-assistant.c
+++ b/gnome-initial-setup/gis-assistant.c
@@ -47,6 +47,7 @@ struct _GisAssistant
......@@ -23,7 +23,7 @@ index 8405357..b71cd07 100644
GtkWidget *accept;
GtkWidget *skip;
GtkWidget *back;
@@ -121,7 +122,11 @@ find_next_page (GisAssistant *self,
@@ -109,7 +110,11 @@ find_next_page (GisAssistant *self,
static void
switch_to_next_page (GisAssistant *assistant)
{
......@@ -36,7 +36,7 @@ index 8405357..b71cd07 100644
}
static void
@@ -185,6 +190,7 @@ set_navigation_button (GisAssistant *assistant,
@@ -173,6 +178,7 @@ set_navigation_button (GisAssistant *assistant,
GtkWidget *widget)
{
gtk_widget_set_visible (assistant->forward, (widget == assistant->forward));
......@@ -44,7 +44,7 @@ index 8405357..b71cd07 100644
gtk_widget_set_visible (assistant->accept, (widget == assistant->accept));
gtk_widget_set_visible (assistant->skip, (widget == assistant->skip));
}
@@ -203,7 +209,7 @@ update_navigation_buttons (GisAssistant *assistant)
@@ -191,7 +197,7 @@ update_navigation_buttons (GisAssistant *assistant)
is_last_page = (l->next == NULL);
......@@ -53,7 +53,7 @@ index 8405357..b71cd07 100644
{
gtk_widget_hide (assistant->back);
gtk_widget_hide (assistant->forward);
@@ -223,6 +229,8 @@ update_navigation_buttons (GisAssistant *assistant)
@@ -209,6 +215,8 @@ update_navigation_buttons (GisAssistant *assistant)
if (gis_page_get_needs_accept (page))
next_widget = assistant->accept;
......@@ -62,7 +62,7 @@ index 8405357..b71cd07 100644
else
next_widget = assistant->forward;
@@ -254,6 +262,7 @@ update_applying_state (GisAssistant *assistant)
@@ -240,6 +248,7 @@ update_applying_state (GisAssistant *assistant)
is_first_page = assistant->pages->data == assistant->current_page;
}
gtk_widget_set_sensitive (assistant->forward, !applying);
......@@ -70,7 +70,7 @@ index 8405357..b71cd07 100644
gtk_widget_set_visible (assistant->back, !applying && !is_first_page);
gtk_widget_set_visible (assistant->cancel, applying);
gtk_widget_set_visible (assistant->spinner, applying);
@@ -405,6 +414,7 @@ gis_assistant_locale_changed (GisAssistant *assistant)
@@ -401,6 +410,7 @@ gis_assistant_locale_changed (GisAssistant *assistant)
GList *l;
gtk_button_set_label (GTK_BUTTON (assistant->forward), _("_Next"));
......@@ -78,7 +78,7 @@ index 8405357..b71cd07 100644
gtk_button_set_label (GTK_BUTTON (assistant->accept), _("_Accept"));
gtk_button_set_label (GTK_BUTTON (assistant->skip), _("_Skip"));
gtk_button_set_label (GTK_BUTTON (assistant->back), _("_Previous"));
@@ -440,6 +450,7 @@ gis_assistant_init (GisAssistant *assistant)
@@ -436,6 +446,7 @@ gis_assistant_init (GisAssistant *assistant)
G_CALLBACK (current_page_changed), assistant);
g_signal_connect (assistant->forward, "clicked", G_CALLBACK (go_forward), assistant);
......@@ -86,7 +86,7 @@ index 8405357..b71cd07 100644
g_signal_connect (assistant->accept, "clicked", G_CALLBACK (go_forward), assistant);
g_signal_connect (assistant->skip, "clicked", G_CALLBACK (go_forward), assistant);
@@ -478,6 +489,7 @@ gis_assistant_class_init (GisAssistantClass *klass)
@@ -474,6 +485,7 @@ gis_assistant_class_init (GisAssistantClass *klass)
gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/initial-setup/gis-assistant.ui");
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (klass), GisAssistant, forward);
......@@ -95,27 +95,27 @@ index 8405357..b71cd07 100644
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (klass), GisAssistant, skip);
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (klass), GisAssistant, back);
diff --git a/gnome-initial-setup/gis-assistant.ui b/gnome-initial-setup/gis-assistant.ui
index 936f829..faac293 100644
index 99d1e6d..cbfb7d4 100644
--- a/gnome-initial-setup/gis-assistant.ui
+++ b/gnome-initial-setup/gis-assistant.ui
@@ -68,6 +68,15 @@
<property name="pack-type">end</property>
</packing>
@@ -49,6 +49,15 @@
</style>
</object>
</child>
+ <child>
+ <child type="end">
+ <object class="GtkButton" id="done">
+ <property name="visible">False</property>
+ <property name="use-underline">True</property>
+ <property name="can-default">True</property>
+ <style>
+ <class name="suggested-action"/>
+ </style>
+ </object>
+ <packing>
+ <property name="pack-type">end</property>
+ </packing>
+ </child>
</object>
<object class="GtkSizeGroup" id="headerheight">
diff --git a/gnome-initial-setup/gis-page.c b/gnome-initial-setup/gis-page.c
index 25729d0..a6553c3 100644
index 7c53565..d8e2242 100644
--- a/gnome-initial-setup/gis-page.c
+++ b/gnome-initial-setup/gis-page.c
@@ -38,7 +38,8 @@ struct _GisPagePrivate
......@@ -166,7 +166,7 @@ index 25729d0..a6553c3 100644
obj_props[PROP_NEEDS_ACCEPT] =
g_param_spec_boolean ("needs-accept", "", "", FALSE,
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE);
@@ -293,6 +304,21 @@ gis_page_set_skippable (GisPage *page, gboolean skippable)
@@ -289,6 +300,21 @@ gis_page_set_skippable (GisPage *page, gboolean skippable)
g_object_notify_by_pspec (G_OBJECT (page), obj_props[PROP_SKIPPABLE]);
}
......@@ -189,10 +189,10 @@ index 25729d0..a6553c3 100644
gis_page_get_needs_accept (GisPage *page)
{
diff --git a/gnome-initial-setup/gis-page.h b/gnome-initial-setup/gis-page.h
index ecc38b6..3d6b25d 100644
index 9e46b45..742cc71 100644
--- a/gnome-initial-setup/gis-page.h
+++ b/gnome-initial-setup/gis-page.h
@@ -71,6 +71,8 @@ gboolean gis_page_get_complete (GisPage *page);
@@ -73,6 +73,8 @@ gboolean gis_page_get_complete (GisPage *page);
void gis_page_set_complete (GisPage *page, gboolean complete);
gboolean gis_page_get_skippable (GisPage *page);
void gis_page_set_skippable (GisPage *page, gboolean skippable);
......@@ -202,10 +202,10 @@ index ecc38b6..3d6b25d 100644
void gis_page_set_needs_accept (GisPage *page, gboolean needs_accept);
gboolean gis_page_get_has_forward (GisPage *page);
diff --git a/gnome-initial-setup/pages/summary/gis-summary-page.c b/gnome-initial-setup/pages/summary/gis-summary-page.c
index 09c00ab..b1e0f78 100644
index b947455..8d86cce 100644
--- a/gnome-initial-setup/pages/summary/gis-summary-page.c
+++ b/gnome-initial-setup/pages/summary/gis-summary-page.c
@@ -250,6 +250,8 @@ gis_summary_page_constructed (GObject *object)
@@ -249,6 +249,8 @@ gis_summary_page_constructed (GObject *object)
G_OBJECT_CLASS (gis_summary_page_parent_class)->constructed (object);
......
......@@ -10,15 +10,15 @@ Forwared: not-needed
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnome-initial-setup/pages/goa/gis-goa-page.c b/gnome-initial-setup/pages/goa/gis-goa-page.c
index 87341c4..bc135fc 100644
index b934825..c33c7fb 100644
--- a/gnome-initial-setup/pages/goa/gis-goa-page.c
+++ b/gnome-initial-setup/pages/goa/gis-goa-page.c
@@ -186,7 +186,7 @@ populate_provider_list (GisGoaPage *page)
@@ -306,7 +306,7 @@ populate_provider_list (GisGoaPage *page)
g_auto(GStrv) conf_providers =
gis_driver_conf_get_string_list (GIS_PAGE (page)->driver, VENDOR_GOA_GROUP, VENDOR_PROVIDERS_KEY, NULL);
GStrv providers = conf_providers ? conf_providers :
- (gchar *[]) { "google", "owncloud", "windows_live", "facebook", NULL };
+ (gchar *[]) { "ubuntusso", "google", "owncloud", "windows_live", "facebook", NULL };
/* This code will read the keyfile containing vendor customization options and
* look for options under the "goa" group, and supports the following keys:
listed_providers = run_goa_helper_sync ("list-providers", NULL);
providers_variant = g_variant_parse (G_VARIANT_TYPE ("a(ssviu)"),
......@@ -5,21 +5,21 @@ Subject: goa: adjust description to not mention email or contacts
GNOME doesn't have a core email app and Contacts might not be installed either
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=795077
Forwared: https://gitlab.gnome.org/GNOME/gnome-initial-setup/merge_requests/13/
Forwarded: https://gitlab.gnome.org/GNOME/gnome-initial-setup/merge_requests/13/
---
gnome-initial-setup/pages/goa/gis-goa-page.ui | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnome-initial-setup/pages/goa/gis-goa-page.ui b/gnome-initial-setup/pages/goa/gis-goa-page.ui
index 9ef1d95..f826da9 100644
index 96dab4e..30d178d 100644
--- a/gnome-initial-setup/pages/goa/gis-goa-page.ui
+++ b/gnome-initial-setup/pages/goa/gis-goa-page.ui
@@ -15,7 +15,7 @@
<property name="visible">True</property>
<property name="margin_top">24</property>
<property name="title" translatable="yes">Connect Your Online Accounts</property>
- <property name="subtitle" translatable="yes">Connect your accounts to easily access your email, online calendar, contacts, documents and photos.</property>
+ <property name="subtitle" translatable="yes">Connect your accounts to easily access your online calendar, documents, photos and more.</property>
<property name="icon_name">goa-panel-symbolic</property>
<property name="show_icon" bind-source="GisGoaPage" bind-property="small-screen" bind-flags="invert-boolean|sync-create"/>
</object>
@@ -10,7 +10,7 @@
<object class="GisPageHeader" id="header">
<property name="margin_top">24</property>
<property name="title" translatable="yes">Connect Your Online Accounts</property>
- <property name="subtitle" translatable="yes">Connect your accounts to easily access your email, online calendar, contacts, documents and photos.</property>
+ <property name="subtitle" translatable="yes">Connect your accounts to easily access your online calendar, documents, photos and more.</property>
<property name="icon_name">goa-panel-symbolic</property>
<property name="show_icon" bind-source="GisGoaPage" bind-property="small-screen" bind-flags="invert-boolean|sync-create"/>
</object>
......@@ -11,12 +11,12 @@ LP: #1797736
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/gnome-initial-setup/pages/goa/gis-goa-page.c b/gnome-initial-setup/pages/goa/gis-goa-page.c
index bc135fc..780a085 100644
index c33c7fb..88f27c1 100644
--- a/gnome-initial-setup/pages/goa/gis-goa-page.c
+++ b/gnome-initial-setup/pages/goa/gis-goa-page.c
@@ -62,6 +62,25 @@ struct _ProviderWidget {
};
typedef struct _ProviderWidget ProviderWidget;
@@ -174,6 +174,25 @@ run_goa_helper_async (const gchar *command,
g_task_run_in_thread (task, run_goa_helper_in_thread_func);
}
+static gboolean
+is_desktop (const gchar *name)
......@@ -40,8 +40,8 @@ index bc135fc..780a085 100644
static void
sync_provider_widget (ProviderWidget *provider_widget)
{
@@ -185,8 +204,10 @@ populate_provider_list (GisGoaPage *page)
{
@@ -305,8 +324,10 @@ populate_provider_list (GisGoaPage *page)
GVariant *provider;
g_auto(GStrv) conf_providers =
gis_driver_conf_get_string_list (GIS_PAGE (page)->driver, VENDOR_GOA_GROUP, VENDOR_PROVIDERS_KEY, NULL);
- GStrv providers = conf_providers ? conf_providers :
......@@ -50,5 +50,5 @@ index bc135fc..780a085 100644
(gchar *[]) { "ubuntusso", "google", "owncloud", "windows_live", "facebook", NULL };
+ GStrv providers = conf_providers ? conf_providers : default_providers;
/* This code will read the keyfile containing vendor customization options and
* look for options under the "goa" group, and supports the following keys:
listed_providers = run_goa_helper_sync ("list-providers", NULL);
providers_variant = g_variant_parse (G_VARIANT_TYPE ("a(ssviu)"),
0001-Make-summary-page-explicitly-request-navigation-butt.patch
0001-Ensure-stamp-file-if-the-user-quit-the-wizard.patch
0001-Add-Ubuntu-mode-with-special-pages.patch
0001-Display-the-ubuntu-welcome-wizard-in-Unity.patch
#0001-Add-Ubuntu-mode-with-special-pages.patch
#0001-Display-the-ubuntu-welcome-wizard-in-Unity.patch
0006-goa-Add-Ubuntu-Single-Sign-On-to-the-list.patch
0007-goa-adjust-description-to-not-mention-email-or-conta.patch
Don-t-show-Facebook-in-Ubuntu.patch
......
......@@ -8,12 +8,12 @@ Subject: ubuntu_newuser_wizard
1 file changed, 14 deletions(-)
diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c
index 46d0b48..0638f20 100644
index fd74bad..dba16e1 100644
--- a/gnome-initial-setup/gnome-initial-setup.c
+++ b/gnome-initial-setup/gnome-initial-setup.c
@@ -358,20 +358,6 @@ main (int argc, char *argv[])
driver = gis_driver_new (mode);
@@ -374,20 +374,6 @@ main (int argc, char *argv[])
adw_style_manager_set_color_scheme (adw_style_manager_get_default (),
ADW_COLOR_SCHEME_PREFER_LIGHT);
- /* On first login, GNOME Shell offers to run a tour. If we also run Initial
- * Setup, the two immovable, centred windows will sit atop one another.
......
......@@ -7,15 +7,15 @@ export DEB_LDFLAGS_MAINT_APPEND = -Wl,-z,defs
dh $@
# malcontent it not in Ubuntu main yet & is only built on some arches
ifeq (yes,$(shell dpkg-vendor --derives-from Ubuntu && echo yes))
PARENTAL_CONTROL := -Dparental_controls=disabled
else
ifneq (,$(filter $(DEB_HOST_ARCH), amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el s390x hppa powerpc powerpcspe ppc64))
PARENTAL_CONTROL := -Dparental_controls=enabled
else
#ifeq (yes,$(shell dpkg-vendor --derives-from Ubuntu && echo yes))
PARENTAL_CONTROL := -Dparental_controls=disabled
endif
endif
#else
#ifneq (,$(filter $(DEB_HOST_ARCH), amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el s390x hppa powerpc powerpcspe ppc64))
#PARENTAL_CONTROL := -Dparental_controls=enabled
#else
#PARENTAL_CONTROL := -Dparental_controls=disabled
#endif
#endif
override_dh_auto_configure:
dh_auto_configure -- \
......@@ -35,5 +35,5 @@ ifeq (yes,$(shell dpkg-vendor --derives-from Ubuntu && echo yes))
dh_gencontrol -- -Vlogo:Depends='gnome-control-center-data'
else
dh_gencontrol -- -Vlogo:Depends='desktop-base' \
-Vmalcontent:Recommends='malcontent [amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el s390x hppa powerpc powerpcspe ppc64]'
# -Vmalcontent:Recommends='malcontent [amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el s390x hppa powerpc powerpcspe ppc64]'
endif
......@@ -52,7 +52,6 @@ struct _GisAssistant
GtkWidget *back;
GtkWidget *cancel;
GtkWidget *main_layout;
GtkWidget *spinner;
GtkWidget *titlebar;
GtkWidget *title;
......@@ -70,17 +69,6 @@ visible_child_changed (GisAssistant *assistant)
g_signal_emit (assistant, signals[PAGE_CHANGED], 0);
}
static void
widget_destroyed (GtkWidget *widget,
GisAssistant *assistant)
{
GisPage *page = GIS_PAGE (widget);
assistant->pages = g_list_remove (assistant->pages, page);
if (page == assistant->current_page)
assistant->current_page = NULL;
}
static void
switch_to (GisAssistant *assistant,
GisPage *page)
......@@ -210,8 +198,6 @@ update_navigation_buttons (GisAssistant *assistant)
gtk_widget_hide (assistant->skip);
gtk_widget_hide (assistant->cancel);
gtk_widget_hide (assistant->accept);
/* FIXME: workaround for a GTK+ issue */
gtk_widget_queue_resize (assistant->titlebar);
}
else
{
......@@ -307,10 +293,9 @@ gis_assistant_add_page (GisAssistant *assistant,
link = g_list_last (assistant->pages);
link = link->prev;
g_signal_connect (page, "destroy", G_CALLBACK (widget_destroyed), assistant);
g_signal_connect (page, "notify", G_CALLBACK (page_notify), assistant);
gtk_container_add (GTK_CONTAINER (assistant->stack), GTK_WIDGET (page));
gtk_stack_add_child (GTK_STACK (assistant->stack), GTK_WIDGET (page));
/* Update buttons if current page is now the second last page */
if (assistant->current_page && link &&
......@@ -318,6 +303,17 @@ gis_assistant_add_page (GisAssistant *assistant,
update_navigation_buttons (assistant);
}
void
gis_assistant_remove_page (GisAssistant *assistant,
GisPage *page)
{
assistant->pages = g_list_remove (assistant->pages, page);
if (page == assistant->current_page)
assistant->current_page = NULL;
gtk_stack_remove (GTK_STACK (assistant->stack), GTK_WIDGET (page));
}
GisPage *
gis_assistant_get_current_page (GisAssistant *assistant)
{
......@@ -483,7 +479,6 @@ gis_assistant_class_init (GisAssistantClass *klass)
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (klass), GisAssistant, back);
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (klass), GisAssistant, cancel);
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (klass), GisAssistant, main_layout);
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (klass), GisAssistant, spinner);
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (klass), GisAssistant, titlebar);
gtk_widget_class_bind_template_child (GTK_WIDGET_CLASS (klass), GisAssistant, title);
......
......@@ -31,6 +31,8 @@ G_DECLARE_FINAL_TYPE (GisAssistant, gis_assistant, GIS, ASSISTANT, GtkBox)
void gis_assistant_add_page (GisAssistant *assistant,
GisPage *page);
void gis_assistant_remove_page (GisAssistant *assistant,
GisPage *page);
void gis_assistant_next_page (GisAssistant *assistant);
void gis_assistant_previous_page (GisAssistant *assistant);
......
<?xml version="1.0" encoding="UTF-8"?>
<interface domain="gtk30">
<!-- interface-requires gtk+ 3.10 -->
<object class="GtkHeaderBar" id="titlebar">
<property name="visible">True</property>
<child type="title">
<object class="GtkLabel" id="title">
<property name="visible">True</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
......@@ -13,60 +10,44 @@
</child>
<child>
<object class="GtkButton" id="cancel">
<property name="visible">True</property>
<property name="use-underline">True</property>
</object>
</child>
<child>
<object class="GtkButton" id="back">
<property name="visible">True</property>
<property name="use-underline">True</property>
</object>
</child>
<child>
<object class="GtkLabel" id="placeholder">
<property name="visible">True</property>
</object>
</child>
<child>
<object class="GtkSpinner" id="spinner">
<property name="visible">True</property>
</object>
<packing>
<property name="pack-type">end</property>
</packing>
<child type="end">
<object class="GtkSpinner" id="spinner" />
</child>
<child>
<child type="end">
<object class="GtkButton" id="skip">
<property name="visible">False</property>
<property name="use-underline">True</property>
</object>
<packing>
<property name="pack-type">end</property>
</packing>
</child>
<child>
<child type="end">
<object class="GtkButton" id="forward">
<property name="visible">False</property>
<property name="use-underline">True</property>
<property name="can-default">True</property>
<style>
<class name="suggested-action"/>
</style>
</object>
<packing>
<property name="pack-type">end</property>
</packing>
</child>
<child>
<child type="end">
<object class="GtkButton" id="accept">
<property name="visible">False</property>
<property name="use-underline">True</property>
<property name="can-default">True</property>
<style>
<class name="suggested-action"/>
</style>
</object>
<packing>
<property name="pack-type">end</property>
</packing>
</child>
</object>
......@@ -81,21 +62,13 @@
<template class="GisAssistant" parent="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="main_layout">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkStack" id="stack">
<property name="visible">True</property>
<property name="transition-type">slide-left-right</property>
<property name="vexpand">True</property>
<property name="hexpand">True</property>
<property name="hhomogeneous">False</property>
<property name="vhomogeneous">False</property>
<signal name="notify::visible-child" handler="visible_child_changed" object="GisAssistant" swapped="yes"/>
</object>
</child>
<object class="GtkStack" id="stack">
<property name="transition-type">slide-left-right</property>
<property name="vexpand">True</property>
<property name="hexpand">True</property>
<property name="hhomogeneous">False</property>
<property name="vhomogeneous">False</property>
<signal name="notify::visible-child" handler="visible_child_changed" object="GisAssistant" swapped="yes"/>
</object>
</child>
</template>
......
......@@ -70,7 +70,7 @@ typedef enum {
static GParamSpec *obj_props[PROP_AVATAR + 1];
struct _GisDriver {
GtkApplication parent_instance;
AdwApplication parent_instance;
GtkWindow *main_window;
GisAssistant *assistant;
......@@ -91,7 +91,7 @@ struct _GisDriver {
gchar *username;
gchar *full_name; /* (owned) (nullable) */
GdkPixbuf *avatar; /* (owned) (nullable) */
GdkPaintable *avatar; /* (owned) (nullable) */
GisDriverMode mode;
UmAccountMode account_mode;
......@@ -103,7 +103,7 @@ struct _GisDriver {
GKeyFile *vendor_conf_file;
};
G_DEFINE_TYPE (GisDriver, gis_driver, GTK_TYPE_APPLICATION)
G_DEFINE_TYPE (GisDriver, gis_driver, ADW_TYPE_APPLICATION)
static void
gis_driver_dispose (GObject *object)
......@@ -155,12 +155,12 @@ prepare_main_window (GisDriver *driver)
{
GtkWidget *child, *sw;
child = g_object_ref (gtk_bin_get_child (GTK_BIN (driver->main_window)));
gtk_container_remove (GTK_CONTAINER (driver->main_window), child);
sw = gtk_scrolled_window_new (NULL, NULL);
gtk_widget_show (sw);
gtk_container_add (GTK_CONTAINER (driver->main_window), sw);
gtk_container_add (GTK_CONTAINER (sw), child);
child = gtk_window_get_child (GTK_WINDOW (driver->main_window));
g_object_ref (child);
gtk_window_set_child (GTK_WINDOW (driver->main_window), NULL);
sw = gtk_scrolled_window_new ();
gtk_window_set_child (GTK_WINDOW (driver->main_window), sw);
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), child);
g_object_unref (child);
g_signal_connect_swapped (driver->assistant,
......@@ -299,11 +299,11 @@ gis_driver_get_full_name (GisDriver *driver)
* Since: 3.36
*/
void
gis_driver_set_avatar (GisDriver *driver,
GdkPixbuf *avatar)
gis_driver_set_avatar (GisDriver *driver,
GdkPaintable *avatar)
{
g_return_if_fail (GIS_IS_DRIVER (driver));
g_return_if_fail (avatar == NULL || GDK_IS_PIXBUF (avatar));
g_return_if_fail (avatar == NULL || GDK_IS_PAINTABLE (avatar));
if (g_set_object (&driver->avatar, avatar))
g_object_notify_by_pspec (G_OBJECT (driver), obj_props[PROP_AVATAR]);
......@@ -318,7 +318,7 @@ gis_driver_set_avatar (GisDriver *driver,
* Returns: (nullable) (transfer none): avatar of the main user, or %NULL if not known
* Since: 3.36
*/
GdkPixbuf *
GdkPaintable *
gis_driver_get_avatar (GisDriver *driver)
{
g_return_val_if_fail (GIS_IS_DRIVER (driver), NULL);
......@@ -677,41 +677,22 @@ gis_driver_activate (GApplication *app)
gtk_window_present (GTK_WINDOW (driver->main_window));
}
static void
set_small_screen_based_on_primary_monitor (GisDriver *driver)
{
GdkDisplay *default_display;
GdkMonitor *primary_monitor;
default_display = gdk_display_get_default ();
if (default_display == NULL)
return;
primary_monitor = gdk_display_get_primary_monitor (default_display);
if (primary_monitor == NULL)
return;
driver->small_screen = monitor_is_small (primary_monitor);
}
/* Recompute driver->small_screen based on the monitor where the window is
* located, if the window is actually realized. If not, recompute it based on
* the primary monitor of the default display. */
static void
recompute_small_screen (GisDriver *driver) {
GdkWindow *window;
GdkDisplay *default_display = gdk_display_get_default ();
recompute_small_screen (GisDriver *driver)
{
GdkMonitor *active_monitor;
gboolean old_value = driver->small_screen;
if (!gtk_widget_get_realized (GTK_WIDGET (driver->main_window)))
{
set_small_screen_based_on_primary_monitor (driver);
}
else
if (gtk_widget_get_realized (GTK_WIDGET (driver->main_window)))
{
window = gtk_widget_get_window (GTK_WIDGET (driver->main_window));
active_monitor = gdk_display_get_monitor_at_window (default_display, window);
GdkDisplay *default_display = gdk_display_get_default ();
GdkSurface *surface;
surface = gtk_native_get_surface (GTK_NATIVE (driver->main_window));
active_monitor = gdk_display_get_monitor_at_surface (default_display, surface);
driver->small_screen = monitor_is_small (active_monitor);
}
......@@ -722,8 +703,6 @@ recompute_small_screen (GisDriver *driver) {
static void
update_screen_size (GisDriver *driver)
{
GdkWindow *window;
GdkGeometry size_hints;
GtkWidget *sw;
recompute_small_screen (driver);
......@@ -731,55 +710,34 @@ update_screen_size (GisDriver *driver)
if (!gtk_widget_get_realized (GTK_WIDGET (driver->main_window)))
return;
sw = gtk_bin_get_child (GTK_BIN (driver->main_window));
window = gtk_widget_get_window (GTK_WIDGET (driver->main_window));
sw = gtk_window_get_child (GTK_WINDOW (driver->main_window));
if (driver->small_screen)
{
if (window)
gdk_window_set_functions (window,
GDK_FUNC_ALL | GDK_FUNC_MINIMIZE | GDK_FUNC_CLOSE);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_window_set_geometry_hints (driver->main_window, NULL, NULL, 0);
gtk_window_set_default_size (driver->main_window, -1, -1);
gtk_window_set_resizable (driver->main_window, TRUE);
gtk_window_set_position (driver->main_window, GTK_WIN_POS_NONE);
gtk_window_maximize (driver->main_window);
gtk_window_present (driver->main_window);
}
else
{
if (window)
gdk_window_set_functions (window,
GDK_FUNC_ALL | GDK_FUNC_MINIMIZE | GDK_FUNC_CLOSE |
GDK_FUNC_RESIZE | GDK_FUNC_MOVE | GDK_FUNC_MAXIMIZE);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_NEVER,
GTK_POLICY_NEVER);
size_hints.min_width = size_hints.max_width = 1024;
size_hints.min_height = size_hints.max_height = 768;
size_hints.win_gravity = GDK_GRAVITY_CENTER;
gtk_window_set_geometry_hints (driver->main_window,
NULL,
&size_hints,
GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE | GDK_HINT_WIN_GRAVITY);
gtk_window_set_default_size (driver->main_window, 1024, 768);
gtk_window_set_resizable (driver->main_window, FALSE);
gtk_window_set_position (driver->main_window, GTK_WIN_POS_CENTER_ALWAYS);
gtk_window_unmaximize (driver->main_window);
gtk_window_present (driver->main_window);
}
}
static void
screen_size_changed (GdkScreen *screen, GisDriver *driver)
on_surface_enter_monitor_cb (GdkSurface *surface,
GdkMonitor *monitor,
GisDriver *driver)
{
update_screen_size (driver);
}
......@@ -787,7 +745,15 @@ screen_size_changed (GdkScreen *screen, GisDriver *driver)
static void
window_realize_cb (GtkWidget *widget, gpointer user_data)
{
update_screen_size (GIS_DRIVER (user_data));
GdkSurface *surface;
GisDriver *driver;
driver = GIS_DRIVER (user_data);
surface = gtk_native_get_surface (GTK_NATIVE (widget));
g_signal_connect (surface, "enter-monitor", G_CALLBACK (on_surface_enter_monitor_cb), driver);
update_screen_size (driver);
}
static void
......@@ -824,7 +790,6 @@ gis_driver_startup (GApplication *app)
driver->main_window = g_object_new (GTK_TYPE_APPLICATION_WINDOW,
"application", app,
"type", GTK_WINDOW_TOPLEVEL,
"icon-name", "preferences-system",
"deletable", FALSE,
NULL);
......@@ -835,9 +800,8 @@ gis_driver_startup (GApplication *app)
(gpointer)app);
driver->assistant = g_object_new (GIS_TYPE_ASSISTANT, NULL);
gtk_container_add (GTK_CONTAINER (driver->main_window), GTK_WIDGET (driver->assistant));
gtk_widget_show (GTK_WIDGET (driver->assistant));
gtk_window_set_child (GTK_WINDOW (driver->main_window),
GTK_WIDGET (driver->assistant));
gis_driver_set_user_language (driver, setlocale (LC_MESSAGES, NULL), FALSE);
......@@ -848,17 +812,7 @@ gis_driver_startup (GApplication *app)
static void
gis_driver_init (GisDriver *driver)
{
GdkScreen *screen;
screen = gdk_screen_get_default ();
set_small_screen_based_on_primary_monitor (driver);
load_vendor_conf_file (driver);
if (screen != NULL)
g_signal_connect (screen, "size-changed",
G_CALLBACK (screen_size_changed), driver);
}
static void
......@@ -948,7 +902,7 @@ gis_driver_class_init (GisDriverClass *klass)
g_param_spec_object ("avatar",
"Avatar",
"Avatar of the main user.",
GDK_TYPE_PIXBUF,
GDK_TYPE_PAINTABLE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_properties (gobject_class, G_N_ELEMENTS (obj_props), obj_props);
......