aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorKjartan Maraas <kmaraas@gnome.org>2011-02-09 00:57:50 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:31 +0800
commit8efc1bc6f91e06ca61b00eb8119c9c36697e43a6 (patch)
tree95ec3e7ac41deec84bfd02de6ee05faf245b3dea /widgets
parentbe15d6730130da3f9e2fa6579233d5a9b304a7ea (diff)
downloadgsoc2013-evolution-8efc1bc6f91e06ca61b00eb8119c9c36697e43a6.tar.gz
gsoc2013-evolution-8efc1bc6f91e06ca61b00eb8119c9c36697e43a6.tar.zst
gsoc2013-evolution-8efc1bc6f91e06ca61b00eb8119c9c36697e43a6.zip
Bug 641756 - Fix warnings from GCC 4.6
GCC learned how to find dead assignments.
Diffstat (limited to 'widgets')
-rw-r--r--widgets/misc/e-attachment-view.c3
-rw-r--r--widgets/misc/e-canvas-background.c12
-rw-r--r--widgets/table/e-cell-text.c3
-rw-r--r--widgets/table/e-cell-tree.c10
-rw-r--r--widgets/table/e-table-header-item.c4
-rw-r--r--widgets/table/e-table-header-utils.c24
-rw-r--r--widgets/table/e-table-item.c10
-rw-r--r--widgets/text/e-text.c2
8 files changed, 3 insertions, 65 deletions
diff --git a/widgets/misc/e-attachment-view.c b/widgets/misc/e-attachment-view.c
index 0a3a29aa77..d22ccd5754 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 adf2cdc83c..c05ba2df49 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 d79c826b5c..310b36c655 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 e75c973d57..6a277fcce3 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 e6371b01b6..2ae10b87f3 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 55e90159c6..2fe6a56089 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 f51c741127..98ce069e81 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 5277031a06..f6522672b2 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);