Skip to content

Add New Window and Close menu items with keyboard shortcuts - #248

Open
vkareh wants to merge 3 commits into
masterfrom
new-window-menu-item
Open

vkareh wants to merge 3 commits into
masterfrom
new-window-menu-item

Conversation

@vkareh

@vkareh vkareh commented Jun 30, 2026

Copy link
Copy Markdown
Member

Add multi-window support to the Calculator menu. A "New Window" item with Ctrl+N opens a fresh window with settings loaded from GSettings, reusing the existing application activate handler. A "Close" item with Ctrl+W closes only the current window. Quit (Ctrl+Q) now destroys all open windows to properly terminate the application.

Fixes: #247

Assisted-by: OpenCode:claude-opus-4.6

@vkareh
vkareh requested a review from a team June 30, 2026 19:14

@lukefromdc lukefromdc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Trying to run a build of this from terminal, I got these warnings and the application window did not show up though the program continued to run rather than exiting or crashing:


50921$ mate-calc

(mate-calc:366463): GLib-GObject-CRITICAL **: 02:09:33.580: specified class size for type 'MathWindow' is smaller than the parent type's 'GtkApplicationWindow' class size

(mate-calc:366463): GLib-GObject-CRITICAL **: 02:09:33.580: cannot add private field to invalid (non-instantiatable) type '<invalid>'

(mate-calc:366463): GLib-CRITICAL **: 02:09:33.580: g_once_init_leave_pointer: assertion 'result != 0' failed

(mate-calc:366463): GLib-GObject-CRITICAL **: 02:09:33.580: g_object_new_valist: assertion 'G_TYPE_IS_OBJECT (object_type)' failed

** (mate-calc:366463): CRITICAL **: 02:09:33.580: math_window_get_buttons: assertion 'window != NULL' failed

(mate-calc:366463): GLib-GObject-CRITICAL **: 02:09:33.580: invalid (NULL) pointer instance

(mate-calc:366463): GLib-GObject-CRITICAL **: 02:09:33.580: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

** (mate-calc:366463): CRITICAL **: 02:09:33.580: math_window_set_show_history: assertion 'window != NULL' failed

** (mate-calc:366463): CRITICAL **: 02:09:33.580: math_buttons_set_programming_base: assertion 'buttons != NULL' failed

** (mate-calc:366463): CRITICAL **: 02:09:33.580: math_buttons_set_mode: assertion 'buttons != NULL' failed

(mate-calc:366463): Gtk-CRITICAL **: 02:09:33.580: gtk_widget_show: assertion 'GTK_IS_WIDGET (widget)' failed

@vkareh
vkareh force-pushed the new-window-menu-item branch from f198a2a to cd6756c Compare November 27, 2026 21:12
Add multi-window support to the Calculator menu. A "New Window" item
with Ctrl+N opens a fresh window with settings loaded from GSettings,
reusing the existing application activate handler. A "Close" item with
Ctrl+W closes only the current window. Quit (Ctrl+Q) now destroys all
open windows to properly terminate the application.

Fixes: #247

Assisted-by: OpenCode:claude-opus-4.6
@vkareh
vkareh force-pushed the new-window-menu-item branch from cd6756c to 9453a5b Compare November 27, 2026 23:34
@vkareh
vkareh requested a review from lukefromdc November 27, 2026 23:34

This branch has not been deployed

No deployments
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.

Feature Request: New Window Button in the Menu bar + Keyboard Shortcut

2 participants