summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/action-namespace.c2
-rw-r--r--examples/application1/exampleapp.c2
-rw-r--r--examples/application10/exampleappwin.c12
-rw-r--r--examples/application2/exampleapp.c2
-rw-r--r--examples/application3/exampleapp.c2
-rw-r--r--examples/application3/exampleappwin.c4
-rw-r--r--examples/application4/exampleapp.c4
-rw-r--r--examples/application4/exampleappwin.c4
-rw-r--r--examples/application5/exampleapp.c4
-rw-r--r--examples/application5/exampleappwin.c4
-rw-r--r--examples/application6/exampleapp.c4
-rw-r--r--examples/application6/exampleappwin.c4
-rw-r--r--examples/application7/exampleapp.c4
-rw-r--r--examples/application7/exampleappwin.c6
-rw-r--r--examples/application8/exampleapp.c4
-rw-r--r--examples/application8/exampleappwin.c10
-rw-r--r--examples/application9/exampleapp.c4
-rw-r--r--examples/application9/exampleappwin.c12
-rw-r--r--examples/bp/bloatpad.c38
-rw-r--r--examples/plugman.c20
-rw-r--r--examples/search-bar.c2
-rw-r--r--examples/sunny.c4
22 files changed, 76 insertions, 76 deletions
diff --git a/examples/action-namespace.c b/examples/action-namespace.c
index aa4074e9d9..ee001912ad 100644
--- a/examples/action-namespace.c
+++ b/examples/action-namespace.c
@@ -32,7 +32,7 @@ static GActionEntry win_entries[] = {
{ "close", action_activated },
};
-const gchar *menu_ui =
+const char *menu_ui =
"<interface>"
" <menu id='doc-menu'>"
" <section>"
diff --git a/examples/application1/exampleapp.c b/examples/application1/exampleapp.c
index a730c1f555..9e99e8560a 100644
--- a/examples/application1/exampleapp.c
+++ b/examples/application1/exampleapp.c
@@ -28,7 +28,7 @@ static void
example_app_open (GApplication *app,
GFile **files,
int n_files,
- const gchar *hint)
+ const char *hint)
{
GList *windows;
ExampleAppWindow *win;
diff --git a/examples/application10/exampleappwin.c b/examples/application10/exampleappwin.c
index d5f4d43e31..2de74cf0e7 100644
--- a/examples/application10/exampleappwin.c
+++ b/examples/application10/exampleappwin.c
@@ -25,7 +25,7 @@ static void
search_text_changed (GtkEntry *entry,
ExampleAppWindow *win)
{
- const gchar *text;
+ const char *text;
GtkWidget *tab;
GtkWidget *view;
GtkTextBuffer *buffer;
@@ -55,7 +55,7 @@ static void
find_word (GtkButton *button,
ExampleAppWindow *win)
{
- const gchar *word;
+ const char *word;
word = gtk_button_get_label (button);
gtk_editable_set_text (GTK_EDITABLE (win->searchentry), word);
@@ -69,7 +69,7 @@ update_words (ExampleAppWindow *win)
GtkWidget *tab, *view, *row;
GtkTextBuffer *buffer;
GtkTextIter start, end;
- gchar *word, *key;
+ char *word, *key;
GtkWidget *child;
tab = gtk_stack_get_visible_child (GTK_STACK (win->stack));
@@ -121,7 +121,7 @@ update_lines (ExampleAppWindow *win)
GtkWidget *tab, *view;
GtkTextBuffer *buffer;
int count;
- gchar *lines;
+ char *lines;
tab = gtk_stack_get_visible_child (GTK_STACK (win->stack));
@@ -248,9 +248,9 @@ void
example_app_window_open (ExampleAppWindow *win,
GFile *file)
{
- gchar *basename;
+ char *basename;
GtkWidget *scrolled, *view;
- gchar *contents;
+ char *contents;
gsize length;
GtkTextBuffer *buffer;
GtkTextTag *tag;
diff --git a/examples/application2/exampleapp.c b/examples/application2/exampleapp.c
index a730c1f555..9e99e8560a 100644
--- a/examples/application2/exampleapp.c
+++ b/examples/application2/exampleapp.c
@@ -28,7 +28,7 @@ static void
example_app_open (GApplication *app,
GFile **files,
int n_files,
- const gchar *hint)
+ const char *hint)
{
GList *windows;
ExampleAppWindow *win;
diff --git a/examples/application3/exampleapp.c b/examples/application3/exampleapp.c
index a730c1f555..9e99e8560a 100644
--- a/examples/application3/exampleapp.c
+++ b/examples/application3/exampleapp.c
@@ -28,7 +28,7 @@ static void
example_app_open (GApplication *app,
GFile **files,
int n_files,
- const gchar *hint)
+ const char *hint)
{
GList *windows;
ExampleAppWindow *win;
diff --git a/examples/application3/exampleappwin.c b/examples/application3/exampleappwin.c
index 3925fa4689..5cc4275598 100644
--- a/examples/application3/exampleappwin.c
+++ b/examples/application3/exampleappwin.c
@@ -36,9 +36,9 @@ void
example_app_window_open (ExampleAppWindow *win,
GFile *file)
{
- gchar *basename;
+ char *basename;
GtkWidget *scrolled, *view;
- gchar *contents;
+ char *contents;
gsize length;
basename = g_file_get_basename (file);
diff --git a/examples/application4/exampleapp.c b/examples/application4/exampleapp.c
index 1376001f2c..89bad6103c 100644
--- a/examples/application4/exampleapp.c
+++ b/examples/application4/exampleapp.c
@@ -39,7 +39,7 @@ static GActionEntry app_entries[] =
static void
example_app_startup (GApplication *app)
{
- const gchar *quit_accels[2] = { "<Ctrl>Q", NULL };
+ const char *quit_accels[2] = { "<Ctrl>Q", NULL };
G_APPLICATION_CLASS (example_app_parent_class)->startup (app);
@@ -64,7 +64,7 @@ static void
example_app_open (GApplication *app,
GFile **files,
int n_files,
- const gchar *hint)
+ const char *hint)
{
GList *windows;
ExampleAppWindow *win;
diff --git a/examples/application4/exampleappwin.c b/examples/application4/exampleappwin.c
index 97f8209cd3..ed03ab14e2 100644
--- a/examples/application4/exampleappwin.c
+++ b/examples/application4/exampleappwin.c
@@ -46,9 +46,9 @@ void
example_app_window_open (ExampleAppWindow *win,
GFile *file)
{
- gchar *basename;
+ char *basename;
GtkWidget *scrolled, *view;
- gchar *contents;
+ char *contents;
gsize length;
basename = g_file_get_basename (file);
diff --git a/examples/application5/exampleapp.c b/examples/application5/exampleapp.c
index 1376001f2c..89bad6103c 100644
--- a/examples/application5/exampleapp.c
+++ b/examples/application5/exampleapp.c
@@ -39,7 +39,7 @@ static GActionEntry app_entries[] =
static void
example_app_startup (GApplication *app)
{
- const gchar *quit_accels[2] = { "<Ctrl>Q", NULL };
+ const char *quit_accels[2] = { "<Ctrl>Q", NULL };
G_APPLICATION_CLASS (example_app_parent_class)->startup (app);
@@ -64,7 +64,7 @@ static void
example_app_open (GApplication *app,
GFile **files,
int n_files,
- const gchar *hint)
+ const char *hint)
{
GList *windows;
ExampleAppWindow *win;
diff --git a/examples/application5/exampleappwin.c b/examples/application5/exampleappwin.c
index 2fac229a10..3f1fc33972 100644
--- a/examples/application5/exampleappwin.c
+++ b/examples/application5/exampleappwin.c
@@ -66,9 +66,9 @@ void
example_app_window_open (ExampleAppWindow *win,
GFile *file)
{
- gchar *basename;
+ char *basename;
GtkWidget *scrolled, *view;
- gchar *contents;
+ char *contents;
gsize length;
GtkTextBuffer *buffer;
GtkTextTag *tag;
diff --git a/examples/application6/exampleapp.c b/examples/application6/exampleapp.c
index 89389fb52d..62607e40ae 100644
--- a/examples/application6/exampleapp.c
+++ b/examples/application6/exampleapp.c
@@ -46,7 +46,7 @@ static GActionEntry app_entries[] =
static void
example_app_startup (GApplication *app)
{
- const gchar *quit_accels[2] = { "<Ctrl>Q", NULL };
+ const char *quit_accels[2] = { "<Ctrl>Q", NULL };
G_APPLICATION_CLASS (example_app_parent_class)->startup (app);
@@ -71,7 +71,7 @@ static void
example_app_open (GApplication *app,
GFile **files,
int n_files,
- const gchar *hint)
+ const char *hint)
{
GList *windows;
ExampleAppWindow *win;
diff --git a/examples/application6/exampleappwin.c b/examples/application6/exampleappwin.c
index 5eacf3d04c..794646e477 100644
--- a/examples/application6/exampleappwin.c
+++ b/examples/application6/exampleappwin.c
@@ -67,9 +67,9 @@ void
example_app_window_open (ExampleAppWindow *win,
GFile *file)
{
- gchar *basename;
+ char *basename;
GtkWidget *scrolled, *view;
- gchar *contents;
+ char *contents;
gsize length;
GtkTextBuffer *buffer;
GtkTextTag *tag;
diff --git a/examples/application7/exampleapp.c b/examples/application7/exampleapp.c
index 89389fb52d..62607e40ae 100644
--- a/examples/application7/exampleapp.c
+++ b/examples/application7/exampleapp.c
@@ -46,7 +46,7 @@ static GActionEntry app_entries[] =
static void
example_app_startup (GApplication *app)
{
- const gchar *quit_accels[2] = { "<Ctrl>Q", NULL };
+ const char *quit_accels[2] = { "<Ctrl>Q", NULL };
G_APPLICATION_CLASS (example_app_parent_class)->startup (app);
@@ -71,7 +71,7 @@ static void
example_app_open (GApplication *app,
GFile **files,
int n_files,
- const gchar *hint)
+ const char *hint)
{
GList *windows;
ExampleAppWindow *win;
diff --git a/examples/application7/exampleappwin.c b/examples/application7/exampleappwin.c
index 67db00d573..dad967a940 100644
--- a/examples/application7/exampleappwin.c
+++ b/examples/application7/exampleappwin.c
@@ -20,7 +20,7 @@ static void
search_text_changed (GtkEntry *entry,
ExampleAppWindow *win)
{
- const gchar *text;
+ const char *text;
GtkWidget *tab;
GtkWidget *view;
GtkTextBuffer *buffer;
@@ -120,9 +120,9 @@ void
example_app_window_open (ExampleAppWindow *win,
GFile *file)
{
- gchar *basename;
+ char *basename;
GtkWidget *scrolled, *view;
- gchar *contents;
+ char *contents;
gsize length;
GtkTextBuffer *buffer;
GtkTextTag *tag;
diff --git a/examples/application8/exampleapp.c b/examples/application8/exampleapp.c
index 89389fb52d..62607e40ae 100644
--- a/examples/application8/exampleapp.c
+++ b/examples/application8/exampleapp.c
@@ -46,7 +46,7 @@ static GActionEntry app_entries[] =
static void
example_app_startup (GApplication *app)
{
- const gchar *quit_accels[2] = { "<Ctrl>Q", NULL };
+ const char *quit_accels[2] = { "<Ctrl>Q", NULL };
G_APPLICATION_CLASS (example_app_parent_class)->startup (app);
@@ -71,7 +71,7 @@ static void
example_app_open (GApplication *app,
GFile **files,
int n_files,
- const gchar *hint)
+ const char *hint)
{
GList *windows;
ExampleAppWindow *win;
diff --git a/examples/application8/exampleappwin.c b/examples/application8/exampleappwin.c
index 9a5eb2818c..a598de13e0 100644
--- a/examples/application8/exampleappwin.c
+++ b/examples/application8/exampleappwin.c
@@ -23,7 +23,7 @@ static void
search_text_changed (GtkEntry *entry,
ExampleAppWindow *win)
{
- const gchar *text;
+ const char *text;
GtkWidget *tab;
GtkWidget *view;
GtkTextBuffer *buffer;
@@ -53,7 +53,7 @@ static void
find_word (GtkButton *button,
ExampleAppWindow *win)
{
- const gchar *word;
+ const char *word;
word = gtk_button_get_label (button);
gtk_editable_set_text (GTK_EDITABLE (win->searchentry), word);
@@ -67,7 +67,7 @@ update_words (ExampleAppWindow *win)
GtkWidget *tab, *view, *row;
GtkTextBuffer *buffer;
GtkTextIter start, end;
- gchar *word, *key;
+ char *word, *key;
GtkWidget *child;
tab = gtk_stack_get_visible_child (GTK_STACK (win->stack));
@@ -212,9 +212,9 @@ void
example_app_window_open (ExampleAppWindow *win,
GFile *file)
{
- gchar *basename;
+ char *basename;
GtkWidget *scrolled, *view;
- gchar *contents;
+ char *contents;
gsize length;
GtkTextBuffer *buffer;
GtkTextTag *tag;
diff --git a/examples/application9/exampleapp.c b/examples/application9/exampleapp.c
index 89389fb52d..62607e40ae 100644
--- a/examples/application9/exampleapp.c
+++ b/examples/application9/exampleapp.c
@@ -46,7 +46,7 @@ static GActionEntry app_entries[] =
static void
example_app_startup (GApplication *app)
{
- const gchar *quit_accels[2] = { "<Ctrl>Q", NULL };
+ const char *quit_accels[2] = { "<Ctrl>Q", NULL };
G_APPLICATION_CLASS (example_app_parent_class)->startup (app);
@@ -71,7 +71,7 @@ static void
example_app_open (GApplication *app,
GFile **files,
int n_files,
- const gchar *hint)
+ const char *hint)
{
GList *windows;
ExampleAppWindow *win;
diff --git a/examples/application9/exampleappwin.c b/examples/application9/exampleappwin.c
index 30c281ae93..a775f5b08a 100644
--- a/examples/application9/exampleappwin.c
+++ b/examples/application9/exampleappwin.c
@@ -25,7 +25,7 @@ static void
search_text_changed (GtkEntry *entry,
ExampleAppWindow *win)
{
- const gchar *text;
+ const char *text;
GtkWidget *tab;
GtkWidget *view;
GtkTextBuffer *buffer;
@@ -55,7 +55,7 @@ static void
find_word (GtkButton *button,
ExampleAppWindow *win)
{
- const gchar *word;
+ const char *word;
word = gtk_button_get_label (button);
gtk_editable_set_text (GTK_EDITABLE (win->searchentry), word);
@@ -69,7 +69,7 @@ update_words (ExampleAppWindow *win)
GtkWidget *tab, *view, *row;
GtkTextBuffer *buffer;
GtkTextIter start, end;
- gchar *word, *key;
+ char *word, *key;
GtkWidget *child;
tab = gtk_stack_get_visible_child (GTK_STACK (win->stack));
@@ -121,7 +121,7 @@ update_lines (ExampleAppWindow *win)
GtkWidget *tab, *view;
GtkTextBuffer *buffer;
int count;
- gchar *lines;
+ char *lines;
tab = gtk_stack_get_visible_child (GTK_STACK (win->stack));
@@ -246,9 +246,9 @@ void
example_app_window_open (ExampleAppWindow *win,
GFile *file)
{
- gchar *basename;
+ char *basename;
GtkWidget *scrolled, *view;
- gchar *contents;
+ char *contents;
gsize length;
GtkTextBuffer *buffer;
GtkTextTag *tag;
diff --git a/examples/bp/bloatpad.c b/examples/bp/bloatpad.c
index 18fc9ae1ef..b29b639241 100644
--- a/examples/bp/bloatpad.c
+++ b/examples/bp/bloatpad.c
@@ -77,7 +77,7 @@ change_justify_state (GSimpleAction *action,
gpointer user_data)
{
GtkTextView *text = g_object_get_data (user_data, "bloatpad-text");
- const gchar *str;
+ const char *str;
str = g_variant_get_string (state, NULL);
@@ -265,7 +265,7 @@ new_window (GApplication *app,
if (file != NULL)
{
- gchar *contents;
+ char *contents;
gsize length;
if (g_file_load_contents (file, NULL, &contents, &length, NULL, NULL))
@@ -294,7 +294,7 @@ static void
bloat_pad_open (GApplication *application,
GFile **files,
int n_files,
- const gchar *hint)
+ const char *hint)
{
int i;
@@ -345,9 +345,9 @@ combo_changed (GtkComboBox *combo,
gpointer user_data)
{
GtkEntry *entry = g_object_get_data (user_data, "entry");
- const gchar *action;
- gchar **accels;
- gchar *str;
+ const char *action;
+ char **accels;
+ char *str;
action = gtk_combo_box_get_active_id (combo);
@@ -368,9 +368,9 @@ response (GtkDialog *dialog,
{
GtkEntry *entry = g_object_get_data (user_data, "entry");
GtkComboBox *combo = g_object_get_data (user_data, "combo");
- const gchar *action;
- const gchar *str;
- gchar **accels;
+ const char *action;
+ const char *str;
+ char **accels;
if (response_id == GTK_RESPONSE_CLOSE)
{
@@ -386,7 +386,7 @@ response (GtkDialog *dialog,
str = gtk_editable_get_text (GTK_EDITABLE (entry));
accels = g_strsplit (str, ",", 0);
- gtk_application_set_accels_for_action (gtk_window_get_application (user_data), action, (const gchar **) accels);
+ gtk_application_set_accels_for_action (gtk_window_get_application (user_data), action, (const char **) accels);
g_strfreev (accels);
}
@@ -398,7 +398,7 @@ edit_accels (GSimpleAction *action,
GtkApplication *app = user_data;
GtkWidget *combo;
GtkWidget *entry;
- gchar **actions;
+ char **actions;
GtkWidget *dialog;
int i;
@@ -426,7 +426,7 @@ update_time (gpointer user_data)
{
BloatPad *bloatpad = user_data;
GDateTime *now;
- gchar *time;
+ char *time;
while (g_menu_model_get_n_items (G_MENU_MODEL (bloatpad->time)))
g_menu_remove (bloatpad->time, 0);
@@ -481,14 +481,14 @@ static GActionEntry app_entries[] = {
static void
dump_accels (GtkApplication *app)
{
- gchar **actions;
+ char **actions;
int i;
actions = gtk_application_list_action_descriptions (app);
for (i = 0; actions[i]; i++)
{
- gchar **accels;
- gchar *str;
+ char **accels;
+ char *str;
accels = gtk_application_get_accels_for_action (app, actions[i]);
@@ -514,8 +514,8 @@ bloat_pad_startup (GApplication *application)
GFile *file;
int i;
struct {
- const gchar *action_and_target;
- const gchar *accelerators[2];
+ const char *action_and_target;
+ const char *accelerators[2];
} accels[] = {
{ "app.new", { "<Control>n", NULL } },
{ "app.quit", { "<Control>q", NULL } },
@@ -592,7 +592,7 @@ bloat_pad_startup (GApplication *application)
g_object_unref (item);
g_object_unref (icon);
- const gchar *new_accels[] = { "<Control>n", "<Control>t", NULL };
+ const char *new_accels[] = { "<Control>n", "<Control>t", NULL };
gtk_application_set_accels_for_action (GTK_APPLICATION (application), "app.new", new_accels);
dump_accels (GTK_APPLICATION (application));
@@ -657,7 +657,7 @@ main (int argc, char **argv)
{
BloatPad *bloat_pad;
int status;
- const gchar *accels[] = { "F11", NULL };
+ const char *accels[] = { "F11", NULL };
bloat_pad = bloat_pad_new ();
diff --git a/examples/plugman.c b/examples/plugman.c
index d6add253f7..d6962c6ce5 100644
--- a/examples/plugman.c
+++ b/examples/plugman.c
@@ -99,7 +99,7 @@ new_window (GApplication *app,
if (file != NULL)
{
- gchar *contents;
+ char *contents;
gsize length;
if (g_file_load_contents (file, NULL, &contents, &length, NULL, NULL))
@@ -125,7 +125,7 @@ static void
plug_man_open (GApplication *application,
GFile **files,
int n_files,
- const gchar *hint)
+ const char *hint)
{
int i;
@@ -184,7 +184,7 @@ static gboolean is_red_plugin_enabled;
static gboolean is_black_plugin_enabled;
static gboolean
-plugin_enabled (const gchar *name)
+plugin_enabled (const char *name)
{
if (g_strcmp0 (name, "red") == 0)
return is_red_plugin_enabled;
@@ -228,7 +228,7 @@ plugin_action (GAction *action,
}
static void
-enable_plugin (const gchar *name)
+enable_plugin (const char *name)
{
GMenuModel *plugin_menu;
GAction *action;
@@ -246,8 +246,8 @@ enable_plugin (const gchar *name)
{
GMenu *section;
GMenuItem *item;
- gchar *label;
- gchar *action_name;
+ char *label;
+ char *action_name;
section = g_menu_new ();
label = g_strdup_printf ("Turn text %s", name);
@@ -272,7 +272,7 @@ enable_plugin (const gchar *name)
}
static void
-disable_plugin (const gchar *name)
+disable_plugin (const char *name)
{
GMenuModel *plugin_menu;
@@ -285,7 +285,7 @@ disable_plugin (const gchar *name)
for (i = 0; i < g_menu_model_get_n_items (plugin_menu); i++)
{
- gchar *id;
+ char *id;
if (g_menu_model_get_item_attribute (plugin_menu, i, "id", "s", &id))
{
if (g_strcmp0 (id, name) == 0)
@@ -311,7 +311,7 @@ disable_plugin (const gchar *name)
static void
enable_or_disable_plugin (GtkToggleButton *button,
- const gchar *name)
+ const char *name)
{
if (plugin_enabled (name))
disable_plugin (name);
@@ -498,7 +498,7 @@ main (int argc, char **argv)
{
PlugMan *plug_man;
int status;
- const gchar *accels[] = { "F11", NULL };
+ const char *accels[] = { "F11", NULL };
plug_man = plug_man_new ();
gtk_application_set_accels_for_action (GTK_APPLICATION (plug_man),
diff --git a/examples/search-bar.c b/examples/search-bar.c
index d554529413..f60e1e8cfe 100644
--- a/examples/search-bar.c
+++ b/examples/search-bar.c
@@ -34,7 +34,7 @@ activate_cb (GtkApplication *app,
int
main (int argc,
- gchar *argv[])
+ char *argv[])
{
GtkApplication *app;
diff --git a/examples/sunny.c b/examples/sunny.c
index 9cfd8bcbc0..fafc1f2a1b 100644
--- a/examples/sunny.c
+++ b/examples/sunny.c
@@ -30,7 +30,7 @@ new_window (GApplication *app,
if (file != NULL)
{
- gchar *contents;
+ char *contents;
gsize length;
if (g_file_load_contents (file, NULL, &contents, &length, NULL, NULL))
@@ -56,7 +56,7 @@ static void
open (GApplication *application,
GFile **files,
int n_files,
- const gchar *hint)
+ const char *hint)
{
int i;