[gnome-initial-setup/youre-welcome: 5/6] skip vfunc no longer needs to return gboolean
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup/youre-welcome: 5/6] skip vfunc no longer needs to return gboolean
- Date: Fri, 7 Aug 2020 10:46:14 +0000 (UTC)
commit bce4ec69ffbda2e6f7338b375c68f362f1c597f3
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Thu Aug 6 10:52:07 2020 -0500
skip vfunc no longer needs to return gboolean
Now that the language page no longer overrides skip, the skip vfunc no
longer needs a return value. Currently it returns FALSE to indicate that
the page should not actually be skipped, and TRUE to indicate that it's
OK to skip the page. (This is, confusingly, completely separate from
gis_page_is_skippable(), which indicates whether the user can proceed
without taking any action, not whether the entire page disappears.)
Anyway, the language page was the only page that would refuse to be
skipped, so there's no longer any reason to keep the return value.
gnome-initial-setup/gis-page.c | 5 ++---
gnome-initial-setup/gis-page.h | 4 ++--
gnome-initial-setup/gnome-initial-setup.c | 6 ++++--
gnome-initial-setup/pages/keyboard/gis-keyboard-page.c | 3 +--
4 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/gnome-initial-setup/gis-page.c b/gnome-initial-setup/gis-page.c
index 23d8f875..25729d09 100644
--- a/gnome-initial-setup/gis-page.c
+++ b/gnome-initial-setup/gis-page.c
@@ -418,10 +418,9 @@ gis_page_shown (GisPage *page)
GIS_PAGE_GET_CLASS (page)->shown (page);
}
-gboolean
+void
gis_page_skip (GisPage *page)
{
if (GIS_PAGE_GET_CLASS (page)->skip)
- return GIS_PAGE_GET_CLASS (page)->skip (page);
- return TRUE;
+ GIS_PAGE_GET_CLASS (page)->skip (page);
}
diff --git a/gnome-initial-setup/gis-page.h b/gnome-initial-setup/gis-page.h
index 96191b16..56aa0f86 100644
--- a/gnome-initial-setup/gis-page.h
+++ b/gnome-initial-setup/gis-page.h
@@ -63,7 +63,7 @@ struct _GisPageClass
gboolean (*save_data) (GisPage *page,
GError **error);
void (*shown) (GisPage *page);
- gboolean (*skip) (GisPage *page);
+ void (*skip) (GisPage *page);
};
GType gis_page_get_type (void);
@@ -86,7 +86,7 @@ gboolean gis_page_get_applying (GisPage *page);
gboolean gis_page_save_data (GisPage *page,
GError **error);
void gis_page_shown (GisPage *page);
-gboolean gis_page_skip (GisPage *page);
+void gis_page_skip (GisPage *page);
G_END_DECLS
diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c
index 7e2a5dc3..7a826dba 100644
--- a/gnome-initial-setup/gnome-initial-setup.c
+++ b/gnome-initial-setup/gnome-initial-setup.c
@@ -212,10 +212,12 @@ rebuild_pages_cb (GisDriver *driver)
if (!page)
continue;
- if (skipped && gis_page_skip (page))
+ if (skipped) {
+ gis_page_skip (page);
g_ptr_array_add (skipped_pages, page);
- else
+ } else {
gis_driver_add_page (driver, page);
+ }
}
g_strfreev (skip_pages);
diff --git a/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c
b/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c
index c9afe82a..3adfd663 100644
--- a/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c
+++ b/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c
@@ -330,7 +330,7 @@ skip_proxy_ready (GObject *source,
g_object_unref (proxy);
}
-static gboolean
+static void
gis_keyboard_page_skip (GisPage *page)
{
GisKeyboardPage *self = GIS_KEYBOARD_PAGE (page);
@@ -345,7 +345,6 @@ gis_keyboard_page_skip (GisPage *page)
priv->cancellable,
(GAsyncReadyCallback) skip_proxy_ready,
self);
- return TRUE;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]