Application: Adds null to end the array of const strings[] #144

Merged
tarmaciltur merged 2 commits from 143-every-accels-trigrers-app.automatic-switch-cameras-action into master 2026-06-24 12:09:29 -03:00
Owner

This PR adds null terminator to accel's const string[]. Without the null terminator all accels are added to every action.

This PR adds null terminator to accel's const string[]. Without the null terminator all accels are added to every action.
Application: Adds null to end the array of const strings[]
Some checks failed
Flatpak Build and Publish / flatpak-bundle-aarch64 (push) Successful in 1m19s
Flatpak Build and Publish / flatpak-bundle-x86_64 (push) Has been cancelled
Flatpak Build and Publish / flatpak-repo-pages (push) Has been cancelled
7ec461489b
application: Moves the add_action_entries call to a proper place
All checks were successful
Flatpak Build and Publish / flatpak-bundle-aarch64 (push) Successful in 1m16s
Flatpak Build and Publish / flatpak-bundle-x86_64 (push) Successful in 7m31s
Flatpak Build and Publish / flatpak-repo-pages (push) Has been skipped
b83cc58b01

This will also fix the accels issue.

construct {
            ActionEntry[] action_entries = {
                { "about", this.on_about_action },
                { "automatic-switch-cameras", this.automatic_switch_cameras_action },
                { "settings", this.on_settings_action },
                { "up-volume", this.on_up_volume_button_pressed },
                { "down-volume", this.on_down_volume_button_pressed },
                { "previous-camera", this.on_clicked_previous_camera_button },
                { "next-camera", this.on_clicked_next_camera_button },
                { "quit", this.quit }
            };

            this.add_action_entries (action_entries, this);
            this.set_accels_for_action ("app.automatic-switch-cameras", { "<control>a" });
            this.set_accels_for_action ("app.up-volume", { "Up" });
            this.set_accels_for_action ("app.down-volume", { "Down" });
            this.set_accels_for_action ("app.previous-camera", { "Left" });
            this.set_accels_for_action ("app.next-camera", { "Right" });
            this.set_accels_for_action ("app.settings", { "<control>s" });
            this.set_accels_for_action ("app.quit", { "<control>q" });
        }
This will also fix the accels issue. ```vala construct { ActionEntry[] action_entries = { { "about", this.on_about_action }, { "automatic-switch-cameras", this.automatic_switch_cameras_action }, { "settings", this.on_settings_action }, { "up-volume", this.on_up_volume_button_pressed }, { "down-volume", this.on_down_volume_button_pressed }, { "previous-camera", this.on_clicked_previous_camera_button }, { "next-camera", this.on_clicked_next_camera_button }, { "quit", this.quit } }; this.add_action_entries (action_entries, this); this.set_accels_for_action ("app.automatic-switch-cameras", { "<control>a" }); this.set_accels_for_action ("app.up-volume", { "Up" }); this.set_accels_for_action ("app.down-volume", { "Down" }); this.set_accels_for_action ("app.previous-camera", { "Left" }); this.set_accels_for_action ("app.next-camera", { "Right" }); this.set_accels_for_action ("app.settings", { "<control>s" }); this.set_accels_for_action ("app.quit", { "<control>q" }); } ```
Author
Owner

@ariktaurendil wrote in #144 (comment):

This will also fix the accels issue.

construct {
            ActionEntry[] action_entries = {
                { "about", this.on_about_action },
                { "automatic-switch-cameras", this.automatic_switch_cameras_action },
                { "settings", this.on_settings_action },
                { "up-volume", this.on_up_volume_button_pressed },
                { "down-volume", this.on_down_volume_button_pressed },
                { "previous-camera", this.on_clicked_previous_camera_button },
                { "next-camera", this.on_clicked_next_camera_button },
                { "quit", this.quit }
            };

            this.add_action_entries (action_entries, this);
            this.set_accels_for_action ("app.automatic-switch-cameras", { "<control>a" });
            this.set_accels_for_action ("app.up-volume", { "Up" });
            this.set_accels_for_action ("app.down-volume", { "Down" });
            this.set_accels_for_action ("app.previous-camera", { "Left" });
            this.set_accels_for_action ("app.next-camera", { "Right" });
            this.set_accels_for_action ("app.settings", { "<control>s" });
            this.set_accels_for_action ("app.quit", { "<control>q" });
        }

That will make gcc throw several warnings.

@ariktaurendil wrote in https://softwareperonista.com.ar/p/vigilantear/pulls/144#issuecomment-1322: > This will also fix the accels issue. > > ```vala > construct { > ActionEntry[] action_entries = { > { "about", this.on_about_action }, > { "automatic-switch-cameras", this.automatic_switch_cameras_action }, > { "settings", this.on_settings_action }, > { "up-volume", this.on_up_volume_button_pressed }, > { "down-volume", this.on_down_volume_button_pressed }, > { "previous-camera", this.on_clicked_previous_camera_button }, > { "next-camera", this.on_clicked_next_camera_button }, > { "quit", this.quit } > }; > > this.add_action_entries (action_entries, this); > this.set_accels_for_action ("app.automatic-switch-cameras", { "<control>a" }); > this.set_accels_for_action ("app.up-volume", { "Up" }); > this.set_accels_for_action ("app.down-volume", { "Down" }); > this.set_accels_for_action ("app.previous-camera", { "Left" }); > this.set_accels_for_action ("app.next-camera", { "Right" }); > this.set_accels_for_action ("app.settings", { "<control>s" }); > this.set_accels_for_action ("app.quit", { "<control>q" }); > } > ``` That will make gcc throw several warnings.
tarmaciltur deleted branch 143-every-accels-trigrers-app.automatic-switch-cameras-action 2026-06-24 12:09:30 -03:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
p/vigilantear!144
No description provided.