mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-08-27 03:19:18 +00:00
general: Replace GtkWidget::delete-event with GtkWindow::close-request
This commit is contained in:
parent
e3375e5897
commit
95e1536e00
|
@ -2556,10 +2556,9 @@ on_is_maximized_changed (GObject *object,
|
|||
}
|
||||
|
||||
static gboolean
|
||||
nautilus_window_delete_event (GtkWidget *widget,
|
||||
GdkEventAny *event)
|
||||
nautilus_window_close_request (GtkWindow *window)
|
||||
{
|
||||
nautilus_window_close (NAUTILUS_WINDOW (widget));
|
||||
nautilus_window_close (NAUTILUS_WINDOW (window));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -2692,6 +2691,7 @@ nautilus_window_class_init (NautilusWindowClass *class)
|
|||
{
|
||||
GObjectClass *oclass = G_OBJECT_CLASS (class);
|
||||
GtkWidgetClass *wclass = GTK_WIDGET_CLASS (class);
|
||||
GtkWindowClass *window_class = GTK_WINDOW_CLASS (class);
|
||||
|
||||
oclass->finalize = nautilus_window_finalize;
|
||||
oclass->constructed = nautilus_window_constructed;
|
||||
|
@ -2699,9 +2699,10 @@ nautilus_window_class_init (NautilusWindowClass *class)
|
|||
wclass->destroy = nautilus_window_destroy;
|
||||
wclass->show = nautilus_window_show;
|
||||
wclass->realize = nautilus_window_realize;
|
||||
wclass->delete_event = nautilus_window_delete_event;
|
||||
wclass->grab_focus = nautilus_window_grab_focus;
|
||||
|
||||
window_class->close_request = nautilus_window_close_request;
|
||||
|
||||
gtk_widget_class_set_template_from_resource (wclass,
|
||||
"/org/gnome/nautilus/ui/nautilus-window.ui");
|
||||
gtk_widget_class_bind_template_child (wclass, NautilusWindow, content_paned);
|
||||
|
|
|
@ -23,9 +23,8 @@ test_quit (int exit_code)
|
|||
}
|
||||
|
||||
void
|
||||
test_delete_event (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer callback_data)
|
||||
test_close_request (GtkWindow *window,
|
||||
gpointer callback_data)
|
||||
{
|
||||
test_quit (0);
|
||||
}
|
||||
|
@ -42,8 +41,8 @@ test_window_new (const char *title)
|
|||
gtk_window_set_title (GTK_WINDOW (window), title);
|
||||
}
|
||||
|
||||
g_signal_connect (window, "delete_event",
|
||||
G_CALLBACK (test_delete_event), NULL);
|
||||
g_signal_connect (window, "close-request",
|
||||
G_CALLBACK (test_close_request), NULL);
|
||||
|
||||
return window;
|
||||
}
|
||||
|
|
|
@ -10,8 +10,7 @@
|
|||
void test_init (int *argc,
|
||||
char ***argv);
|
||||
int test_quit (int exit_code);
|
||||
void test_delete_event (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
void test_close_request (GtkWindow *window,
|
||||
gpointer callback_data);
|
||||
GtkWidget *test_window_new (const char *title);
|
||||
void test_gtk_widget_set_background_image (GtkWidget *widget,
|
||||
|
|
Loading…
Reference in a new issue