aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/calendar/e-memo-shell-backend.c10
-rw-r--r--modules/calendar/e-memo-shell-view-actions.c25
-rw-r--r--modules/calendar/e-task-shell-backend.c10
-rw-r--r--modules/mail/e-mail-shell-view.c28
4 files changed, 48 insertions, 25 deletions
diff --git a/modules/calendar/e-memo-shell-backend.c b/modules/calendar/e-memo-shell-backend.c
index 84fb5458ae..067613e0c5 100644
--- a/modules/calendar/e-memo-shell-backend.c
+++ b/modules/calendar/e-memo-shell-backend.c
@@ -96,16 +96,18 @@ memo_shell_backend_ensure_sources (EShellBackend *shell_backend)
g_free (filename);
if (strlen (base_uri) > 7) {
- /* compare only file:// part. If user home dir name changes we do not want to create
- one more group */
+ /* Compare only file:// part. If user home dir name
+ * changes we do not want to create one more group. */
base_uri_seventh = base_uri[7];
base_uri[7] = 0;
} else {
base_uri_seventh = -1;
}
- on_this_computer = e_source_list_ensure_group (priv->source_list, _("On This Computer"), base_uri, TRUE);
- e_source_list_ensure_group (priv->source_list, _("On The Web"), WEB_BASE_URI, FALSE);
+ on_this_computer = e_source_list_ensure_group (
+ priv->source_list, _("On This Computer"), base_uri, TRUE);
+ e_source_list_ensure_group (
+ priv->source_list, _("On The Web"), WEB_BASE_URI, FALSE);
if (base_uri_seventh != -1) {
base_uri[7] = base_uri_seventh;
diff --git a/modules/calendar/e-memo-shell-view-actions.c b/modules/calendar/e-memo-shell-view-actions.c
index 7a0fdaf8af..7891a5add2 100644
--- a/modules/calendar/e-memo-shell-view-actions.c
+++ b/modules/calendar/e-memo-shell-view-actions.c
@@ -251,16 +251,24 @@ action_memo_list_properties_cb (GtkAction *action,
static void
action_memo_list_refresh_cb (GtkAction *action,
- EMemoShellView *memo_shell_view)
+ EMemoShellView *memo_shell_view)
{
+ EMemoShellContent *memo_shell_content;
+ EMemoShellSidebar *memo_shell_sidebar;
+ ESourceSelector *selector;
ECal *client;
ECalModel *model;
ESource *source;
gchar *uri;
GError *error = NULL;
- model = e_memo_shell_content_get_memo_model (memo_shell_view->priv->memo_shell_content);
- source = e_source_selector_peek_primary_selection (e_memo_shell_sidebar_get_selector (memo_shell_view->priv->memo_shell_sidebar));
+ memo_shell_content = memo_shell_view->priv->memo_shell_content;
+ memo_shell_sidebar = memo_shell_view->priv->memo_shell_sidebar;
+
+ model = e_memo_shell_content_get_memo_model (memo_shell_content);
+ selector = e_memo_shell_sidebar_get_selector (memo_shell_sidebar);
+
+ source = e_source_selector_peek_primary_selection (selector);
g_return_if_fail (E_IS_SOURCE (source));
uri = e_source_get_uri (source);
@@ -273,7 +281,10 @@ action_memo_list_refresh_cb (GtkAction *action,
g_return_if_fail (e_cal_get_refresh_supported (client));
if (!e_cal_refresh (client, &error) && error) {
- g_warning ("%s: Failed to refresh '%s', %s\n", G_STRFUNC, e_source_peek_name (source), error->message);
+ g_warning (
+ "%s: Failed to refresh '%s', %s\n",
+ G_STRFUNC, e_source_peek_name (source),
+ error->message);
g_error_free (error);
}
}
@@ -483,10 +494,12 @@ action_memo_save_as_cb (GtkAction *action,
comp_data = list->data;
g_slist_free (list);
- /* To Translators: Default filename part saving a memo to a file when no summary is filed, the '.ics' extension is concatenated to it */
+ /* Translators: Default filename part saving a memo to a file when
+ * no summary is filed, the '.ics' extension is concatenated to it. */
string = icalcomp_suggest_filename (comp_data->icalcomp, _("memo"));
file = e_shell_run_save_dialog (
- shell, _("Save as iCalendar"), string, "*.ics:text/calendar", NULL, NULL);
+ shell, _("Save as iCalendar"), string,
+ "*.ics:text/calendar", NULL, NULL);
g_free (string);
if (file == NULL)
return;
diff --git a/modules/calendar/e-task-shell-backend.c b/modules/calendar/e-task-shell-backend.c
index c17f73d044..d20a359e7d 100644
--- a/modules/calendar/e-task-shell-backend.c
+++ b/modules/calendar/e-task-shell-backend.c
@@ -99,16 +99,18 @@ task_shell_backend_ensure_sources (EShellBackend *shell_backend)
g_free (filename);
if (strlen (base_uri) > 7) {
- /* compare only file:// part. If user home dir name changes we do not want to create
- one more group */
+ /* Compare only file:// part. If user home dir name
+ * changes we do not want to create one more group. */
base_uri_seventh = base_uri[7];
base_uri[7] = 0;
} else {
base_uri_seventh = -1;
}
- on_this_computer = e_source_list_ensure_group (priv->source_list, _("On This Computer"), base_uri, TRUE);
- e_source_list_ensure_group (priv->source_list, _("On The Web"), WEB_BASE_URI, FALSE);
+ on_this_computer = e_source_list_ensure_group (
+ priv->source_list, _("On This Computer"), base_uri, TRUE);
+ e_source_list_ensure_group (
+ priv->source_list, _("On The Web"), WEB_BASE_URI, FALSE);
if (base_uri_seventh != -1) {
base_uri[7] = base_uri_seventh;
diff --git a/modules/mail/e-mail-shell-view.c b/modules/mail/e-mail-shell-view.c
index bd0b3cbe48..f216750005 100644
--- a/modules/mail/e-mail-shell-view.c
+++ b/modules/mail/e-mail-shell-view.c
@@ -365,7 +365,10 @@ filter:
}
static void
-has_unread_mail (GtkTreeModel *model, GtkTreeIter *parent, gboolean is_root, gboolean *has_unread)
+has_unread_mail (GtkTreeModel *model,
+ GtkTreeIter *parent,
+ gboolean is_root,
+ gboolean *has_unread)
{
guint unread = 0;
GtkTreeIter iter, child;
@@ -472,6 +475,7 @@ mail_shell_view_update_actions (EShellView *shell_view)
uri = em_folder_tree_get_selected_uri (folder_tree);
if (uri != NULL) {
+ GtkTreeRowReference *reference;
EMFolderTreeModel *model;
const gchar *folder_uri;
@@ -495,16 +499,18 @@ mail_shell_view_update_actions (EShellView *shell_view)
account != NULL && account->parent_uid != NULL;
model = em_folder_tree_model_get_default ();
- if (model) {
- GtkTreeRowReference *reference = em_folder_tree_model_lookup_uri (model, uri);
- if (reference != NULL) {
- GtkTreePath *path = gtk_tree_row_reference_get_path (reference);
- GtkTreeIter iter;
-
- gtk_tree_model_get_iter (GTK_TREE_MODEL (model), &iter, path);
- has_unread_mail (GTK_TREE_MODEL (model), &iter, TRUE, &folder_has_unread_rec);
- gtk_tree_path_free (path);
- }
+ reference = em_folder_tree_model_lookup_uri (model, uri);
+ if (reference != NULL) {
+ GtkTreePath *path;
+ GtkTreeIter iter;
+
+ path = gtk_tree_row_reference_get_path (reference);
+ gtk_tree_model_get_iter (
+ GTK_TREE_MODEL (model), &iter, path);
+ has_unread_mail (
+ GTK_TREE_MODEL (model), &iter,
+ TRUE, &folder_has_unread_rec);
+ gtk_tree_path_free (path);
}
g_free (uri);