From 59f3bc1e4f21377c362c1f497fb225711127d7a0 Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Sat, 15 Sep 2012 21:51:33 +0200 Subject: [PATCH] Remove compatibility checks with GTK 2.x GTK 2.x won't be supported anymore on this branch. --- libchimara/chimara-glk.c | 33 --------------------------------- libchimara/chimara-if.c | 12 ------------ libchimara/fileref.c | 4 ---- libchimara/input.c | 3 --- libchimara/pager.c | 6 ------ 5 files changed, 58 deletions(-) diff --git a/libchimara/chimara-glk.c b/libchimara/chimara-glk.c index bb2758a..8fd1a1e 100644 --- a/libchimara/chimara-glk.c +++ b/libchimara/chimara-glk.c @@ -28,27 +28,6 @@ #define CHIMARA_GLK_MIN_WIDTH 0 #define CHIMARA_GLK_MIN_HEIGHT 0 -/* Substitute functions for compiling on iLiad */ - -#if !GTK_CHECK_VERSION(2, 18, 0) -#define gtk_widget_get_allocation(w, a) \ - G_STMT_START { \ - (a)->x = (w)->allocation.x; \ - (a)->y = (w)->allocation.y; \ - (a)->width = (w)->allocation.width; \ - (a)->height = (w)->allocation.height; \ - } G_STMT_END -#define gtk_widget_set_allocation(w, a) \ - G_STMT_START { (w)->allocation = *(a); } G_STMT_END -#define gtk_widget_set_has_window(w, f) \ - G_STMT_START { \ - if(f) \ - GTK_WIDGET_UNSET_FLAGS((w), GTK_NO_WINDOW); \ - else \ - GTK_WIDGET_SET_FLAGS((w), GTK_NO_WINDOW); \ - } G_STMT_END -#endif /* GTK 2.18 */ - /** * SECTION:chimara-glk * @short_description: Widget which executes a Glk program @@ -767,18 +746,6 @@ chimara_glk_iliad_screen_update(ChimaraGlk *self, gboolean typing) /* Default signal handler */ } -/* COMPAT: G_PARAM_STATIC_STRINGS only appeared in GTK 2.13.0 */ -#ifndef G_PARAM_STATIC_STRINGS - -/* COMPAT: G_PARAM_STATIC_NAME and friends only appeared in GTK 2.8 */ -#if GTK_CHECK_VERSION(2,8,0) -#define G_PARAM_STATIC_STRINGS (G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB) -#else -#define G_PARAM_STATIC_STRINGS (0) -#endif - -#endif - static void chimara_glk_class_init(ChimaraGlkClass *klass) { diff --git a/libchimara/chimara-if.c b/libchimara/chimara-if.c index 95f8b93..64c32e3 100644 --- a/libchimara/chimara-if.c +++ b/libchimara/chimara-if.c @@ -286,18 +286,6 @@ chimara_if_command(ChimaraIF *self, gchar *input, gchar *response) /* Default signal handler */ } -/* COMPAT: G_PARAM_STATIC_STRINGS only appeared in GTK 2.13.0 */ -#ifndef G_PARAM_STATIC_STRINGS - -/* COMPAT: G_PARAM_STATIC_NAME and friends only appeared in GTK 2.8 */ -#if GTK_CHECK_VERSION(2,8,0) -#define G_PARAM_STATIC_STRINGS (G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB) -#else -#define G_PARAM_STATIC_STRINGS (0) -#endif - -#endif - static void chimara_if_class_init(ChimaraIFClass *klass) { diff --git a/libchimara/fileref.c b/libchimara/fileref.c index d4f2043..5838996 100644 --- a/libchimara/fileref.c +++ b/libchimara/fileref.c @@ -246,11 +246,7 @@ glk_fileref_create_by_prompt(glui32 usage, glui32 fmode, glui32 rock) GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); gtk_file_chooser_set_action(GTK_FILE_CHOOSER(chooser), GTK_FILE_CHOOSER_ACTION_SAVE); - - /* COMPAT: */ -#if GTK_CHECK_VERSION(2,8,0) gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(chooser), TRUE); -#endif break; case filemode_ReadWrite: case filemode_WriteAppend: diff --git a/libchimara/input.c b/libchimara/input.c index 3a4babf..fd5aef4 100644 --- a/libchimara/input.c +++ b/libchimara/input.c @@ -143,10 +143,7 @@ text_grid_request_line_event_common(winid_t win, glui32 maxlen, gboolean insert, gtk_entry_set_has_frame(GTK_ENTRY(win->input_entry), FALSE); GtkBorder border = { 0, 0, 0, 0 }; - /* COMPAT: */ -#if GTK_CHECK_VERSION(2,10,0) gtk_entry_set_inner_border(GTK_ENTRY(win->input_entry), &border); -#endif gtk_entry_set_max_length(GTK_ENTRY(win->input_entry), win->input_length); gtk_entry_set_width_chars(GTK_ENTRY(win->input_entry), win->input_length); diff --git a/libchimara/pager.c b/libchimara/pager.c index c04553f..efb941b 100644 --- a/libchimara/pager.c +++ b/libchimara/pager.c @@ -157,13 +157,7 @@ pager_after_size_allocate(GtkTextView *textview, GdkRectangle *allocation, winid if(!win->currently_paging) { if(scroll_distance > view_height) { start_paging(win); - /* Seriously... */ - /* COMPAT: */ -#if GTK_CHECK_VERSION(2,14,0) gdk_window_invalidate_rect(gtk_widget_get_window(win->widget), NULL, TRUE); -#else - gdk_window_invalidate_rect(win->widget->window, NULL, TRUE); -#endif } } } -- 2.30.2