[anjal] Fix more warnings
- From: Srinivasa Ragavan <sragavan src gnome org>
- To: svn-commits-list gnome org
- Subject: [anjal] Fix more warnings
- Date: Fri, 29 May 2009 08:01:19 -0400 (EDT)
commit c53eedc71403bc1939ac03d11612511e00326152
Author: Srinivasa Ragavan <sragavan novell com>
Date: Fri May 29 17:35:04 2009 +0530
Fix more warnings
---
src/em-format-webkit-display.c | 71 +++++++++++++++++++++------------------
1 files changed, 38 insertions(+), 33 deletions(-)
diff --git a/src/em-format-webkit-display.c b/src/em-format-webkit-display.c
index ffbe4fe..f0ab5de 100644
--- a/src/em-format-webkit-display.c
+++ b/src/em-format-webkit-display.c
@@ -134,7 +134,10 @@ struct _preview_message_msg {
unsigned int ismain:1;
};
+static void efwd_draw_in_main_thread (EMFormatWebKitDisplay *efwd, EMFormatWebKitPObject *pobject);
+#ifdef NOT_USED
static int efwd_html_button_press_event (GtkWidget *widget, GdkEventButton *event, EMFormatWebKitDisplay *efh);
+#endif
//static void efwd_html_link_clicked (GtkHTML *html, const char *url, EMFormatWebKitDisplay *efwd);
//static void efwd_html_on_url (GtkHTML *html, const char *url, EMFormatWebKitDisplay *efwd);
@@ -190,12 +193,12 @@ static void efwd_format_clone(EMFormat *, CamelFolder *folder, const char *, Cam
static void efwd_format_error(EMFormat *emf, CamelStream *stream, const char *txt);
static void efwd_format_source(EMFormat *, CamelStream *, CamelMimePart *);
static void efwd_format_attachment(EMFormat *, CamelStream *, CamelMimePart *, const char *, const EMFormatHandler *);
-static void efwd_format_optional(EMFormat *, CamelStream *, CamelMimePart *, CamelStream *);
+/* static void efwd_format_optional(EMFormat *, CamelStream *, CamelMimePart *, CamelStream *);*/
static void efwd_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, CamelCipherValidity *valid);
static void efwd_complete(EMFormat *);
gboolean efwd_mnemonic_show_bar (GtkWidget *widget, gboolean focus, GtkWidget *efwd);
-static gboolean efwd_use_component(const char *mime_type);
+/*static gboolean efwd_use_component(const char *mime_type);*/
static void efwd_builtin_init(EMFormatWebKitDisplayClass *efhc);
enum {
@@ -392,6 +395,7 @@ em_format_webkit_display_get_type(void)
return type;
}
+#ifdef NOT_USED
static gboolean
efwd_scroll_event(GtkWidget *w, GdkEventScroll *event, EMFormatWebKitDisplay *efwd)
{
@@ -409,7 +413,7 @@ efwd_scroll_event(GtkWidget *w, GdkEventScroll *event, EMFormatWebKitDisplay *ef
}
return FALSE;
}
-
+#endif
EMFormatWebKitDisplay *em_format_webkit_display_new(void)
{
EMFormatWebKitDisplay *efwd;
@@ -859,6 +863,7 @@ efwd_get_uri_puri (GtkWidget *html, GdkEventButton *event, EMFormatWebKitDisplay
g_free (img_url);
}*/
+#ifdef NOT_USED
static int
efwd_html_button_press_event (GtkWidget *widget, GdkEventButton *event, EMFormatWebKitDisplay *efwd)
{
@@ -884,7 +889,7 @@ efwd_html_button_press_event (GtkWidget *widget, GdkEventButton *event, EMFormat
return res;
}
-
+#endif
gboolean
em_format_webkit_display_popup_menu (EMFormatWebKitDisplay *efwd)
{
@@ -1114,10 +1119,13 @@ efwd_xpkcs7mime_validity_clicked(GtkWidget *button, EMFormatWebKitPObject *pobje
if (po->widget)
/* FIXME: window raise? */
return;
-
- //gladefile = g_build_filename (EVOLUTION_GLADEDIR,
- // "mail-dialogs.glade",
- // NULL);
+#ifdef EVOLUTION_2_26
+ gladefile = g_build_filename (EVOLUTION226_PRIVDATADIR"glade/",
+#else
+ gladefile = g_build_filename (EVOLUTION228_PRIVDATADIR"glade/",
+#endif
+ "mail-dialogs.glade",
+ NULL);
xml = glade_xml_new(gladefile, "message_security_dialog", NULL);
g_free (gladefile);
@@ -1193,7 +1201,7 @@ efwd_xpkcs7mime_validity_clicked(GtkWidget *button, EMFormatWebKitPObject *pobje
gtk_widget_show(po->widget);
}
-static gboolean
+static GtkWidget *
efwd_xpkcs7mime_button(EMFormatWebKit *efh, GtkWidget * eb, EMFormatWebKitPObject *pobject)
{
GtkWidget *icon, *button, *box, *label;
@@ -1216,12 +1224,12 @@ efwd_xpkcs7mime_button(EMFormatWebKit *efh, GtkWidget * eb, EMFormatWebKitPObjec
gtk_container_add((GtkContainer *)button, icon);
gtk_widget_show(button);
box = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (box, button, FALSE, FALSE, 6);
- gtk_box_pack_start (eb, box, FALSE, FALSE, 0);
+ gtk_box_pack_start ((GtkBox *)box, button, FALSE, FALSE, 6);
+ gtk_box_pack_start ((GtkBox *)eb, box, FALSE, FALSE, 0);
if (po->valid->sign.status != CAMEL_CIPHER_VALIDITY_SIGN_NONE) {
label = gtk_label_new(_(smime_sign_table[po->valid->sign.status].shortdesc));
- gtk_box_pack_start (box, label, FALSE, FALSE, 3);
+ gtk_box_pack_start ((GtkBox *)box, label, FALSE, FALSE, 3);
}
if (po->valid->encrypt.status != CAMEL_CIPHER_VALIDITY_ENCRYPT_NONE) {
@@ -1230,7 +1238,7 @@ efwd_xpkcs7mime_button(EMFormatWebKit *efh, GtkWidget * eb, EMFormatWebKitPObjec
camel_stream_printf (stream, "<br>");
}*/
label = gtk_label_new(_(smime_encrypt_table[po->valid->encrypt.status].shortdesc));
- gtk_box_pack_start (box, label, FALSE, FALSE, 3);
+ gtk_box_pack_start ((GtkBox *)box, label, FALSE, FALSE, 3);
}
gtk_widget_show_all(box);
@@ -1254,7 +1262,7 @@ efwd_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, Came
pobj->valid = camel_cipher_validity_clone(valid);
pobj->object.free = efwd_xpkcs7mime_free;
pobj->object.body = mail_message_view_get_body(stream);
- efwd_draw_in_main_thread (emf, pobj);
+ efwd_draw_in_main_thread ((EMFormatWebKitDisplay *)emf, (EMFormatWebKitPObject *)pobj);
g_free(classid);
}
}
@@ -1283,7 +1291,7 @@ efwd_image(EMFormatWebKit *efh, CamelStream *stream, CamelMimePart *part, EMForm
info->pobject = pobject;
pobject->body = mail_message_view_get_body(stream);
- efwd_draw_in_main_thread (efh, pobject);
+ efwd_draw_in_main_thread ((EMFormatWebKitDisplay *)efh, pobject);
//camel_stream_printf(stream, "<td><object classid=\"%s\"></object></td>", classid);
@@ -1335,7 +1343,6 @@ efwd_builtin_init(EMFormatWebKitDisplayClass *efhc)
/* ********************************************************************** */
static const EMFormatHandler *efwd_find_handler(EMFormat *emf, const char *mime_type)
{
- const EMFormatHandler *handle=NULL;
return ((EMFormatClass *)efwd_parent)->find_handler(emf, mime_type);
}
@@ -1728,11 +1735,12 @@ static void
efwd_image_resized(GtkWidget *w, GtkAllocation *event, struct _attach_puri *info)
{
GdkPixbuf *pb;
- int width;
+ int width = 500;
if (info->fit_width == 0)
return;
+#warning "fix image width"
//width = ((GtkWidget *)((EMFormatWebKit *)info->puri.format)->html)->allocation.width - 12;
if (info->fit_width == width)
return;
@@ -1760,8 +1768,9 @@ efwd_change_cursor(GtkWidget *w, GdkEventCrossing *event, struct _attach_puri *i
static void
efwd_image_fit_width(GtkWidget *widget, GdkEventButton *event, struct _attach_puri *info)
{
- int width;
+ int width=500;
+#warning "fix image width"
//width = ((GtkWidget *)((EMFormatWebKit *)info->puri.format)->html)->allocation.width - 12;
if (info->shown && info->image) {
@@ -1803,7 +1812,7 @@ efwd_image_unallocate (struct _EMFormatPURI * puri)
static GtkWidget *
efwd_attachment_image(EMFormatWebKit *efh, GtkWidget *eb, EMFormatWebKitPObject *pobject)
{
- GtkWidget *box, *topbox;
+ GtkWidget *box;
EMFormatWebKitJob *job;
struct _attach_puri *info;
GdkPixbuf *pixbuf;
@@ -1839,7 +1848,7 @@ efwd_attachment_image(EMFormatWebKit *efh, GtkWidget *eb, EMFormatWebKitPObject
info->event_box = box;
gtk_container_add((GtkContainer *)box, (GtkWidget *)info->image);
gtk_widget_show_all(box);
- gtk_box_pack_start (eb, box, FALSE, FALSE, 0);
+ gtk_box_pack_start ((GtkBox *)eb, box, FALSE, FALSE, 0);
// gtk_container_add((GtkContainer *)eb, box);
g_signal_connect(eb, "size_allocate", G_CALLBACK(efwd_image_resized), info);
@@ -1868,12 +1877,9 @@ efwd_attachment_image(EMFormatWebKit *efh, GtkWidget *eb, EMFormatWebKitPObject
static GtkWidget *
efwd_attachment_button(EMFormatWebKit *efh, GtkWidget*eb, EMFormatWebKitPObject *pobject)
{
- EMFormatWebKitDisplay *efwd = (EMFormatWebKitDisplay *)efh;
- EAttachment *new;
struct _attach_puri *info;
GtkWidget *hbox, *w, *button, *mainbox, *topbox;
- char *simple_type, *tmp, *new_file = NULL;
- const char *file;
+ char *simple_type;
GtkTargetEntry drag_types[] = {
{ NULL, 0, 0 },
{ "text/uri-list", 0, 1 },
@@ -2002,7 +2008,6 @@ efwd_attachment_button(EMFormatWebKit *efh, GtkWidget*eb, EMFormatWebKitPObject
camel_stream_close(job->stream);
}
} else {
- GdkPixbuf *pixbuf, *mini;
/*
if ((pixbuf = e_icon_for_mime_type (simple_type, 24))) {
if ((mini = e_icon_factory_pixbuf_scale (pixbuf, 24, 24))) {
@@ -2042,10 +2047,10 @@ efwd_attachment_button(EMFormatWebKit *efh, GtkWidget*eb, EMFormatWebKitPObject
w = gtk_label_new (txt);
gtk_widget_show (w);
- gtk_box_pack_start (mainbox, w, FALSE, FALSE, 6);
- gtk_box_pack_start (eb, mainbox, FALSE, FALSE, 0);
+ gtk_box_pack_start ((GtkBox *)mainbox, w, FALSE, FALSE, 6);
+ gtk_box_pack_start ((GtkBox *)eb, mainbox, FALSE, FALSE, 0);
if (info->child_box)
- gtk_box_pack_start (eb, info->child_box, FALSE, FALSE, 0);
+ gtk_box_pack_start ((GtkBox *)eb, info->child_box, FALSE, FALSE, 0);
//gtk_container_add((GtkContainer *)eb, mainbox);
@@ -2071,6 +2076,7 @@ efwd_attachment_frame(EMFormat *emf, CamelStream *stream, EMFormatPURI *puri)
}
}
+#ifdef NOT_USED
static void
attachment_bar_arrow_clicked(GtkWidget *w, EMFormatWebKitDisplay *efwd)
{
@@ -2141,7 +2147,7 @@ scale_pixbuf (GdkPixbuf *pixbuf)
return e_icon_factory_pixbuf_scale (pixbuf, width, height);
}
-
+#endif
static void
efwd_create_attachment_cache (EAttachment *attachment)
{
@@ -2165,7 +2171,6 @@ efwd_create_attachment_cache (EAttachment *attachment)
CamelStreamMem *mstream;
GdkPixbufLoader *loader;
gboolean error = TRUE;
- GdkPixbuf *pixbuf;
#ifdef EVOLUTION_2_26
wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (attachment->body));
#else
@@ -2200,7 +2205,7 @@ efwd_create_attachment_cache (EAttachment *attachment)
static void
efwd_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part, const char *mime_type, const EMFormatHandler *handle)
{
- char *classid, *text, *html;
+ char *classid;
struct _attach_puri *info;
EMFormatWebKitPObject *pobj;
@@ -2225,7 +2230,7 @@ efwd_format_attachment(EMFormat *emf, CamelStream *stream, CamelMimePart *part,
pobj = em_format_webkit_add_pobject((EMFormatWebKit *)emf, sizeof(EMFormatWebKitPObject), classid, part, efwd_attachment_button);
info->pobject = pobj;
pobj->body = mail_message_view_get_body (stream);
- efwd_draw_in_main_thread (emf, pobj);
+ efwd_draw_in_main_thread ((EMFormatWebKitDisplay *)emf, pobj);
/*
camel_stream_write_string(stream,
EM_FORMAT_WEBKIT_VPAD
@@ -2300,7 +2305,7 @@ static MailMsgInfo preview_message_info = {
(MailMsgFreeFunc) preview_message_free
};
-void
+static void
efwd_draw_in_main_thread (EMFormatWebKitDisplay *efwd, EMFormatWebKitPObject *pobject)
{
struct _preview_message_msg *m;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]