Skip to content

Commit eeacd4b

Browse files
tintoudanirabbit
authored andcommitted
Use built-in symbolic icon names (#25)
Use built-in translations
1 parent fc2667d commit eeacd4b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/MainWindow.vala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public class MainWindow : Gtk.Dialog {
3636
icon_name: "com.github.danrabbit.nimbus",
3737
resizable: false,
3838
skip_taskbar_hint: true,
39+
skip_pager_hint: true,
3940
title: _("Nimbus"),
4041
type_hint: Gdk.WindowTypeHint.UTILITY,
4142
height_request: 272,
@@ -50,7 +51,7 @@ public class MainWindow : Gtk.Dialog {
5051

5152
weather_info = new GWeather.Info (location, GWeather.ForecastType.LIST);
5253

53-
var weather_icon = new Gtk.Image.from_icon_name ("%s-symbolic".printf (weather_info.get_icon_name ()), Gtk.IconSize.LARGE_TOOLBAR);
54+
var weather_icon = new Gtk.Image.from_icon_name (weather_info.get_symbolic_icon_name (), Gtk.IconSize.LARGE_TOOLBAR);
5455

5556
var weather_label = new Gtk.Label (weather_info.get_sky ());
5657
weather_label.halign = Gtk.Align.START;
@@ -119,10 +120,10 @@ public class MainWindow : Gtk.Dialog {
119120
return;
120121
}
121122

122-
location_label.label = location.get_city_name ();
123+
location_label.label = dgettext("libgweather-locations", location.get_city_name ());
123124

124-
weather_icon.icon_name = "%s-symbolic".printf (weather_info.get_icon_name ());
125-
weather_label.label = weather_info.get_sky ();
125+
weather_icon.icon_name = weather_info.get_symbolic_icon_name ();
126+
weather_label.label = dgettext("libgweather", weather_info.get_sky ());
126127

127128
double temp;
128129
weather_info.get_value_temp (GWeather.TemperatureUnit.DEFAULT, out temp);

0 commit comments

Comments
 (0)