Skip to content

Conversation

@mtwebster
Copy link
Member

  • 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.
@mtwebster mtwebster requested a review from Copilot December 15, 2025 23:59
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
<property name="modal">True</property>

Copilot uses AI. Check for mistakes.
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="can-focus">False</property>
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
<property name="can-focus">False</property>
<property name="can-focus">True</property>

Copilot uses AI. Check for mistakes.
<property name="can-focus">False</property>
<property name="margin-top">4</property>
<property name="spacing">6</property>
<property name="homogeneous">True</property>
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
<property name="homogeneous">True</property>
<property name="homogeneous">False</property>

Copilot uses AI. Check for mistakes.
Comment on lines +1167 to +1170
// 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);
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
return True
return False
Gtk.main_quit()
return True
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
return True

Copilot uses AI. Check for mistakes.
@mtwebster mtwebster marked this pull request as draft December 16, 2025 00:08
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.

1 participant