Mercurial > pidgin.yaz
changeset 15593:0a5823d45398
Fix a few small compile warnings:
gtkblist.c: In function ¡Æpidgin_blist_paint_tip¡Ç:
gtkblist.c:2352: warning: suggest explicit braces to avoid ambiguous ¡Æelse¡Ç
gtkblist.c:2370: warning: suggest explicit braces to avoid ambiguous ¡Æelse¡Ç
gtklog.c: In function ¡Æpidgin_log_show_contact¡Ç:
gtklog.c:699: warning: ISO C90 forbids mixed declarations and code
gtkstatusbox.c: In function ¡Æadd_popular_statuses¡Ç:
gtkstatusbox.c:842: warning: unused variable ¡Æheight¡Ç
gtkstatusbox.c:842: warning: unused variable ¡Æwidth¡Ç
gtkstatusbox.c:841: warning: unused variable ¡Æemblem¡Ç
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Fri, 09 Feb 2007 07:34:51 +0000 |
parents | cf999f8e8a56 |
children | f485c87e6546 |
files | pidgin/gtkblist.c pidgin/gtklog.c pidgin/gtkstatusbox.c |
diffstat | 3 files changed, 25 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkblist.c Fri Feb 09 07:25:03 2007 +0000 +++ b/pidgin/gtkblist.c Fri Feb 09 07:34:51 2007 +0000 @@ -2350,6 +2350,7 @@ struct tooltip_data *td = l->data; if (td->avatar && pidgin_gdk_pixbuf_is_opaque(td->avatar)) + { if (dir == GTK_TEXT_DIR_RTL) gtk_paint_flat_box(style, gtkblist->tipwindow->window, GTK_STATE_NORMAL, GTK_SHADOW_OUT, NULL, gtkblist->tipwindow, "tooltip", @@ -2359,6 +2360,7 @@ NULL, gtkblist->tipwindow, "tooltip", max_width - (td->avatar_width+ TOOLTIP_BORDER)-1, current_height-1,td->avatar_width+2, td->avatar_height+2); + } #if GTK_CHECK_VERSION(2,2,0) if (dir == GTK_TEXT_DIR_RTL) @@ -2368,6 +2370,7 @@ gdk_draw_pixbuf(GDK_DRAWABLE(gtkblist->tipwindow->window), NULL, td->status_icon, 0, 0, TOOLTIP_BORDER, current_height, -1 , -1, GDK_RGB_DITHER_NONE, 0, 0); if(td->avatar) + { if (dir == GTK_TEXT_DIR_RTL) gdk_draw_pixbuf(GDK_DRAWABLE(gtkblist->tipwindow->window), NULL, td->avatar, 0, 0, TOOLTIP_BORDER, current_height, -1, -1, GDK_RGB_DITHER_NONE, 0, 0); @@ -2375,6 +2378,8 @@ gdk_draw_pixbuf(GDK_DRAWABLE(gtkblist->tipwindow->window), NULL, td->avatar, 0, 0, max_width - (td->avatar_width + TOOLTIP_BORDER), current_height, -1 , -1, GDK_RGB_DITHER_NONE, 0, 0); + } + if (!td->avatar_is_prpl_icon) gdk_draw_pixbuf(GDK_DRAWABLE(gtkblist->tipwindow->window), NULL, td->prpl_icon, 0, 0,
--- a/pidgin/gtklog.c Fri Feb 09 07:25:03 2007 +0000 +++ b/pidgin/gtklog.c Fri Feb 09 07:34:51 2007 +0000 @@ -695,7 +695,7 @@ PidginLogViewer *lv = NULL; GList *logs = NULL; GdkPixbuf *pixbuf; - GtkWidget *image = gtk_image_new();; + GtkWidget *image = gtk_image_new(); const char *name = NULL; char *title; int total_log_size = 0;
--- a/pidgin/gtkstatusbox.c Fri Feb 09 07:25:03 2007 +0000 +++ b/pidgin/gtkstatusbox.c Fri Feb 09 07:34:51 2007 +0000 @@ -836,10 +836,9 @@ static void add_popular_statuses(PidginStatusBox *statusbox) { - GtkIconSize icon_size; + GtkIconSize icon_size; GList *list, *cur; - GdkPixbuf *pixbuf, *emblem; - int width, height; + GdkPixbuf *pixbuf; list = gaim_savedstatuses_get_popular(6); if (list == NULL) @@ -858,24 +857,24 @@ GaimStatusPrimitive prim; /* Get an appropriate status icon */ - prim = gaim_savedstatus_get_type(saved); + prim = gaim_savedstatus_get_type(saved); - if (prim == GAIM_STATUS_UNAVAILABLE) - pixbuf = gtk_widget_render_icon (GTK_WIDGET(statusbox), PIDGIN_STOCK_STATUS_BUSY, - icon_size, "PidginStatusBox"); - else if (prim == GAIM_STATUS_AWAY) - pixbuf = gtk_widget_render_icon (GTK_WIDGET(statusbox), PIDGIN_STOCK_STATUS_AWAY, - icon_size, "PidginStatusBox"); - else if (prim == GAIM_STATUS_EXTENDED_AWAY) - pixbuf = gtk_widget_render_icon (GTK_WIDGET(statusbox), PIDGIN_STOCK_STATUS_XA, - icon_size, "PidginStatusBox"); - else if (prim == GAIM_STATUS_OFFLINE) - pixbuf = gtk_widget_render_icon (GTK_WIDGET(statusbox), PIDGIN_STOCK_STATUS_OFFLINE, - icon_size, "PidginStatusBox"); - else - pixbuf = gtk_widget_render_icon (GTK_WIDGET(statusbox), PIDGIN_STOCK_STATUS_AVAILABLE, - icon_size, "PidginStatusBox"); - + if (prim == GAIM_STATUS_UNAVAILABLE) + pixbuf = gtk_widget_render_icon (GTK_WIDGET(statusbox), + PIDGIN_STOCK_STATUS_BUSY, icon_size, "PidginStatusBox"); + else if (prim == GAIM_STATUS_AWAY) + pixbuf = gtk_widget_render_icon (GTK_WIDGET(statusbox), + PIDGIN_STOCK_STATUS_AWAY, icon_size, "PidginStatusBox"); + else if (prim == GAIM_STATUS_EXTENDED_AWAY) + pixbuf = gtk_widget_render_icon (GTK_WIDGET(statusbox), + PIDGIN_STOCK_STATUS_XA, icon_size, "PidginStatusBox"); + else if (prim == GAIM_STATUS_OFFLINE) + pixbuf = gtk_widget_render_icon (GTK_WIDGET(statusbox), + PIDGIN_STOCK_STATUS_OFFLINE, icon_size, "PidginStatusBox"); + else + pixbuf = gtk_widget_render_icon (GTK_WIDGET(statusbox), + PIDGIN_STOCK_STATUS_AVAILABLE, icon_size, "PidginStatusBox"); + if (gaim_savedstatus_is_transient(saved)) { /*