diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-01-15 23:16:25 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-01-16 10:50:05 +0800 |
commit | cae22334fa6bc395ccc421b09e0af94c89297c41 (patch) | |
tree | 84881f467c0448db044d8bb3533e044a7152bb2b | |
parent | d37784ed3db20fd74ea4b8d9fdfe58518370cea2 (diff) | |
download | gsoc2013-evolution-cae22334fa6bc395ccc421b09e0af94c89297c41.tar.gz gsoc2013-evolution-cae22334fa6bc395ccc421b09e0af94c89297c41.tar.zst gsoc2013-evolution-cae22334fa6bc395ccc421b09e0af94c89297c41.zip |
Remove dead assignments found by clang.
125 files changed, 107 insertions, 623 deletions
diff --git a/addressbook/conduit/address-conduit.c b/addressbook/conduit/address-conduit.c index 3c2436dc27..73fb68b0ee 100644 --- a/addressbook/conduit/address-conduit.c +++ b/addressbook/conduit/address-conduit.c @@ -1147,7 +1147,6 @@ local_record_from_ecard (EAddrLocalRecord *local, EContact *contact, EAddrCondui { EContactAddress *address = NULL; gint phone = entryPhone1; - EContactField field; gboolean syncable; gint i; @@ -1222,9 +1221,10 @@ local_record_from_ecard (EAddrLocalRecord *local, EContact *contact, EAddrCondui local->addr->entry[entryTitle] = e_pilot_utf8_to_pchar (e_contact_get_const (contact, E_CONTACT_TITLE), ctxt->pilot_charset); /* See if the default has something in it */ - if ((address = e_contact_get (contact, ctxt->cfg->default_address))) { - field = ctxt->cfg->default_address; - } else { + address = e_contact_get (contact, ctxt->cfg->default_address); + if (address == NULL) { + EContactField field; + /* Try to find a non-empty address field */ for (field = E_CONTACT_FIRST_ADDRESS_ID; field <= E_CONTACT_LAST_ADDRESS_ID; field++) { if ((address = e_contact_get (contact, field))) diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c index 18495d59c9..0b0c71711d 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c +++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c @@ -512,11 +512,8 @@ contact_list_editor_drag_drop_cb (GtkWidget *widget, gint x, gint y, guint time) { - EContactListEditor *editor; GList *iter; - editor = contact_list_editor_extract (widget); - for (iter = context->targets; iter != NULL; iter = iter->next) { GdkAtom target = GDK_POINTER_TO_ATOM (iter->data); gchar *possible_type; @@ -547,11 +544,8 @@ contact_list_editor_drag_motion_cb (GtkWidget *widget, gint x, gint y, guint time) { - EContactListEditor *editor; GList *iter; - editor = contact_list_editor_extract (widget); - for (iter = context->targets; iter != NULL; iter = iter->next) { GdkAtom target = GDK_POINTER_TO_ATOM (iter->data); gchar *possible_type; diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index bcf6ed6277..cc540c14c3 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -1252,7 +1252,6 @@ e_addressbook_view_delete_selection(EAddressbookView *view, gboolean is_delete) ETable *etable = NULL; EAddressbookModel *model; EBook *book; - EMinicardView *card_view; ESelectionModel *selection_model = NULL; GalViewInstance *view_instance; GalView *gal_view; @@ -1280,8 +1279,6 @@ e_addressbook_view_delete_selection(EAddressbookView *view, gboolean is_delete) widget = gtk_bin_get_child (GTK_BIN (view)); if (GAL_IS_VIEW_MINICARD (gal_view)) { - card_view = e_minicard_view_widget_get_view ( - E_MINICARD_VIEW_WIDGET (view->priv->object)); selection_model = e_addressbook_view_get_selection_model (view); row = e_selection_model_cursor_row (selection_model); } @@ -1363,19 +1360,12 @@ e_addressbook_view_delete_selection(EAddressbookView *view, gboolean is_delete) void e_addressbook_view_view (EAddressbookView *view) { - EAddressbookModel *model; - EBook *book; GList *list, *iter; - gboolean editable; gint response; guint length; g_return_if_fail (E_IS_ADDRESSBOOK_VIEW (view)); - model = e_addressbook_view_get_model (view); - book = e_addressbook_model_get_book (model); - editable = e_addressbook_model_get_editable (model); - list = e_addressbook_view_get_selected (view); length = g_list_length (list); response = GTK_RESPONSE_YES; diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c index a3d7e3aad4..04bf9757e4 100644 --- a/addressbook/gui/widgets/e-minicard.c +++ b/addressbook/gui/widgets/e-minicard.c @@ -983,7 +983,6 @@ remodel( EMinicard *e_minicard ) count = 5; else count = count + g_list_length (email); - is_email=FALSE; g_list_free (email); } else { string = e_contact_get(e_minicard->contact, field); diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c index 84f7cba538..dda6081137 100644 --- a/addressbook/gui/widgets/eab-contact-display.c +++ b/addressbook/gui/widgets/eab-contact-display.c @@ -916,17 +916,6 @@ contact_display_dispose (GObject *object) } static void -contact_display_finalize (GObject *object) -{ - EABContactDisplayPrivate *priv; - - priv = EAB_CONTACT_DISPLAY_GET_PRIVATE (object); - - /* Chain up to parent's finalize() method. */ - G_OBJECT_CLASS (parent_class)->finalize (object); -} - -static void contact_display_url_requested (GtkHTML *html, const gchar *uri, GtkHTMLStream *handle) @@ -1094,7 +1083,6 @@ eab_contact_display_class_init (EABContactDisplayClass *class) object_class->set_property = contact_display_set_property; object_class->get_property = contact_display_get_property; object_class->dispose = contact_display_dispose; - object_class->finalize = contact_display_finalize; html_class = GTK_HTML_CLASS (class); html_class->url_requested = contact_display_url_requested; diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c index 4f84eed6e4..31d05d278c 100644 --- a/addressbook/gui/widgets/eab-gui-util.c +++ b/addressbook/gui/widgets/eab-gui-util.c @@ -233,7 +233,6 @@ eab_select_source (const gchar *title, const gchar *message, const gchar *select ESourceList *source_list; GtkWidget *dialog; GtkWidget *ok_button; - GtkWidget *cancel_button; /* GtkWidget *label; */ GtkWidget *selector; GtkWidget *scrolled_window; @@ -247,7 +246,7 @@ eab_select_source (const gchar *title, const gchar *message, const gchar *select NULL); gtk_window_set_default_size (GTK_WINDOW (dialog), 350, 300); - cancel_button = gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); + gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); ok_button = gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_OK, GTK_RESPONSE_ACCEPT); gtk_widget_set_sensitive (ok_button, FALSE); diff --git a/addressbook/importers/evolution-csv-importer.c b/addressbook/importers/evolution-csv-importer.c index 81dc9b6dac..6a12d7075a 100644 --- a/addressbook/importers/evolution-csv-importer.c +++ b/addressbook/importers/evolution-csv-importer.c @@ -298,18 +298,11 @@ static EContactDate* date_from_string (const gchar *str) { EContactDate* date; - gint length; - gchar *t; gint i = 0; g_return_val_if_fail (str != NULL, NULL); date = e_contact_date_new(); - /* ignore time part */ - if ((t = strchr (str, 'T')) != NULL) - length = t - str; - else - length = strlen(str); if (g_ascii_isdigit (str[i]) && g_ascii_isdigit (str[i+1])) { date->month = str[i] * 10 + str[i+1] - '0' * 11; diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c index 07b13d2122..fb135baa23 100644 --- a/addressbook/printing/e-contact-print.c +++ b/addressbook/printing/e-contact-print.c @@ -211,12 +211,6 @@ e_contact_print_letter_heading (EContactPrintContext *ctxt, gchar *letter) static void e_contact_start_new_page (EContactPrintContext *ctxt) { - cairo_t *cr; - - cr = gtk_print_context_get_cairo_context (ctxt->context); - - /*cairo_show_page (cr);*/ - ctxt->x = ctxt->y = .0; ctxt->column = 0; ctxt->pages++; diff --git a/addressbook/util/eab-book-util.c b/addressbook/util/eab-book-util.c index 84529c9214..6975143bd1 100644 --- a/addressbook/util/eab-book-util.c +++ b/addressbook/util/eab-book-util.c @@ -214,7 +214,7 @@ eab_contact_list_from_string (const gchar *str) p++; } - q = p = str_stripped = g_string_free (gstr, FALSE); + p = str_stripped = g_string_free (gstr, FALSE); /* Note: The vCard standard says * diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c index f7160451bb..d8ccda8d72 100644 --- a/calendar/gui/alarm-notify/alarm-queue.c +++ b/calendar/gui/alarm-notify/alarm-queue.c @@ -212,11 +212,10 @@ queue_midnight_refresh (void) static void add_client_alarms_cb (gpointer key, gpointer value, gpointer data) { - ClientAlarms *ca = (ClientAlarms *)data; + ClientAlarms *ca = (ClientAlarms *) value; d(printf("%s:%d (add_client_alarms_cb) - Adding %p\n",__FILE__, __LINE__, ca)); - ca = value; load_alarms_for_today (ca); } diff --git a/calendar/gui/alarm-notify/config-data.c b/calendar/gui/alarm-notify/config-data.c index 406c28abd6..12d7aefa47 100644 --- a/calendar/gui/alarm-notify/config-data.c +++ b/calendar/gui/alarm-notify/config-data.c @@ -174,12 +174,9 @@ config_data_replace_string_list (const gchar *key, for (tmp = source; tmp; tmp = tmp->next) { if (strcmp (tmp->data, old) == 0) { - gboolean state; - g_free (tmp->data); tmp->data = g_strdup ((gchar *) new); - /* Should this be checked somewhere? */ - state = gconf_client_set_list (conf_client, + gconf_client_set_list (conf_client, key, GCONF_VALUE_STRING, source, diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 21384032d9..7e16d8924e 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -2516,12 +2516,6 @@ fill_widgets (CompEditor *editor) view = E_ATTACHMENT_VIEW (editor->priv->attachment_view); store = e_attachment_view_get_store (view); - view = E_ATTACHMENT_VIEW (editor->priv->attachment_view); - store = e_attachment_view_get_store (view); - - view = E_ATTACHMENT_VIEW (editor->priv->attachment_view); - store = e_attachment_view_get_store (view); - priv = editor->priv; /*Check if attachments are available here and set them*/ diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index 61ebb081e8..35339de8e4 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -1655,17 +1655,17 @@ edit_clicked_cb (GtkButton *btn, EventPage *epage) EventPagePrivate *priv; GtkTreePath *path = NULL; GtkTreeViewColumn *focus_col; - gint row = 0; priv = epage->priv; - gtk_tree_view_get_cursor (GTK_TREE_VIEW (priv->list_view), &path, NULL); + gtk_tree_view_get_cursor ( + GTK_TREE_VIEW (priv->list_view), &path, NULL); g_return_if_fail (path != NULL); - row = gtk_tree_path_get_indices (path)[0]; - - gtk_tree_view_get_cursor (GTK_TREE_VIEW (priv->list_view), &path, &focus_col); - gtk_tree_view_set_cursor (GTK_TREE_VIEW (priv->list_view), path, focus_col, TRUE); + gtk_tree_view_get_cursor ( + GTK_TREE_VIEW (priv->list_view), &path, &focus_col); + gtk_tree_view_set_cursor ( + GTK_TREE_VIEW (priv->list_view), path, focus_col, TRUE); gtk_tree_path_free (path); } @@ -2472,13 +2472,11 @@ start_timezone_changed_cb (GtkWidget *widget, EventPage *epage) { EventPagePrivate *priv = epage->priv; - icaltimezone *zone; if (priv->sync_timezones) { - zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (priv->start_timezone)); comp_editor_page_set_updating (COMP_EDITOR_PAGE (epage), TRUE); /*the earlier method caused an infinite recursion*/ - priv->end_timezone=priv->start_timezone; + priv->end_timezone = priv->start_timezone; gtk_widget_show_all (priv->end_timezone); comp_editor_page_set_updating (COMP_EDITOR_PAGE (epage), FALSE); } diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c index 98b6545e18..949836a330 100644 --- a/calendar/gui/dialogs/memo-page.c +++ b/calendar/gui/dialogs/memo-page.c @@ -488,14 +488,12 @@ fill_comp_with_recipients (ENameSelector *name_selector, ECalComponent *comp) for (l = list_dests; l; l = l->next) { EDestination *dest = l->data; - const gchar *name, *attendee = NULL; + const gchar *attendee = NULL; - name = e_destination_get_name (dest); - - /* If we couldn't get the attendee prior, get the email address as the default */ - if (attendee == NULL || *attendee == '\0') { + /* If we couldn't get the attendee prior, + * get the email address as the default. */ + if (attendee == NULL || *attendee == '\0') attendee = e_destination_get_email (dest); - } if (attendee == NULL || *attendee == '\0') continue; diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c index 448ba7546f..e71a3445ae 100644 --- a/calendar/gui/dialogs/recurrence-page.c +++ b/calendar/gui/dialogs/recurrence-page.c @@ -708,7 +708,7 @@ simple_recur_to_comp (RecurrencePage *rpage, ECalComponent *comp) r.by_day[i++] = ICAL_FRIDAY_WEEKDAY; if (day_mask & (1 << 6)) - r.by_day[i++] = ICAL_SATURDAY_WEEKDAY; + r.by_day[i] = ICAL_SATURDAY_WEEKDAY; break; } diff --git a/calendar/gui/dialogs/schedule-page.c b/calendar/gui/dialogs/schedule-page.c index 4c2b5cf9d0..32b6dffab8 100644 --- a/calendar/gui/dialogs/schedule-page.c +++ b/calendar/gui/dialogs/schedule-page.c @@ -252,12 +252,10 @@ static gboolean schedule_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) { SchedulePage *spage; - SchedulePagePrivate *priv; ECalComponentDateTime start_date, end_date; gboolean validated = TRUE; spage = SCHEDULE_PAGE (page); - priv = spage->priv; /* Clean the screen */ clear_widgets (spage); @@ -291,10 +289,8 @@ static void schedule_page_set_dates (CompEditorPage *page, CompEditorPageDates *dates) { SchedulePage *spage; - SchedulePagePrivate *priv; spage = SCHEDULE_PAGE (page); - priv = spage->priv; comp_editor_page_set_updating (page, TRUE); update_time (spage, dates->start, dates->end); diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c index 96c2badf1a..4a5b5b094e 100644 --- a/calendar/gui/dialogs/task-details-page.c +++ b/calendar/gui/dialogs/task-details-page.c @@ -528,8 +528,6 @@ date_changed_cb (EDateEdit *dedit, icalproperty_status status; gboolean date_set; - priv = tdpage->priv; - if (comp_editor_page_get_updating (COMP_EDITOR_PAGE (tdpage))) return; diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c index afc2368d2c..906e960c17 100644 --- a/calendar/gui/dialogs/task-page.c +++ b/calendar/gui/dialogs/task-page.c @@ -1425,8 +1425,6 @@ date_changed_cb (EDateEdit *dedit, struct icaltimetype start_tt = icaltime_null_time(); struct icaltimetype due_tt = icaltime_null_time(); - priv = tpage->priv; - if (comp_editor_page_get_updating (COMP_EDITOR_PAGE (tpage))) return; diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index e53dd1d77d..015aa61cec 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -2193,12 +2193,10 @@ add_new_client (ECalModel *model, ECal *client, gboolean do_query) void e_cal_model_add_client (ECalModel *model, ECal *client) { - ECalModelClient *client_data; - g_return_if_fail (E_IS_CAL_MODEL (model)); g_return_if_fail (E_IS_CAL (client)); - /* Check this return value or drop the assignment? */ - client_data = add_new_client (model, client, TRUE); + + add_new_client (model, client, TRUE); } static void diff --git a/calendar/gui/e-calendar-selector.c b/calendar/gui/e-calendar-selector.c index 94bd5ae339..d46b4dad18 100644 --- a/calendar/gui/e-calendar-selector.c +++ b/calendar/gui/e-calendar-selector.c @@ -110,22 +110,14 @@ calendar_selector_data_dropped (ESourceSelector *selector, GdkDragAction action, guint info) { - GtkTreeView *tree_view; - GtkTreeModel *model; GtkTreePath *path = NULL; ECal *client; icalcomponent *icalcomp; const gchar *string; - gboolean remove_from_source; gboolean success = FALSE; gpointer object = NULL; - tree_view = GTK_TREE_VIEW (selector); - model = gtk_tree_view_get_model (tree_view); - string = (const gchar *) selection_data->data; - remove_from_source = (action == GDK_ACTION_MOVE); - icalcomp = icalparser_parse_string (string); if (icalcomp == NULL) @@ -143,10 +135,8 @@ calendar_selector_data_dropped (ESourceSelector *selector, destination, E_CAL_SOURCE_TYPE_EVENT); if (client != NULL) { - if (e_cal_open (client, TRUE, NULL)) { - success = TRUE; + if (e_cal_open (client, TRUE, NULL)) calendar_selector_update_objects (client, icalcomp); - } g_object_unref (client); } @@ -162,7 +152,7 @@ exit: if (object != NULL) g_object_unref (object); - return TRUE; + return success; } static void diff --git a/calendar/gui/e-cell-date-edit-text.c b/calendar/gui/e-cell-date-edit-text.c index 97dee085ea..bebec0fcda 100644 --- a/calendar/gui/e-cell-date-edit-text.c +++ b/calendar/gui/e-cell-date-edit-text.c @@ -115,7 +115,6 @@ cell_date_edit_text_get_text (ECellText *cell, { ECellDateEditText *ecd = E_CELL_DATE_EDIT_TEXT (cell); ECellDateEditValue *dv = e_table_model_value_at (model, col, row); - gboolean use_24_hour_format; icaltimezone *timezone; struct tm tmp_tm; @@ -123,7 +122,6 @@ cell_date_edit_text_get_text (ECellText *cell, return g_strdup (""); timezone = e_cell_date_edit_text_get_timezone (ecd); - use_24_hour_format = e_cell_date_edit_text_get_use_24_hour_format (ecd); /* Note that although the property may be in a different timezone, we convert it to the current timezone to display diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c index 16be4ffc89..6c234bf3d1 100644 --- a/calendar/gui/e-day-view-main-item.c +++ b/calendar/gui/e-day-view-main-item.c @@ -992,8 +992,6 @@ day_view_main_item_draw (GnomeCanvasItem *canvas_item, { EDayViewMainItem *main_item; EDayView *day_view; - GtkStyle *style; - GdkGC *gc; gint row, row_y, grid_x1, grid_x2; gint day, grid_y1, grid_y2; gint work_day_start_y, work_day_end_y; @@ -1012,7 +1010,6 @@ day_view_main_item_draw (GnomeCanvasItem *canvas_item, day_view = e_day_view_main_item_get_day_view (main_item); g_return_if_fail (day_view != NULL); - style = gtk_widget_get_style (GTK_WIDGET (day_view)); rect.x = 0; rect.y = 0; rect.width = width; @@ -1021,7 +1018,6 @@ day_view_main_item_draw (GnomeCanvasItem *canvas_item, /* Paint the background colors. */ work_day_start_y = e_day_view_convert_time_to_position (day_view, day_view->work_day_start_hour, day_view->work_day_start_minute) - y; - gc = day_view->main_gc; work_day_end_y = e_day_view_convert_time_to_position (day_view, day_view->work_day_end_hour, day_view->work_day_end_minute) - y; today_tt = icaltime_from_timet_with_zone (time (NULL), FALSE, diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c index 211faa5ec8..6b6a6fd8f7 100644 --- a/calendar/gui/e-day-view-top-item.c +++ b/calendar/gui/e-day-view-top-item.c @@ -71,7 +71,6 @@ day_view_top_item_draw_triangle (EDayViewTopItem *top_item, { EDayView *day_view; EDayViewEvent *event; - GdkGC *gc; GdkColor bg_color; GdkPoint points[3]; gint c1, c2; @@ -81,8 +80,6 @@ day_view_top_item_draw_triangle (EDayViewTopItem *top_item, day_view = e_day_view_top_item_get_day_view (top_item); - gc = day_view->main_gc; - points[0].x = x; points[0].y = y; points[1].x = x + w; @@ -165,7 +162,6 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item, cairo_t *cr; cairo_pattern_t *pat; guint16 red, green, blue; - GdkColor fg; gdouble cc = 65535.0; gboolean gradient; gfloat alpha; @@ -197,7 +193,6 @@ day_view_top_item_draw_long_event (EDayViewTopItem *top_item, style = gtk_widget_get_style (GTK_WIDGET (day_view)); gc = day_view->main_gc; fg_gc = style->fg_gc[GTK_STATE_NORMAL]; - fg = style->fg[GTK_STATE_NORMAL]; comp = e_cal_component_new (); e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp)); @@ -584,14 +579,14 @@ day_view_top_item_draw (GnomeCanvasItem *canvas_item, EDayViewTopItem *top_item; EDayView *day_view; GtkStyle *style; - GdkGC *gc, *fg_gc, *bg_gc, *light_gc, *dark_gc; + GdkGC *fg_gc; gchar buffer[128]; GdkRectangle clip_rect; gint canvas_width, canvas_height, left_edge, day, date_width, date_x; gint item_height, event_num; PangoLayout *layout; cairo_t *cr; - GdkColor fg, bg, light, dark; + GdkColor bg, light, dark; gboolean show_dates; top_item = E_DAY_VIEW_TOP_ITEM (canvas_item); @@ -602,17 +597,12 @@ day_view_top_item_draw (GnomeCanvasItem *canvas_item, cr = gdk_cairo_create (drawable); style = gtk_widget_get_style (GTK_WIDGET (day_view)); - gc = day_view->main_gc; fg_gc = style->fg_gc[GTK_STATE_NORMAL]; - bg_gc = style->bg_gc[GTK_STATE_NORMAL]; - light_gc = style->light_gc[GTK_STATE_NORMAL]; - dark_gc = style->dark_gc[GTK_STATE_NORMAL]; canvas_width = GTK_WIDGET (canvas_item->canvas)->allocation.width; canvas_height = (show_dates ? 1 : (MAX (1, day_view->rows_in_top_display) + 1)) * day_view->top_row_height; left_edge = 0; item_height = day_view->top_row_height - E_DAY_VIEW_TOP_CANVAS_Y_GAP; - fg = style->fg[GTK_STATE_NORMAL]; bg = style->bg[GTK_STATE_NORMAL]; light = style->light[GTK_STATE_NORMAL]; dark = style->dark[GTK_STATE_NORMAL]; diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index 3df4e6943e..3a276a5aef 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -321,8 +321,6 @@ static void e_day_view_reshape_day_event (EDayView *day_view, gint day, gint event_num); static void e_day_view_reshape_main_canvas_resize_bars (EDayView *day_view); -static void e_day_view_reshape_resize_long_event_rect_item (EDayView *day_view); -static void e_day_view_reshape_resize_rect_item (EDayView *day_view); static void e_day_view_ensure_events_sorted (EDayView *day_view); @@ -1975,17 +1973,12 @@ e_day_view_foreach_event (EDayView *day_view, EDayViewForeachEventCallback callback, gpointer data) { - /* event is never used after being set in the for loop below, why? */ - EDayViewEvent *event; gint day, event_num; for (day = 0; day < day_view->days_shown; day++) { for (event_num = day_view->events[day]->len - 1; event_num >= 0; event_num--) { - event = &g_array_index (day_view->events[day], - EDayViewEvent, event_num); - if (!(*callback) (day_view, day, event_num, data)) return; } @@ -1994,9 +1987,6 @@ e_day_view_foreach_event (EDayView *day_view, for (event_num = day_view->long_events->len - 1; event_num >= 0; event_num--) { - event = &g_array_index (day_view->long_events, - EDayViewEvent, event_num); - if (!(*callback) (day_view, E_DAY_VIEW_LONG_EVENT, event_num, data)) return; @@ -3520,9 +3510,6 @@ e_day_view_on_long_event_click (EDayView *day_view, day_view->resize_start_row = start_day; day_view->resize_end_row = end_day; - /* Create the edit rect if necessary. */ - e_day_view_reshape_resize_long_event_rect_item (day_view); - /* Raise the event's item, above the rect as well. */ gnome_canvas_item_raise_to_top (event->canvas_item); } @@ -3598,9 +3585,6 @@ e_day_view_on_event_click (EDayView *day_view, day_view->resize_bars_event_day = day; day_view->resize_bars_event_num = event_num; - /* Create the edit rect if necessary. */ - e_day_view_reshape_resize_rect_item (day_view); - e_day_view_reshape_main_canvas_resize_bars (day_view); /* Raise the event's item, above the rect as well. */ @@ -3626,56 +3610,6 @@ e_day_view_on_event_click (EDayView *day_view, } static void -e_day_view_reshape_resize_long_event_rect_item (EDayView *day_view) -{ - gint event_num, start_day, end_day; - gint item_x, item_y, item_w, item_h; - gdouble x1, y1, x2, y2; - - event_num = day_view->resize_event_num; - - /* If we're not resizing an event, or the event is not shown, - hide the resize bars. */ - if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_NONE - || !e_day_view_get_long_event_position (day_view, event_num, - &start_day, &end_day, - &item_x, &item_y, - &item_w, &item_h)) { - return; - } - - x1 = item_x; - y1 = item_y; - x2 = item_x + item_w - 1; - y2 = item_y + item_h - 1; -} - -static void -e_day_view_reshape_resize_rect_item (EDayView *day_view) -{ - gint day, event_num; - gint item_x, item_y, item_w, item_h; - gdouble x1, y1, x2, y2; - - day = day_view->resize_event_day; - event_num = day_view->resize_event_num; - - /* If we're not resizing an event, or the event is not shown, - hide the resize bars. */ - if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_NONE - || !e_day_view_get_event_position (day_view, day, event_num, - &item_x, &item_y, - &item_w, &item_h)) { - return; - } - - x1 = item_x; - y1 = item_y; - x2 = item_x + item_w - 1; - y2 = item_y + item_h - 1; -} - -static void e_day_view_on_event_double_click (EDayView *day_view, gint day, gint event_num) @@ -4012,8 +3946,6 @@ e_day_view_on_main_canvas_motion (GtkWidget *widget, && day_view->pressed_event_day != E_DAY_VIEW_LONG_EVENT) { GtkTargetList *target_list; - event = &g_array_index (day_view->events[day_view->pressed_event_day], EDayViewEvent, day_view->pressed_event_num); - if ((abs (canvas_x - day_view->drag_event_x) > E_DAY_VIEW_DRAG_START_OFFSET || abs (canvas_y - day_view->drag_event_y) @@ -4176,8 +4108,6 @@ static void e_day_view_update_long_event_resize (EDayView *day_view, gint day) { - /* event is never used here either, what's up? */ - EDayViewEvent *event; gint event_num; gboolean need_reshape = FALSE; @@ -4186,8 +4116,6 @@ e_day_view_update_long_event_resize (EDayView *day_view, #endif event_num = day_view->resize_event_num; - event = &g_array_index (day_view->long_events, EDayViewEvent, - event_num); if (day_view->resize_drag_pos == E_CALENDAR_VIEW_POS_LEFT_EDGE) { day = MIN (day, day_view->resize_end_row); @@ -4207,7 +4135,6 @@ e_day_view_update_long_event_resize (EDayView *day_view, /* FIXME: Optimise? */ if (need_reshape) { e_day_view_reshape_long_event (day_view, event_num); - e_day_view_reshape_resize_long_event_rect_item (day_view); gtk_widget_queue_draw (day_view->top_canvas); } } @@ -4256,7 +4183,6 @@ e_day_view_update_resize (EDayView *day_view, /* FIXME: Optimise? */ if (need_reshape) { e_day_view_reshape_day_event (day_view, day, event_num); - e_day_view_reshape_resize_rect_item (day_view); e_day_view_reshape_main_canvas_resize_bars (day_view); gtk_widget_queue_draw (day_view->main_canvas); } @@ -5407,18 +5333,13 @@ e_day_view_change_duration_to_start_of_work_day (EDayView *day_view) return; else { /* These are never used after being set? */ - gint work_start_row,work_end_row,selection_start_row,selection_end_row; + gint work_start_row,selection_start_row; - work_start_row = - e_day_view_convert_time_to_row (day_view, - day_view->work_day_start_hour, - day_view->work_day_start_minute); - work_end_row = - e_day_view_convert_time_to_row (day_view, - day_view->work_day_end_hour - 1, - day_view->work_day_end_minute + 30); + work_start_row = e_day_view_convert_time_to_row ( + day_view, + day_view->work_day_start_hour, + day_view->work_day_start_minute); selection_start_row = day_view->selection_start_row; - selection_end_row = day_view->selection_end_row; if (selection_start_row < work_start_row) day_view->selection_end_row = work_start_row - 1; else day_view->selection_start_row = work_start_row; @@ -5444,16 +5365,13 @@ e_day_view_change_duration_to_end_of_work_day (EDayView *day_view) if (day_view->selection_in_top_canvas) return; else { - gint work_start_row,work_end_row,selection_start_row,selection_end_row; - work_start_row = - e_day_view_convert_time_to_row (day_view, - day_view->work_day_start_hour, - day_view->work_day_start_minute); - work_end_row = e_day_view_convert_time_to_row (day_view, - day_view->work_day_end_hour-1, - day_view->work_day_end_minute+30); + gint work_end_row,selection_start_row; + + work_end_row = e_day_view_convert_time_to_row ( + day_view, + day_view->work_day_end_hour-1, + day_view->work_day_end_minute+30); selection_start_row = day_view->selection_start_row; - selection_end_row = day_view->selection_end_row; if (selection_start_row <= work_end_row) day_view->selection_end_row = work_end_row; else { diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c index 44ac2215e4..d1fe75a32d 100644 --- a/calendar/gui/e-itip-control.c +++ b/calendar/gui/e-itip-control.c @@ -348,7 +348,6 @@ find_server (EItipControl *itip, ECalComponent *comp, gboolean show_selector) sources = e_source_group_peek_sources (group); for (m = sources; m; m = m->next) { ESource *source; - ECal *ecal; source = m->data; @@ -360,7 +359,7 @@ find_server (EItipControl *itip, ECalComponent *comp, gboolean show_selector) } fd->count++; /* Check this return too? */ - ecal = start_calendar_server (itip, source, priv->type, find_cal_opened_cb, fd); + start_calendar_server (itip, source, priv->type, find_cal_opened_cb, fd); } } } @@ -2004,6 +2003,7 @@ update_attendee_status (EItipControl *itip) GTK_BUTTONS_OK, "%s", _("Object is invalid and " "cannot be updated\n")); + goto run; } else { e_cal_component_get_attendee_list (priv->comp, &attendees); if (attendees != NULL) { diff --git a/calendar/gui/e-meeting-time-sel-item.c b/calendar/gui/e-meeting-time-sel-item.c index 041ae6e403..6c4c2ad8dc 100644 --- a/calendar/gui/e-meeting-time-sel-item.c +++ b/calendar/gui/e-meeting-time-sel-item.c @@ -508,7 +508,6 @@ static void e_meeting_time_selector_item_paint_all_attendees_busy_periods (EMeetingTimeSelectorItem *mts_item, GdkDrawable *drawable, GDate *date, gint x, gint scroll_y, gint width, gint height) { EMeetingTimeSelector *mts; - EMeetingAttendee *ia; EMeetingFreeBusyType busy_type; gint row, y; GdkGC *gc; @@ -526,11 +525,8 @@ e_meeting_time_selector_item_paint_all_attendees_busy_periods (EMeetingTimeSelec /* Get the first visible busy periods for all the attendees. */ first_periods = g_new (gint, e_meeting_store_count_actual_attendees (mts->model)); - for (row = 0; row < e_meeting_store_count_actual_attendees (mts->model); row++) { - /* This is never used */ - ia = e_meeting_store_find_attendee_at_row (mts->model, row); + for (row = 0; row < e_meeting_store_count_actual_attendees (mts->model); row++) first_periods[row] = e_meeting_time_selector_item_find_first_busy_period (mts_item, date, row); - } for (busy_type = 0; busy_type < E_MEETING_FREE_BUSY_LAST; @@ -713,11 +709,9 @@ e_meeting_time_selector_item_paint_attendee_busy_periods (EMeetingTimeSelectorIt EMeetingAttendee *ia; const GArray *busy_periods; EMeetingFreeBusyPeriod *period; - GdkGC *gc; gint period_num, x1, x2, x2_within_day, x2_within_col; mts = mts_item->mts; - gc = mts_item->main_gc; ia = e_meeting_store_find_attendee_at_row (mts->model, row); diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c index 4bd1ed1bdb..9998cb2445 100644 --- a/calendar/gui/e-meeting-time-sel.c +++ b/calendar/gui/e-meeting-time-sel.c @@ -711,7 +711,6 @@ e_meeting_time_selector_construct (EMeetingTimeSelector * mts, EMeetingStore *em menuitem = gtk_radio_menu_item_new_with_label (group, ""); mts->autopick_required_people_one_resource_item = menuitem; - group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menuitem)); gtk_label_set_text_with_mnemonic (GTK_LABEL (GTK_BIN (menuitem)->child), _("Required people and _one resource")); gtk_menu_shell_append (GTK_MENU_SHELL (mts->autopick_menu), menuitem); g_signal_connect (menuitem, "activate", diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c index f6560a4f15..3054201e34 100644 --- a/calendar/gui/e-week-view-event-item.c +++ b/calendar/gui/e-week-view-event-item.c @@ -472,7 +472,6 @@ week_view_event_item_draw_triangle (EWeekViewEventItem *event_item, { EWeekView *week_view; EWeekViewEvent *event; - GdkGC *gc; GdkPoint points[3]; gint c1, c2; cairo_t *cr; @@ -485,7 +484,6 @@ week_view_event_item_draw_triangle (EWeekViewEventItem *event_item, event = &g_array_index (week_view->events, EWeekViewEvent, event_item->priv->event_num); - gc = week_view->main_gc; cr = gdk_cairo_create (drawable); points[0].x = x; @@ -700,7 +698,6 @@ week_view_event_item_draw (GnomeCanvasItem *canvas_item, cr = gdk_cairo_create (drawable); gradient = calendar_config_get_display_events_gradient (); - icon_x = 0; icon_y = y1 + E_WEEK_VIEW_EVENT_BORDER_HEIGHT + E_WEEK_VIEW_ICON_Y_PAD; /* Get the start & end times in 24-hour format. */ diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 222bdba465..a85ed63b82 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -3528,7 +3528,6 @@ static gboolean e_week_view_event_move (ECalendarView *cal_view, ECalViewMoveDir event = &g_array_index (week_view->events, EWeekViewEvent, event_num); - start_dt = event->start; end_dt = event->end; start_time = icalcomponent_get_dtstart (event->comp_data->icalcomp); end_time = icalcomponent_get_dtend (event->comp_data->icalcomp); diff --git a/calendar/gui/ea-day-view-cell.c b/calendar/gui/ea-day-view-cell.c index 6760b7cc42..609b515526 100644 --- a/calendar/gui/ea-day-view-cell.c +++ b/calendar/gui/ea-day-view-cell.c @@ -208,7 +208,7 @@ ea_day_view_cell_get_name (AtkObject *accessible) if (!accessible->name) { AtkObject *ea_main_item; GnomeCanvasItem *main_item; - gchar *new_name = g_strdup (""); + gchar *new_name; const gchar *row_label, *column_label; atk_gobj = ATK_GOBJECT_ACCESSIBLE (accessible); diff --git a/calendar/gui/ea-gnome-calendar.c b/calendar/gui/ea-gnome-calendar.c index ad7d108c25..1f599c1790 100644 --- a/calendar/gui/ea-gnome-calendar.c +++ b/calendar/gui/ea-gnome-calendar.c @@ -115,7 +115,6 @@ ea_gnome_calendar_new (GtkWidget *widget) { GObject *object; AtkObject *accessible; - GnomeCalendar *gcal; g_return_val_if_fail (GNOME_IS_CALENDAR (widget), NULL); @@ -126,8 +125,6 @@ ea_gnome_calendar_new (GtkWidget *widget) accessible->role = ATK_ROLE_FILLER; - gcal = GNOME_CALENDAR (widget); - /* listen on view type change */ g_signal_connect (widget, "dates_shown_changed", diff --git a/calendar/gui/ea-week-view-cell.c b/calendar/gui/ea-week-view-cell.c index ea4c103ac4..de4c244ebf 100644 --- a/calendar/gui/ea-week-view-cell.c +++ b/calendar/gui/ea-week-view-cell.c @@ -208,7 +208,7 @@ ea_week_view_cell_get_name (AtkObject *accessible) if (!accessible->name) { AtkObject *ea_main_item; GnomeCanvasItem *main_item; - gchar *new_name = g_strdup (""); + gchar *new_name; const gchar *row_label, *column_label; gint new_column, new_row; gint start_day; diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index abd6a36532..f4bfbe1d5e 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1307,13 +1307,10 @@ update_todo_view_cb (GnomeCalendar *gcal) static gboolean update_marcus_bains_line_cb (GnomeCalendar *gcal) { - GnomeCalendarPrivate *priv; GnomeCalendarViewType view_type; ECalendarView *view; time_t now, day_begin; - priv = gcal->priv; - view_type = gnome_calendar_get_view (gcal); view = gnome_calendar_get_calendar_view (gcal, view_type); @@ -1905,7 +1902,6 @@ client_cal_opened_cb (ECal *ecal, ECalendarStatus status, GnomeCalendar *gcal) g_hash_table_insert (non_intrusive_error_table, id, g_object_ref(w)); g_signal_connect(w, "destroy", G_CALLBACK(non_intrusive_error_remove), id); - status = E_CALENDAR_STATUS_OK; break; case E_CALENDAR_STATUS_AUTHENTICATION_FAILED: /* try to reopen calendar - it'll ask for a password once again */ @@ -2023,12 +2019,9 @@ typedef void (*open_func) (ECal *, ECalendarStatus, GnomeCalendar *); static gboolean open_ecal (GnomeCalendar *gcal, ECal *cal, gboolean only_if_exists, open_func of) { - GnomeCalendarPrivate *priv; gchar *msg; icaltimezone *zone; - priv = gcal->priv; - zone = calendar_config_get_icaltimezone (); e_cal_set_default_timezone (cal, zone, NULL); @@ -2550,14 +2543,11 @@ check_instance_cb (ECalComponent *comp, void gnome_calendar_purge (GnomeCalendar *gcal, time_t older_than) { - GnomeCalendarPrivate *priv; gchar *sexp, *start, *end; GList *clients, *l; g_return_if_fail (GNOME_IS_CALENDAR (gcal)); - priv = gcal->priv; - start = isodate_from_time_t (0); end = isodate_from_time_t (older_than); sexp = g_strdup_printf ("(occur-in-time-range? (make-time \"%s\")" diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c index 7f1e0780d9..804f5e004a 100644 --- a/calendar/gui/itip-utils.c +++ b/calendar/gui/itip-utils.c @@ -632,12 +632,16 @@ comp_subject (ECalComponentItipMethod method, ECalComponent *comp) switch (e_cal_component_get_vtype (comp)) { case E_CAL_COMPONENT_EVENT: description = _("Event information"); + break; case E_CAL_COMPONENT_TODO: description = _("Task information"); + break; case E_CAL_COMPONENT_JOURNAL: description = _("Memo information"); + break; case E_CAL_COMPONENT_FREEBUSY: description = _("Free/Busy information"); + break; default: description = _("Calendar information"); } @@ -896,7 +900,6 @@ comp_limit_attendees (ECalComponent *comp) if (!match) list = g_slist_prepend (list, prop); - match = FALSE; } for (l = list; l != NULL; l = l->next) { @@ -1555,10 +1558,9 @@ itip_publish_begin (ECalComponent *pub_comp, ECal *client, if (e_cal_component_get_vtype (pub_comp) == E_CAL_COMPONENT_FREEBUSY) { - if (!cloned) { + if (!cloned) *clone = e_cal_component_clone (pub_comp); - cloned = TRUE; - } else { + else { icomp = e_cal_component_get_icalcomponent (pub_comp); icomp_clone = e_cal_component_get_icalcomponent (*clone); diff --git a/calendar/gui/print.c b/calendar/gui/print.c index 010a60423b..1781788a57 100644 --- a/calendar/gui/print.c +++ b/calendar/gui/print.c @@ -581,7 +581,7 @@ print_month_small (GtkPrintContext *context, GnomeCalendar *gcal, time_t month, gint day, weekday, week_start_day; gchar buf[100]; struct tm tm; - double font_size, max_font_size; + double font_size; double header_size, col_width, row_height, text_xpad, w; double cell_top, cell_bottom, cell_left, cell_right, text_right; @@ -614,14 +614,6 @@ print_month_small (GtkPrintContext *context, GnomeCalendar *gcal, time_t month, rough guess of just under the height of each row. */ font_size = row_height; - /* Check that it isn't going to be too wide. The characters are about - twice as high as they are wide, but we need to fit two characters - into each cell, so we don't want to go over col_width. */ - max_font_size = col_width * 0.65; - - /* Why calculate this if we're not using it? */ - font_size = row_height; - /* get month days */ tm = *convert_timet_to_struct_tm (month, zone); build_month (tm.tm_mon, tm.tm_year + 1900, days, NULL, NULL); @@ -1532,7 +1524,7 @@ print_week_event (GtkPrintContext *context, PangoFontDescription *font, gint span_num; gchar *text; gint num_days, start_x, start_y, start_h, end_x, end_y, end_h; - double x1, x2, y1, y2; + double x1, x2, y1; double red, green, blue; GdkPixbuf *pixbuf = NULL; @@ -1578,7 +1570,6 @@ print_week_event (GtkPrintContext *context, PangoFontDescription *font, y1 = top + start_y * cell_height + psi->header_row_height + span->row * (psi->row_height + 2); - y2 = y1 + psi->row_height * 0.5; red = .9; green = .9; @@ -2088,7 +2079,6 @@ print_day_view (GtkPrintContext *context, GnomeCalendar *gcal, time_t date) gint i, days = 1; double todo, l; gchar buf[100]; - cairo_t *cr; gdouble width, height; setup = gtk_print_context_get_page_setup (context); @@ -2099,8 +2089,6 @@ print_day_view (GtkPrintContext *context, GnomeCalendar *gcal, time_t date) for (i = 0; i < days; i++) { todo = width * 0.75; - cr = gtk_print_context_get_cairo_context (context); - /* Print the main view with all the events in. */ print_day_details (context, gcal, date, 0.0, todo - 2.0, HEADER_HEIGHT, diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index b09b18180e..bdac5d44ab 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -2241,22 +2241,14 @@ e_msg_composer_set_pending_body (EMsgComposer *composer, g_object_set_data_full ( G_OBJECT (composer), "body:text", text, (GDestroyNotify) g_free); - - g_object_set_data ( - G_OBJECT (composer), "body:length", - GSIZE_TO_POINTER (length)); } static void e_msg_composer_flush_pending_body (EMsgComposer *composer) { const gchar *body; - gpointer data; - gssize length; body = g_object_get_data (G_OBJECT (composer), "body:text"); - data = g_object_get_data (G_OBJECT (composer), "body:length"); - length = GPOINTER_TO_SIZE (data); if (body != NULL) set_editor_text (composer, body, FALSE); @@ -3749,13 +3741,11 @@ void e_msg_composer_show_sig_file (EMsgComposer *composer) { GtkhtmlEditor *editor; - GtkHTML *html; gchar *html_text; g_return_if_fail (E_IS_MSG_COMPOSER (composer)); editor = GTKHTML_EDITOR (composer); - html = gtkhtml_editor_get_html (editor); if (composer->priv->redirect) return; diff --git a/e-util/e-alert-activity.c b/e-util/e-alert-activity.c index 23f747fe1f..b279b87248 100644 --- a/e-util/e-alert-activity.c +++ b/e-util/e-alert-activity.c @@ -112,7 +112,6 @@ alert_activity_constructed (GObject *object) alert_activity = E_ALERT_ACTIVITY (object); message_dialog = e_alert_activity_get_message_dialog (alert_activity); - object = G_OBJECT (message_dialog); alert = e_alert_dialog_get_alert (E_ALERT_DIALOG (message_dialog)); primary_text = e_alert_get_primary_text (alert); secondary_text = e_alert_get_secondary_text (alert); diff --git a/e-util/e-alert-dialog.c b/e-util/e-alert-dialog.c index 5f8cdc178d..d39d60dd4a 100644 --- a/e-util/e-alert-dialog.c +++ b/e-util/e-alert-dialog.c @@ -153,7 +153,7 @@ e_alert_dialog_constructed (GObject *obj) gtk_window_set_destroy_with_parent((GtkWindow *)self, TRUE); if (e_alert_peek_help_uri (alert)) { - w = gtk_dialog_add_button((GtkDialog*) self, GTK_STOCK_HELP, GTK_RESPONSE_HELP); + gtk_dialog_add_button((GtkDialog*) self, GTK_STOCK_HELP, GTK_RESPONSE_HELP); g_signal_connect(self, "response", G_CALLBACK(dialog_response_cb), NULL); } diff --git a/e-util/e-bconf-map.c b/e-util/e-bconf-map.c index 6b6f16d4cf..d0bd526715 100644 --- a/e-util/e-bconf-map.c +++ b/e-util/e-bconf-map.c @@ -54,7 +54,7 @@ static gchar hexnib[256] = { gchar * e_bconf_hex_decode (const gchar *val) { - const guchar *p = (const guchar *) val; + const guchar *p; gchar *o, *res; o = res = g_malloc (strlen (val) / 2 + 1); diff --git a/e-util/e-pilot-map.c b/e-util/e-pilot-map.c index e557388352..2c047d60f6 100644 --- a/e-util/e-pilot-map.c +++ b/e-util/e-pilot-map.c @@ -256,7 +256,6 @@ e_pilot_map_remove_by_pid (EPilotMap *map, guint32 pid) void e_pilot_map_remove_by_uid (EPilotMap *map, const gchar *uid) { - EPilotMapPidNode *pnode; EPilotMapUidNode *unode; g_return_if_fail (map != NULL); @@ -266,8 +265,6 @@ e_pilot_map_remove_by_uid (EPilotMap *map, const gchar *uid) if (unode == NULL) return; - pnode = g_hash_table_lookup (map->pid_map, &unode->pid); - g_hash_table_remove (map->pid_map, &unode->pid); g_hash_table_remove (map->uid_map, uid); } diff --git a/e-util/e-signature-list.c b/e-util/e-signature-list.c index 34b45be5ba..5fd33e2325 100644 --- a/e-util/e-signature-list.c +++ b/e-util/e-signature-list.c @@ -221,7 +221,6 @@ gconf_signatures_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry, if (!have_autogen) { new_sigs = add_autogen (signature_list, new_sigs); - have_autogen = TRUE; resave = TRUE; } diff --git a/e-util/e-signature-utils.c b/e-util/e-signature-utils.c index 4ae5ac2c8f..b28c0cb985 100644 --- a/e-util/e-signature-utils.c +++ b/e-util/e-signature-utils.c @@ -331,7 +331,7 @@ e_run_signature_script (const gchar *filename) /* ...still hanging, set phasers to KILL. */ kill (pid, SIGKILL); sleep (1); - result = waitpid (pid, &status, WNOHANG); + waitpid (pid, &status, WNOHANG); } } diff --git a/em-format/em-format-quote.c b/em-format/em-format-quote.c index 1da4fbec30..f77a6fb40a 100644 --- a/em-format/em-format-quote.c +++ b/em-format/em-format-quote.c @@ -533,11 +533,8 @@ emfq_text_enriched(EMFormatQuote *emfq, CamelStream *stream, CamelMimePart *part { CamelStreamFilter *filtered_stream; CamelMimeFilter *enriched; - CamelDataWrapper *dw; guint32 flags = 0; - dw = camel_medium_get_content_object((CamelMedium *)part); - if (!strcmp(info->mime_type, "text/richtext")) { flags = CAMEL_MIME_FILTER_ENRICHED_IS_RICHTEXT; camel_stream_write_string(stream, "\n<!-- text/richtext -->\n"); diff --git a/em-format/em-format.c b/em-format/em-format.c index 305feb9178..e5856a0fd1 100644 --- a/em-format/em-format.c +++ b/em-format/em-format.c @@ -250,9 +250,8 @@ static void merge_missing (gpointer key, gpointer value, gpointer userdata) { struct _class_handlers *classes = (struct _class_handlers *) userdata; - EMFormatHandler *info, *oldinfo; + EMFormatHandler *info; - oldinfo = (EMFormatHandler *) value; info = g_hash_table_lookup (classes->new->type_handlers, key); if (!info) { /* Might be from a plugin */ @@ -1783,7 +1782,7 @@ emf_application_mbox (EMFormat *emf, camel_object_unref (message); /* Skip past CAMEL_MIME_PARSER_STATE_FROM_END. */ - state = camel_mime_parser_step (parser, NULL, NULL); + camel_mime_parser_step (parser, NULL, NULL); state = camel_mime_parser_step (parser, NULL, NULL); } diff --git a/filter/e-filter-option.c b/filter/e-filter-option.c index 79899bce80..a9e99e06ff 100644 --- a/filter/e-filter-option.c +++ b/filter/e-filter-option.c @@ -306,7 +306,6 @@ filter_option_get_widget (EFilterElement *element) old_ops = option->options; old_cur = option->current; - l = old_ops; /* start with an empty list */ option->current = NULL; diff --git a/filter/e-rule-editor.c b/filter/e-rule-editor.c index 5fdb7dc0a8..f1bf0e26a7 100644 --- a/filter/e-rule-editor.c +++ b/filter/e-rule-editor.c @@ -513,7 +513,7 @@ static void rule_bottom (GtkWidget *widget, ERuleEditor *editor) { gint pos; - gint index = -1, count = 0; + gint count = 0; EFilterRule *rule = NULL; update_selected_rule(editor); @@ -521,11 +521,8 @@ rule_bottom (GtkWidget *widget, ERuleEditor *editor) pos = e_rule_context_get_rank_rule ( editor->context, editor->current, editor->source); /* There's probably a better/faster way to get the count of the list here */ - while ((rule = e_rule_context_next_rule (editor->context, rule, editor->source))) { - if (rule == editor->current) - index = count; + while ((rule = e_rule_context_next_rule (editor->context, rule, editor->source))) count++; - } count--; if (pos >= 0) rule_move (editor, pos, count); @@ -777,14 +774,12 @@ rule_able_toggled (GtkCellRendererToggle *renderer, gpointer user_data) { GtkWidget *table = user_data; - GtkTreeSelection *selection; GtkTreeModel *model; GtkTreePath *path; GtkTreeIter iter; path = gtk_tree_path_new_from_string (path_string); model = gtk_tree_view_get_model (GTK_TREE_VIEW (table)); - selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (table)); if (gtk_tree_model_get_iter (model, &iter, path)) { EFilterRule *rule = NULL; diff --git a/mail/e-mail-attachment-bar.c b/mail/e-mail-attachment-bar.c index ae98aad926..6b50aac304 100644 --- a/mail/e-mail-attachment-bar.c +++ b/mail/e-mail-attachment-bar.c @@ -99,7 +99,6 @@ mail_attachment_bar_update_status (EMailAttachmentBar *bar) EAttachmentView *view; EAttachmentStore *store; GtkActivatable *activatable; - GtkExpander *expander; GtkAction *action; GtkLabel *label; gint num_attachments; @@ -109,7 +108,6 @@ mail_attachment_bar_update_status (EMailAttachmentBar *bar) view = E_ATTACHMENT_VIEW (bar); store = e_attachment_view_get_store (view); - expander = GTK_EXPANDER (bar->priv->expander); label = GTK_LABEL (bar->priv->status_label); num_attachments = e_attachment_store_get_num_attachments (store); diff --git a/mail/e-mail-label-list-store.c b/mail/e-mail-label-list-store.c index ba9bf41694..ed0d4cdd6b 100644 --- a/mail/e-mail-label-list-store.c +++ b/mail/e-mail-label-list-store.c @@ -171,11 +171,9 @@ static void mail_label_list_store_constructed (GObject *object) { EMailLabelListStore *store; - GtkTreeModel *model; GConfBridge *bridge; const gchar *key; - model = GTK_TREE_MODEL (object); store = E_MAIL_LABEL_LIST_STORE (object); bridge = gconf_bridge_get (); diff --git a/mail/e-mail-migrate.c b/mail/e-mail-migrate.c index f67ea38c5b..16cdead783 100644 --- a/mail/e-mail-migrate.c +++ b/mail/e-mail-migrate.c @@ -2918,7 +2918,6 @@ migrate_to_db (EShellBackend *shell_backend) store = setup_local_store (shell_backend, session); info = camel_store_get_folder_info (store, NULL, CAMEL_STORE_FOLDER_INFO_RECURSIVE|CAMEL_STORE_FOLDER_INFO_FAST|CAMEL_STORE_FOLDER_INFO_SUBSCRIBED, NULL); if (info) { - GThread *thread; struct migrate_folders_to_db_structure migrate_dbs; if (g_str_has_suffix (((CamelService *)store)->url->path, ".evolution/mail/local")) @@ -2931,7 +2930,7 @@ migrate_to_db (EShellBackend *shell_backend) migrate_dbs.store = store; migrate_dbs.done = FALSE; - thread = g_thread_create ((GThreadFunc) migrate_folders_to_db_thread, &migrate_dbs, TRUE, NULL); + g_thread_create ((GThreadFunc) migrate_folders_to_db_thread, &migrate_dbs, TRUE, NULL); while (!migrate_dbs.done) g_main_context_iteration (NULL, TRUE); } @@ -2959,7 +2958,6 @@ migrate_to_db (EShellBackend *shell_backend) store = (CamelStore *) camel_session_get_service (CAMEL_SESSION (session), service->url, CAMEL_PROVIDER_STORE, &ex); info = camel_store_get_folder_info (store, NULL, CAMEL_STORE_FOLDER_INFO_RECURSIVE|CAMEL_STORE_FOLDER_INFO_FAST|CAMEL_STORE_FOLDER_INFO_SUBSCRIBED, &ex); if (info) { - GThread *thread; struct migrate_folders_to_db_structure migrate_dbs; migrate_dbs.ex = ex; @@ -2968,7 +2966,7 @@ migrate_to_db (EShellBackend *shell_backend) migrate_dbs.store = store; migrate_dbs.done = FALSE; - thread = g_thread_create ((GThreadFunc) migrate_folders_to_db_thread, &migrate_dbs, TRUE, NULL); + g_thread_create ((GThreadFunc) migrate_folders_to_db_thread, &migrate_dbs, TRUE, NULL); while (!migrate_dbs.done) g_main_context_iteration (NULL, TRUE); } else diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c index 8249187057..b525345d4a 100644 --- a/mail/e-mail-reader-utils.c +++ b/mail/e-mail-reader-utils.c @@ -354,7 +354,6 @@ e_mail_reader_reply_to_message (EMailReader *reader, CamelMimeMessage *new_message; CamelMimeMessage *src_message; CamelFolder *folder; - GtkWindow *window; GtkHTML *html; struct _camel_header_raw *header; const gchar *uid; @@ -372,7 +371,6 @@ e_mail_reader_reply_to_message (EMailReader *reader, folder = e_mail_reader_get_folder (reader); message_list = e_mail_reader_get_message_list (reader); - window = e_mail_reader_get_window (reader); uid = MESSAGE_LIST (message_list)->cursor_uid; g_return_if_fail (uid != NULL); diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c index 5689a96ce0..c94749b5a5 100644 --- a/mail/e-mail-reader.c +++ b/mail/e-mail-reader.c @@ -328,12 +328,10 @@ action_mail_flag_for_followup_cb (GtkAction *action, EMailReader *reader) { CamelFolder *folder; - GtkWindow *window; GPtrArray *uids; folder = e_mail_reader_get_folder (reader); uids = e_mail_reader_get_selected_uids (reader); - window = e_mail_reader_get_window (reader); em_utils_flag_for_followup (reader, folder, uids); } @@ -515,12 +513,10 @@ action_mail_message_edit_cb (GtkAction *action, EMailReader *reader) { CamelFolder *folder; - GtkWindow *window; GPtrArray *uids; folder = e_mail_reader_get_folder (reader); uids = e_mail_reader_get_selected_uids (reader); - window = e_mail_reader_get_window (reader); em_utils_edit_messages (folder, uids, FALSE); } @@ -743,12 +739,10 @@ action_mail_redirect_cb (GtkAction *action, { GtkWidget *message_list; CamelFolder *folder; - GtkWindow *window; const gchar *uid; folder = e_mail_reader_get_folder (reader); message_list = e_mail_reader_get_message_list (reader); - window = e_mail_reader_get_window (reader); uid = MESSAGE_LIST (message_list)->cursor_uid; g_return_if_fail (uid != NULL); @@ -2021,7 +2015,6 @@ mail_reader_update_actions (EMailReader *reader) EShellBackend *shell_backend; EShellSettings *shell_settings; GtkAction *action; - GtkActionGroup *action_group; const gchar *action_name; gboolean sensitive; guint32 state; @@ -2045,7 +2038,6 @@ mail_reader_update_actions (EMailReader *reader) gboolean selection_is_mailing_list; gboolean single_message_selected; - action_group = e_mail_reader_get_action_group (reader); state = e_mail_reader_check_state (reader); shell_backend = e_mail_reader_get_shell_backend (reader); diff --git a/mail/e-mail-sidebar.c b/mail/e-mail-sidebar.c index bde8c010c6..1465f46393 100644 --- a/mail/e-mail-sidebar.c +++ b/mail/e-mail-sidebar.c @@ -52,7 +52,6 @@ static void mail_sidebar_restore_state (EMailSidebar *sidebar) { EMFolderTree *folder_tree; - GtkTreeModel *tree_model; GKeyFile *key_file; gchar *selected; @@ -63,7 +62,6 @@ mail_sidebar_restore_state (EMailSidebar *sidebar) return; folder_tree = EM_FOLDER_TREE (sidebar); - tree_model = gtk_tree_view_get_model (GTK_TREE_VIEW (sidebar)); /* Restore selected folder. */ diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c index 7951240de0..6d25004f23 100644 --- a/mail/em-account-editor.c +++ b/mail/em-account-editor.c @@ -2413,7 +2413,6 @@ emae_option_options (EMAccountEditorService *service, CamelURL *url, const gchar /* value and caption */ store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING); - p = values; for (p = values, i = 0; p; i++) { gchar *vl, *cp; diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c index e998c42bf0..6dfd7cb05c 100644 --- a/mail/em-composer-utils.c +++ b/mail/em-composer-utils.c @@ -2031,7 +2031,7 @@ attribution_format (const gchar *format, CamelMimeMessage *message) gmtime_r (&date, &tm); - start = inptr = format; + inptr = format; while (*inptr != '\0') { start = inptr; while (*inptr && strncmp (inptr, "${", 2) != 0) diff --git a/mail/em-filter-editor.c b/mail/em-filter-editor.c index ecc1bbcb23..667ee085be 100644 --- a/mail/em-filter-editor.c +++ b/mail/em-filter-editor.c @@ -40,7 +40,7 @@ static gpointer parent_class; static EFilterRule * filter_editor_create_rule (ERuleEditor *rule_editor) { - EFilterRule *rule = e_filter_rule_new (); + EFilterRule *rule; EFilterPart *part; /* create a rule with 1 part & 1 action in it */ diff --git a/mail/em-folder-selection-button.c b/mail/em-folder-selection-button.c index d90f9ce2ce..76c16769a2 100644 --- a/mail/em-folder-selection-button.c +++ b/mail/em-folder-selection-button.c @@ -190,17 +190,6 @@ folder_selection_button_finalize (GObject *object) } static void -folder_selection_button_destroy (GtkObject *object) -{ - EMFolderSelectionButtonPrivate *priv; - - priv = EM_FOLDER_SELECTION_BUTTON_GET_PRIVATE (object); - - /* Chain up to parent's destroy() method. */ - GTK_OBJECT_CLASS (parent_class)->destroy (object); -} - -static void folder_selection_button_clicked (GtkButton *button) { EMFolderSelectionButtonPrivate *priv; @@ -269,7 +258,6 @@ static void folder_selection_button_class_init (EMFolderSelectionButtonClass *class) { GObjectClass *object_class; - GtkObjectClass *gtk_object_class; GtkButtonClass *button_class; parent_class = g_type_class_peek_parent (class); @@ -280,9 +268,6 @@ folder_selection_button_class_init (EMFolderSelectionButtonClass *class) object_class->get_property = folder_selection_button_get_property; object_class->finalize = folder_selection_button_finalize; - gtk_object_class = GTK_OBJECT_CLASS (class); - gtk_object_class->destroy = folder_selection_button_destroy; - button_class = GTK_BUTTON_CLASS (class); button_class->clicked = folder_selection_button_clicked; diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c index 7720ec9e1f..356a544fb7 100644 --- a/mail/em-folder-tree.c +++ b/mail/em-folder-tree.c @@ -248,7 +248,6 @@ folder_tree_get_folder_info__done (struct _EMFolderTreeGetFolderInfo *m) gtk_tree_model_iter_children (model, &iter, &root); /* Traverse to the last valid iter, or the "Loading..." node */ - titer = iter; do { gboolean is_store_node = FALSE, is_folder_node = FALSE; @@ -488,7 +487,6 @@ folder_tree_maybe_expand_row (EMFolderTreeModel *model, { EMFolderTreePrivate *priv = folder_tree->priv; struct _EMFolderTreeModelStoreInfo *si; - GtkTreeView *tree_view; gboolean is_store; CamelStore *store; EAccount *account; @@ -496,8 +494,6 @@ folder_tree_maybe_expand_row (EMFolderTreeModel *model, gchar *key; struct _selected_uri *u; - tree_view = GTK_TREE_VIEW (folder_tree); - gtk_tree_model_get ((GtkTreeModel *) model, iter, COL_STRING_FULL_NAME, &full_name, COL_POINTER_CAMEL_STORE, &store, @@ -2029,7 +2025,6 @@ tree_drag_motion (GtkWidget *widget, GdkDragContext *context, gint x, gint y, gu void em_folder_tree_enable_drag_and_drop (EMFolderTree *folder_tree) { - EMFolderTreePrivate *priv; GtkTreeView *tree_view; static gint setup = 0; gint i; @@ -2038,7 +2033,6 @@ em_folder_tree_enable_drag_and_drop (EMFolderTree *folder_tree) tree_view = GTK_TREE_VIEW (folder_tree); - priv = folder_tree->priv; if (!setup) { for (i=0; i<NUM_DRAG_TYPES; i++) drag_atoms[i] = gdk_atom_intern(drag_types[i].target, FALSE); diff --git a/mail/em-format-html.c b/mail/em-format-html.c index b9db3d16e4..801bc8430b 100644 --- a/mail/em-format-html.c +++ b/mail/em-format-html.c @@ -1191,7 +1191,6 @@ em_format_html_file_part(EMFormatHTML *efh, const gchar *mime_type, const gchar if (stream == NULL) return NULL; - part = camel_mime_part_new(); dw = camel_data_wrapper_new(); camel_data_wrapper_construct_from_stream(dw, stream); camel_object_unref(stream); @@ -1741,11 +1740,8 @@ efh_text_enriched(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, E { CamelStreamFilter *filtered_stream; CamelMimeFilter *enriched; - CamelDataWrapper *dw; guint32 flags = 0; - dw = camel_medium_get_content_object((CamelMedium *)part); - if (!strcmp(info->mime_type, "text/richtext")) { flags = CAMEL_MIME_FILTER_ENRICHED_IS_RICHTEXT; camel_stream_write_string( stream, "\n<!-- text/richtext -->\n"); @@ -1799,8 +1795,6 @@ static void efh_text_html(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info) { const gchar *location; - /* This is set but never used for anything */ - EMFormatPURI *puri; gchar *cid = NULL; camel_stream_printf ( @@ -1839,7 +1833,7 @@ efh_text_html(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFor } } - puri = em_format_add_puri((EMFormat *)efh, sizeof(EMFormatPURI), cid, part, efh_write_text_html); + em_format_add_puri((EMFormat *)efh, sizeof(EMFormatPURI), cid, part, efh_write_text_html); d(printf("adding iframe, location %s\n", cid)); camel_stream_printf(stream, "<iframe src=\"%s\" frameborder=0 scrolling=no>could not get %s</iframe>\n" diff --git a/mail/em-inline-filter.c b/mail/em-inline-filter.c index 5daae1109b..1959b0b7f8 100644 --- a/mail/em-inline-filter.c +++ b/mail/em-inline-filter.c @@ -196,7 +196,7 @@ emif_scan(CamelMimeFilter *f, gchar *in, gsize len, gint final) EMInlineFilter *emif = (EMInlineFilter *)f; gchar *inptr = in, *inend = in+len; gchar *data_start = in; - gchar *start = in; + gchar *start; while (inptr < inend) { start = inptr; diff --git a/mail/em-subscribe-editor.c b/mail/em-subscribe-editor.c index 76fec73616..4211fdac05 100644 --- a/mail/em-subscribe-editor.c +++ b/mail/em-subscribe-editor.c @@ -475,20 +475,9 @@ static void sub_do_changed(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter * static void sub_selection_changed(GtkTreeSelection *selection, EMSubscribe *sub) { - gint dosub = TRUE, dounsub = TRUE; - sub->selected_count = 0; sub->selected_subscribed_count = 0; gtk_tree_selection_selected_foreach(selection, sub_do_changed, sub); - - if (sub->selected_count == 0) { - dosub = FALSE; - dounsub = FALSE; - } else if (sub->selected_subscribed_count == sub->selected_count) - dosub = FALSE; - else if (sub->selected_subscribed_count == 0) - dounsub = FALSE; - } /* double-clicking causes a node item to be evaluated directly */ diff --git a/mail/em-vfolder-editor.c b/mail/em-vfolder-editor.c index 0522e4925c..1a928acf39 100644 --- a/mail/em-vfolder-editor.c +++ b/mail/em-vfolder-editor.c @@ -42,7 +42,7 @@ static gpointer parent_class; static EFilterRule * vfolder_editor_create_rule (ERuleEditor *rule_editor) { - EFilterRule *rule = e_filter_rule_new (); + EFilterRule *rule; EFilterPart *part; /* create a rule with 1 part in it */ diff --git a/mail/importers/pine-importer.c b/mail/importers/pine-importer.c index c3d4b15bf8..873fc93c46 100644 --- a/mail/importers/pine-importer.c +++ b/mail/importers/pine-importer.c @@ -66,15 +66,12 @@ struct _pine_import_msg { static gboolean pine_supported(EImport *ei, EImportTarget *target, EImportImporter *im) { - EImportTargetHome *s; gchar *maildir, *addrfile; gboolean md_exists, addr_exists; if (target->type != E_IMPORT_TARGET_HOME) return FALSE; - s = (EImportTargetHome *)target; - maildir = g_build_filename(g_get_home_dir (), "mail", NULL); md_exists = g_file_test(maildir, G_FILE_TEST_IS_DIR); g_free(maildir); diff --git a/modules/addressbook/e-book-shell-settings.c b/modules/addressbook/e-book-shell-settings.c index 7a9544d721..6d6802a1a2 100644 --- a/modules/addressbook/e-book-shell-settings.c +++ b/modules/addressbook/e-book-shell-settings.c @@ -24,10 +24,6 @@ void e_book_shell_backend_init_settings (EShell *shell) { - EShellSettings *shell_settings; - - shell_settings = e_shell_get_shell_settings (shell); - e_shell_settings_install_property_for_key ( "book-completion-show-address", "/apps/evolution/addressbook/completion/show_address"); diff --git a/modules/addressbook/e-book-shell-view.c b/modules/addressbook/e-book-shell-view.c index 9ab9cb743a..555ab13abf 100644 --- a/modules/addressbook/e-book-shell-view.c +++ b/modules/addressbook/e-book-shell-view.c @@ -248,7 +248,6 @@ book_shell_view_execute_search (EShellView *shell_view) static void book_shell_view_update_actions (EShellView *shell_view) { - EBookShellViewPrivate *priv; EShellContent *shell_content; EShellSidebar *shell_sidebar; EShellWindow *shell_window; @@ -262,7 +261,6 @@ book_shell_view_update_actions (EShellView *shell_view) gboolean can_delete_primary_source; gboolean has_primary_source; gboolean multiple_contacts_selected; - gboolean primary_source_is_system; gboolean single_contact_selected; gboolean selection_is_contact_list; gboolean selection_has_email; @@ -272,8 +270,6 @@ book_shell_view_update_actions (EShellView *shell_view) /* Chain up to parent's update_actions() method. */ E_SHELL_VIEW_CLASS (parent_class)->update_actions (shell_view); - priv = E_BOOK_SHELL_VIEW_GET_PRIVATE (shell_view); - shell_window = e_shell_view_get_shell_window (shell_view); shell_content = e_shell_view_get_shell_content (shell_view); @@ -299,8 +295,6 @@ book_shell_view_update_actions (EShellView *shell_view) (state & E_BOOK_SHELL_SIDEBAR_HAS_PRIMARY_SOURCE); can_delete_primary_source = (state & E_BOOK_SHELL_SIDEBAR_CAN_DELETE_PRIMARY_SOURCE); - primary_source_is_system = - (state & E_BOOK_SHELL_SIDEBAR_PRIMARY_SOURCE_IS_SYSTEM); any_contacts_selected = (single_contact_selected || multiple_contacts_selected); diff --git a/modules/calendar/e-cal-shell-backend.c b/modules/calendar/e-cal-shell-backend.c index e70daec074..bf6f2e1189 100644 --- a/modules/calendar/e-cal-shell-backend.c +++ b/modules/calendar/e-cal-shell-backend.c @@ -530,8 +530,6 @@ cal_shell_backend_handle_uri_cb (EShellBackend *shell_backend, gchar *source_uid = NULL; gchar *comp_uid = NULL; gchar *comp_rid = NULL; - time_t startdate = -1; - time_t enddate = -1; gboolean handled = FALSE; GError *error = NULL; @@ -565,11 +563,7 @@ cal_shell_backend_handle_uri_cb (EShellBackend *shell_backend, content_len = strcspn (cp, "&"); content = g_strndup (cp, content_len); - if (g_ascii_strcasecmp (header, "startdate") == 0) - startdate = time_from_isodate (content); - else if (g_ascii_strcasecmp (header, "enddate") == 0) - enddate = time_from_isodate (content); - else if (g_ascii_strcasecmp (header, "source-uid") == 0) + if (g_ascii_strcasecmp (header, "source-uid") == 0) source_uid = g_strdup (content); else if (g_ascii_strcasecmp (header, "comp-uid") == 0) comp_uid = g_strdup (content); diff --git a/modules/calendar/e-cal-shell-content.c b/modules/calendar/e-cal-shell-content.c index 5213480cee..67081ce978 100644 --- a/modules/calendar/e-cal-shell-content.c +++ b/modules/calendar/e-cal-shell-content.c @@ -227,17 +227,6 @@ cal_shell_content_dispose (GObject *object) G_OBJECT_CLASS (parent_class)->dispose (object); } -static void -cal_shell_content_finalize (GObject *object) -{ - ECalShellContentPrivate *priv; - - priv = E_CAL_SHELL_CONTENT_GET_PRIVATE (object); - - /* Chain up to parent's finalize() method. */ - G_OBJECT_CLASS (parent_class)->finalize (object); -} - static time_t gc_get_default_time (ECalModel *model, gpointer user_data) { @@ -500,7 +489,6 @@ cal_shell_content_class_init (ECalShellContentClass *class) object_class->set_property = cal_shell_content_set_property; object_class->get_property = cal_shell_content_get_property; object_class->dispose = cal_shell_content_dispose; - object_class->finalize = cal_shell_content_finalize; object_class->constructed = cal_shell_content_constructed; widget_class = GTK_WIDGET_CLASS (class); diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c index cfe852afed..62fc30202f 100644 --- a/modules/calendar/e-cal-shell-sidebar.c +++ b/modules/calendar/e-cal-shell-sidebar.c @@ -166,9 +166,6 @@ cal_shell_sidebar_client_opened_cb (ECalShellSidebar *cal_shell_sidebar, EShellView *shell_view; EShellWindow *shell_window; EShellSidebar *shell_sidebar; - ESource *source; - - source = e_cal_get_source (client); shell_sidebar = E_SHELL_SIDEBAR (cal_shell_sidebar); shell_view = e_shell_sidebar_get_shell_view (shell_sidebar); @@ -786,7 +783,6 @@ void e_cal_shell_sidebar_remove_source (ECalShellSidebar *cal_shell_sidebar, ESource *source) { - ESourceSelector *selector; GHashTable *client_table; ECal *client; const gchar *uid; @@ -795,7 +791,6 @@ e_cal_shell_sidebar_remove_source (ECalShellSidebar *cal_shell_sidebar, g_return_if_fail (E_IS_SOURCE (source)); client_table = cal_shell_sidebar->priv->client_table; - selector = e_cal_shell_sidebar_get_selector (cal_shell_sidebar); uid = e_source_peek_uid (source); client = g_hash_table_lookup (client_table, uid); diff --git a/modules/calendar/e-cal-shell-view.c b/modules/calendar/e-cal-shell-view.c index c2eac56216..cd44f37c56 100644 --- a/modules/calendar/e-cal-shell-view.c +++ b/modules/calendar/e-cal-shell-view.c @@ -280,7 +280,6 @@ cal_shell_view_update_actions (EShellView *shell_view) GnomeCalendarViewType view_type; GnomeCalendar *calendar; ECalendarView *view; - ECalModel *model; GtkAction *action; GList *list, *iter; gboolean sensitive; @@ -291,7 +290,6 @@ cal_shell_view_update_actions (EShellView *shell_view) gboolean can_delete_primary_source; gboolean editable = TRUE; gboolean has_primary_source; - gboolean primary_source_is_system; gboolean recurring = FALSE; gboolean is_instance = FALSE; gboolean is_meeting = FALSE; @@ -309,7 +307,6 @@ cal_shell_view_update_actions (EShellView *shell_view) calendar = e_cal_shell_content_get_calendar (cal_shell_content); view_type = gnome_calendar_get_view (calendar); view = gnome_calendar_get_calendar_view (calendar, view_type); - model = e_calendar_view_get_model (view); list = e_calendar_view_get_selected_events (view); n_selected = g_list_length (list); @@ -373,8 +370,6 @@ cal_shell_view_update_actions (EShellView *shell_view) (state & E_CAL_SHELL_SIDEBAR_HAS_PRIMARY_SOURCE); can_delete_primary_source = (state & E_CAL_SHELL_SIDEBAR_CAN_DELETE_PRIMARY_SOURCE); - primary_source_is_system = - (state & E_CAL_SHELL_SIDEBAR_PRIMARY_SOURCE_IS_SYSTEM); refresh_supported = (state & E_CAL_SHELL_SIDEBAR_SOURCE_SUPPORTS_REFRESH); diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c index 709ae9a8e6..852c0bbf42 100644 --- a/modules/calendar/e-memo-shell-content.c +++ b/modules/calendar/e-memo-shell-content.c @@ -189,14 +189,12 @@ memo_shell_content_cursor_change_cb (EMemoShellContent *memo_shell_content, ETable *table) { ECalComponentPreview *memo_preview; - EMemoTable *memo_table; ECalModel *memo_model; ECalModelComponent *comp_data; ECalComponent *comp; const gchar *uid; memo_model = e_memo_shell_content_get_memo_model (memo_shell_content); - memo_table = e_memo_shell_content_get_memo_table (memo_shell_content); memo_preview = e_memo_shell_content_get_memo_preview (memo_shell_content); if (e_table_selected_count (table) != 1) { diff --git a/modules/calendar/e-memo-shell-migrate.c b/modules/calendar/e-memo-shell-migrate.c index c2e4689576..f4ccaa5277 100644 --- a/modules/calendar/e-memo-shell-migrate.c +++ b/modules/calendar/e-memo-shell-migrate.c @@ -171,7 +171,7 @@ add_gw_esource (ESourceList *source_list, const gchar *group_name, const gchar return; soap_port = camel_url_get_param (url, "soap_port"); - if (!soap_port || strlen (soap_port) == 0) + if (soap_port == NULL || *soap_port == '\0') soap_port = "7191"; use_ssl = camel_url_get_param (url, "use_ssl"); @@ -185,7 +185,7 @@ add_gw_esource (ESourceList *source_list, const gchar *group_name, const gchar source = e_source_new (source_name, relative_uri); e_source_set_property (source, "auth", "1"); e_source_set_property (source, "username", url->user); - e_source_set_property (source, "port", camel_url_get_param (url, "soap_port")); + e_source_set_property (source, "port", soap_port); e_source_set_property (source, "auth-domain", "Groupwise"); e_source_set_property (source, "use_ssl", use_ssl); e_source_set_property (source, "offline_sync", offline_sync ? "1" : "0" ); diff --git a/modules/calendar/e-memo-shell-sidebar.c b/modules/calendar/e-memo-shell-sidebar.c index 46ff03672a..403e733d22 100644 --- a/modules/calendar/e-memo-shell-sidebar.c +++ b/modules/calendar/e-memo-shell-sidebar.c @@ -163,9 +163,6 @@ memo_shell_sidebar_client_opened_cb (EMemoShellSidebar *memo_shell_sidebar, EShellView *shell_view; EShellWindow *shell_window; EShellSidebar *shell_sidebar; - ESource *source; - - source = e_cal_get_source (client); shell_sidebar = E_SHELL_SIDEBAR (memo_shell_sidebar); shell_view = e_shell_sidebar_get_shell_view (shell_sidebar); @@ -713,7 +710,6 @@ void e_memo_shell_sidebar_remove_source (EMemoShellSidebar *memo_shell_sidebar, ESource *source) { - ESourceSelector *selector; GHashTable *client_table; ECal *client; const gchar *uid; @@ -722,7 +718,6 @@ e_memo_shell_sidebar_remove_source (EMemoShellSidebar *memo_shell_sidebar, g_return_if_fail (E_IS_SOURCE (source)); client_table = memo_shell_sidebar->priv->client_table; - selector = e_memo_shell_sidebar_get_selector (memo_shell_sidebar); uid = e_source_peek_uid (source); client = g_hash_table_lookup (client_table, uid); diff --git a/modules/calendar/e-memo-shell-view.c b/modules/calendar/e-memo-shell-view.c index 0afbe18e77..07a58aa1c9 100644 --- a/modules/calendar/e-memo-shell-view.c +++ b/modules/calendar/e-memo-shell-view.c @@ -163,7 +163,6 @@ memo_shell_view_execute_search (EShellView *shell_view) static void memo_shell_view_update_actions (EShellView *shell_view) { - EMemoShellViewPrivate *priv; EShellContent *shell_content; EShellSidebar *shell_sidebar; EShellWindow *shell_window; @@ -177,7 +176,6 @@ memo_shell_view_update_actions (EShellView *shell_view) gboolean can_delete_primary_source; gboolean has_primary_source; gboolean multiple_memos_selected; - gboolean primary_source_is_system; gboolean selection_has_url; gboolean single_memo_selected; gboolean sources_are_editable; @@ -186,8 +184,6 @@ memo_shell_view_update_actions (EShellView *shell_view) /* Chain up to parent's update_actions() method. */ E_SHELL_VIEW_CLASS (parent_class)->update_actions (shell_view); - priv = E_MEMO_SHELL_VIEW_GET_PRIVATE (shell_view); - shell_window = e_shell_view_get_shell_window (shell_view); shell_content = e_shell_view_get_shell_content (shell_view); @@ -209,8 +205,6 @@ memo_shell_view_update_actions (EShellView *shell_view) (state & E_MEMO_SHELL_SIDEBAR_HAS_PRIMARY_SOURCE); can_delete_primary_source = (state & E_MEMO_SHELL_SIDEBAR_CAN_DELETE_PRIMARY_SOURCE); - primary_source_is_system = - (state & E_MEMO_SHELL_SIDEBAR_PRIMARY_SOURCE_IS_SYSTEM); refresh_supported = (state & E_MEMO_SHELL_SIDEBAR_SOURCE_SUPPORTS_REFRESH); diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c index 6727dd1bcd..11bc28af62 100644 --- a/modules/calendar/e-task-shell-content.c +++ b/modules/calendar/e-task-shell-content.c @@ -189,14 +189,12 @@ task_shell_content_cursor_change_cb (ETaskShellContent *task_shell_content, ETable *table) { ECalComponentPreview *task_preview; - ETaskTable *task_table; ECalModel *task_model; ECalModelComponent *comp_data; ECalComponent *comp; const gchar *uid; task_model = e_task_shell_content_get_task_model (task_shell_content); - task_table = e_task_shell_content_get_task_table (task_shell_content); task_preview = e_task_shell_content_get_task_preview (task_shell_content); if (e_table_selected_count (table) != 1) { diff --git a/modules/calendar/e-task-shell-sidebar.c b/modules/calendar/e-task-shell-sidebar.c index eb5da18ffd..992ccf8b91 100644 --- a/modules/calendar/e-task-shell-sidebar.c +++ b/modules/calendar/e-task-shell-sidebar.c @@ -161,9 +161,6 @@ task_shell_sidebar_client_opened_cb (ETaskShellSidebar *task_shell_sidebar, EShellView *shell_view; EShellWindow *shell_window; EShellSidebar *shell_sidebar; - ESource *source; - - source = e_cal_get_source (client); shell_sidebar = E_SHELL_SIDEBAR (task_shell_sidebar); shell_view = e_shell_sidebar_get_shell_view (shell_sidebar); @@ -711,7 +708,6 @@ void e_task_shell_sidebar_remove_source (ETaskShellSidebar *task_shell_sidebar, ESource *source) { - ESourceSelector *selector; GHashTable *client_table; ECal *client; const gchar *uid; @@ -720,7 +716,6 @@ e_task_shell_sidebar_remove_source (ETaskShellSidebar *task_shell_sidebar, g_return_if_fail (E_IS_SOURCE (source)); client_table = task_shell_sidebar->priv->client_table; - selector = e_task_shell_sidebar_get_selector (task_shell_sidebar); uid = e_source_peek_uid (source); client = g_hash_table_lookup (client_table, uid); diff --git a/modules/calendar/e-task-shell-view-private.c b/modules/calendar/e-task-shell-view-private.c index dfa00f73ba..6704a3b4c0 100644 --- a/modules/calendar/e-task-shell-view-private.c +++ b/modules/calendar/e-task-shell-view-private.c @@ -218,7 +218,6 @@ e_task_shell_view_private_constructed (ETaskShellView *task_shell_view) EShellBackend *shell_backend; EShellContent *shell_content; EShellSidebar *shell_sidebar; - EShellTaskbar *shell_taskbar; EShellSettings *shell_settings; EShellWindow *shell_window; ETaskTable *task_table; @@ -229,7 +228,6 @@ e_task_shell_view_private_constructed (ETaskShellView *task_shell_view) shell_backend = e_shell_view_get_shell_backend (shell_view); shell_content = e_shell_view_get_shell_content (shell_view); shell_sidebar = e_shell_view_get_shell_sidebar (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_window_get_shell (shell_window); diff --git a/modules/calendar/e-task-shell-view.c b/modules/calendar/e-task-shell-view.c index 42fa4dd9d0..36b9db5b56 100644 --- a/modules/calendar/e-task-shell-view.c +++ b/modules/calendar/e-task-shell-view.c @@ -276,7 +276,6 @@ task_shell_view_execute_search (EShellView *shell_view) static void task_shell_view_update_actions (EShellView *shell_view) { - ETaskShellViewPrivate *priv; EShellContent *shell_content; EShellSidebar *shell_sidebar; EShellWindow *shell_window; @@ -290,7 +289,6 @@ task_shell_view_update_actions (EShellView *shell_view) gboolean can_delete_primary_source; gboolean has_primary_source; gboolean multiple_tasks_selected; - gboolean primary_source_is_system; gboolean selection_has_url; gboolean selection_is_assignable; gboolean single_task_selected; @@ -302,8 +300,6 @@ task_shell_view_update_actions (EShellView *shell_view) /* Chain up to parent's update_actions() method. */ E_SHELL_VIEW_CLASS (parent_class)->update_actions (shell_view); - priv = E_TASK_SHELL_VIEW_GET_PRIVATE (shell_view); - shell_window = e_shell_view_get_shell_window (shell_view); shell_content = e_shell_view_get_shell_content (shell_view); @@ -331,8 +327,6 @@ task_shell_view_update_actions (EShellView *shell_view) (state & E_TASK_SHELL_SIDEBAR_HAS_PRIMARY_SOURCE); can_delete_primary_source = (state & E_TASK_SHELL_SIDEBAR_CAN_DELETE_PRIMARY_SOURCE); - primary_source_is_system = - (state & E_TASK_SHELL_SIDEBAR_PRIMARY_SOURCE_IS_SYSTEM); refresh_supported = (state & E_TASK_SHELL_SIDEBAR_SOURCE_SUPPORTS_REFRESH); diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c index 0f1680d0a7..de8d4f42d9 100644 --- a/modules/mail/e-mail-shell-backend.c +++ b/modules/mail/e-mail-shell-backend.c @@ -474,12 +474,9 @@ mail_shell_backend_window_created_cb (EShell *shell, static void mail_shell_backend_constructed (GObject *object) { - EMailShellBackendPrivate *priv; EShell *shell; EShellBackend *shell_backend; - priv = E_MAIL_SHELL_BACKEND_GET_PRIVATE (object); - shell_backend = E_SHELL_BACKEND (object); shell = e_shell_backend_get_shell (shell_backend); diff --git a/modules/mail/e-mail-shell-content.c b/modules/mail/e-mail-shell-content.c index 992660ccc6..5ba85b27b7 100644 --- a/modules/mail/e-mail-shell-content.c +++ b/modules/mail/e-mail-shell-content.c @@ -120,8 +120,6 @@ mail_shell_content_message_list_built_cb (EMailShellContent *mail_shell_content, EMailShellContentPrivate *priv = mail_shell_content->priv; EShellContent *shell_content; EShellView *shell_view; - GtkScrolledWindow *scrolled_window; - GtkWidget *vscrollbar; GKeyFile *key_file; gchar *uid; @@ -133,9 +131,6 @@ mail_shell_content_message_list_built_cb (EMailShellContent *mail_shell_content, shell_view = e_shell_content_get_shell_view (shell_content); key_file = e_shell_view_get_state_key_file (shell_view); - scrolled_window = GTK_SCROLLED_WINDOW (priv->scrolled_window); - vscrollbar = gtk_scrolled_window_get_vscrollbar (scrolled_window); - if (message_list->cursor_uid != NULL) uid = NULL; @@ -366,14 +361,12 @@ mail_shell_content_constructed (GObject *object) EShellContent *shell_content; EShellBackend *shell_backend; EShellView *shell_view; - EShellViewClass *shell_view_class; EMailReader *reader; GtkWidget *message_list; GConfBridge *bridge; GtkWidget *container; GtkWidget *widget; EWebView *web_view; - GalViewCollection *view_collection; const gchar *key; priv = E_MAIL_SHELL_CONTENT_GET_PRIVATE (object); @@ -384,9 +377,7 @@ mail_shell_content_constructed (GObject *object) shell_content = E_SHELL_CONTENT (object); shell_view = e_shell_content_get_shell_view (shell_content); - shell_view_class = E_SHELL_VIEW_GET_CLASS (shell_view); shell_backend = e_shell_view_get_shell_backend (shell_view); - view_collection = shell_view_class->view_collection; web_view = E_WEB_VIEW (EM_FORMAT_HTML (priv->html_display)->html); diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c index 94b7b7b774..ab37d31a62 100644 --- a/modules/mail/e-mail-shell-view-actions.c +++ b/modules/mail/e-mail-shell-view-actions.c @@ -844,13 +844,11 @@ action_search_filter_cb (GtkRadioAction *action, EShellView *shell_view) { EShellContent *shell_content; - EShellWindow *shell_window; EMailReader *reader; GKeyFile *key_file; const gchar *folder_uri; shell_content = e_shell_view_get_shell_content (shell_view); - shell_window = e_shell_view_get_shell_window (shell_view); key_file = e_shell_view_get_state_key_file (shell_view); reader = E_MAIL_READER (shell_content); @@ -880,13 +878,11 @@ action_search_scope_cb (GtkRadioAction *action, EShellView *shell_view) { EShellContent *shell_content; - EShellWindow *shell_window; EMailReader *reader; GKeyFile *key_file; const gchar *folder_uri; shell_content = e_shell_view_get_shell_content (shell_view); - shell_window = e_shell_view_get_shell_window (shell_view); key_file = e_shell_view_get_state_key_file (shell_view); reader = E_MAIL_READER (shell_content); diff --git a/modules/mail/e-mail-shell-view.c b/modules/mail/e-mail-shell-view.c index 65965185c4..e86a5bb6ac 100644 --- a/modules/mail/e-mail-shell-view.c +++ b/modules/mail/e-mail-shell-view.c @@ -94,7 +94,6 @@ mail_shell_view_execute_search (EShellView *shell_view) EShellSettings *shell_settings; EShellSearchbar *searchbar; EActionComboBox *combo_box; - EMFormatHTMLDisplay *html_display; GtkWidget *message_list; EFilterRule *rule; EMailReader *reader; @@ -129,7 +128,6 @@ mail_shell_view_execute_search (EShellView *shell_view) reader = E_MAIL_READER (shell_content); folder = e_mail_reader_get_folder (reader); folder_uri = e_mail_reader_get_folder_uri (reader); - html_display = e_mail_reader_get_html_display (reader); message_list = e_mail_reader_get_message_list (reader); if (folder_uri != NULL) { @@ -443,7 +441,6 @@ mail_shell_view_update_actions (EShellView *shell_view) gboolean account_is_groupwise = FALSE; gboolean folder_allows_children; gboolean folder_can_be_deleted; - gboolean folder_is_junk; gboolean folder_is_outbox; gboolean folder_is_store; gboolean folder_is_trash; @@ -471,8 +468,6 @@ mail_shell_view_update_actions (EShellView *shell_view) (state & E_MAIL_SIDEBAR_FOLDER_ALLOWS_CHILDREN); folder_can_be_deleted = (state & E_MAIL_SIDEBAR_FOLDER_CAN_DELETE); - folder_is_junk = - (state & E_MAIL_SIDEBAR_FOLDER_IS_JUNK); folder_is_outbox = (state & E_MAIL_SIDEBAR_FOLDER_IS_OUTBOX); folder_is_store = diff --git a/modules/mail/em-account-prefs.c b/modules/mail/em-account-prefs.c index 7a9973437e..ac58ea421d 100644 --- a/modules/mail/em-account-prefs.c +++ b/modules/mail/em-account-prefs.c @@ -136,7 +136,6 @@ account_prefs_edit_account (EAccountManager *manager) EMAccountPrefsPrivate *priv; EMAccountEditor *emae; EAccountTreeView *tree_view; - EAccountList *account_list; EAccount *account; gpointer parent; @@ -147,7 +146,6 @@ account_prefs_edit_account (EAccountManager *manager) return; } - account_list = e_account_manager_get_account_list (manager); tree_view = e_account_manager_get_tree_view (manager); account = e_account_tree_view_get_selected (tree_view); g_return_if_fail (account != NULL); diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c index 96192eaa77..3d1cf2ed08 100644 --- a/modules/mail/em-composer-prefs.c +++ b/modules/mail/em-composer-prefs.c @@ -365,14 +365,12 @@ em_composer_prefs_construct (EMComposerPrefs *prefs, GtkListStore *store; GtkTreeSelection *selection; GtkCellRenderer *renderer; - GConfBridge *bridge; GConfClient *client; EMConfig *ec; EMConfigTargetPrefs *target; GSList *l; gint i; - bridge = gconf_bridge_get (); client = mail_config_get_gconf_client (); shell_settings = e_shell_get_shell_settings (shell); diff --git a/modules/mail/em-mailer-prefs.c b/modules/mail/em-mailer-prefs.c index 26d4f3e637..f32fbbf284 100644 --- a/modules/mail/em-mailer-prefs.c +++ b/modules/mail/em-mailer-prefs.c @@ -314,7 +314,6 @@ init_junk_tree (GtkWidget *label_tree, EMMailerPrefs *prefs) { GtkListStore *store; GtkCellRenderer *renderer; - gint col; g_return_val_if_fail (label_tree != NULL, NULL); g_return_val_if_fail (prefs != NULL, NULL); @@ -323,7 +322,7 @@ init_junk_tree (GtkWidget *label_tree, EMMailerPrefs *prefs) gtk_tree_view_set_model (GTK_TREE_VIEW (label_tree), GTK_TREE_MODEL (store)); renderer = gtk_cell_renderer_text_new (); - col = gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (label_tree), -1, _("Header"), renderer, "text", JH_LIST_COLUMN_NAME, NULL); + gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (label_tree), -1, _("Header"), renderer, "text", JH_LIST_COLUMN_NAME, NULL); g_object_set (G_OBJECT (renderer), "editable", TRUE, NULL); renderer = gtk_cell_renderer_text_new (); diff --git a/plugins/backup-restore/backup.c b/plugins/backup-restore/backup.c index ca7ab293ee..3da8755bf0 100644 --- a/plugins/backup-restore/backup.c +++ b/plugins/backup-restore/backup.c @@ -358,15 +358,13 @@ thread_start (gpointer data) static gboolean idle_cb(gpointer data) { - GThread *t; - if (gui_arg) { /* Show progress dialog */ gtk_progress_bar_pulse ((GtkProgressBar *)pbar); g_timeout_add (50, pbar_update, NULL); } - t = g_thread_create (thread_start, NULL, FALSE, NULL); + g_thread_create (thread_start, NULL, FALSE, NULL); return FALSE; } diff --git a/plugins/bbdb/bbdb.c b/plugins/bbdb/bbdb.c index a6bba6eec1..a9056b1d34 100644 --- a/plugins/bbdb/bbdb.c +++ b/plugins/bbdb/bbdb.c @@ -315,7 +315,6 @@ bbdb_do_it (EBook *book, const gchar *name, const gchar *email) EBookQuery *query; GList *contacts, *l; EContact *contact; - gboolean status; GError *error = NULL; g_return_if_fail (book != NULL); @@ -337,7 +336,7 @@ bbdb_do_it (EBook *book, const gchar *name, const gchar *email) query = e_book_query_from_string (query_string); g_free (query_string); - status = e_book_get_contacts (book, query, &contacts, NULL); + e_book_get_contacts (book, query, &contacts, NULL); if (query) e_book_query_unref (query); if (contacts != NULL) { @@ -366,7 +365,7 @@ bbdb_do_it (EBook *book, const gchar *name, const gchar *email) query = e_book_query_from_string (query_string); g_free (query_string); - status = e_book_get_contacts (book, query, &contacts, NULL); + e_book_get_contacts (book, query, &contacts, NULL); if (query) e_book_query_unref (query); if (contacts != NULL) { diff --git a/plugins/contacts-map/contacts-map.c b/plugins/contacts-map/contacts-map.c index be3f9b1ff9..868930035d 100644 --- a/plugins/contacts-map/contacts-map.c +++ b/plugins/contacts-map/contacts-map.c @@ -41,8 +41,6 @@ void show_map_general (ESourceSelector *selector); gboolean addressbook_map_init (GtkUIManager *ui_manager, EShellView *shell_view) { - EShell *shell; - EShellSettings *shell_settings; EShellWindow *shell_window; GtkActionGroup *action_group; GtkAction *action; @@ -52,8 +50,6 @@ addressbook_map_init (GtkUIManager *ui_manager, EShellView *shell_view) const gchar *label; 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); name = "contacts-map"; label = _("Contacts map"); diff --git a/plugins/email-custom-header/email-custom-header.c b/plugins/email-custom-header/email-custom-header.c index ad9310daa4..84452b28a9 100644 --- a/plugins/email-custom-header/email-custom-header.c +++ b/plugins/email-custom-header/email-custom-header.c @@ -92,21 +92,19 @@ epech_get_widgets_data (CustomHeaderOptionsDialog *mch) EmailCustomHeaderOptionsDialogPrivate *priv; HeaderValueComboBox *sub_combo_box_get; gint selected_item; - gint index_row,index_column; + gint index_column; priv = mch->priv; priv->header_index_type = g_array_new (FALSE, FALSE, sizeof (gint)); priv->flag++; - for (index_row = 0,index_column = 0; + for (index_column = 0; index_column < priv->email_custom_header_details->len; index_column++) { sub_combo_box_get = &g_array_index(priv->combo_box_header_value, HeaderValueComboBox,index_column); selected_item = gtk_combo_box_get_active((GtkComboBox *)sub_combo_box_get->header_value_combo_box); g_array_append_val (priv->header_index_type, selected_item); } - - return; } static gboolean @@ -134,12 +132,12 @@ epech_fill_widgets_with_data (CustomHeaderOptionsDialog *mch) { EmailCustomHeaderOptionsDialogPrivate *priv; HeaderValueComboBox *sub_combo_box_fill; - gint set_index_row,set_index_column; + gint set_index_column; priv = mch->priv; priv->help_section = g_strdup ("usage-mail"); - for (set_index_row = 0,set_index_column = 0; + for (set_index_column = 0; set_index_column < priv->email_custom_header_details->len;set_index_column++) { sub_combo_box_fill = &g_array_index(priv->combo_box_header_value, HeaderValueComboBox,set_index_column); @@ -312,7 +310,7 @@ epech_setup_widgets (CustomHeaderOptionsDialog *mch) HeaderValueComboBox sub_combo_box = {NULL}; HeaderValueComboBox *sub_combo_box_ptr; gint sub_index,row_combo,column_combo; - gint header_section_id,sub_type_index,row,column,label_row; + gint header_section_id,sub_type_index,row,column; gint i; gchar *str; static const gchar *security_field = N_("Security:"); @@ -331,7 +329,7 @@ epech_setup_widgets (CustomHeaderOptionsDialog *mch) priv = mch->priv; priv->combo_box_header_value = g_array_new (TRUE, FALSE, sizeof (HeaderValueComboBox)); - for (header_section_id = 0,label_row = 0,row = 0,column = 1; + for (header_section_id = 0,row = 0,column = 1; header_section_id < priv->email_custom_header_details->len; header_section_id++,row++,column++) { /* To create an empty label widget. Text will be added dynamically. */ @@ -458,14 +456,14 @@ epech_append_to_custom_header (CustomHeaderOptionsDialog *dialog, gint state, gp EmailCustomHeaderOptionsDialogPrivate *priv; EmailCustomHeaderDetails *temp_header_ptr; CustomSubHeader *temp_header_value_ptr; - gint index, index_subtype,sub_type_index; + gint index_subtype,sub_type_index; composer = (EMsgComposer *)data; priv = dialog->priv; if (state == GTK_RESPONSE_OK) { - for (index = 0,index_subtype = 0; index_subtype < priv->email_custom_header_details->len; index_subtype++) { + for (index_subtype = 0; index_subtype < priv->email_custom_header_details->len; index_subtype++) { temp_header_ptr = &g_array_index(priv->email_custom_header_details, EmailCustomHeaderDetails,index_subtype); diff --git a/plugins/groupwise-features/camel-gw-listener.c b/plugins/groupwise-features/camel-gw-listener.c index a23e39ed00..b65ba9768f 100644 --- a/plugins/groupwise-features/camel-gw-listener.c +++ b/plugins/groupwise-features/camel-gw-listener.c @@ -213,7 +213,7 @@ add_esource (const gchar *conf_key, GwAccountInfo *info, const gchar *source_na source = e_source_new (source_name, relative_uri); e_source_set_property (source, "auth", "1"); e_source_set_property (source, "username", url->user); - e_source_set_property (source, "port", camel_url_get_param (url, "soap_port")); + e_source_set_property (source, "port", soap_port); e_source_set_property (source, "auth-domain", "Groupwise"); e_source_set_property (source, "use_ssl", use_ssl); @@ -433,7 +433,6 @@ remove_calendar_tasks_sources (GwAccountInfo *info) { CamelURL *url; gchar *relative_uri; - const gchar *soap_port; const gchar *poa_address; url = camel_url_new (info->source_url, NULL); @@ -442,10 +441,6 @@ remove_calendar_tasks_sources (GwAccountInfo *info) if (!poa_address || strlen (poa_address) ==0) return; - soap_port = camel_url_get_param (url, "soap_port"); - if (!soap_port || strlen (soap_port) == 0) - soap_port = "7191"; - relative_uri = g_strdup_printf ("%s@%s/", url->user, poa_address); remove_esource ("/apps/evolution/calendar/sources", info->name, _("Calendar"), relative_uri); remove_esource ("/apps/evolution/tasks/sources", info->name, _("Checklist"), relative_uri); @@ -755,7 +750,6 @@ remove_addressbook_sources (GwAccountInfo *existing_account_info) gboolean found_group; CamelURL *url; gchar *base_uri; - const gchar *soap_port; GConfClient *client; const gchar *poa_address; @@ -768,9 +762,6 @@ remove_addressbook_sources (GwAccountInfo *existing_account_info) if (!poa_address || strlen (poa_address) ==0) return; - soap_port = camel_url_get_param (url, "soap_port"); - if (!soap_port || strlen (soap_port) == 0) - soap_port = "7191"; base_uri = g_strdup_printf ("groupwise://%s@%s", url->user, poa_address); client = gconf_client_get_default (); list = e_source_list_new_for_gconf (client, "/apps/evolution/addressbook/sources" ); diff --git a/plugins/groupwise-features/share-folder.c b/plugins/groupwise-features/share-folder.c index 24772a89bc..cae99e77d0 100644 --- a/plugins/groupwise-features/share-folder.c +++ b/plugins/groupwise-features/share-folder.c @@ -482,7 +482,6 @@ not_ok_clicked(GtkButton *button, ShareFolder *sf) GtkTextIter *start, *end; GtkTextBuffer *buffer; - buffer = gtk_text_buffer_new (NULL); start = g_new0 (GtkTextIter, 1); end = g_new0 (GtkTextIter, 1); subj = g_strdup (gtk_entry_get_text (sf->subject)); diff --git a/plugins/groupwise-features/status-track.c b/plugins/groupwise-features/status-track.c index 622fc3b6cd..f1b05ea477 100644 --- a/plugins/groupwise-features/status-track.c +++ b/plugins/groupwise-features/status-track.c @@ -177,7 +177,6 @@ gw_track_message_status_cb (GtkAction *action, EShellView *shell_view) /* spacing */ widget = gtk_label_new (""); gtk_table_attach (table, widget, 0, 1, row, row + 1, GTK_FILL, 0, 0, 0); - row++; /* Table headers */ row = 0; diff --git a/plugins/hula-account-setup/camel-hula-listener.c b/plugins/hula-account-setup/camel-hula-listener.c index e6adef04fc..ca045f0533 100644 --- a/plugins/hula-account-setup/camel-hula-listener.c +++ b/plugins/hula-account-setup/camel-hula-listener.c @@ -408,7 +408,6 @@ account_added (EAccountList *account_listener, EAccount *account) HulaAccountInfo *info; EAccount *parent; - CamelURL *parent_url; if (!is_hula_account (account) || !is_hula_caldav_account (account)) return; @@ -423,7 +422,6 @@ account_added (EAccountList *account_listener, EAccount *account) if (!parent) return; - parent_url = camel_url_new (e_account_get_string(parent, E_ACCOUNT_SOURCE_URL), NULL); } else add_calendar_sources (info); diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c index 7f03570770..65f9b58b70 100644 --- a/plugins/itip-formatter/itip-formatter.c +++ b/plugins/itip-formatter/itip-formatter.c @@ -866,7 +866,6 @@ find_server (struct _itip_puri *pitip, ECalComponent *comp) } for (; l != NULL; l = l->next) { - ECal *ecal; source = l->data; if (!fd) { @@ -896,7 +895,7 @@ find_server (struct _itip_puri *pitip, ECalComponent *comp) if (current_source == source) pitip->current_ecal = start_calendar_server (pitip, source, pitip->type, find_cal_opened_cb, fd); else - ecal = start_calendar_server (pitip, source, pitip->type, find_cal_opened_cb, fd); + start_calendar_server (pitip, source, pitip->type, find_cal_opened_cb, fd); } @@ -2519,7 +2518,6 @@ puri_free (EMFormatPURI *puri) void format_itip (EPlugin *ep, EMFormatHookTarget *target) { - EMFormatHTMLPObject *pobj; GConfClient *gconf; gchar *classid; struct _itip_puri *puri; @@ -2535,7 +2533,7 @@ format_itip (EPlugin *ep, EMFormatHookTarget *target) puri = (struct _itip_puri *)em_format_add_puri(target->format, sizeof(struct _itip_puri), classid, target->part, itip_attachment_frame); - pobj = em_format_html_add_pobject ((EMFormatHTML *) target->format, sizeof (EMFormatHTMLPObject), classid, target->part, format_itip_object); + em_format_html_add_pobject ((EMFormatHTML *) target->format, sizeof (EMFormatHTMLPObject), classid, target->part, format_itip_object); gconf = gconf_client_get_default (); puri->delete_message = gconf_client_get_bool (gconf, GCONF_KEY_DELETE, NULL); diff --git a/plugins/itip-formatter/itip-view.c b/plugins/itip-formatter/itip-view.c index 9b240f484a..0440513329 100644 --- a/plugins/itip-formatter/itip-view.c +++ b/plugins/itip-formatter/itip-view.c @@ -517,14 +517,13 @@ static void set_journal_sender_text (ItipView *view) { ItipViewPrivate *priv; - const gchar *organizer, *attendee; + const gchar *organizer; gchar *sender = NULL; gchar *on_behalf_of = NULL; priv = view->priv; organizer = priv->organizer ? priv->organizer : _("An unknown person"); - attendee = priv->attendee ? priv->attendee : _("An unknown person"); /* The current account ID (i.e. the delegatee) is receiving a copy of the request/response. Here we ask the delegatee to respond/accept on behalf of the delegator. */ if (priv->organizer && priv->proxy) diff --git a/plugins/pst-import/pst-importer.c b/plugins/pst-import/pst-importer.c index f89b2da5ad..9662caca1e 100644 --- a/plugins/pst-import/pst-importer.c +++ b/plugins/pst-import/pst-importer.c @@ -1472,10 +1472,9 @@ pst_process_task (PstImporter *m, pst_item *item) static void pst_process_journal (PstImporter *m, pst_item *item) { - struct pst_item_journal *j; ECalComponent *ec; - j = item->journal; + /*j = item->journal;*/ ec = e_cal_component_new (); e_cal_component_set_new_vtype (ec, E_CAL_COMPONENT_JOURNAL); diff --git a/plugins/publish-calendar/publish-calendar.c b/plugins/publish-calendar/publish-calendar.c index 69e42bb5fc..d30a9b15f2 100644 --- a/plugins/publish-calendar/publish-calendar.c +++ b/plugins/publish-calendar/publish-calendar.c @@ -601,7 +601,6 @@ url_list_enable_toggled (GtkCellRendererToggle *renderer, const gchar *path_string, PublishUIData *ui) { - GtkTreeSelection *selection; EPublishUri *url = NULL; GtkTreeModel *model; GtkTreePath *path; @@ -609,7 +608,6 @@ url_list_enable_toggled (GtkCellRendererToggle *renderer, path = gtk_tree_path_new_from_string (path_string); model = gtk_tree_view_get_model (GTK_TREE_VIEW (ui->treeview)); - selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (ui->treeview)); if (gtk_tree_model_get_iter (model, &iter, path)) { gtk_tree_model_get (model, &iter, URL_LIST_URL_COLUMN, &url, -1); diff --git a/plugins/save-calendar/rdf-format.c b/plugins/save-calendar/rdf-format.c index d28d2ef587..fd6a263287 100644 --- a/plugins/save-calendar/rdf-format.c +++ b/plugins/save-calendar/rdf-format.c @@ -207,7 +207,7 @@ do_save_calendar_rdf (FormatHandler *handler, ESourceSelector *selector, ECalSou if (stream && e_cal_get_object_list_as_comp (source_client, "#t", &objects, NULL)) { xmlBufferPtr buffer=xmlBufferCreate(); xmlDocPtr doc = xmlNewDoc((xmlChar *) "1.0"); - xmlNodePtr fnode = doc->children; + xmlNodePtr fnode; doc->children = xmlNewDocNode (doc, NULL, (const guchar *)"rdf:RDF", NULL); xmlSetProp (doc->children, (const guchar *)"xmlns:rdf", (const guchar *)"http://www.w3.org/1999/02/22-rdf-syntax-ns#"); diff --git a/plugins/save-calendar/save-calendar.c b/plugins/save-calendar/save-calendar.c index 212a439877..c8901b2d87 100644 --- a/plugins/save-calendar/save-calendar.c +++ b/plugins/save-calendar/save-calendar.c @@ -312,8 +312,6 @@ gboolean calendar_save_as_init (GtkUIManager *ui_manager, EShellView *shell_view) { - EShell *shell; - EShellSettings *shell_settings; EShellWindow *shell_window; GtkActionGroup *action_group; GtkAction *action; @@ -322,8 +320,6 @@ calendar_save_as_init (GtkUIManager *ui_manager, const gchar *name; 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); name = "calendar-save-as"; tooltip = _("Save the selected calendar to disk"); @@ -347,8 +343,6 @@ gboolean memo_list_save_as_init (GtkUIManager *ui_manager, EShellView *shell_view) { - EShell *shell; - EShellSettings *shell_settings; EShellWindow *shell_window; GtkActionGroup *action_group; GtkAction *action; @@ -357,8 +351,6 @@ memo_list_save_as_init (GtkUIManager *ui_manager, const gchar *name; 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); name = "memo-list-save-as"; tooltip = _("Save the selected memo list to disk"); @@ -382,8 +374,6 @@ gboolean task_list_save_as_init (GtkUIManager *ui_manager, EShellView *shell_view) { - EShell *shell; - EShellSettings *shell_settings; EShellWindow *shell_window; GtkActionGroup *action_group; GtkAction *action; @@ -392,8 +382,6 @@ task_list_save_as_init (GtkUIManager *ui_manager, const gchar *name; 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); name = "task-list-save-as"; tooltip = _("Save the selected task list to disk"); diff --git a/plugins/tnef-attachments/tnef-plugin.c b/plugins/tnef-attachments/tnef-plugin.c index 59b0d4f230..074ec635fb 100644 --- a/plugins/tnef-attachments/tnef-plugin.c +++ b/plugins/tnef-attachments/tnef-plugin.c @@ -924,7 +924,6 @@ void saveVCalendar(TNEFStruct *tnef, const gchar *tmpdir) { write them out. */ if (filename->size > 1) { charptr = filename->data-1; - charptr2=strstr(charptr+1, ";"); while (charptr != NULL) { charptr++; charptr2 = strstr(charptr, ";"); @@ -946,7 +945,6 @@ void saveVCalendar(TNEFStruct *tnef, const gchar *tmpdir) { /* The list of optional participants */ if (filename->size > 1) { charptr = filename->data-1; - charptr2=strstr(charptr+1, ";"); while (charptr != NULL) { charptr++; charptr2 = strstr(charptr, ";"); @@ -967,7 +965,6 @@ void saveVCalendar(TNEFStruct *tnef, const gchar *tmpdir) { PROP_TAG(PT_STRING8, 0x8238))) != MAPI_UNDEFINED) { if (filename->size > 1) { charptr = filename->data-1; - charptr2=strstr(charptr+1, ";"); while (charptr != NULL) { charptr++; charptr2 = strstr(charptr, ";"); @@ -1139,7 +1136,6 @@ void saveVTask(TNEFStruct *tnef, const gchar *tmpdir) { } if ((filename != MAPI_UNDEFINED) && (filename->size > 1)) { charptr = filename->data-1; - charptr2=strstr(charptr+1, ";"); while (charptr != NULL) { charptr++; charptr2 = strstr(charptr, ";"); diff --git a/shell/e-shell-migrate.c b/shell/e-shell-migrate.c index 6f7208a593..1186b7934f 100644 --- a/shell/e-shell-migrate.c +++ b/shell/e-shell-migrate.c @@ -157,7 +157,7 @@ shell_migrate_remove_dir (const gchar *root, { GDir *dir; const gchar *basename; - gchar *filename; + gchar *filename = NULL; gint result = -1; /* Recursively removes a directory and its contents. */ diff --git a/shell/e-shell-switcher.c b/shell/e-shell-switcher.c index ec4f23ce53..226279e0b5 100644 --- a/shell/e-shell-switcher.c +++ b/shell/e-shell-switcher.c @@ -91,7 +91,7 @@ shell_switcher_layout_actions (EShellSwitcher *switcher) /* If using text buttons, we want to try to have a * completely filled-in grid, but if we can't, we want * the odd row to have just a single button. */ - while (num_btns % btns_per_row > 1) + while (btns_per_row > 0 && num_btns % btns_per_row > 1) btns_per_row--; } diff --git a/smime/lib/e-cert-db.c b/smime/lib/e-cert-db.c index faae2182c7..13185db3eb 100644 --- a/smime/lib/e-cert-db.c +++ b/smime/lib/e-cert-db.c @@ -913,7 +913,7 @@ e_cert_db_import_email_cert (ECertDB *certdb, rv = FALSE; goto loser; } - srv = CERT_SaveSMimeProfile(cert, NULL, NULL); + CERT_SaveSMimeProfile(cert, NULL, NULL); PORT_Free(rawCerts); loser: if (cert) diff --git a/smime/lib/e-cert.c b/smime/lib/e-cert.c index 1b16d238a8..adf790af7e 100644 --- a/smime/lib/e-cert.c +++ b/smime/lib/e-cert.c @@ -990,8 +990,6 @@ process_name (CERTName *name, gchar **value) rdns = name->rdns; - lastRdn = rdns; - /* find last RDN */ lastRdn = rdns; while (*lastRdn) lastRdn++; diff --git a/smime/lib/e-pkcs12.c b/smime/lib/e-pkcs12.c index 3a2122bb0f..af8aedae9d 100644 --- a/smime/lib/e-pkcs12.c +++ b/smime/lib/e-pkcs12.c @@ -222,8 +222,8 @@ prompt_for_password (gchar *title, gchar *prompt, SECItem *pwd) *outptr++ = ((gchar *) &c)[1]; } - *outptr++ = 0; - *outptr++ = 0; + outptr[0] = 0; + outptr[1] = 0; memset (passwd, 0, strlen (passwd)); g_free (passwd); diff --git a/widgets/misc/e-attachment-button.c b/widgets/misc/e-attachment-button.c index 192344068b..dac9b28c75 100644 --- a/widgets/misc/e-attachment-button.c +++ b/widgets/misc/e-attachment-button.c @@ -208,13 +208,10 @@ attachment_button_update_pixbufs (EAttachmentButton *button) { GtkCellLayout *cell_layout; GtkCellRenderer *renderer; - GtkIconTheme *icon_theme; GdkPixbuf *pixbuf_expander_open; GdkPixbuf *pixbuf_expander_closed; GList *list; - icon_theme = gtk_icon_theme_get_default (); - /* Grab the first cell renderer. */ cell_layout = GTK_CELL_LAYOUT (button->priv->cell_view); list = gtk_cell_layout_get_cells (cell_layout); diff --git a/widgets/misc/e-attachment-handler-image.c b/widgets/misc/e-attachment-handler-image.c index 277a51be7f..6429eb6b8e 100644 --- a/widgets/misc/e-attachment-handler-image.c +++ b/widgets/misc/e-attachment-handler-image.c @@ -154,7 +154,6 @@ static void attachment_handler_image_update_actions_cb (EAttachmentView *view, EAttachmentHandler *handler) { - EAttachmentHandlerImagePrivate *priv; EAttachment *attachment; GFileInfo *file_info; GtkActionGroup *action_group; @@ -163,8 +162,6 @@ attachment_handler_image_update_actions_cb (EAttachmentView *view, GList *selected; gboolean visible = FALSE; - priv = E_ATTACHMENT_HANDLER_IMAGE_GET_PRIVATE (handler); - selected = e_attachment_view_get_selected_attachments (view); if (g_list_length (selected) != 1) @@ -199,7 +196,6 @@ exit: static void attachment_handler_image_constructed (GObject *object) { - EAttachmentHandlerImagePrivate *priv; EAttachmentHandler *handler; EAttachmentView *view; GtkActionGroup *action_group; @@ -207,7 +203,6 @@ attachment_handler_image_constructed (GObject *object) GError *error = NULL; handler = E_ATTACHMENT_HANDLER (object); - priv = E_ATTACHMENT_HANDLER_IMAGE_GET_PRIVATE (object); /* Chain up to parent's constructed() method. */ G_OBJECT_CLASS (parent_class)->constructed (object); diff --git a/widgets/misc/e-attachment-store.c b/widgets/misc/e-attachment-store.c index 6fd71f0c57..217d03fd83 100644 --- a/widgets/misc/e-attachment-store.c +++ b/widgets/misc/e-attachment-store.c @@ -281,7 +281,6 @@ e_attachment_store_add_attachment (EAttachmentStore *store, GtkTreeModel *model; GtkTreePath *path; GtkTreeIter iter; - GFile *file; g_return_if_fail (E_IS_ATTACHMENT_STORE (store)); g_return_if_fail (E_IS_ATTACHMENT (attachment)); @@ -301,8 +300,6 @@ e_attachment_store_add_attachment (EAttachmentStore *store, store->priv->attachment_index, g_object_ref (attachment), reference); - file = e_attachment_get_file (attachment); - /* This lets the attachment tell us when to update. */ e_attachment_set_reference (attachment, reference); diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c index 6f54327033..9829d81279 100644 --- a/widgets/misc/e-calendar-item.c +++ b/widgets/misc/e-calendar-item.c @@ -1023,7 +1023,6 @@ e_calendar_item_draw (GnomeCanvasItem *canvas_item, { ECalendarItem *calitem; GtkStyle *style; - GdkGC *base_gc, *bg_gc; gint char_height, row, col, row_y, bar_height, col_x; gint xthickness, ythickness; PangoFontDescription *font_desc; @@ -1052,8 +1051,6 @@ e_calendar_item_draw (GnomeCanvasItem *canvas_item, PANGO_PIXELS (pango_font_metrics_get_descent (font_metrics)); xthickness = style->xthickness; ythickness = style->ythickness; - base_gc = style->base_gc[GTK_STATE_NORMAL]; - bg_gc = style->bg_gc[GTK_STATE_NORMAL]; base = style->base[GTK_STATE_NORMAL]; bg = style->bg[GTK_STATE_NORMAL]; @@ -1164,7 +1161,6 @@ e_calendar_item_draw_month (ECalendarItem *calitem, PangoFontMetrics *font_metrics; PangoLayout *layout; cairo_t *cr; - GdkColor fg; #if 0 g_print ("In e_calendar_item_draw_month: %i,%i %ix%i row:%i col:%i\n", @@ -1191,8 +1187,6 @@ e_calendar_item_draw_month (ECalendarItem *calitem, ythickness = style->ythickness; fg_gc = style->fg_gc[GTK_STATE_NORMAL]; - fg = style->fg[GTK_STATE_NORMAL]; - pango_font_metrics_unref (font_metrics); /* Calculate the top-left position of the entire month display. */ @@ -1396,7 +1390,7 @@ e_calendar_item_draw_day_numbers (ECalendarItem *calitem, GnomeCanvasItem *item; GtkWidget *widget; GtkStyle *style; - PangoFontDescription *font_desc, *wkfont_desc; + PangoFontDescription *font_desc; GdkGC *fg_gc; GdkColor *bg_color, *fg_color, *box_color; struct tm today_tm; @@ -1427,9 +1421,6 @@ e_calendar_item_draw_day_numbers (ECalendarItem *calitem, font_desc = calitem->font_desc; if (!font_desc) font_desc = style->font_desc; - wkfont_desc = calitem->week_number_font_desc; - if (!wkfont_desc) - wkfont_desc = font_desc; fg_gc = style->fg_gc[GTK_STATE_NORMAL]; pango_context = gtk_widget_get_pango_context (widget); @@ -1732,8 +1723,6 @@ e_calendar_item_get_week_number (ECalendarItem *calitem, g_date_add_days (&date, 7 - weekday); else g_date_subtract_days (&date, weekday); - - weekday = g_date_get_weekday (&date) - 1; } /* Calculate the day of the year, from 0 to 365. */ diff --git a/widgets/misc/e-image-chooser.c b/widgets/misc/e-image-chooser.c index 4ea76099aa..5defe2090d 100644 --- a/widgets/misc/e-image-chooser.c +++ b/widgets/misc/e-image-chooser.c @@ -401,7 +401,7 @@ image_chooser_finalize (GObject *object) static void e_image_chooser_class_init (EImageChooserClass *class) { - GObjectClass *object_class = G_OBJECT_CLASS (class); + GObjectClass *object_class; parent_class = g_type_class_peek_parent (class); g_type_class_add_private (class, sizeof (EImageChooserPrivate)); diff --git a/widgets/misc/e-import-assistant.c b/widgets/misc/e-import-assistant.c index bf2396efb2..77108c01a5 100644 --- a/widgets/misc/e-import-assistant.c +++ b/widgets/misc/e-import-assistant.c @@ -168,7 +168,6 @@ filename_changed (GtkWidget *widget, first = eii; } gtk_list_store_set (GTK_LIST_STORE (model), &iter, 1, TRUE, -1); - fileok = TRUE; } else { if (page->importer == eii) page->importer = NULL; diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c index 3169c97c78..e6a223a121 100644 --- a/widgets/misc/e-map.c +++ b/widgets/misc/e-map.c @@ -535,9 +535,6 @@ e_map_key_press (GtkWidget *widget, GdkEventKey *event) view = E_MAP (widget); priv = view->priv; - do_scroll = FALSE; - xofs = yofs = 0; - switch (event->keyval) { case GDK_Up: diff --git a/widgets/misc/e-pilot-settings.c b/widgets/misc/e-pilot-settings.c index 0327ca84ff..e2b90897a0 100644 --- a/widgets/misc/e-pilot-settings.c +++ b/widgets/misc/e-pilot-settings.c @@ -67,10 +67,6 @@ e_pilot_settings_get_type (void) static void class_init (EPilotSettingsClass *klass) { - GObjectClass *object_class; - - object_class = G_OBJECT_CLASS (klass); - parent_class = g_type_class_ref (GTK_TYPE_TABLE); } @@ -129,10 +125,8 @@ GtkWidget * e_pilot_settings_new (ESourceList *source_list) { EPilotSettings *ps; - EPilotSettingsPrivate *priv; ps = g_object_new (E_TYPE_PILOT_SETTINGS, NULL); - priv = ps->priv; build_ui (ps, source_list); diff --git a/widgets/misc/e-web-view.c b/widgets/misc/e-web-view.c index 0a0e3143ef..31516bf04d 100644 --- a/widgets/misc/e-web-view.c +++ b/widgets/misc/e-web-view.c @@ -189,11 +189,9 @@ web_view_request_stream_read_cb (GInputStream *input_stream, GAsyncResult *result, EWebViewRequest *request) { - GtkHTML *html; gssize bytes_read; GError *error = NULL; - html = GTK_HTML (request->web_view); bytes_read = g_input_stream_read_finish (input_stream, result, &error); if (web_view_request_check_for_error (request, error)) diff --git a/widgets/misc/ea-calendar-item.c b/widgets/misc/ea-calendar-item.c index 17188ed66c..0946775e2d 100644 --- a/widgets/misc/ea-calendar-item.c +++ b/widgets/misc/ea-calendar-item.c @@ -1124,7 +1124,6 @@ ea_calendar_item_get_column_label (EaCalendarItem *ea_calitem, gint column, { AtkGObjectAccessible *atk_gobj; GObject *g_obj; - ECalendarItem *calitem; const gchar *abbr_name; g_return_val_if_fail (ea_calitem, FALSE); @@ -1135,7 +1134,6 @@ ea_calendar_item_get_column_label (EaCalendarItem *ea_calitem, gint column, return FALSE; /* Columns are 0 = Monday ... 6 = Sunday */ - calitem = E_CALENDAR_ITEM (g_obj); abbr_name = e_get_weekday_name (column + 1, TRUE); g_strlcpy (buffer, abbr_name, buffer_size); diff --git a/widgets/table/e-cell-date-edit.c b/widgets/table/e-cell-date-edit.c index 88b077595e..39443c3960 100644 --- a/widgets/table/e-cell-date-edit.c +++ b/widgets/table/e-cell-date-edit.c @@ -679,7 +679,6 @@ e_cell_date_edit_get_popup_pos (ECellDateEdit *ecde, if (*y - row_height > avail_height) { /* We don't, so we show the popup above the cell instead of below it. */ - avail_height = *y - row_height; *y -= (popup_requisition.height + row_height); if (*y < 0) *y = 0; diff --git a/widgets/table/e-cell-pixbuf.c b/widgets/table/e-cell-pixbuf.c index 666f556ec3..3f7ee1d378 100644 --- a/widgets/table/e-cell-pixbuf.c +++ b/widgets/table/e-cell-pixbuf.c @@ -114,7 +114,7 @@ pixbuf_draw (ECellView *ecell_view, GdkDrawable *drawable, gint x1, gint y1, gint x2, gint y2) { GdkPixbuf *cell_pixbuf; - gint real_x, real_y, real_w, real_h; + gint real_x, real_y; gint pix_w, pix_h; cairo_t *cr; @@ -136,19 +136,15 @@ pixbuf_draw (ECellView *ecell_view, GdkDrawable *drawable, if (x2 - x1 > pix_w) { gint diff = (x2 - x1) - pix_w; real_x = x1 + diff/2; - real_w = pix_w; } else { real_x = x1; - real_w = x2 - x1; } if (y2 - y1 > pix_h) { gint diff = (y2 - y1) - pix_h; real_y = y1 + diff/2; - real_h = pix_h; } else { real_y = y1; - real_h = y2 - y1; } cr = gdk_cairo_create (drawable); diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c index 24f7dc5cd8..852f8ec980 100644 --- a/widgets/table/e-cell-text.c +++ b/widgets/table/e-cell-text.c @@ -1299,17 +1299,6 @@ ect_free_state (ECellView *ecell_view, gint model_col, gint view_col, gint row, g_free (save_state); } -#define FONT_NAME "Sans Regular" - -static PangoFontDescription * -get_font_description_for_size (double h) -{ - PangoFontDescription *font_des = pango_font_description_new (); - pango_font_description_set_family (font_des, FONT_NAME); - pango_font_description_set_size (font_des, h * PANGO_SCALE); - return font_des; -} - static void get_font_size (PangoLayout *layout, PangoFontDescription *font, const gchar *text, double *width, double *height) @@ -1334,7 +1323,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context, gint model_col, gint view_col, gint row, double width, double height) { - PangoFontDescription *font_des = get_font_description_for_size (12); + PangoFontDescription *font_des; PangoLayout *layout; PangoContext *pango_context; PangoFontMetrics *font_metrics; diff --git a/widgets/table/e-cell-toggle.c b/widgets/table/e-cell-toggle.c index 4903602763..a03eed037e 100644 --- a/widgets/table/e-cell-toggle.c +++ b/widgets/table/e-cell-toggle.c @@ -199,16 +199,13 @@ cell_toggle_draw (ECellView *ecell_view, gint y2) { ECellTogglePrivate *priv; - ECellToggleView *toggle_view; GdkPixbuf *image; - gint x, y, width, height; - gint cache_seq; + gint x, y; cairo_t *cr; const gint value = GPOINTER_TO_INT ( e_table_model_value_at (ecell_view->e_table_model, model_col, row)); - toggle_view = (ECellToggleView *) ecell_view; priv = E_CELL_TOGGLE_GET_PRIVATE (ecell_view->ecell); if (value < 0 || value >= priv->pixbufs->len) { @@ -217,34 +214,17 @@ cell_toggle_draw (ECellView *ecell_view, return; } - if (flags & E_CELL_SELECTED) { - if (GTK_WIDGET_HAS_FOCUS (toggle_view->canvas)) - cache_seq = 0; - else - cache_seq = 1; - } else - cache_seq = 2; - - if (E_TABLE_ITEM (ecell_view->e_table_item_view)->alternating_row_colors && (row % 2) == 0) - cache_seq += 3; - image = g_ptr_array_index (priv->pixbufs, value); - if ((x2 - x1) < gdk_pixbuf_get_width (image)) { + if ((x2 - x1) < gdk_pixbuf_get_width (image)) x = x1; - width = x2 - x1; - } else { + else x = x1 + ((x2 - x1) - gdk_pixbuf_get_width (image)) / 2; - width = gdk_pixbuf_get_width (image); - } - if ((y2 - y1) < gdk_pixbuf_get_height (image)) { + if ((y2 - y1) < gdk_pixbuf_get_height (image)) y = y1; - height = y2 - y1; - } else { + else y = y1 + ((y2 - y1) - gdk_pixbuf_get_height (image)) / 2; - height = gdk_pixbuf_get_height (image); - } cr = gdk_cairo_create (drawable); cairo_save (cr); diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c index 43513ddc89..2552cb6789 100644 --- a/widgets/table/e-table-group-container.c +++ b/widgets/table/e-table-group-container.c @@ -609,7 +609,7 @@ static void etgc_increment (ETableGroup *etg, gint position, gint amount) { ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(etg); - GList *list = etgc->children; + GList *list; for (list = etgc->children; list; list = g_list_next (list)) e_table_group_increment (((ETableGroupContainerChildNode *)list->data)->child, @@ -620,7 +620,7 @@ static void etgc_decrement (ETableGroup *etg, gint position, gint amount) { ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER(etg); - GList *list = etgc->children; + GList *list; for (list = etgc->children; list; list = g_list_next (list)) e_table_group_decrement (((ETableGroupContainerChildNode *)list->data)->child, @@ -1116,7 +1116,7 @@ e_table_group_apply_to_leafs (ETableGroup *etg, ETableGroupLeafFn fn, gpointer c { if (E_IS_TABLE_GROUP_CONTAINER (etg)) { ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg); - GList *list = etgc->children; + GList *list; /* Protect from unrefs in the callback functions */ g_object_ref (etg); @@ -1168,7 +1168,7 @@ e_table_group_container_print_page (EPrintable *ep, ETGCPrintContext *groupcontext) { cairo_t *cr; - gdouble yd = height; + gdouble yd; gdouble child_height; ETableGroupContainerChildNode *child_node; GList *child; @@ -1180,7 +1180,6 @@ e_table_group_container_print_page (EPrintable *ep, child_printable = groupcontext->child_printable; child = groupcontext->child; yd = 6.5 * 72; - height = 5 * 72; if (child_printable) { if (child) diff --git a/widgets/table/e-table-group.c b/widgets/table/e-table-group.c index ebf861657c..7193ab87c6 100644 --- a/widgets/table/e-table-group.c +++ b/widgets/table/e-table-group.c @@ -601,6 +601,7 @@ etg_event (GnomeCanvasItem *item, GdkEvent *event) case GDK_FOCUS_CHANGE: etg->has_focus = event->focus_change.in; return_val = FALSE; + break; default: return_val = FALSE; diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c index 067ce72c4b..0ea785bc86 100644 --- a/widgets/table/e-table-header-item.c +++ b/widgets/table/e-table-header-item.c @@ -1516,7 +1516,6 @@ static void ethi_header_context_menu (ETableHeaderItem *ethi, GdkEventButton *event) { EthiHeaderInfo *info = g_new (EthiHeaderInfo, 1); - ETableCol *col; GtkMenu *popup; gint ncol, sort_count, sort_col; GtkWidget *menu_item, *sub_menu; @@ -1526,7 +1525,6 @@ ethi_header_context_menu (ETableHeaderItem *ethi, GdkEventButton *event) info->ethi = ethi; info->col = ethi_find_col_by_x (ethi, event->x); - col = e_table_header_get_column (ethi->eth, info->col); popup = e_popup_menu_create_with_domain (ethi_context_menu, 1 + diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c index c6e694da2e..f2a3c1a826 100644 --- a/widgets/table/e-table-header-utils.c +++ b/widgets/table/e-table-header-utils.c @@ -472,8 +472,6 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol, inner_x + inner_width - arrow_width, inner_y + (inner_height - arrow_height) / 2, arrow_width, arrow_height); - - inner_width -= arrow_width + HEADER_PADDING; break; } diff --git a/widgets/table/e-table-header.c b/widgets/table/e-table-header.c index 1016acf5c0..8d382f5a92 100644 --- a/widgets/table/e-table-header.c +++ b/widgets/table/e-table-header.c @@ -790,8 +790,6 @@ eth_set_size (ETableHeader *eth, gint idx, gint size) return; } - /* Remove from total_extra the amount used for this column. */ - total_extra -= size - (eth->columns[idx]->min_width + eth->width_extras); for (i = idx + 1; i < eth->col_count; i++) { if (eth->columns[idx]->resizable) { /* old_expansion != 0 by (2) */ diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c index 8b94ad8833..006c5c02cf 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/table/e-table-item.c @@ -1752,8 +1752,8 @@ eti_draw (GnomeCanvasItem *item, GdkDrawable *drawable, gint x, gint y, gint wid * First column to draw, last column to draw */ first_col = -1; - last_col = x_offset = 0; - x1 = x2 = floor (eti_base.x); + x_offset = 0; + x1 = floor (eti_base.x); for (col = 0; col < cols; col++, x1 = x2) { ETableCol *ecol = e_table_header_get_column (eti->header, col); @@ -3443,10 +3443,8 @@ e_table_item_print_page (EPrintable *ep, gp_draw_rect(context, xd, height, 1, yd - height); } - if (next_page) { + if (next_page) cairo_show_page (cr); - next_page = 0; - } g_free (widths); } diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c index ba50be0625..d612fc93bc 100644 --- a/widgets/table/e-tree.c +++ b/widgets/table/e-tree.c @@ -506,8 +506,6 @@ et_search_search (ETableSearch *search, gchar *string, ETableSearchFlags flags, e_tree_table_adapter_show_node (et->priv->etta, found); model_row = e_tree_table_adapter_row_of_node (et->priv->etta, found); - cursor = found; - e_selection_model_select_as_key_press(E_SELECTION_MODEL (et->priv->selection), model_row, col->col_idx, GDK_CONTROL_MASK); return TRUE; } else if (cursor && !(flags & E_TABLE_SEARCH_FLAGS_CHECK_CURSOR_FIRST)) { diff --git a/widgets/text/e-reflow.c b/widgets/text/e-reflow.c index 705678bbf8..85521aa02b 100644 --- a/widgets/text/e-reflow.c +++ b/widgets/text/e-reflow.c @@ -1114,7 +1114,6 @@ static void e_reflow_draw (GnomeCanvasItem *item, GdkDrawable *drawable, GNOME_CANVAS_ITEM_CLASS(e_reflow_parent_class)->draw (item, drawable, x, y, width, height); column_width = reflow->column_width; running_width = E_REFLOW_BORDER_WIDTH + column_width + E_REFLOW_BORDER_WIDTH; - x_rect = running_width; y_rect = E_REFLOW_BORDER_WIDTH; width_rect = E_REFLOW_DIVIDER_WIDTH; height_rect = reflow->height - (E_REFLOW_BORDER_WIDTH * 2); @@ -1150,7 +1149,6 @@ static void e_reflow_draw (GnomeCanvasItem *item, GdkDrawable *drawable, running_width -= start_line * (column_width + E_REFLOW_FULL_GUTTER); i += start_line * (column_width + E_REFLOW_FULL_GUTTER); running_width += E_REFLOW_BORDER_WIDTH + column_width + E_REFLOW_BORDER_WIDTH; - x_rect = running_width; y_rect = E_REFLOW_BORDER_WIDTH; width_rect = E_REFLOW_DIVIDER_WIDTH; height_rect = reflow->height - (E_REFLOW_BORDER_WIDTH * 2); |