forked from AuroraMiddleware/gtk
testutils: Add deprecation guards
This commit is contained in:
parent
c2a9202a66
commit
d55628cd9f
@ -664,17 +664,21 @@ gtk_test_display_button_window (const gchar *window_title,
|
||||
...) /* NULL terminated list of (label, &int) pairs */
|
||||
{
|
||||
va_list var_args;
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
||||
GtkWidget *window = gtk_test_create_widget (GTK_TYPE_WINDOW, "title", window_title, NULL);
|
||||
GtkWidget *vbox = gtk_test_create_widget (GTK_TYPE_BOX, "parent", window, "orientation", GTK_ORIENTATION_VERTICAL, NULL);
|
||||
const char *arg1;
|
||||
gtk_test_create_widget (GTK_TYPE_LABEL, "label", dialog_text, "parent", vbox, NULL);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS;
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (try_main_quit), NULL);
|
||||
va_start (var_args, dialog_text);
|
||||
arg1 = va_arg (var_args, const char*);
|
||||
while (arg1)
|
||||
{
|
||||
int *arg2 = va_arg (var_args, int*);
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
||||
GtkWidget *button = gtk_test_create_widget (GTK_TYPE_BUTTON, "label", arg1, "parent", vbox, NULL);
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
||||
g_signal_connect_swapped (button, "clicked", G_CALLBACK (test_increment_intp), arg2);
|
||||
arg1 = va_arg (var_args, const char*);
|
||||
}
|
||||
@ -706,9 +710,11 @@ GtkWidget*
|
||||
gtk_test_create_simple_window (const gchar *window_title,
|
||||
const gchar *dialog_text)
|
||||
{
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
||||
GtkWidget *window = gtk_test_create_widget (GTK_TYPE_WINDOW, "title", window_title, NULL);
|
||||
GtkWidget *vbox = gtk_test_create_widget (GTK_TYPE_BOX, "parent", window, "orientation", GTK_ORIENTATION_VERTICAL, NULL);
|
||||
gtk_test_create_widget (GTK_TYPE_LABEL, "label", dialog_text, "parent", vbox, NULL);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS;
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (try_main_quit), NULL);
|
||||
gtk_widget_show_all (vbox);
|
||||
return window;
|
||||
|
Loading…
Reference in New Issue
Block a user