From dce5bdc3699faf592453492fe201606ed47e06b9 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 2 Nov 2010 11:49:38 -0400 Subject: Move calendar preferences to the calendar module. Continue replacing the use of calendar-config functions with GObject property bindings to EShellSettings properties. --- modules/calendar/e-memo-shell-content.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'modules/calendar/e-memo-shell-content.c') diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c index 476460761c..a9d299e221 100644 --- a/modules/calendar/e-memo-shell-content.c +++ b/modules/calendar/e-memo-shell-content.c @@ -209,7 +209,9 @@ memo_shell_content_cursor_change_cb (EMemoShellContent *memo_shell_content, e_cal_component_set_icalcomponent ( comp, icalcomponent_new_clone (comp_data->icalcomp)); e_cal_component_preview_display ( - memo_preview, comp_data->client, comp); + memo_preview, comp_data->client, comp, + e_cal_model_get_timezone (memo_model), + e_cal_model_get_use_24_hour_format (memo_model)); e_cal_component_get_uid (comp, &uid); g_free (memo_shell_content->priv->current_uid); @@ -415,13 +417,11 @@ memo_shell_content_constructed (GObject *object) EMemoShellContentPrivate *priv; EShell *shell; EShellView *shell_view; - EShellSettings *shell_settings; EShellBackend *shell_backend; EShellContent *shell_content; EShellTaskbar *shell_taskbar; EShellWindow *shell_window; GalViewInstance *view_instance; - icaltimezone *timezone; GtkTargetList *target_list; GtkTargetEntry *targets; GtkWidget *container; @@ -438,15 +438,10 @@ memo_shell_content_constructed (GObject *object) shell_backend = e_shell_view_get_shell_backend (shell_view); shell_taskbar = e_shell_view_get_shell_taskbar (shell_view); shell_window = e_shell_view_get_shell_window (shell_view); - shell = e_shell_backend_get_shell (shell_backend); - shell_settings = e_shell_get_shell_settings (shell); priv->memo_model = e_cal_model_memos_new (); - timezone = e_shell_settings_get_pointer ( - shell_settings, "cal-timezone"); - /* Build content widgets. */ container = GTK_WIDGET (object); @@ -482,8 +477,6 @@ memo_shell_content_constructed (GObject *object) container = priv->paned; widget = e_cal_component_preview_new (); - e_cal_component_preview_set_default_timezone ( - E_CAL_COMPONENT_PREVIEW (widget), timezone); e_shell_configure_web_view (shell, E_WEB_VIEW (widget)); gtk_widget_show (widget); -- cgit v1.2.3 From c003c99a75587ba39a45d164272760c33f9666b5 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 25 Feb 2011 16:20:41 +0100 Subject: Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly --- modules/calendar/e-memo-shell-content.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'modules/calendar/e-memo-shell-content.c') diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c index a9d299e221..37e96fe47a 100644 --- a/modules/calendar/e-memo-shell-content.c +++ b/modules/calendar/e-memo-shell-content.c @@ -35,10 +35,6 @@ #include "calendar/gui/e-cal-model-memos.h" #include "calendar/gui/e-memo-table.h" -#define E_MEMO_SHELL_CONTENT_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE \ - ((obj), E_TYPE_MEMO_SHELL_CONTENT, EMemoShellContentPrivate)) - #define E_MEMO_TABLE_DEFAULT_STATE \ "" \ "" \ @@ -277,7 +273,7 @@ memo_shell_content_restore_state_cb (EShellWindow *shell_window, GObject *object; const gchar *key; - priv = E_MEMO_SHELL_CONTENT_GET_PRIVATE (shell_content); + priv = E_MEMO_SHELL_CONTENT (shell_content)->priv; /* Bind GObject properties to GConf keys. */ @@ -367,7 +363,7 @@ memo_shell_content_dispose (GObject *object) { EMemoShellContentPrivate *priv; - priv = E_MEMO_SHELL_CONTENT_GET_PRIVATE (object); + priv = E_MEMO_SHELL_CONTENT (object)->priv; if (priv->paned != NULL) { g_object_unref (priv->paned); @@ -403,7 +399,7 @@ memo_shell_content_finalize (GObject *object) { EMemoShellContentPrivate *priv; - priv = E_MEMO_SHELL_CONTENT_GET_PRIVATE (object); + priv = E_MEMO_SHELL_CONTENT (object)->priv; g_free (priv->current_uid); @@ -428,7 +424,7 @@ memo_shell_content_constructed (GObject *object) GtkWidget *widget; gint n_targets; - priv = E_MEMO_SHELL_CONTENT_GET_PRIVATE (object); + priv = E_MEMO_SHELL_CONTENT (object)->priv; /* Chain up to parent's constructed() method. */ G_OBJECT_CLASS (parent_class)->constructed (object); @@ -606,7 +602,7 @@ memo_shell_content_focus_search_results (EShellContent *shell_content) { EMemoShellContentPrivate *priv; - priv = E_MEMO_SHELL_CONTENT_GET_PRIVATE (shell_content); + priv = E_MEMO_SHELL_CONTENT (shell_content)->priv; gtk_widget_grab_focus (priv->memo_table); } @@ -659,8 +655,7 @@ memo_shell_content_class_init (EMemoShellContentClass *class) static void memo_shell_content_init (EMemoShellContent *memo_shell_content) { - memo_shell_content->priv = - E_MEMO_SHELL_CONTENT_GET_PRIVATE (memo_shell_content); + memo_shell_content->priv = G_TYPE_INSTANCE_GET_PRIVATE (memo_shell_content, E_TYPE_MEMO_SHELL_CONTENT, EMemoShellContentPrivate); /* Postpone widget construction until we have a shell view. */ } -- cgit v1.2.3 From 7aacf983b32ecac26bc9707697da622b3ef164a3 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 5 Mar 2011 12:33:49 -0500 Subject: Coding style and whitespace cleanup. --- modules/calendar/e-memo-shell-content.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/calendar/e-memo-shell-content.c') diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c index 37e96fe47a..bbf12de7db 100644 --- a/modules/calendar/e-memo-shell-content.c +++ b/modules/calendar/e-memo-shell-content.c @@ -655,7 +655,9 @@ memo_shell_content_class_init (EMemoShellContentClass *class) static void memo_shell_content_init (EMemoShellContent *memo_shell_content) { - memo_shell_content->priv = G_TYPE_INSTANCE_GET_PRIVATE (memo_shell_content, E_TYPE_MEMO_SHELL_CONTENT, EMemoShellContentPrivate); + memo_shell_content->priv = G_TYPE_INSTANCE_GET_PRIVATE ( + memo_shell_content, E_TYPE_MEMO_SHELL_CONTENT, + EMemoShellContentPrivate); /* Postpone widget construction until we have a shell view. */ } -- cgit v1.2.3 From 392973975c3e4a4e8fe17731b5e397ae10a91517 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 27 Mar 2011 15:16:39 -0400 Subject: Restore lockdown integration. With lockdown settings available through GSettings, widgets can handle lockdown integration themselves without having to use EShellSettings. Also fixed a few places where printing or save-to-disk actions were either not properly wired up or not responding to lockdown settings, but much more work needs done. Attachments, for example, are not honoring the disable-save-to-disk setting at all. This too requires the recently-added gsettings-desktop-schemas dependency. --- modules/calendar/e-memo-shell-content.c | 1 - 1 file changed, 1 deletion(-) (limited to 'modules/calendar/e-memo-shell-content.c') diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c index bbf12de7db..9e280e36ff 100644 --- a/modules/calendar/e-memo-shell-content.c +++ b/modules/calendar/e-memo-shell-content.c @@ -473,7 +473,6 @@ memo_shell_content_constructed (GObject *object) container = priv->paned; widget = e_cal_component_preview_new (); - e_shell_configure_web_view (shell, E_WEB_VIEW (widget)); gtk_widget_show (widget); g_signal_connect_swapped ( -- cgit v1.2.3 From c7398b967e885e3f0e371ff197a53bc8f7b974db Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 3 May 2011 10:45:46 -0400 Subject: Fix compiler warnings. Mostly dead assignments. --- modules/calendar/e-memo-shell-content.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'modules/calendar/e-memo-shell-content.c') diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c index 9e280e36ff..f9224b1462 100644 --- a/modules/calendar/e-memo-shell-content.c +++ b/modules/calendar/e-memo-shell-content.c @@ -411,9 +411,7 @@ static void memo_shell_content_constructed (GObject *object) { EMemoShellContentPrivate *priv; - EShell *shell; EShellView *shell_view; - EShellBackend *shell_backend; EShellContent *shell_content; EShellTaskbar *shell_taskbar; EShellWindow *shell_window; @@ -431,10 +429,8 @@ memo_shell_content_constructed (GObject *object) shell_content = E_SHELL_CONTENT (object); shell_view = e_shell_content_get_shell_view (shell_content); - shell_backend = e_shell_view_get_shell_backend (shell_view); shell_taskbar = e_shell_view_get_shell_taskbar (shell_view); shell_window = e_shell_view_get_shell_window (shell_view); - shell = e_shell_backend_get_shell (shell_backend); priv->memo_model = e_cal_model_memos_new (); -- cgit v1.2.3 From c24038c4f62f37b89d1bda9542ca5ccc843d4ea0 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 27 May 2011 15:23:07 +0200 Subject: Bug #646109 - Fix use of include to make sure translations work --- modules/calendar/e-memo-shell-content.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/calendar/e-memo-shell-content.c') diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c index f9224b1462..5c964fc505 100644 --- a/modules/calendar/e-memo-shell-content.c +++ b/modules/calendar/e-memo-shell-content.c @@ -19,6 +19,10 @@ * */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include "e-memo-shell-content.h" #include -- cgit v1.2.3 From e7954c3f251aabbf95d099159709c8c66dfedc44 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 4 Jun 2011 15:53:10 -0500 Subject: Coding style and whitespace cleanups. --- modules/calendar/e-memo-shell-content.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/calendar/e-memo-shell-content.c') diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c index 5c964fc505..9f7d0768b9 100644 --- a/modules/calendar/e-memo-shell-content.c +++ b/modules/calendar/e-memo-shell-content.c @@ -624,7 +624,8 @@ memo_shell_content_class_init (EMemoShellContentClass *class) shell_content_class = E_SHELL_CONTENT_CLASS (class); shell_content_class->check_state = memo_shell_content_check_state; - shell_content_class->focus_search_results = memo_shell_content_focus_search_results; + shell_content_class->focus_search_results = + memo_shell_content_focus_search_results; g_object_class_install_property ( object_class, -- cgit v1.2.3 From 84339b3be5a771406fcd5898bbd21dc1c5b98c82 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 14 Jun 2011 08:54:20 +0200 Subject: Do not use deprecated EBook/ECal API --- modules/calendar/e-memo-shell-content.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/calendar/e-memo-shell-content.c') diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c index 9f7d0768b9..f0f4fe958f 100644 --- a/modules/calendar/e-memo-shell-content.c +++ b/modules/calendar/e-memo-shell-content.c @@ -115,7 +115,7 @@ memo_shell_content_table_foreach_cb (gint model_row, ESource *source; const gchar *source_uid; - source = e_cal_get_source (comp_data->client); + source = e_client_get_source (E_CLIENT (comp_data->client)); source_uid = e_source_peek_uid (source); foreach_data->list = g_slist_prepend ( @@ -575,7 +575,7 @@ memo_shell_content_check_state (EShellContent *shell_content) icalproperty *prop; gboolean read_only; - e_cal_is_read_only (comp_data->client, &read_only, NULL); + read_only = e_client_is_readonly (E_CLIENT (comp_data->client)); editable &= !read_only; prop = icalcomponent_get_first_property ( -- cgit v1.2.3 From 8732431bd961e7f75e813803575a868bada78c79 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Wed, 21 Sep 2011 18:16:23 +0200 Subject: Port ETask/MemoShellContent to GSettings --- modules/calendar/e-memo-shell-content.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'modules/calendar/e-memo-shell-content.c') diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c index f0f4fe958f..60936ccb8c 100644 --- a/modules/calendar/e-memo-shell-content.c +++ b/modules/calendar/e-memo-shell-content.c @@ -28,7 +28,6 @@ #include #include "e-util/e-selection.h" -#include "e-util/gconf-bridge.h" #include "shell/e-shell-utils.h" #include "widgets/menus/gal-view-etable.h" #include "widgets/misc/e-paned.h" @@ -273,23 +272,20 @@ memo_shell_content_restore_state_cb (EShellWindow *shell_window, EShellContent *shell_content) { EMemoShellContentPrivate *priv; - GConfBridge *bridge; + GSettings *settings; GObject *object; - const gchar *key; priv = E_MEMO_SHELL_CONTENT (shell_content)->priv; - /* Bind GObject properties to GConf keys. */ + /* Bind GObject properties to settings keys. */ - bridge = gconf_bridge_get (); + settings = g_settings_new ("org.gnome.evolution.calendar"); object = G_OBJECT (priv->paned); - key = "/apps/evolution/calendar/display/memo_hpane_position"; - gconf_bridge_bind_property_delayed (bridge, key, object, "hposition"); + g_settings_bind (settings, "memo-hpane-position", object, "hposition", G_SETTINGS_BIND_DEFAULT); object = G_OBJECT (priv->paned); - key = "/apps/evolution/calendar/display/memo_vpane_position"; - gconf_bridge_bind_property_delayed (bridge, key, object, "vposition"); + g_settings_bind (settings, "memo-vpane-position", object, "vposition", G_SETTINGS_BIND_DEFAULT); } static GtkOrientation -- cgit v1.2.3