~l-admin-3/evnc/automatic-cleanup-branch

« back to all changes in this revision

Viewing changes to src/evnc.vala

  • Committer: Marcus Wichelmann
  • Date: 2015-07-09 18:17:05 UTC
  • Revision ID: marcus.wichelmann@hotmail.de-20150709181705-aliu5vv3gvha1p0a
Automatic code cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
*/
18
18
 
19
19
namespace evnc {
20
 
        public class evncApp : Granite.Application {
21
 
                public MainWindow window;
22
 
 
23
 
                construct {
24
 
                        // App-Properties
25
 
                        program_name = "VNC-Client";
26
 
                        exec_name = "evnc";
27
 
 
28
 
                        build_data_dir = Constants.DATADIR;
29
 
                        build_pkg_data_dir = Constants.PKGDATADIR;
30
 
                        build_release_name = Constants.RELEASE_NAME;
31
 
                        build_version = Constants.VERSION;
32
 
                        build_version_info = Constants.VERSION_INFO;
33
 
 
34
 
                        app_years = "2014";
35
 
                        app_icon = "evnc";
36
 
                        app_launcher = "evnc.desktop";
37
 
                        application_id = "net.launchpad.evnc";
38
 
                        main_url = "https://code.launchpad.net/evnc";
39
 
                        bug_url = "https://bugs.launchpad.net/evnc";
40
 
                        help_url = "https://code.launchpad.net/evnc";
41
 
                        translate_url = "https://translations.launchpad.net/evnc";
42
 
                        about_authors = { "Marcus Wichelmann <admin@marcusw.de>" };
43
 
                        about_documenters = { "Marcus Wichelmann <admin@marcusw.de>" };
44
 
                        about_artists = { "Marcus Wichelmann <admin@marcusw.de>" };
45
 
                        about_comments = "A VNC-Viewer for elementary OS";
46
 
                        about_translators = "Launchpad Translators";
47
 
                }
48
 
 
49
 
                public evncApp () {
50
 
                        // Translations
51
 
                        Intl.setlocale (LocaleCategory.ALL, "");
52
 
                        string langpack_dir = Path.build_filename (Constants.INSTALL_PREFIX, "share", "locale");
53
 
                        Intl.bindtextdomain (Constants.GETTEXT_PACKAGE, langpack_dir);
54
 
                        Intl.bind_textdomain_codeset (Constants.GETTEXT_PACKAGE, "UTF-8");
55
 
                        Intl.textdomain (Constants.GETTEXT_PACKAGE);
56
 
 
57
 
                        // Debug service
58
 
                        Granite.Services.Logger.initialize ("evnc");
59
 
                        Granite.Services.Logger.DisplayLevel = Granite.Services.LogLevel.DEBUG;
60
 
 
61
 
                        //Vnc.util_set_debug (true);
62
 
                        //Granite.Services.Logger.notification (Vnc.util_get_version_string ());
63
 
                }
64
 
 
65
 
                public override void activate () {
66
 
                        if (get_windows () == null) {
67
 
                                window = new MainWindow (this);
68
 
                                window.show_all ();
69
 
                        } else {
70
 
                                window.present ();
71
 
                        }
72
 
                }
73
 
 
74
 
                public override void open (File [] files, string hint) {
75
 
                        // Do nothing
76
 
                }
77
 
 
78
 
                public static void main (string [] args) {
79
 
                        // Instantiate and run
80
 
                        var app = new evnc.evncApp ();
81
 
                        app.run (args);
82
 
                }
83
 
        }
 
20
    public class evncApp : Granite.Application {
 
21
        public MainWindow window;
 
22
 
 
23
        construct {
 
24
            // App-Properties
 
25
            program_name = "VNC-Client";
 
26
            exec_name = "evnc";
 
27
 
 
28
            build_data_dir = Constants.DATADIR;
 
29
            build_pkg_data_dir = Constants.PKGDATADIR;
 
30
            build_release_name = Constants.RELEASE_NAME;
 
31
            build_version = Constants.VERSION;
 
32
            build_version_info = Constants.VERSION_INFO;
 
33
 
 
34
            app_years = "2014";
 
35
            app_icon = "evnc";
 
36
            app_launcher = "evnc.desktop";
 
37
            application_id = "net.launchpad.evnc";
 
38
            main_url = "https://code.launchpad.net/evnc";
 
39
            bug_url = "https://bugs.launchpad.net/evnc";
 
40
            help_url = "https://code.launchpad.net/evnc";
 
41
            translate_url = "https://translations.launchpad.net/evnc";
 
42
            about_authors = { "Marcus Wichelmann <admin@marcusw.de>" };
 
43
            about_documenters = { "Marcus Wichelmann <admin@marcusw.de>" };
 
44
            about_artists = { "Marcus Wichelmann <admin@marcusw.de>" };
 
45
            about_comments = "A VNC-Viewer for elementary OS";
 
46
            about_translators = "Launchpad Translators";
 
47
        }
 
48
 
 
49
        public evncApp () {
 
50
            // Translations
 
51
            Intl.setlocale (LocaleCategory.ALL, "");
 
52
            string langpack_dir = Path.build_filename (Constants.INSTALL_PREFIX, "share", "locale");
 
53
            Intl.bindtextdomain (Constants.GETTEXT_PACKAGE, langpack_dir);
 
54
            Intl.bind_textdomain_codeset (Constants.GETTEXT_PACKAGE, "UTF-8");
 
55
            Intl.textdomain (Constants.GETTEXT_PACKAGE);
 
56
 
 
57
            // Debug service
 
58
            Granite.Services.Logger.initialize ("evnc");
 
59
            Granite.Services.Logger.DisplayLevel = Granite.Services.LogLevel.DEBUG;
 
60
 
 
61
            //Vnc.util_set_debug (true);
 
62
            //Granite.Services.Logger.notification (Vnc.util_get_version_string ());
 
63
        }
 
64
 
 
65
        public override void activate () {
 
66
            if (get_windows () == null) {
 
67
                window = new MainWindow (this);
 
68
                window.show_all ();
 
69
            } else {
 
70
                window.present ();
 
71
            }
 
72
        }
 
73
 
 
74
        public override void open (File [] files, string hint) {
 
75
            // Do nothing
 
76
        }
 
77
 
 
78
        public static void main (string [] args) {
 
79
            // Instantiate and run
 
80
            var app = new evnc.evncApp ();
 
81
            app.run (args);
 
82
        }
 
83
    }
84
84
}
 
 
b'\\ No newline at end of file'