From c0a255eb90769638d57ae4122932f75c46e4e531 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 11 Sep 2008 15:34:29 +0000 Subject: Merge revisions 36016:36303 from trunk. svn path=/branches/kill-bonobo/; revision=36307 --- widgets/table/e-table-header-utils.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) (limited to 'widgets/table/e-table-header-utils.c') diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c index 17ca805d18..6f613433ea 100644 --- a/widgets/table/e-table-header-utils.c +++ b/widgets/table/e-table-header-utils.c @@ -1,26 +1,25 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* - * e-table-header-utils.h - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * - * Authors: - * Chris Lahey - * Miguel de Icaza - * Federico Mena-Quintero + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License, version 2, as published by the Free Software Foundation. + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - * 02110-1301, USA. + * Authors: + * Chris Lahey + * Miguel de Icaza + * Federico Mena-Quintero + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) + * */ #include -- cgit v1.2.3 From 4f4615a46d5ba518c1e6a0c2412b1edf1e268d99 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 24 Nov 2008 05:14:44 +0000 Subject: Merge revisions 36737:36810 from trunk. svn path=/branches/kill-bonobo/; revision=36811 --- widgets/table/e-table-header-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'widgets/table/e-table-header-utils.c') diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c index 6f613433ea..afcc0720e1 100644 --- a/widgets/table/e-table-header-utils.c +++ b/widgets/table/e-table-header-utils.c @@ -463,7 +463,7 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol, } else { e_table_draw_elided_string (drawable, gc, widget, inner_x, inner_y, - layout, ecol->text, inner_width, TRUE); + layout, ecol->text, inner_width, FALSE); } g_object_unref (layout); -- cgit v1.2.3 From f4cf9af33ccde3142a3011e8b2dbcfb4cbc9ae81 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 20 May 2009 16:50:00 +0200 Subject: Use -no-undefined on Linux too There still left two things opened, search for KILL-BONOBO to find them. One is in calendar's Makefile.am, one in composer. --- widgets/table/e-table-header-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'widgets/table/e-table-header-utils.c') diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c index afcc0720e1..80b5be42ce 100644 --- a/widgets/table/e-table-header-utils.c +++ b/widgets/table/e-table-header-utils.c @@ -29,7 +29,7 @@ #include -#include "misc/e-unicode.h" +#include "e-util/e-unicode.h" #include "e-table-defines.h" #include "e-table-header-utils.h" -- cgit v1.2.3 From e4afd3f9fb962ea1295a0657ec9f83a427829171 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 26 May 2009 23:21:02 -0400 Subject: Remove trailing whitespace, again. --- widgets/table/e-table-header-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'widgets/table/e-table-header-utils.c') diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c index afcc0720e1..ae5ebf871f 100644 --- a/widgets/table/e-table-header-utils.c +++ b/widgets/table/e-table-header-utils.c @@ -10,7 +10,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see + * License along with the program; if not, see * * * Authors: -- cgit v1.2.3 From 948235c3d1076dbe6ed2e57a24c16a083bbd9f01 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 27 May 2009 10:29:19 -0400 Subject: Prefer GLib basic types over C types. --- widgets/table/e-table-header-utils.c | 56 ++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'widgets/table/e-table-header-utils.c') diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c index a8a533f35d..84b547c6c8 100644 --- a/widgets/table/e-table-header-utils.c +++ b/widgets/table/e-table-header-utils.c @@ -35,7 +35,7 @@ #include "e-table-header-utils.h" static PangoLayout* -build_header_layout (GtkWidget *widget, const char *str) +build_header_layout (GtkWidget *widget, const gchar *str) { PangoLayout *layout; @@ -70,8 +70,8 @@ build_header_layout (GtkWidget *widget, const char *str) double e_table_header_compute_height (ETableCol *ecol, GtkWidget *widget) { - int ythick; - int height; + gint ythick; + gint height; PangoLayout *layout; g_return_val_if_fail (ecol != NULL, -1); @@ -111,13 +111,13 @@ e_table_header_width_extras (GtkStyle *style) */ static GdkPixmap * make_composite_pixmap (GdkDrawable *drawable, GdkGC *gc, - GdkPixbuf *pixbuf, GdkColor *bg, int width, int height, - int dither_xofs, int dither_yofs) + GdkPixbuf *pixbuf, GdkColor *bg, gint width, gint height, + gint dither_xofs, gint dither_yofs) { - int pwidth, pheight; + gint pwidth, pheight; GdkPixmap *pixmap; GdkPixbuf *tmp; - int color; + gint color; pwidth = gdk_pixbuf_get_width (pixbuf); pheight = gdk_pixbuf_get_height (pixbuf); @@ -141,7 +141,7 @@ make_composite_pixmap (GdkDrawable *drawable, GdkGC *gc, 16, color, color); } else { - int x, y, rowstride; + gint x, y, rowstride; GdkPixbuf *fade; guchar *pixels; @@ -162,7 +162,7 @@ make_composite_pixmap (GdkDrawable *drawable, GdkGC *gc, for (y = 0; y < height; y++) { guchar *p; - int yfactor; + gint yfactor; p = pixels + y * rowstride; @@ -172,7 +172,7 @@ make_composite_pixmap (GdkDrawable *drawable, GdkGC *gc, yfactor = height; for (x = 0; x < width; x++) { - int xfactor; + gint xfactor; if (width < pwidth) xfactor = width - x; @@ -238,12 +238,12 @@ make_composite_pixmap (GdkDrawable *drawable, GdkGC *gc, **/ static void e_table_draw_elided_string (GdkDrawable *drawable, GdkGC *gc, GtkWidget *widget, - int x, int y, PangoLayout *layout, char *str, - int max_width, gboolean center) + gint x, gint y, PangoLayout *layout, gchar *str, + gint max_width, gboolean center) { - int width; - int height; - int index; + gint width; + gint height; + gint index; GSList *lines; PangoLayoutLine *line; @@ -257,7 +257,7 @@ e_table_draw_elided_string (GdkDrawable *drawable, GdkGC *gc, GtkWidget *widget, gdk_gc_set_clip_rectangle (gc, NULL); if (width <= max_width) { - int xpos; + gint xpos; if (center) xpos = x + (max_width - width) / 2; @@ -268,8 +268,8 @@ e_table_draw_elided_string (GdkDrawable *drawable, GdkGC *gc, GtkWidget *widget, xpos, y, layout); } else { - int arrow_width; - int i; + gint arrow_width; + gint i; if (max_width < ARROW_WIDTH + 1) arrow_width = max_width - 1; @@ -323,13 +323,13 @@ void e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol, GtkStyle *style, GtkStateType state, GtkWidget *widget, - int x, int y, int width, int height, - int button_width, int button_height, + gint x, gint y, gint width, gint height, + gint button_width, gint button_height, ETableColArrow arrow) { - int xthick, ythick; - int inner_x, inner_y; - int inner_width, inner_height; + gint xthick, ythick; + gint inner_x, inner_y; + gint inner_width, inner_height; GdkGC *gc; PangoLayout *layout; static gpointer g_label = NULL; @@ -385,7 +385,7 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol, case E_TABLE_COL_ARROW_UP: case E_TABLE_COL_ARROW_DOWN: { - int arrow_width, arrow_height; + gint arrow_width, arrow_height; arrow_width = MIN (MIN_ARROW_SIZE, inner_width); arrow_height = MIN (MIN_ARROW_SIZE, inner_height); @@ -413,9 +413,9 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol, /* Pixbuf or label */ if (ecol->is_pixbuf) { - int pwidth, pheight; - int clip_width, clip_height; - int xpos; + gint pwidth, pheight; + gint clip_width, clip_height; + gint xpos; GdkPixmap *pixmap; g_return_if_fail (ecol->pixbuf != NULL); @@ -429,7 +429,7 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol, xpos = inner_x; if (inner_width - pwidth > 11) { - int ypos; + gint ypos; pango_layout_get_pixel_size (layout, &width, NULL); -- cgit v1.2.3 From 14f8eee012382f04090ea9277e9567d5f32e8bf0 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 28 May 2009 13:06:29 -0400 Subject: Whitespace cleanup. --- widgets/table/e-table-header-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'widgets/table/e-table-header-utils.c') diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c index 84b547c6c8..7976289020 100644 --- a/widgets/table/e-table-header-utils.c +++ b/widgets/table/e-table-header-utils.c @@ -241,7 +241,7 @@ e_table_draw_elided_string (GdkDrawable *drawable, GdkGC *gc, GtkWidget *widget, gint x, gint y, PangoLayout *layout, gchar *str, gint max_width, gboolean center) { - gint width; + gint width; gint height; gint index; GSList *lines; -- cgit v1.2.3 From 433eac7844481b8ceda0bae8bf08f6bb623185b0 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 1 Jun 2009 19:09:19 -0400 Subject: More code cleanup. --- widgets/table/e-table-header-utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'widgets/table/e-table-header-utils.c') diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c index 7976289020..5d6ed5cb36 100644 --- a/widgets/table/e-table-header-utils.c +++ b/widgets/table/e-table-header-utils.c @@ -67,7 +67,7 @@ build_header_layout (GtkWidget *widget, const gchar *str) * * Return value: The height of the button, in pixels. **/ -double +gdouble e_table_header_compute_height (ETableCol *ecol, GtkWidget *widget) { gint ythick; @@ -98,7 +98,7 @@ e_table_header_compute_height (ETableCol *ecol, GtkWidget *widget) return height; } -double +gdouble e_table_header_width_extras (GtkStyle *style) { g_return_val_if_fail (style != NULL, -1); @@ -179,7 +179,7 @@ make_composite_pixmap (GdkDrawable *drawable, GdkGC *gc, else xfactor = width; - p[3] = ((int) p[3] * xfactor * yfactor / (width * height)); + p[3] = ((gint) p[3] * xfactor * yfactor / (width * height)); p += 4; } } -- cgit v1.2.3 From 374bd42f69aca2e132fd854c9619f3d7491f1f96 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 12 Jul 2009 23:33:07 -0400 Subject: Fix excessive whitespace. --- widgets/table/e-table-header-utils.c | 1 - 1 file changed, 1 deletion(-) (limited to 'widgets/table/e-table-header-utils.c') diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c index 5d6ed5cb36..c87ae40f79 100644 --- a/widgets/table/e-table-header-utils.c +++ b/widgets/table/e-table-header-utils.c @@ -276,7 +276,6 @@ e_table_draw_elided_string (GdkDrawable *drawable, GdkGC *gc, GtkWidget *widget, else arrow_width = ARROW_WIDTH; - lines = pango_layout_get_lines (layout); line = lines->data; -- cgit v1.2.3