Reformat javascript and stylesheet, no functional changes

yahoo_weather
Jens Lody 11 years ago
parent 3c95779109
commit 434823ada0
  1. 38
      data/stylesheet.css
  2. 42
      po/update.js
  3. 12
      src/convenience.js
  4. 2507
      src/extension.js
  5. 1360
      src/prefs.js

@ -1,60 +1,60 @@
.weather-current-summarybox { .weather-current-summarybox {
padding-top:5px; padding-top:5px;
} }
.weather-current-summary { .weather-current-summary {
font-size: 31px; font-size: 31px;
} }
.weather-current-databox { .weather-current-databox {
padding: 5px 15px 0px; padding: 5px 15px 0px;
} }
.weather-current-icon { .weather-current-icon {
padding-right: 30px; padding-right: 30px;
} }
.weather-current-iconbox { .weather-current-iconbox {
padding-right: 20px; padding-right: 20px;
} }
.weather-icon { .weather-icon {
padding-right: 5px; padding-right: 5px;
} }
.weather-icon-rtl { .weather-icon-rtl {
padding-left: 5px; padding-left: 5px;
} }
.weather-current-databox-captions { .weather-current-databox-captions {
text-align: right; text-align: right;
padding-right: 5px; padding-right: 5px;
color: #999999; color: #999999;
} }
.weather-forecast-icon { .weather-forecast-icon {
padding-right: 15px; padding-right: 15px;
} }
.weather-forecast-databox { .weather-forecast-databox {
padding-right: 30px; padding-right: 30px;
} }
.weather-forecast-day { .weather-forecast-day {
color: #999999; color: #999999;
font-size: 90%; font-size: 90%;
} }
.weather-sunrise-icon { .weather-sunrise-icon {
padding-right: 5px; padding-right: 5px;
} }
.weather-sunset-icon { .weather-sunset-icon {
padding-left: 15px; padding-left: 15px;
padding-right: 5px; padding-right: 5px;
} }
.weather-build-icon { .weather-build-icon {
padding-left: 15px; padding-left: 15px;
padding-right: 5px; padding-right: 5px;
} }

@ -30,26 +30,24 @@ Gio = imports.gi.Gio;
print("Generate gnome-shell-extension-weather.pot"); print("Generate gnome-shell-extension-weather.pot");
var xgettext = Seed.spawn("xgettext -o gnome-shell-extension-weather.pot -L python --from-code=utf-8 --keyword=_ -f POTFILES.in"); var xgettext = Seed.spawn("xgettext -o gnome-shell-extension-weather.pot -L python --from-code=utf-8 --keyword=_ -f POTFILES.in");
if(xgettext.stderr) if (xgettext.stderr)
print(xgettext.stderr); print(xgettext.stderr);
else else {
{ var file = Gio.file_new_for_path(".");
var file = Gio.file_new_for_path("."); var enumerator = file.enumerate_children("standard::name,standard::size");
var enumerator = file.enumerate_children("standard::name,standard::size"); var linguas = "";
var linguas = ""; var n = "";
var n = ""; var i = 0;
var i = 0; while (child = enumerator.next_file())
while(child = enumerator.next_file()) if (child.get_name().search(/.po$/) != -1) {
if(child.get_name().search(/.po$/) != -1) print("Generate " + child.get_name());
{ linguas += n + (child.get_name().split(".po")[0]);
print("Generate "+child.get_name()); Seed.spawn("msgmerge -U " + child.get_name() + " gnome-shell-extension-weather.pot");
linguas += n+(child.get_name().split(".po")[0]); n = "\n";
Seed.spawn("msgmerge -U "+child.get_name()+" gnome-shell-extension-weather.pot"); i++;
n = "\n"; }
i++;
}
print("Write LINGUAS file"); print("Write LINGUAS file");
Gio.simple_write("LINGUAS",linguas); Gio.simple_write("LINGUAS", linguas);
print("Successfully generated "+i+" entry"); print("Successfully generated " + i + " entry");
} }

@ -24,7 +24,6 @@
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
const Gettext = imports.gettext; const Gettext = imports.gettext;
const Gio = imports.gi.Gio; const Gio = imports.gi.Gio;
@ -78,15 +77,16 @@ function getSettings(schema) {
let schemaSource; let schemaSource;
if (schemaDir.query_exists(null)) if (schemaDir.query_exists(null))
schemaSource = GioSSS.new_from_directory(schemaDir.get_path(), schemaSource = GioSSS.new_from_directory(schemaDir.get_path(),
GioSSS.get_default(), GioSSS.get_default(),
false); false);
else else
schemaSource = GioSSS.get_default(); schemaSource = GioSSS.get_default();
let schemaObj = schemaSource.lookup(schema, true); let schemaObj = schemaSource.lookup(schema, true);
if (!schemaObj) if (!schemaObj)
throw new Error('Schema ' + schema + ' could not be found for extension ' throw new Error('Schema ' + schema + ' could not be found for extension ' + extension.metadata.uuid + '. Please check your installation.');
+ extension.metadata.uuid + '. Please check your installation.');
return new Gio.Settings({ settings_schema: schemaObj }); return new Gio.Settings({
settings_schema: schemaObj
});
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save