From 1f964c265a0f45c064d312dcd51f985e877cbc55 Mon Sep 17 00:00:00 2001 From: rbuj Date: Wed, 2 Dec 2020 10:19:16 +0100 Subject: mateweather: Use common subdirs - src, data --- mateweather/src/main.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 mateweather/src/main.c (limited to 'mateweather/src/main.c') diff --git a/mateweather/src/main.c b/mateweather/src/main.c new file mode 100644 index 00000000..de8d8436 --- /dev/null +++ b/mateweather/src/main.c @@ -0,0 +1,58 @@ +/* $Id$ */ + +/* + * Papadimitriou Spiros + * + * This code released under the GNU GPL. + * Read the file COPYING for more information. + * + * Main applet widget + * + */ + +#include +#include +#include +#include +#include +#include + +#define MATEWEATHER_I_KNOW_THIS_IS_UNSTABLE + +#include + +#include "mateweather.h" +#include "mateweather-pref.h" +#include "mateweather-dialog.h" +#include "mateweather-applet.h" + + +static gboolean mateweather_applet_new(MatePanelApplet* applet, const gchar* iid, gpointer data) +{ + MateWeatherApplet* gw_applet; + + gw_applet = g_new0(MateWeatherApplet, 1); + + gw_applet->applet = applet; + gw_applet->mateweather_info = NULL; + gw_applet->settings = mate_panel_applet_settings_new (applet, "org.mate.weather"); + + mateweather_applet_create(gw_applet); + + mateweather_prefs_load(&gw_applet->mateweather_pref, gw_applet->settings); + + mateweather_update(gw_applet); + + return TRUE; +} + +static gboolean mateweather_applet_factory(MatePanelApplet* applet, const gchar* iid, gpointer data) +{ + gboolean retval = FALSE; + + retval = mateweather_applet_new(applet, iid, data); + + return retval; +} + +MATE_PANEL_APPLET_OUT_PROCESS_FACTORY("MateWeatherAppletFactory", PANEL_TYPE_APPLET, "mateweather", mateweather_applet_factory, NULL) -- cgit v1.2.1