Diff of /trunk/src/custom_type_renderer.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 188 by harbaum, Wed Nov 11 20:21:55 2009 UTC revision 189 by harbaum, Tue Nov 17 09:07:17 2009 UTC
# Line 20  Line 20 
20  #include "gpxview.h"  #include "gpxview.h"
21  #include "custom_type_renderer.h"  #include "custom_type_renderer.h"
22    
23    #if defined(USE_MAEMO) && (MAEMO_VERSION_MAJOR >= 5)
24    #define CUSTOM_ICON_TYPE  ICON_CACHE_TYPE_1_5X
25    #else
26    #define CUSTOM_ICON_TYPE  ICON_CACHE_TYPE
27    #endif
28    
29  /* http://scentric.net/tutorial/sec-custom-cell-renderers.html */  /* http://scentric.net/tutorial/sec-custom-cell-renderers.html */
30  /* https://stage.maemo.org/svn/maemo/projects/haf/trunk/gtk+/gtk/gtkcellrendererpixbuf.c */  /* https://stage.maemo.org/svn/maemo/projects/haf/trunk/gtk+/gtk/gtkcellrendererpixbuf.c */
31  /* https://stage.maemo.org/svn/maemo/projects/haf/trunk/gtk+/gtk/gtkcellrenderertext.c */  /* https://stage.maemo.org/svn/maemo/projects/haf/trunk/gtk+/gtk/gtkcellrenderertext.c */
# Line 225  custom_cell_renderer_type_get_size (GtkC Line 231  custom_cell_renderer_type_get_size (GtkC
231     GtkWidget *widget, GdkRectangle *cell_area, gint *x_offset,     GtkWidget *widget, GdkRectangle *cell_area, gint *x_offset,
232     gint *y_offset, gint *width, gint *height) {     gint *y_offset, gint *width, gint *height) {
233    CustomCellRendererType *celltype = CUSTOM_CELL_RENDERER_TYPE (cell);    CustomCellRendererType *celltype = CUSTOM_CELL_RENDERER_TYPE (cell);
234  #if defined(USE_MAEMO) && (MAEMO_VERSION_MAJOR >= 5)    GdkPixbuf *pixbuf = icon_get(CUSTOM_ICON_TYPE, celltype->type>>8);
   GdkPixbuf *pixbuf = icon_get(ICON_CACHE_TYPE_1_5X, celltype->type>>8);  
 #else  
   GdkPixbuf *pixbuf = icon_get(ICON_CACHE_TYPE, celltype->type>>8);  
 #endif  
235    
236    if(!pixbuf) return;    if(!pixbuf) return;
237    
# Line 268  custom_cell_renderer_type_render (GtkCel Line 270  custom_cell_renderer_type_render (GtkCel
270                                        guint            flags)                                        guint            flags)
271  {  {
272    CustomCellRendererType *celltype = CUSTOM_CELL_RENDERER_TYPE (cell);    CustomCellRendererType *celltype = CUSTOM_CELL_RENDERER_TYPE (cell);
273  #if defined(USE_MAEMO) && (MAEMO_VERSION_MAJOR >= 5)    GdkPixbuf *pixbuf = icon_get(CUSTOM_ICON_TYPE, celltype->type>>8);
   GdkPixbuf *pixbuf = icon_get(ICON_CACHE_TYPE_1_5X, celltype->type>>8);  
 #else  
   GdkPixbuf *pixbuf = icon_get(ICON_CACHE_TYPE, celltype->type>>8);  
 #endif  
274    GdkRectangle all_rect;    GdkRectangle all_rect;
275    GdkRectangle draw_rect;    GdkRectangle draw_rect;
276    
# Line 302  custom_cell_renderer_type_render (GtkCel Line 300  custom_cell_renderer_type_render (GtkCel
300    /* just a note, nothing else */    /* just a note, nothing else */
301    GdkPixbuf *addon = NULL;    GdkPixbuf *addon = NULL;
302    if((celltype->type & 7) == 4)      // only note is set    if((celltype->type & 7) == 4)      // only note is set
303      addon = icon_get(ICON_MISC, 6);      addon = icon_get(CUSTOM_ICON_TYPE, 13);
304    if((celltype->type & 7) == 5)      // only note and override are set    if((celltype->type & 7) == 5)      // only note and override are set
305      addon = icon_get(ICON_MISC, 1);      addon = icon_get(CUSTOM_ICON_TYPE, 11);
306    if(celltype->type & 2)             // solved is set    if(celltype->type & 2)             // solved is set
307      addon = icon_get(ICON_MISC, 4);      addon = icon_get(CUSTOM_ICON_TYPE, 12);
308    
309    /* if override (and not found) is set */    /* if override (and not found) is set */
310    if(addon) {    if(addon) {

Legend:
Removed from v.188  
changed lines
  Added in v.189