[gtk/window-destroy: 67/74] Use gtk_window_destroy
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/window-destroy: 67/74] Use gtk_window_destroy
- Date: Mon, 11 May 2020 15:21:23 +0000 (UTC)
commit 11470e2023a2ed35dcac2451d51c51b573838c16
Author: Matthias Clasen <mclasen redhat com>
Date: Sat May 9 10:26:22 2020 -0400
Use gtk_window_destroy
Replace calls to gtk_widget_destroy on windows
with gtk_window_destroy.
demos/constraint-editor/constraint-editor-window.c | 6 +-
demos/gtk-demo/application.c | 6 +-
demos/gtk-demo/assistant.c | 6 +-
demos/gtk-demo/builder.c | 4 +-
demos/gtk-demo/clipboard.c | 4 +-
demos/gtk-demo/combobox.c | 2 +-
demos/gtk-demo/constraints.c | 4 +-
demos/gtk-demo/constraints2.c | 4 +-
demos/gtk-demo/constraints3.c | 4 +-
demos/gtk-demo/css_accordion.c | 2 +-
demos/gtk-demo/css_basics.c | 2 +-
demos/gtk-demo/css_blendmodes.c | 2 +-
demos/gtk-demo/css_multiplebgs.c | 2 +-
demos/gtk-demo/css_pixbufs.c | 2 +-
demos/gtk-demo/css_shadows.c | 2 +-
demos/gtk-demo/cursors.c | 2 +-
demos/gtk-demo/dialog.c | 6 +-
demos/gtk-demo/dnd.c | 2 +-
demos/gtk-demo/drawingarea.c | 2 +-
demos/gtk-demo/editable_cells.c | 2 +-
demos/gtk-demo/entry_completion.c | 2 +-
demos/gtk-demo/entry_undo.c | 2 +-
demos/gtk-demo/expander.c | 4 +-
demos/gtk-demo/filtermodel.c | 2 +-
demos/gtk-demo/fishbowl.c | 2 +-
demos/gtk-demo/fixed.c | 2 +-
demos/gtk-demo/flowbox.c | 2 +-
demos/gtk-demo/font_features.c | 2 +-
demos/gtk-demo/fontrendering.c | 2 +-
demos/gtk-demo/gears.c | 2 +-
demos/gtk-demo/gestures.c | 2 +-
demos/gtk-demo/glarea.c | 4 +-
demos/gtk-demo/headerbar.c | 2 +-
demos/gtk-demo/hypertext.c | 2 +-
demos/gtk-demo/iconscroll.c | 2 +-
demos/gtk-demo/iconview.c | 4 +-
demos/gtk-demo/iconview_edit.c | 2 +-
demos/gtk-demo/images.c | 12 +-
demos/gtk-demo/infobar.c | 8 +-
demos/gtk-demo/links.c | 4 +-
demos/gtk-demo/list_store.c | 2 +-
demos/gtk-demo/listbox.c | 2 +-
demos/gtk-demo/main.c | 2 +-
demos/gtk-demo/markup.c | 2 +-
demos/gtk-demo/modelbutton.c | 2 +-
demos/gtk-demo/overlay.c | 2 +-
demos/gtk-demo/overlay2.c | 2 +-
demos/gtk-demo/pagesetup.c | 4 +-
demos/gtk-demo/paint.c | 2 +-
demos/gtk-demo/paintable.c | 2 +-
demos/gtk-demo/paintable_animated.c | 2 +-
demos/gtk-demo/paintable_mediastream.c | 2 +-
demos/gtk-demo/panes.c | 2 +-
demos/gtk-demo/password_entry.c | 4 +-
demos/gtk-demo/peg_solitaire.c | 2 +-
demos/gtk-demo/pickers.c | 2 +-
demos/gtk-demo/pixbufs.c | 4 +-
demos/gtk-demo/printing.c | 2 +-
demos/gtk-demo/revealer.c | 2 +-
demos/gtk-demo/rotated_text.c | 2 +-
demos/gtk-demo/scale.c | 2 +-
demos/gtk-demo/search_entry.c | 2 +-
demos/gtk-demo/search_entry2.c | 2 +-
demos/gtk-demo/shortcut_triggers.c | 2 +-
demos/gtk-demo/shortcuts.c | 2 +-
demos/gtk-demo/sidebar.c | 2 +-
demos/gtk-demo/sizegroup.c | 2 +-
demos/gtk-demo/sliding_puzzle.c | 2 +-
demos/gtk-demo/spinbutton.c | 2 +-
demos/gtk-demo/spinner.c | 4 +-
demos/gtk-demo/stack.c | 2 +-
demos/gtk-demo/tabs.c | 2 +-
demos/gtk-demo/tagged_entry.c | 4 +-
demos/gtk-demo/textmask.c | 2 +-
demos/gtk-demo/textscroll.c | 2 +-
demos/gtk-demo/textundo.c | 2 +-
demos/gtk-demo/textview.c | 2 +-
demos/gtk-demo/themes.c | 2 +-
demos/gtk-demo/theming_style_classes.c | 2 +-
demos/gtk-demo/transparent.c | 2 +-
demos/gtk-demo/tree_store.c | 2 +-
demos/gtk-demo/video_player.c | 4 +-
demos/node-editor/node-editor-window.c | 10 +-
demos/widget-factory/widget-factory.c | 2 +-
docs/tools/shooter.c | 2 +-
examples/action-namespace.c | 2 +-
examples/bp/bloatpad.c | 2 +-
examples/grid-packing.c | 2 +-
examples/hello-world.c | 2 +-
examples/plugman.c | 4 +-
examples/sunny.c | 2 +-
gtk/gtkappchooserbutton.c | 4 +-
gtk/gtkappchooserdialog.c | 2 +-
gtk/gtkapplicationwindow.c | 4 +-
gtk/gtkcolorbutton.c | 2 +-
gtk/gtkdialog.c | 4 +-
gtk/gtkfilechooserbutton.c | 2 +-
gtk/gtkfilechooserdialog.c | 4 +-
gtk/gtkfilechoosernative.c | 2 +-
gtk/gtkfilechooserwidget.c | 6 +-
gtk/gtkfontbutton.c | 4 +-
gtk/gtkmessagedialog.c | 4 +-
gtk/gtkmountoperation.c | 10 +-
gtk/gtkpagesetupunixdialog.c | 2 +-
gtk/gtkprintbackend.c | 2 +-
gtk/gtkprinteroptionwidget.c | 2 +-
gtk/gtkprintoperation-unix.c | 4 +-
gtk/gtkprintoperation.c | 6 +-
gtk/gtkprintunixdialog.c | 4 +-
gtk/gtkwindow.c | 6 +-
gtk/inspector/css-editor.c | 4 +-
gtk/inspector/recorder.c | 4 +-
tests/gdkgears.c | 2 +-
tests/print-editor.c | 12 +-
tests/testappchooser.c | 4 +-
tests/testassistant.c | 14 +-
tests/testborderdrawing.c | 2 +-
tests/testdialog.c | 26 ++--
tests/testfilechooser.c | 10 +-
tests/testglarea.c | 2 +-
tests/testgtk.c | 158 ++++++++++-----------
tests/testheaderbar.c | 4 +-
tests/testlogout.c | 2 +-
tests/testrevealer.c | 2 +-
tests/teststack.c | 2 +-
tests/testvolumebutton.c | 2 +-
tests/testwindowsize.c | 2 +-
testsuite/a11y/accessibility-dump.c | 2 +-
testsuite/gtk/action.c | 4 +-
testsuite/gtk/builder.c | 58 ++++----
testsuite/gtk/displayclose.c | 2 +-
testsuite/gtk/grid-layout.c | 10 +-
testsuite/gtk/object.c | 3 +-
testsuite/gtk/objects-finalize.c | 2 +-
testsuite/gtk/regression-tests.c | 4 +-
testsuite/gtk/templates.c | 58 ++++----
testsuite/gtk/window.c | 8 +-
testsuite/reftests/reftest-snapshot.c | 2 +-
138 files changed, 365 insertions(+), 368 deletions(-)
---
diff --git a/demos/constraint-editor/constraint-editor-window.c
b/demos/constraint-editor/constraint-editor-window.c
index 1a78092994..2a7b228028 100644
--- a/demos/constraint-editor/constraint-editor-window.c
+++ b/demos/constraint-editor/constraint-editor-window.c
@@ -317,7 +317,7 @@ save_response_cb (GtkNativeDialog *dialog,
"Saving failed");
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (message_dialog),
"%s", error->message);
- g_signal_connect (message_dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
+ g_signal_connect (message_dialog, "response", G_CALLBACK (gtk_window_destroy), NULL);
gtk_widget_show (message_dialog);
g_error_free (error);
}
@@ -403,7 +403,7 @@ constraint_editor_done (ConstraintEditor *editor,
g_clear_object (&old_constraint);
- gtk_widget_destroy (gtk_widget_get_ancestor (GTK_WIDGET (editor), GTK_TYPE_WINDOW));
+ gtk_window_destroy (GTK_WINDOW (gtk_widget_get_ancestor (GTK_WIDGET (editor), GTK_TYPE_WINDOW)));
}
static void
@@ -444,7 +444,7 @@ guide_editor_done (GuideEditor *editor,
GtkConstraintGuide *guide,
ConstraintEditorWindow *win)
{
- gtk_widget_destroy (gtk_widget_get_ancestor (GTK_WIDGET (editor), GTK_TYPE_WINDOW));
+ gtk_window_destroy (GTK_WINDOW (gtk_widget_get_ancestor (GTK_WIDGET (editor), GTK_TYPE_WINDOW)));
}
static void
diff --git a/demos/gtk-demo/application.c b/demos/gtk-demo/application.c
index 53be2b10d0..64cf105a4e 100644
--- a/demos/gtk-demo/application.c
+++ b/demos/gtk-demo/application.c
@@ -47,7 +47,7 @@ show_action_dialog (GSimpleAction *action)
name);
g_signal_connect (dialog, "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
+ G_CALLBACK (gtk_window_destroy), NULL);
gtk_widget_show (dialog);
}
@@ -120,7 +120,7 @@ open_response_cb (GtkNativeDialog *dialog,
"Error loading file: \"%s\"",
error->message);
g_signal_connect (message_dialog, "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
+ G_CALLBACK (gtk_window_destroy), NULL);
gtk_widget_show (message_dialog);
g_error_free (error);
}
@@ -234,7 +234,7 @@ activate_quit (GSimpleAction *action,
win = list->data;
next = list->next;
- gtk_widget_destroy (GTK_WIDGET (win));
+ gtk_window_destroy (GTK_WINDOW (win));
list = next;
}
diff --git a/demos/gtk-demo/assistant.c b/demos/gtk-demo/assistant.c
index 13011caa4e..c1da7b02e6 100644
--- a/demos/gtk-demo/assistant.c
+++ b/demos/gtk-demo/assistant.c
@@ -26,7 +26,7 @@ apply_changes_gradually (gpointer data)
else
{
/* Close automatically once changes are fully applied. */
- gtk_widget_destroy (data);
+ gtk_window_destroy (GTK_WINDOW (data));
return G_SOURCE_REMOVE;
}
}
@@ -41,7 +41,7 @@ on_assistant_apply (GtkWidget *widget, gpointer data)
static void
on_assistant_close_cancel (GtkWidget *widget, gpointer data)
{
- gtk_widget_destroy (widget);
+ gtk_window_destroy (GTK_WINDOW (widget));
}
static void
@@ -198,7 +198,7 @@ do_assistant (GtkWidget *do_widget)
if (!gtk_widget_get_visible (assistant))
gtk_widget_show (assistant);
else
- gtk_widget_destroy (assistant);
+ gtk_window_destroy (GTK_WINDOW (assistant));
return assistant;
}
diff --git a/demos/gtk-demo/builder.c b/demos/gtk-demo/builder.c
index 709e1465e6..b0c3f3cdc3 100644
--- a/demos/gtk-demo/builder.c
+++ b/demos/gtk-demo/builder.c
@@ -12,7 +12,7 @@ quit_activate (GSimpleAction *action,
{
GtkWidget *window = user_data;
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
static void
@@ -87,7 +87,7 @@ do_builder (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/clipboard.c b/demos/gtk-demo/clipboard.c
index c00f95f0f6..fbecef7506 100644
--- a/demos/gtk-demo/clipboard.c
+++ b/demos/gtk-demo/clipboard.c
@@ -69,7 +69,7 @@ paste_received (GObject *source_object,
"Could not paste text: %s",
error->message);
g_signal_connect (dialog, "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
+ G_CALLBACK (gtk_window_destroy), NULL);
gtk_widget_show (dialog);
g_error_free (error);
@@ -185,7 +185,7 @@ do_clipboard (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/combobox.c b/demos/gtk-demo/combobox.c
index 318f8bdfd0..2be94b3c8c 100644
--- a/demos/gtk-demo/combobox.c
+++ b/demos/gtk-demo/combobox.c
@@ -448,7 +448,7 @@ do_combobox (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/constraints.c b/demos/gtk-demo/constraints.c
index 23aa0c57d0..e8934031d5 100644
--- a/demos/gtk-demo/constraints.c
+++ b/demos/gtk-demo/constraints.c
@@ -277,13 +277,13 @@ do_constraints (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (box), button);
gtk_widget_set_hexpand (grid, TRUE);
g_signal_connect_swapped (button, "clicked",
- G_CALLBACK (gtk_widget_destroy), window);
+ G_CALLBACK (gtk_window_destroy), window);
}
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/constraints2.c b/demos/gtk-demo/constraints2.c
index e11d9a3f59..e5dd879198 100644
--- a/demos/gtk-demo/constraints2.c
+++ b/demos/gtk-demo/constraints2.c
@@ -233,13 +233,13 @@ do_constraints2 (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (box), button);
gtk_widget_set_hexpand (grid, TRUE);
g_signal_connect_swapped (button, "clicked",
- G_CALLBACK (gtk_widget_destroy), window);
+ G_CALLBACK (gtk_window_destroy), window);
}
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/constraints3.c b/demos/gtk-demo/constraints3.c
index a92153633b..86e753b3a6 100644
--- a/demos/gtk-demo/constraints3.c
+++ b/demos/gtk-demo/constraints3.c
@@ -153,13 +153,13 @@ do_constraints3 (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (box), button);
gtk_widget_set_hexpand (grid, TRUE);
g_signal_connect_swapped (button, "clicked",
- G_CALLBACK (gtk_widget_destroy), window);
+ G_CALLBACK (gtk_window_destroy), window);
}
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/css_accordion.c b/demos/gtk-demo/css_accordion.c
index 18d50f9caf..c81047b3cc 100644
--- a/demos/gtk-demo/css_accordion.c
+++ b/demos/gtk-demo/css_accordion.c
@@ -62,7 +62,7 @@ do_css_accordion (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/css_basics.c b/demos/gtk-demo/css_basics.c
index bba89fcddc..fed09bb1e5 100644
--- a/demos/gtk-demo/css_basics.c
+++ b/demos/gtk-demo/css_basics.c
@@ -112,7 +112,7 @@ do_css_basics (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/css_blendmodes.c b/demos/gtk-demo/css_blendmodes.c
index 6f2b576f18..7031039225 100644
--- a/demos/gtk-demo/css_blendmodes.c
+++ b/demos/gtk-demo/css_blendmodes.c
@@ -140,7 +140,7 @@ do_css_blendmodes (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/css_multiplebgs.c b/demos/gtk-demo/css_multiplebgs.c
index d3436bf6c2..4a9dd81792 100644
--- a/demos/gtk-demo/css_multiplebgs.c
+++ b/demos/gtk-demo/css_multiplebgs.c
@@ -152,7 +152,7 @@ do_css_multiplebgs (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/css_pixbufs.c b/demos/gtk-demo/css_pixbufs.c
index a12142dd47..2617c76280 100644
--- a/demos/gtk-demo/css_pixbufs.c
+++ b/demos/gtk-demo/css_pixbufs.c
@@ -119,7 +119,7 @@ do_css_pixbufs (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/css_shadows.c b/demos/gtk-demo/css_shadows.c
index db2f5ac521..b41e7eb16f 100644
--- a/demos/gtk-demo/css_shadows.c
+++ b/demos/gtk-demo/css_shadows.c
@@ -137,7 +137,7 @@ do_css_shadows (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/cursors.c b/demos/gtk-demo/cursors.c
index e5c00d19b2..78bd12f8b8 100644
--- a/demos/gtk-demo/cursors.c
+++ b/demos/gtk-demo/cursors.c
@@ -36,7 +36,7 @@ do_cursors (GtkWidget *do_widget)
gtk_widget_show (window);
else
{
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
return window;
diff --git a/demos/gtk-demo/dialog.c b/demos/gtk-demo/dialog.c
index ec42d4ee85..673a6e21f2 100644
--- a/demos/gtk-demo/dialog.c
+++ b/demos/gtk-demo/dialog.c
@@ -26,7 +26,7 @@ message_dialog_clicked (GtkButton *button,
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
"%d", i);
gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
i++;
}
@@ -89,7 +89,7 @@ interactive_dialog_clicked (GtkButton *button,
gtk_editable_set_text (GTK_EDITABLE (entry2), gtk_editable_get_text (GTK_EDITABLE (local_entry2)));
}
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
GtkWidget *
@@ -168,7 +168,7 @@ do_dialog (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/dnd.c b/demos/gtk-demo/dnd.c
index fd26c9e77a..9c2454f058 100644
--- a/demos/gtk-demo/dnd.c
+++ b/demos/gtk-demo/dnd.c
@@ -492,7 +492,7 @@ do_dnd (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/drawingarea.c b/demos/gtk-demo/drawingarea.c
index 5404f53a1c..4309d99573 100644
--- a/demos/gtk-demo/drawingarea.c
+++ b/demos/gtk-demo/drawingarea.c
@@ -260,7 +260,7 @@ do_drawingarea (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/editable_cells.c b/demos/gtk-demo/editable_cells.c
index 7c28dc2060..05ed5fe7ba 100644
--- a/demos/gtk-demo/editable_cells.c
+++ b/demos/gtk-demo/editable_cells.c
@@ -409,7 +409,7 @@ do_editable_cells (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/entry_completion.c b/demos/gtk-demo/entry_completion.c
index 27ad6730d9..6a23b78d67 100644
--- a/demos/gtk-demo/entry_completion.c
+++ b/demos/gtk-demo/entry_completion.c
@@ -86,7 +86,7 @@ do_entry_completion (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/entry_undo.c b/demos/gtk-demo/entry_undo.c
index cab5ac0291..39bebb8d30 100644
--- a/demos/gtk-demo/entry_undo.c
+++ b/demos/gtk-demo/entry_undo.c
@@ -48,7 +48,7 @@ do_entry_undo (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/expander.c b/demos/gtk-demo/expander.c
index 78cb3fb271..63ef27081d 100644
--- a/demos/gtk-demo/expander.c
+++ b/demos/gtk-demo/expander.c
@@ -15,7 +15,7 @@ static GtkWidget *window = NULL;
static void
response_cb (GtkDialog *dialog, gint response_id)
{
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
window = NULL;
}
@@ -90,7 +90,7 @@ do_expander (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/filtermodel.c b/demos/gtk-demo/filtermodel.c
index 6933cc57a2..e3a55c4f99 100644
--- a/demos/gtk-demo/filtermodel.c
+++ b/demos/gtk-demo/filtermodel.c
@@ -198,7 +198,7 @@ do_filtermodel (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/fishbowl.c b/demos/gtk-demo/fishbowl.c
index 195746d91c..6cc2dfc1a2 100644
--- a/demos/gtk-demo/fishbowl.c
+++ b/demos/gtk-demo/fishbowl.c
@@ -288,7 +288,7 @@ do_fishbowl (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/fixed.c b/demos/gtk-demo/fixed.c
index dcdf253596..81c503261c 100644
--- a/demos/gtk-demo/fixed.c
+++ b/demos/gtk-demo/fixed.c
@@ -161,7 +161,7 @@ do_fixed (GtkWidget *do_widget)
if (!gtk_widget_get_visible (demo_window))
gtk_widget_show (demo_window);
else
- gtk_widget_destroy (demo_window);
+ gtk_window_destroy (GTK_WINDOW (demo_window));
return demo_window;
}
diff --git a/demos/gtk-demo/flowbox.c b/demos/gtk-demo/flowbox.c
index 3d8641c90e..8340923be5 100644
--- a/demos/gtk-demo/flowbox.c
+++ b/demos/gtk-demo/flowbox.c
@@ -743,7 +743,7 @@ do_flowbox (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/font_features.c b/demos/gtk-demo/font_features.c
index 99cd083bac..0a09dc05bf 100644
--- a/demos/gtk-demo/font_features.c
+++ b/demos/gtk-demo/font_features.c
@@ -1343,7 +1343,7 @@ do_font_features (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_window_present (GTK_WINDOW (window));
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/fontrendering.c b/demos/gtk-demo/fontrendering.c
index b10b7929a5..a56b242ad5 100644
--- a/demos/gtk-demo/fontrendering.c
+++ b/demos/gtk-demo/fontrendering.c
@@ -281,7 +281,7 @@ do_fontrendering (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/gears.c b/demos/gtk-demo/gears.c
index e276d6209e..e7a198e55b 100644
--- a/demos/gtk-demo/gears.c
+++ b/demos/gtk-demo/gears.c
@@ -131,7 +131,7 @@ do_gears (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/gestures.c b/demos/gtk-demo/gestures.c
index a001b1908b..99dccaa9a5 100644
--- a/demos/gtk-demo/gestures.c
+++ b/demos/gtk-demo/gestures.c
@@ -209,7 +209,7 @@ do_gestures (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/glarea.c b/demos/gtk-demo/glarea.c
index 0a5f965a07..8de86d1765 100644
--- a/demos/gtk-demo/glarea.c
+++ b/demos/gtk-demo/glarea.c
@@ -427,7 +427,7 @@ create_glarea_window (GtkWidget *do_widget)
button = gtk_button_new_with_label ("Quit");
gtk_widget_set_hexpand (button, TRUE);
gtk_container_add (GTK_CONTAINER (box), button);
- g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_widget_destroy), window);
+ g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_window_destroy), window);
return window;
}
@@ -441,7 +441,7 @@ do_glarea (GtkWidget *do_widget)
if (!gtk_widget_get_visible (demo_window))
gtk_widget_show (demo_window);
else
- gtk_widget_destroy (demo_window);
+ gtk_window_destroy (GTK_WINDOW (demo_window));
return demo_window;
}
diff --git a/demos/gtk-demo/headerbar.c b/demos/gtk-demo/headerbar.c
index 3a20d14ab3..7f1acfa652 100644
--- a/demos/gtk-demo/headerbar.c
+++ b/demos/gtk-demo/headerbar.c
@@ -58,7 +58,7 @@ do_headerbar (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/hypertext.c b/demos/gtk-demo/hypertext.c
index e85da1b776..b52c4b4875 100644
--- a/demos/gtk-demo/hypertext.c
+++ b/demos/gtk-demo/hypertext.c
@@ -273,7 +273,7 @@ do_hypertext (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/iconscroll.c b/demos/gtk-demo/iconscroll.c
index 3ee06e6a21..e53e06c2e3 100644
--- a/demos/gtk-demo/iconscroll.c
+++ b/demos/gtk-demo/iconscroll.c
@@ -223,7 +223,7 @@ do_iconscroll (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/iconview.c b/demos/gtk-demo/iconview.c
index 0b80aafae1..45dc455e41 100644
--- a/demos/gtk-demo/iconview.c
+++ b/demos/gtk-demo/iconview.c
@@ -228,7 +228,7 @@ home_clicked (GtkButton *item,
static void close_window(void)
{
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
window = NULL;
g_object_unref (file_pixbuf);
@@ -320,7 +320,7 @@ do_iconview (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/iconview_edit.c b/demos/gtk-demo/iconview_edit.c
index bba6a75c97..f04a6361e8 100644
--- a/demos/gtk-demo/iconview_edit.c
+++ b/demos/gtk-demo/iconview_edit.c
@@ -150,7 +150,7 @@ do_iconview_edit (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/images.c b/demos/gtk-demo/images.c
index 72cd574ed6..8dc68de316 100644
--- a/demos/gtk-demo/images.c
+++ b/demos/gtk-demo/images.c
@@ -91,7 +91,7 @@ progressive_timeout (gpointer data)
g_error_free (error);
g_signal_connect (dialog, "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
+ G_CALLBACK (gtk_window_destroy), NULL);
g_object_unref (image_stream);
image_stream = NULL;
@@ -119,7 +119,7 @@ progressive_timeout (gpointer data)
g_error_free (error);
g_signal_connect (dialog, "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
+ G_CALLBACK (gtk_window_destroy), NULL);
g_object_unref (image_stream);
image_stream = NULL;
@@ -152,7 +152,7 @@ progressive_timeout (gpointer data)
g_error_free (error);
g_signal_connect (dialog, "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
+ G_CALLBACK (gtk_window_destroy), NULL);
gtk_widget_show (dialog);
@@ -189,7 +189,7 @@ progressive_timeout (gpointer data)
g_error_free (error);
g_signal_connect (dialog, "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
+ G_CALLBACK (gtk_window_destroy), NULL);
gtk_widget_show (dialog);
@@ -223,7 +223,7 @@ progressive_timeout (gpointer data)
g_error_free (error);
g_signal_connect (dialog, "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
+ G_CALLBACK (gtk_window_destroy), NULL);
gtk_widget_show (dialog);
@@ -471,7 +471,7 @@ do_images (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/infobar.c b/demos/gtk-demo/infobar.c
index d3c1464ffa..12fbe71c5b 100644
--- a/demos/gtk-demo/infobar.c
+++ b/demos/gtk-demo/infobar.c
@@ -29,10 +29,8 @@ on_bar_response (GtkInfoBar *info_bar,
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
"Your response has id %d", response_id);
- g_signal_connect_swapped (dialog,
- "response",
- G_CALLBACK (gtk_widget_destroy),
- dialog);
+ g_signal_connect_swapped (dialog, "response",
+ G_CALLBACK (gtk_window_destroy), dialog);
gtk_widget_show (dialog);
}
@@ -148,7 +146,7 @@ do_infobar (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/links.c b/demos/gtk-demo/links.c
index ae50f5a389..72cab2c22e 100644
--- a/demos/gtk-demo/links.c
+++ b/demos/gtk-demo/links.c
@@ -12,7 +12,7 @@ response_cb (GtkWidget *dialog,
gint response_id,
gpointer data)
{
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static gboolean
@@ -87,7 +87,7 @@ do_links (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/list_store.c b/demos/gtk-demo/list_store.c
index b96723d7ee..da9e9d18d8 100644
--- a/demos/gtk-demo/list_store.c
+++ b/demos/gtk-demo/list_store.c
@@ -307,7 +307,7 @@ do_list_store (GtkWidget *do_widget)
}
else
{
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
window = NULL;
if (timeout != 0)
{
diff --git a/demos/gtk-demo/listbox.c b/demos/gtk-demo/listbox.c
index 92514082cd..9221cab837 100644
--- a/demos/gtk-demo/listbox.c
+++ b/demos/gtk-demo/listbox.c
@@ -387,7 +387,7 @@ do_listbox (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/main.c b/demos/gtk-demo/main.c
index a16c9398ff..f8ef62d915 100644
--- a/demos/gtk-demo/main.c
+++ b/demos/gtk-demo/main.c
@@ -101,7 +101,7 @@ activate_quit (GSimpleAction *action,
win = list->data;
next = list->next;
- gtk_widget_destroy (GTK_WIDGET (win));
+ gtk_window_destroy (GTK_WINDOW (win));
list = next;
}
diff --git a/demos/gtk-demo/markup.c b/demos/gtk-demo/markup.c
index d21fba6ddf..ff62521b36 100644
--- a/demos/gtk-demo/markup.c
+++ b/demos/gtk-demo/markup.c
@@ -125,7 +125,7 @@ do_markup (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/modelbutton.c b/demos/gtk-demo/modelbutton.c
index 01d321a298..055189a1f5 100644
--- a/demos/gtk-demo/modelbutton.c
+++ b/demos/gtk-demo/modelbutton.c
@@ -58,7 +58,7 @@ do_modelbutton (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
diff --git a/demos/gtk-demo/overlay.c b/demos/gtk-demo/overlay.c
index 8b5a82b175..61037b3401 100644
--- a/demos/gtk-demo/overlay.c
+++ b/demos/gtk-demo/overlay.c
@@ -85,7 +85,7 @@ do_overlay (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/overlay2.c b/demos/gtk-demo/overlay2.c
index 5746f377d5..8740e4b80d 100644
--- a/demos/gtk-demo/overlay2.c
+++ b/demos/gtk-demo/overlay2.c
@@ -95,7 +95,7 @@ do_overlay2 (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/pagesetup.c b/demos/gtk-demo/pagesetup.c
index b440a1735a..45f6982f6a 100644
--- a/demos/gtk-demo/pagesetup.c
+++ b/demos/gtk-demo/pagesetup.c
@@ -11,7 +11,7 @@
static void
done_cb (GtkDialog *dialog, gint response, gpointer data)
{
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
GtkWidget *
@@ -29,7 +29,7 @@ do_pagesetup (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/paint.c b/demos/gtk-demo/paint.c
index e25efc5095..a7a7c4eddf 100644
--- a/demos/gtk-demo/paint.c
+++ b/demos/gtk-demo/paint.c
@@ -411,7 +411,7 @@ do_paint (GtkWidget *toplevel)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/paintable.c b/demos/gtk-demo/paintable.c
index 63fef5d5c8..982697ed7c 100644
--- a/demos/gtk-demo/paintable.c
+++ b/demos/gtk-demo/paintable.c
@@ -171,7 +171,7 @@ do_paintable (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/paintable_animated.c b/demos/gtk-demo/paintable_animated.c
index 4c71512b1e..f7571c08b2 100644
--- a/demos/gtk-demo/paintable_animated.c
+++ b/demos/gtk-demo/paintable_animated.c
@@ -203,7 +203,7 @@ do_paintable_animated (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/paintable_mediastream.c b/demos/gtk-demo/paintable_mediastream.c
index 4b1cde9e2d..20ae54bb6c 100644
--- a/demos/gtk-demo/paintable_mediastream.c
+++ b/demos/gtk-demo/paintable_mediastream.c
@@ -306,7 +306,7 @@ do_paintable_mediastream (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/panes.c b/demos/gtk-demo/panes.c
index cca999a93b..7d94ae5cbe 100644
--- a/demos/gtk-demo/panes.c
+++ b/demos/gtk-demo/panes.c
@@ -202,7 +202,7 @@ do_panes (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/password_entry.c b/demos/gtk-demo/password_entry.c
index 04867237c6..478bcf2c08 100644
--- a/demos/gtk-demo/password_entry.c
+++ b/demos/gtk-demo/password_entry.c
@@ -74,7 +74,7 @@ do_password_entry (GtkWidget *do_widget)
button = gtk_button_new_with_mnemonic ("_Done");
gtk_widget_add_css_class (button, "suggested-action");
- g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_widget_destroy), window);
+ g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_window_destroy), window);
gtk_widget_set_sensitive (button, FALSE);
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), button);
@@ -84,7 +84,7 @@ do_password_entry (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/peg_solitaire.c b/demos/gtk-demo/peg_solitaire.c
index a408d444bd..61fddf9874 100644
--- a/demos/gtk-demo/peg_solitaire.c
+++ b/demos/gtk-demo/peg_solitaire.c
@@ -348,7 +348,7 @@ do_peg_solitaire (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/pickers.c b/demos/gtk-demo/pickers.c
index f114538ca3..92e3786644 100644
--- a/demos/gtk-demo/pickers.c
+++ b/demos/gtk-demo/pickers.c
@@ -75,7 +75,7 @@ do_pickers (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/pixbufs.c b/demos/gtk-demo/pixbufs.c
index d6db9230e5..1c67404e0d 100644
--- a/demos/gtk-demo/pixbufs.c
+++ b/demos/gtk-demo/pixbufs.c
@@ -196,7 +196,7 @@ do_pixbufs (GtkWidget *do_widget)
g_error_free (error);
g_signal_connect (dialog, "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
+ G_CALLBACK (gtk_window_destroy), NULL);
gtk_widget_show (dialog);
}
@@ -220,7 +220,7 @@ do_pixbufs (GtkWidget *do_widget)
gtk_widget_show (window);
else
{
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
g_object_unref (frame);
}
diff --git a/demos/gtk-demo/printing.c b/demos/gtk-demo/printing.c
index 4604311494..bca12a0572 100644
--- a/demos/gtk-demo/printing.c
+++ b/demos/gtk-demo/printing.c
@@ -188,7 +188,7 @@ do_printing (GtkWidget *do_widget)
g_error_free (error);
g_signal_connect (dialog, "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
+ G_CALLBACK (gtk_window_destroy), NULL);
gtk_widget_show (dialog);
}
diff --git a/demos/gtk-demo/revealer.c b/demos/gtk-demo/revealer.c
index befa2ddc75..25f5fcd40b 100644
--- a/demos/gtk-demo/revealer.c
+++ b/demos/gtk-demo/revealer.c
@@ -85,7 +85,7 @@ do_revealer (GtkWidget *do_widget)
}
else
{
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
diff --git a/demos/gtk-demo/rotated_text.c b/demos/gtk-demo/rotated_text.c
index 8a5a6c91e5..a387a6cf7f 100644
--- a/demos/gtk-demo/rotated_text.c
+++ b/demos/gtk-demo/rotated_text.c
@@ -212,7 +212,7 @@ do_rotated_text (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/scale.c b/demos/gtk-demo/scale.c
index 8c36e89f34..bb6b5119ed 100644
--- a/demos/gtk-demo/scale.c
+++ b/demos/gtk-demo/scale.c
@@ -29,7 +29,7 @@ do_scale (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
diff --git a/demos/gtk-demo/search_entry.c b/demos/gtk-demo/search_entry.c
index a072aa0962..c48e88b3b3 100644
--- a/demos/gtk-demo/search_entry.c
+++ b/demos/gtk-demo/search_entry.c
@@ -319,7 +319,7 @@ do_search_entry (GtkWidget *do_widget)
else
{
g_clear_object (&actions);
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
return window;
diff --git a/demos/gtk-demo/search_entry2.c b/demos/gtk-demo/search_entry2.c
index 73e65a3743..a2033d1e8b 100644
--- a/demos/gtk-demo/search_entry2.c
+++ b/demos/gtk-demo/search_entry2.c
@@ -143,7 +143,7 @@ do_search_entry2 (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/shortcut_triggers.c b/demos/gtk-demo/shortcut_triggers.c
index 114d8290b0..126b9f051d 100644
--- a/demos/gtk-demo/shortcut_triggers.c
+++ b/demos/gtk-demo/shortcut_triggers.c
@@ -86,7 +86,7 @@ do_shortcut_triggers (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/shortcuts.c b/demos/gtk-demo/shortcuts.c
index cfe53aa94e..941ef77481 100644
--- a/demos/gtk-demo/shortcuts.c
+++ b/demos/gtk-demo/shortcuts.c
@@ -97,7 +97,7 @@ do_shortcuts (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/sidebar.c b/demos/gtk-demo/sidebar.c
index 25bb7d9bc0..965c6d7598 100644
--- a/demos/gtk-demo/sidebar.c
+++ b/demos/gtk-demo/sidebar.c
@@ -78,7 +78,7 @@ do_sidebar (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/sizegroup.c b/demos/gtk-demo/sizegroup.c
index 4958addee8..e61d5ac758 100644
--- a/demos/gtk-demo/sizegroup.c
+++ b/demos/gtk-demo/sizegroup.c
@@ -160,7 +160,7 @@ do_sizegroup (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/sliding_puzzle.c b/demos/gtk-demo/sliding_puzzle.c
index b273946956..09e8c4bdbd 100644
--- a/demos/gtk-demo/sliding_puzzle.c
+++ b/demos/gtk-demo/sliding_puzzle.c
@@ -471,7 +471,7 @@ do_sliding_puzzle (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/spinbutton.c b/demos/gtk-demo/spinbutton.c
index 8d998bb5f9..307bb52dc1 100644
--- a/demos/gtk-demo/spinbutton.c
+++ b/demos/gtk-demo/spinbutton.c
@@ -237,7 +237,7 @@ do_spinbutton (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/spinner.c b/demos/gtk-demo/spinner.c
index 160e647703..4582728646 100644
--- a/demos/gtk-demo/spinner.c
+++ b/demos/gtk-demo/spinner.c
@@ -45,7 +45,7 @@ do_spinner (GtkWidget *do_widget)
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
g_signal_connect (window, "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
+ G_CALLBACK (gtk_window_destroy), NULL);
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
@@ -92,7 +92,7 @@ do_spinner (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/stack.c b/demos/gtk-demo/stack.c
index 1796094c1f..96c7503ffc 100644
--- a/demos/gtk-demo/stack.c
+++ b/demos/gtk-demo/stack.c
@@ -29,7 +29,7 @@ do_stack (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
diff --git a/demos/gtk-demo/tabs.c b/demos/gtk-demo/tabs.c
index b54a955a23..e4616c71a5 100644
--- a/demos/gtk-demo/tabs.c
+++ b/demos/gtk-demo/tabs.c
@@ -51,7 +51,7 @@ do_tabs (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/tagged_entry.c b/demos/gtk-demo/tagged_entry.c
index 69c48c619a..a17e2d1188 100644
--- a/demos/gtk-demo/tagged_entry.c
+++ b/demos/gtk-demo/tagged_entry.c
@@ -98,7 +98,7 @@ do_tagged_entry (GtkWidget *do_widget)
button = gtk_button_new_with_mnemonic ("_Done");
gtk_widget_add_css_class (button, "suggested-action");
- g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_widget_destroy), window);
+ g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_window_destroy), window);
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), button);
gtk_window_set_default_widget (GTK_WINDOW (window), button);
@@ -107,7 +107,7 @@ do_tagged_entry (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/textmask.c b/demos/gtk-demo/textmask.c
index b233f71e0a..2869304704 100644
--- a/demos/gtk-demo/textmask.c
+++ b/demos/gtk-demo/textmask.c
@@ -74,7 +74,7 @@ do_textmask (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/textscroll.c b/demos/gtk-demo/textscroll.c
index 6d470fe7ee..6e2b4045fc 100644
--- a/demos/gtk-demo/textscroll.c
+++ b/demos/gtk-demo/textscroll.c
@@ -196,7 +196,7 @@ do_textscroll (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/textundo.c b/demos/gtk-demo/textundo.c
index e6b99c202e..f60aa4d189 100644
--- a/demos/gtk-demo/textundo.c
+++ b/demos/gtk-demo/textundo.c
@@ -60,7 +60,7 @@ do_textundo (GtkWidget *do_widget)
}
else
{
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
window = NULL;
}
diff --git a/demos/gtk-demo/textview.c b/demos/gtk-demo/textview.c
index d1c3c2fb7f..bb90358b0c 100644
--- a/demos/gtk-demo/textview.c
+++ b/demos/gtk-demo/textview.c
@@ -523,7 +523,7 @@ do_textview (GtkWidget *do_widget)
}
else
{
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
window = NULL;
}
diff --git a/demos/gtk-demo/themes.c b/demos/gtk-demo/themes.c
index 8f6eeca084..1560dae952 100644
--- a/demos/gtk-demo/themes.c
+++ b/demos/gtk-demo/themes.c
@@ -193,7 +193,7 @@ do_themes (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/theming_style_classes.c b/demos/gtk-demo/theming_style_classes.c
index ed0aef2dd0..011951df32 100644
--- a/demos/gtk-demo/theming_style_classes.c
+++ b/demos/gtk-demo/theming_style_classes.c
@@ -37,7 +37,7 @@ do_theming_style_classes (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/transparent.c b/demos/gtk-demo/transparent.c
index 9f76e61784..263806e814 100644
--- a/demos/gtk-demo/transparent.c
+++ b/demos/gtk-demo/transparent.c
@@ -62,7 +62,7 @@ do_transparent (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/tree_store.c b/demos/gtk-demo/tree_store.c
index 2a37c30a42..d37d7d2b7d 100644
--- a/demos/gtk-demo/tree_store.c
+++ b/demos/gtk-demo/tree_store.c
@@ -436,7 +436,7 @@ do_tree_store (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/gtk-demo/video_player.c b/demos/gtk-demo/video_player.c
index bf35eb6446..3054f63c8c 100644
--- a/demos/gtk-demo/video_player.c
+++ b/demos/gtk-demo/video_player.c
@@ -23,7 +23,7 @@ open_dialog_response_cb (GtkWidget *dialog,
g_object_unref (file);
}
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
@@ -88,7 +88,7 @@ do_video_player (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return window;
}
diff --git a/demos/node-editor/node-editor-window.c b/demos/node-editor/node-editor-window.c
index 06214d282c..0c036a4965 100644
--- a/demos/node-editor/node-editor-window.c
+++ b/demos/node-editor/node-editor-window.c
@@ -375,7 +375,7 @@ open_response_cb (GtkWidget *dialog,
g_object_unref (file);
}
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
@@ -441,7 +441,7 @@ save_response_cb (GtkWidget *dialog,
"Saving failed");
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (message_dialog),
"%s", error->message);
- g_signal_connect (message_dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
+ g_signal_connect (message_dialog, "response", G_CALLBACK (gtk_window_destroy), NULL);
gtk_widget_show (message_dialog);
g_error_free (error);
}
@@ -450,7 +450,7 @@ save_response_cb (GtkWidget *dialog,
g_object_unref (file);
}
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
@@ -558,14 +558,14 @@ export_image_response_cb (GtkWidget *dialog,
GTK_MESSAGE_INFO,
GTK_BUTTONS_OK,
"Exporting to image failed");
- g_signal_connect (message_dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
+ g_signal_connect (message_dialog, "response", G_CALLBACK (gtk_window_destroy), NULL);
gtk_widget_show (message_dialog);
}
g_object_unref (file);
}
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
g_object_unref (texture);
}
diff --git a/demos/widget-factory/widget-factory.c b/demos/widget-factory/widget-factory.c
index 9b7cde1946..c394886b9a 100644
--- a/demos/widget-factory/widget-factory.c
+++ b/demos/widget-factory/widget-factory.c
@@ -311,7 +311,7 @@ activate_quit (GSimpleAction *action,
win = list->data;
next = list->next;
- gtk_widget_destroy (GTK_WIDGET (win));
+ gtk_window_destroy (GTK_WINDOW (win));
list = next;
}
diff --git a/docs/tools/shooter.c b/docs/tools/shooter.c
index 8f2fff6f16..ae2dc14f92 100644
--- a/docs/tools/shooter.c
+++ b/docs/tools/shooter.c
@@ -247,7 +247,7 @@ shoot_one (WidgetInfo *info)
{
g_warning ("unable to save shot of %s", info->name);
}
- gtk_widget_destroy (info->window);
+ gtk_window_destroy (GTK_WINDOW (info->window));
shot_id = 0;
diff --git a/examples/action-namespace.c b/examples/action-namespace.c
index 642b7c8fca..aa4074e9d9 100644
--- a/examples/action-namespace.c
+++ b/examples/action-namespace.c
@@ -16,7 +16,7 @@ action_activated (GSimpleAction *action,
g_action_get_name (G_ACTION (action)));
g_signal_connect_swapped (dialog, "response",
- G_CALLBACK (gtk_widget_destroy), dialog);
+ G_CALLBACK (gtk_window_destroy), dialog);
gtk_widget_show (dialog);
}
diff --git a/examples/bp/bloatpad.c b/examples/bp/bloatpad.c
index be6bee5aa6..0da7402374 100644
--- a/examples/bp/bloatpad.c
+++ b/examples/bp/bloatpad.c
@@ -374,7 +374,7 @@ response (GtkDialog *dialog,
if (response_id == GTK_RESPONSE_CLOSE)
{
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
return;
}
diff --git a/examples/grid-packing.c b/examples/grid-packing.c
index dcee10f712..7d98c9a1db 100644
--- a/examples/grid-packing.c
+++ b/examples/grid-packing.c
@@ -42,7 +42,7 @@ activate (GtkApplication *app,
gtk_grid_attach (GTK_GRID (grid), button, 1, 0, 1, 1);
button = gtk_button_new_with_label ("Quit");
- g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_widget_destroy), window);
+ g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_window_destroy), window);
/* Place the Quit button in the grid cell (0, 1), and make it
* span 2 columns.
diff --git a/examples/hello-world.c b/examples/hello-world.c
index ebafc735c6..5ee7062788 100644
--- a/examples/hello-world.c
+++ b/examples/hello-world.c
@@ -24,7 +24,7 @@ activate (GtkApplication *app,
button = gtk_button_new_with_label ("Hello World");
g_signal_connect (button, "clicked", G_CALLBACK (print_hello), NULL);
- g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_widget_destroy), window);
+ g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_window_destroy), window);
gtk_container_add (GTK_CONTAINER (box), button);
gtk_widget_show (window);
diff --git a/examples/plugman.c b/examples/plugman.c
index 752e2b9649..0e0882fcb5 100644
--- a/examples/plugman.c
+++ b/examples/plugman.c
@@ -173,7 +173,7 @@ quit_app (GSimpleAction *action,
win = list->data;
next = list->next;
- gtk_widget_destroy (GTK_WIDGET (win));
+ gtk_window_destroy (GTK_WINDOW (win));
list = next;
}
@@ -382,7 +382,7 @@ configure_plugins (GSimpleAction *action,
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), plugin_enabled ("black"));
g_signal_connect (check, "toggled", G_CALLBACK (enable_or_disable_plugin), (char *) "black");
- g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
+ g_signal_connect (dialog, "response", G_CALLBACK (gtk_window_destroy), NULL);
gtk_window_present (GTK_WINDOW (dialog));
diff --git a/examples/sunny.c b/examples/sunny.c
index acb1341e0a..1bb3284eeb 100644
--- a/examples/sunny.c
+++ b/examples/sunny.c
@@ -101,7 +101,7 @@ quit_app (GSimpleAction *action,
win = list->data;
next = list->next;
- gtk_widget_destroy (GTK_WIDGET (win));
+ gtk_window_destroy (GTK_WINDOW (win));
list = next;
}
diff --git a/gtk/gtkappchooserbutton.c b/gtk/gtkappchooserbutton.c
index d8a8e66e3c..2622b3bb72 100644
--- a/gtk/gtkappchooserbutton.c
+++ b/gtk/gtkappchooserbutton.c
@@ -249,13 +249,13 @@ other_application_dialog_response_cb (GtkDialog *dialog,
* 'Other application…'
*/
gtk_combo_box_set_active (GTK_COMBO_BOX (self->combobox), self->last_active);
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
return;
}
info = gtk_app_chooser_get_app_info (GTK_APP_CHOOSER (dialog));
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
/* refresh the combobox to get the new application */
gtk_app_chooser_refresh (GTK_APP_CHOOSER (self));
diff --git a/gtk/gtkappchooserdialog.c b/gtk/gtkappchooserdialog.c
index 095b024d5d..be0e9c6c4d 100644
--- a/gtk/gtkappchooserdialog.c
+++ b/gtk/gtkappchooserdialog.c
@@ -400,7 +400,7 @@ show_error_dialog (const gchar *primary,
gtk_widget_show (message_dialog);
g_signal_connect (message_dialog, "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
+ G_CALLBACK (gtk_window_destroy), NULL);
}
static void
diff --git a/gtk/gtkapplicationwindow.c b/gtk/gtkapplicationwindow.c
index 76172684b2..9f13ef1799 100644
--- a/gtk/gtkapplicationwindow.c
+++ b/gtk/gtkapplicationwindow.c
@@ -724,7 +724,7 @@ gtk_application_window_dispose (GObject *object)
if (priv->help_overlay)
{
- gtk_widget_destroy (GTK_WIDGET (priv->help_overlay));
+ gtk_window_destroy (GTK_WINDOW (priv->help_overlay));
g_clear_object (&priv->help_overlay);
}
@@ -922,7 +922,7 @@ gtk_application_window_set_help_overlay (GtkApplicationWindow *window,
g_return_if_fail (help_overlay == NULL || GTK_IS_SHORTCUTS_WINDOW (help_overlay));
if (priv->help_overlay)
- gtk_widget_destroy (GTK_WIDGET (priv->help_overlay));
+ gtk_window_destroy (GTK_WINDOW (priv->help_overlay));
g_set_object (&priv->help_overlay, help_overlay);
if (!priv->help_overlay)
diff --git a/gtk/gtkcolorbutton.c b/gtk/gtkcolorbutton.c
index 865c239abf..2058a44951 100644
--- a/gtk/gtkcolorbutton.c
+++ b/gtk/gtkcolorbutton.c
@@ -309,7 +309,7 @@ gtk_color_button_finalize (GObject *object)
GtkColorButton *button = GTK_COLOR_BUTTON (object);
if (button->cs_dialog != NULL)
- gtk_widget_destroy (button->cs_dialog);
+ gtk_window_destroy (GTK_WINDOW (button->cs_dialog));
g_free (button->title);
gtk_widget_unparent (button->button);
diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c
index f0c73d67f9..106e1e0ee7 100644
--- a/gtk/gtkdialog.c
+++ b/gtk/gtkdialog.c
@@ -118,7 +118,7 @@
*
* g_signal_connect_swapped (dialog,
* "response",
- * G_CALLBACK (gtk_widget_destroy),
+ * G_CALLBACK (gtk_window_destroy),
* dialog);
*
* // Add the label, and show everything we’ve added
@@ -1141,7 +1141,7 @@ run_destroy_handler (GtkDialog *dialog, gpointer data)
* // do_nothing_since_dialog_was_cancelled ();
* break;
* }
- * gtk_widget_destroy (dialog);
+ * gtk_window_destroy (dialog);
* ]|
*
* Note that even though the recursive main loop gives the effect of a
diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c
index 130276ed3a..29cc1e467f 100644
--- a/gtk/gtkfilechooserbutton.c
+++ b/gtk/gtkfilechooserbutton.c
@@ -1094,7 +1094,7 @@ gtk_file_chooser_button_dispose (GObject *object)
g_clear_object (&button->model);
}
- g_clear_pointer (&button->dialog, gtk_widget_destroy);
+ g_clear_pointer ((GtkWindow **)&button->dialog, gtk_window_destroy);
if (button->native)
gtk_native_dialog_destroy (GTK_NATIVE_DIALOG (button->native));
diff --git a/gtk/gtkfilechooserdialog.c b/gtk/gtkfilechooserdialog.c
index c2da28e442..1eae65ae18 100644
--- a/gtk/gtkfilechooserdialog.c
+++ b/gtk/gtkfilechooserdialog.c
@@ -91,7 +91,7 @@
* open_file (file);
* }
*
- * gtk_widget_destroy (dialog);
+ * gtk_window_destroy (dialog);
* ]|
*
* To use a dialog for saving, you can use this:
@@ -124,7 +124,7 @@
* save_to_file (file);
* }
*
- * gtk_widget_destroy (dialog);
+ * gtk_window_destroy (dialog);
* ]|
*
* ## Setting up a file chooser dialog ## {#gtkfilechooserdialog-setting-up}
diff --git a/gtk/gtkfilechoosernative.c b/gtk/gtkfilechoosernative.c
index 184f6d268f..0abb9201ab 100644
--- a/gtk/gtkfilechoosernative.c
+++ b/gtk/gtkfilechoosernative.c
@@ -493,7 +493,7 @@ gtk_file_chooser_native_finalize (GObject *object)
g_clear_pointer (&self->accept_label, g_free);
g_clear_pointer (&self->cancel_label, g_free);
- gtk_widget_destroy (self->dialog);
+ gtk_window_destroy (GTK_WINDOW (self->dialog));
g_slist_free_full (self->custom_files, g_object_unref);
g_slist_free_full (self->choices, (GDestroyNotify)gtk_file_chooser_native_choice_free);
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index 6dae50bb0d..0a694d5d18 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -766,7 +766,7 @@ error_message (GtkFileChooserWidget *impl,
GTK_WINDOW (dialog));
gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
@@ -1261,7 +1261,7 @@ confirm_delete (GtkFileChooserWidget *impl,
response = gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
return (response == GTK_RESPONSE_ACCEPT);
}
@@ -5761,7 +5761,7 @@ confirm_dialog_should_accept_filename (GtkFileChooserWidget *impl,
* file list (will be restablished on next map()). Fixes data loss bug #2288 */
impl->browse_files_interaction_frozen = TRUE;
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
return (response == GTK_RESPONSE_ACCEPT);
}
diff --git a/gtk/gtkfontbutton.c b/gtk/gtkfontbutton.c
index 01fa0bf0c7..a0a9e0162f 100644
--- a/gtk/gtkfontbutton.c
+++ b/gtk/gtkfontbutton.c
@@ -586,8 +586,8 @@ gtk_font_button_finalize (GObject *object)
{
GtkFontButton *font_button = GTK_FONT_BUTTON (object);
- if (font_button->font_dialog != NULL)
- gtk_widget_destroy (font_button->font_dialog);
+ if (font_button->font_dialog != NULL)
+ gtk_window_destroy (GTK_WINDOW (font_button->font_dialog));
g_free (font_button->title);
diff --git a/gtk/gtkmessagedialog.c b/gtk/gtkmessagedialog.c
index 5b434049b3..1f6abc9e9f 100644
--- a/gtk/gtkmessagedialog.c
+++ b/gtk/gtkmessagedialog.c
@@ -65,7 +65,7 @@
* filename,
* g_strerror (errno));
* gtk_dialog_run (GTK_DIALOG (dialog));
- * gtk_widget_destroy (dialog);
+ * gtk_window_destroy (GTK_WINDOW (dialog));
* ]|
*
* You might do a non-modal #GtkMessageDialog as follows:
@@ -85,7 +85,7 @@
* // (e.g. clicks a button)
*
* g_signal_connect_swapped (dialog, "response",
- * G_CALLBACK (gtk_widget_destroy),
+ * G_CALLBACK (gtk_window_destroy),
* dialog);
* ]|
*
diff --git a/gtk/gtkmountoperation.c b/gtk/gtkmountoperation.c
index bd7105b9bd..8b91dc6dbb 100644
--- a/gtk/gtkmountoperation.c
+++ b/gtk/gtkmountoperation.c
@@ -399,7 +399,7 @@ pw_dialog_got_response (GtkDialog *dialog,
priv->dialog = NULL;
g_object_notify (G_OBJECT (op), "is-showing");
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
g_object_unref (op);
}
@@ -928,7 +928,7 @@ question_dialog_button_clicked (GtkDialog *dialog,
priv->dialog = NULL;
g_object_notify (G_OBJECT (operation), "is-showing");
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
g_object_unref (op);
}
@@ -1083,7 +1083,7 @@ show_processes_button_clicked (GtkDialog *dialog,
priv->dialog = NULL;
g_object_notify (G_OBJECT (operation), "is-showing");
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
g_object_unref (op);
}
@@ -1403,7 +1403,7 @@ on_end_process_activated (GtkModelButton *button,
* destroy the dialog in that case
*/
if (response != GTK_RESPONSE_NONE)
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
g_error_free (error);
}
@@ -1766,7 +1766,7 @@ gtk_mount_operation_aborted (GMountOperation *op)
if (priv->dialog != NULL)
{
- gtk_widget_destroy (GTK_WIDGET (priv->dialog));
+ gtk_window_destroy (GTK_WINDOW (priv->dialog));
priv->dialog = NULL;
g_object_notify (G_OBJECT (op), "is-showing");
g_object_unref (op);
diff --git a/gtk/gtkpagesetupunixdialog.c b/gtk/gtkpagesetupunixdialog.c
index 030b5a9b4b..a0a0f3c4c9 100644
--- a/gtk/gtkpagesetupunixdialog.c
+++ b/gtk/gtkpagesetupunixdialog.c
@@ -762,7 +762,7 @@ custom_paper_dialog_response_cb (GtkDialog *custom_paper_dialog,
/* Update printer page list */
printer_changed_callback (GTK_COMBO_BOX (priv->printer_combo), dialog);
- gtk_widget_destroy (GTK_WIDGET (custom_paper_dialog));
+ gtk_window_destroy (GTK_WINDOW (custom_paper_dialog));
}
static void
diff --git a/gtk/gtkprintbackend.c b/gtk/gtkprintbackend.c
index 878d2d0dd5..9ec37814f0 100644
--- a/gtk/gtkprintbackend.c
+++ b/gtk/gtkprintbackend.c
@@ -622,7 +622,7 @@ password_dialog_response (GtkWidget *dialog,
g_clear_pointer (&priv->auth_info, g_free);
g_clear_pointer (&priv->auth_info_required, g_strfreev);
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
g_object_unref (backend);
}
diff --git a/gtk/gtkprinteroptionwidget.c b/gtk/gtkprinteroptionwidget.c
index 7cff48186d..d8819cb6d5 100644
--- a/gtk/gtkprinteroptionwidget.c
+++ b/gtk/gtkprinteroptionwidget.c
@@ -512,7 +512,7 @@ dialog_response_callback (GtkDialog *dialog,
g_object_unref (new_location);
}
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
if (new_location)
uri = g_file_get_uri (new_location);
diff --git a/gtk/gtkprintoperation-unix.c b/gtk/gtkprintoperation-unix.c
index 45584d28bd..ba79ea0bca 100644
--- a/gtk/gtkprintoperation-unix.c
+++ b/gtk/gtkprintoperation-unix.c
@@ -656,7 +656,7 @@ handle_print_response (GtkWidget *dialog,
if (settings)
g_object_unref (settings);
- gtk_widget_destroy (GTK_WIDGET (pd));
+ gtk_window_destroy (GTK_WINDOW (pd));
}
@@ -922,7 +922,7 @@ handle_page_setup_response (GtkWidget *dialog,
if (response == GTK_RESPONSE_OK)
rdata->page_setup = gtk_page_setup_unix_dialog_get_page_setup (psd);
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
if (rdata->done_cb)
rdata->done_cb (rdata->page_setup, rdata->data);
diff --git a/gtk/gtkprintoperation.c b/gtk/gtkprintoperation.c
index 0a8647f64a..9f21634fc4 100644
--- a/gtk/gtkprintoperation.c
+++ b/gtk/gtkprintoperation.c
@@ -2203,7 +2203,7 @@ print_pages_idle_done (gpointer user_data)
}
if (data->progress)
- gtk_widget_destroy (data->progress);
+ gtk_window_destroy (GTK_WINDOW (data->progress));
if (priv->rloop && !data->is_preview)
g_main_loop_quit (priv->rloop);
@@ -2899,7 +2899,7 @@ print_pages (GtkPrintOperation *op,
GTK_WINDOW (error_dialog));
g_signal_connect (error_dialog, "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
+ G_CALLBACK (gtk_window_destroy), NULL);
gtk_widget_show (error_dialog);
@@ -3022,7 +3022,7 @@ gtk_print_operation_get_error (GtkPrintOperation *op,
* "Error printing file:\n%s",
* error->message);
* g_signal_connect (error_dialog, "response",
- * G_CALLBACK (gtk_widget_destroy), NULL);
+ * G_CALLBACK (gtk_window_destroy), NULL);
* gtk_widget_show (error_dialog);
* g_error_free (error);
* }
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c
index 3d755fff78..bb5df78053 100644
--- a/gtk/gtkprintunixdialog.c
+++ b/gtk/gtkprintunixdialog.c
@@ -684,7 +684,7 @@ error_dialogs (GtkPrintUnixDialog *dialog,
response = gtk_dialog_run (GTK_DIALOG (message_dialog));
- gtk_widget_destroy (message_dialog);
+ gtk_window_destroy (GTK_WINDOW (message_dialog));
g_free (dirname);
g_free (basename);
@@ -3220,7 +3220,7 @@ custom_paper_dialog_response_cb (GtkDialog *custom_paper_dialog,
}
}
- gtk_widget_destroy (GTK_WIDGET (custom_paper_dialog));
+ gtk_window_destroy (GTK_WINDOW (custom_paper_dialog));
}
static void
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 965d006397..e400f80062 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -1204,7 +1204,7 @@ gtk_window_close (GtkWindow *window)
g_object_ref (window);
if (!gtk_window_emit_close_request (window))
- gtk_widget_destroy (GTK_WIDGET (window));
+ gtk_window_destroy (window);
g_object_unref (window);
}
@@ -1981,7 +1981,7 @@ gtk_window_native_interface_init (GtkNativeInterface *iface)
* the window internally, gtk_window_new() does not return a reference
* to the caller.
*
- * To delete a #GtkWindow, call gtk_widget_destroy().
+ * To delete a #GtkWindow, call gtk_window_destroy().
*
* Returns: a new #GtkWindow.
**/
@@ -6954,7 +6954,7 @@ warn_response (GtkDialog *dialog,
check = g_object_get_data (G_OBJECT (dialog), "check");
remember = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check));
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
g_object_set_data (G_OBJECT (inspector_window), "warning_dialog", NULL);
if (response == GTK_RESPONSE_NO)
diff --git a/gtk/inspector/css-editor.c b/gtk/inspector/css-editor.c
index 85028fc7e7..e30a6184b0 100644
--- a/gtk/inspector/css-editor.c
+++ b/gtk/inspector/css-editor.c
@@ -211,7 +211,7 @@ save_to_file (GtkInspectorCssEditor *ce,
_("Saving CSS failed"));
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
"%s", error->message);
- g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
+ g_signal_connect (dialog, "response", G_CALLBACK (gtk_window_destroy), NULL);
gtk_widget_show (dialog);
g_error_free (error);
}
@@ -233,7 +233,7 @@ save_response (GtkWidget *dialog,
g_object_unref (file);
}
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
diff --git a/gtk/inspector/recorder.c b/gtk/inspector/recorder.c
index da78f3b6e9..448898b57f 100644
--- a/gtk/inspector/recorder.c
+++ b/gtk/inspector/recorder.c
@@ -998,7 +998,7 @@ render_node_save_response (GtkWidget *dialog,
_("Saving RenderNode failed"));
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (message_dialog),
"%s", error->message);
- g_signal_connect (message_dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
+ g_signal_connect (message_dialog, "response", G_CALLBACK (gtk_window_destroy), NULL);
gtk_widget_show (message_dialog);
g_error_free (error);
}
@@ -1006,7 +1006,7 @@ render_node_save_response (GtkWidget *dialog,
g_bytes_unref (bytes);
}
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
diff --git a/tests/gdkgears.c b/tests/gdkgears.c
index 5c98eed4db..63ceef8999 100644
--- a/tests/gdkgears.c
+++ b/tests/gdkgears.c
@@ -254,7 +254,7 @@ main (int argc, char *argv[])
button = gtk_button_new_with_label ("Quit");
gtk_widget_set_hexpand (button, TRUE);
gtk_container_add (GTK_CONTAINER (bbox), button);
- g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_widget_destroy), window);
+ g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_window_destroy), window);
gtk_widget_show (button);
gtk_widget_show (window);
diff --git a/tests/print-editor.c b/tests/print-editor.c
index 8b90af1efe..2ae6f6609f 100644
--- a/tests/print-editor.c
+++ b/tests/print-editor.c
@@ -141,7 +141,7 @@ load_file (GFile *open_filename)
if (error_dialog)
{
- g_signal_connect (error_dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
+ g_signal_connect (error_dialog, "response", G_CALLBACK (gtk_window_destroy), NULL);
gtk_widget_show (error_dialog);
}
}
@@ -186,7 +186,7 @@ save_file (GFile *save_filename)
display_name,
error->message);
- g_signal_connect (error_dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
+ g_signal_connect (error_dialog, "response", G_CALLBACK (gtk_window_destroy), NULL);
gtk_widget_show (error_dialog);
g_error_free (error);
@@ -389,7 +389,7 @@ print_done (GtkPrintOperation *op,
GTK_BUTTONS_CLOSE,
"Error printing file:\n%s",
error ? error->message : "no details");
- g_signal_connect (error_dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
+ g_signal_connect (error_dialog, "response", G_CALLBACK (gtk_window_destroy), NULL);
gtk_widget_show (error_dialog);
}
else if (res == GTK_PRINT_OPERATION_RESULT_APPLY)
@@ -519,7 +519,7 @@ activate_save_as (GSimpleAction *action,
g_object_unref (save_filename);
}
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
@@ -557,7 +557,7 @@ activate_open (GSimpleAction *action,
g_object_unref (open_filename);
}
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
@@ -604,7 +604,7 @@ activate_quit (GSimpleAction *action,
win = list->data;
next = list->next;
- gtk_widget_destroy (GTK_WIDGET (win));
+ gtk_window_destroy (GTK_WINDOW (win));
list = next;
}
diff --git a/tests/testappchooser.c b/tests/testappchooser.c
index 82eda9d4ca..df3ffa8758 100644
--- a/tests/testappchooser.c
+++ b/tests/testappchooser.c
@@ -51,7 +51,7 @@ dialog_response (GtkDialog *d,
g_print ("No application selected\n");
}
- gtk_widget_destroy (GTK_WIDGET (d));
+ gtk_window_destroy (GTK_WINDOW (d));
dialog = NULL;
}
@@ -144,7 +144,7 @@ button_clicked (GtkButton *b,
path = g_file_get_path (file);
gtk_button_set_label (GTK_BUTTON (file_l), path);
- gtk_widget_destroy (w);
+ gtk_window_destroy (GTK_WINDOW (w));
gtk_widget_set_sensitive (open, TRUE);
diff --git a/tests/testassistant.c b/tests/testassistant.c
index 2d010753d3..42a105eb8b 100644
--- a/tests/testassistant.c
+++ b/tests/testassistant.c
@@ -181,7 +181,7 @@ create_simple_assistant (GtkWidget *widget)
gtk_widget_show (assistant);
else
{
- gtk_widget_destroy (assistant);
+ gtk_window_destroy (GTK_WINDOW (assistant));
assistant = NULL;
}
}
@@ -223,7 +223,7 @@ create_anonymous_assistant (GtkWidget *widget)
gtk_widget_show (assistant);
else
{
- gtk_widget_destroy (assistant);
+ gtk_window_destroy (GTK_WINDOW (assistant));
assistant = NULL;
}
}
@@ -318,7 +318,7 @@ create_generous_assistant (GtkWidget *widget)
gtk_widget_show (assistant);
else
{
- gtk_widget_destroy (assistant);
+ gtk_window_destroy (GTK_WINDOW (assistant));
assistant = NULL;
}
}
@@ -414,7 +414,7 @@ create_nonlinear_assistant (GtkWidget *widget)
gtk_widget_show (assistant);
else
{
- gtk_widget_destroy (assistant);
+ gtk_window_destroy (GTK_WINDOW (assistant));
assistant = NULL;
}
}
@@ -511,7 +511,7 @@ create_looping_assistant (GtkWidget *widget)
gtk_widget_show (assistant);
else
{
- gtk_widget_destroy (assistant);
+ gtk_window_destroy (GTK_WINDOW (assistant));
assistant = NULL;
}
}
@@ -583,7 +583,7 @@ create_full_featured_assistant (GtkWidget *widget)
gtk_widget_show (assistant);
else
{
- gtk_widget_destroy (assistant);
+ gtk_window_destroy (GTK_WINDOW (assistant));
assistant = NULL;
}
}
@@ -671,7 +671,7 @@ create_page_flipping_assistant (GtkWidget *widget)
gtk_widget_show (assistant);
else
{
- gtk_widget_destroy (assistant);
+ gtk_window_destroy (GTK_WINDOW (assistant));
assistant = NULL;
}
}
diff --git a/tests/testborderdrawing.c b/tests/testborderdrawing.c
index 68bba95902..96c3246bb3 100644
--- a/tests/testborderdrawing.c
+++ b/tests/testborderdrawing.c
@@ -171,5 +171,5 @@ main (int argc, char **argv)
while (!done)
g_main_context_iteration (NULL, TRUE);
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
diff --git a/tests/testdialog.c b/tests/testdialog.c
index 57b99a8690..7b2cc418a2 100644
--- a/tests/testdialog.c
+++ b/tests/testdialog.c
@@ -17,7 +17,7 @@ show_message_dialog1 (GtkWindow *parent)
"Unhandled error message: SSH program unexpectedly exited");
gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
@@ -38,7 +38,7 @@ show_message_dialog1a (GtkWindow *parent)
gtk_widget_show (image);
gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
@@ -61,7 +61,7 @@ show_message_dialog2 (GtkWindow *parent)
NULL);
gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
@@ -72,7 +72,7 @@ show_color_chooser (GtkWindow *parent)
dialog = gtk_color_chooser_dialog_new ("Builtin", parent);
gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
@@ -86,7 +86,7 @@ show_color_chooser_generic (GtkWindow *parent)
NULL);
gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
@@ -124,7 +124,7 @@ show_dialog (GtkWindow *parent)
add_content (dialog);
gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
@@ -140,7 +140,7 @@ show_dialog_with_header (GtkWindow *parent)
add_content (dialog);
gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
@@ -157,7 +157,7 @@ show_dialog_with_buttons (GtkWindow *parent)
add_content (dialog);
gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
@@ -174,7 +174,7 @@ show_dialog_with_header_buttons (GtkWindow *parent)
add_content (dialog);
gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
@@ -189,7 +189,7 @@ show_dialog_with_header_buttons2 (GtkWindow *parent)
g_object_unref (builder);
gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
typedef struct {
@@ -237,7 +237,7 @@ show_dialog_from_template (GtkWindow *parent)
add_content (dialog);
gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
@@ -258,7 +258,7 @@ show_dialog_flex_template (GtkWindow *parent)
add_content (dialog);
gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
typedef struct {
@@ -311,7 +311,7 @@ show_dialog_from_template_with_header (GtkWindow *parent)
add_content (dialog);
gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
int
diff --git a/tests/testfilechooser.c b/tests/testfilechooser.c
index 0a9e19e2bf..b8da58f500 100644
--- a/tests/testfilechooser.c
+++ b/tests/testfilechooser.c
@@ -157,7 +157,7 @@ set_current_folder (GtkFileChooser *chooser,
"Could not set the folder to %s",
name);
gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
g_object_unref (file);
}
@@ -192,7 +192,7 @@ set_filename (GtkFileChooser *chooser,
"Could not select %s",
name);
gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
g_object_unref (file);
}
@@ -266,8 +266,7 @@ unmap_and_remap_cb (GtkButton *button,
static void
kill_dependent (GtkWindow *win, GtkWidget *dep)
{
- gtk_widget_destroy (dep);
- g_object_unref (dep);
+ gtk_window_destroy (GTK_WINDOW (dep));
}
static void
@@ -504,7 +503,6 @@ main (int argc, char **argv)
gtk_widget_show (control_window);
- g_object_ref (control_window);
g_signal_connect (dialog, "destroy",
G_CALLBACK (kill_dependent), control_window);
@@ -514,7 +512,7 @@ main (int argc, char **argv)
g_object_ref (dialog);
while (!done)
g_main_context_iteration (NULL, TRUE);
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
g_object_unref (dialog);
return 0;
diff --git a/tests/testglarea.c b/tests/testglarea.c
index b32aa2cab0..f39f005d17 100644
--- a/tests/testglarea.c
+++ b/tests/testglarea.c
@@ -445,7 +445,7 @@ main (int argc, char *argv[])
button = gtk_button_new_with_label ("Quit");
gtk_widget_set_hexpand (button, TRUE);
gtk_container_add (GTK_CONTAINER (box), button);
- g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_widget_destroy), window);
+ g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_window_destroy), window);
gtk_widget_show (button);
gtk_widget_show (window);
diff --git a/tests/testgtk.c b/tests/testgtk.c
index 709c0bd43f..8b8139631c 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -226,14 +226,14 @@ create_alpha_window (GtkWidget *widget)
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
g_signal_connect (window, "response",
- G_CALLBACK (gtk_widget_destroy),
+ G_CALLBACK (gtk_window_destroy),
NULL);
}
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
/*
@@ -310,7 +310,7 @@ create_buttons (GtkWidget *widget)
button[9] = gtk_button_new_with_label ("close");
g_signal_connect_swapped (button[9], "clicked",
- G_CALLBACK (gtk_widget_destroy),
+ G_CALLBACK (gtk_window_destroy),
window);
gtk_container_add (GTK_CONTAINER (box2), button[9]);
gtk_window_set_default_widget (GTK_WINDOW (window), button[9]);
@@ -319,7 +319,7 @@ create_buttons (GtkWidget *widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
/*
@@ -367,7 +367,7 @@ create_toggle_buttons (GtkWidget *widget)
button = gtk_button_new_with_label ("close");
g_signal_connect_swapped (button, "clicked",
- G_CALLBACK (gtk_widget_destroy),
+ G_CALLBACK (gtk_window_destroy),
window);
gtk_container_add (GTK_CONTAINER (box2), button);
gtk_window_set_default_widget (GTK_WINDOW (window), button);
@@ -376,7 +376,7 @@ create_toggle_buttons (GtkWidget *widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
static GtkWidget *
@@ -458,7 +458,7 @@ create_check_buttons (GtkWidget *widget)
gtk_widget_get_display (widget));
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
g_signal_connect (window, "response",
- G_CALLBACK (gtk_widget_destroy),
+ G_CALLBACK (gtk_window_destroy),
NULL);
box1 = gtk_dialog_get_content_area (GTK_DIALOG (window));
@@ -489,7 +489,7 @@ create_check_buttons (GtkWidget *widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
/*
@@ -518,7 +518,7 @@ create_radio_buttons (GtkWidget *widget)
gtk_widget_get_display (widget));
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
g_signal_connect (window, "response",
- G_CALLBACK (gtk_widget_destroy),
+ G_CALLBACK (gtk_window_destroy),
NULL);
box1 = gtk_dialog_get_content_area (GTK_DIALOG (window));
@@ -576,7 +576,7 @@ create_radio_buttons (GtkWidget *widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
/*
@@ -763,7 +763,7 @@ create_statusbar (GtkWidget *widget)
button = gtk_button_new_with_label ("close");
g_signal_connect_swapped (button, "clicked",
- G_CALLBACK (gtk_widget_destroy),
+ G_CALLBACK (gtk_window_destroy),
window);
gtk_container_add (GTK_CONTAINER (box2), button);
gtk_window_set_default_widget (GTK_WINDOW (window), button);
@@ -772,7 +772,7 @@ create_statusbar (GtkWidget *widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
/*
@@ -864,7 +864,7 @@ dialog_response (GtkWidget *dialog, gint response_id, GtkLabel *label)
{
const gchar *text;
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
text = "Some <a href=\"http://en.wikipedia.org/wiki/Text\" title=\"plain text\">text</a> may be marked
up\n"
"as hyperlinks, which can be clicked\n"
@@ -1056,7 +1056,7 @@ static void create_labels (GtkWidget *widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
#define DEFAULT_TEXT_RADIUS 200
@@ -1151,7 +1151,7 @@ create_rotated_text (GtkWidget *widget)
gtk_widget_get_display (widget));
g_signal_connect (window, "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
+ G_CALLBACK (gtk_window_destroy), NULL);
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
@@ -1177,7 +1177,7 @@ create_rotated_text (GtkWidget *widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
@@ -1249,7 +1249,7 @@ create_pixbuf (GtkWidget *widget)
button = gtk_button_new_with_label ("close");
g_signal_connect_swapped (button, "clicked",
- G_CALLBACK (gtk_widget_destroy),
+ G_CALLBACK (gtk_window_destroy),
window);
gtk_container_add (GTK_CONTAINER (box2), button);
gtk_window_set_default_widget (GTK_WINDOW (window), button);
@@ -1258,7 +1258,7 @@ create_pixbuf (GtkWidget *widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
static void
@@ -1337,7 +1337,7 @@ create_tooltips (GtkWidget *widget)
button = gtk_button_new_with_label ("close");
g_signal_connect_swapped (button, "clicked",
- G_CALLBACK (gtk_widget_destroy),
+ G_CALLBACK (gtk_window_destroy),
window);
gtk_container_add (GTK_CONTAINER (box2), button);
gtk_window_set_default_widget (GTK_WINDOW (window), button);
@@ -1348,7 +1348,7 @@ create_tooltips (GtkWidget *widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
/*
@@ -1406,7 +1406,7 @@ create_image (GtkWidget *widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
/*
@@ -1570,7 +1570,7 @@ create_listbox (GtkWidget *widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
@@ -1660,12 +1660,12 @@ create_key_lookup (GtkWidget *widget)
gtk_container_add (GTK_CONTAINER (content_area), button);
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
- g_signal_connect (window, "response", G_CALLBACK (gtk_widget_destroy), NULL);
+ g_signal_connect (window, "response", G_CALLBACK (gtk_window_destroy), NULL);
gtk_widget_show (window);
}
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
@@ -1695,7 +1695,7 @@ cmw_color (GtkWidget *widget, GtkWidget *parent)
g_signal_connect (csd, "destroy",
G_CALLBACK (cmw_destroy_cb), NULL);
g_signal_connect (csd, "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
+ G_CALLBACK (gtk_window_destroy), NULL);
/* wait until destroy calls gtk_main_quit */
gtk_widget_show (csd);
@@ -1720,7 +1720,7 @@ cmw_file (GtkWidget *widget, GtkWidget *parent)
g_signal_connect (fs, "destroy",
G_CALLBACK (cmw_destroy_cb), NULL);
g_signal_connect_swapped (fs, "response",
- G_CALLBACK (gtk_widget_destroy), fs);
+ G_CALLBACK (gtk_window_destroy), fs);
/* wait until destroy calls gtk_main_quit */
gtk_widget_show (fs);
@@ -1767,7 +1767,7 @@ create_modal_window (GtkWidget *widget)
/* connect signals */
g_signal_connect_swapped (btnClose, "clicked",
- G_CALLBACK (gtk_widget_destroy), window);
+ G_CALLBACK (gtk_window_destroy), window);
g_signal_connect (window, "destroy",
G_CALLBACK (cmw_destroy_cb), NULL);
@@ -1798,7 +1798,7 @@ make_message_dialog (GdkDisplay *display,
{
if (*dialog)
{
- gtk_widget_destroy (*dialog);
+ gtk_window_destroy (GTK_WINDOW (*dialog));
return;
}
@@ -1810,7 +1810,7 @@ make_message_dialog (GdkDisplay *display,
g_signal_connect_swapped (*dialog,
"response",
- G_CALLBACK (gtk_widget_destroy),
+ G_CALLBACK (gtk_window_destroy),
*dialog);
g_object_add_weak_pointer (G_OBJECT (*dialog), (gpointer)dialog);
@@ -1863,7 +1863,7 @@ scrolled_windows_delete_cb (GtkWidget *widget,
static void
scrolled_windows_destroy_cb (GtkWidget *widget, GtkWidget *scrollwin)
{
- gtk_widget_destroy (sw_float_parent);
+ gtk_window_destroy (GTK_WINDOW (sw_float_parent));
sw_float_parent = NULL;
sw_parent = NULL;
@@ -1875,7 +1875,7 @@ scrolled_windows_remove (GtkWidget *dialog, gint response, GtkWidget *scrollwin)
{
if (response != GTK_RESPONSE_APPLY)
{
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
return;
}
@@ -1887,7 +1887,7 @@ scrolled_windows_remove (GtkWidget *dialog, gint response, GtkWidget *scrollwin)
g_object_unref (scrollwin);
- gtk_widget_destroy (sw_float_parent);
+ gtk_window_destroy (GTK_WINDOW (sw_float_parent));
g_signal_handler_disconnect (sw_parent, sw_destroyed_handler);
sw_float_parent = NULL;
@@ -1985,7 +1985,7 @@ create_scrolled_windows (GtkWidget *widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
/*
@@ -2155,7 +2155,7 @@ create_entry (GtkWidget *widget)
button = gtk_button_new_with_label ("close");
g_signal_connect_swapped (button, "clicked",
- G_CALLBACK (gtk_widget_destroy),
+ G_CALLBACK (gtk_window_destroy),
window);
gtk_container_add (GTK_CONTAINER (box2), button);
gtk_window_set_default_widget (GTK_WINDOW (window), button);
@@ -2164,7 +2164,7 @@ create_entry (GtkWidget *widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
static void
@@ -2199,7 +2199,7 @@ create_expander (GtkWidget *widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
@@ -2254,7 +2254,7 @@ create_size_group_window (GdkDisplay *display,
gtk_window_set_resizable (GTK_WINDOW (window), TRUE);
g_signal_connect (window, "response",
- G_CALLBACK (gtk_widget_destroy),
+ G_CALLBACK (gtk_window_destroy),
NULL);
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
@@ -2364,8 +2364,8 @@ create_size_groups (GtkWidget *widget)
if (gtk_widget_get_visible (window1) && gtk_widget_get_visible (window2))
{
- gtk_widget_destroy (window1);
- gtk_widget_destroy (window2);
+ gtk_window_destroy (GTK_WINDOW (window1));
+ gtk_window_destroy (GTK_WINDOW (window2));
}
else
{
@@ -2748,7 +2748,7 @@ create_spins (GtkWidget *widget)
button = gtk_button_new_with_label ("Close");
g_signal_connect_swapped (button, "clicked",
- G_CALLBACK (gtk_widget_destroy),
+ G_CALLBACK (gtk_window_destroy),
window);
gtk_container_add (GTK_CONTAINER (hbox), button);
}
@@ -2756,7 +2756,7 @@ create_spins (GtkWidget *widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
@@ -3099,7 +3099,7 @@ create_cursors (GtkWidget *widget)
button = gtk_button_new_with_label ("Close");
g_signal_connect_swapped (button, "clicked",
- G_CALLBACK (gtk_widget_destroy),
+ G_CALLBACK (gtk_window_destroy),
window);
gtk_container_add (GTK_CONTAINER (hbox), button);
@@ -3108,7 +3108,7 @@ create_cursors (GtkWidget *widget)
gtk_editable_set_text (GTK_EDITABLE (entry), "arrow");
}
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
/*
@@ -3147,7 +3147,7 @@ create_color_selection (GtkWidget *widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
static void
@@ -3273,13 +3273,13 @@ create_flipping (GtkWidget *widget)
create_forward_back ("Right-to-Left", GTK_TEXT_DIR_RTL));
gtk_dialog_add_button (GTK_DIALOG (window), "Close", GTK_RESPONSE_CLOSE);
- g_signal_connect (window, "response", G_CALLBACK (gtk_widget_destroy), NULL);
+ g_signal_connect (window, "response", G_CALLBACK (gtk_window_destroy), NULL);
}
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
/*
@@ -3318,7 +3318,7 @@ create_font_selection (GtkWidget *widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
/*
@@ -3399,7 +3399,7 @@ create_dialog (GtkWidget *widget)
if (!gtk_widget_get_visible (dialog_window))
gtk_widget_show (dialog_window);
else
- gtk_widget_destroy (dialog_window);
+ gtk_window_destroy (GTK_WINDOW (dialog_window));
}
/* Display & Screen test
@@ -3436,7 +3436,7 @@ screen_display_check (GtkWidget *widget, ScreenDisplaySelection *data)
gtk_window_set_display (GTK_WINDOW (dialog), current_display);
gtk_widget_show (dialog);
g_signal_connect (dialog, "response",
- G_CALLBACK (gtk_widget_destroy),
+ G_CALLBACK (gtk_window_destroy),
NULL);
}
else
@@ -3460,14 +3460,14 @@ screen_display_check (GtkWidget *widget, ScreenDisplaySelection *data)
new_display = display;
gtk_window_set_display (GTK_WINDOW (data->toplevel), new_display);
- gtk_widget_destroy (data->dialog_window);
+ gtk_window_destroy (GTK_WINDOW (data->dialog_window));
}
}
static void
screen_display_destroy_diag (GtkWidget *widget, GtkWidget *data)
{
- gtk_widget_destroy (data);
+ gtk_window_destroy (GTK_WINDOW (data));
}
static void
@@ -3484,7 +3484,7 @@ create_display_screen (GtkWidget *widget)
"title", "Screen or Display selection",
NULL);
g_signal_connect (window, "destroy",
- G_CALLBACK (gtk_widget_destroy), NULL);
+ G_CALLBACK (gtk_window_destroy), NULL);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
gtk_window_set_child (GTK_WINDOW (window), vbox);
@@ -3641,7 +3641,7 @@ create_range_controls (GtkWidget *widget)
button = gtk_button_new_with_label ("close");
g_signal_connect_swapped (button, "clicked",
- G_CALLBACK (gtk_widget_destroy),
+ G_CALLBACK (gtk_window_destroy),
window);
gtk_container_add (GTK_CONTAINER (box2), button);
gtk_window_set_default_widget (GTK_WINDOW (window), button);
@@ -3651,7 +3651,7 @@ create_range_controls (GtkWidget *widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
/*
@@ -4017,7 +4017,7 @@ create_notebook (GtkWidget *widget)
button = gtk_button_new_with_label ("close");
g_signal_connect_swapped (button, "clicked",
- G_CALLBACK (gtk_widget_destroy),
+ G_CALLBACK (gtk_window_destroy),
window);
gtk_container_add (GTK_CONTAINER (box1), button);
gtk_window_set_default_widget (GTK_WINDOW (window), button);
@@ -4026,7 +4026,7 @@ create_notebook (GtkWidget *widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
/*
@@ -4184,7 +4184,7 @@ create_panes (GtkWidget *widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
/*
@@ -4493,10 +4493,10 @@ create_paned_keyboard_navigation (GtkWidget *widget)
if (window1 &&
(gtk_widget_get_display (window1) != gtk_widget_get_display (widget)))
{
- gtk_widget_destroy (window1);
- gtk_widget_destroy (window2);
- gtk_widget_destroy (window3);
- gtk_widget_destroy (window4);
+ gtk_window_destroy (GTK_WINDOW (window1));
+ gtk_window_destroy (GTK_WINDOW (window2));
+ gtk_window_destroy (GTK_WINDOW (window3));
+ gtk_window_destroy (GTK_WINDOW (window4));
}
if (!window1)
@@ -4524,22 +4524,22 @@ create_paned_keyboard_navigation (GtkWidget *widget)
}
if (gtk_widget_get_visible (window1))
- gtk_widget_destroy (GTK_WIDGET (window1));
+ gtk_window_destroy (GTK_WINDOW (window1));
else
gtk_widget_show (GTK_WIDGET (window1));
if (gtk_widget_get_visible (window2))
- gtk_widget_destroy (GTK_WIDGET (window2));
+ gtk_window_destroy (GTK_WINDOW (window2));
else
gtk_widget_show (GTK_WIDGET (window2));
if (gtk_widget_get_visible (window3))
- gtk_widget_destroy (GTK_WIDGET (window3));
+ gtk_window_destroy (GTK_WINDOW (window3));
else
gtk_widget_show (GTK_WIDGET (window3));
if (gtk_widget_get_visible (window4))
- gtk_widget_destroy (GTK_WIDGET (window4));
+ gtk_window_destroy (GTK_WINDOW (window4));
else
gtk_widget_show (GTK_WIDGET (window4));
}
@@ -4605,7 +4605,7 @@ create_wmhints (GtkWidget *widget)
button = gtk_button_new_with_label ("close");
g_signal_connect_swapped (button, "clicked",
- G_CALLBACK (gtk_widget_destroy),
+ G_CALLBACK (gtk_window_destroy),
window);
gtk_container_add (GTK_CONTAINER (box2), button);
@@ -4616,7 +4616,7 @@ create_wmhints (GtkWidget *widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
/*
@@ -4665,7 +4665,7 @@ tracking_label (GtkWidget *window)
g_signal_connect_object (hbox,
"destroy",
- G_CALLBACK (gtk_widget_destroy),
+ G_CALLBACK (gtk_window_destroy),
window,
G_CONNECT_SWAPPED);
@@ -4820,7 +4820,7 @@ create_surface_states (GtkWidget *widget)
gtk_widget_get_display (widget));
g_signal_connect_object (iconified, "destroy",
- G_CALLBACK (gtk_widget_destroy),
+ G_CALLBACK (gtk_window_destroy),
window,
G_CONNECT_SWAPPED);
gtk_window_minimize (GTK_WINDOW (iconified));
@@ -4834,7 +4834,7 @@ create_surface_states (GtkWidget *widget)
gtk_widget_get_display (widget));
g_signal_connect_object (normal, "destroy",
- G_CALLBACK (gtk_widget_destroy),
+ G_CALLBACK (gtk_window_destroy),
window,
G_CONNECT_SWAPPED);
@@ -4859,7 +4859,7 @@ create_surface_states (GtkWidget *widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
/*
@@ -4964,7 +4964,7 @@ window_controls (GtkWidget *window)
g_signal_connect_object (control_window,
"destroy",
- G_CALLBACK (gtk_widget_destroy),
+ G_CALLBACK (gtk_window_destroy),
window,
G_CONNECT_SWAPPED);
@@ -5094,7 +5094,7 @@ create_window_sizing (GtkWidget *widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
/*
@@ -5378,14 +5378,14 @@ create_progress_bar (GtkWidget *widget)
gtk_dialog_add_button (GTK_DIALOG (pdata->window), "Close", GTK_RESPONSE_CLOSE);
g_signal_connect (pdata->window, "response",
- G_CALLBACK (gtk_widget_destroy),
+ G_CALLBACK (gtk_window_destroy),
NULL);
}
if (!gtk_widget_get_visible (pdata->window))
gtk_widget_show (pdata->window);
else
- gtk_widget_destroy (pdata->window);
+ gtk_window_destroy (GTK_WINDOW (pdata->window));
}
/*
@@ -5470,7 +5470,7 @@ create_timeout_test (GtkWidget *widget)
button = gtk_button_new_with_label ("close");
g_signal_connect_swapped (button, "clicked",
- G_CALLBACK (gtk_widget_destroy),
+ G_CALLBACK (gtk_window_destroy),
window);
gtk_container_add (GTK_CONTAINER (action_area), button);
gtk_window_set_default_widget (GTK_WINDOW (window), button);
@@ -5494,7 +5494,7 @@ create_timeout_test (GtkWidget *widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
static void
@@ -5837,7 +5837,7 @@ create_native_dialogs (GtkWidget *widget)
if (!gtk_widget_get_visible (window))
gtk_widget_show (window);
else
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
/*
@@ -5847,7 +5847,7 @@ create_native_dialogs (GtkWidget *widget)
static void
do_exit (GtkWidget *widget, GtkWidget *window)
{
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
done = TRUE;
g_main_context_wakeup (NULL);
}
diff --git a/tests/testheaderbar.c b/tests/testheaderbar.c
index 539ed3bbae..1c1e7bd34b 100644
--- a/tests/testheaderbar.c
+++ b/tests/testheaderbar.c
@@ -29,7 +29,7 @@ on_bookmark_clicked (GtkButton *button, gpointer data)
NULL);
g_signal_connect (chooser, "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
+ G_CALLBACK (gtk_window_destroy), NULL);
gtk_widget_show (chooser);
}
@@ -160,7 +160,7 @@ main (int argc, char *argv[])
while (!done)
g_main_context_iteration (NULL, TRUE);
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return 0;
}
diff --git a/tests/testlogout.c b/tests/testlogout.c
index 2d9cd215bd..8aa3d1a5cc 100644
--- a/tests/testlogout.c
+++ b/tests/testlogout.c
@@ -137,7 +137,7 @@ quit (GtkApplication *app,
gpointer data)
{
g_print ("Received quit\n");
- gtk_widget_destroy (win);
+ gtk_window_destroy (GTK_WINDOW (win));
}
int
diff --git a/tests/testrevealer.c b/tests/testrevealer.c
index ce6cfb231a..a36080f21e 100644
--- a/tests/testrevealer.c
+++ b/tests/testrevealer.c
@@ -166,7 +166,7 @@ main (gint argc,
while (TRUE)
g_main_context_iteration (NULL, TRUE);
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return 0;
}
diff --git a/tests/teststack.c b/tests/teststack.c
index 00b21226a4..bfbf069959 100644
--- a/tests/teststack.c
+++ b/tests/teststack.c
@@ -260,7 +260,7 @@ main (gint argc,
while (TRUE)
g_main_context_iteration (NULL, TRUE);
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
return 0;
}
diff --git a/tests/testvolumebutton.c b/tests/testvolumebutton.c
index 5a3b31f049..d79ec34aa9 100644
--- a/tests/testvolumebutton.c
+++ b/tests/testvolumebutton.c
@@ -47,7 +47,7 @@ response_cb (GtkDialog *dialog,
gint arg1,
gpointer user_data)
{
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static gboolean
diff --git a/tests/testwindowsize.c b/tests/testwindowsize.c
index 99148869bf..6d05ddae19 100644
--- a/tests/testwindowsize.c
+++ b/tests/testwindowsize.c
@@ -70,7 +70,7 @@ show_dialog (void)
gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
diff --git a/testsuite/a11y/accessibility-dump.c b/testsuite/a11y/accessibility-dump.c
index 422d150414..f77a9bc152 100644
--- a/testsuite/a11y/accessibility-dump.c
+++ b/testsuite/a11y/accessibility-dump.c
@@ -781,7 +781,7 @@ dump_ui_file (const char *ui_file,
gtk_widget_show (window);
dump_accessible (gtk_widget_get_accessible (window), 0, string);
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
static void
diff --git a/testsuite/gtk/action.c b/testsuite/gtk/action.c
index b153d75614..2ca5901005 100644
--- a/testsuite/gtk/action.c
+++ b/testsuite/gtk/action.c
@@ -99,7 +99,7 @@ test_action (void)
g_assert_cmpint (win_activated, ==, 2);
g_assert_cmpint (box_activated, ==, 1);
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
g_object_unref (win_actions);
g_object_unref (box_actions);
}
@@ -240,7 +240,7 @@ test_overlap (void)
g_assert_cmpint (win_activated, ==, 1);
g_assert_cmpint (box_activated, ==, 1);
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
g_object_unref (win_actions);
g_object_unref (box_actions);
}
diff --git a/testsuite/gtk/builder.c b/testsuite/gtk/builder.c
index 14d5a4adc8..d545b3a667 100644
--- a/testsuite/gtk/builder.c
+++ b/testsuite/gtk/builder.c
@@ -253,7 +253,7 @@ test_connect_signals (void)
g_assert_cmpint (object, ==, 1);
g_assert_cmpint (object_after, ==, 1);
- gtk_widget_destroy (GTK_WIDGET (window));
+ gtk_window_destroy (GTK_WINDOW (window));
g_object_unref (builder);
builder = builder_new_from_string (buffer_order, -1, NULL);
@@ -262,7 +262,7 @@ test_connect_signals (void)
gtk_window_set_title (GTK_WINDOW (window), "test");
g_assert (normal == 20);
- gtk_widget_destroy (GTK_WIDGET (window));
+ gtk_window_destroy (GTK_WINDOW (window));
gtk_builder_add_from_string (builder, buffer_extra,
strlen (buffer_extra), NULL);
@@ -272,11 +272,11 @@ test_connect_signals (void)
gtk_window_set_title (GTK_WINDOW (window), "test");
g_assert (normal == 30);
- gtk_widget_destroy (GTK_WIDGET (window));
+ gtk_window_destroy (GTK_WINDOW (window));
window = gtk_builder_get_object (builder, "window3");
gtk_window_set_title (GTK_WINDOW (window), "test");
g_assert (normal == 40);
- gtk_widget_destroy (GTK_WIDGET (window));
+ gtk_window_destroy (GTK_WINDOW (window));
g_object_unref (builder);
@@ -289,7 +289,7 @@ test_connect_signals (void)
gtk_window_set_title (GTK_WINDOW (window), "test");
g_assert (normal == 1);
- gtk_widget_destroy (GTK_WIDGET (window));
+ gtk_window_destroy (GTK_WINDOW (window));
g_object_unref (builder);
}
@@ -344,7 +344,7 @@ test_translation (void)
g_assert (strcmp (gtk_label_get_text (label), "Arkiv") == 0);
window = gtk_builder_get_object (builder, "window1");
- gtk_widget_destroy (GTK_WIDGET (window));
+ gtk_window_destroy (GTK_WINDOW (window));
g_object_unref (builder);
}
#endif
@@ -445,7 +445,7 @@ test_sizegroup (void)
{
GObject *window;
window = gtk_builder_get_object (builder, "window1");
- gtk_widget_destroy (GTK_WIDGET (window));
+ gtk_window_destroy (GTK_WINDOW (window));
}
#endif
g_object_unref (builder);
@@ -684,20 +684,20 @@ test_types (void)
GError *error;
builder = builder_new_from_string (buffer, -1, NULL);
- gtk_widget_destroy (GTK_WIDGET (gtk_builder_get_object (builder, "dialog")));
- gtk_widget_destroy (GTK_WIDGET (gtk_builder_get_object (builder, "window")));
+ gtk_window_destroy (GTK_WINDOW (gtk_builder_get_object (builder, "dialog")));
+ gtk_window_destroy (GTK_WINDOW (gtk_builder_get_object (builder, "window")));
g_object_unref (builder);
builder = builder_new_from_string (buffer2, -1, NULL);
window = gtk_builder_get_object (builder, "window");
g_assert (GTK_IS_WINDOW (window));
- gtk_widget_destroy (GTK_WIDGET (window));
+ gtk_window_destroy (GTK_WINDOW (window));
g_object_unref (builder);
builder = builder_new_from_string (buffer3, -1, NULL);
window = gtk_builder_get_object (builder, "window");
g_assert (GTK_IS_WINDOW (window));
- gtk_widget_destroy (GTK_WIDGET (window));
+ gtk_window_destroy (GTK_WINDOW (window));
g_object_unref (builder);
error = NULL;
@@ -844,7 +844,7 @@ test_construct_only_property (void)
widget = gtk_builder_get_object (builder, "window1");
g_assert_cmpstr (gtk_widget_get_css_name (GTK_WIDGET (widget)), ==, "amazing");
- gtk_widget_destroy (GTK_WIDGET (widget));
+ gtk_window_destroy (GTK_WINDOW (widget));
g_object_unref (builder);
builder = builder_new_from_string (buffer2, -1, NULL);
@@ -894,7 +894,7 @@ test_object_properties (void)
gtk_builder_add_from_string (builder, buffer2, -1, NULL);
window = gtk_builder_get_object (builder, "window2");
g_assert (window != NULL);
- gtk_widget_destroy (GTK_WIDGET (window));
+ gtk_window_destroy (GTK_WINDOW (window));
g_object_unref (builder);
}
@@ -947,7 +947,7 @@ test_children (void)
g_assert (gtk_widget_get_parent (GTK_WIDGET(button)) != NULL);
g_assert (strcmp (gtk_buildable_get_name (GTK_BUILDABLE (gtk_widget_get_parent (GTK_WIDGET (button)))),
"window1") == 0);
- gtk_widget_destroy (GTK_WIDGET (window));
+ gtk_window_destroy (GTK_WINDOW (window));
g_object_unref (builder);
builder = builder_new_from_string (buffer2, -1, NULL);
@@ -974,7 +974,7 @@ test_children (void)
g_assert (gtk_orientable_get_orientation (GTK_ORIENTABLE (action_area)) == GTK_ORIENTATION_HORIZONTAL);
g_assert (gtk_widget_get_parent (GTK_WIDGET (action_area)) != NULL);
g_assert (gtk_buildable_get_name (GTK_BUILDABLE (action_area)) != NULL);
- gtk_widget_destroy (GTK_WIDGET (dialog));
+ gtk_window_destroy (GTK_WINDOW (dialog));
g_object_unref (builder);
}
@@ -1087,7 +1087,7 @@ test_treeview_column (void)
g_list_free (renderers);
window = gtk_builder_get_object (builder, "window1");
- gtk_widget_destroy (GTK_WIDGET (window));
+ gtk_window_destroy (GTK_WINDOW (window));
g_object_unref (builder);
}
@@ -1134,7 +1134,7 @@ test_icon_view (void)
g_assert (GTK_IS_ICON_VIEW (iconview));
window = gtk_builder_get_object (builder, "window1");
- gtk_widget_destroy (GTK_WIDGET (window));
+ gtk_window_destroy (GTK_WINDOW (window));
g_object_unref (builder);
}
@@ -1188,7 +1188,7 @@ test_combo_box (void)
g_assert (combobox);
window = gtk_builder_get_object (builder, "window1");
- gtk_widget_destroy (GTK_WIDGET (window));
+ gtk_window_destroy (GTK_WINDOW (window));
g_object_unref (builder);
}
@@ -1260,7 +1260,7 @@ test_combo_box_entry (void)
g_free (text);
window = gtk_builder_get_object (builder, "window1");
- gtk_widget_destroy (GTK_WIDGET (window));
+ gtk_window_destroy (GTK_WINDOW (window));
g_object_unref (builder);
}
@@ -1320,7 +1320,7 @@ test_cell_view (void)
window = gtk_builder_get_object (builder, "window1");
g_assert (window);
- gtk_widget_destroy (GTK_WIDGET (window));
+ gtk_window_destroy (GTK_WINDOW (window));
g_object_unref (builder);
}
@@ -1366,7 +1366,7 @@ test_dialog (void)
button_cancel = gtk_builder_get_object (builder, "button_cancel");
g_assert (gtk_dialog_get_response_for_widget (GTK_DIALOG (dialog1), GTK_WIDGET (button_cancel)) == -5);
- gtk_widget_destroy (GTK_WIDGET (dialog1));
+ gtk_window_destroy (GTK_WINDOW (dialog1));
g_object_unref (builder);
}
@@ -1397,7 +1397,7 @@ test_message_dialog (void)
g_assert (GTK_IS_EXPANDER (expander));
g_assert (gtk_widget_get_parent (GTK_WIDGET (expander)) == gtk_message_dialog_get_message_area
(GTK_MESSAGE_DIALOG (dialog1)));
- gtk_widget_destroy (GTK_WIDGET (dialog1));
+ gtk_window_destroy (GTK_WINDOW (dialog1));
g_object_unref (builder);
}
@@ -1479,7 +1479,7 @@ test_widget (void)
g_assert (gtk_widget_has_focus (GTK_WIDGET (button1)));
window1 = gtk_builder_get_object (builder, "window1");
- gtk_widget_destroy (GTK_WIDGET (window1));
+ gtk_window_destroy (GTK_WINDOW (window1));
g_object_unref (builder);
@@ -1508,7 +1508,7 @@ test_widget (void)
g_assert_cmpstr (name, ==, "A Label");
g_free (name);
- gtk_widget_destroy (GTK_WIDGET (window1));
+ gtk_window_destroy (GTK_WINDOW (window1));
g_object_unref (builder);
builder = builder_new_from_string (buffer4, -1, NULL);
@@ -1543,12 +1543,12 @@ test_window (void)
g_object_get (window1, "title", &title, NULL);
g_assert (strcmp (title, "") == 0);
g_free (title);
- gtk_widget_destroy (GTK_WIDGET (window1));
+ gtk_window_destroy (GTK_WINDOW (window1));
g_object_unref (builder);
builder = builder_new_from_string (buffer2, -1, NULL);
window1 = gtk_builder_get_object (builder, "window1");
- gtk_widget_destroy (GTK_WIDGET (window1));
+ gtk_window_destroy (GTK_WINDOW (window1));
g_object_unref (builder);
}
@@ -1735,7 +1735,7 @@ test_reference_counting (void)
gtk_tree_view_set_model (GTK_TREE_VIEW (treeview), NULL);
g_assert (model_freed == TRUE);
- gtk_widget_destroy (GTK_WIDGET (window));
+ gtk_window_destroy (GTK_WINDOW (window));
builder = builder_new_from_string (buffer2, -1, NULL);
g_object_unref (builder);
@@ -1936,7 +1936,7 @@ test_add_objects (void)
g_assert (obj == NULL);
obj = gtk_builder_get_object (builder, "window2");
g_assert (GTK_IS_WINDOW (obj));
- gtk_widget_destroy (GTK_WIDGET (obj));
+ gtk_window_destroy (GTK_WINDOW (obj));
obj = gtk_builder_get_object (builder, "mainbox");
g_assert (GTK_IS_WIDGET (obj));
g_object_unref (builder);
@@ -2255,7 +2255,7 @@ test_property_bindings (void)
g_assert (gtk_widget_get_sensitive (GTK_WIDGET (button3)));
window = gtk_builder_get_object (builder, "window");
- gtk_widget_destroy (GTK_WIDGET (window));
+ gtk_window_destroy (GTK_WINDOW (window));
g_object_unref (builder);
}
diff --git a/testsuite/gtk/displayclose.c b/testsuite/gtk/displayclose.c
index e6093dcf9e..55da35c0f8 100644
--- a/testsuite/gtk/displayclose.c
+++ b/testsuite/gtk/displayclose.c
@@ -27,7 +27,7 @@ main (int argc, char **argv)
but = gtk_button_new_with_label ("Try to Exit");
g_signal_connect_swapped (but, "clicked",
- G_CALLBACK (gtk_widget_destroy), win);
+ G_CALLBACK (gtk_window_destroy), win);
gtk_window_set_child (GTK_WINDOW (win), but);
gtk_widget_show (win);
diff --git a/testsuite/gtk/grid-layout.c b/testsuite/gtk/grid-layout.c
index 2b97c7c9b7..c3655185ff 100644
--- a/testsuite/gtk/grid-layout.c
+++ b/testsuite/gtk/grid-layout.c
@@ -188,7 +188,7 @@ test_simple_row (void)
gtk_widget_unparent (GTK_WIDGET (child2));
gtk_widget_unparent (GTK_WIDGET (child3));
- gtk_widget_destroy (parent);
+ gtk_window_destroy (GTK_WINDOW (window));
}
/* same as the previous test, with a column
@@ -281,7 +281,7 @@ test_simple_column (void)
gtk_widget_unparent (GTK_WIDGET (child2));
gtk_widget_unparent (GTK_WIDGET (child3));
- gtk_widget_destroy (parent);
+ gtk_window_destroy (GTK_WINDOW (window));
}
/* Create a grid with spanning children
@@ -406,7 +406,7 @@ test_spans (void)
gtk_widget_unparent (GTK_WIDGET (child3));
gtk_widget_unparent (GTK_WIDGET (child4));
- gtk_widget_destroy (parent);
+ gtk_window_destroy (GTK_WINDOW (window));
}
/* Create a 2x2 homogeneous grid and verify
@@ -522,7 +522,7 @@ test_homogeneous (void)
gtk_widget_unparent (GTK_WIDGET (child3));
gtk_widget_unparent (GTK_WIDGET (child4));
- gtk_widget_destroy (parent);
+ gtk_window_destroy (GTK_WINDOW (window));
}
/* Create a layout with three children
@@ -634,7 +634,7 @@ test_simple_layout (void)
gtk_widget_unparent (GTK_WIDGET (child2));
gtk_widget_unparent (GTK_WIDGET (child3));
- gtk_widget_destroy (parent);
+ gtk_window_destroy (GTK_WINDOW (window));
}
int
diff --git a/testsuite/gtk/object.c b/testsuite/gtk/object.c
index 8bfc09b39e..d542df130c 100644
--- a/testsuite/gtk/object.c
+++ b/testsuite/gtk/object.c
@@ -291,7 +291,8 @@ widget_property_tests (gconstpointer test_data)
widget_test_properties (widget, 1); /* test maximum */
widget_test_properties (widget, -1); /* test random value */
/* cleanup */
- gtk_widget_destroy (widget);
+ if (GTK_IS_WINDOW (widget))
+ gtk_window_destroy (GTK_WINDOW (widget));
g_object_unref (widget);
}
diff --git a/testsuite/gtk/objects-finalize.c b/testsuite/gtk/objects-finalize.c
index 2622168bf5..5e13c1ad39 100644
--- a/testsuite/gtk/objects-finalize.c
+++ b/testsuite/gtk/objects-finalize.c
@@ -97,7 +97,7 @@ test_finalize_object (gconstpointer data)
/* Toplevels are owned by GTK+, just tell GTK+ to destroy it */
if (GTK_IS_WINDOW (object))
- gtk_widget_destroy (GTK_WIDGET (object));
+ gtk_window_destroy (GTK_WINDOW (object));
else
g_object_unref (object);
diff --git a/testsuite/gtk/regression-tests.c b/testsuite/gtk/regression-tests.c
index 6ab853ffcb..306333e4cd 100644
--- a/testsuite/gtk/regression-tests.c
+++ b/testsuite/gtk/regression-tests.c
@@ -35,7 +35,7 @@ test_9d6da33ff5c5e41e3521e1afd63d2d67bc915753 (void)
g_assert (gtk_widget_get_sensitive (label));
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
static void
@@ -53,7 +53,7 @@ test_94f00eb04dd1433cf1cc9a3341f485124e38abd1 (void)
g_assert (!gtk_widget_is_sensitive (label));
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
int
diff --git a/testsuite/gtk/templates.c b/testsuite/gtk/templates.c
index 80cd084c10..016e0724f0 100644
--- a/testsuite/gtk/templates.c
+++ b/testsuite/gtk/templates.c
@@ -50,11 +50,11 @@ test_dialog_basic (void)
{
GtkWidget *dialog;
- dialog = gtk_dialog_new();
+ dialog = gtk_dialog_new ();
g_assert (GTK_IS_DIALOG (dialog));
g_assert (gtk_dialog_get_content_area (GTK_DIALOG (dialog)) != NULL);
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
@@ -67,7 +67,7 @@ test_dialog_override_property (void)
NULL);
g_assert (GTK_IS_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
@@ -76,11 +76,11 @@ test_message_dialog_basic (void)
GtkWidget *dialog;
dialog = gtk_message_dialog_new (NULL, 0,
- GTK_MESSAGE_INFO,
- GTK_BUTTONS_CLOSE,
- "Do it hard !");
+ GTK_MESSAGE_INFO,
+ GTK_BUTTONS_CLOSE,
+ "Do it hard !");
g_assert (GTK_IS_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
@@ -90,7 +90,7 @@ test_about_dialog_basic (void)
dialog = gtk_about_dialog_new ();
g_assert (GTK_IS_ABOUT_DIALOG (dialog));
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
@@ -101,7 +101,7 @@ test_about_dialog_show (void)
dialog = gtk_about_dialog_new ();
g_assert (GTK_IS_ABOUT_DIALOG (dialog));
show_and_wait (dialog);
- gtk_widget_destroy (dialog);
+ gtk_window_destroy (GTK_WINDOW (dialog));
}
static void
@@ -134,7 +134,7 @@ test_assistant_basic (void)
widget = gtk_assistant_new ();
g_assert (GTK_IS_ASSISTANT (widget));
- gtk_widget_destroy (widget);
+ gtk_window_destroy (GTK_WINDOW (widget));
}
static void
@@ -145,7 +145,7 @@ test_assistant_show (void)
widget = gtk_assistant_new ();
g_assert (GTK_IS_ASSISTANT (widget));
show_and_wait (widget);
- gtk_widget_destroy (widget);
+ gtk_window_destroy (GTK_WINDOW (widget));
}
static void
@@ -224,7 +224,7 @@ test_app_chooser_dialog_basic (void)
g_timeout_add (500, main_loop_quit_cb, &done);
while (!done)
g_main_context_iteration (NULL, TRUE);
- gtk_widget_destroy (widget);
+ gtk_window_destroy (GTK_WINDOW (widget));
}
static void
@@ -235,7 +235,7 @@ test_color_chooser_dialog_basic (void)
/* This test also tests the internal GtkColorEditor widget */
widget = gtk_color_chooser_dialog_new (NULL, NULL);
g_assert (GTK_IS_COLOR_CHOOSER_DIALOG (widget));
- gtk_widget_destroy (widget);
+ gtk_window_destroy (GTK_WINDOW (widget));
}
static void
@@ -247,15 +247,15 @@ test_color_chooser_dialog_show (void)
widget = gtk_color_chooser_dialog_new (NULL, NULL);
g_assert (GTK_IS_COLOR_CHOOSER_DIALOG (widget));
show_and_wait (widget);
- gtk_widget_destroy (widget);
+ gtk_window_destroy (GTK_WINDOW (widget));
}
/* Avoid warnings from GVFS-RemoteVolumeMonitor */
static gboolean
ignore_gvfs_warning (const gchar *log_domain,
- GLogLevelFlags log_level,
- const gchar *message,
- gpointer user_data)
+ GLogLevelFlags log_level,
+ const gchar *message,
+ gpointer user_data)
{
if (g_strcmp0 (log_domain, "GVFS-RemoteVolumeMonitor") == 0)
return FALSE;
@@ -300,9 +300,9 @@ test_file_chooser_dialog_basic (void)
g_test_log_set_fatal_handler (ignore_gvfs_warning, NULL);
widget = gtk_file_chooser_dialog_new ("The Dialog", NULL,
- GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
- "_OK", GTK_RESPONSE_OK,
- NULL);
+ GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
+ "_OK", GTK_RESPONSE_OK,
+ NULL);
g_assert (GTK_IS_FILE_CHOOSER_DIALOG (widget));
done = FALSE;
@@ -310,7 +310,7 @@ test_file_chooser_dialog_basic (void)
while (!done)
g_main_context_iteration (NULL, TRUE);
- gtk_widget_destroy (widget);
+ gtk_window_destroy (GTK_WINDOW (widget));
}
static void
@@ -327,7 +327,7 @@ test_file_chooser_dialog_show (void)
g_assert (GTK_IS_FILE_CHOOSER_DIALOG (widget));
show_and_wait (widget);
- gtk_widget_destroy (widget);
+ gtk_window_destroy (GTK_WINDOW (widget));
}
static void
@@ -374,7 +374,7 @@ test_font_chooser_dialog_basic (void)
widget = gtk_font_chooser_dialog_new ("Choose a font !", NULL);
g_assert (GTK_IS_FONT_CHOOSER_DIALOG (widget));
- gtk_widget_destroy (widget);
+ gtk_window_destroy (GTK_WINDOW (widget));
}
static void
@@ -385,7 +385,7 @@ test_font_chooser_dialog_show (void)
widget = gtk_font_chooser_dialog_new ("Choose a font !", NULL);
g_assert (GTK_IS_FONT_CHOOSER_DIALOG (widget));
show_and_wait (widget);
- gtk_widget_destroy (widget);
+ gtk_window_destroy (GTK_WINDOW (widget));
}
#ifdef HAVE_UNIX_PRINT_WIDGETS
@@ -396,7 +396,7 @@ test_page_setup_unix_dialog_basic (void)
widget = gtk_page_setup_unix_dialog_new ("Setup your Page !", NULL);
g_assert (GTK_IS_PAGE_SETUP_UNIX_DIALOG (widget));
- gtk_widget_destroy (widget);
+ gtk_window_destroy (GTK_WINDOW (widget));
}
static void
@@ -407,7 +407,7 @@ test_page_setup_unix_dialog_show (void)
widget = gtk_page_setup_unix_dialog_new ("Setup your Page !", NULL);
g_assert (GTK_IS_PAGE_SETUP_UNIX_DIALOG (widget));
show_and_wait (widget);
- gtk_widget_destroy (widget);
+ gtk_window_destroy (GTK_WINDOW (widget));
}
static void
@@ -417,7 +417,7 @@ test_print_unix_dialog_basic (void)
widget = gtk_print_unix_dialog_new ("Go Print !", NULL);
g_assert (GTK_IS_PRINT_UNIX_DIALOG (widget));
- gtk_widget_destroy (widget);
+ gtk_window_destroy (GTK_WINDOW (widget));
}
static void
@@ -428,7 +428,7 @@ test_print_unix_dialog_show (void)
widget = gtk_print_unix_dialog_new ("Go Print !", NULL);
g_assert (GTK_IS_PRINT_UNIX_DIALOG (widget));
show_and_wait (widget);
- gtk_widget_destroy (widget);
+ gtk_window_destroy (GTK_WINDOW (widget));
}
#endif
@@ -442,7 +442,7 @@ main (int argc, char **argv)
/* initialize test program */
gtk_test_init (&argc, &argv);
- /* This environment variable cooperates with gtk_widget_destroy()
+ /* This environment variable cooperates with widget dispose()
* to assert that all automated compoenents are properly finalized
* when a given composite widget is destroyed.
*/
diff --git a/testsuite/gtk/window.c b/testsuite/gtk/window.c
index 847d458f80..c67dfb745b 100644
--- a/testsuite/gtk/window.c
+++ b/testsuite/gtk/window.c
@@ -144,7 +144,7 @@ test_default_size (void)
g_assert_cmpint (w, ==, 300);
g_assert_cmpint (h, ==, 300);
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
static void
@@ -207,7 +207,7 @@ test_resize (void)
g_assert_cmpint (w, ==, 200);
g_assert_cmpint (h, ==, 400);
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
static void
@@ -237,7 +237,7 @@ test_resize_popup (void)
g_assert_cmpint (w, ==, 1);
g_assert_cmpint (h, ==, 1);
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
static void
@@ -287,7 +287,7 @@ test_show_hide (void)
g_assert_cmpint (w, ==, w1);
g_assert_cmpint (h, ==, h1);
- gtk_widget_destroy (window);
+ gtk_window_destroy (GTK_WINDOW (window));
}
int
diff --git a/testsuite/reftests/reftest-snapshot.c b/testsuite/reftests/reftest-snapshot.c
index 6d9ca10cde..0e2800ec06 100644
--- a/testsuite/reftests/reftest-snapshot.c
+++ b/testsuite/reftests/reftest-snapshot.c
@@ -276,7 +276,7 @@ snapshot_widget (GtkWidget *widget)
g_main_loop_unref (loop);
g_object_unref (paintable);
- gtk_widget_destroy (widget);
+ gtk_window_destroy (GTK_WINDOW (widget));
return surface;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]