aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/e-shell-backend.c2
-rw-r--r--shell/e-shell-migrate.c4
-rw-r--r--shell/e-shell-settings.c4
-rw-r--r--shell/e-shell-switcher.c4
-rw-r--r--shell/e-shell-window.c29
-rw-r--r--shell/es-event.c77
6 files changed, 46 insertions, 74 deletions
diff --git a/shell/e-shell-backend.c b/shell/e-shell-backend.c
index f4baca770f..3310122cb5 100644
--- a/shell/e-shell-backend.c
+++ b/shell/e-shell-backend.c
@@ -513,7 +513,7 @@ e_shell_backend_is_busy (EShellBackend *shell_backend)
**/
void
e_shell_backend_set_prefer_new_item (EShellBackend *shell_backend,
- const gchar *prefer_new_item)
+ const gchar *prefer_new_item)
{
g_return_if_fail (shell_backend != NULL);
g_return_if_fail (E_IS_SHELL_BACKEND (shell_backend));
diff --git a/shell/e-shell-migrate.c b/shell/e-shell-migrate.c
index b0fa40d146..3efddee61d 100644
--- a/shell/e-shell-migrate.c
+++ b/shell/e-shell-migrate.c
@@ -933,8 +933,8 @@ e_shell_migrate_attempt (EShell *shell)
if (!shell_migrate_attempt (shell, major, minor, micro))
_exit (EXIT_SUCCESS);
- /* The 2.32.x (except of 2.32.2) lefts duplicate On This Computer/Personal sources,
- * thus clean the mess up */
+ /* The 2.32.x (except of 2.32.2) lefts duplicate
+ * On This Computer/Personal sources, thus clean the mess up */
client = gconf_client_get_default ();
merge_duplicate_local_sources (client, "/apps/evolution/addressbook/sources");
merge_duplicate_local_sources (client, "/apps/evolution/calendar/sources");
diff --git a/shell/e-shell-settings.c b/shell/e-shell-settings.c
index a46123f325..bae19f1309 100644
--- a/shell/e-shell-settings.c
+++ b/shell/e-shell-settings.c
@@ -35,6 +35,10 @@
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_SHELL_SETTINGS, EShellSettingsPrivate))
+#define E_SHELL_SETTINGS_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SHELL_SETTINGS, EShellSettingsPrivate))
+
struct _EShellSettingsPrivate {
GArray *value_array;
guint debug : 1;
diff --git a/shell/e-shell-switcher.c b/shell/e-shell-switcher.c
index 1deefa5613..74d1a0538f 100644
--- a/shell/e-shell-switcher.c
+++ b/shell/e-shell-switcher.c
@@ -38,6 +38,10 @@
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_SHELL_SWITCHER, EShellSwitcherPrivate))
+#define E_SHELL_SWITCHER_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_SHELL_SWITCHER, EShellSwitcherPrivate))
+
#define H_PADDING 6
#define V_PADDING 6
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c
index a8b44e67db..ee87446209 100644
--- a/shell/e-shell-window.c
+++ b/shell/e-shell-window.c
@@ -81,9 +81,10 @@ shell_window_menubar_update_new_menu (EShellWindow *shell_window)
gtk_widget_show (widget);
}
-static void shell_window_backend_prefer_item_changed_cb (EShellBackend *backend,
- GParamSpec *pspec,
- EShellWindow *shell_window);
+static void shell_window_backend_prefer_item_changed_cb
+ (EShellBackend *backend,
+ GParamSpec *pspec,
+ EShellWindow *shell_window);
static void
shell_window_toolbar_update_new_menu (EShellWindow *shell_window,
@@ -106,19 +107,25 @@ shell_window_toolbar_update_new_menu (EShellWindow *shell_window,
shell_backend = e_shell_view_get_shell_backend (shell_view);
- g_signal_handlers_disconnect_by_func (shell_backend,
- shell_window_backend_prefer_item_changed_cb, shell_window);
- g_signal_connect (shell_backend, "notify::prefer-new-item",
- G_CALLBACK (shell_window_backend_prefer_item_changed_cb), shell_window);
+ g_signal_handlers_disconnect_by_func (
+ shell_backend,
+ shell_window_backend_prefer_item_changed_cb,
+ shell_window);
- shell_window_backend_prefer_item_changed_cb (shell_backend, NULL, shell_window);
+ g_signal_connect (
+ shell_backend, "notify::prefer-new-item",
+ G_CALLBACK (shell_window_backend_prefer_item_changed_cb),
+ shell_window);
+
+ shell_window_backend_prefer_item_changed_cb (
+ shell_backend, NULL, shell_window);
}
}
static void
shell_window_backend_prefer_item_changed_cb (EShellBackend *backend,
- GParamSpec *pspec,
- EShellWindow *shell_window)
+ GParamSpec *pspec,
+ EShellWindow *shell_window)
{
EShellView *shell_view;
EShellBackend *shell_backend;
@@ -1560,7 +1567,7 @@ e_shell_window_set_toolbar_visible (EShellWindow *shell_window,
**/
void
e_shell_window_set_toolbar_new_prefer_item (EShellWindow *shell_window,
- const gchar *prefer_item)
+ const gchar *prefer_item)
{
GtkWidget *toolbar;
GtkToolItem *item;
diff --git a/shell/es-event.c b/shell/es-event.c
index f6920e5d09..3ca16f9fe5 100644
--- a/shell/es-event.c
+++ b/shell/es-event.c
@@ -30,39 +30,18 @@
#include "es-event.h"
#include "e-shell.h"
-static GObjectClass *eme_parent;
static ESEvent *es_event;
-static void
-eme_class_init (GObjectClass *class)
-{
-}
+G_DEFINE_TYPE (ESEvent, es_event, E_TYPE_EVENT)
static void
-eme_init (GObject *o)
+es_event_class_init (ESEventClass *class)
{
- /*ESEvent *eme = (ESEvent *)o; */
}
-GType
-es_event_get_type (void)
+static void
+es_event_init (ESEvent *event)
{
- static GType type = 0;
-
- if (type == 0) {
- static const GTypeInfo info = {
- sizeof (ESEventClass),
- NULL, NULL,
- (GClassInitFunc) eme_class_init,
- NULL, NULL,
- sizeof (ESEvent), 0,
- (GInstanceInitFunc) eme_init
- };
- eme_parent = g_type_class_ref (e_event_get_type ());
- type = g_type_register_static(e_event_get_type(), "ESEvent", &info, 0);
- }
-
- return type;
}
/**
@@ -72,7 +51,8 @@ es_event_get_type (void)
*
* Return: the shell event handler
**/
-ESEvent *es_event_peek (void)
+ESEvent *
+es_event_peek (void)
{
if (es_event == NULL) {
es_event = g_object_new (es_event_get_type (), NULL);
@@ -106,8 +86,7 @@ es_event_target_new_upgrade (ESEvent *eme,
/* ********************************************************************** */
-static gpointer emeh_parent_class;
-#define emeh ((ESEventHook *)eph)
+G_DEFINE_TYPE (ESEventHook, es_event_hook, E_TYPE_EVENT_HOOK)
static const EEventHookTargetMap emeh_targets[] = {
{ "upgrade", ES_EVENT_TARGET_UPGRADE, NULL },
@@ -115,16 +94,10 @@ static const EEventHookTargetMap emeh_targets[] = {
};
static void
-emeh_finalize (GObject *o)
-{
- /*EPluginHook *eph = (EPluginHook *)o;*/
-
- ((GObjectClass *) emeh_parent_class)->finalize (o);
-}
-
-static void
-emeh_class_init (EPluginHookClass *class)
+es_event_hook_class_init (ESEventHookClass *class)
{
+ EPluginHookClass *plugin_hook_class;
+ EEventHookClass *event_hook_class;
gint i;
/** @HookClass: Shell Main Menu
@@ -134,35 +107,19 @@ emeh_class_init (EPluginHookClass *class)
* A hook for events coming from the shell.
**/
- ((GObjectClass *) class)->finalize = emeh_finalize;
- ((EPluginHookClass *)class)->id = "org.gnome.evolution.shell.events:1.0";
+ plugin_hook_class = E_PLUGIN_HOOK_CLASS (class);
+ plugin_hook_class->id = "org.gnome.evolution.shell.events:1.0";
for (i = 0; emeh_targets[i].type; i++)
e_event_hook_class_add_target_map (
(EEventHookClass *) class, &emeh_targets[i]);
- ((EEventHookClass *) class)->event = (EEvent *) es_event_peek ();
+ event_hook_class = E_EVENT_HOOK_CLASS (class);
+ event_hook_class->event = (EEvent *) es_event_peek ();
}
-GType
-es_event_hook_get_type (void)
+static void
+es_event_hook_init (ESEventHook *hook)
{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (ESEventHookClass),
- NULL, NULL,
- (GClassInitFunc) emeh_class_init,
- NULL, NULL,
- sizeof (ESEventHook),
- 0, (GInstanceInitFunc) NULL
- };
-
- emeh_parent_class = g_type_class_ref (e_event_hook_get_type ());
- type = g_type_register_static (
- e_event_hook_get_type(), "ESEventHook", &info, 0);
- }
-
- return type;
}
+