darktable icon indicating copy to clipboard operation
darktable copied to clipboard

Gtk4 Migration - Progress

Open Christian-Kr opened this issue 2 years ago • 5 comments

Hello to everyone,

just to document the state of migration, if anyone wants to help. For now, I will just use the migration documentation on https://docs.gtk.org/gtk4/migrating-3to4.html as a todo list. Just because that is, how I will handle it. So everyone can see how far I am/we are. The list might be incomplete and filled with time. Feel free to edit it with care.

Also, feel free to reopen tasks, if you think they are not solved cause of whatever reason. If for one point exist one or more pr that include the whole work, close the point here with reference to the pr(s). It would be awesome if anyone writes a note to a task she/he is working on. I would suggest to take care of every point, also if one point might be obviously checked. It is just that we have everything in mind.

At the point of starting with the hard migration, it might be helpful to have an separate branch for it centrally and not in everyone fork repo.

If this issue will be accepted for documentation, #13236 might be closed with reference to this entry.

Last point: This is just a suggestion how this work might be done or and tracked.

Edit: 24.02.2024 - No inactivity.

Preparation in GTK 3.x

  • [x] Do not use deprecated symbols Checked it and couldn't find any deprecated symbols. Please anyone verify! (Feels a little bit uncertain that no dep symbol is in use. Maybe I just did something wrong.) (Done-by: @Christian-Kr; Date: 21.12.2023)
  • [x] Enable diagnostic warnings #15898 (Done-by: @Christian-Kr; Date: 21.12.2023)
  • [ ] Do not use GTK-specific command line arguments Couldn't find any use of it, but I am not sure.
  • [ ] Do not use widget style properties In code I only found vertical-separator in gtk.c on line 3238. I don't know how to get this value without properties in gtk3. The effect is not big if it will be removed. Mostly the scrolling is not exactly one row.
  • [x] Review your window creation flags Couldn't find any. (Done-by: @Christian-Kr; Date: 21.12.2023)
  • [ ] Stop using direct access to GdkEvent structs
  • [x] Stop using gdk_pointer_warp() Couldn't find any. (Done-by: @Christian-Kr; Date: 21.12.2023)
  • [ ] Stop using non-RGBA visuals
  • [x] Stop using gtk_widget_set_app_paintable #15908 (Done-by: @Christian-Kr; Date: 21.12.2023)
  • [x] Stop using GtkBox padding, fill and expand child properties Couldn't find any. (Done-by: @Christian-Kr; Date: 21.12.2023)
  • [x] Stop using the state argument of GtkStyleContext getters Couldn't find any. (Done-by: @Christian-Kr; Date: 21.12.2023)
  • [x] Stop using gdk_pixbuf_get_from_window() and gdk_cairo_set_source_window() Couldn't find any. (Done-by: @Christian-Kr; Date: 21.12.2023)
  • [ ] Stop using GtkButton's image-related API
  • [ ] Stop using GtkWidget event signals #15923 (Progress-by: @Christian-Kr; Date: 21.12.2023)
  • [ ] Set proper application ID
  • [ ] Stop using gtk_main() and related APIs
  • [ ] Reduce the use of gtk_widget_destroy()
  • [ ] Stop using the GtkWidget.destroy vfunc
  • [ ] Reduce the use of generic container APIs
  • [ ] Review your use of icon resources

