Skip to content
Browse files

[gtk2] fix require failure with GTK+ < 2.14.

[ruby-gnome2-devel-en] NameError: undefined method `color_selection' for class `Gtk::ColorSelectionDialog'
Reported by grant schoep. Thanks!!!
  • Loading branch information...
1 parent b51a56f commit 21224f5d8d1673c7373752253c7f5c3d3ecb5baa @kou kou committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 gtk2/ext/gtk2/rbgtkcolorselectiondialog.c
View
4 gtk2/ext/gtk2/rbgtkcolorselectiondialog.c
@@ -36,13 +36,15 @@ rg_initialize(int argc, VALUE *argv, VALUE self)
return Qnil;
}
-void
+void
Init_gtk_color_selection_dialog(VALUE mGtk)
{
VALUE RG_TARGET_NAMESPACE = G_DEF_CLASS(GTK_TYPE_COLOR_SELECTION_DIALOG,
"ColorSelectionDialog", mGtk);
RG_DEF_METHOD(initialize, -1);
+#if GTK_CHECK_VERSION(2, 14, 0)
/* NOTE: Backward compatibility */
RG_DEF_ALIAS("colorsel", "color_selection");
+#endif
}

0 comments on commit 21224f5

Please sign in to comment.
Something went wrong with that request. Please try again.