[evolution/wip/gsettings] Bug 641756 - Fix warnings from GCC 4.6



commit 8efc1bc6f91e06ca61b00eb8119c9c36697e43a6
Author: Kjartan Maraas <kmaraas gnome org>
Date:   Tue Feb 8 11:57:50 2011 -0500

    Bug 641756 - Fix warnings from GCC 4.6
    
    GCC learned how to find dead assignments.

 addressbook/printing/e-contact-print.c            |    5 ----
 calendar/gui/dialogs/memo-page.c                  |   18 +--------------
 calendar/gui/dialogs/recurrence-page.c            |    3 --
 calendar/gui/e-day-view.c                         |    2 -
 calendar/gui/e-meeting-time-sel.c                 |    2 -
 calendar/gui/e-week-view.c                        |    2 -
 capplet/anjal-settings-main.c                     |    8 -------
 capplet/settings/mail-capplet-shell.c             |    4 ---
 capplet/settings/mail-guess-servers.c             |    6 +----
 capplet/settings/mail-view.c                      |    3 +-
 e-util/e-ui-manager.c                             |    3 --
 em-format/em-format.c                             |    5 +---
 libgnomecanvas/gnome-canvas-pixbuf.c              |   11 +-------
 libgnomecanvas/gnome-canvas-rect.c                |    3 --
 libgnomecanvas/gnome-canvas-rich-text.c           |    6 +----
 libgnomecanvas/gnome-canvas.c                     |    2 -
 mail/e-mail-message-pane.c                        |    4 ---
 mail/e-mail-migrate.c                             |    4 ---
 mail/e-mail-notebook-view.c                       |    7 ++---
 mail/e-mail-reader.c                              |   23 --------------------
 mail/e-mail-session.c                             |    3 --
 mail/em-account-editor.c                          |    5 ----
 mail/em-format-html.c                             |    4 +--
 mail/mail-mt.c                                    |    7 ------
 mail/mail-vfolder.c                               |    5 ----
 modules/calendar/e-cal-shell-sidebar.c            |    4 +--
 modules/calendar/e-memo-shell-view-private.c      |    7 ------
 modules/calendar/e-task-shell-view-private.c      |    7 ------
 modules/mail/e-mail-shell-content.c               |    4 ---
 modules/mail/e-mail-shell-view.c                  |    2 -
 modules/mailto-handler/evolution-mailto-handler.c |    2 -
 plugins/dbx-import/dbx-importer.c                 |    3 --
 plugins/sa-junk-plugin/em-junk-filter.c           |    3 --
 plugins/tnef-attachments/tnef-plugin.c            |    4 ---
 shell/e-shell-sidebar.c                           |   17 ++++++--------
 shell/e-shell-utils.c                             |    4 ---
 widgets/misc/e-attachment-view.c                  |    3 +-
 widgets/misc/e-canvas-background.c                |   12 +---------
 widgets/table/e-cell-text.c                       |    3 --
 widgets/table/e-cell-tree.c                       |   10 --------
 widgets/table/e-table-header-item.c               |    4 ---
 widgets/table/e-table-header-utils.c              |   24 +--------------------
 widgets/table/e-table-item.c                      |   10 --------
 widgets/text/e-text.c                             |    2 -
 44 files changed, 23 insertions(+), 247 deletions(-)
