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 */ |
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 |
|
|
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 |
|
|
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) { |