2 * Copyright (c) 2010 Roman Moravcik <roman.moravcik@gmail.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 #include <hildon/hildon.h>
22 #include <gconf/gconf.h>
23 #include <gconf/gconf-client.h>
25 #include "../cpanel/prefs.h"
28 #define GETTEXT_PACKAGE "osso-applet-textinput"
29 #include <glib/gi18n-lib.h>
31 #define MONITOR_STATUS_MENU_ITEM_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE (obj, MONITOR_TYPE_STATUS_MENU_ITEM, MonitorStatusMenuItemPrivate))
33 struct _MonitorStatusMenuItemPrivate
38 HD_DEFINE_PLUGIN_MODULE (MonitorStatusMenuItem
, monitor_status_menu_item
, HD_TYPE_STATUS_MENU_ITEM
);
41 monitor_status_menu_item_class_finalize (MonitorStatusMenuItemClass
*klass
)
46 monitor_status_menu_item_finalize (GObject
*object
)
48 MonitorStatusMenuItem
*item
= MONITOR_STATUS_MENU_ITEM (object
);
49 MonitorStatusMenuItemPrivate
*priv
= item
->priv
;
52 g_object_unref (G_OBJECT (priv
->conf
));
56 G_OBJECT_CLASS (monitor_status_menu_item_parent_class
)->finalize (object
);
60 monitor_status_menu_item_class_init (MonitorStatusMenuItemClass
*klass
)
62 GObjectClass
*object_class
= G_OBJECT_CLASS (klass
);
64 object_class
->finalize
= monitor_status_menu_item_finalize
;
66 g_type_class_add_private (klass
, sizeof (MonitorStatusMenuItemPrivate
));
70 monitor_status_menu_item_init (MonitorStatusMenuItem
*item
)
72 MonitorStatusMenuItemPrivate
*priv
;
74 priv
= item
->priv
= MONITOR_STATUS_MENU_ITEM_GET_PRIVATE (item
);
76 priv
->conf
= gconf_client_get_default ();
80 gconf_client_add_dir (priv
->conf
, IM_CONF_DIR
, GCONF_CLIENT_PRELOAD_RECURSIVE
, NULL
);