Changes that need to be done at the time of the switch

  • [ ] Subclassing
  • [ ] Life-cycle handling
  • [ ] Stop using GdkScreen
  • [ ] Stop using the root window
  • [ ] Stop using GdkVisual
  • [ ] Stop using GdkDeviceManager
  • [ ] Adapt to GdkWindow API changes
  • [ ] The "Iconified" window state has been renamed to "minimized"
  • [ ] Adapt to GdkEvent API changes
  • [ ] Stop using grabs
  • [ ] Adapt to coordinate API changes
  • [ ] Adapt to GdkKeymap API changes
  • [ ] Adapt to changes in keyboard modifier handling
  • [ ] Replace GtkClipboard with GdkClipboard
  • [ ] Stop using gtk_get_current_... APIs
  • [ ] Convert your UI files
  • [ ] Adapt to GtkBuilder API changes
  • [ ] Adapt to event controller API changes
  • [ ] Focus handling changes
  • [ ] Use the new apis for keyboard shortcuts
  • [ ] Stop using GtkEventBox
  • [ ] Stop using GtkButtonBox
  • [ ] Adapt to GtkBox API changes
  • [ ] Adapt to GtkWindow API changes
  • [ ] Adapt to GtkHeaderBar and GtkActionBar API changes
  • [ ] Adapt to GtkStack, GtkAssistant and GtkNotebook API changes
  • [ ] Adapt to GtkScrolledWindow API changes
  • [ ] Adapt to GtkBin removal
  • [ ] Adapt to GtkContainer removal
  • [ ] Stop using GtkContainer::border-width
  • [ ] Adapt to gtk_widget_destroy() removal
  • [ ] Adapt to coordinate API changes
  • [ ] Adapt to GtkStyleContext API changes
  • [ ] Adapt to GtkCssProvider API changes
  • [ ] Stop using GtkShadowType and GtkRelief properties
  • [ ] Adapt to GtkWidget's size request changes
  • [ ] Adapt to GtkWidget's size allocation changes
  • [ ] Switch to GtkWidget's children APIs
  • [ ] Don't use -gtk-gradient in your CSS
  • [ ] Don't use -gtk-icon-effect in your CSS
  • [ ] Don't use -gtk-icon-theme in your CSS
  • [ ] Don't use -gtk-outline-...-radius in your CSS
  • [ ] Adapt to drawing model changes
  • [ ] Stop using APIs to query GdkSurfaces
  • [ ] Widgets are now visible by default
  • [ ] Adapt to changes in animated hiding and showing of widgets
  • [ ] Stop passing commandline arguments to gtk_init
  • [ ] GdkPixbuf is deemphasized
  • [ ] GtkWidget event signals are removed
  • [ ] Invalidation handling has changed
  • [ ] Stop using GtkWidget::draw
  • [ ] Window content observation has changed
  • [ ] Monitor handling has changed
  • [ ] Adapt to monitor API changes
  • [ ] Adapt to cursor API changes
  • [ ] Adapt to icon size API changes
  • [ ] Adapt to changes in the GtkAssistant API
  • [ ] Adapt to changes in the API of GtkEntry, GtkSearchEntry and GtkSpinButton
  • [ ] Adapt to changes in GtkOverlay API
  • [ ] Use GtkFixed instead of GtkLayout
  • [ ] Adapt to search entry changes
  • [ ] Adapt to GtkScale changes
  • [ ] Stop using gtk_window_active_default()
  • [ ] Stop using gtk_widget_grab_default()
  • [ ] Stop setting ::has-default and ::has-focus in .ui files
  • [ ] Stop using the GtkWidget::display-changed signal
  • [ ] GtkPopover::modal has been renamed to autohide
  • [ ] gtk_widget_get_surface has been removed
  • [ ] gtk_widget_is_toplevel has been removed
  • [ ] gtk_widget_get_toplevel has been removed
  • [ ] GtkEntryBuffer ::deleted-text has changed
  • [ ] GtkMenu, GtkMenuBar and GtkMenuItem are gone
  • [ ] GtkToolbar has been removed
  • [ ] GtkAspectFrame is no longer a frame
  • [ ] Stop using custom tooltip windows
  • [ ] Switch to the new Drag-and-Drop api
  • [ ] Adapt to GtkIconTheme API changes
  • [ ] Adapt to GtkImage changes
  • [ ] Update to GtkFileChooser API changes
  • [ ] Stop using blocking dialog functions
  • [ ] Stop using GtkBuildable API
  • [ ] Adapt to GtkAboutDialog API changes
  • [ ] Adapt to GtkTreeView and GtkIconView tooltip context changes
  • [ ] Adapt to GtkPopover changes
  • [ ] Stop using GtkFileChooserButton
  • [ ] Adapt to changed GtkSettings properties
  • [ ] Changes to consider after the switch
  • [ ] Consider porting to the new list widget

Christian-Kr avatar Dec 21 '23 07:12 Christian-Kr

@Christian-Kr : Thanks, I have added the gtk4 label and pinned this issue.

TurboGit avatar Dec 21 '23 08:12 TurboGit

This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

github-actions[bot] avatar Feb 21 '24 00:02 github-actions[bot]

@TurboGit:

Removed assignment accidently. Just assign me again please.

Christian-Kr avatar Feb 24 '24 07:02 Christian-Kr

Done!

TurboGit avatar Feb 24 '24 08:02 TurboGit

This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

github-actions[bot] avatar Apr 25 '24 00:04 github-actions[bot]

This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

github-actions[bot] avatar Aug 03 '24 00:08 github-actions[bot]