forked from AuroraMiddleware/gtk
Update callers
Adapt all our tests and examples to the new initialization api.
This commit is contained in:
parent
4d7fa52fe9
commit
2c7e567f05
@ -302,7 +302,7 @@ int main (int argc, char **argv)
|
||||
{
|
||||
/* If there's no DISPLAY, we silently error out. We don't want to break
|
||||
* headless builds. */
|
||||
if (! gtk_init_check (&argc, &argv))
|
||||
if (! gtk_init_check ())
|
||||
return 0;
|
||||
|
||||
toplevels = get_all_widgets ();
|
||||
|
@ -15,7 +15,7 @@ main (int argc,
|
||||
GObject *window;
|
||||
GObject *button;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
/* Construct a GtkBuilder instance and load our UI description */
|
||||
builder = gtk_builder_new ();
|
||||
|
@ -1071,7 +1071,7 @@ main (int argc, const char *argv[])
|
||||
{
|
||||
g_set_prgname ("gtk-builder-tool");
|
||||
|
||||
gtk_init (NULL, NULL);
|
||||
gtk_init ();
|
||||
|
||||
gtk_test_register_all_types ();
|
||||
|
||||
|
@ -114,7 +114,7 @@ main (int argc, char *argv[])
|
||||
}
|
||||
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
app_name = *args;
|
||||
#ifdef G_OS_UNIX
|
||||
|
@ -30,7 +30,7 @@ main (int argc, char **argv)
|
||||
int max_prop_name_length = 0;
|
||||
gchar *pattern = NULL;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
if (argc > 1)
|
||||
pattern = argv[1];
|
||||
|
@ -290,7 +290,7 @@ gtk_application_startup (GApplication *g_application)
|
||||
|
||||
gtk_action_muxer_insert (application->priv->muxer, "app", G_ACTION_GROUP (application));
|
||||
|
||||
gtk_init (NULL, NULL);
|
||||
gtk_init ();
|
||||
|
||||
application->priv->impl = gtk_application_impl_new (application, gdk_display_get_default ());
|
||||
gtk_application_impl_startup (application->priv->impl, application->priv->register_session);
|
||||
|
@ -96,7 +96,7 @@ gtk_test_init (int *argcp,
|
||||
*/
|
||||
gdk_disable_multidevice ();
|
||||
|
||||
gtk_init (argcp, argvp);
|
||||
gtk_init ();
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
@ -173,8 +173,6 @@ main(int argc, char **argv)
|
||||
GOptionContext *context = g_option_context_new (NULL);
|
||||
g_option_context_add_main_entries (context, options, NULL);
|
||||
frame_stats_add_options (g_option_context_get_main_group (context));
|
||||
g_option_context_add_group (context,
|
||||
gtk_get_option_group (TRUE));
|
||||
|
||||
if (!g_option_context_parse (context, &argc, &argv, &error))
|
||||
{
|
||||
@ -182,6 +180,8 @@ main(int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
gtk_init ();
|
||||
|
||||
g_print ("# Load factor: %g\n",
|
||||
load_factor);
|
||||
g_print ("# Resizing?: %s\n",
|
||||
|
@ -28,8 +28,6 @@ main(int argc, char **argv)
|
||||
GOptionContext *context = g_option_context_new (NULL);
|
||||
g_option_context_add_main_entries (context, options, NULL);
|
||||
frame_stats_add_options (g_option_context_get_main_group (context));
|
||||
g_option_context_add_group (context,
|
||||
gtk_get_option_group (TRUE));
|
||||
|
||||
if (!g_option_context_parse (context, &argc, &argv, &error))
|
||||
{
|
||||
@ -37,6 +35,8 @@ main(int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
g_signal_connect (window, "destroy", gtk_main_quit, NULL);
|
||||
frame_stats_ensure (GTK_WINDOW (window));
|
||||
|
@ -203,7 +203,7 @@ main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window1;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
window1 = create_flicker ();
|
||||
gtk_widget_show (window1);
|
||||
|
@ -112,7 +112,7 @@ main (int argc, char *argv[])
|
||||
*revealer, *frame, *label, *scrolled, *popover;
|
||||
int i;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_titlebar (GTK_WINDOW (window), g_object_new (GTK_TYPE_HEADER_BAR, "visible", TRUE, "title", "GdkGears", NULL));
|
||||
|
@ -171,7 +171,7 @@ main (int argc, char *argv[])
|
||||
GListStore *store;
|
||||
gint i;
|
||||
|
||||
gtk_init (NULL, NULL);
|
||||
gtk_init ();
|
||||
|
||||
store = g_list_store_new (my_object_get_type ());
|
||||
for (i = 0; i < 100; i++)
|
||||
|
@ -43,7 +43,7 @@ main (int argc, char **argv)
|
||||
GtkWidget *scale;
|
||||
GtkWidget *da;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 300, 300);
|
||||
|
@ -51,7 +51,7 @@ main (int argc, char *argv[])
|
||||
GtkWidget *combo;
|
||||
GtkAdjustment *adj;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 640, 480);
|
||||
|
@ -781,7 +781,7 @@ main (int argc, char **argv)
|
||||
GtkApplication *app;
|
||||
GError *error = NULL;
|
||||
|
||||
gtk_init (NULL, NULL);
|
||||
gtk_init ();
|
||||
|
||||
settings = gtk_print_settings_new_from_file ("print-settings.ini", &error);
|
||||
if (error) {
|
||||
|
@ -362,7 +362,7 @@ main (int argc, char **argv)
|
||||
char *pattern;
|
||||
guint i, n;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
n = 100000;
|
||||
pattern = "*";
|
||||
|
@ -24,14 +24,18 @@ main(int argc, char **argv)
|
||||
char *contents;
|
||||
gsize len;
|
||||
int run;
|
||||
GOptionContext *context;
|
||||
|
||||
if (!gtk_init_with_args (&argc, &argv, "NODE-FILE PNG-FILE",
|
||||
options, NULL, &error))
|
||||
context = g_option_context_new ("NODE-FILE PNG-FILE");
|
||||
g_option_context_add_main_entries (context, options, NULL);
|
||||
if (!g_option_context_parse (context, &argc, &argv, &error))
|
||||
{
|
||||
g_printerr ("Option parsing failed: %s\n", error->message);
|
||||
return 1;
|
||||
}
|
||||
|
||||
gtk_init ();
|
||||
|
||||
if (runs < 1)
|
||||
{
|
||||
g_printerr ("Number of runs given with -r/--runs must be at least 1 and not %d.\n", runs);
|
||||
|
@ -105,8 +105,6 @@ main (int argc, char **argv)
|
||||
GOptionContext *context = g_option_context_new (NULL);
|
||||
g_option_context_add_main_entries (context, options, NULL);
|
||||
frame_stats_add_options (g_option_context_get_main_group (context));
|
||||
g_option_context_add_group (context,
|
||||
gtk_get_option_group (TRUE));
|
||||
|
||||
if (!g_option_context_parse (context, &argc, &argv, &error))
|
||||
{
|
||||
@ -114,6 +112,8 @@ main (int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
frame_stats_ensure (GTK_WINDOW (window));
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 800, 600);
|
||||
|
@ -30,7 +30,7 @@ main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
window = g_object_connect (g_object_new (gtk_window_get_type (),
|
||||
"type", GTK_WINDOW_TOPLEVEL,
|
||||
|
@ -135,7 +135,7 @@ main (gint argc, gchar **argv)
|
||||
{
|
||||
Info info;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
info.toolbar = NULL;
|
||||
info.counter = 0;
|
||||
|
@ -20,7 +20,7 @@ main (int argc, char *argv[])
|
||||
GtkWidget *win, *box, *tv, *sw, *sb;
|
||||
GtkAdjustment *adj;
|
||||
|
||||
gtk_init (NULL, NULL);
|
||||
gtk_init ();
|
||||
|
||||
win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_default_size (GTK_WINDOW (win), 640, 480);
|
||||
|
@ -121,7 +121,7 @@ main (gint argc, gchar **argv)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
dialog = key_test ();
|
||||
|
||||
|
@ -365,7 +365,7 @@ main (int argc, char *argv[])
|
||||
{
|
||||
GtkCssProvider *provider;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
provider = gtk_css_provider_new ();
|
||||
gtk_css_provider_load_from_data (provider,
|
||||
|
@ -410,7 +410,7 @@ main (int argc,
|
||||
{
|
||||
gint i;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
i = 1;
|
||||
while (i < argc)
|
||||
|
@ -157,7 +157,7 @@ main (int argc, char **argv)
|
||||
GtkWidget *w1;
|
||||
gchar *path;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
toplevel = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
grid = gtk_grid_new ();
|
||||
|
@ -68,7 +68,7 @@ main (int argc,
|
||||
{
|
||||
GtkWidget *w;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
toplevel = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
|
||||
|
@ -703,7 +703,7 @@ main (int argc, gchar *argv[])
|
||||
GtkWidget *window, *box, *button;
|
||||
gint i;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
if (g_getenv ("RTL"))
|
||||
gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL);
|
||||
|
@ -76,7 +76,7 @@ main (int argc,
|
||||
int i, j;
|
||||
GtkCssProvider *provider;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
provider = gtk_css_provider_new ();
|
||||
gtk_css_provider_load_from_data (provider,
|
||||
|
@ -118,7 +118,7 @@ main (int argc,
|
||||
GtkWidget *vbox, *hbox, *combo_styles, *combo_types, *option;
|
||||
int i;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
g_signal_connect (G_OBJECT (window), "delete-event", G_CALLBACK (gtk_main_quit), NULL);
|
||||
|
@ -132,7 +132,7 @@ main (int argc, char *argv[])
|
||||
GtkWidget *label;
|
||||
GtkWidget *spin;
|
||||
|
||||
gtk_init (NULL, NULL);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
|
||||
|
@ -146,7 +146,7 @@ main (gint argc, gchar **argv)
|
||||
GtkStyleProvider *provider;
|
||||
GtkTextBuffer *css;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
css = gtk_text_buffer_new (NULL);
|
||||
gtk_text_buffer_create_tag (css,
|
||||
|
@ -27,7 +27,7 @@ int main (int argc, char *argv[])
|
||||
gboolean use_underline;
|
||||
GtkWidget *label;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
|
||||
|
@ -189,7 +189,7 @@ main (int argc, char **argv)
|
||||
{
|
||||
GtkWidget *window, *darea;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
|
||||
|
@ -701,7 +701,7 @@ create_calendar(void)
|
||||
int main(int argc,
|
||||
char *argv[] )
|
||||
{
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
if (g_getenv ("GTK_RTL"))
|
||||
gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL);
|
||||
|
@ -614,7 +614,7 @@ background_area (void)
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
gtk_init (NULL, NULL);
|
||||
gtk_init ();
|
||||
|
||||
if (g_getenv ("RTL"))
|
||||
gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL);
|
||||
|
@ -254,7 +254,7 @@ main (int argc, char **argv)
|
||||
GtkWidget *label;
|
||||
GtkWidget *tree;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
g_signal_connect (window, "destroy",
|
||||
|
@ -109,7 +109,7 @@ main (int argc, char **argv)
|
||||
{
|
||||
GtkWidget *window;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_dialog_new_with_buttons ("Clipboard",
|
||||
NULL,
|
||||
|
@ -36,7 +36,7 @@ main (int argc, char *argv[])
|
||||
GtkWidget *dialog;
|
||||
gint i;
|
||||
|
||||
gtk_init (NULL, NULL);
|
||||
gtk_init ();
|
||||
|
||||
dialog = gtk_color_chooser_dialog_new ("Select a color", NULL);
|
||||
|
||||
|
@ -41,7 +41,7 @@ int main (int argc, char *argv[])
|
||||
GtkWidget *entry;
|
||||
GtkBuilder *builder;
|
||||
|
||||
gtk_init (NULL, NULL);
|
||||
gtk_init ();
|
||||
|
||||
builder = gtk_builder_new_from_file ("testcolorchooser2.ui");
|
||||
window = GTK_WIDGET (gtk_builder_get_object (builder, "window1"));
|
||||
|
@ -1058,7 +1058,7 @@ main (int argc, char **argv)
|
||||
gchar *text;
|
||||
gint i;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
if (g_getenv ("RTL"))
|
||||
gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL);
|
||||
|
@ -234,7 +234,7 @@ main (int argc, char **argv)
|
||||
|
||||
test_init ();
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
model = gtk_list_store_new (1, G_TYPE_STRING);
|
||||
contents = g_array_new (FALSE, FALSE, sizeof (char));
|
||||
|
@ -316,7 +316,7 @@ main (int argc, char *argv[])
|
||||
GtkWidget *box;
|
||||
GtkWidget *button;
|
||||
|
||||
gtk_init (NULL, NULL);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
|
||||
|
@ -590,7 +590,7 @@ main (int argc, char **argv)
|
||||
|
||||
test_init ();
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
g_signal_connect (window, "destroy",
|
||||
|
@ -355,7 +355,7 @@ main (int argc, char *Argv[])
|
||||
GtkWidget *grid;
|
||||
GtkWidget *entry;
|
||||
|
||||
gtk_init (NULL, NULL);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Drag And Drop");
|
||||
|
@ -127,7 +127,7 @@ main (int argc, char *argv[])
|
||||
GtkWidget *window, *vbox, *label;
|
||||
GtkWidget *combo, *scale, *overlay, *da;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 400, 300);
|
||||
|
@ -8,7 +8,7 @@ int main (int argc, char **argv)
|
||||
GIcon *icon;
|
||||
GIcon *icon2;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
|
||||
|
@ -296,7 +296,7 @@ main (int argc, char *argv[])
|
||||
GtkTreeModel *completion_model;
|
||||
GtkCellRenderer *cell;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
g_signal_connect (window, "delete_event", gtk_main_quit, NULL);
|
||||
|
@ -108,7 +108,7 @@ main (int argc, char **argv)
|
||||
GIcon *icon;
|
||||
GtkTargetList *tlist;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Gtk Entry Icons Test");
|
||||
|
@ -133,7 +133,7 @@ main (gint argc, gchar *argv[])
|
||||
{
|
||||
GdkDisplay *extra_display;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
test_error_trapping (gdk_display_get_default ());
|
||||
|
||||
|
@ -156,7 +156,7 @@ create_grid_window (void)
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
if (g_getenv ("RTL"))
|
||||
gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL);
|
||||
|
@ -30,7 +30,7 @@ main (int argc, char *argv[])
|
||||
GtkWidget *tv;
|
||||
GtkTextBuffer *buffer;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
dialog = gtk_message_dialog_new_with_markup (NULL,
|
||||
0,
|
||||
|
@ -540,13 +540,19 @@ main (int argc, char **argv)
|
||||
{ "initial-folder", 'F', 0, G_OPTION_ARG_FILENAME, &initial_folder, "Initial folder to show", "FILENAME" },
|
||||
{ NULL }
|
||||
};
|
||||
GOptionContext *context;
|
||||
|
||||
if (!gtk_init_with_args (&argc, &argv, "", options, NULL, &error))
|
||||
context = g_option_context_new ("");
|
||||
g_option_context_add_main_entries (context, options, NULL);
|
||||
if (!g_option_context_parse (context, &argc, &argv, &error))
|
||||
{
|
||||
g_print ("Failed to parse args: %s\n", error->message);
|
||||
g_error_free (error);
|
||||
return 1;
|
||||
}
|
||||
g_option_context_free (context);
|
||||
|
||||
gtk_init ();
|
||||
|
||||
if (initial_filename && initial_folder)
|
||||
{
|
||||
|
@ -230,11 +230,10 @@ main (int argc,
|
||||
|
||||
context = g_option_context_new ("- test GtkFileChooserButton widget");
|
||||
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
|
||||
g_option_context_add_group (context, gtk_get_option_group (TRUE));
|
||||
g_option_context_parse (context, &argc, &argv, NULL);
|
||||
g_option_context_free (context);
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
/* to test rtl layout, use "--right-to-left" */
|
||||
if (rtl)
|
||||
|
@ -666,7 +666,7 @@ main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
window = create_window ();
|
||||
|
||||
|
@ -61,7 +61,7 @@ main (int argc, char *argv[])
|
||||
GtkWidget *box;
|
||||
GtkWidget *fontchooser;
|
||||
|
||||
gtk_init (NULL, NULL);
|
||||
gtk_init ();
|
||||
|
||||
fontchooser = gtk_font_chooser_widget_new ();
|
||||
|
||||
|
@ -70,7 +70,7 @@ main (int argc, char *argv[])
|
||||
GtkWidget *window;
|
||||
GtkWidget *font_button;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
font_button = gtk_font_button_new ();
|
||||
|
||||
|
@ -32,7 +32,7 @@ main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window, *label, *grid, *demo;
|
||||
|
||||
gtk_init (NULL, NULL);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
grid = gtk_grid_new ();
|
||||
|
@ -136,7 +136,7 @@ int main (int argc, char **argv)
|
||||
GtkWidget *xalign_spin, *yalign_spin, *button, *grid, *label;
|
||||
gfloat xalign, yalign;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 300, 300);
|
||||
|
@ -44,7 +44,7 @@ main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window, *vbox, *button;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
|
||||
|
@ -97,7 +97,7 @@ static const char *menu_data =
|
||||
|
||||
int main (int argc, char **argv)
|
||||
{
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
GtkWidget *box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
|
||||
GtkWidget *menubutton = gtk_menu_button_new ();
|
||||
|
@ -28,7 +28,7 @@ main (int argc,
|
||||
GEmblem *emblem;
|
||||
gchar *str;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
pixbuf = gdk_pixbuf_new_from_file ("apple-red.png", NULL);
|
||||
toplevel = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
|
@ -397,7 +397,7 @@ main (int argc, char *argv[])
|
||||
GtkWidget *window, *box, *button, *controls;
|
||||
int i;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
/* create a new pixel format; we use this to configure the
|
||||
* GL context, and to check for features
|
||||
|
@ -8,7 +8,7 @@ main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window, *fixed, *gears, *spinner;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Test GL/gtk inter-blending");
|
||||
|
@ -625,8 +625,12 @@ main (int argc, char *argv[])
|
||||
{ "import", 0, 0, G_OPTION_ARG_NONE, &do_import, "Use exported actions and menus", NULL },
|
||||
{ NULL, }
|
||||
};
|
||||
GOptionContext *context;
|
||||
|
||||
gtk_init_with_args (&argc, &argv, NULL, entries, NULL, NULL);
|
||||
context = g_option_context_new ("");
|
||||
g_option_context_add_main_entries (context, entries, NULL);
|
||||
g_option_context_parse (context, &argc, &argv, NULL);
|
||||
gtk_init ();
|
||||
|
||||
if (do_export && do_import)
|
||||
{
|
||||
|
@ -453,7 +453,7 @@ spanning_grid (void)
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
gtk_init (NULL, NULL);
|
||||
gtk_init ();
|
||||
|
||||
if (g_getenv ("RTL"))
|
||||
gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL);
|
||||
|
@ -105,7 +105,7 @@ main (int argc, char **argv)
|
||||
GtkCellRenderer *renderer;
|
||||
GtkTreeViewColumn *column;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
model = create_model ();
|
||||
|
||||
|
@ -8894,7 +8894,7 @@ main (int argc, char *argv[])
|
||||
|
||||
g_set_application_name ("GTK+ Test Program");
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
provider = gtk_css_provider_new ();
|
||||
|
||||
|
@ -133,7 +133,7 @@ main (int argc, char *argv[])
|
||||
GtkWidget *content;
|
||||
GtkCssProvider *provider;
|
||||
|
||||
gtk_init (NULL, NULL);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (window), "main");
|
||||
|
@ -967,7 +967,7 @@ main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
window = create_window ();
|
||||
|
||||
|
@ -69,7 +69,7 @@ main (int argc, char *argv[])
|
||||
int scale = 1;
|
||||
GtkIconLookupFlags flags;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
if (argc < 3)
|
||||
{
|
||||
|
@ -235,7 +235,7 @@ main (int argc, char *argv[])
|
||||
GtkWidget *vbox;
|
||||
Views views;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
set_styles ();
|
||||
|
||||
|
@ -420,7 +420,7 @@ main (gint argc, gchar **argv)
|
||||
GtkCellRenderer *cell;
|
||||
GtkTreeViewColumn *tvc;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
/* to test rtl layout, set RTL=1 in the environment */
|
||||
if (g_getenv ("RTL"))
|
||||
|
@ -87,7 +87,7 @@ main (int argc, char **argv)
|
||||
GIcon *icon;
|
||||
GFile *file;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
if (argc > 1)
|
||||
icon_name = argv[1];
|
||||
|
@ -238,7 +238,7 @@ main (int argc, char *argv[])
|
||||
GdkWindow *gdk_win;
|
||||
GdkSeat *seat;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
seat = gdk_display_get_default_seat (gdk_display_get_default ());
|
||||
|
||||
|
@ -137,7 +137,7 @@ kinetic_scrolling (void)
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
gtk_init (NULL, NULL);
|
||||
gtk_init ();
|
||||
|
||||
kinetic_scrolling ();
|
||||
|
||||
|
@ -82,7 +82,7 @@ main (int argc, char *argv[])
|
||||
GtkWidget *box2;
|
||||
GtkWidget *sw;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
add_custom_css ();
|
||||
|
||||
|
@ -255,7 +255,7 @@ main (int argc, char *argv[])
|
||||
GtkWidget *window, *hbox, *vbox, *list, *row, *row3, *row_vbox, *row_hbox, *l;
|
||||
GtkWidget *check, *button, *combo, *scrolled;
|
||||
|
||||
gtk_init (NULL, NULL);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
|
@ -102,7 +102,7 @@ int main (int argc, char *argv[])
|
||||
gint i;
|
||||
gchar *text;
|
||||
|
||||
gtk_init (NULL, NULL);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 300, 300);
|
||||
|
@ -51,7 +51,7 @@ main (int argc, char *argv[])
|
||||
gint i;
|
||||
gchar *text;
|
||||
|
||||
gtk_init (NULL, NULL);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), -1, 300);
|
||||
|
@ -218,7 +218,7 @@ main (int argc, char *argv[])
|
||||
GtkWidget *update;
|
||||
GPermission *permission;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
permission = g_object_new (G_TYPE_TEST_PERMISSION, NULL);
|
||||
|
||||
|
@ -46,7 +46,7 @@ int main (int argc, char **argv)
|
||||
guint row = 0;
|
||||
GMenu *menu;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_resize (GTK_WINDOW (window), 400, 300);
|
||||
|
@ -106,13 +106,19 @@ main (int argc, char *argv[])
|
||||
{ "no-pw-save", 's', 0, G_OPTION_ARG_NONE, &dont_save_password, "Don't show password save options.", NULL },
|
||||
{ NULL }
|
||||
};
|
||||
GOptionContext *context;
|
||||
|
||||
if (!gtk_init_with_args (&argc, &argv, "", options, NULL, &error))
|
||||
context = g_option_context_new ("");
|
||||
g_option_context_add_main_entries (context, options, NULL);
|
||||
if (!g_option_context_parse (context, &argc, &argv, &error))
|
||||
{
|
||||
g_print ("Failed to parse args: %s\n", error->message);
|
||||
g_error_free (error);
|
||||
return 1;
|
||||
}
|
||||
g_option_context_free (context);
|
||||
|
||||
gtk_init ();
|
||||
|
||||
if (force_rtl)
|
||||
gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL);
|
||||
|
@ -105,7 +105,7 @@ main (int argc, char *argv[])
|
||||
GdkScreen *scr2 = NULL; /* Quiet GCC */
|
||||
gboolean correct_second_display = FALSE;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
if (argc == 2)
|
||||
screen2_name = g_strdup (argv[1]);
|
||||
|
@ -26,8 +26,12 @@ int main (int argc, char *argv[])
|
||||
GtkWidget *window;
|
||||
GtkWidget *button;
|
||||
GdkDisplay *display;
|
||||
gboolean has_display;
|
||||
|
||||
gtk_parse_args (&argc, &argv);
|
||||
gdk_set_allowed_backends ("x11");
|
||||
g_unsetenv ("DISPLAY");
|
||||
has_display = gtk_init_check ();
|
||||
g_assert (!has_display);
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
button = gtk_button_new ();
|
||||
|
@ -320,7 +320,7 @@ main (gint argc, gchar *argv[])
|
||||
{
|
||||
GtkWidget *window, *grid;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
grid = gtk_grid_new ();
|
||||
|
@ -51,7 +51,7 @@ main (int argc, char **argv)
|
||||
GtkWidget *box, *button;
|
||||
GList *orientables = NULL;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
grid= gtk_grid_new ();
|
||||
|
@ -549,7 +549,7 @@ main (int argc, char *argv[])
|
||||
GtkWidget *win9;
|
||||
GtkCssProvider *css_provider;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
if (g_getenv ("RTL"))
|
||||
gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL);
|
||||
|
@ -45,7 +45,7 @@ main (int argc, char *argv[])
|
||||
GtkCssProvider *provider;
|
||||
gchar *str;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
provider = gtk_css_provider_new ();
|
||||
gtk_css_provider_load_from_data (provider,
|
||||
|
@ -67,7 +67,7 @@ main(int argc, char **argv)
|
||||
const gchar *creator;
|
||||
GError *error;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
if (argc != 2) {
|
||||
fprintf (stderr, "Usage: testpixbuf-scale FILE\n");
|
||||
|
@ -8,7 +8,7 @@ main (int argc, char *argv[])
|
||||
GtkWidget *win;
|
||||
GtkWidget *view;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_default_size (GTK_WINDOW (win), 400, 600);
|
||||
|
@ -48,7 +48,7 @@ main (int argc, char *argv[])
|
||||
GtkWidget *check;
|
||||
GtkWidget *combo;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_default_size (GTK_WINDOW (win), 400, 600);
|
||||
|
@ -53,7 +53,7 @@ main (int argc, char *argv[])
|
||||
{
|
||||
GtkWidget *window;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
|
||||
|
@ -44,7 +44,7 @@ main (int argc,
|
||||
GtkWidget *window;
|
||||
GtkWidget *app_chooser_widget;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
builder = gtk_builder_new_from_file ("popupat.ui");
|
||||
|
||||
|
@ -98,7 +98,7 @@ main (int argc, char **argv)
|
||||
GtkPrintOperation *print;
|
||||
TestPrintFileOperation *print_file;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
/* Test some random drawing, with per-page paper settings */
|
||||
print = gtk_print_operation_new ();
|
||||
|
@ -52,7 +52,7 @@ main (int argc, char *argv[])
|
||||
{
|
||||
gint i;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
load_types ();
|
||||
|
||||
for (i = 0; tests[i].test; i++)
|
||||
|
@ -111,7 +111,7 @@ main (int argc,
|
||||
gint i;
|
||||
gboolean multiple = FALSE;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
/* to test rtl layout, set RTL=1 in the environment */
|
||||
if (g_getenv ("RTL"))
|
||||
|
@ -150,7 +150,7 @@ main (int argc, char *argv[])
|
||||
GtkWidget *button;
|
||||
GtkAccelGroup *accel_group;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
manager = gtk_recent_manager_get_default ();
|
||||
|
||||
|
@ -6,7 +6,7 @@ main (gint argc,
|
||||
{
|
||||
GtkWidget *window, *revealer, *box, *widget, *entry;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_widget_set_size_request (window, 300, 300);
|
||||
|
@ -143,7 +143,7 @@ main (gint argc,
|
||||
GdkAtom atom;
|
||||
guint i, broken = 0;
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
/* initialize random numbers, disable this for deterministic testing */
|
||||
if (1)
|
||||
|
@ -114,7 +114,7 @@ int main (int argc, char *argv[])
|
||||
gdouble pos_marks[4] = { 0.0, 33.3, 66.6, 100.0 };
|
||||
const gchar *pos_labels[4] = { "Left", "Right", "Top", "Bottom" };
|
||||
|
||||
gtk_init (&argc, &argv);
|
||||
gtk_init ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Ranges with marks");
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user