|
10 | 10 |
|
11 | 11 | imports.gi.versions.Gtk = '3.0'; |
12 | 12 |
|
13 | | -let d = new Date (); |
| 13 | +/*let d = new Date (); |
14 | 14 | print ("\x1b[00;32m[" + d.toString().substring (0, d.toString().indexOf (" GMT")) + "." + (d.getMilliseconds() / 1000).toFixed(3).slice(2, 5) + |
15 | | - "](DD) [cpufreq][application]\x1b[0m Starting application"); |
| 15 | + "](DD) [cpufreq][application]\x1b[0m Starting application");*/ |
16 | 16 |
|
17 | 17 | const Gtk = imports.gi.Gtk; |
18 | 18 | const Gdk = imports.gi.Gdk; |
19 | 19 | const Gio = imports.gi.Gio; |
20 | 20 | const GLib = imports.gi.GLib; |
21 | 21 | const Lang = imports.lang; |
22 | 22 |
|
| 23 | +const Logger = imports.common.Logger; |
23 | 24 | const Convenience = imports.convenience; |
24 | 25 | const cpu = imports.common.HelperCPUFreq; |
25 | 26 | const Settings = imports.common.Settings; |
26 | | -const Logger = imports.common.Logger; |
27 | 27 | const MainWindow = imports.common.ui.MainWindow; |
28 | 28 |
|
29 | 29 | var DEBUG_LVL = 0; |
@@ -91,52 +91,39 @@ var CPUFreqApplication = new Lang.Class ({ |
91 | 91 | let v = options.lookup_value ("profile", null); |
92 | 92 | if (v) [v, ] = v.get_string (); |
93 | 93 | this.process_profile (v); |
94 | | - Logger.debug ("finishing loading profile: \`%s\`".format (v)); |
95 | 94 | //TODO: fix https://gitlab.gnome.org/GNOME/gjs/issues/232 |
96 | 95 | return 0; |
97 | 96 | } |
98 | 97 |
|
99 | | - Logger.debug ("verbose:%s debug:%s extension:%s".format (DEBUG_LVL>0, DEBUG_LVL>1, this.extension)); |
| 98 | + //Logger.debug ("verbose:%s debug:%s extension:%s".format (DEBUG_LVL>0, DEBUG_LVL>1, this.extension)); |
100 | 99 | return -1; |
101 | 100 | }, |
102 | 101 |
|
103 | 102 | vfunc_startup: function () { |
104 | | - Logger.info ("startup"); |
105 | 103 | this.parent(); |
106 | 104 | this.initialize (); |
107 | | - |
108 | | - /*this.connect ('open', Lang.bind (this, (files) => { |
109 | | - print ("open", files.map(function(f) { return f.get_uri(); })); |
110 | | - }));*/ |
111 | 105 | }, |
112 | 106 |
|
113 | 107 | initialize: function () { |
114 | 108 | if (this.settings) return; |
115 | | - Logger.info ("initialization ..."); |
116 | 109 | this.settings = new Settings.Settings (); |
117 | | - Logger.info ("Settings creatad."); |
118 | 110 | cpu.init (this.settings); |
119 | | - Logger.info ("CPUFreq initialized."); |
120 | 111 | }, |
121 | 112 |
|
122 | 113 | vfunc_activate: function () { |
123 | | - Logger.info ("activating ... " + !this.finishing); |
124 | 114 | if (this.finishing) return; |
125 | 115 | if (!this.active_window) { |
126 | 116 | window = new MainWindow.MainWindow ({ application:this }); |
127 | | - Logger.info ("created MainWindow"); |
128 | 117 | window.connect ("destroy", () => { |
129 | 118 | return true; |
130 | 119 | }); |
131 | 120 | window.show_all (); |
132 | 121 | cpu.profile_changed_callback = Lang.bind (this, this.on_profile_changed); |
133 | | - Logger.info ("restoring saved " + this.settings.save); |
134 | 122 | if (this.settings.save) cpu.restore_saved (); |
135 | | - Logger.info ("post_init " + !!window.cpanel); |
136 | 123 | if (window.cpanel) window.cpanel.post_init (); |
137 | 124 | else this.quit (); |
138 | 125 | window.connect ("realize", () => { |
139 | | - Logger.info ("realize"); |
| 126 | + Logger.debug ("realize"); |
140 | 127 | }); |
141 | 128 | } else { |
142 | 129 | if (this.extension) { |
|
0 commit comments