[libwnck/wip/muktupavels/gtk4: 97/109] don't pass commandline arguments to gtk_init
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libwnck/wip/muktupavels/gtk4: 97/109] don't pass commandline arguments to gtk_init
- Date: Thu, 13 May 2021 19:30:54 +0000 (UTC)
commit 7c8f01b7018375a55214e6394bbdf06abcfe281c
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun May 21 02:33:43 2017 +0300
don't pass commandline arguments to gtk_init
libwnck/test-pager.c | 3 +--
libwnck/test-selector.c | 3 +--
libwnck/test-shutdown.c | 2 +-
libwnck/test-tasklist.c | 3 +--
libwnck/test-urgent.c | 2 +-
libwnck/test-wnck.c | 3 +--
libwnck/wnckprop.c | 4 +---
7 files changed, 7 insertions(+), 13 deletions(-)
---
diff --git a/libwnck/test-pager.c b/libwnck/test-pager.c
index d60b047..3b57c67 100644
--- a/libwnck/test-pager.c
+++ b/libwnck/test-pager.c
@@ -76,12 +76,11 @@ main (int argc, char **argv)
ctxt = g_option_context_new ("");
g_option_context_add_main_entries (ctxt, entries, NULL);
- g_option_context_add_group (ctxt, gtk_get_option_group (TRUE));
g_option_context_parse (ctxt, &argc, &argv, NULL);
g_option_context_free (ctxt);
ctxt = NULL;
- gtk_init (&argc, &argv);
+ gtk_init ();
if (rtl)
gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL);
diff --git a/libwnck/test-selector.c b/libwnck/test-selector.c
index fb27ea3..1c155a8 100644
--- a/libwnck/test-selector.c
+++ b/libwnck/test-selector.c
@@ -23,12 +23,11 @@ main (int argc, char **argv)
ctxt = g_option_context_new ("");
g_option_context_add_main_entries (ctxt, entries, NULL);
- g_option_context_add_group (ctxt, gtk_get_option_group (TRUE));
g_option_context_parse (ctxt, &argc, &argv, NULL);
g_option_context_free (ctxt);
ctxt = NULL;
- gtk_init (&argc, &argv);
+ gtk_init ();
screen = wnck_screen_get_default ();
diff --git a/libwnck/test-shutdown.c b/libwnck/test-shutdown.c
index 0f09d42..5ef79c4 100644
--- a/libwnck/test-shutdown.c
+++ b/libwnck/test-shutdown.c
@@ -33,7 +33,7 @@ main (int argc,
GMainLoop *loop;
WnckScreen *screen;
- gdk_init (&argc, &argv);
+ gtk_init ();
loop = g_main_loop_new (NULL, FALSE);
diff --git a/libwnck/test-tasklist.c b/libwnck/test-tasklist.c
index 6b27f5a..c10e7d9 100644
--- a/libwnck/test-tasklist.c
+++ b/libwnck/test-tasklist.c
@@ -62,12 +62,11 @@ main (int argc, char **argv)
ctxt = g_option_context_new ("");
g_option_context_add_main_entries (ctxt, entries, NULL);
- g_option_context_add_group (ctxt, gtk_get_option_group (TRUE));
g_option_context_parse (ctxt, &argc, &argv, NULL);
g_option_context_free (ctxt);
ctxt = NULL;
- gtk_init (&argc, &argv);
+ gtk_init ();
if (rtl)
gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL);
diff --git a/libwnck/test-urgent.c b/libwnck/test-urgent.c
index 37000b6..1d5277d 100644
--- a/libwnck/test-urgent.c
+++ b/libwnck/test-urgent.c
@@ -70,7 +70,7 @@ main (int argc, char **argv)
GtkWidget *win;
GtkWidget *label;
- gtk_init (&argc, &argv);
+ gtk_init ();
win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
label = gtk_label_new ("");
diff --git a/libwnck/test-wnck.c b/libwnck/test-wnck.c
index ffaad59..af938bd 100644
--- a/libwnck/test-wnck.c
+++ b/libwnck/test-wnck.c
@@ -76,13 +76,12 @@ main (int argc, char **argv)
ctxt = g_option_context_new ("");
g_option_context_add_main_entries (ctxt, entries, NULL);
- g_option_context_add_group (ctxt, gtk_get_option_group (TRUE));
g_option_context_parse (ctxt, &argc, &argv, NULL);
g_option_context_free (ctxt);
wnck_set_default_mini_icon_size (icon_size);
- gtk_init (&argc, &argv);
+ gtk_init ();
screen = wnck_screen_get (0);
diff --git a/libwnck/wnckprop.c b/libwnck/wnckprop.c
index 9a0d3ab..836e83f 100644
--- a/libwnck/wnckprop.c
+++ b/libwnck/wnckprop.c
@@ -1914,8 +1914,6 @@ main (int argc, char **argv)
g_option_group_set_translation_domain (group, GETTEXT_PACKAGE);
g_option_context_add_group (ctxt, group);
- g_option_context_add_group (ctxt, gtk_get_option_group (TRUE));
-
error = NULL;
if (!g_option_context_parse (ctxt, &argc, &argv, &error))
{
@@ -1931,7 +1929,7 @@ main (int argc, char **argv)
if (!validate_options ())
return 1;
- gtk_init (&argc, &argv);
+ gtk_init ();
wnck_set_client_type (WNCK_CLIENT_TYPE_PAGER);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]