Skip to content
Commits on Source (61)
......@@ -4,3 +4,5 @@
# GNOME Builder litter
/.buildconfig
/subprojects/*
!/subprojects/*.wrap
\ No newline at end of file
44.rc
-----
Enhancements:
- The About You page now makes it clear that you can choose a different avatar.
(#174)
Bug fixes:
- Double-clicking on the headerbar no longer makes the window super small.
(#136)
- The keyboard layout list is no longer empty until you search or expand it.
(#165)
- Non-ASCII characters in location names are now displayed correctly on the
timezone page. Previously, changing the language on the first page would
cause them to be mangled. (#177)
- StartupWMClass is now set in the .desktop file, allowing GNOME Shell to
associate the app window with the desktop file. (!187)
Translation updates:
- Basque
- Belarusian
- Catalan
- Czech
- Finnish
- Friulian
- Galician
- Georgian
- German
- Greek, Modern (1453-)
- Hebrew
- Hindi
- Hungarian
- Indonesian
- Korean
- Lithuanian
- Occitan (post 1500)
- Portuguese
- Serbian
- Slovenian
- Spanish
- Turkish
44.beta
-------
......
......@@ -10,3 +10,4 @@ Categories=GNOME;GTK;System;
OnlyShowIn=GNOME;
NoDisplay=true
X-GNOME-HiddenUnderSystemd=@systemd_hidden@
StartupWMClass=org.gnome.InitialSetup
......@@ -241,7 +241,7 @@ insert_language (GHashTable *ht,
char *label_untranslated;
char *key;
locale = newlocale (LC_MESSAGES_MASK, lang, (locale_t) 0);
locale = newlocale (LC_ALL_MASK, lang, (locale_t) 0);
if (locale == (locale_t) 0) {
g_debug ("%s: Failed to create locale %s", G_STRFUNC, lang);
return;
......
......@@ -3,6 +3,5 @@
<gresource prefix="/org/gnome/initial-setup">
<file preprocess="xml-stripblanks">gis-assistant.ui</file>
<file preprocess="xml-stripblanks">gis-page-header.ui</file>
<file>gis-page-header.css</file>
</gresource>
</gresources>
......@@ -213,7 +213,7 @@ gis_driver_set_user_language (GisDriver *driver, const gchar *lang_id, gboolean
if (update_locale)
{
locale_t locale = newlocale (LC_MESSAGES_MASK, lang_id, (locale_t) 0);
locale_t locale = newlocale (LC_ALL_MASK, lang_id, (locale_t) 0);
if (locale == (locale_t) 0)
{
g_warning ("Failed to create locale %s: %s", lang_id, g_strerror (errno));
......@@ -722,7 +722,7 @@ update_screen_size (GisDriver *driver)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_window_set_default_size (driver->main_window, -1, -1);
gtk_window_set_default_size (driver->main_window, 800, 600);
gtk_window_set_resizable (driver->main_window, TRUE);
gtk_window_maximize (driver->main_window);
gtk_window_present (driver->main_window);
......
......@@ -194,10 +194,4 @@ gis_page_header_class_init (GisPageHeaderClass *klass)
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties (gobject_class, PROP_LAST, obj_props);
g_autoptr(GtkCssProvider) provider = gtk_css_provider_new ();
gtk_css_provider_load_from_resource (provider, "/org/gnome/initial-setup/gis-page-header.css");
gtk_style_context_add_provider_for_display (gdk_display_get_default (),
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
}
/* Styles borrowed from GTK 4
* https://gitlab.gnome.org/GNOME/gtk/blob/672d7f679adf543785042ab45d7e59688103464c/gtk/theme/Adwaita/_common.scss#L287-327
*/
.large-title {
font-weight: 300;
font-size: 24pt;
letter-spacing: 0.2rem;
}
.title-1 {
font-weight: 800;
font-size: 20pt;
}
/*
* Copyright 2023 Endless OS Foundation LLC
*
* 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 2 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/>.
*/
#include "config.h"
#include <gtk/gtk.h>
#include "gis-util.h"
void
gis_add_style_from_resource (const char *resource_path)
{
g_autoptr(GtkCssProvider) provider = gtk_css_provider_new ();
gtk_css_provider_load_from_resource (provider, resource_path);
gtk_style_context_add_provider_for_display (gdk_display_get_default (),
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
}
/*
* Copyright 2023 Endless OS Foundation LLC
*
* 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 2 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/>.
*/
#pragma once
void gis_add_style_from_resource (const char *path);
......@@ -35,6 +35,7 @@ typedef struct _GisPage GisPage;
#include "gis-page.h"
#include "gis-pkexec.h"
#include "gis-keyring.h"
#include "gis-util.h"
void gis_ensure_stamp_files (GisDriver *driver);
gboolean gis_get_mock_mode (void);
......
......@@ -16,6 +16,7 @@ sources += [
'gis-pkexec.c',
'gis-driver.c',
'gis-keyring.c',
'gis-util.c',
'gnome-initial-setup.h',
'gis-assistant.h',
'gis-page.h',
......
......@@ -5,5 +5,6 @@
<file preprocess="xml-stripblanks" alias="gis-account-page.ui">gis-account-page.ui</file>
<file preprocess="xml-stripblanks" alias="gis-account-page-local.ui">gis-account-page-local.ui</file>
<file preprocess="xml-stripblanks" alias="gis-account-page-enterprise.ui">gis-account-page-enterprise.ui</file>
<file alias="gis-account-page.css">gis-account-page.css</file>
</gresource>
</gresources>
......@@ -7,21 +7,35 @@
<property name="valign">fill</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkMenuButton" id="avatar_button">
<object class="GtkOverlay">
<property name="margin_top">24</property>
<property name="halign">center</property>
<style>
<class name="flat"/>
</style>
<accessibility>
<property name="description" translatable="yes">Avatar image</property>
</accessibility>
<child>
<object class="GtkImage" id="avatar_image">
<property name="pixel_size">96</property>
<property name="icon_name">avatar-default-symbolic</property>
</object>
</child>
<child type="overlay">
<object class="AdwBin">
<style>
<class name="cutout-button"/>
</style>
<property name="halign">end</property>
<property name="valign">end</property>
<child>
<object class="GtkMenuButton" id="avatar_button">
<property name="icon-name">document-edit-symbolic</property>
<accessibility>
<property name="label" translatable="yes">Edit avatar</property>
</accessibility>
<style>
<class name="circular"/>
</style>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
......
......@@ -296,12 +296,13 @@ gis_account_page_class_init (GisAccountPageClass *klass)
page_class->save_data = gis_account_page_save_data;
page_class->shown = gis_account_page_shown;
object_class->constructed = gis_account_page_constructed;
gis_add_style_from_resource ("/org/gnome/initial-setup/gis-account-page.css");
}
static void
gis_account_page_init (GisAccountPage *page)
{
g_resources_register (account_get_resource ());
g_type_ensure (GIS_TYPE_ACCOUNT_PAGE_LOCAL);
g_type_ensure (GIS_TYPE_ACCOUNT_PAGE_ENTERPRISE);
......
.cutout-button {
background-color: @window_bg_color;
border-radius: 9999px;
padding: 2px;
}
......@@ -578,23 +578,16 @@ gis_goa_page_class_init (GisGoaPageClass *klass)
object_class->dispose = gis_goa_page_dispose;
widget_class->realize = gis_goa_page_realize;
widget_class->unrealize = gis_goa_page_unrealize;
gis_add_style_from_resource ("/org/gnome/initial-setup/gis-goa-page.css");
}
static void
gis_goa_page_init (GisGoaPage *page)
{
g_autoptr(GtkCssProvider) provider = NULL;
g_resources_register (goa_get_resource ());
g_type_ensure (GIS_TYPE_PAGE_HEADER);
gtk_widget_init_template (GTK_WIDGET (page));
provider = gtk_css_provider_new ();
gtk_css_provider_load_from_resource (provider, "/org/gnome/initial-setup/gis-goa-page.css");
gtk_style_context_add_provider_for_display (gdk_display_get_default (),
GTK_STYLE_PROVIDER (provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
}
GisPage *
......
......@@ -5,4 +5,3 @@
<file alias="gis-goa-page.css">gis-goa-page.css</file>
</gresource>
</gresources>
......@@ -255,6 +255,7 @@ sync_all_checkmarks (CcInputChooser *chooser)
{
CcInputChooserPrivate *priv;
GtkWidget *row;
gboolean invalidate = FALSE;
priv = cc_input_chooser_get_instance_private (chooser);
row = gtk_widget_get_first_child (priv->input_list);
......@@ -267,7 +268,7 @@ sync_all_checkmarks (CcInputChooser *chooser)
widget = get_input_widget (child);
if (widget == NULL)
return;
break;
if (priv->id == NULL || priv->type == NULL)
should_be_visible = FALSE;
......@@ -276,13 +277,20 @@ sync_all_checkmarks (CcInputChooser *chooser)
g_strcmp0 (widget->type, priv->type) == 0;
gtk_widget_set_opacity (widget->checkmark, should_be_visible ? 1.0 : 0.0);
if (widget->is_extra && should_be_visible)
if (widget->is_extra && should_be_visible) {
g_debug ("Marking selected layout %s (%s:%s) as non-extra",
widget->name, widget->type, widget->id);
widget->is_extra = FALSE;
invalidate = TRUE;
}
row = gtk_widget_get_next_sibling (row);
}
gtk_list_box_invalidate_filter (GTK_LIST_BOX (priv->input_list));
if (invalidate) {
gtk_list_box_invalidate_sort (GTK_LIST_BOX (priv->input_list));
gtk_list_box_invalidate_filter (GTK_LIST_BOX (priv->input_list));
}
}
static GtkWidget *
......@@ -340,10 +348,18 @@ choose_non_extras (CcInputChooser *chooser)
if (widget == NULL)
break;
g_debug ("Picking %s (%s:%s) as non-extra",
widget->name, widget->type, widget->id);
widget->is_extra = FALSE;
row = gtk_widget_get_next_sibling (row);
}
/* Changing is_extra above affects the ordering and the visibility
* of the newly non-extra rows.
*/
gtk_list_box_invalidate_sort (GTK_LIST_BOX (priv->input_list));
gtk_list_box_invalidate_filter (GTK_LIST_BOX (priv->input_list));
}
static void
......
......@@ -465,8 +465,6 @@ gis_keyboard_page_constructed (GObject *object)
GisKeyboardPage *self = GIS_KEYBOARD_PAGE (object);
GisKeyboardPagePrivate *priv = gis_keyboard_page_get_instance_private (self);
g_type_ensure (CC_TYPE_INPUT_CHOOSER);
G_OBJECT_CLASS (gis_keyboard_page_parent_class)->constructed (object);
g_signal_connect (priv->input_chooser, "confirm",
......@@ -525,7 +523,6 @@ gis_keyboard_page_class_init (GisKeyboardPageClass * klass)
static void
gis_keyboard_page_init (GisKeyboardPage *self)
{
g_resources_register (keyboard_get_resource ());
g_type_ensure (GIS_TYPE_PAGE_HEADER);
g_type_ensure (CC_TYPE_INPUT_CHOOSER);
......