Do not use new G_APPLICATION_DEFAULT_FLAGS enum value
The merge request !5235 switched tests and examples from G_APPLICATION_FLAGS_NONE, which has been deprecated in GLib 2.74, to G_APPLICATION_DEFAULT_FLAGS. Sadly, it was done unconditionally, which means we'd have to bump the required version of GLib. To avoid that, let's just use the numeric value of the enum member.
This commit is contained in:
@ -182,7 +182,7 @@ main (int argc,
|
|||||||
GtkApplication *app;
|
GtkApplication *app;
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
app = gtk_application_new ("org.gtk.example", G_APPLICATION_DEFAULT_FLAGS);
|
app = gtk_application_new ("org.gtk.example", 0);
|
||||||
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
|
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
|
||||||
status = g_application_run (G_APPLICATION (app), argc, argv);
|
status = g_application_run (G_APPLICATION (app), argc, argv);
|
||||||
g_object_unref (app);
|
g_object_unref (app);
|
||||||
|
|||||||
@ -66,7 +66,7 @@ main (int argc,
|
|||||||
GtkApplication *app;
|
GtkApplication *app;
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
app = gtk_application_new ("org.gtk.example", G_APPLICATION_DEFAULT_FLAGS);
|
app = gtk_application_new ("org.gtk.example", 0);
|
||||||
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
|
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
|
||||||
status = g_application_run (G_APPLICATION (app), argc, argv);
|
status = g_application_run (G_APPLICATION (app), argc, argv);
|
||||||
g_object_unref (app);
|
g_object_unref (app);
|
||||||
|
|||||||
@ -37,7 +37,7 @@ main (int argc,
|
|||||||
GtkApplication *app;
|
GtkApplication *app;
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
app = gtk_application_new ("org.gtk.example", G_APPLICATION_DEFAULT_FLAGS);
|
app = gtk_application_new ("org.gtk.example", 0);
|
||||||
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
|
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
|
||||||
status = g_application_run (G_APPLICATION (app), argc, argv);
|
status = g_application_run (G_APPLICATION (app), argc, argv);
|
||||||
g_object_unref (app);
|
g_object_unref (app);
|
||||||
|
|||||||
@ -2,15 +2,15 @@
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
window_key_press_event_cb (GtkWidget *window,
|
window_key_press_event_cb (GtkWidget *window,
|
||||||
GdkEvent *event,
|
GdkEvent *event,
|
||||||
GtkSearchBar *search_bar)
|
GtkSearchBar *search_bar)
|
||||||
{
|
{
|
||||||
return gtk_search_bar_handle_event (search_bar, event);
|
return gtk_search_bar_handle_event (search_bar, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
activate_cb (GtkApplication *app,
|
activate_cb (GtkApplication *app,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GtkWidget *window;
|
GtkWidget *window;
|
||||||
GtkWidget *search_bar;
|
GtkWidget *search_bar;
|
||||||
@ -40,19 +40,18 @@ activate_cb (GtkApplication *app,
|
|||||||
gtk_search_bar_connect_entry (GTK_SEARCH_BAR (search_bar), GTK_ENTRY (entry));
|
gtk_search_bar_connect_entry (GTK_SEARCH_BAR (search_bar), GTK_ENTRY (entry));
|
||||||
|
|
||||||
g_signal_connect (window, "key-press-event",
|
g_signal_connect (window, "key-press-event",
|
||||||
G_CALLBACK (window_key_press_event_cb), search_bar);
|
G_CALLBACK (window_key_press_event_cb),
|
||||||
|
search_bar);
|
||||||
}
|
}
|
||||||
|
|
||||||
gint
|
int
|
||||||
main (gint argc,
|
main (int argc,
|
||||||
gchar *argv[])
|
char *argv[])
|
||||||
{
|
{
|
||||||
GtkApplication *app;
|
GtkApplication *app;
|
||||||
|
|
||||||
app = gtk_application_new ("org.gtk.Example.GtkSearchBar",
|
app = gtk_application_new ("org.gtk.Example.GtkSearchBar", 0);
|
||||||
G_APPLICATION_DEFAULT_FLAGS);
|
g_signal_connect (app, "activate", G_CALLBACK (activate_cb), NULL);
|
||||||
g_signal_connect (app, "activate",
|
|
||||||
G_CALLBACK (activate_cb), NULL);
|
|
||||||
|
|
||||||
return g_application_run (G_APPLICATION (app), argc, argv);
|
return g_application_run (G_APPLICATION (app), argc, argv);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,7 @@ main (int argc,
|
|||||||
GtkApplication *app;
|
GtkApplication *app;
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
app = gtk_application_new ("org.gtk.example", G_APPLICATION_DEFAULT_FLAGS);
|
app = gtk_application_new ("org.gtk.example", 0);
|
||||||
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
|
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);
|
||||||
status = g_application_run (G_APPLICATION (app), argc, argv);
|
status = g_application_run (G_APPLICATION (app), argc, argv);
|
||||||
g_object_unref (app);
|
g_object_unref (app);
|
||||||
|
|||||||
@ -99,11 +99,10 @@ main (int argc,
|
|||||||
GtkApplication *application;
|
GtkApplication *application;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
application = gtk_application_new ("org.gtk.test.infobar",
|
application = gtk_application_new ("org.gtk.test.infobar", 0);
|
||||||
G_APPLICATION_DEFAULT_FLAGS);
|
|
||||||
g_signal_connect (application, "activate", G_CALLBACK (on_activate), NULL);
|
g_signal_connect (application, "activate", G_CALLBACK (on_activate), NULL);
|
||||||
|
|
||||||
result = g_application_run (G_APPLICATION (application), argc, argv);
|
result = g_application_run (G_APPLICATION (application), argc, argv);
|
||||||
g_object_unref (application);
|
g_object_unref (application);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -202,7 +202,6 @@ test_app_new (void)
|
|||||||
|
|
||||||
test_app = g_object_new (test_app_get_type (),
|
test_app = g_object_new (test_app_get_type (),
|
||||||
"application-id", "org.gtk.testlist4",
|
"application-id", "org.gtk.testlist4",
|
||||||
"flags", G_APPLICATION_DEFAULT_FLAGS,
|
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
return test_app;
|
return test_app;
|
||||||
|
|||||||
@ -97,8 +97,7 @@ int
|
|||||||
main (int argc,
|
main (int argc,
|
||||||
char *argv[])
|
char *argv[])
|
||||||
{
|
{
|
||||||
GtkApplication *application = gtk_application_new ("org.gtk.test.modelbutton",
|
GtkApplication *application = gtk_application_new ("org.gtk.test.modelbutton", 0);
|
||||||
G_APPLICATION_DEFAULT_FLAGS);
|
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
g_signal_connect (application, "activate",
|
g_signal_connect (application, "activate",
|
||||||
|
|||||||
Reference in New Issue
Block a user