[libdazzle] shortcuts: use "keytheme" instead of "theme"



commit 820527088fbd535d1448f602f2f8f444dd765274
Author: Christian Hergert <chergert redhat com>
Date:   Fri Jun 16 13:51:23 2017 -0700

    shortcuts: use "keytheme" instead of "theme"
    
    This matches our filename suffix better, so it should be more obvious that
    they are correctly named.

 src/shortcuts/dzl-shortcut-theme-load.c            |    4 ++--
 src/shortcuts/dzl-shortcut-theme-save.c            |    6 +++---
 tests/data/keythemes/default.keytheme              |    4 ++--
 tests/data/keythemes/emacs.keytheme                |    4 ++--
 tests/data/keythemes/test.keytheme                 |    4 ++--
 tests/data/keythemes/vim.keytheme                  |    4 ++--
 tests/data/shortcuts/0/shortcuts/default.keytheme  |    4 ++--
 .../data/shortcuts/0/shortcuts/secondary.keytheme  |    4 ++--
 8 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/src/shortcuts/dzl-shortcut-theme-load.c b/src/shortcuts/dzl-shortcut-theme-load.c
index 8b6e32e..fd5aefe 100644
--- a/src/shortcuts/dzl-shortcut-theme-load.c
+++ b/src/shortcuts/dzl-shortcut-theme-load.c
@@ -359,7 +359,7 @@ theme_start_element (GMarkupParseContext  *context,
   g_assert (context != NULL);
   g_assert (element_name != NULL);
 
-  if (g_strcmp0 (element_name, "theme") == 0)
+  if (g_strcmp0 (element_name, "keytheme") == 0)
     {
       const gchar *name = NULL;
       const gchar *parent = NULL;
@@ -577,7 +577,7 @@ theme_end_element (GMarkupParseContext  *context,
   g_assert (context != NULL);
   g_assert (element_name != NULL);
 
-  if (g_strcmp0 (element_name, "theme") == 0)
+  if (g_strcmp0 (element_name, "keytheme") == 0)
     {
       if (!load_state_check_type (state, LOAD_STATE_THEME, error))
         return;
diff --git a/src/shortcuts/dzl-shortcut-theme-save.c b/src/shortcuts/dzl-shortcut-theme-save.c
index 8e5a82f..7a86ca3 100644
--- a/src/shortcuts/dzl-shortcut-theme-save.c
+++ b/src/shortcuts/dzl-shortcut-theme-save.c
@@ -50,9 +50,9 @@ dzl_shortcut_theme_save_to_stream (DzlShortcutTheme  *self,
   subtitle = dzl_shortcut_theme_get_subtitle (self);
 
   if (parent != NULL && !g_str_equal (parent, "internal"))
-    g_string_append_printf (str, "<theme name=\"%s\" parent=\"%s\">\n", name, parent);
+    g_string_append_printf (str, "<keytheme name=\"%s\" parent=\"%s\">\n", name, parent);
   else
-    g_string_append_printf (str, "<theme name=\"%s\">\n", name);
+    g_string_append_printf (str, "<keytheme name=\"%s\">\n", name);
 
   g_string_append_printf (str, "  <property name=\"title\" translatable=\"yes\">%s</property>\n", title ? 
title : "");
   g_string_append_printf (str, "  <property name=\"subtitle\" translatable=\"yes\">%s</property>\n", 
subtitle ? subtitle : "");
@@ -154,7 +154,7 @@ dzl_shortcut_theme_save_to_stream (DzlShortcutTheme  *self,
       g_string_append (str, "  </context>\n");
     }
 
-  g_string_append (str, "</theme>\n");
+  g_string_append (str, "</keytheme>\n");
 
   return g_output_stream_write_all (stream, str->str, str->len, NULL, cancellable, error);
 }
diff --git a/tests/data/keythemes/default.keytheme b/tests/data/keythemes/default.keytheme
index d442124..d564426 100644
--- a/tests/data/keythemes/default.keytheme
+++ b/tests/data/keythemes/default.keytheme
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<theme name="default">
+<keytheme name="default">
   <property name="title">Default</property>
   <property name="subtitle">The default theme</property>
   <shortcut accelerator="<Control>f" command="a.b.c.a"/>
-</theme>
+</keytheme>
diff --git a/tests/data/keythemes/emacs.keytheme b/tests/data/keythemes/emacs.keytheme
index bcf1c4d..a3c6203 100644
--- a/tests/data/keythemes/emacs.keytheme
+++ b/tests/data/keythemes/emacs.keytheme
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<theme name="emacs">
+<keytheme name="emacs">
   <property name="title" translatable="yes">Emacs</property>
   <property name="subtitle" translatable="yes">Emacs theme</property>
-</theme>
+</keytheme>
diff --git a/tests/data/keythemes/test.keytheme b/tests/data/keythemes/test.keytheme
index feb29bf..09d758e 100644
--- a/tests/data/keythemes/test.keytheme
+++ b/tests/data/keythemes/test.keytheme
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<theme name="test" parent="default">
+<keytheme name="test" parent="default">
   <property name="title" translatable="yes">Test</property>
   <property name="subtitle" translatable="yes">Test theme</property>
 
@@ -21,4 +21,4 @@
     </shortcut>
 
   </context>
-</theme>
+</keytheme>
diff --git a/tests/data/keythemes/vim.keytheme b/tests/data/keythemes/vim.keytheme
index a87651f..8b9f2f7 100644
--- a/tests/data/keythemes/vim.keytheme
+++ b/tests/data/keythemes/vim.keytheme
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<theme name="vim">
+<keytheme name="vim">
   <property name="title" translatable="yes">Vim</property>
   <property name="subtitle" translatable="yes">Vim theme</property>
-</theme>
+</keytheme>
diff --git a/tests/data/shortcuts/0/shortcuts/default.keytheme 
b/tests/data/shortcuts/0/shortcuts/default.keytheme
index d442124..d564426 100644
--- a/tests/data/shortcuts/0/shortcuts/default.keytheme
+++ b/tests/data/shortcuts/0/shortcuts/default.keytheme
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<theme name="default">
+<keytheme name="default">
   <property name="title">Default</property>
   <property name="subtitle">The default theme</property>
   <shortcut accelerator="<Control>f" command="a.b.c.a"/>
-</theme>
+</keytheme>
diff --git a/tests/data/shortcuts/0/shortcuts/secondary.keytheme 
b/tests/data/shortcuts/0/shortcuts/secondary.keytheme
index acd63b4..93bb2d4 100644
--- a/tests/data/shortcuts/0/shortcuts/secondary.keytheme
+++ b/tests/data/shortcuts/0/shortcuts/secondary.keytheme
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<theme name="secondary" parent="default">
+<keytheme name="secondary" parent="default">
   <property name="title">Secondary</property>
 
   <shortcut accelerator="<Control>f" command="a.b.c.b"/>
-</theme>
+</keytheme>


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