~gotwig/gazette/global-service-states

« back to all changes in this revision

Viewing changes to plugins/Weather/Weather.vala

  • Committer: gotwig at ubuntu
  • Date: 2013-08-01 23:20:17 UTC
  • Revision ID: gotwig@ubuntu.com-20130801232017-kl9ihbcoyj9dnmia
radical new approach; service-states is meant to hold ALL states of widgets, which are essential for everyone, independent of its function
like update-interval, fonts, color. only look is implemented yet. functions will soon follow. Show these essential values the user in the plug.
Todo: Add an expander, hide button for this, as this are "advanced settings"

Show diffs side-by-side

added added

removed removed

Lines of Context:
264
264
        weatherUnitLabel.set_alignment (1, 0);
265
265
        weatherUnitLabel.set_use_markup (true);
266
266
        weatherUnitLabel.set_line_wrap (true);
267
 
 
268
 
        // RESET BUTTON
269
 
        var resetButton = new Gtk.Button.with_label ( _("Reset") );
270
 
        container.attach(resetButton, 2, 2, 1, 1);
271
 
        resetButton.clicked.connect(() => {
272
 
            settings.reset("weather-unit");
273
 
            settings.reset("weather-id");
274
 
            weather_id = settings.get_int("weather-id");
275
 
            weather_unit = settings.get_string("weather-unit");
276
 
            weatherIdEntry.set_value (weather_id);
277
 
            if (weather_unit == "'Celsius'")
278
 
                weatherUnitBox.active = 1;
279
 
            else
280
 
                weatherUnitBox.active = 0;
281
 
        });
282
267
        return container;
283
268
    }
284
269
}