configurator: typographic/visual improvements

yahoo_weather
simon04 13 years ago
parent 14a83d5b82
commit b4455d03fc
  1. 15
      weather-extension-configurator.py

@ -49,6 +49,7 @@ class WeatherConfigurator:
def add_label(self, label, tooltip): def add_label(self, label, tooltip):
label = Gtk.Label(label + ":") label = Gtk.Label(label + ":")
label.set_use_markup(True)
label.set_alignment(1, 0.5) label.set_alignment(1, 0.5)
self.add_tooltip(label, tooltip) self.add_tooltip(label, tooltip)
self.elements.append(label) self.elements.append(label)
@ -109,23 +110,23 @@ class WeatherConfigurator:
self.elements = [] self.elements = []
self.add_text('woeid', 'WOEID', self.add_text('woeid', '<b>WOEID</b>',
"The Where On Earth ID determinees the location/city") "The Where On Earth ID determinees the location/city")
self.add_radio('unit', 'Temperature Unit', self.add_radio('unit', 'Temperature Unit',
[(0, 'celsius'), (1, 'fahrenheit')]) [(0, 'celsius'), (1, 'fahrenheit')])
self.add_text('city', 'Label', self.add_text('city', 'Override Location Label',
"Sometimes your WOEID location isn't quite right (it's the next major city around)") "Sometimes your WOEID location isn’t quite right (it’s the next major city around). This label is used to override the location displayed.")
self.add_radio('position-in-panel', 'Position in Panel*', self.add_radio('position-in-panel', 'Position in Panel',
[(2, 'left'), (0, 'center'), (1, 'right')], [(2, 'left'), (0, 'center'), (1, 'right')],
"The position of this GNOME Shell extension in the panel. (Requires restart of GNOME Shell.)") "The position of this GNOME Shell extension in the panel. (Requires restart of GNOME Shell.)")
self.add_check('translate-condition', 'Translate Weather Conditions', self.add_check('translate-condition', 'Translate Weather Conditions',
"If enabled, the condition is translated based on the weather code.\nIf disabled, the condition string from Yahoo is taken.\nNote: Enabling the translation sometimes results in loss of accuracy, e.g., the condition string 'PM Thunderstorms' cannot be expressed in terms of weather codes.") "If enabled, the condition is translated based on the weather code.\nIf disabled, the condition string from Yahoo is taken.\nNote: Enabling the translation sometimes results in loss of accuracy, e.g., the condition string “PM Thunderstorms” cannot be expressed in terms of weather codes.")
self.add_check('use-symbolic-icons', 'Symbolic Icons', self.add_check('use-symbolic-icons', 'Symbolic Icons',
"Display symbolic icons instead of full-colored icons") "Display symbolic icons instead of full-colored icons")
(b_text, _) = self.add_check('show-text-in-panel', 'Show Text in Panel*', (b_text, _) = self.add_check('show-text-in-panel', 'Show Text in Panel',
"Display current temperature in panel. If disabled, only the current condition icon is shown. (Requires restart of GNOME Shell.)") "Display current temperature in panel. If disabled, only the current condition icon is shown. (Requires restart of GNOME Shell.)")
(b_cond, l_cond) = self.add_check('show-comment-in-panel', ' Include Condition', (b_cond, l_cond) = self.add_check('show-comment-in-panel', ' Include Condition',
"Whether to show the weather condition (e.g. 'Windy', 'Clear') in the panel.") "Whether to show the weather condition (e.g., “Windy”, “Clear”) in the panel.")
# add dependency between text-in-panel and comment-in-panel # add dependency between text-in-panel and comment-in-panel
def depend(rb): def depend(rb):

Loading…
Cancel
Save