[evolution] I#2046 - Remove some unused variables in the code



commit 04d1f53af32662f9d958659d126f536032eca84e
Author: Milan Crha <mcrha redhat com>
Date:   Tue Sep 27 13:41:30 2022 +0200

    I#2046 - Remove some unused variables in the code
    
    Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/2046

 src/mail/em-filter-context.c                    | 5 -----
 src/modules/calendar/e-cal-shell-view-memopad.c | 7 +------
 2 files changed, 1 insertion(+), 11 deletions(-)
---
diff --git a/src/mail/em-filter-context.c b/src/mail/em-filter-context.c
index cd62dfe721..e426b87e5b 100644
--- a/src/mail/em-filter-context.c
+++ b/src/mail/em-filter-context.c
@@ -121,7 +121,6 @@ filter_context_rename_uri (ERuleContext *context,
        GList *l, *el;
        EFilterPart *action;
        EFilterElement *element;
-       gint count = 0;
        GList *changed = NULL;
 
        /* For all rules, for all actions, for all elements, rename any
@@ -156,8 +155,6 @@ filter_context_rename_uri (ERuleContext *context,
                        changed = g_list_append (changed, g_strdup (rule->name));
                        e_filter_rule_emit_changed (rule);
                }
-
-               count += rulecount;
        }
 
        return changed;
@@ -176,7 +173,6 @@ filter_context_delete_uri (ERuleContext *context,
        GList *l, *el;
        EFilterPart *action;
        EFilterElement *element;
-       gint count = 0;
        GList *deleted = NULL;
 
        /* For all rules, for all actions, for all elements, check
@@ -201,7 +197,6 @@ filter_context_delete_uri (ERuleContext *context,
                                        l = l->next;
                                        em_filter_rule_remove_action ((EMFilterRule *) rule, action);
                                        g_object_unref (action);
-                                       count++;
                                        if (!recorded)
                                                deleted = g_list_append (deleted, g_strdup (rule->name));
                                        goto next_action;
diff --git a/src/modules/calendar/e-cal-shell-view-memopad.c b/src/modules/calendar/e-cal-shell-view-memopad.c
index 83053cae95..5d2da6fce9 100644
--- a/src/modules/calendar/e-cal-shell-view-memopad.c
+++ b/src/modules/calendar/e-cal-shell-view-memopad.c
@@ -320,7 +320,6 @@ e_cal_shell_view_memopad_actions_update (ECalShellView *cal_shell_view)
        EMemoTable *memo_table;
        GtkAction *action;
        GSList *list, *iter;
-       gboolean editable = TRUE;
        gboolean has_url = FALSE;
        gboolean sensitive;
        gint n_selected;
@@ -334,12 +333,8 @@ e_cal_shell_view_memopad_actions_update (ECalShellView *cal_shell_view)
        n_selected = e_table_selected_count (E_TABLE (memo_table));
 
        list = e_memo_table_get_selected (memo_table);
-       for (iter = list; iter != NULL; iter = iter->next) {
+       for (iter = list; iter != NULL && !has_url; iter = iter->next) {
                ECalModelComponent *comp_data = iter->data;
-               gboolean read_only;
-
-               read_only = e_client_is_readonly (E_CLIENT (comp_data->client));
-               editable &= !read_only;
 
                has_url |= e_cal_util_component_has_property (comp_data->icalcomp, I_CAL_URL_PROPERTY);
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]