From f9b3fcae3998d16fdc4975e6ac4be43142bdc8bd Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Sep 05 2008 07:34:25 +0000 Subject: - Patch from svn temporarily to make compatible with GTK 2.14 (bug 461227) --- diff --git a/gtkmm-2.13.7-compile-with-gtk0214.patch b/gtkmm-2.13.7-compile-with-gtk0214.patch new file mode 100644 index 0000000..e87fe8c --- /dev/null +++ b/gtkmm-2.13.7-compile-with-gtk0214.patch @@ -0,0 +1,215 @@ +Index: gtk/src/widget.hg +=================================================================== +--- gtk/src/widget.hg (revision 1033) ++++ gtk/src/widget.hg (revision 1035) +@@ -226,9 +226,6 @@ + _WRAP_METHOD(void set_child_visible(bool is_visible = true), gtk_widget_set_child_visible) + _WRAP_METHOD(bool get_child_visible() const, gtk_widget_get_child_visible) + +-#m4 _CONVERSION(`GtkAllocation',`Allocation',`($2)(Glib::wrap(&($3)))') +- _WRAP_METHOD(Allocation get_allocation() const, gtk_widget_get_allocation) +- + _WRAP_METHOD(Glib::RefPtr get_window(), gtk_widget_get_window, refreturn) + _WRAP_METHOD(Glib::RefPtr get_window() const, gtk_widget_get_window, refreturn, constversion) + +@@ -615,7 +612,10 @@ + _MEMBER_GET(saved_state, saved_state, Gtk::StateType, guint8) + _MEMBER_GET(requisition, requisition, Requisition, GtkRequisition) + ++#m4 _CONVERSION(`GtkAllocation',`Allocation',`($2)(Glib::wrap(&($3)))') ++ _MEMBER_GET(allocation, allocation, Allocation, GtkAllocation) + ++ + _WRAP_SIGNAL(void show(),"show") + _WRAP_SIGNAL(void hide(),"hide") + +Index: gtk/src/selectiondata.ccg +=================================================================== +--- gtk/src/selectiondata.ccg (revision 1033) ++++ gtk/src/selectiondata.ccg (revision 1035) +@@ -90,18 +90,6 @@ + gdk_atom_name( gtk_selection_data_get_data_type(const_cast(gobj())) ) ); + } + +-#ifndef GTKMM_DISABLE_DEPRECATED +-const guint8* SelectionData::get_data() const +-{ +- return gobj()->data; +-} +- +-int SelectionData::get_length() const +-{ +- return gobj()->length; +-} +-#endif // GTKMM_DISABLE_DEPRECATED +- + + } // namespace Gtk + +Index: gtk/src/selectiondata.hg +=================================================================== +--- gtk/src/selectiondata.hg (revision 1033) ++++ gtk/src/selectiondata.hg (revision 1035) +@@ -86,16 +86,9 @@ + _WRAP_METHOD(Glib::StringArrayHandle get_uris() const, gtk_selection_data_get_uris) + + +- _WRAP_METHOD(const guchar* get_data(guint& length) const, gtk_selection_data_get_data) ++ _WRAP_METHOD(const guchar* get_data() const, gtk_selection_data_get_data) ++ _WRAP_METHOD(int get_length() const, gtk_selection_data_get_length) + +-#ifndef GTKMM_DISABLE_DEPRECATED +- /// @deprecated Use the get_data() method that also provides both the data and length. +- const guint8* get_data() const; +- +- /// @deprecated Use the get_data() method that also provides both the data and length. +- int get_length() const; +-#endif // GTKMM_DISABLE_DEPRECATED +- + std::string get_data_as_string() const; + + /** Retrieves the target of the selection. +Index: gtk/src/gtk_methods.defs +=================================================================== +--- gtk/src/gtk_methods.defs (revision 1033) ++++ gtk/src/gtk_methods.defs (revision 1035) +@@ -2171,6 +2171,22 @@ + ) + ) + ++(define-enum NumberUpLayout ++ (in-module "Gtk") ++ (c-name "GtkNumberUpLayout") ++ (gtype-id "GTK_TYPE_NUMBER_UP_LAYOUT") ++ (values ++ '("left-to-right-top-to-bottom" "GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_TOP_TO_BOTTOM") ++ '("left-to-right-bottom-to-top" "GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_BOTTOM_TO_TOP") ++ '("right-to-left-top-to-bottom" "GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_TOP_TO_BOTTOM") ++ '("right-to-left-bottom-to-top" "GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_BOTTOM_TO_TOP") ++ '("top-to-bottom-left-to-right" "GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_LEFT_TO_RIGHT") ++ '("top-to-bottom-right-to-left" "GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_RIGHT_TO_LEFT") ++ '("bottom-to-top-left-to-right" "GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_LEFT_TO_RIGHT") ++ '("bottom-to-top-right-to-left" "GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_RIGHT_TO_LEFT") ++ ) ++) ++ + (define-enum PageOrientation + (in-module "Gtk") + (c-name "GtkPageOrientation") +@@ -2505,6 +2521,7 @@ + '("generate-ps" "GTK_PRINT_CAPABILITY_GENERATE_PS") + '("preview" "GTK_PRINT_CAPABILITY_PREVIEW") + '("number-up" "GTK_PRINT_CAPABILITY_NUMBER_UP") ++ '("number-up-layout" "GTK_PRINT_CAPABILITY_NUMBER_UP_LAYOUT") + ) + ) + +@@ -18522,6 +18539,21 @@ + ) + ) + ++(define-method get_number_up_layout ++ (of-object "GtkPrintSettings") ++ (c-name "gtk_print_settings_get_number_up_layout") ++ (return-type "GtkNumberUpLayout") ++) ++ ++(define-method set_number_up_layout ++ (of-object "GtkPrintSettings") ++ (c-name "gtk_print_settings_set_number_up_layout") ++ (return-type "none") ++ (parameters ++ '("GtkNumberUpLayout" "number_up_layout") ++ ) ++) ++ + (define-method get_resolution + (of-object "GtkPrintSettings") + (c-name "gtk_print_settings_get_resolution") +@@ -21150,11 +21182,14 @@ + (of-object "GtkSelectionData") + (c-name "gtk_selection_data_get_data") + (return-type "const-guchar*") +- (parameters +- '("guint*" "length") +- ) + ) + ++(define-method get_length ++ (of-object "GtkSelectionData") ++ (c-name "gtk_selection_data_get_length") ++ (return-type "gint") ++) ++ + (define-method get_display + (of-object "GtkSelectionData") + (c-name "gtk_selection_data_get_display") +@@ -30422,6 +30457,11 @@ + (return-type "GType") + ) + ++(define-function gtk_number_up_layout_get_type ++ (c-name "gtk_number_up_layout_get_type") ++ (return-type "GType") ++) ++ + (define-function gtk_page_orientation_get_type + (c-name "gtk_page_orientation_get_type") + (return-type "GType") +@@ -31592,6 +31632,12 @@ + ) + ) + ++(define-method get_parent ++ (of-object "GtkWidget") ++ (c-name "gtk_widget_get_parent") ++ (return-type "GtkWidget*") ++) ++ + (define-method set_parent_window + (of-object "GtkWidget") + (c-name "gtk_widget_set_parent_window") +@@ -31601,6 +31647,12 @@ + ) + ) + ++(define-method get_parent_window ++ (of-object "GtkWidget") ++ (c-name "gtk_widget_get_parent_window") ++ (return-type "GdkWindow*") ++) ++ + (define-method set_child_visible + (of-object "GtkWidget") + (c-name "gtk_widget_set_child_visible") +@@ -31616,30 +31668,12 @@ + (return-type "gboolean") + ) + +-(define-method get_allocation +- (of-object "GtkWidget") +- (c-name "gtk_widget_get_allocation") +- (return-type "GtkAllocation") +-) +- + (define-method get_window + (of-object "GtkWidget") + (c-name "gtk_widget_get_window") + (return-type "GdkWindow*") + ) + +-(define-method get_parent +- (of-object "GtkWidget") +- (c-name "gtk_widget_get_parent") +- (return-type "GtkWidget*") +-) +- +-(define-method get_parent_window +- (of-object "GtkWidget") +- (c-name "gtk_widget_get_parent_window") +- (return-type "GdkWindow*") +-) +- + (define-method child_focus + (of-object "GtkWidget") + (c-name "gtk_widget_child_focus") diff --git a/gtkmm.spec b/gtkmm.spec index 0ee4696..3e9f68e 100644 --- a/gtkmm.spec +++ b/gtkmm.spec @@ -1,6 +1,6 @@ Name: gtkmm24 Version: 2.13.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: C++ interface for GTK2 (a GUI library for X) @@ -8,6 +8,8 @@ Group: System Environment/Libraries License: LGPLv2+ URL: http://gtkmm.sourceforge.net/ Source0: http://ftp.gnome.org/pub/GNOME/sources/gtkmm/2.10/gtkmm-%{version}.tar.bz2 +# Patch pulled from svn to make compatible with GTK 2.14 +Patch0: gtkmm-2.13.7-compile-with-gtk0214.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: glibmm24-devel >= 2.16.0 @@ -55,6 +57,18 @@ This package contains the full API documentation for %{name}. %prep %setup -q -n gtkmm-%{version} +# Temporary fixes until 2.14 is released +# All already applied in svn +%patch0 -p0 -b .svn +rm -f gtk/gtkmm/widget.* gtk/gtkmm/selectiondata.* +( cd gtk/src + for f in widget selectiondata ; do + `pkg-config --variable=gmmprocdir glibmm-2.4`/gmmproc \ + -I ../../tools/m4 --defs . $f . ../gtkmm || exit 1 + done +) +# Temporary fixes end + %build %configure %{!?_with_static: --disable-static} --enable-shared --disable-demos @@ -109,6 +123,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Sep 5 2008 Mamoru Tasaka - 2.13.7-2 +- Patch from svn temporarily to make compatible with GTK 2.14 + (bug 461227) + * Sun Aug 24 2008 Denis Leroy - 2.13.7-1 - Update to upstream 2.13.7, with pangomm split