mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-23 15:49:16 +02:00
doc: remove unnecessary and confusing code from examples
Three of the four GApplicationCommandLine examples contained this line: g_application_set_inactivity_timeout (app, 10000); It is not explained (which could be confusing for readers trying to understand the examplese), or necessary. Worse, it causes two of the examples to pause for ten seconds if they are invoked with no command-line arguments, which makes them seem broken (and would presumably be reported as a bug in any real application). So, remove these calls. Fixes #3615
This commit is contained in:
parent
53b0ba327b
commit
e99dbb943b
@ -33,7 +33,6 @@ main (int argc, char **argv)
|
|||||||
app = g_application_new ("org.gtk.TestApplication",
|
app = g_application_new ("org.gtk.TestApplication",
|
||||||
G_APPLICATION_HANDLES_COMMAND_LINE);
|
G_APPLICATION_HANDLES_COMMAND_LINE);
|
||||||
g_signal_connect (app, "command-line", G_CALLBACK (command_line), NULL);
|
g_signal_connect (app, "command-line", G_CALLBACK (command_line), NULL);
|
||||||
g_application_set_inactivity_timeout (app, 10000);
|
|
||||||
g_application_set_version (app, "2.3");
|
g_application_set_version (app, "2.3");
|
||||||
|
|
||||||
status = g_application_run (app, argc, argv);
|
status = g_application_run (app, argc, argv);
|
||||||
|
@ -95,7 +95,6 @@ main (int argc, char **argv)
|
|||||||
int status;
|
int status;
|
||||||
|
|
||||||
app = test_application_new ("org.gtk.TestApplication", 0);
|
app = test_application_new ("org.gtk.TestApplication", 0);
|
||||||
g_application_set_inactivity_timeout (app, 10000);
|
|
||||||
g_signal_connect (app, "command-line", G_CALLBACK (command_line), NULL);
|
g_signal_connect (app, "command-line", G_CALLBACK (command_line), NULL);
|
||||||
|
|
||||||
status = g_application_run (app, argc, argv);
|
status = g_application_run (app, argc, argv);
|
||||||
|
@ -96,7 +96,6 @@ main (int argc, char **argv)
|
|||||||
app = g_application_new ("org.gtk.TestApplication",
|
app = g_application_new ("org.gtk.TestApplication",
|
||||||
G_APPLICATION_HANDLES_COMMAND_LINE);
|
G_APPLICATION_HANDLES_COMMAND_LINE);
|
||||||
g_signal_connect (app, "command-line", G_CALLBACK (command_line), NULL);
|
g_signal_connect (app, "command-line", G_CALLBACK (command_line), NULL);
|
||||||
g_application_set_inactivity_timeout (app, 10000);
|
|
||||||
|
|
||||||
status = g_application_run (app, argc, argv);
|
status = g_application_run (app, argc, argv);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user