---
diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c
index 672db9a..d45c8c1 100644
--- a/addressbook/printing/e-contact-print.c
+++ b/addressbook/printing/e-contact-print.c
@@ -234,15 +234,10 @@ static gdouble
 e_contact_get_contact_height (EContact *contact,
                               EContactPrintContext *ctxt)
 {
-	GtkPageSetup *setup;
 	gchar *file_as;
-	gdouble page_height;
 	gint field;
 	gdouble cntct_height = 0.0;
 
-	setup = gtk_print_context_get_page_setup (ctxt->context);
-	page_height = gtk_page_setup_get_page_height (setup, GTK_UNIT_POINTS);
-
 	cntct_height += get_font_height (ctxt->style->headings_font) * .2;
 
 	file_as = e_contact_get (contact, E_CONTACT_FILE_AS);
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
index 414b644..03cf7e7 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -639,40 +639,26 @@ memo_page_fill_component (CompEditorPage *page,
 		e_cal_component_set_description_list (comp, NULL);
 	}
 	else {
-		gint idxToUse = 1;
 		GSList l;
-		ECalComponentText text, sumText;
-		gchar *txt, *p;
+		ECalComponentText text;
+		gchar *p;
 		gunichar uc;
 
 		for (i = 0, p = str, uc = g_utf8_get_char_validated (p, -1);
 		    i < 50 && p && uc < (gunichar)-2;
 		    i++, p = g_utf8_next_char (p), uc = g_utf8_get_char_validated (p, -1)) {
-			idxToUse = p - str;
 			if (uc == '\n' || !uc) {
 				p = NULL;
 				break;
 			}
 		}
 
-		if (p)
-			idxToUse = p - str;
-
-		if (i == 50 && uc && uc < (gunichar)-2)
-			sumText.value = txt = g_strdup_printf ("%.*s...", idxToUse, str);
-		else
-			sumText.value = txt = g_strndup (str, idxToUse);
-
-		sumText.altrep = NULL;
-
 		text.value = str;
 		text.altrep = NULL;
 		l.data = &text;
 		l.next = NULL;
 
 		e_cal_component_set_description_list (comp, &l);
-
-		g_free (txt);
 	}
 
 	if (str)
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index a0be048..e8deefa 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -2096,13 +2096,10 @@ create_exception_dialog (RecurrencePage *rpage, const gchar *title, GtkWidget **
 {
 	RecurrencePagePrivate *priv;
 	GtkWidget *dialog, *toplevel;
-	CompEditor *editor;
 	GtkWidget *container;
 
 	priv = rpage->priv;
 
-	editor = comp_editor_page_get_editor (COMP_EDITOR_PAGE (rpage));
-
 	toplevel = gtk_widget_get_toplevel (priv->main);
 	dialog = gtk_dialog_new_with_buttons (title, GTK_WINDOW (toplevel),
 					      GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 52d34f5..8ce7481 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -1344,13 +1344,11 @@ static void
 e_day_view_realize (GtkWidget *widget)
 {
 	EDayView *day_view;
-	GdkWindow *window;
 
 	if (GTK_WIDGET_CLASS (e_day_view_parent_class)->realize)
 		(*GTK_WIDGET_CLASS (e_day_view_parent_class)->realize)(widget);
 
 	day_view = E_DAY_VIEW (widget);
-	window = gtk_widget_get_window (widget);
 
 	/* Allocate the colors. */
 
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index ef221c4..7e405d1 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -1067,14 +1067,12 @@ static void
 e_meeting_time_selector_realize (GtkWidget *widget)
 {
 	EMeetingTimeSelector *mts;
-	GdkWindow *window;
 
 	if (GTK_WIDGET_CLASS (e_meeting_time_selector_parent_class)->realize)
 		(*GTK_WIDGET_CLASS (e_meeting_time_selector_parent_class)->realize)(widget);
 
 	mts = E_MEETING_TIME_SELECTOR (widget);
 
-	window = gtk_widget_get_window (widget);
 	mts->no_info_pattern = e_meeting_time_selector_create_no_info_pattern (mts);
 }
 
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 560ed09..bfe7cd2 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -913,13 +913,11 @@ static void
 e_week_view_realize (GtkWidget *widget)
 {
 	EWeekView *week_view;
-	GdkWindow *window;
 
 	if (GTK_WIDGET_CLASS (e_week_view_parent_class)->realize)
 		(*GTK_WIDGET_CLASS (e_week_view_parent_class)->realize)(widget);
 
 	week_view = E_WEEK_VIEW (widget);
-	window = gtk_widget_get_window (widget);
 
 	/* Allocate the colors. */
 	e_week_view_set_colors (week_view, widget);
diff --git a/capplet/anjal-settings-main.c b/capplet/anjal-settings-main.c
index f211bea..23e4ac9 100644
--- a/capplet/anjal-settings-main.c
+++ b/capplet/anjal-settings-main.c
@@ -77,9 +77,7 @@ mail_message_received_cb (UniqueApp         *app G_GNUC_UNUSED,
                          guint              time_ G_GNUC_UNUSED,
                          gpointer           user_data)
 {
-	 gchar *url;
 	 GtkWindow *window = (GtkWindow *) user_data;
-	 gchar *args[2];
 
 	 switch (command) {
 	 case UNIQUE_ACTIVATE :
@@ -91,12 +89,6 @@ mail_message_received_cb (UniqueApp         *app G_GNUC_UNUSED,
 		  return UNIQUE_RESPONSE_OK;
 
 	 case UNIQUE_OPEN :
-		  url = unique_message_data_get_text (message_data);
-		  args[0] = url;
-		  args[1] = NULL;
-		  //mail_shell_set_cmdline_args ((MailShell *)window, args);
-		  //mail_shell_handle_cmdline ((MailShell *)window);
-		  g_free (url);
 		  gdk_window_raise (gtk_widget_get_window (GTK_WIDGET (window)));
 		  gtk_window_deiconify (window);
 		  gtk_window_present (window);
diff --git a/capplet/settings/mail-capplet-shell.c b/capplet/settings/mail-capplet-shell.c
index c14af1b..030de15 100644
--- a/capplet/settings/mail-capplet-shell.c
+++ b/capplet/settings/mail-capplet-shell.c
@@ -202,9 +202,7 @@ static void
 mail_capplet_shell_construct (MailCappletShell *shell, gint socket_id, gboolean just_druid, gboolean main_loop)
 {
 	MailCappletShellPrivate *priv = shell->priv;
-	GtkWidget *tmp;
 	GtkStyle *style = gtk_widget_get_default_style ();
-	gint window_width = 1024;
 	gchar *custom_dir;
 
 	gtk_window_set_icon_name ((GtkWindow *)shell, "evolution");
@@ -214,7 +212,6 @@ mail_capplet_shell_construct (MailCappletShell *shell, gint socket_id, gboolean
 	gtk_window_set_type_hint ((GtkWindow *)shell, GDK_WINDOW_TYPE_HINT_NORMAL);
 	if (g_getenv("ANJAL_NO_MAX") == NULL && FALSE) {
 		 GdkScreen *scr = gtk_widget_get_screen ((GtkWidget *)shell);
-		 window_width = gdk_screen_get_width (scr);
 		 gtk_window_set_default_size ((GtkWindow *)shell, gdk_screen_get_width (scr), gdk_screen_get_height (scr));
 		 gtk_window_set_decorated ((GtkWindow *)shell, FALSE);
 	} else  {
@@ -247,7 +244,6 @@ mail_capplet_shell_construct (MailCappletShell *shell, gint socket_id, gboolean
 	shell->view = mail_view_new ();
 	shell->view->session = shell->priv->session;
 	gtk_widget_show ((GtkWidget *)shell->view);
-	tmp = gtk_vbox_new (FALSE, 0);
 	gtk_box_pack_end ((GtkBox *)priv->box, (GtkWidget *)shell->view, TRUE, TRUE, 2);
 
 	mail_config_init (shell->priv->session);
diff --git a/capplet/settings/mail-guess-servers.c b/capplet/settings/mail-guess-servers.c
index 66200cc..9df7686 100644
--- a/capplet/settings/mail-guess-servers.c
+++ b/capplet/settings/mail-guess-servers.c
@@ -91,7 +91,6 @@ xml_to_gchar (xmlChar *xml, EmailProvider *provider)
 static SoupMessage *
 get_url (SoupSession *session, const gchar *url)
 {
-	const gchar *name;
 	SoupMessage *msg;
 	const gchar *header;
 
@@ -100,8 +99,6 @@ get_url (SoupSession *session, const gchar *url)
 
 	soup_session_send_message (session, msg);
 
-	name = soup_message_get_uri (msg)->path;
-
 	if (SOUP_STATUS_IS_REDIRECTION (msg->status_code)) {
 		header = soup_message_headers_get_one (msg->response_headers,
 						       "Location");
@@ -167,7 +164,7 @@ static gboolean
 parse_message (const gchar *msg, gint length, EmailProvider *provider)
 {
 	xmlDocPtr doc;
-	xmlNodePtr node, top;
+	xmlNodePtr node;
 
 	doc = xmlReadMemory (msg, length, "file.xml", NULL, 0);
 
@@ -197,7 +194,6 @@ parse_message (const gchar *msg, gint length, EmailProvider *provider)
 		return FALSE;
 	}
 
-	top = node;
 	node = node->children;
 	while (node) {
 		if (strcmp ((gchar *)node->name, "incomingServer") == 0) {
diff --git a/capplet/settings/mail-view.c b/capplet/settings/mail-view.c
index afe65fd..356916d 100644
--- a/capplet/settings/mail-view.c
+++ b/capplet/settings/mail-view.c
@@ -118,7 +118,6 @@ static void
 mail_view_class_init (MailViewClass *klass)
 {
 	GObjectClass * object_class = G_OBJECT_CLASS (klass);
-	AnjalMailViewClass *pclass;
 	signals[VIEW_NEW] =
 		g_signal_new ("view-new",
 			      G_OBJECT_CLASS_TYPE (object_class),
@@ -128,7 +127,7 @@ mail_view_class_init (MailViewClass *klass)
 			      g_cclosure_marshal_VOID__VOID,
 			      G_TYPE_NONE, 0);
 
-	pclass = mail_view_parent_class = g_type_class_peek_parent (klass);
+	mail_view_parent_class = g_type_class_peek_parent (klass);
 	((AnjalMailViewClass *)klass)->set_folder_uri = mv_set_folder_uri;
 	((AnjalMailViewClass *)klass)->set_folder_tree = set_folder_tree;
 	((AnjalMailViewClass *)klass)->set_search = set_search;
diff --git a/e-util/e-ui-manager.c b/e-util/e-ui-manager.c
index ef004b4..8b2d0ff 100644
--- a/e-util/e-ui-manager.c
+++ b/e-util/e-ui-manager.c
@@ -102,7 +102,6 @@ ui_manager_filter_ui (EUIManager *ui_manager,
 	gchar **lines;
 	gchar *filtered;
 	gboolean express_mode;
-	gboolean in_conditional = FALSE;
 	gboolean include = TRUE;
 	gint ii;
 
@@ -120,11 +119,9 @@ ui_manager_filter_ui (EUIManager *ui_manager,
 				gboolean not_express = lines[ii][4] == '!';
 				include = express_mode ^ not_express;
 				lines[ii][0] = '\0';
-				in_conditional = TRUE;
 			} else if (!strncmp (lines[ii], "#endif", 6)) {
 				lines[ii][0] = '\0';
 				include = TRUE;
-				in_conditional = FALSE;
 			}
 		}
 		if (!include)
diff --git a/em-format/em-format.c b/em-format/em-format.c
index cba7c76..27f3d1b 100644
--- a/em-format/em-format.c
+++ b/em-format/em-format.c
@@ -1868,15 +1868,12 @@ emf_multipart_related (EMFormat *emf,
 	for (i = 0; i < nparts; i++) {
 		body_part = camel_multipart_get_part (mp, i);
 		if (body_part != display_part) {
-			EMFormatPURI *puri;
-
 			/* set the partid since add_puri uses it */
 			g_string_append_printf(emf->part_id, ".related.%d", i);
-			puri = em_format_add_puri (
+			em_format_add_puri (
 				emf, sizeof (EMFormatPURI), NULL,
 				body_part, emf_write_related);
 			g_string_truncate (emf->part_id, partidlen);
-			d(printf(" part '%s' '%s' added\n", puri->uri?puri->uri:"", puri->cid));
 		}
 	}
 
diff --git a/libgnomecanvas/gnome-canvas-pixbuf.c b/libgnomecanvas/gnome-canvas-pixbuf.c
index 3565610..3d4657a 100644
--- a/libgnomecanvas/gnome-canvas-pixbuf.c
+++ b/libgnomecanvas/gnome-canvas-pixbuf.c
@@ -99,25 +99,20 @@ gnome_canvas_pixbuf_class_init (GnomeCanvasPixbufClass *class)
 static void
 gnome_canvas_pixbuf_init (GnomeCanvasPixbuf *gcp)
 {
-	GnomeCanvasPixbufPrivate *priv;
-
-	priv = gcp->priv =  G_TYPE_INSTANCE_GET_PRIVATE (gcp,
-							 GNOME_TYPE_CANVAS_PIXBUF,
-							 GnomeCanvasPixbufPrivate);
+	gcp->priv = G_TYPE_INSTANCE_GET_PRIVATE (
+		gcp, GNOME_TYPE_CANVAS_PIXBUF, GnomeCanvasPixbufPrivate);
 }
 
 /* Dispose handler for the pixbuf canvas item */
 static void
 gnome_canvas_pixbuf_dispose (GnomeCanvasItem *object)
 {
-	GnomeCanvasItem *item;
 	GnomeCanvasPixbuf *gcp;
 	GnomeCanvasPixbufPrivate *priv;
 
 	g_return_if_fail (object != NULL);
 	g_return_if_fail (GNOME_IS_CANVAS_PIXBUF (object));
 
-	item = GNOME_CANVAS_ITEM (object);
 	gcp = GNOME_CANVAS_PIXBUF (object);
 	priv = gcp->priv;
 
@@ -246,10 +241,8 @@ gnome_canvas_pixbuf_update (GnomeCanvasItem *item,
                             gint flags)
 {
 	GnomeCanvasPixbuf *gcp;
-	GnomeCanvasPixbufPrivate *priv;
 
 	gcp = GNOME_CANVAS_PIXBUF (item);
-	priv = gcp->priv;
 
 	if (GNOME_CANVAS_ITEM_CLASS (gnome_canvas_pixbuf_parent_class)->update)
 		GNOME_CANVAS_ITEM_CLASS (gnome_canvas_pixbuf_parent_class)->
diff --git a/libgnomecanvas/gnome-canvas-rect.c b/libgnomecanvas/gnome-canvas-rect.c
index a61c98f..d3009b7 100644
--- a/libgnomecanvas/gnome-canvas-rect.c
+++ b/libgnomecanvas/gnome-canvas-rect.c
@@ -377,11 +377,8 @@ gnome_canvas_rect_update (GnomeCanvasItem *item,
                           const cairo_matrix_t *i2c,
                           gint flags)
 {
-	GnomeCanvasRect *rect;
 	gdouble x1, x2, y1, y2;
 
-	rect = GNOME_CANVAS_RECT (item);
-
 	GNOME_CANVAS_ITEM_CLASS (gnome_canvas_rect_parent_class)->
 		update (item, i2c, flags);
 
diff --git a/libgnomecanvas/gnome-canvas-rich-text.c b/libgnomecanvas/gnome-canvas-rich-text.c
index f836c12..8c1e414 100644
--- a/libgnomecanvas/gnome-canvas-rich-text.c
+++ b/libgnomecanvas/gnome-canvas-rich-text.c
@@ -2028,11 +2028,10 @@ gnome_canvas_rich_text_draw (GnomeCanvasItem *item,
                              gint height)
 {
 	GnomeCanvasRichText *text = GNOME_CANVAS_RICH_TEXT (item);
-	GtkStyle *style;
 	GtkWidget *widget;
 	cairo_matrix_t i2c;
 	gdouble ax, ay, ax2, ay2;
-	gint x1, y1, x2, y2;
+	gint x1, x2;
 
 	gnome_canvas_item_i2c_matrix (item, &i2c);
 
@@ -2045,14 +2044,11 @@ gnome_canvas_rich_text_draw (GnomeCanvasItem *item,
 	cairo_matrix_transform_point (&i2c, &ax2, &ay2);
 
 	x1 = ax;
-	y1 = ay;
 	x2 = ax2;
-	y2 = ay2;
 
 	gtk_text_layout_set_screen_width (text->_priv->layout, x2 - x1);
 
 	widget = GTK_WIDGET (item->canvas);
-	style = gtk_widget_get_style (widget);
 
 	/* FIXME: should last arg be NULL? */
 	gtk_text_layout_draw (text->_priv->layout, widget, cr, NULL);
diff --git a/libgnomecanvas/gnome-canvas.c b/libgnomecanvas/gnome-canvas.c
index 16956fb..b26dc94 100644
--- a/libgnomecanvas/gnome-canvas.c
+++ b/libgnomecanvas/gnome-canvas.c
@@ -1729,7 +1729,6 @@ gnome_canvas_paint_rect (GnomeCanvas *canvas,
                          gint y1)
 {
 	GtkWidget *widget;
-	GdkWindow *bin_window;
 	GtkAllocation allocation;
 	GtkScrollable *scrollable;
 	GtkAdjustment *hadjustment;
@@ -1744,7 +1743,6 @@ gnome_canvas_paint_rect (GnomeCanvas *canvas,
 
 	widget = GTK_WIDGET (canvas);
 	gtk_widget_get_allocation (widget, &allocation);
-	bin_window = gtk_layout_get_bin_window (GTK_LAYOUT (canvas));
 
 	scrollable = GTK_SCROLLABLE (canvas);
 	hadjustment = gtk_scrollable_get_hadjustment (scrollable);
diff --git a/mail/e-mail-message-pane.c b/mail/e-mail-message-pane.c
index 1c1ccf2..0b5b99a 100644
--- a/mail/e-mail-message-pane.c
+++ b/mail/e-mail-message-pane.c
@@ -41,10 +41,6 @@ G_DEFINE_TYPE (EMailMessagePane, e_mail_message_pane, E_TYPE_MAIL_PANED_VIEW)
 static void
 mail_message_pane_constructed (GObject *object)
 {
-	EMailMessagePanePrivate *priv;
-
-	priv = E_MAIL_MESSAGE_PANE_GET_PRIVATE (object);
-
 	/* Chain up to parent's constructed() method. */
 	G_OBJECT_CLASS (e_mail_message_pane_parent_class)->constructed (object);
 
diff --git a/mail/e-mail-migrate.c b/mail/e-mail-migrate.c
index 984cf35..9ec894a 100644
--- a/mail/e-mail-migrate.c
+++ b/mail/e-mail-migrate.c
@@ -943,7 +943,6 @@ exit:
 static gboolean
 create_mbox_account (EShellBackend *shell_backend, EMMigrateSession *session)
 {
-	CamelService *mbox_service;
 	EMailBackend *mail_backend;
 	EMailSession *mail_session;
 	CamelURL *url;
@@ -968,9 +967,6 @@ create_mbox_account (EShellBackend *shell_backend, EMMigrateSession *session)
 	g_free (temp);
 
 	uri = camel_url_to_string (url, 0);
-	mbox_service = camel_session_get_service (
-		CAMEL_SESSION (session), uri,
-		CAMEL_PROVIDER_STORE, NULL);
 	e_account_set_string (account, E_ACCOUNT_SOURCE_URL, uri);
 
 #ifndef G_OS_WIN32
diff --git a/mail/e-mail-notebook-view.c b/mail/e-mail-notebook-view.c
index 4a7e7d9..e4d3c1e 100644
--- a/mail/e-mail-notebook-view.c
+++ b/mail/e-mail-notebook-view.c
@@ -898,7 +898,6 @@ mail_netbook_view_open_mail (EMailView *view,
 	EMailView *pane;
 	gint page;
 	CamelMessageInfo *info;
-	GtkWidget *preview;
 	gint pos;
 
 #if HAVE_CLUTTER
@@ -925,8 +924,6 @@ mail_netbook_view_open_mail (EMailView *view,
 
 	gtk_widget_show (GTK_WIDGET (pane));
 
-	preview = e_mail_paned_view_get_preview (E_MAIL_PANED_VIEW (pane));
-
 	folder = e_mail_reader_get_folder (E_MAIL_READER (view));
 	folder_uri = e_mail_reader_get_folder_uri (E_MAIL_READER (view));
 
@@ -1131,7 +1128,9 @@ mail_notebook_view_set_folder (EMailReader *reader,
 
 	if (folder || folder_uri) {
 		gint page;
+#if HAVE_CLUTTER
 		GtkWidget *list;
+#endif
 
 		if (priv->inited) {
 			EMailView *old_view = priv->current_view;
@@ -1216,8 +1215,8 @@ mail_notebook_view_set_folder (EMailReader *reader,
 #endif
 		}
 
-		list = e_mail_reader_get_message_list (E_MAIL_READER (priv->current_view));
 #if HAVE_CLUTTER
+		list = e_mail_reader_get_message_list (E_MAIL_READER (priv->current_view));
 		g_signal_connect (tab , "closed",
 				   G_CALLBACK (mnv_tab_closed), reader);
 		g_object_set_data ((GObject *)priv->current_view, "stage", priv->stage);
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index c05b392..b9948ae 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -630,8 +630,6 @@ check_close_browser_reader (EMailReader *reader)
 	gchar *value;
 	gboolean close_it = FALSE;
 
-	g_return_if_fail (read != NULL);
-
 	/* only allow closing of a mail browser and nothing else */
 	if (!E_IS_MAIL_BROWSER (reader))
 		return;
@@ -2715,7 +2713,6 @@ mail_reader_message_selected_timeout_cb (EMailReader *reader)
 	GtkWidget *message_list;
 	EWebView *web_view;
 	CamelFolder *folder;
-	CamelStore *parent_store;
 	EMailBackend *backend;
 	const gchar *cursor_uid;
 	const gchar *format_uid;
@@ -2723,7 +2720,6 @@ mail_reader_message_selected_timeout_cb (EMailReader *reader)
 	priv = E_MAIL_READER_GET_PRIVATE (reader);
 
 	folder = e_mail_reader_get_folder (reader);
-	parent_store = camel_folder_get_parent_store (folder);
 
 	backend = e_mail_reader_get_backend (reader);
 	formatter = e_mail_reader_get_formatter (reader);
@@ -2804,14 +2800,9 @@ mail_reader_message_selected_cb (EMailReader *reader,
 {
 	EMailReaderPrivate *priv;
 	MessageList *message_list;
-	CamelFolder *folder;
-	CamelStore *parent_store;
 
 	priv = E_MAIL_READER_GET_PRIVATE (reader);
 
-	folder = e_mail_reader_get_folder (reader);
-	parent_store = camel_folder_get_parent_store (folder);
-
 	/* Cancel the previous message retrieval activity. */
 	g_cancellable_cancel (priv->retrieving_message);
 
@@ -2954,7 +2945,6 @@ mail_reader_update_actions (EMailReader *reader,
 	GtkAction *action;
 	const gchar *action_name;
 	gboolean sensitive;
-	EMailReaderPrivate *priv;
 
 	/* Be descriptive. */
 	gboolean any_messages_selected;
@@ -2978,8 +2968,6 @@ mail_reader_update_actions (EMailReader *reader,
 	gboolean first_message_selected = FALSE;
 	gboolean last_message_selected = FALSE;
 
-	priv = E_MAIL_READER_GET_PRIVATE (reader);
-
 	backend = e_mail_reader_get_backend (reader);
 
 	shell_backend = E_SHELL_BACKEND (backend);
@@ -3516,10 +3504,6 @@ e_mail_reader_init (EMailReader *reader,
                     gboolean init_actions,
                     gboolean connect_signals)
 {
-	EShell *shell;
-	EMailBackend *backend;
-	EShellBackend *shell_backend;
-	EShellSettings *shell_settings;
 	EMFormatHTML *formatter;
 	EMenuToolAction *menu_tool_action;
 	EWebView *web_view;
@@ -3533,14 +3517,9 @@ e_mail_reader_init (EMailReader *reader,
 
 	g_return_if_fail (E_IS_MAIL_READER (reader));
 
-	backend = e_mail_reader_get_backend (reader);
 	formatter = e_mail_reader_get_formatter (reader);
 	message_list = e_mail_reader_get_message_list (reader);
 
-	shell_backend = E_SHELL_BACKEND (backend);
-	shell = e_shell_backend_get_shell (shell_backend);
-	shell_settings = e_shell_get_shell_settings (shell);
-
 	web_view = em_format_html_get_web_view (formatter);
 
 	if (!init_actions)
@@ -4288,7 +4267,6 @@ e_mail_reader_show_search_bar (EMailReader *reader)
 void
 e_mail_reader_enable_show_folder (EMailReader *reader)
 {
-	EMailReaderPrivate *priv;
 	CamelFolder *folder;
 	GtkAction *action;
 	const gchar *action_name;
@@ -4298,7 +4276,6 @@ e_mail_reader_enable_show_folder (EMailReader *reader)
 
 	g_return_if_fail (E_IS_MAIL_READER (reader));
 
-	priv = E_MAIL_READER_GET_PRIVATE (reader);
 	folder = e_mail_reader_get_folder (reader);
 
 	full_name = camel_folder_get_full_name (folder);
diff --git a/mail/e-mail-session.c b/mail/e-mail-session.c
index 7c9a8e0..a9b12b0 100644
--- a/mail/e-mail-session.c
+++ b/mail/e-mail-session.c
@@ -450,9 +450,6 @@ proxy_gconf_notify_cb (GConfClient* client,
                        gpointer user_data)
 {
 	CamelSession *session = CAMEL_SESSION (user_data);
-	const gchar *key;
-
-	key = gconf_entry_get_key (entry);
 
 	if (strcmp (entry->key, KEY_SOCKS_HOST) == 0
 	    || strcmp (entry->key, KEY_SOCKS_PORT) == 0)
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index 0a74e6b..747fd66 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -799,14 +799,9 @@ emae_signaturetype_changed (GtkComboBox *dropdown, EMAccountEditor *emae)
 static void
 emae_signature_new (GtkWidget *widget, EMAccountEditor *emae)
 {
-	EShell *shell;
-	EShellSettings *shell_settings;
 	GtkWidget *editor;
 	gpointer parent;
 
-	shell = e_shell_get_default ();
-	shell_settings = e_shell_get_shell_settings (shell);
-
 	parent = gtk_widget_get_toplevel (widget);
 	parent = gtk_widget_is_toplevel (parent) ? parent : NULL;
 
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index f32124d..fb7ad59 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -2175,8 +2175,6 @@ efh_multipart_related (EMFormat *emf,
 	CamelContentType *content_type;
 	const gchar *start;
 	gint i, nparts, partidlen, displayid = 0;
-	/* puri is set but never used */
-	EMFormatPURI *puri;
 	struct _EMFormatHTMLJob *job;
 
 	if (!CAMEL_IS_MULTIPART (mp)) {
@@ -2225,7 +2223,7 @@ efh_multipart_related (EMFormat *emf,
 		body_part = camel_multipart_get_part (mp, i);
 		if (body_part != display_part) {
 			g_string_append_printf(emf->part_id, "related.%d", i);
-			puri = em_format_add_puri (emf, sizeof (EMFormatPURI), NULL, body_part, emfh_write_related);
+			em_format_add_puri (emf, sizeof (EMFormatPURI), NULL, body_part, emfh_write_related);
 			g_string_truncate (emf->part_id, partidlen);
 			d(printf(" part '%s' '%s' added\n", puri->uri?puri->uri:"", puri->cid));
 		}
diff --git a/mail/mail-mt.c b/mail/mail-mt.c
index 21471c5..a65f6e3 100644
--- a/mail/mail-mt.c
+++ b/mail/mail-mt.c
@@ -131,15 +131,8 @@ checkmem (gpointer p)
 static gboolean
 mail_msg_free (MailMsg *mail_msg)
 {
-	EShell *shell;
-	EShellBackend *shell_backend;
-
 	/* This is an idle callback. */
 
-	shell = e_shell_get_default ();
-	shell_backend = e_shell_get_backend_by_name (
-		shell, shell_builtin_backend);
-
 	if (mail_msg->activity != NULL)
 		g_object_unref (mail_msg->activity);
 
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index 9c8b875..5c349e2 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -1218,7 +1218,6 @@ vfolder_edit (EShellView *shell_view)
 	EShellBackend *shell_backend;
 	EShellWindow *shell_window;
 	EMailBackend *backend;
-	EMailSession *session;
 	GtkWidget *dialog;
 	const gchar *config_dir;
 	gchar *filename;
@@ -1232,7 +1231,6 @@ vfolder_edit (EShellView *shell_view)
 	filename = g_build_filename (config_dir, "vfolders.xml", NULL);
 
 	backend = E_MAIL_BACKEND (shell_backend);
-	session = e_mail_backend_get_session (backend);
 
 	vfolder_load_storage (backend);
 
@@ -1400,13 +1398,10 @@ vfolder_clone_rule (EMailSession *session, EFilterRule *in)
 void
 vfolder_gui_add_rule (EMVFolderRule *rule)
 {
-	EMailSession *session;
 	GtkWidget *w;
 	GtkDialog *gd;
 	GtkWidget *container;
 
-	session = em_vfolder_rule_get_session (rule);
-
 	w = e_filter_rule_get_widget ((EFilterRule *)rule, (ERuleContext *)context);
 
 	gd = (GtkDialog *)gtk_dialog_new_with_buttons (
diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c
index f61e0a6..5227df6 100644
--- a/modules/calendar/e-cal-shell-sidebar.c
+++ b/modules/calendar/e-cal-shell-sidebar.c
@@ -571,14 +571,12 @@ cal_shell_sidebar_finalize (GObject *object)
 
 static void
 new_calendar_clicked (GtkButton *button,
-		      EShellSidebar *shell_sidebar)
+                      EShellSidebar *shell_sidebar)
 {
 	EShellView *shell_view;
 	EShellWindow *shell_window;
-	EShellBackend *shell_backend;
 
 	shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
-	shell_backend = e_shell_view_get_shell_backend (shell_view);
 	shell_window = e_shell_view_get_shell_window (shell_view);
 
 	calendar_setup_new_calendar (GTK_WINDOW (shell_window));
diff --git a/modules/calendar/e-memo-shell-view-private.c b/modules/calendar/e-memo-shell-view-private.c
index 0880750..f4049d7 100644
--- a/modules/calendar/e-memo-shell-view-private.c
+++ b/modules/calendar/e-memo-shell-view-private.c
@@ -436,24 +436,17 @@ e_memo_shell_view_update_timezone (EMemoShellView *memo_shell_view)
 {
 	EMemoShellContent *memo_shell_content;
 	EMemoShellSidebar *memo_shell_sidebar;
-	ECalComponentPreview *memo_preview;
-	EPreviewPane *preview_pane;
-	EWebView *web_view;
 	icaltimezone *timezone;
 	ECalModel *model;
 	GList *clients, *iter;
 
 	memo_shell_content = memo_shell_view->priv->memo_shell_content;
-	preview_pane = e_memo_shell_content_get_preview_pane (memo_shell_content);
 	model = e_memo_shell_content_get_memo_model (memo_shell_content);
 	timezone = e_cal_model_get_timezone (model);
 
 	memo_shell_sidebar = memo_shell_view->priv->memo_shell_sidebar;
 	clients = e_memo_shell_sidebar_get_clients (memo_shell_sidebar);
 
-	web_view = e_preview_pane_get_web_view (preview_pane);
-	memo_preview = E_CAL_COMPONENT_PREVIEW (web_view);
-
 	for (iter = clients; iter != NULL; iter = iter->next) {
 		ECal *client = iter->data;
 
diff --git a/modules/calendar/e-task-shell-view-private.c b/modules/calendar/e-task-shell-view-private.c
index 83b0e94..5567cf9 100644
--- a/modules/calendar/e-task-shell-view-private.c
+++ b/modules/calendar/e-task-shell-view-private.c
@@ -587,24 +587,17 @@ e_task_shell_view_update_timezone (ETaskShellView *task_shell_view)
 {
 	ETaskShellContent *task_shell_content;
 	ETaskShellSidebar *task_shell_sidebar;
-	ECalComponentPreview *task_preview;
-	EPreviewPane *preview_pane;
-	EWebView *web_view;
 	icaltimezone *timezone;
 	ECalModel *model;
 	GList *clients, *iter;
 
 	task_shell_content = task_shell_view->priv->task_shell_content;
-	preview_pane = e_task_shell_content_get_preview_pane (task_shell_content);
 	model = e_task_shell_content_get_task_model (task_shell_content);
 	timezone = e_cal_model_get_timezone (model);
 
 	task_shell_sidebar = task_shell_view->priv->task_shell_sidebar;
 	clients = e_task_shell_sidebar_get_clients (task_shell_sidebar);
 
-	web_view = e_preview_pane_get_web_view (preview_pane);
-	task_preview = E_CAL_COMPONENT_PREVIEW (web_view);
-
 	for (iter = clients; iter != NULL; iter = iter->next) {
 		ECal *client = iter->data;
 
diff --git a/modules/mail/e-mail-shell-content.c b/modules/mail/e-mail-shell-content.c
index 9ec0cb8..2f7bea3 100644
--- a/modules/mail/e-mail-shell-content.c
+++ b/modules/mail/e-mail-shell-content.c
@@ -170,8 +170,6 @@ mail_shell_content_constructed (GObject *object)
 {
 	EMailShellContentPrivate *priv;
 	EShellContent *shell_content;
-	EShellBackend *shell_backend;
-	EShellWindow *shell_window;
 	EShellView *shell_view;
 	GtkWidget *container;
 	GtkWidget *widget;
@@ -183,8 +181,6 @@ mail_shell_content_constructed (GObject *object)
 
 	shell_content = E_SHELL_CONTENT (object);
 	shell_view = e_shell_content_get_shell_view (shell_content);
-	shell_window = e_shell_view_get_shell_window (shell_view);
-	shell_backend = e_shell_view_get_shell_backend (shell_view);
 
 	/* Build content widgets. */
 
diff --git a/modules/mail/e-mail-shell-view.c b/modules/mail/e-mail-shell-view.c
index 1754fbb..f43b1f3 100644
--- a/modules/mail/e-mail-shell-view.c
+++ b/modules/mail/e-mail-shell-view.c
@@ -218,7 +218,6 @@ mail_shell_view_execute_search (EShellView *shell_view)
 	EMailBackend *backend;
 	EMailSession *session;
 	EMFolderTree *folder_tree;
-	GtkTreeSelection *selection;
 	GtkWidget *message_list;
 	EFilterRule *rule;
 	EMailReader *reader;
@@ -263,7 +262,6 @@ mail_shell_view_execute_search (EShellView *shell_view)
 
 	mail_shell_sidebar = E_MAIL_SHELL_SIDEBAR (shell_sidebar);
 	folder_tree = e_mail_shell_sidebar_get_folder_tree (mail_shell_sidebar);
-	selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (folder_tree));
 
 	reader = E_MAIL_READER (mail_view);
 	folder = e_mail_reader_get_folder (reader);
diff --git a/modules/mailto-handler/evolution-mailto-handler.c b/modules/mailto-handler/evolution-mailto-handler.c
index 42c661a..afba8af 100644
--- a/modules/mailto-handler/evolution-mailto-handler.c
+++ b/modules/mailto-handler/evolution-mailto-handler.c
@@ -230,13 +230,11 @@ static void
 mailto_handler_constructed (GObject *object)
 {
 	EShell *shell;
-	EShellSettings *shell_settings;
 	EMailtoHandler *extension;
 
 	extension = E_MAILTO_HANDLER (object);
 
 	shell = mailto_handler_get_shell (extension);
-	shell_settings = e_shell_get_shell_settings (shell);
 
 	e_shell_settings_install_property_for_key (
 		"mailto-handler-check",
diff --git a/plugins/dbx-import/dbx-importer.c b/plugins/dbx-import/dbx-importer.c
index c7d1e6c..ca6fc1f 100644
--- a/plugins/dbx-import/dbx-importer.c
+++ b/plugins/dbx-import/dbx-importer.c
@@ -750,7 +750,6 @@ void
 org_gnome_evolution_readdbx_import (EImport *ei, EImportTarget *target, EImportImporter *im)
 {
 	DbxImporter *m;
-	gint id;
 
 	m = mail_msg_new (&dbx_import_info);
 	g_datalist_set_data (&target->data, "dbx-msg", m);
@@ -771,8 +770,6 @@ org_gnome_evolution_readdbx_import (EImport *ei, EImportTarget *target, EImportI
 		m->cancellable, "status",
 		G_CALLBACK (dbx_status), m);
 
-	id = m->base.seq;
-
 	mail_msg_unordered_push (m);
 }
 
diff --git a/plugins/sa-junk-plugin/em-junk-filter.c b/plugins/sa-junk-plugin/em-junk-filter.c
index ed52242..19df468 100644
--- a/plugins/sa-junk-plugin/em-junk-filter.c
+++ b/plugins/sa-junk-plugin/em-junk-filter.c
@@ -712,14 +712,11 @@ em_junk_sa_report_junk (EPlugin *ep, EMJunkTarget *target)
 	  "spam",
 	  NULL
 	};
-	gchar *sub = NULL;
 	CamelMimeMessage *msg = target->m;
 
 	if (!is_installed)
 		return;
 
-	sub = g_strdup (camel_mime_message_get_subject (msg));
-
 	d(fprintf (stderr, "em_junk_sa_report_junk\n"));
 	if (em_junk_sa_is_available (&target->error)) {
 		if (no_allow_tell && em_junk_sa_local_only)
diff --git a/plugins/tnef-attachments/tnef-plugin.c b/plugins/tnef-attachments/tnef-plugin.c
index 4148008..1324535 100644
--- a/plugins/tnef-attachments/tnef-plugin.c
+++ b/plugins/tnef-attachments/tnef-plugin.c
@@ -878,7 +878,6 @@ void saveVCalendar (TNEFStruct *tnef, const gchar *tmpdir) {
     FILE *fptr;
     gint index;
     DWORD *dword_ptr;
-    DWORD dword_val;
     dtr thedate;
 
     ifilename = g_build_filename (tmpdir, "calendar.vcf", NULL);
@@ -1098,7 +1097,6 @@ void saveVCalendar (TNEFStruct *tnef, const gchar *tmpdir) {
         if ((filename=MAPIFindUserProp (&(tnef->MapiProperties),
                         PROP_TAG (PT_BOOLEAN, 0x8506))) != MAPI_UNDEFINED) {
             dword_ptr = (DWORD*)filename->data;
-            dword_val = SwapDWord ((BYTE*)dword_ptr);
             fprintf(fptr, "CLASS:" );
             if (*dword_ptr == 1) {
                 fprintf(fptr,"PRIVATE\n");
@@ -1131,7 +1129,6 @@ void saveVTask (TNEFStruct *tnef, const gchar *tmpdir) {
     dtr thedate;
     FILE *fptr;
     DWORD *dword_ptr;
-    DWORD dword_val;
 
     vl = MAPIFindProperty (&(tnef->MapiProperties), PROP_TAG (PT_STRING8, PR_CONVERSATION_TOPIC));
 
@@ -1234,7 +1231,6 @@ void saveVTask (TNEFStruct *tnef, const gchar *tmpdir) {
                         PROP_TAG (PT_BOOLEAN, 0x8506));
         if (filename != MAPI_UNDEFINED) {
             dword_ptr = (DWORD*)filename->data;
-            dword_val = SwapDWord ((BYTE*)dword_ptr);
             fprintf(fptr, "CLASS:" );
             if (*dword_ptr == 1) {
                 fprintf(fptr,"PRIVATE\n");
diff --git a/shell/e-shell-sidebar.c b/shell/e-shell-sidebar.c
index 3e60096..b8ee23b 100644
--- a/shell/e-shell-sidebar.c
+++ b/shell/e-shell-sidebar.c
@@ -221,24 +221,21 @@ shell_sidebar_constructed (GObject *object)
 
 static void
 shell_sidebar_get_preferred_width (GtkWidget *widget,
-                                   gint      *minimum,
-                                   gint      *natural)
+                                   gint *minimum,
+                                   gint *natural)
 {
-	EShellSidebarPrivate *priv;
 	GtkWidget *child;
 
-	priv = E_SHELL_SIDEBAR_GET_PRIVATE (widget);
-
 	child = gtk_bin_get_child (GTK_BIN (widget));
 	gtk_widget_get_preferred_width (child, minimum, natural);
 
-	/* do not use priv->event_box here, otherwise it'll not ellipsize */
+	/* Do not use priv->event_box here, otherwise it won't ellipsize. */
 }
 
 static void
 shell_sidebar_get_preferred_height (GtkWidget *widget,
-                                    gint      *minimum,
-                                    gint      *natural)
+                                    gint *minimum,
+                                    gint *natural)
 {
 	EShellSidebarPrivate *priv;
 	gint child_min, child_nat;
@@ -252,8 +249,8 @@ shell_sidebar_get_preferred_height (GtkWidget *widget,
 	child = priv->event_box;
 	gtk_widget_get_preferred_height (child, &child_min, &child_nat);
 
-        *minimum += child_min;
-        *natural += child_nat;
+	*minimum += child_min;
+	*natural += child_nat;
 }
 
 static void
diff --git a/shell/e-shell-utils.c b/shell/e-shell-utils.c
index 9d2d4ca..e5cd6c5 100644
--- a/shell/e-shell-utils.c
+++ b/shell/e-shell-utils.c
@@ -44,13 +44,9 @@ void
 e_shell_configure_ui_manager (EShell *shell,
                               EUIManager *ui_manager)
 {
-	EShellSettings *shell_settings;
-
 	g_return_if_fail (E_IS_SHELL (shell));
 	g_return_if_fail (E_IS_UI_MANAGER (ui_manager));
 
-	shell_settings = e_shell_get_shell_settings (shell);
-
 	g_object_bind_property (
 		shell, "express-mode",
 		ui_manager, "express-mode",
diff --git a/widgets/misc/e-attachment-view.c b/widgets/misc/e-attachment-view.c
index 0a3a29a..d22ccd5 100644
--- a/widgets/misc/e-attachment-view.c
+++ b/widgets/misc/e-attachment-view.c
@@ -1286,7 +1286,6 @@ e_attachment_view_motion_notify_event (EAttachmentView *view,
 {
 	EAttachmentViewPrivate *priv;
 	GtkWidget *widget = GTK_WIDGET (view);
-	GdkDragContext *context;
 	GtkTargetList *targets;
 
 	g_return_val_if_fail (E_IS_ATTACHMENT_VIEW (view), FALSE);
@@ -1307,7 +1306,7 @@ e_attachment_view_motion_notify_event (EAttachmentView *view,
 
 	targets = gtk_drag_source_get_target_list (widget);
 
-	context = gtk_drag_begin (
+	gtk_drag_begin (
 		widget, targets, GDK_ACTION_COPY, 1, (GdkEvent *) event);
 
 	return TRUE;
diff --git a/widgets/misc/e-canvas-background.c b/widgets/misc/e-canvas-background.c
index adf2cdc..c05ba2d 100644
--- a/widgets/misc/e-canvas-background.c
+++ b/widgets/misc/e-canvas-background.c
@@ -115,14 +115,11 @@ ecb_set_property (GObject *object,
 		  const GValue *value,
 		  GParamSpec *pspec)
 {
-	GnomeCanvasItem *item;
 	ECanvasBackground *ecb;
 
 	GdkColor color = { 0, 0, 0, 0, };
 	GdkColor *pcolor;
-	gboolean color_changed = FALSE;
 
-	item = GNOME_CANVAS_ITEM (object);
 	ecb = E_CANVAS_BACKGROUND (object);
 
 	switch (prop_id) {
@@ -134,7 +131,6 @@ ecb_set_property (GObject *object,
 				   (color.green & 0xff00) << 8 |
 				   (color.blue & 0xff00) |
 				   0xff);
-		color_changed = TRUE;
 		break;
 
 	case PROP_FILL_COLOR_GDK:
@@ -147,12 +143,10 @@ ecb_set_property (GObject *object,
 				   (color.green & 0xff00) << 8 |
 				   (color.blue & 0xff00) |
 				   0xff);
-		color_changed = TRUE;
 		break;
 
 	case PROP_FILL_COLOR_RGBA:
 		ecb->priv->rgba = g_value_get_uint (value);
-		color_changed = TRUE;
 		break;
 
 	}
@@ -217,13 +211,9 @@ ecb_style_set (ECanvasBackground *ecb,
                GtkStyle *previous_style)
 {
 	GnomeCanvasItem *item = GNOME_CANVAS_ITEM (ecb);
-	GtkStyle *style;
 
-	style = gtk_widget_get_style (GTK_WIDGET (item->canvas));
-
-	if (gtk_widget_get_realized (GTK_WIDGET (item->canvas))) {
+	if (gtk_widget_get_realized (GTK_WIDGET (item->canvas)))
 		gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (ecb));
-	}
 }
 
 static void
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index d79c826..310b36c 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -360,9 +360,6 @@ static void
 ect_realize (ECellView *ecell_view)
 {
 	ECellTextView *text_view = (ECellTextView *) ecell_view;
-	GdkWindow *window;
-
-	window = gtk_widget_get_window (GTK_WIDGET (text_view->canvas));
 
 	text_view->i_cursor = gdk_cursor_new (GDK_XTERM);
 
diff --git a/widgets/table/e-cell-tree.c b/widgets/table/e-cell-tree.c
index e75c973..6a277fc 100644
--- a/widgets/table/e-cell-tree.c
+++ b/widgets/table/e-cell-tree.c
@@ -229,24 +229,14 @@ ect_draw (ECellView *ecell_view,
 	ETreeTableAdapter *tree_table_adapter = e_cell_tree_get_tree_table_adapter (ecell_view->e_table_model, row);
 	ETreePath node;
 	GdkRectangle rect;
-	GtkWidget *canvas = GTK_WIDGET (tree_view->canvas);
-	GtkStyle *style;
-	gboolean selected;
 	gint offset, subcell_offset;
 
-	style = gtk_widget_get_style (canvas);
-
-	selected = flags & E_CELL_SELECTED;
-
 	cairo_save (cr);
 
 	/* only draw the tree effects if we're the active sort */
 	if (/* XXX */ TRUE) {
 		GdkPixbuf *node_image;
 		gint node_image_width = 0, node_image_height = 0;
-		ETree *tree;
-
-		tree = E_TREE (gtk_widget_get_parent (canvas));
 
 		tree_view->prelit = FALSE;
 
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index e6371b0..2ae10b8 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -978,10 +978,8 @@ ethi_draw (GnomeCanvasItem *item,
 	gint x1, x2;
 	gint col;
 	GHashTable *arrows = g_hash_table_new (NULL, NULL);
-	GtkStateType state;
 	GtkStyle *style;
 
-	state = gtk_widget_get_state (GTK_WIDGET (canvas));
 	style = gtk_widget_get_style (GTK_WIDGET (canvas));
 
 	if (ethi->sort_info) {
@@ -1178,14 +1176,12 @@ ethi_start_drag (ETableHeaderItem *ethi, GdkEvent *event)
 	GHashTable *arrows = g_hash_table_new (NULL, NULL);
 	GtkStateType state;
 	GtkStyle *style;
-	GdkWindow *window;
 
 	GtkTargetEntry  ethi_drag_types[] = {
 		{ (gchar *) TARGET_ETABLE_COL_TYPE, 0, TARGET_ETABLE_COL_HEADER },
 	};
 
 	widget = GTK_WIDGET (GNOME_CANVAS_ITEM (ethi)->canvas);
-	window = gtk_widget_get_window (widget);
 	state = gtk_widget_get_state (widget);
 	style = gtk_widget_get_style (widget);
 
diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c
index 55e9015..2fe6a56 100644
--- a/widgets/table/e-table-header-utils.c
+++ b/widgets/table/e-table-header-utils.c
@@ -327,16 +327,14 @@ e_table_header_draw_button (cairo_t *cr, ETableCol *ecol,
 	/* Pixbuf or label */
 	if (ecol->icon_name != NULL) {
 		gint pwidth, pheight;
-		gint clip_width, clip_height;
+		gint clip_height;
 		gint xpos;
-		/* GdkPixmap *pixmap; */
 
 		g_return_if_fail (ecol->pixbuf != NULL);
 
 		pwidth = gdk_pixbuf_get_width (ecol->pixbuf);
 		pheight = gdk_pixbuf_get_height (ecol->pixbuf);
 
-		clip_width = MIN (pwidth, inner_width);
 		clip_height = MIN (pheight, inner_height);
 
 		xpos = inner_x;
@@ -360,26 +358,6 @@ e_table_header_draw_button (cairo_t *cr, ETableCol *ecol,
 			pango_cairo_show_layout (cr, layout);
 		}
 
-		/* FIXME: For some reason, under clutter gdk_draw_rgb_image_dithalign crashes
-		 * Debug that later */
-#if 0
-		pixmap = make_composite_pixmap (drawable, gc,
-						ecol->pixbuf, &style->bg[state],
-						clip_width, clip_height,
-						xpos,
-						inner_y + (inner_height - clip_height) / 2);
-
-		gdk_gc_set_clip_rectangle (gc, NULL);
-
-		if (pixmap) {
-			gdk_draw_drawable (drawable, gc, pixmap,
-					 0, 0,
-					 xpos,
-					 inner_y + (inner_height - clip_height) / 2,
-					 clip_width, clip_height);
-			g_object_unref (pixmap);
-		}
-#endif
 		gdk_cairo_set_source_pixbuf (cr, ecol->pixbuf,
 					     xpos, inner_y + (inner_height - clip_height) / 2);
 		cairo_paint (cr);
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index f51c741..98ce069 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -1635,22 +1635,12 @@ static void
 eti_realize (GnomeCanvasItem *item)
 {
 	ETableItem *eti = E_TABLE_ITEM (item);
-	GdkWindow *window;
-	GtkWidget *widget;
-	GtkStyle *style;
 
 	if (GNOME_CANVAS_ITEM_CLASS (eti_parent_class)->realize)
 		(*GNOME_CANVAS_ITEM_CLASS (eti_parent_class)->realize)(item);
 
 	eti->rows = e_table_model_row_count (eti->table_model);
 
-	/*
-	 * Gdk Resource allocation
-	 */
-	widget = GTK_WIDGET (item->canvas);
-	style = gtk_widget_get_style (widget);
-	window = gtk_widget_get_window (widget);
-
 	g_signal_connect (GTK_LAYOUT(item->canvas), "scroll_event", G_CALLBACK (eti_tree_unfreeze), eti);
 
 	if (eti->cell_views == NULL)
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index 5277031..f652267 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -1290,7 +1290,6 @@ e_text_draw (GnomeCanvasItem *item, cairo_t *cr,
 	gint xpos, ypos;
 	GnomeCanvas *canvas;
 	GtkWidget *widget;
-	GdkWindow *window;
 	GtkStyle *style;
 	GtkStateType state;
 
@@ -1299,7 +1298,6 @@ e_text_draw (GnomeCanvasItem *item, cairo_t *cr,
 	widget = GTK_WIDGET (canvas);
 	state = gtk_widget_get_state (widget);
 	style = gtk_widget_get_style (widget);
-	window = gtk_widget_get_window (widget);
 
 	cairo_save (cr);
 



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