From 83eb8e01094e818adf5514681afbaf3f03cfd316 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Tue, 30 Jan 2018 19:22:45 +0000 Subject: [PATCH] Build fixes for GTK2. Apparently I haven't tried a GTK2 build since the most recent set of GTK-related code reorganisation. Some functions that were ifdef'ed out in GTK3 builds were now unused even in GTK2 builds (and, because they were also declared static, caused a -Werror build failure); and the pointless stub version of gtkapp.c was missing a stub version of a recently added function referred to from another module. --- unix/gtkapp.c | 1 + unix/gtkdlg.c | 17 ----------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/unix/gtkapp.c b/unix/gtkapp.c index 351238db..d520565d 100644 --- a/unix/gtkapp.c +++ b/unix/gtkapp.c @@ -104,6 +104,7 @@ void launch_duplicate_session(Conf *conf) {} void launch_new_session(void) {} void launch_saved_session(const char *str) {} void session_window_closed(void) {} +void window_setup_error(const char *errmsg) {} #else /* GTK_CHECK_VERSION(3,0,0) */ extern const int use_event_log; diff --git a/unix/gtkdlg.c b/unix/gtkdlg.c index 72a9ad68..2f1132a6 100644 --- a/unix/gtkdlg.c +++ b/unix/gtkdlg.c @@ -145,9 +145,6 @@ static void colourchoose_response(GtkDialog *dialog, static void coloursel_ok(GtkButton *button, gpointer data); static void coloursel_cancel(GtkButton *button, gpointer data); #endif -#if !GTK_CHECK_VERSION(3,0,0) -static void window_destroy(GtkWidget *widget, gpointer data); -#endif static void dlgparam_destroy(GtkWidget *widget, gpointer data); int get_listitemheight(GtkWidget *widget); @@ -1046,13 +1043,6 @@ void dlg_beep(void *dlg) gdk_beep(); } -#if !GTK_CHECK_VERSION(3,0,0) -static void errmsg_button_clicked(GtkButton *button, gpointer data) -{ - gtk_widget_destroy(GTK_WIDGET(data)); -} -#endif - static void set_transient_window_pos(GtkWidget *parent, GtkWidget *child) { #if !GTK_CHECK_VERSION(2,0,0) @@ -2586,13 +2576,6 @@ static void treeitem_sel(GtkItem *item, gpointer data) } #endif -#if !GTK_CHECK_VERSION(3,0,0) -static void window_destroy(GtkWidget *widget, gpointer data) -{ - gtk_main_quit(); -} -#endif - #if !GTK_CHECK_VERSION(2,0,0) static int tree_grab_focus(struct dlgparam *dp) {