Ticket #1239 (closed defect: fixed)

Opened 6 years ago

Last modified 4 years ago

build errors with gtk 2.14

Reported by: guest Owned by: somebody
Priority: normal Milestone: 0.12.0
Component: general (Gtk+, Glib) Version:
Keywords: Cc: matti.j.eskelinen@…


When building gtk-0.12.1 on an old fedora install with gtk2.14, there are a few 'not in scope' errors due to compile flags that can be fixed easily. Mainly the problem seems to be, that some declarations are included only when gtk version is 2.16, but then some other declarations requiring them are not surrounded with similar #if statements. By adding a few #if statements, I could compile successfully.

First, Graphics/UI/Gtk/Entry/Entry.chs, around line 153: EntryIconPosition? is only defined with gtk2.16: #if GTK_CHECK_VERSION(2,16,0) import Graphics.UI.Gtk.General.Enums (DeleteType? (..), MovementStep? (..), EntryIconPosition? (..)) #else import Graphics.UI.Gtk.General.Enums (DeleteType? (..), MovementStep? (..)) #endif

Second, Graphics/UI/Gtk/Printing/PrintSettings.chs, around line 128: Some functions are defined only with gtk2.16, but the functions are used in some attrs that are not wrapped in #if statements: #if GTK_CHECK_VERSION(2,16,0)

printSettingsScale, printSettingsPrintPages,

#endif ... and around line 1000: #if GTK_CHECK_VERSION(2,16,0) -- | The value of 'PrintSettingsScale?'. printSettingsScale :: PrintSettingsClass? self => Attr self Double printSettingsScale = newAttr

printSettingsGetScale printSettingsSetScale

-- | The value of 'PrintSettingsPrintPages?'. printSettingsPrintPages :: PrintSettingsClass? self => Attr self PrintPages? printSettingsPrintPages = newAttr

printSettingsGetPrintPages printSettingsSetPrintPages


Change History

Changed 4 years ago by dmwit

  • status changed from new to closed
  • resolution set to fixed

The first suggestion has been implemented. The second won't be, as the documentation says the print settings scale and print_pages functions have been available since gtk 2.10, hence is in all the officially supported versions of gtk.

Note: See TracTickets for help on using tickets.