[evolution/gtk3: 31/47] Fix minor compiler warnings
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gtk3: 31/47] Fix minor compiler warnings
- Date: Thu, 13 Jan 2011 01:26:35 +0000 (UTC)
commit 0b16be145765298a1215f5ba31fb4b67b41e11ea
Author: Milan Crha <mcrha redhat com>
Date: Tue Dec 14 16:12:11 2010 +0100
Fix minor compiler warnings
calendar/gui/e-meeting-time-sel.c | 19 ++++++-------------
calendar/gui/e-select-names-renderer.c | 2 +-
capplet/settings/mail-decoration.c | 2 +-
widgets/misc/e-cell-renderer-combo.c | 4 ++--
4 files changed, 10 insertions(+), 17 deletions(-)
---
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index 9107616..595c8a3 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -115,9 +115,8 @@ static void e_meeting_time_selector_realize (GtkWidget *widget);
static void e_meeting_time_selector_unrealize (GtkWidget *widget);
static void e_meeting_time_selector_style_set (GtkWidget *widget,
GtkStyle *previous_style);
-static gint e_meeting_time_selector_draw (GtkWidget *widget,
- GdkEventExpose *event);
-static void e_meeting_time_selector_draw_shadow (EMeetingTimeSelector *mts);
+static gint e_meeting_time_selector_draw (GtkWidget *widget, cairo_t *cr);
+static void e_meeting_time_selector_draw_shadow (EMeetingTimeSelector *mts, cairo_t *cr);
static void e_meeting_time_selector_hadjustment_changed (GtkAdjustment *adjustment,
EMeetingTimeSelector *mts);
static void e_meeting_time_selector_vadjustment_changed (GtkAdjustment *adjustment,
@@ -1208,27 +1207,24 @@ e_meeting_time_selector_style_set (GtkWidget *widget,
/* This draws a shadow around the top display and main display. */
static gint
-e_meeting_time_selector_draw (GtkWidget *widget,
- GdkEventExpose *event)
+e_meeting_time_selector_draw (GtkWidget *widget, cairo_t *cr)
{
EMeetingTimeSelector *mts;
mts = E_MEETING_TIME_SELECTOR (widget);
- e_meeting_time_selector_draw_shadow (mts);
+ e_meeting_time_selector_draw_shadow (mts, cr);
if (GTK_WIDGET_CLASS (e_meeting_time_selector_parent_class)->draw)
- (*GTK_WIDGET_CLASS (e_meeting_time_selector_parent_class)->draw)(widget, event);
+ (*GTK_WIDGET_CLASS (e_meeting_time_selector_parent_class)->draw)(widget, cr);
return FALSE;
}
static void
-e_meeting_time_selector_draw_shadow (EMeetingTimeSelector *mts)
+e_meeting_time_selector_draw_shadow (EMeetingTimeSelector *mts, cairo_t *cr)
{
GtkAllocation allocation;
- GdkWindow *window;
- cairo_t *cr;
GtkStyle *style;
gint x, y, w, h;
@@ -1240,13 +1236,10 @@ e_meeting_time_selector_draw_shadow (EMeetingTimeSelector *mts)
h = allocation.height + allocation.height + 4;
style = gtk_widget_get_style (GTK_WIDGET (mts));
- window = gtk_widget_get_window (GTK_WIDGET (mts));
- cr = gdk_cairo_create(window);
gtk_paint_shadow (
style, cr, GTK_STATE_NORMAL,
GTK_SHADOW_IN, NULL, NULL, x, y, w, h);
- cairo_destroy(cr);
}
/* When the main canvas scrolls, we scroll the other canvases. */
diff --git a/calendar/gui/e-select-names-renderer.c b/calendar/gui/e-select-names-renderer.c
index 25c5947..6f16d7b 100644
--- a/calendar/gui/e-select-names-renderer.c
+++ b/calendar/gui/e-select-names-renderer.c
@@ -100,7 +100,7 @@ e_select_names_renderer_editing_done (GtkCellEditable *editable, ESelectNamesRen
static GtkCellEditable *
e_select_names_renderer_start_editing (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, const gchar *path,
- GdkRectangle *bg_area, GdkRectangle *cell_area, GtkCellRendererState flags)
+ const GdkRectangle *bg_area, const GdkRectangle *cell_area, GtkCellRendererState flags)
{
ESelectNamesRenderer *sn_cell = E_SELECT_NAMES_RENDERER (cell);
GtkCellRendererText *text_cell = GTK_CELL_RENDERER_TEXT (cell);
diff --git a/capplet/settings/mail-decoration.c b/capplet/settings/mail-decoration.c
index 113a694..999567e 100644
--- a/capplet/settings/mail-decoration.c
+++ b/capplet/settings/mail-decoration.c
@@ -87,7 +87,7 @@ md_translate_position (GdkWindow *w, double ex, double ey, gint *x, gint *y, Gtk
*y = (gint)ey;
while (w && w != gtk_widget_get_window (window)) {
- gint cx, cy, cw, ch, cd;
+ gint cx, cy, cw, ch;
gdk_window_get_geometry (w, &cx, &cy, &cw, &ch);
*x += cx;
*y += cy;
diff --git a/widgets/misc/e-cell-renderer-combo.c b/widgets/misc/e-cell-renderer-combo.c
index 9c2c288..ee0e47d 100644
--- a/widgets/misc/e-cell-renderer-combo.c
+++ b/widgets/misc/e-cell-renderer-combo.c
@@ -60,7 +60,7 @@ ecrc_editing_done (GtkCellEditable *editable, ECellRendererCombo *cell)
static GtkCellEditable *
ecrc_start_editing (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, const gchar *path,
- GdkRectangle *bg_area, GdkRectangle *cell_area, GtkCellRendererState flags)
+ const GdkRectangle *bg_area, const GdkRectangle *cell_area, GtkCellRendererState flags)
{
ECellRendererCombo *combo_cell = E_CELL_RENDERER_COMBO (cell);
GtkCellRendererText *text_cell = GTK_CELL_RENDERER_TEXT (cell);
@@ -91,7 +91,7 @@ ecrc_start_editing (GtkCellRenderer *cell, GdkEvent *event, GtkWidget *widget, c
}
static void
-ecrc_get_size (GtkCellRenderer *cell, GtkWidget *widget, GdkRectangle *cell_area,
+ecrc_get_size (GtkCellRenderer *cell, GtkWidget *widget, const GdkRectangle *cell_area,
gint *x_offset, gint *y_offset, gint *width, gint *height)
{
GtkWidget *btn;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]