Skip to content

Commit

Permalink
Add: chabge weather description style
Browse files Browse the repository at this point in the history
  • Loading branch information
RingOV committed Nov 1, 2014
1 parent 44b722c commit 23e5357
Show file tree
Hide file tree
Showing 21 changed files with 1,269 additions and 1,149 deletions.
5 changes: 5 additions & 0 deletions dialogs/settings_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,8 @@ def __init__(self):
self.spinbutton_r.connect("value-changed", self.save_settings)
self.frame_image = self.ui.get_object('frame_image')
self.frame_not_image = self.ui.get_object('frame_not_image')
self.combobox_desc_style = self.ui.get_object('combobox_desc_style')
self.combobox_desc_style.connect("changed", self.save_settings)

self.combobox_icons_name = self.ui.get_object('combobox_icons_name')
self.combobox_icons_name.connect("changed", self.set_icon_bg)
Expand Down Expand Up @@ -306,6 +308,8 @@ def __init__(self):
self.clear_bg_custom.connect("clicked", self.clear_settings)
self.clear_weekend = self.ui.get_object('clear_weekend')
self.clear_weekend.connect("clicked", self.clear_settings)
self.clear_desc_style = self.ui.get_object('clear_desc_style')
self.clear_desc_style.connect("clicked", self.clear_settings)


# Indicator
Expand Down Expand Up @@ -470,6 +474,7 @@ def load_config_into_form(self):
self.load(self.switch_app_indicator_fix_size)
self.load(self.entry_weekend)
self.load(self.spinbutton_instances_count)
self.load(self.combobox_desc_style)

if gw_config_set['show_bg_png'] == True:
self.frame_not_image.hide()
Expand Down
72 changes: 72 additions & 0 deletions dialogs/settings_dialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,12 @@
<property name="stock">gtk-clear</property>
<property name="icon_size">1</property>
</object>
<object class="GtkImage" id="image56">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-clear</property>
<property name="icon_size">1</property>
</object>
<object class="GtkImage" id="image57">
<property name="visible">True</property>
<property name="can_focus">False</property>
Expand Down Expand Up @@ -477,6 +483,20 @@
<column type="gchararray"/>
</columns>
</object>
<object class="GtkListStore" id="liststore14">
<columns>
<!-- column-name gchararray1 -->
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0">Normal</col>
</row>
<row>
<col id="0">Italic</col>
</row>
</data>
</object>
<object class="GtkListStore" id="liststore2">
<columns>
<!-- column-name gchararray1 -->
Expand Down Expand Up @@ -3336,6 +3356,58 @@
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label76">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Weather description style</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">8</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="clear_desc_style">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
<property name="image">image56</property>
<property name="always_show_image">True</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">8</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="combobox_desc_style">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">end</property>
<property name="model">liststore14</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext6"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">8</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
</child>
</object>
Expand Down
11 changes: 8 additions & 3 deletions gis-weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@
'block_today_top': 0,
'block_tomorrow_top': 0,
'block_wind_direct_small_top': 0,
'splash_block_top': 0
'splash_block_top': 0,
'desc_style': 0 # 0 - Normal, 1 - Italic
}
gw_config = {}
for i in gw_config_default.keys():
Expand Down Expand Up @@ -336,6 +337,10 @@ def Load_Preset(number = 0):
1: "°F",
2: "K"
}
desc_list = (
" Normal",
" Italic"
)

