bzr branch
http://gegoxaren.bato24.eu/bzr/loggerouter/trunk
1
by Gustav Hartvigsson
* Inital release |
1 |
/*
|
2 |
This file is part of LoggerOuter.
|
|
3 |
||
4 |
LoggerOuter is free software: you can redistribute it and/or modify it under the
|
|
5 |
terms of the GNU Lesser General Public License as published by the Free Software
|
|
6 |
Foundation, either version 3 of the License, or (at your option) any later
|
|
7 |
version.
|
|
8 |
||
9 |
LoggerOuter is distributed in the hope that it will be useful, but WITHOUT
|
|
10 |
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
11 |
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
|
12 |
License for more details.
|
|
13 |
||
14 |
You should have received a copy of the GNU Lessel General Public License
|
|
15 |
along with LoggerOuter. If not, see <https://www.gnu.org/licenses/>.
|
|
16 |
*/
|
|
17 |
||
3
by Gustav Hartvigsson
spelling error |
18 |
public const string APP_NAME = "eu.bato24.gegoxaren.loggerouter"; |
1
by Gustav Hartvigsson
* Inital release |
19 |
public const int APP_VERSION_MAJOR = 0; |
20 |
public const int APP_VERSION_MINOR = 0; |
|
21 |
public static string get_app_version () { |
|
22 |
return @"$APP_VERSION_MAJOR.$APP_VERSION_MINOR"; |
|
23 |
}
|
|
24 |
||
25 |
public static string? LO_XDG_ACTIONS_PATH; |
|
26 |
public static string? LO_XDG_CONFIG_DIR; |
|
27 |
public static string? LO_XDG_CONFIG_PATH; |
|
28 |
||
29 |
||
4
by Gustav Hartvigsson
Fixed crash caused from missing config file. |
30 |
public static LO.Application app; |
1
by Gustav Hartvigsson
* Inital release |
31 |
|
32 |
LO.Options opts; |
|
33 |
LO.Settings settings; |
|
34 |
||
35 |
||
36 |
int main (string[] args) { |
|
37 |
LO_XDG_CONFIG_DIR = GLib.Environment.get_user_config_dir () + "/loggerouter"; |
|
38 |
LO_XDG_ACTIONS_PATH = LO_XDG_CONFIG_DIR + "/actions.ini"; |
|
39 |
LO_XDG_CONFIG_PATH = LO_XDG_CONFIG_DIR + "/config.ini"; |
|
40 |
||
41 |
opts = LO.Options.get_instance (); // Prevents segfault |
|
42 |
settings = LO.Settings.get_instance (); |
|
43 |
opts.exec_name = args[0]; |
|
4
by Gustav Hartvigsson
Fixed crash caused from missing config file. |
44 |
app = new LO.Application (); |
45 |
Gtk.init (); |
|
1
by Gustav Hartvigsson
* Inital release |
46 |
return app.run (args); |
47 |
}
|
|
48 |
||
49 |
||
50 |