Adapt tests to dialog api change

This commit is contained in:
Matthias Clasen 2010-09-02 09:31:54 -04:00
parent d433a60611
commit 76b21033f9
3 changed files with 2 additions and 32 deletions

View File

@ -254,7 +254,7 @@ main (int argc, char **argv)
contents = g_array_new (FALSE, FALSE, sizeof (char)); contents = g_array_new (FALSE, FALSE, sizeof (char));
dialog = gtk_dialog_new_with_buttons ("GtkComboBox model changes", dialog = gtk_dialog_new_with_buttons ("GtkComboBox model changes",
NULL, GTK_DIALOG_NO_SEPARATOR, NULL, 0,
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
NULL); NULL);

View File

@ -286,7 +286,7 @@ main (int argc,
gtk_src_dir = g_path_get_dirname (cwd); gtk_src_dir = g_path_get_dirname (cwd);
g_free (cwd); g_free (cwd);
win = gtk_dialog_new_with_buttons ("TestFileChooserButton", NULL, GTK_DIALOG_NO_SEPARATOR, win = gtk_dialog_new_with_buttons ("TestFileChooserButton", NULL, 0,
GTK_STOCK_QUIT, GTK_RESPONSE_CLOSE, NULL); GTK_STOCK_QUIT, GTK_RESPONSE_CLOSE, NULL);
g_signal_connect (win, "style-set", G_CALLBACK (win_style_set_cb), NULL); g_signal_connect (win, "style-set", G_CALLBACK (win_style_set_cb), NULL);
g_signal_connect (win, "response", G_CALLBACK (gtk_main_quit), NULL); g_signal_connect (win, "response", G_CALLBACK (gtk_main_quit), NULL);

View File

@ -5720,22 +5720,6 @@ label_toggle (GtkWidget *widget,
gtk_widget_destroy (*label); gtk_widget_destroy (*label);
} }
#define RESPONSE_TOGGLE_SEPARATOR 1
static void
print_response (GtkWidget *dialog,
gint response_id,
gpointer data)
{
g_print ("response signal received (%d)\n", response_id);
if (response_id == RESPONSE_TOGGLE_SEPARATOR)
{
gtk_dialog_set_has_separator (GTK_DIALOG (dialog),
!gtk_dialog_get_has_separator (GTK_DIALOG (dialog)));
}
}
static void static void
create_dialog (GtkWidget *widget) create_dialog (GtkWidget *widget)
{ {
@ -5754,11 +5738,6 @@ create_dialog (GtkWidget *widget)
gtk_window_set_screen (GTK_WINDOW (dialog_window), gtk_window_set_screen (GTK_WINDOW (dialog_window),
gtk_widget_get_screen (widget)); gtk_widget_get_screen (widget));
g_signal_connect (dialog_window,
"response",
G_CALLBACK (print_response),
NULL);
g_signal_connect (dialog_window, "destroy", g_signal_connect (dialog_window, "destroy",
G_CALLBACK (gtk_widget_destroyed), G_CALLBACK (gtk_widget_destroyed),
&dialog_window); &dialog_window);
@ -5783,15 +5762,6 @@ create_dialog (GtkWidget *widget)
gtk_widget_show (button); gtk_widget_show (button);
label = NULL; label = NULL;
button = gtk_button_new_with_label ("Separator");
gtk_widget_set_can_default (button, TRUE);
gtk_dialog_add_action_widget (GTK_DIALOG (dialog_window),
button,
RESPONSE_TOGGLE_SEPARATOR);
gtk_widget_show (button);
} }
if (!gtk_widget_get_visible (dialog_window)) if (!gtk_widget_get_visible (dialog_window))