From 0b17658a82d37a1de522a33ff62f4a8235e1e2a1 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 6 Apr 2020 17:05:52 -0400 Subject: [PATCH] Replace most uses of with The only place where we are still using is in tests, to ensure we keep parsing it. Otherwise, is now the preferred syntax. --- demos/gtk-demo/appmenu.ui | 2 +- demos/gtk-demo/demo.ui | 16 ++++++++-------- demos/gtk-demo/menus.ui | 24 ++++++++++++------------ demos/widget-factory/help-overlay.ui | 14 +++++++------- demos/widget-factory/widget-factory.c | 22 +++++++++++----------- examples/bp/bloatpad.c | 16 ++++++++-------- gtk/gtkapplication-quartz.c | 8 ++++---- gtk/gtkapplication.c | 2 +- 8 files changed, 52 insertions(+), 52 deletions(-) diff --git a/demos/gtk-demo/appmenu.ui b/demos/gtk-demo/appmenu.ui index 5eb87c640d..4b65b186e4 100644 --- a/demos/gtk-demo/appmenu.ui +++ b/demos/gtk-demo/appmenu.ui @@ -11,7 +11,7 @@ _Quit app.quit - <Primary>q + <Control>q diff --git a/demos/gtk-demo/demo.ui b/demos/gtk-demo/demo.ui index bc829396f5..f4cda56077 100644 --- a/demos/gtk-demo/demo.ui +++ b/demos/gtk-demo/demo.ui @@ -29,29 +29,29 @@ _New win.new - <Primary>n + <Control>n _Open win.open - <Primary>o + <Control>o _Save win.save - <Primary>s + <Control>s Save _As win.save-as - <Primary>q + <Control>q
_Quit win.quit - <Primary><Shift>s + <Control><Shift>s
@@ -61,17 +61,17 @@ _Copy win.copy - <Primary>c + <Control>c _Cut win.cut - <Primary>x + <Control>x _Paste win.paste - <Primary>v + <Control>v diff --git a/demos/gtk-demo/menus.ui b/demos/gtk-demo/menus.ui index d9572b9f39..0fe4bd946a 100644 --- a/demos/gtk-demo/menus.ui +++ b/demos/gtk-demo/menus.ui @@ -5,7 +5,7 @@ _New app.new - <Primary>n + <Control>n _Open @@ -14,19 +14,19 @@ _Save app.save - <Primary>s + <Control>s Save _As... app.save-as - <Primary>s + <Control>s
_Quit app.quit - <Primary>q + <Control>q
@@ -45,19 +45,19 @@ _Red app.color red - <Primary>r + <Control>r
_Green app.color green - <Primary>g + <Control>g _Blue app.color blue - <Primary>b + <Control>b @@ -68,26 +68,26 @@ _Square win.shape square - <Primary>s + <Control>s _Rectangle win.shape rectangle - <Primary>r + <Control>r _Oval win.shape oval - <Primary>o + <Control>o _Bold win.bold - <Primary><Shift>b + <Control><Shift>b @@ -96,7 +96,7 @@ _About win.about - <Primary>a + <Control>a diff --git a/demos/widget-factory/help-overlay.ui b/demos/widget-factory/help-overlay.ui index 0e4bbff1f7..e751fdb6df 100644 --- a/demos/widget-factory/help-overlay.ui +++ b/demos/widget-factory/help-overlay.ui @@ -13,13 +13,13 @@ - <Primary>q + <Control>q Quit - <Primary>d + <Control>d Switch to dark theme @@ -31,7 +31,7 @@ page2 - <Primary>s + <Control>s Search @@ -43,7 +43,7 @@ - <Primary>b + <Control>b Set background @@ -55,19 +55,19 @@ page3 - <Primary>o + <Control>o Open a file - <Primary>r + <Control>r Start recording - <Primary>l + <Control>l Lock or unlock diff --git a/demos/widget-factory/widget-factory.c b/demos/widget-factory/widget-factory.c index 9dd12e62c9..0d78b1bb89 100644 --- a/demos/widget-factory/widget-factory.c +++ b/demos/widget-factory/widget-factory.c @@ -1738,18 +1738,18 @@ activate (GApplication *app) const gchar *accelerators[2]; } accels[] = { { "app.about", { "F1", NULL } }, - { "app.quit", { "q", NULL } }, - { "app.open-in", { "n", NULL } }, - { "app.cut", { "x", NULL } }, - { "app.copy", { "c", NULL } }, - { "app.paste", { "v", NULL } }, - { "win.dark", { "d", NULL } }, - { "win.search", { "s", NULL } }, + { "app.quit", { "q", NULL } }, + { "app.open-in", { "n", NULL } }, + { "app.cut", { "x", NULL } }, + { "app.copy", { "c", NULL } }, + { "app.paste", { "v", NULL } }, + { "win.dark", { "d", NULL } }, + { "win.search", { "s", NULL } }, { "win.delete", { "Delete", NULL } }, - { "win.background", { "b", NULL } }, - { "win.open", { "o", NULL } }, - { "win.record", { "r", NULL } }, - { "win.lock", { "l", NULL } }, + { "win.background", { "b", NULL } }, + { "win.open", { "o", NULL } }, + { "win.record", { "r", NULL } }, + { "win.lock", { "l", NULL } }, }; gint i; GPermission *permission; diff --git a/examples/bp/bloatpad.c b/examples/bp/bloatpad.c index fcbca05484..f8f48d4fc9 100644 --- a/examples/bp/bloatpad.c +++ b/examples/bp/bloatpad.c @@ -517,13 +517,13 @@ bloat_pad_startup (GApplication *application) const gchar *action_and_target; const gchar *accelerators[2]; } accels[] = { - { "app.new", { "n", NULL } }, - { "app.quit", { "q", NULL } }, - { "win.copy", { "c", NULL } }, - { "win.paste", { "p", NULL } }, - { "win.justify::left", { "l", NULL } }, - { "win.justify::center", { "m", NULL } }, - { "win.justify::right", { "r", NULL } } + { "app.new", { "n", NULL } }, + { "app.quit", { "q", NULL } }, + { "win.copy", { "c", NULL } }, + { "win.paste", { "p", NULL } }, + { "win.justify::left", { "l", NULL } }, + { "win.justify::center", { "m", NULL } }, + { "win.justify::right", { "r", NULL } } }; G_APPLICATION_CLASS (bloat_pad_parent_class) @@ -592,7 +592,7 @@ bloat_pad_startup (GApplication *application) g_object_unref (item); g_object_unref (icon); - const gchar *new_accels[] = { "n", "t", NULL }; + const gchar *new_accels[] = { "n", "t", NULL }; gtk_application_set_accels_for_action (GTK_APPLICATION (application), "app.new", new_accels); dump_accels (GTK_APPLICATION (application)); diff --git a/gtk/gtkapplication-quartz.c b/gtk/gtkapplication-quartz.c index 55f51e6a89..38131f4be0 100644 --- a/gtk/gtkapplication-quartz.c +++ b/gtk/gtkapplication-quartz.c @@ -124,10 +124,10 @@ gtk_application_impl_quartz_startup (GtkApplicationImpl *impl, GtkApplicationImplQuartz *quartz = (GtkApplicationImplQuartz *) impl; GSimpleActionGroup *gtkinternal; GMenuModel *app_menu; - const gchar *pref_accel[] = {"comma", NULL}; - const gchar *hide_others_accel[] = {"h", NULL}; - const gchar *hide_accel[] = {"h", NULL}; - const gchar *quit_accel[] = {"q", NULL}; + const gchar *pref_accel[] = {"comma", NULL}; + const gchar *hide_others_accel[] = {"h", NULL}; + const gchar *hide_accel[] = {"h", NULL}; + const gchar *quit_accel[] = {"q", NULL}; if (register_session) { diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c index b9bc8f460a..2f4a3ceaf2 100644 --- a/gtk/gtkapplication.c +++ b/gtk/gtkapplication.c @@ -278,7 +278,7 @@ gtk_application_load_resources (GtkApplication *application) path = g_strconcat (base_path, "/gtk/help-overlay.ui", NULL); if (g_resources_get_info (path, G_RESOURCE_LOOKUP_FLAGS_NONE, NULL, NULL, NULL)) { - const gchar * const accels[] = { "question", NULL }; + const gchar * const accels[] = { "question", NULL }; priv->help_overlay_path = path; gtk_application_set_accels_for_action (application, "win.show-help-overlay", accels);