2 * e-settings-mail-browser.c
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program; if not, see <http://www.gnu.org/licenses/>.
18 #include "e-settings-mail-browser.h"
20 #include <mail/e-mail-browser.h>
22 #define E_SETTINGS_MAIL_BROWSER_GET_PRIVATE(obj) \
23 (G_TYPE_INSTANCE_GET_PRIVATE \
24 ((obj), E_TYPE_SETTINGS_MAIL_BROWSER, ESettingsMailBrowserPrivate))
26 G_DEFINE_DYNAMIC_TYPE (
28 e_settings_mail_browser
,
32 settings_mail_browser_constructed (GObject
*object
)
34 EExtensible
*extensible
;
37 /* Chain up parent's constructed() method. */
38 G_OBJECT_CLASS (e_settings_mail_browser_parent_class
)->constructed (object
);
40 extensible
= e_extension_get_extensible (E_EXTENSION (object
));
42 settings
= e_util_ref_settings ("org.gnome.evolution.mail");
44 /* This preference is selected directly from the mail
45 * browser window, so the binding must be bi-directional. */
47 settings
, "browser-close-on-reply-policy",
48 extensible
, "close-on-reply-policy",
53 settings
, "show-deleted",
54 extensible
, "show-deleted",
58 settings
, "show-junk",
59 extensible
, "show-junk",
63 settings
, "browser-close-on-delete-or-junk",
64 extensible
, "close-on-delete-or-junk",
67 g_object_unref (settings
);
71 e_settings_mail_browser_class_init (ESettingsMailBrowserClass
*class)
73 GObjectClass
*object_class
;
74 EExtensionClass
*extension_class
;
76 object_class
= G_OBJECT_CLASS (class);
77 object_class
->constructed
= settings_mail_browser_constructed
;
79 extension_class
= E_EXTENSION_CLASS (class);
80 extension_class
->extensible_type
= E_TYPE_MAIL_BROWSER
;
84 e_settings_mail_browser_class_finalize (ESettingsMailBrowserClass
*class)
89 e_settings_mail_browser_init (ESettingsMailBrowser
*extension
)
94 e_settings_mail_browser_type_register (GTypeModule
*type_module
)
96 /* XXX G_DEFINE_DYNAMIC_TYPE declares a static type registration
97 * function, so we have to wrap it with a public function in
98 * order to register types from a separate compilation unit. */
99 e_settings_mail_browser_register_type (type_module
);