Skip to content

Draft: GSoC 2022: GTK4 Port

Aryan Kaushik requested to merge Aryan20/pitivi:GTK4-port into master

Update Pitivi to use GTK4 instead of GTK3

For anyone who wants to work on the GTK4 port of Pitivi, in the https://gitlab.gnome.org/Aryan20/pitivi/ repo there are 2 branches

  1. GTK4-port1, corresponding to this MR
  2. stashed_bypasses, basically the same but it includes a commit called "Add stashed bypasses" on top of the GTK4-port commits, containing all the necessary hacks to be able to run the application. They are there just so that you can open the application to check if things work. Eventually all bypasses will be properly fixed on GTK4-port.

The official porting guide is at https://docs.gtk.org/gtk4/migrating-3to4.html

Remaining tasks to be done, high priority:

  • GtkLayout replacement required - Guide Link
  • Implement Drag and Drop EventController - Guide Link
  • Viewer (Reliant on GtkSink port)
  • GtkPopover - Guide Link

Low priority:

  • Drop the use of Dialog.run (Partially done) - Guide Link
    • pitivi/dialogs/missingasset.py: MissingAssetDialog.get_new_uri()
    • pitivi/editorperspective.py: EditorPerspective._project_manager_closing_project_cb()
    • pitivi/editorperspective.py: EditorPerspective._project_manager_reverting_to_saved_cb()
    • pitivi/editorperspective.py: EditorPerspective._show_save_screenshot_dialog()
    • pitivi/mainwindow.py: MainWindow.__preferences_cb trivial
    • pitivi/project.py: ProjectManager._restore_from_backup_dialog()
  • Adapt to GtkHeaderBar API changes - Guide Link
    • headerbar.props.title_widget = os.path.basename(self.asset.props.id) - we must assign a Gtk.Label.new(asset_name) as title_widget, not a string.
  • Drop use of GdkScreen - Guide Link
  • Update to GtkFileChooser API changes - Guide Link
  • Replace "configure-event" and "size-allocate" signals
  • GdkPixbuf is deemphasized, causing sizing issues and type mismatches (Partially done) - Guide Link
  • Symbolic icons colour change issue - Guide Link
  • Fix Unittests
  • Fix Interactive Intro (Reliant on GtkPopover changes)

Done:

  • Replace GtkButtonBox, GtkEventBox, GtkAlignment
  • Drop Stock Buttons
  • Replace GtkBox expand and fill properties
  • Remove "app_paintable"
  • Change dependency to GTK4
  • Replace pack_start and pack_end
  • Implement new cursor API
  • Remove GtkBin
  • Replace FIleChooserButton
  • Implement GtkIconTheme changes
  • Update matplotlib dependency to GTK4 backend
  • Update to new GtkButton Image API
  • Implement GtkHeaderBar API changes
  • Replace GtkPaned API, GtkToolBar, GtkContainer
  • Implement GtkSearchEntry changes
  • Implement GtkInfoBar changes
  • Connect GtkBuildable signals at initialization
  • Implement GtkScrolledWindow changes
  • Replace GtkShadowType, GtkRelief, GtkPopover::modal, set_line_wrap, use_action_appearance properties
  • Implement GtkSpinButton API changes
  • Drop use of show_all()
  • Implement new GtkIconSize
  • Replace AtkObject
  • Remove packing elements in UI files
  • Implement GtkLabel changes
  • Drop use of "visible_window"
  • Drop use of GtkActionGroup
  • Implement GtkMenuButton changes
  • Change version in AboutWindow
  • Adapt to GDateTime changes
  • Implement GtkPopoverMenu changes
  • Replace delete-event
  • Implement GtkCheckBox and GtkRadioButton changes
  • Use Gfile in FileChooser
  • Implement GtkStyleContext API changes
  • Replace GTK_STYLE_CLASS_*
  • Implement draw-value changes for scale
  • Implement GtkEventController
Edited by Alexandru Băluț

Merge request reports