Kaydet (Commit) ab3b7ce4 authored tarafından Colomban Wendling's avatar Colomban Wendling

Use the appropriate prototype for the window's delete-event callback

üst 2113537e
......@@ -185,7 +185,7 @@ static void verify_click_pos(GeanyDocument *doc)
}
/* should only be called from on_exit_clicked */
/* should only be called from on_window_delete_event */
static void quit_app(void)
{
configuration_save();
......@@ -202,7 +202,7 @@ static void quit_app(void)
/* wrapper function to abort exit process if cancel button is pressed */
gboolean on_exit_clicked(GtkWidget *widget, gpointer gdata)
gboolean on_window_delete_event(GtkWidget *widget, GdkEvent *event, gpointer gdata)
{
main_status.quitting = TRUE;
......@@ -299,7 +299,7 @@ G_MODULE_EXPORT void on_close1_activate(GtkMenuItem *menuitem, gpointer user_dat
G_MODULE_EXPORT void on_quit1_activate(GtkMenuItem *menuitem, gpointer user_data)
{
on_exit_clicked(NULL, NULL);
on_window_delete_event(NULL, NULL, NULL);
}
......
......@@ -28,7 +28,7 @@ G_BEGIN_DECLS
extern gboolean ignore_callback;
gboolean on_exit_clicked(GtkWidget *widget, gpointer gdata);
gboolean on_window_delete_event(GtkWidget *widget, GdkEvent *event, gpointer gdata);
G_MODULE_EXPORT void on_new1_activate(GtkMenuItem *menuitem, gpointer user_data);
......
......@@ -788,13 +788,13 @@ static gint setup_config_dir(void)
return mkdir_result;
}
/* Signal handling removed since on_exit_clicked() uses functions that are
/* Signal handling removed since on_quit1_activate() uses functions that are
* illegal in signal handlers
static void signal_cb(gint sig)
{
if (sig == SIGTERM)
{
on_exit_clicked(NULL, NULL);
on_quit1_activate(NULL, NULL);
}
}
*/
......@@ -1158,7 +1158,7 @@ gint main(gint argc, gchar **argv)
editor_snippets_init();
/* registering some basic events */
g_signal_connect(main_widgets.window, "delete-event", G_CALLBACK(on_exit_clicked), NULL);
g_signal_connect(main_widgets.window, "delete-event", G_CALLBACK(on_window_delete_event), NULL);
g_signal_connect(main_widgets.window, "window-state-event", G_CALLBACK(on_window_state_event), NULL);
g_signal_connect(msgwindow.scribble, "motion-notify-event", G_CALLBACK(on_motion_event), NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment