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-task-shell-content.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'modules/calendar/e-task-shell-content.c') diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c index f0af66fa93..9cc924642c 100644 --- a/modules/calendar/e-task-shell-content.c +++ b/modules/calendar/e-task-shell-content.c @@ -209,7 +209,9 @@ task_shell_content_cursor_change_cb (ETaskShellContent *task_shell_content, e_cal_component_set_icalcomponent ( comp, icalcomponent_new_clone (comp_data->icalcomp)); e_cal_component_preview_display ( - task_preview, comp_data->client, comp); + task_preview, comp_data->client, comp, + e_cal_model_get_timezone (task_model), + e_cal_model_get_use_24_hour_format (task_model)); e_cal_component_get_uid (comp, &uid); g_free (task_shell_content->priv->current_uid); @@ -412,13 +414,11 @@ task_shell_content_constructed (GObject *object) { ETaskShellContentPrivate *priv; EShell *shell; - EShellSettings *shell_settings; EShellContent *shell_content; EShellTaskbar *shell_taskbar; EShellWindow *shell_window; EShellView *shell_view; GalViewInstance *view_instance; - icaltimezone *timezone; GtkTargetList *target_list; GtkTargetEntry *targets; GtkWidget *container; @@ -435,13 +435,9 @@ task_shell_content_constructed (GObject *object) shell_taskbar = e_shell_view_get_shell_taskbar (shell_view); shell_window = e_shell_view_get_shell_window (shell_view); shell = e_shell_window_get_shell (shell_window); - shell_settings = e_shell_get_shell_settings (shell); priv->task_model = e_cal_model_tasks_new (); - timezone = e_shell_settings_get_pointer ( - shell_settings, "cal-timezone"); - /* Build content widgets. */ container = GTK_WIDGET (object); @@ -477,8 +473,6 @@ task_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-task-shell-content.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'modules/calendar/e-task-shell-content.c') diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c index 9cc924642c..78680bc307 100644 --- a/modules/calendar/e-task-shell-content.c +++ b/modules/calendar/e-task-shell-content.c @@ -34,10 +34,6 @@ #include "calendar/gui/e-cal-component-preview.h" #include "calendar/gui/e-cal-model-tasks.h" -#define E_TASK_SHELL_CONTENT_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE \ - ((obj), E_TYPE_TASK_SHELL_CONTENT, ETaskShellContentPrivate)) - #define E_TASK_TABLE_DEFAULT_STATE \ "" \ "" \ @@ -275,7 +271,7 @@ task_shell_content_restore_state_cb (EShellWindow *shell_window, GObject *object; const gchar *key; - priv = E_TASK_SHELL_CONTENT_GET_PRIVATE (shell_content); + priv = E_TASK_SHELL_CONTENT (shell_content)->priv; /* Bind GObject properties to GConf keys. */ @@ -365,7 +361,7 @@ task_shell_content_dispose (GObject *object) { ETaskShellContentPrivate *priv; - priv = E_TASK_SHELL_CONTENT_GET_PRIVATE (object); + priv = E_TASK_SHELL_CONTENT (object)->priv; if (priv->paned != NULL) { g_object_unref (priv->paned); @@ -401,7 +397,7 @@ task_shell_content_finalize (GObject *object) { ETaskShellContentPrivate *priv; - priv = E_TASK_SHELL_CONTENT_GET_PRIVATE (object); + priv = E_TASK_SHELL_CONTENT (object)->priv; g_free (priv->current_uid); @@ -425,7 +421,7 @@ task_shell_content_constructed (GObject *object) GtkWidget *widget; gint n_targets; - priv = E_TASK_SHELL_CONTENT_GET_PRIVATE (object); + priv = E_TASK_SHELL_CONTENT (object)->priv; /* Chain up to parent's constructed() method. */ G_OBJECT_CLASS (parent_class)->constructed (object); @@ -627,7 +623,7 @@ task_shell_content_focus_search_results (EShellContent *shell_content) { ETaskShellContentPrivate *priv; - priv = E_TASK_SHELL_CONTENT_GET_PRIVATE (shell_content); + priv = E_TASK_SHELL_CONTENT (shell_content)->priv; gtk_widget_grab_focus (priv->task_table); } @@ -680,8 +676,7 @@ task_shell_content_class_init (ETaskShellContentClass *class) static void task_shell_content_init (ETaskShellContent *task_shell_content) { - task_shell_content->priv = - E_TASK_SHELL_CONTENT_GET_PRIVATE (task_shell_content); + task_shell_content->priv = G_TYPE_INSTANCE_GET_PRIVATE (task_shell_content, E_TYPE_TASK_SHELL_CONTENT, ETaskShellContentPrivate); /* 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-task-shell-content.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/calendar/e-task-shell-content.c') diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c index 78680bc307..f2d10e4a4d 100644 --- a/modules/calendar/e-task-shell-content.c +++ b/modules/calendar/e-task-shell-content.c @@ -676,7 +676,9 @@ task_shell_content_class_init (ETaskShellContentClass *class) static void task_shell_content_init (ETaskShellContent *task_shell_content) { - task_shell_content->priv = G_TYPE_INSTANCE_GET_PRIVATE (task_shell_content, E_TYPE_TASK_SHELL_CONTENT, ETaskShellContentPrivate); + task_shell_content->priv = G_TYPE_INSTANCE_GET_PRIVATE ( + task_shell_content, E_TYPE_TASK_SHELL_CONTENT, + ETaskShellContentPrivate); /* 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-task-shell-content.c | 1 - 1 file changed, 1 deletion(-) (limited to 'modules/calendar/e-task-shell-content.c') diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c index f2d10e4a4d..dbfa5fb7fc 100644 --- a/modules/calendar/e-task-shell-content.c +++ b/modules/calendar/e-task-shell-content.c @@ -469,7 +469,6 @@ task_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-task-shell-content.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'modules/calendar/e-task-shell-content.c') diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c index dbfa5fb7fc..b7937fb8f6 100644 --- a/modules/calendar/e-task-shell-content.c +++ b/modules/calendar/e-task-shell-content.c @@ -409,7 +409,6 @@ static void task_shell_content_constructed (GObject *object) { ETaskShellContentPrivate *priv; - EShell *shell; EShellContent *shell_content; EShellTaskbar *shell_taskbar; EShellWindow *shell_window; @@ -430,7 +429,6 @@ task_shell_content_constructed (GObject *object) shell_view = e_shell_content_get_shell_view (shell_content); shell_taskbar = e_shell_view_get_shell_taskbar (shell_view); shell_window = e_shell_view_get_shell_window (shell_view); - shell = e_shell_window_get_shell (shell_window); priv->task_model = e_cal_model_tasks_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-task-shell-content.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/calendar/e-task-shell-content.c') diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c index b7937fb8f6..2287ee893c 100644 --- a/modules/calendar/e-task-shell-content.c +++ b/modules/calendar/e-task-shell-content.c @@ -19,6 +19,10 @@ * */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include "e-task-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-task-shell-content.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/calendar/e-task-shell-content.c') diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c index 2287ee893c..0ffa6fb5a3 100644 --- a/modules/calendar/e-task-shell-content.c +++ b/modules/calendar/e-task-shell-content.c @@ -647,7 +647,8 @@ task_shell_content_class_init (ETaskShellContentClass *class) shell_content_class = E_SHELL_CONTENT_CLASS (class); shell_content_class->check_state = task_shell_content_check_state; - shell_content_class->focus_search_results = task_shell_content_focus_search_results; + shell_content_class->focus_search_results = + task_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-task-shell-content.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/calendar/e-task-shell-content.c') diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c index 0ffa6fb5a3..743bb937e7 100644 --- a/modules/calendar/e-task-shell-content.c +++ b/modules/calendar/e-task-shell-content.c @@ -115,7 +115,7 @@ task_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 ( @@ -577,15 +577,15 @@ task_shell_content_check_state (EShellContent *shell_content) const gchar *cap; 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; cap = CAL_STATIC_CAPABILITY_NO_TASK_ASSIGNMENT; - if (e_cal_get_static_capability (comp_data->client, cap)) + if (e_client_check_capability (E_CLIENT (comp_data->client), cap)) assignable = FALSE; cap = CAL_STATIC_CAPABILITY_NO_CONV_TO_ASSIGN_TASK; - if (e_cal_get_static_capability (comp_data->client, cap)) + if (e_client_check_capability (E_CLIENT (comp_data->client), cap)) assignable = FALSE; 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-task-shell-content.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'modules/calendar/e-task-shell-content.c') diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c index 743bb937e7..80e9239706 100644 --- a/modules/calendar/e-task-shell-content.c +++ b/modules/calendar/e-task-shell-content.c @@ -271,23 +271,22 @@ task_shell_content_restore_state_cb (EShellWindow *shell_window, EShellContent *shell_content) { ETaskShellContentPrivate *priv; - GConfBridge *bridge; + GSettings *settings; GObject *object; - const gchar *key; priv = E_TASK_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/task_hpane_position"; - gconf_bridge_bind_property_delayed (bridge, key, object, "hposition"); + g_settings_bind (settings, "task-hpane-position", object, "hposition", G_SETTINGS_BIND_DEFAULT); object = G_OBJECT (priv->paned); - key = "/apps/evolution/calendar/display/task_vpane_position"; - gconf_bridge_bind_property_delayed (bridge, key, object, "vposition"); + g_settings_bind (settings, "task-vpane-position", object, "vposition", G_SETTINGS_BIND_DEFAULT); + + g_object_unref (G_OBJECT (settings)); } static GtkOrientation -- cgit v1.2.3 From a6febf98900ac2e7b3f3787bad26fdb568370e9d Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Thu, 22 Sep 2011 17:44:42 +0200 Subject: Port some calendar plugins to use GSettings --- modules/calendar/e-task-shell-content.c | 1 - 1 file changed, 1 deletion(-) (limited to 'modules/calendar/e-task-shell-content.c') diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c index 80e9239706..cb2443f19d 100644 --- a/modules/calendar/e-task-shell-content.c +++ b/modules/calendar/e-task-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" -- cgit v1.2.3