Skip to content

Gtk3 migration

Jelle Bootsma edited this page May 4, 2021 · 13 revisions

GTK 2 -> 3

GNOME Migration guide

  • All preparation steps seem to work already (so we hopefully only have to look at the time of migration sections)
  • Building with Gtk3 gives no errors during cmake preparations (simply remove libgtk2 and install libgtk3)

Known current issues

  • GtkRuler is not supported. Best idea is probably to look at some other opensource project which used GtkRuler and ported it to gtk3 (Inkscape)
  • Build files with specific errors for Scroom and GtkRuler
  • (4-5-21) GTKRuler3 now has no build errors, but has not been tested yet repo

Changes during migration (Only done for Scroom and not Canon plugin)

  • Replace size_request by get_preferred_width/height
    • Found nothing
  • Replace GdkRegion by cairo_region_t
    • GdkRectangle
    • gdk_region_get_clipbox()
    • gdk_region_destroy()
  • Replace GdkPixmap by cairo surfaces
    • Found nothing
  • Replace GdkColormap by GdkVisual
    • Found nothing
  • GdkDrawable is gone
    • There are two files still using GDK_Drawable_get_visible: gui/source 448 & libs/tiled-bitmaps/tools 26. Change needed to use GDK_window instead
  • Event filtering
    • Found nothing
  • Backend-specific code
    • Found nothing
  • GtkPlug and GtkSocket
    • Found nothing
  • The GtkWidget::draw signal
    • Already uses Cairo but not sure if its compatible with GTK 3
  • GtkProgressBar orientation
    • Found nothing
  • Check your expand and fill flags
    • ???
  • Scrolling changes
    • Found nothing
  • GtkObject is gone
    • Found nothing
  • GtkEntryCompletion signal parameters
    • Found nothing
  • Resize grips
    • Found nothing

Clone this wiki locally