Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrating from gtk3 to gtk4 #353

Draft
wants to merge 26 commits into
base: ui-modernization
Choose a base branch
from

Conversation

sudipshil9862
Copy link
Collaborator

No description provided.

sshil added 4 commits June 19, 2024 11:22
@sudipshil9862
Copy link
Collaborator Author

sudipshil9862 commented Jul 10, 2024

  • all gtk3 code deletion towards migration to gtk4
  • introduced libadwaita for giving gnome-abrt a modern look
  • it is not able to find system issues and also system issue are not getting in "System" rowbuttons in gtkstackswitcher - or completely delete gtkstackswitcher
  • box_header_left width should change as same as box_panel_left and they should have a minimum similar width so that one cannot reduce the width more than minimum width
  • box_panel_left left pane should not change window size while resizing and resize restriction for left pane box_panel_left
  • deleting a row keeps a blank space
  • preferences button in hamburger menu crashing - delete it for now as per discussion
  • details button crashing - delete it for now as per discussion
  • fix: selecting multiple rows is not possible in multi toggle button - or delete multiple row deletion as per discussion
  • dark mode - as per system theme
  • copy problem id in clipboard by ctrl+c signal should work
  • how many times problem apeared - appearence changed into two different location - one in left pane and one in right pane
  • search icon, search entry postion and give modern look

@msrb
Copy link
Member

msrb commented Jul 22, 2024

Just for the record, I was looking into this on Friday, but I am getting the following error when trying to run the app:

(gnome-abrt:7147): Gtk-CRITICAL **: 05:02:53.929: Error building template class 'OopsWindow' for an instance of type 'OopsWindow': .:0:0 Invalid property: GtkHeaderBar.show-close-button
ERROR:root:'NoneType' object has no attribute 'set_placeholder'
Traceback (most recent call last):
  File "/home/michal/projects/abrt/gnome-abrt/build/src/gnome-abrt", line 208, in do_activate
    main_window = OopsWindow(self, self.all_sources, controller)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/michal/projects/abrt/gnome-abrt/build/src/gnome_abrt/views.py", line 365, in __init__
    self.lb_problems.set_placeholder(label)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'set_placeholder'
FAILED: meson-internal__run 
env MESON_SOURCE_ROOT=/home/michal/projects/abrt/gnome-abrt MESON_BUILD_ROOT=/home/michal/projects/abrt/gnome-abrt/build MESON_SUBDIR= 'MESONINTROSPECT=/usr/bin/meson introspect' src/gnome-abrt
ninja: build stopped: subcommand failed.

I am still looking into it ;)

@sudipshil9862
Copy link
Collaborator Author

sudipshil9862 commented Jul 23, 2024

The error occurs because lb_problems is not being properly initialized when running ninja -C build run. This can happen if the UI is not fully loaded.

The error does not occur when you run ninja -C build install followed by ninja -C build run, because installing the application likely sets up the environment and resources correctly before running the application.

This is just my assumption. But worked for me.

@mike-fabian
Copy link
Contributor

Just for the record, I was looking into this on Friday, but I am getting the following error when trying to run the app:

(gnome-abrt:7147): Gtk-CRITICAL **: 05:02:53.929: Error building template class 'OopsWindow' for an instance of type 'OopsWindow': .:0:0 Invalid property: GtkHeaderBar.show-close-button
ERROR:root:'NoneType' object has no attribute 'set_placeholder'
Traceback (most recent call last):
  File "/home/michal/projects/abrt/gnome-abrt/build/src/gnome-abrt", line 208, in do_activate
    main_window = OopsWindow(self, self.all_sources, controller)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/michal/projects/abrt/gnome-abrt/build/src/gnome_abrt/views.py", line 365, in __init__
    self.lb_problems.set_placeholder(label)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'set_placeholder'
FAILED: meson-internal__run 
env MESON_SOURCE_ROOT=/home/michal/projects/abrt/gnome-abrt MESON_BUILD_ROOT=/home/michal/projects/abrt/gnome-abrt/build MESON_SUBDIR= 'MESONINTROSPECT=/usr/bin/meson introspect' src/gnome-abrt
ninja: build stopped: subcommand failed.

I am still looking into it ;)

That error occurs because the old Gtk3 gnome-abrt rpm package is installed and has the file /usr/share/gnome-abrt/org.freedesktop.GnomeAbrt.gresource which contains the UI files.

When running from the git checkout with ninja -C build run, that file is still read from /usr/share/gnome-abrt/org.freedesktop.GnomeAbrt.gresource, not the new file for the Gtk4 UI from ./build/data/org.freedesktop.GnomeAbrt.gresource.

To make it run, it is enough to install that single file:

sudo mkdir -p /usr/share/gnome-abrt/ && sudo cp ./build/data/org.freedesktop.GnomeAbrt.gresource /usr/share/gnome-abrt/

@sudipshil9862
Copy link
Collaborator Author

when we press ctrl+c by selecting any word, was it trying to copy the problem id instead of that word ?

on_gac_copy_id_activate
    (Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
     ^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/gi/overrides/__init__.py", line 31, in __getattr__
    return getattr(self._introspection_module, name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/gi/module.py", line 130, in __getattr__
    raise AttributeError("%r object has no attribute %r" % (
AttributeError: 'gi.repository.Gtk' object has no attribute 'Clipboard'

@sudipshil9862
Copy link
Collaborator Author

  • all gtk3 code deletion towards migration to gtk4
  • introduced libadwaita for giving gnome-abrt a modern look
  • it is not able to find system issues and also system issue are not getting in "System" rowbuttons in gtkstackswitcher - or completely delete gtkstackswitcher
  • box_header_left width should change as same as box_panel_left and they should have a minimum similar width so that one cannot reduce the width more than minimum width
  • box_panel_left left pane should not change window size while resizing and resize restriction for left pane box_panel_left
  • deleting a row keeps a blank space
  • preferences button in hamburger menu crashing - delete it for now as per discussion
  • details button crashing - delete it for now as per discussion
  • fix: selecting multiple rows is not possible in multi toggle button - or delete multiple row deletion as per discussion
  • dark mode - as per system theme
  • copy problem id in clipboard by ctrl+c signal should work
  • how many times problem apeared - appearence changed into two different location - one in left pane and one in right pane
  • search icon, search entry postion and give modern look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants