Skip to content

Allow close keyboard shortcut to close the window when empty#709

Open
mdeslaur wants to merge 1 commit intomate-desktop:masterfrom
mdeslaur:window-close
Open

Allow close keyboard shortcut to close the window when empty#709
mdeslaur wants to merge 1 commit intomate-desktop:masterfrom
mdeslaur:window-close

Conversation

@mdeslaur
Copy link
Contributor

When there are no open tabs, the close keyboard shortcut was being disabled. This change allows the shortcut to close the main window when no tabs are open, matching the behaviour in other applications that use tabs, such as Firefox.

When there are no open tabs, the close keyboard shortcut was being
disabled. This change allows the shortcut to close the main window
when no tabs are open, matching the behaviour in other applications
that use tabs, such as Firefox.
Copy link
Member

@vkareh vkareh left a comment

Choose a reason for hiding this comment

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

Simple and works well, thanks! However, there's an inconsistency with saved sessions that needs to be addressed.

!(window->priv->state & PLUMA_WINDOW_STATE_SAVING) &&
!(window->priv->state & PLUMA_WINDOW_STATE_PRINTING));

gtk_action_group_set_sensitive (window->priv->close_action_group,
Copy link
Member

Choose a reason for hiding this comment

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

There's already a call to toggle sensitivity of close_action_group below in this same function. Can you make sure you consolidate the conditionals to avoid one undoing the other? Otherwise the close action can get re-disabled with zero tabs after leaving a session-save state.

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.

2 participants