@ -35,6 +35,7 @@
const ExtensionUtils = imports . misc . extensionUtils ;
const ExtensionUtils = imports . misc . extensionUtils ;
const Me = ExtensionUtils . getCurrentExtension ( ) ;
const Me = ExtensionUtils . getCurrentExtension ( ) ;
const Config = imports . misc . config ;
const Convenience = Me . imports . convenience ;
const Convenience = Me . imports . convenience ;
const Cairo = imports . cairo ;
const Cairo = imports . cairo ;
const Clutter = imports . gi . Clutter ;
const Clutter = imports . gi . Clutter ;
@ -196,16 +197,26 @@ const WeatherMenuButton = new Lang.Class({
this . _futureWeather = new St . Bin ( { style _class : 'forecast' } ) ;
this . _futureWeather = new St . Bin ( { style _class : 'forecast' } ) ;
// Putting the popup item together
// Putting the popup item together
this . _itemCurrent = new PopupMenu . PopupBaseMenuItem ( { reactive : false , style _class : 'current' } ) ;
let _itemCurrent = new PopupMenu . PopupBaseMenuItem ( { reactive : false } ) ;
this . _itemCurrent . actor . add _actor ( this . _currentWeather ) ;
let _itemFuture = new PopupMenu . PopupBaseMenuItem ( { reactive : false } ) ;
this . menu . addMenuItem ( this . _itemCurrent ) ;
if ( ExtensionUtils . versionCheck ( [ '3.9' , '3.10' ] , Config . PACKAGE _VERSION ) )
{
_itemCurrent . actor . add _actor ( this . _currentWeather ) ;
_itemFuture . actor . add _actor ( this . _futureWeather ) ;
}
else
{
_itemCurrent . addActor ( this . _currentWeather ) ;
_itemFuture . addActor ( this . _futureWeather ) ;
}
this . menu . addMenuItem ( _itemCurrent ) ;
let item = new PopupMenu . PopupSeparatorMenuItem ( ) ;
let item = new PopupMenu . PopupSeparatorMenuItem ( ) ;
this . menu . addMenuItem ( item ) ;
this . menu . addMenuItem ( item ) ;
this . _itemFuture = new PopupMenu . PopupBaseMenuItem ( { reactive : false , style _class : 'forecast' } ) ;
this . menu . addMenuItem ( _itemFuture ) ;
this . _itemFuture . actor . add _actor ( this . _futureWeather ) ;
this . menu . addMenuItem ( this . _itemFuture ) ;
let item = new PopupMenu . PopupSeparatorMenuItem ( ) ;
let item = new PopupMenu . PopupSeparatorMenuItem ( ) ;
this . menu . addMenuItem ( item ) ;
this . menu . addMenuItem ( item ) ;
@ -521,7 +532,13 @@ const WeatherMenuButton = new Lang.Class({
item = new PopupMenu . PopupMenuItem ( this . extractLocation ( cities [ i ] ) ) ;
item = new PopupMenu . PopupMenuItem ( this . extractLocation ( cities [ i ] ) ) ;
item . location = i ;
item . location = i ;
if ( i == this . _actual _city )
if ( i == this . _actual _city )
{
if ( ExtensionUtils . versionCheck ( [ '3.9' , '3.10' ] , Config . PACKAGE _VERSION ) )
item . setOrnament ( PopupMenu . Ornament . DOT ) ;
item . setOrnament ( PopupMenu . Ornament . DOT ) ;
else
item . setShowDot ( true ) ;
}
this . _selectCity . menu . addMenuItem ( item ) ;
this . _selectCity . menu . addMenuItem ( item ) ;
item . connect ( 'activate' , function ( actor , event )
item . connect ( 'activate' , function ( actor , event )
{
{