[libdazzle] shortcuts: use internal instead of __internal__



commit 4cd37d4dc40ba13d663d7ba60bcee4f4ef130c6d
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jun 14 19:23:49 2017 -0700

    shortcuts: use internal instead of __internal__
    
    Using "internal" is a sufficient name without the dangling lines.

 src/shortcuts/dzl-shortcut-manager.c    |    8 ++++----
 src/shortcuts/dzl-shortcut-theme-save.c |    2 +-
 tests/test-shortcut-theme.c             |    4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/shortcuts/dzl-shortcut-manager.c b/src/shortcuts/dzl-shortcut-manager.c
index 55b4e94..91e8b06 100644
--- a/src/shortcuts/dzl-shortcut-manager.c
+++ b/src/shortcuts/dzl-shortcut-manager.c
@@ -186,7 +186,7 @@ dzl_shortcut_manager_reload (DzlShortcutManager *self,
    * a "default" item in the list as we should always have one. We'll append to
    * it when loading the default theme anyway.
    *
-   * The default theme always inherits from __internal__ so that we can store
+   * The default theme always inherits from internal so that we can store
    * our widget/controller defined shortcuts separate from the mutable default
    * theme which various applications might want to tweak in their overrides.
    */
@@ -195,7 +195,7 @@ dzl_shortcut_manager_reload (DzlShortcutManager *self,
   g_ptr_array_add (priv->themes, g_object_new (DZL_TYPE_SHORTCUT_THEME,
                                                "name", "default",
                                                "title", _("Default Shortcuts"),
-                                               "parent-name", "__internal__",
+                                               "parent-name", "internal",
                                                NULL));
   _dzl_shortcut_theme_set_manager (g_ptr_array_index (priv->themes, 0), self);
   g_list_model_items_changed (G_LIST_MODEL (self), 0, previous_len, 1);
@@ -393,7 +393,7 @@ dzl_shortcut_manager_init (DzlShortcutManager *self)
   priv->themes = g_ptr_array_new_with_free_func (destroy_theme);
   priv->root = g_node_new (NULL);
   priv->internal_theme = g_object_new (DZL_TYPE_SHORTCUT_THEME,
-                                       "name", "__internal__",
+                                       "name", "internal",
                                        NULL);
 }
 
@@ -1247,7 +1247,7 @@ dzl_shortcut_manager_get_theme_by_name (DzlShortcutManager *self,
 
   g_return_val_if_fail (DZL_IS_SHORTCUT_MANAGER (self), NULL);
 
-  if (theme_name == NULL || g_strcmp0 (theme_name, "__internal__") == 0)
+  if (theme_name == NULL || g_strcmp0 (theme_name, "internal") == 0)
     return priv->internal_theme;
 
   for (guint i = 0; i < priv->themes->len; i++)
diff --git a/src/shortcuts/dzl-shortcut-theme-save.c b/src/shortcuts/dzl-shortcut-theme-save.c
index 88effaa..b806ffe 100644
--- a/src/shortcuts/dzl-shortcut-theme-save.c
+++ b/src/shortcuts/dzl-shortcut-theme-save.c
@@ -49,7 +49,7 @@ dzl_shortcut_theme_save_to_stream (DzlShortcutTheme  *self,
   title = dzl_shortcut_theme_get_title (self);
   subtitle = dzl_shortcut_theme_get_subtitle (self);
 
-  if (parent != NULL && !g_str_equal (parent, "__internal__"))
+  if (parent != NULL && !g_str_equal (parent, "internal"))
     g_string_append_printf (str, "<theme name=\"%s\" parent=\"%s\">\n", name, parent);
   else
     g_string_append_printf (str, "<theme name=\"%s\">\n", name);
diff --git a/tests/test-shortcut-theme.c b/tests/test-shortcut-theme.c
index 8eef504..551d174 100644
--- a/tests/test-shortcut-theme.c
+++ b/tests/test-shortcut-theme.c
@@ -62,7 +62,7 @@ test_shortcut_theme_manager (void)
 
   theme = dzl_shortcut_manager_get_theme_by_name (manager, NULL);
   g_assert (DZL_IS_SHORTCUT_THEME (theme));
-  g_assert (theme == dzl_shortcut_manager_get_theme_by_name (manager, "__internal__"));
+  g_assert (theme == dzl_shortcut_manager_get_theme_by_name (manager, "internal"));
   g_assert_cmpstr (dzl_shortcut_theme_get_parent_name (theme), ==, NULL);
 
   theme = dzl_shortcut_manager_get_theme_by_name (manager, "default");
@@ -75,7 +75,7 @@ test_shortcut_theme_manager (void)
 
   theme = dzl_shortcut_manager_get_theme_by_name (manager, "default");
   g_assert (DZL_IS_SHORTCUT_THEME (theme));
-  g_assert_cmpstr ("__internal__", ==, dzl_shortcut_theme_get_parent_name (theme));
+  g_assert_cmpstr ("internal", ==, dzl_shortcut_theme_get_parent_name (theme));
 
   /* Add a command and make sure we can resolve it */
   window = gtk_offscreen_window_new ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]