Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Rugby
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bruce Cowan
Rugby
Commits
bf8f7eca
Verified
Commit
bf8f7eca
authored
2 years ago
by
Bruce Cowan
Browse files
Options
Downloads
Patches
Plain Diff
Save window size
parent
4036310c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
data/gtk/window.blp
+1
-3
1 addition, 3 deletions
data/gtk/window.blp
data/uk.me.bcowan.Rugby.gschema.xml
+13
-1
13 additions, 1 deletion
data/uk.me.bcowan.Rugby.gschema.xml
src/rugby-app-window.c
+12
-1
12 additions, 1 deletion
src/rugby-app-window.c
with
26 additions
and
5 deletions
data/gtk/window.blp
+
1
−
3
View file @
bf8f7eca
// SPDX-FileCopyrightText: 2022 Bruce Cowan <bruce@bcowan.me.uk>
// SPDX-FileCopyrightText: 2022
-2023
Bruce Cowan <bruce@bcowan.me.uk>
//
// SPDX-License-Identifier: GPL-3.0-or-later
...
...
@@ -7,8 +7,6 @@ using Adw 1;
template RugbyAppWindow : Adw.ApplicationWindow {
title: "Rugby";
default-height: 600;
default-width: 400;
Box {
orientation: vertical;
...
...
This diff is collapsed.
Click to expand it.
data/uk.me.bcowan.Rugby.gschema.xml
+
13
−
1
View file @
bf8f7eca
<?xml version="1.0" encoding="UTF-8"?>
<!--
SPDX-FileCopyrightText: 2020 Bruce Cowan <bruce@bcowan.me.uk>
SPDX-FileCopyrightText: 2020
-2023
Bruce Cowan <bruce@bcowan.me.uk>
SPDX-License-Identifier: GPL-3.0-or-later
-->
...
...
@@ -22,4 +22,16 @@
<description>
Number of points for a kick (drop goal or penalty)
</description>
</key>
</schema>
<schema
id=
"uk.me.bcowan.Rugby.window"
path=
"/uk/me/bcowan/Rugby/window/"
>
<key
name=
"height"
type=
"i"
>
<default>
600
</default>
<summary>
Window height
</summary>
<description>
The height of the window
</description>
</key>
<key
name=
"width"
type=
"i"
>
<default>
400
</default>
<summary>
Window width
</summary>
<description>
The width of the window
</description>
</key>
</schema>
</schemalist>
This diff is collapsed.
Click to expand it.
src/rugby-app-window.c
+
12
−
1
View file @
bf8f7eca
/*
* SPDX-FileCopyrightText: 2017-202
2
Bruce Cowan <bruce@bcowan.me.uk>
* SPDX-FileCopyrightText: 2017-202
3
Bruce Cowan <bruce@bcowan.me.uk>
*
* SPDX-License-Identifier: GPL-3.0-or-later
*/
...
...
@@ -23,6 +23,8 @@ struct _RugbyAppWindow
GtkWidget
*
empty_page
;
GtkWidget
*
list_page
;
GSettings
*
win_settings
;
GtkCustomFilter
*
try_filter
;
};
...
...
@@ -123,6 +125,7 @@ static void
rugby_app_window_dispose
(
GObject
*
object
)
{
gtk_widget_dispose_template
(
GTK_WIDGET
(
object
),
RUGBY_TYPE_APP_WINDOW
);
g_clear_object
(
&
RUGBY_APP_WINDOW
(
object
)
->
win_settings
);
G_OBJECT_CLASS
(
rugby_app_window_parent_class
)
->
dispose
(
object
);
}
...
...
@@ -181,6 +184,14 @@ rugby_app_window_init (RugbyAppWindow *self)
win_entries
,
G_N_ELEMENTS
(
win_entries
),
self
);
self
->
win_settings
=
g_settings_new
(
"uk.me.bcowan.Rugby.window"
);
g_settings_bind
(
self
->
win_settings
,
"height"
,
self
,
"default-height"
,
G_SETTINGS_BIND_DEFAULT
);
g_settings_bind
(
self
->
win_settings
,
"width"
,
self
,
"default-width"
,
G_SETTINGS_BIND_DEFAULT
);
}
static
void
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment