aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-06-02 07:09:19 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-06-02 22:35:03 +0800
commit433eac7844481b8ceda0bae8bf08f6bb623185b0 (patch)
treed66a04ad4fa676b4bfce762dee09a82f4434d374 /widgets/misc
parente6c6cbdfb5fd5723ff840b24b29690235be0d74d (diff)
downloadgsoc2013-evolution-433eac7844481b8ceda0bae8bf08f6bb623185b0.tar.gz
gsoc2013-evolution-433eac7844481b8ceda0bae8bf08f6bb623185b0.tar.zst
gsoc2013-evolution-433eac7844481b8ceda0bae8bf08f6bb623185b0.zip
More code cleanup.
Diffstat (limited to 'widgets/misc')
-rw-r--r--widgets/misc/e-calendar-item.c76
-rw-r--r--widgets/misc/e-canvas-vbox.c2
-rw-r--r--widgets/misc/e-canvas.c8
-rw-r--r--widgets/misc/e-dateedit.c6
-rw-r--r--widgets/misc/e-filter-bar.c2
-rw-r--r--widgets/misc/e-image-chooser.c10
-rw-r--r--widgets/misc/e-map.c6
-rw-r--r--widgets/misc/e-map.h2
-rw-r--r--widgets/misc/e-selection-model-array.c44
-rw-r--r--widgets/misc/e-spinner.c4
-rw-r--r--widgets/misc/test-preferences-window.c2
11 files changed, 81 insertions, 81 deletions
diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c
index c1d599e879..9c9bd94b15 100644
--- a/widgets/misc/e-calendar-item.c
+++ b/widgets/misc/e-calendar-item.c
@@ -60,37 +60,37 @@ static void e_calendar_item_unmap (GnomeCanvasItem *item);
static void e_calendar_item_update (GnomeCanvasItem *item,
double *affine,
ArtSVP *clip_path,
- int flags);
+ gint flags);
static void e_calendar_item_draw (GnomeCanvasItem *item,
GdkDrawable *drawable,
- int x,
- int y,
- int width,
- int height);
+ gint x,
+ gint y,
+ gint width,
+ gint height);
static void e_calendar_item_draw_month (ECalendarItem *calitem,
GdkDrawable *drawable,
- int x,
- int y,
- int width,
- int height,
- int row,
- int col);
+ gint x,
+ gint y,
+ gint width,
+ gint height,
+ gint row,
+ gint col);
static void e_calendar_item_draw_day_numbers (ECalendarItem *calitem,
GdkDrawable *drawable,
- int width,
- int height,
- int row,
- int col,
- int year,
- int month,
- int start_weekday,
+ gint width,
+ gint height,
+ gint row,
+ gint col,
+ gint year,
+ gint month,
+ gint start_weekday,
gint cells_x,
gint cells_y);
static double e_calendar_item_point (GnomeCanvasItem *item,
double x,
double y,
- int cx,
- int cy,
+ gint cx,
+ gint cy,
GnomeCanvasItem **actual_item);
static void e_calendar_item_stop_selecting (ECalendarItem *calitem,
guint32 time);
@@ -891,7 +891,7 @@ static void
e_calendar_item_update (GnomeCanvasItem *item,
double *affine,
ArtSVP *clip_path,
- int flags)
+ gint flags)
{
ECalendarItem *calitem;
GtkStyle *style;
@@ -1024,10 +1024,10 @@ e_calendar_item_update (GnomeCanvasItem *item,
static void
e_calendar_item_draw (GnomeCanvasItem *canvas_item,
GdkDrawable *drawable,
- int x,
- int y,
- int width,
- int height)
+ gint x,
+ gint y,
+ gint width,
+ gint height)
{
ECalendarItem *calitem;
GtkStyle *style;
@@ -1151,12 +1151,12 @@ layout_set_day_text (ECalendarItem *calitem, PangoLayout *layout, gint day_index
static void
e_calendar_item_draw_month (ECalendarItem *calitem,
GdkDrawable *drawable,
- int x,
- int y,
- int width,
- int height,
- int row,
- int col)
+ gint x,
+ gint y,
+ gint width,
+ gint height,
+ gint row,
+ gint col)
{
GnomeCanvasItem *item;
GtkWidget *widget;
@@ -1395,13 +1395,13 @@ get_digit_fomat ()
static void
e_calendar_item_draw_day_numbers (ECalendarItem *calitem,
GdkDrawable *drawable,
- int width,
- int height,
- int row,
- int col,
- int year,
- int month,
- int start_weekday,
+ gint width,
+ gint height,
+ gint row,
+ gint col,
+ gint year,
+ gint month,
+ gint start_weekday,
gint cells_x,
gint cells_y)
{
diff --git a/widgets/misc/e-canvas-vbox.c b/widgets/misc/e-canvas-vbox.c
index 1eb0ddec12..bb0bd775e9 100644
--- a/widgets/misc/e-canvas-vbox.c
+++ b/widgets/misc/e-canvas-vbox.c
@@ -330,7 +330,7 @@ e_canvas_vbox_reflow( GnomeCanvasItem *item, gint flags )
max_width = item_width;
list = g_list_next(list);
- for( ; list; list = g_list_next(list)) {
+ for(; list; list = g_list_next(list)) {
running_height += e_canvas_vbox->spacing;
g_object_get (list->data,
diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c
index 39b89d2675..53e3eafeec 100644
--- a/widgets/misc/e-canvas.c
+++ b/widgets/misc/e-canvas.c
@@ -147,7 +147,7 @@ e_canvas_new (void)
/* Emits an event for an item in the canvas, be it the current item, grabbed
* item, or focused item, as appropriate.
*/
-static int
+static gint
emit_event (GnomeCanvas *canvas, GdkEvent *event)
{
GdkEvent *ev;
@@ -316,7 +316,7 @@ gnome_canvas_item_invoke_point (GnomeCanvasItem *item, double x, double y, gint
*/
#define DISPLAY_X1(canvas) (GNOME_CANVAS (canvas)->layout.xoffset)
#define DISPLAY_Y1(canvas) (GNOME_CANVAS (canvas)->layout.yoffset)
-static int
+static gint
pick_current_item (GnomeCanvas *canvas, GdkEvent *event)
{
gint button_down;
@@ -392,8 +392,8 @@ pick_current_item (GnomeCanvas *canvas, GdkEvent *event)
/* canvas pixel coords */
- cx = (int) (x + 0.5);
- cy = (int) (y + 0.5);
+ cx = (gint) (x + 0.5);
+ cy = (gint) (y + 0.5);
/* world coords */
diff --git a/widgets/misc/e-dateedit.c b/widgets/misc/e-dateedit.c
index b9ae1ad901..84b016934e 100644
--- a/widgets/misc/e-dateedit.c
+++ b/widgets/misc/e-dateedit.c
@@ -153,9 +153,9 @@ static void on_date_popup_date_selected (ECalendarItem *calitem,
EDateEdit *dedit);
static void hide_date_popup (EDateEdit *dedit);
static void rebuild_time_popup (EDateEdit *dedit);
-static gboolean field_set_to_none (const char *text);
+static gboolean field_set_to_none (const gchar *text);
static gboolean e_date_edit_parse_date (EDateEdit *dedit,
- const char *date_text,
+ const gchar *date_text,
struct tm *date_tm);
static gboolean e_date_edit_parse_time (EDateEdit *dedit,
const gchar *time_text,
@@ -1504,7 +1504,7 @@ field_set_to_none (const gchar *text)
gint n;
pos = text;
- while (n = (int)((unsigned char)*pos), isspace (n))
+ while (n = (gint)((guchar)*pos), isspace (n))
pos++;
none_string = _("None");
diff --git a/widgets/misc/e-filter-bar.c b/widgets/misc/e-filter-bar.c
index 1bc183dbe5..4463fd12d8 100644
--- a/widgets/misc/e-filter-bar.c
+++ b/widgets/misc/e-filter-bar.c
@@ -551,7 +551,7 @@ filter_bar_get_property (GObject *object,
}
}
-static int
+static gint
xml_get_prop_int (xmlNodePtr node, const gchar *prop)
{
gchar *buf;
diff --git a/widgets/misc/e-image-chooser.c b/widgets/misc/e-image-chooser.c
index e11439eb26..3c83cb1048 100644
--- a/widgets/misc/e-image-chooser.c
+++ b/widgets/misc/e-image-chooser.c
@@ -241,7 +241,7 @@ set_image_from_data (EImageChooser *chooser,
GdkPixbuf *scaled;
GdkPixbuf *composite;
- float scale;
+ gfloat scale;
gint new_height, new_width;
new_height = gdk_pixbuf_get_height (pixbuf);
@@ -259,17 +259,17 @@ set_image_from_data (EImageChooser *chooser,
/* we need to scale down */
printf ("we need to scale down\n");
if (new_height > new_width)
- scale = (float)chooser->priv->image_height / new_height;
+ scale = (gfloat)chooser->priv->image_height / new_height;
else
- scale = (float)chooser->priv->image_width / new_width;
+ scale = (gfloat)chooser->priv->image_width / new_width;
}
else {
/* we need to scale up */
printf ("we need to scale up\n");
if (new_height > new_width)
- scale = (float)new_height / chooser->priv->image_height;
+ scale = (gfloat)new_height / chooser->priv->image_height;
else
- scale = (float)new_width / chooser->priv->image_width;
+ scale = (gfloat)new_width / chooser->priv->image_width;
}
printf ("scale = %g\n", scale);
diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c
index f35335f37d..82ce1c17aa 100644
--- a/widgets/misc/e-map.c
+++ b/widgets/misc/e-map.c
@@ -689,7 +689,7 @@ e_map_world_to_window (EMap *map, double world_longitude, double world_latitude,
/* --- Zoom --- */
-double
+gdouble
e_map_get_magnification (EMap *map)
{
EMapPrivate *priv;
@@ -1153,8 +1153,8 @@ repaint_point (EMap *map, EMapPoint *point)
e_map_world_to_window (map, point->longitude, point->latitude, &px, &py);
- area.x = (int) px - 2;
- area.y = (int) py - 2;
+ area.x = (gint) px - 2;
+ area.y = (gint) py - 2;
area.width = 5;
area.height = 5;
request_paint_area (map, &area);
diff --git a/widgets/misc/e-map.h b/widgets/misc/e-map.h
index 0c915fb5fa..df3f70a343 100644
--- a/widgets/misc/e-map.h
+++ b/widgets/misc/e-map.h
@@ -96,7 +96,7 @@ void e_map_world_to_window (EMap *map,
/* --- Zoom --- */
-double e_map_get_magnification (EMap *map);
+gdouble e_map_get_magnification (EMap *map);
/* Pass TRUE if we want the smooth zoom hack */
void e_map_set_smooth_zoom (EMap *map, gboolean state);
diff --git a/widgets/misc/e-selection-model-array.c b/widgets/misc/e-selection-model-array.c
index dde69a7e06..90922b5560 100644
--- a/widgets/misc/e-selection-model-array.c
+++ b/widgets/misc/e-selection-model-array.c
@@ -357,7 +357,7 @@ esma_invert_selection (ESelectionModel *selection)
e_selection_model_cursor_changed(E_SELECTION_MODEL(esma), -1, -1);
}
-static int
+static gint
esma_row_count (ESelectionModel *selection)
{
ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection);
@@ -405,14 +405,14 @@ esma_change_range(ESelectionModel *selection, gint start, gint end, gboolean gro
}
}
-static int
+static gint
esma_cursor_row (ESelectionModel *selection)
{
ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection);
return esma->cursor_row;
}
-static int
+static gint
esma_cursor_col (ESelectionModel *selection)
{
ESelectionModelArray *esma = E_SELECTION_MODEL_ARRAY(selection);
@@ -569,25 +569,25 @@ e_selection_model_array_class_init (ESelectionModelArrayClass *klass)
object_class->get_property = esma_get_property;
object_class->set_property = esma_set_property;
- esm_class->is_row_selected = esma_is_row_selected ;
- esm_class->foreach = esma_foreach ;
- esm_class->clear = esma_clear ;
- esm_class->selected_count = esma_selected_count ;
- esm_class->select_all = esma_select_all ;
- esm_class->invert_selection = esma_invert_selection ;
- esm_class->row_count = esma_row_count ;
-
- esm_class->change_one_row = esma_change_one_row ;
- esm_class->change_cursor = esma_change_cursor ;
- esm_class->cursor_row = esma_cursor_row ;
- esm_class->cursor_col = esma_cursor_col ;
-
- esm_class->select_single_row = esma_select_single_row ;
- esm_class->toggle_single_row = esma_toggle_single_row ;
- esm_class->move_selection_end = esma_move_selection_end ;
- esm_class->set_selection_end = esma_set_selection_end ;
-
- klass->get_row_count = NULL ;
+ esm_class->is_row_selected = esma_is_row_selected;
+ esm_class->foreach = esma_foreach;
+ esm_class->clear = esma_clear;
+ esm_class->selected_count = esma_selected_count;
+ esm_class->select_all = esma_select_all;
+ esm_class->invert_selection = esma_invert_selection;
+ esm_class->row_count = esma_row_count;
+
+ esm_class->change_one_row = esma_change_one_row;
+ esm_class->change_cursor = esma_change_cursor;
+ esm_class->cursor_row = esma_cursor_row;
+ esm_class->cursor_col = esma_cursor_col;
+
+ esm_class->select_single_row = esma_select_single_row;
+ esm_class->toggle_single_row = esma_toggle_single_row;
+ esm_class->move_selection_end = esma_move_selection_end;
+ esm_class->set_selection_end = esma_set_selection_end;
+
+ klass->get_row_count = NULL;
g_object_class_install_property (object_class, PROP_CURSOR_ROW,
g_param_spec_int ("cursor_row",
diff --git a/widgets/misc/e-spinner.c b/widgets/misc/e-spinner.c
index 78303cc9ec..bf71e4e50c 100644
--- a/widgets/misc/e-spinner.c
+++ b/widgets/misc/e-spinner.c
@@ -315,7 +315,7 @@ e_spinner_images_load (GdkScreen *screen,
n = 0;
for (y = 0; y < grid_height; y += size)
{
- for (x = 0; x < grid_width ; x += size)
+ for (x = 0; x < grid_width; x += size)
{
pixbuf = extract_frame (icon_pixbuf, x, y, size);
@@ -633,7 +633,7 @@ e_spinner_init (ESpinner *spinner)
details->need_load = TRUE;
}
-static int
+static gint
e_spinner_expose (GtkWidget *widget,
GdkEventExpose *event)
{
diff --git a/widgets/misc/test-preferences-window.c b/widgets/misc/test-preferences-window.c
index 4e4d9894fa..c5291cf755 100644
--- a/widgets/misc/test-preferences-window.c
+++ b/widgets/misc/test-preferences-window.c
@@ -50,7 +50,7 @@ add_pages (EPreferencesWindow *preferences_window)
}
}
-static int
+static gint
delete_event_callback (GtkWidget *widget,
GdkEventAny *event,
gpointer data)