Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
rugby
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Bruce Cowan
rugby
Compare Revisions
9901b6c59c0fcc8a8ec3a3506d49d6e60c3a433d...0141dd4648b9fac7d4a4f65485885aa80dc79a8d
Source
0141dd4648b9fac7d4a4f65485885aa80dc79a8d
Select Git revision
...
Target
9901b6c59c0fcc8a8ec3a3506d49d6e60c3a433d
Select Git revision
Compare
Commits (2)
Better copyright year detection
· 5335c0c3
Bruce Cowan
authored
May 18, 2018
5335c0c3
Get rid of (c) glyph
· 0141dd46
Bruce Cowan
authored
May 18, 2018
Ends up as "Copyright copyright ..."
0141dd46
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
src/find_year.sh
src/find_year.sh
+3
-0
src/main.c
src/main.c
+2
-4
src/meson.build
src/meson.build
+3
-0
No files found.
src/find_year.sh
0 → 100755
View file @
0141dd46
#!/usr/bin/sh
stat
-c
'%y'
`
find
.
-type
f | xargs
`
|
sort
-r
|
head
-n1
|
cut
-d
"-"
-f1
|
tr
-d
'\n'
src/main.c
View file @
0141dd46
...
...
@@ -20,6 +20,7 @@
#include <gtk/gtk.h>
#include "config.h"
#include "rugby-app-window.h"
static
void
...
...
@@ -39,10 +40,7 @@ about_activated (GSimpleAction *simple,
GtkWindow
*
window
=
gtk_application_get_active_window
(
app
);
const
gchar
*
authors
[]
=
{
"Bruce Cowan"
,
NULL
};
g_autoptr
(
GDateTime
)
date
=
g_date_time_new_now_local
();
gint
year
=
g_date_time_get_year
(
date
);
g_autofree
gchar
*
copyright
=
g_strdup_printf
(
"Copyright © 2012–%d Bruce Cowan"
,
year
);
const
gchar
*
copyright
=
"Copyright 2012–"
COPYRIGHT_YEAR
" Bruce Cowan"
;
gtk_show_about_dialog
(
window
,
"logo-icon-name"
,
"face-wink"
,
...
...
src/meson.build
View file @
0141dd46
...
...
@@ -5,6 +5,9 @@ conf.set('TRY_POINTS', get_option('try_points'))
conf.set('UTRY_POINTS', get_option('utry_points'))
conf.set('KICK_POINTS', get_option('kick_points'))
year = run_command('find_year.sh').stdout()
conf.set_quoted('COPYRIGHT_YEAR', year)
config_h = configure_file(configuration: conf, output: 'config.h')
sources = files(
...
...