[WIP] action layout editor: Port to C and make accessible via gobject-introspection.#3653
[WIP] action layout editor: Port to C and make accessible via gobject-introspection.#3653mtwebster wants to merge 1 commit intolinuxmint:masterfrom
Conversation
mtwebster
commented
Dec 15, 2025
- This allows it to integrate directly into nemo's preferences. We give its own tab now, not shared with extensions.
- The existing python version becomes a wrapper around this, via introspection.
- This lets us integrate directly into cinnamon's Action settings as well.
introspection. - This allows it to integrate directly into nemo's preferences. We give its own tab now, not shared with extensions. - The existing python version becomes a wrapper around this, via introspection. - This lets us integrate directly into cinnamon's Action settings as well.
There was a problem hiding this comment.
Pull request overview
This pull request ports the Nemo action layout editor from Python to C and makes it accessible via GObject introspection. The changes enable direct integration into Nemo's preferences dialog with its own dedicated tab, while the Python version becomes a wrapper around the new C implementation.
Key Changes:
- Ported action layout editor from Python to C with GObject introspection support
- Integrated editor directly into Nemo preferences with dedicated "Actions" tab
- Separated Extensions and Actions into distinct preference tabs
- Removed standalone plugin manager in favor of individual config widgets
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| libnemo-extension/nemo-action-layout-editor.c | New C implementation of action layout editor (~2700 lines) |
| libnemo-extension/nemo-action-layout-editor.h | Header file defining the new widget type |
| action-layout-editor/nemo_action_layout_editor.py | Converted to wrapper around C implementation via introspection |
| src/nemo-file-management-properties.c | Added actions page setup and renamed plugin page to extensions |
| gresources/nemo-file-management-properties.glade | Added new Actions tab and renamed Plugins to Extensions |
| src/nemo-plugin-manager.c/h | Removed - functionality split into individual widgets |
| libnemo-extension/meson.build | Added new source files and test executable |
| gresources/nemo-action-layout-editor.glade | Updated for embedding as widget rather than standalone window |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <object class="GtkWindow" id="file_management_dialog"> | ||
| <property name="can-focus">False</property> | ||
| <property name="title" translatable="yes">File Management Preferences</property> | ||
| <property name="modal">True</property> |
There was a problem hiding this comment.
Making the preferences dialog modal may be problematic without a proper parent window. This can block interaction with the entire application unexpectedly. Consider whether this should be modal, especially given that the parent window is now being passed as NULL in the code.
| <property name="modal">True</property> |
| <object class="GtkScrolledWindow"> | ||
| <property name="visible">True</property> | ||
| <property name="can-focus">True</property> | ||
| <property name="can-focus">False</property> |
There was a problem hiding this comment.
The scrolled window containing the treeview has can-focus set to False, which may prevent keyboard navigation from working properly. The scrolled window should typically be focusable to allow keyboard scrolling.
| <property name="can-focus">False</property> | |
| <property name="can-focus">True</property> |
| <property name="can-focus">False</property> | ||
| <property name="margin-top">4</property> | ||
| <property name="spacing">6</property> | ||
| <property name="homogeneous">True</property> |
There was a problem hiding this comment.
Setting the button box to homogeneous will make all buttons (Save, Cancel changes, Default layout) the same width, which may look odd when the button labels have significantly different lengths. Consider using natural sizing instead.
| <property name="homogeneous">True</property> | |
| <property name="homogeneous">False</property> |
| // FIXME: bad string for translation | ||
| gchar *message = g_strdup_printf ( | ||
| _("This key combination is already in use by another action:\n\n<b>%s</b>\n\nDo you want to replace it?"), | ||
| label); |
There was a problem hiding this comment.
The FIXME comment indicates this string is bad for translation. The issue is likely the embedded markup and newlines. Consider splitting this into separate translatable strings or using g_markup_printf_escaped with a cleaner format string.
| return True | ||
| return False | ||
| Gtk.main_quit() | ||
| return True |
There was a problem hiding this comment.
The quit() method returns True after calling Gtk.main_quit(), but this return value is meaningless since the main loop will exit. The return statement should likely be removed or changed to return False/None.
| return True |