# weather variables
weather = {
Expand Down Expand Up @@ -998,9 +1003,9 @@ def draw_weather_icon(self, cr, index, x, y):
self.draw_text(cr, wind_direct[index]+', '+wind_speed[index].split(';')[wind_units].split()[0]+' '+_(wind_speed[index].split(';')[wind_units].split()[-1]), x, y+50, font+' Normal', 8, 80,Pango.Alignment.LEFT, color_high_wind)
else:
self.draw_text(cr, wind_direct[index]+', '+wind_speed[index].split(';')[wind_units].split()[0]+' '+_(wind_speed[index].split(';')[wind_units].split()[-1]), x, y+50, font+' Normal', 8, 80,Pango.Alignment.LEFT)
if text: self.draw_text(cr, text[index], x, y+65, font+' Normal', 7, w_block, Pango.Alignment.LEFT)
if text: self.draw_text(cr, text[index], x, y+65, font+desc_list[desc_style], 7, w_block, Pango.Alignment.LEFT)
else:
if text: self.draw_text(cr, text[index], x, y+55, font+' Normal', 7, w_block, Pango.Alignment.LEFT)
if text: self.draw_text(cr, text[index], x, y+55, font+desc_list[desc_style], 7, w_block, Pango.Alignment.LEFT)
except:
pass

Expand Down
Binary file modified i18n/cz/LC_MESSAGES/gis-weather.mo
Binary file not shown.
Binary file modified i18n/de/LC_MESSAGES/gis-weather.mo
Binary file not shown.
Binary file modified i18n/es/LC_MESSAGES/gis-weather.mo
Binary file not shown.
Binary file modified i18n/fr/LC_MESSAGES/gis-weather.mo
Binary file not shown.
Binary file modified i18n/it/LC_MESSAGES/gis-weather.mo
Binary file not shown.
Binary file modified i18n/pl/LC_MESSAGES/gis-weather.mo
Binary file not shown.
Binary file modified i18n/ro/LC_MESSAGES/gis-weather.mo
Binary file not shown.
Binary file modified i18n/ru/LC_MESSAGES/gis-weather.mo
Binary file not shown.
18 changes: 9 additions & 9 deletions po/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

Filename | Language | Translated | Status | Percent | Translator
| ------------- | ------------- | ------------: | :-----------: | :------------- | :-------------: |
| gis-weather_cz.po| České | 99 / 183 | ![](https://dl.dropboxusercontent.com/u/99404329/bars/54.png) | 54% | Miroslav Fótyi |
| gis-weather_de.po| Deutsch | 183 / 183 | ![](https://dl.dropboxusercontent.com/u/99404329/bars/100.png) | 100% | Jonathan Hooverman |
| gis-weather_es.po| Español | 148 / 183 | ![](https://dl.dropboxusercontent.com/u/99404329/bars/80.png) | 80% | Yasser López de Olmos |
| gis-weather_fr.po| Français | 157 / 183 | ![](https://dl.dropboxusercontent.com/u/99404329/bars/85.png) | 85% | spyder |
| gis-weather_it.po| Italiano | 182 / 183 | ![](https://dl.dropboxusercontent.com/u/99404329/bars/99.png) | 99% | Mirko Zappitelli |
| gis-weather_pl.po| Polski | 150 / 183 | ![](https://dl.dropboxusercontent.com/u/99404329/bars/81.png) | 81% | Jarosław Harasiuk |
| gis-weather_ro.po| Română | 157 / 183 | ![](https://dl.dropboxusercontent.com/u/99404329/bars/85.png) | 85% | Daniel |
| gis-weather_ru.po| Русский | 183 / 183 | ![](https://dl.dropboxusercontent.com/u/99404329/bars/100.png) | 100% | RingOV |
| gis-weather_cz.po| České | 99 / 184 | ![](https://dl.dropboxusercontent.com/u/99404329/bars/53.png) | 53% | Miroslav Fótyi |
| gis-weather_de.po| Deutsch | 183 / 184 | ![](https://dl.dropboxusercontent.com/u/99404329/bars/99.png) | 99% | Jonathan Hooverman |
| gis-weather_es.po| Español | 148 / 184 | ![](https://dl.dropboxusercontent.com/u/99404329/bars/80.png) | 80% | Yasser López de Olmos |
| gis-weather_fr.po| Français | 157 / 184 | ![](https://dl.dropboxusercontent.com/u/99404329/bars/85.png) | 85% | spyder |
| gis-weather_it.po| Italiano | 182 / 184 | ![](https://dl.dropboxusercontent.com/u/99404329/bars/98.png) | 98% | Mirko Zappitelli |
| gis-weather_pl.po| Polski | 150 / 184 | ![](https://dl.dropboxusercontent.com/u/99404329/bars/81.png) | 81% | Jarosław Harasiuk |
| gis-weather_ro.po| Română | 157 / 184 | ![](https://dl.dropboxusercontent.com/u/99404329/bars/85.png) | 85% | Daniel |
| gis-weather_ru.po| Русский | 184 / 184 | ![](https://dl.dropboxusercontent.com/u/99404329/bars/100.png) | 100% | RingOV |

[Want to translate?](https://github.com/RingOV/gis-weather/wiki/Want-to-translate%3F)

_Last update 01.11.2014 17:37_
_Last update 01.11.2014 17:59_
Loading

0 comments on commit 23e5357

Please sign in to comment.