source: trunk/third/gnome-applets/gweather/main.c @ 20910

Revision 20910, 1.2 KB checked in by ghudson, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r20909, which included commits to RCS files with non-trunk default branches.
Line 
1/* $Id: main.c,v 1.1.1.2 2004-10-04 03:03:47 ghudson Exp $ */
2
3/*
4 *  Papadimitriou Spiros <spapadim+@cs.cmu.edu>
5 *
6 *  This code released under the GNU GPL.
7 *  Read the file COPYING for more information.
8 *
9 *  Main applet widget
10 *
11 */
12
13#  include <config.h>
14
15#include <gnome.h>
16#include <panel-applet.h>
17
18#include "gweather.h"
19#include "gweather-pref.h"
20#include "gweather-dialog.h"
21#include "gweather-applet.h"
22
23
24gboolean
25gweather_applet_new(PanelApplet *applet, const gchar *iid, gpointer data)
26{
27        GWeatherApplet *gw_applet;
28
29        panel_applet_add_preferences(applet, "/schemas/apps/gweather/prefs", NULL);
30       
31        gw_applet = g_new0(GWeatherApplet, 1);   
32       
33        gw_applet->applet = applet;
34        gw_applet->gweather_info = NULL;
35        gweather_applet_create(gw_applet);
36
37        gweather_pref_load(gw_applet);
38        gweather_info_load("test_path", gw_applet);
39   
40        gweather_update(gw_applet);
41
42        return TRUE;
43}
44
45static gboolean
46gweather_applet_factory(PanelApplet *applet,
47                                                        const gchar *iid,
48                                                        gpointer data)
49{
50        gboolean retval = FALSE;
51       
52        retval = gweather_applet_new(applet, iid, data);
53       
54        return retval;
55}
56
57PANEL_APPLET_BONOBO_FACTORY("OAFIID:GNOME_GWeatherApplet_Factory",
58                        PANEL_TYPE_APPLET,
59                        "gweather",
60                        "0",
61                        gweather_applet_factory,
62                        NULL);
Note: See TracBrowser for help on using the repository browser.