[gnome-initial-setup/wip/pwithnall/misc-fixes: 68/70] language: constify a few variables in GisWelcomeWidget
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup/wip/pwithnall/misc-fixes: 68/70] language: constify a few variables in GisWelcomeWidget
- Date: Fri, 11 Sep 2020 13:29:16 +0000 (UTC)
commit 97602c5037e07bdd3351af5aef6c1707096210c5
Author: Philip Withnall <withnall endlessm com>
Date: Fri Sep 11 12:21:34 2020 +0100
language: constify a few variables in GisWelcomeWidget
Clarifies ownership a little.
Signed-off-by: Philip Withnall <withnall endlessm com>
gnome-initial-setup/pages/language/gis-welcome-widget.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/gnome-initial-setup/pages/language/gis-welcome-widget.c
b/gnome-initial-setup/pages/language/gis-welcome-widget.c
index 6f6b8b05..87f87c59 100644
--- a/gnome-initial-setup/pages/language/gis-welcome-widget.c
+++ b/gnome-initial-setup/pages/language/gis-welcome-widget.c
@@ -109,12 +109,12 @@ gis_welcome_widget_unmap (GtkWidget *widget)
gis_welcome_widget_stop (GIS_WELCOME_WIDGET (widget));
}
-static char *
+static const char *
welcome (const char *locale_id)
{
locale_t locale;
locale_t old_locale;
- char *welcome;
+ const char *welcome;
locale = newlocale (LC_MESSAGES_MASK, locale_id, (locale_t) 0);
if (locale == (locale_t) 0)
@@ -165,8 +165,8 @@ fill_stack (GisWelcomeWidget *widget)
g_hash_table_iter_init (&iter, initial);
while (g_hash_table_iter_next (&iter, &key, &value))
{
- char *locale_id = key;
- char *text;
+ const char *locale_id = key;
+ const char *text;
GtkWidget *label;
if (!cc_common_language_has_font (locale_id))
@@ -178,7 +178,7 @@ fill_stack (GisWelcomeWidget *widget)
label = big_label (text);
gtk_container_add (GTK_CONTAINER (priv->stack), label);
gtk_widget_show (label);
- g_hash_table_insert (added_translations, text, label);
+ g_hash_table_insert (added_translations, (gpointer) text, label);
}
g_hash_table_insert (priv->translation_widgets, locale_id, label);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]