diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2007-10-10 12:54:36 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2007-10-10 12:54:36 +0800 |
commit | b32649a94cd485f742d2ad5f1b76d7385393e137 (patch) | |
tree | 002248795c141c992667d73fbf34c40f394fbbf0 /widgets | |
parent | 6a2861c3aa49e9439d3e665b0855222716add3a3 (diff) | |
download | gsoc2013-evolution-b32649a94cd485f742d2ad5f1b76d7385393e137.tar.gz gsoc2013-evolution-b32649a94cd485f742d2ad5f1b76d7385393e137.tar.zst gsoc2013-evolution-b32649a94cd485f742d2ad5f1b76d7385393e137.zip |
** Fixes bug #437579
2007-10-09 Matthew Barnes <mbarnes@redhat.com>
** Fixes bug #437579
* addressbook/conduit/address-conduit.c:
* addressbook/gui/component/addressbook-config.c:
* addressbook/gui/contact-editor/e-contact-editor.c:
* addressbook/gui/widgets/eab-gui-util.c:
* calendar/conduits/calendar/calendar-conduit.c:
* calendar/conduits/memo/memo-conduit.c:
* calendar/conduits/todo/todo-conduit.c:
* calendar/gui/dialogs/alarm-dialog.c:
* calendar/gui/dialogs/event-page.c:
* calendar/gui/dialogs/memo-page.c:
* calendar/gui/dialogs/task-page.c:
* calendar/gui/e-day-view-layout.c:
* calendar/gui/e-day-view-layout.h:
* calendar/gui/print.c:
* e-util/e-pilot-map.c:
* e-util/e-plugin.c:
* e-util/e-profile-event.c:
* e-util/e-signature.c:
* filter/filter-file.c:
* mail/e-searching-tokenizer.c:
* mail/em-folder-browser.c:
* mail/em-format-html.c:
* mail/em-format-view.c:
* mail/em-format.c:
* mail/em-mailer-prefs.c:
* mail/em-mailer-prefs.h:
* mail/mail-session.c:
* mail/mail-session.h:
* mail/mail-vfolder.c:
* mail/message-list.c:
* plugins/bbdb/bbdb.c:
* plugins/bbdb/gaimbuddies.c:
* plugins/calendar-http/calendar-http.c:
* plugins/exchange-operations/exchange-user-dialog.c:
* plugins/face/face.c:
* shell/e-shell-window.c:
* shell/e-shell.c:
* smime/lib/e-cert-db.c:
* tools/killev.c:
* widgets/misc/e-cursors.c:
* widgets/misc/e-spinner.c:
* widgets/misc/e-unicode.c:
* widgets/table/e-table-field-chooser-item.c:
* widgets/table/e-table-header-item.c:
* widgets/table/e-table-header-item.h:
* widgets/table/e-table-header-utils.c:
* widgets/table/e-table.c:
* widgets/text/e-text.c:
Fix various compiler warnings. Patch from Milan Crha.
svn path=/trunk/; revision=34368
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/ChangeLog | 7 | ||||
-rw-r--r-- | widgets/misc/ChangeLog | 9 | ||||
-rw-r--r-- | widgets/misc/e-cursors.c | 2 | ||||
-rw-r--r-- | widgets/misc/e-spinner.c | 18 | ||||
-rw-r--r-- | widgets/misc/e-unicode.c | 4 | ||||
-rw-r--r-- | widgets/table/ChangeLog | 11 | ||||
-rw-r--r-- | widgets/table/e-table-field-chooser-item.c | 4 | ||||
-rw-r--r-- | widgets/table/e-table-header-item.c | 21 | ||||
-rw-r--r-- | widgets/table/e-table-header-item.h | 6 | ||||
-rw-r--r-- | widgets/table/e-table-header-utils.c | 6 | ||||
-rw-r--r-- | widgets/table/e-table.c | 4 | ||||
-rw-r--r-- | widgets/text/e-text.c | 8 |
12 files changed, 56 insertions, 44 deletions
diff --git a/widgets/ChangeLog b/widgets/ChangeLog index 6492c5d9b0..b98f4651fc 100644 --- a/widgets/ChangeLog +++ b/widgets/ChangeLog @@ -1,3 +1,10 @@ +2007-10-09 Matthew Barnes <mbarnes@redhat.com> + + ** Fixes part of bug #437579 + + * text/e-text.c: + Fix various compiler warnings. Patch from Milan Crha. + 2007-09-27 Hiroyuki Ikezoe <poincare@ikezoe.net> ** Fix for bug #461195 diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index 2899ec0fa4..b5c74cbb2d 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,12 @@ +2007-10-09 Matthew Barnes <mbarnes@redhat.com> + + ** Fixes part of bug #437579 + + * e-cursors.c: + * e-spinner.c: + * e-unicode.c: + Fix various compiler warnings. Patch from Milan Crha. + 2007-10-01 Milan Crha <mcrha@redhat.com> ** Fix for bug #413420 diff --git a/widgets/misc/e-cursors.c b/widgets/misc/e-cursors.c index 96b21bef97..5a709a6927 100644 --- a/widgets/misc/e-cursors.c +++ b/widgets/misc/e-cursors.c @@ -115,7 +115,7 @@ e_cursors_init (void) e_color_init (); for (i = 0; cursors [i].hot_x; i++){ - GdkBitmap *bitmap, *mask; + GdkBitmap *bitmap = NULL, *mask = NULL; if (cursors [i].hot_x < 0) cursors [i].cursor = gdk_cursor_new (cursors [i].hot_y); diff --git a/widgets/misc/e-spinner.c b/widgets/misc/e-spinner.c index 4f512a3c98..bbd5d2e5f2 100644 --- a/widgets/misc/e-spinner.c +++ b/widgets/misc/e-spinner.c @@ -101,6 +101,7 @@ static void e_spinner_cache_class_init (ESpinnerCacheClass *klass); static void e_spinner_cache_init (ESpinnerCache *cache); static GObjectClass *e_spinner_cache_parent_class; +static gpointer spinner_cache = NULL; static GType e_spinner_cache_get_type (void) @@ -484,24 +485,17 @@ e_spinner_cache_class_init (ESpinnerCacheClass *klass) g_type_class_add_private (object_class, sizeof (ESpinnerCachePrivate)); } -static ESpinnerCache *spinner_cache = NULL; - static ESpinnerCache * e_spinner_cache_ref (void) { - if (spinner_cache == NULL) + if (G_UNLIKELY (spinner_cache == NULL)) { - ESpinnerCache **cache_ptr; - spinner_cache = g_object_new (E_TYPE_SPINNER_CACHE, NULL); - cache_ptr = &spinner_cache; - g_object_add_weak_pointer (G_OBJECT (spinner_cache), - (gpointer *) cache_ptr); - - return spinner_cache; + g_object_add_weak_pointer ( + G_OBJECT (spinner_cache), &spinner_cache); } - - return g_object_ref (spinner_cache); + + return g_object_ref_sink (spinner_cache); } /* Spinner implementation */ diff --git a/widgets/misc/e-unicode.c b/widgets/misc/e-unicode.c index 409a88bd55..00d2eccef1 100644 --- a/widgets/misc/e-unicode.c +++ b/widgets/misc/e-unicode.c @@ -53,9 +53,7 @@ static gint e_canonical_decomposition (gunichar ch, gunichar * buf); static gunichar e_stripped_char (gunichar ch); -#ifndef NO_WARNINGS -#warning FIXME: this has not been ported fully yet - non ASCII people beware. -#endif +/* FIXME: this has not been ported fully yet - non ASCII people beware. */ /* * This my favourite diff --git a/widgets/table/ChangeLog b/widgets/table/ChangeLog index 2ee5268d62..c25ecf1a0d 100644 --- a/widgets/table/ChangeLog +++ b/widgets/table/ChangeLog @@ -1,3 +1,14 @@ +2007-10-09 Matthew Barnes <mbarnes@redhat.com> + + ** Fixes part of bug #437579 + + * e-table-field-chooser-item.c: + * e-table-header-item.c: + * e-table-header-item.h: + * e-table-header-utils.c: + * e-table.c: + Fix various compiler warnings. Patch from Milan Crha. + 2007-10-02 Matthew Barnes <mbarnes@redhat.com> ** Fixes part of bug #469657 diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c index b1a9d37a54..4ab694f3d6 100644 --- a/widgets/table/e-table-field-chooser-item.c +++ b/widgets/table/e-table-field-chooser-item.c @@ -206,9 +206,7 @@ etfci_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flag item->y1 = c1.y; item->x2 = c2.x; item->y2 = c2.y; -#ifndef NO_WARNINGS -#warning Group Child bounds !? -#endif +/* FIXME: Group Child bounds !? */ #if 0 gnome_canvas_group_child_bounds (GNOME_CANVAS_GROUP (item->parent), item); #endif diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c index 8c76a4ac10..51f3301f8f 100644 --- a/widgets/table/e-table-header-item.c +++ b/widgets/table/e-table-header-item.c @@ -142,10 +142,8 @@ ethi_dispose (GObject *object){ g_object_unref (ethi->full_header); ethi->full_header = NULL; - if (ethi->etfcd) - g_object_remove_weak_pointer (G_OBJECT (ethi->etfcd), (gpointer *) (void *) ði->etfcd); - + g_object_remove_weak_pointer (G_OBJECT (ethi->etfcd), ði->etfcd_pointer); if (ethi->config) g_object_unref (ethi->config); @@ -220,9 +218,7 @@ ethi_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags item->y1 = c1.y; item->x2 = c2.x; item->y2 = c2.y; -#ifndef NO_WARNINGS -#warning FOO BAA -#endif +/* FIXME: Group Child bounds !? (FOO BAA) */ #if 0 gnome_canvas_group_child_bounds (GNOME_CANVAS_GROUP (item->parent), item); #endif @@ -956,7 +952,7 @@ ethi_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width for (i = 0; i < length; i++) { ETableSortColumn column = e_table_sort_info_grouping_get_nth(ethi->sort_info, i); g_hash_table_insert (arrows, - GINT_TO_POINTER (column.column), + GINT_TO_POINTER ((gint) column.column), GINT_TO_POINTER (column.ascending ? E_TABLE_COL_ARROW_DOWN : E_TABLE_COL_ARROW_UP)); @@ -965,7 +961,7 @@ ethi_draw (GnomeCanvasItem *item, GdkDrawable *drawable, int x, int y, int width for (i = 0; i < length; i++) { ETableSortColumn column = e_table_sort_info_sorting_get_nth(ethi->sort_info, i); g_hash_table_insert (arrows, - GINT_TO_POINTER (column.column), + GINT_TO_POINTER ((gint) column.column), GINT_TO_POINTER (column.ascending ? E_TABLE_COL_ARROW_DOWN : E_TABLE_COL_ARROW_UP)); @@ -1154,7 +1150,7 @@ ethi_start_drag (ETableHeaderItem *ethi, GdkEvent *event) group_indent ++; g_hash_table_insert ( arrows, - GINT_TO_POINTER (column.column), + GINT_TO_POINTER ((gint) column.column), GINT_TO_POINTER (column.ascending ? E_TABLE_COL_ARROW_DOWN : E_TABLE_COL_ARROW_UP)); @@ -1167,7 +1163,7 @@ ethi_start_drag (ETableHeaderItem *ethi, GdkEvent *event) g_hash_table_insert ( arrows, - GINT_TO_POINTER (column.column), + GINT_TO_POINTER ((gint) column.column), GINT_TO_POINTER (column.ascending ? E_TABLE_COL_ARROW_DOWN : E_TABLE_COL_ARROW_UP)); @@ -1363,7 +1359,7 @@ ethi_popup_remove_column(GtkWidget *widget, EthiHeaderInfo *info) static void ethi_popup_field_chooser(GtkWidget *widget, EthiHeaderInfo *info) { - gpointer etfcd = (gpointer)info->ethi->etfcd; + GtkWidget *etfcd = info->ethi->etfcd; if (etfcd) { gtk_window_present (GTK_WINDOW (etfcd)); @@ -1372,9 +1368,8 @@ ethi_popup_field_chooser(GtkWidget *widget, EthiHeaderInfo *info) } info->ethi->etfcd = e_table_field_chooser_dialog_new (); - etfcd = (gpointer)info->ethi->etfcd; - g_object_add_weak_pointer (G_OBJECT (etfcd), (gpointer*) (void *) &info->ethi->etfcd); + g_object_add_weak_pointer (G_OBJECT (etfcd), &info->ethi->etfcd_pointer); g_object_set (info->ethi->etfcd, "full_header", info->ethi->full_header, diff --git a/widgets/table/e-table-header-item.h b/widgets/table/e-table-header-item.h index ebb4708720..50b5e3239e 100644 --- a/widgets/table/e-table-header-item.h +++ b/widgets/table/e-table-header-item.h @@ -95,9 +95,13 @@ typedef struct { ETableHeader *full_header; ETable *table; ETree *tree; - GtkWidget *etfcd; void *config; + union { + GtkWidget *etfcd; + gpointer etfcd_pointer; + }; + /* For keyboard navigation*/ int selected_col; diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c index 782543ed42..c36e8d11b3 100644 --- a/widgets/table/e-table-header-utils.c +++ b/widgets/table/e-table-header-utils.c @@ -333,7 +333,7 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol, int inner_width, inner_height; GdkGC *gc; PangoLayout *layout; - static GtkWidget *g_label = NULL; + static gpointer g_label = NULL; g_return_if_fail (drawable != NULL); g_return_if_fail (ecol != NULL); @@ -350,11 +350,11 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol, gtk_widget_ensure_style (window); gtk_widget_ensure_style (button); g_label = GTK_BIN(button)->child; - g_object_add_weak_pointer (G_OBJECT (g_label), (gpointer *) &g_label); + g_object_add_weak_pointer (G_OBJECT (g_label), &g_label); gtk_widget_ensure_style (g_label); } - gc = g_label->style->fg_gc[state]; + gc = GTK_WIDGET (g_label)->style->fg_gc[state]; gdk_gc_set_clip_rectangle (gc, NULL); diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index dfb15bf073..0925e399f9 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -2926,9 +2926,7 @@ context_destroyed (gpointer data) { ETable *et = data; /* if (!GTK_OBJECT_DESTROYED (et)) */ -#ifndef NO_WARNINGS -#warning FIXME -#endif +/* FIXME: */ { et->last_drop_x = 0; et->last_drop_y = 0; diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c index 1de81f34bc..d4a18a6f9b 100644 --- a/widgets/text/e-text.c +++ b/widgets/text/e-text.c @@ -620,7 +620,7 @@ calc_height (EText *text) static void calc_ellipsis (EText *text) { -#warning "AIEEEE FIX ME. a pango layout per calc_ellipsis sucks" +/* FIXME: a pango layout per calc_ellipsis sucks */ int width; PangoLayout *layout = gtk_widget_create_pango_layout (GTK_WIDGET (GNOME_CANVAS_ITEM (text)->canvas), text->ellipsis ? text->ellipsis : "..."); @@ -1247,9 +1247,7 @@ e_text_realize (GnomeCanvasItem *item) create_layout (text); text->gc = gdk_gc_new (item->canvas->layout.bin_window); -#ifndef NO_WARNINGS -#warning Color brokenness ... -#endif +/* FIXME: Color brokenness ... */ #if 0 gdk_color_context_query_color (item->canvas->cc, &text->color); gdk_gc_set_foreground (text->gc, &text->color); @@ -1936,7 +1934,7 @@ tooltip_destroy(gpointer data, GObject *where_object_was) static gboolean _do_tooltip (gpointer data) { -#warning "need to sort out tooltip stuff." +/* FIXME: need to sort out tooltip stuff. */ EText *text = E_TEXT (data); GtkWidget *canvas; int i; |