178 |
fclose(f); |
fclose(f); |
179 |
|
|
180 |
} else { |
} else { |
181 |
if(context->appdata->load_images) { |
printf("image file doesn't exist, starting extra thread!\n"); |
|
printf("image file doesn't exist, starting extra thread!\n"); |
|
182 |
|
|
183 |
checkdir(path); |
checkdir(path); |
184 |
|
|
185 |
/* walk to end of list */ |
/* walk to end of list */ |
186 |
load_context_t **load_context = &(context->load_context); |
load_context_t **load_context = &(context->load_context); |
187 |
while(*load_context) |
while(*load_context) |
188 |
load_context = &(*load_context)->next; |
load_context = &(*load_context)->next; |
189 |
|
|
190 |
*load_context = g_new0(load_context_t, 1); |
*load_context = g_new0(load_context_t, 1); |
191 |
|
|
192 |
(*load_context)->url = strdup(url); |
(*load_context)->url = strdup(url); |
193 |
(*load_context)->path = strdup(path); |
(*load_context)->path = strdup(path); |
194 |
(*load_context)->view = context->view; |
(*load_context)->view = context->view; |
195 |
(*load_context)->stream = stream; |
(*load_context)->stream = stream; |
196 |
(*load_context)->next = NULL; |
(*load_context)->next = NULL; |
197 |
(*load_context)->active = TRUE; |
(*load_context)->active = TRUE; |
198 |
(*load_context)->mutex = g_mutex_new(); |
(*load_context)->mutex = g_mutex_new(); |
199 |
|
|
200 |
g_thread_create(loader_thread, *load_context, TRUE, NULL); |
g_thread_create(loader_thread, *load_context, TRUE, NULL); |
201 |
return; |
return; |
|
} else |
|
|
g_print("Image loading disabled\n"); |
|
202 |
} |
} |
203 |
} else { |
} else { |
204 |
/* not a cache, maybe help, so load images from icon directory */ |
/* not a cache, maybe help, so load images from icon directory */ |
348 |
#endif |
#endif |
349 |
|
|
350 |
/* panning a gtkhtml view currently doesn't work well */ |
/* panning a gtkhtml view currently doesn't work well */ |
351 |
#undef PANNABLE_HTML |
#define PANNABLE_HTML |
352 |
|
|
353 |
#ifdef PANNABLE_HTML |
#ifdef PANNABLE_HTML |
354 |
/* eat the button events */ |
/* eat the button events */ |
416 |
GtkTextBuffer *buffer = gtk_text_buffer_new(NULL); |
GtkTextBuffer *buffer = gtk_text_buffer_new(NULL); |
417 |
gtk_text_buffer_set_text(buffer, text, strlen(text)); |
gtk_text_buffer_set_text(buffer, text, strlen(text)); |
418 |
|
|
419 |
#ifndef USE_MAEMO |
#ifndef USE_HILDON_TEXT_VIEW |
420 |
view = gtk_text_view_new_with_buffer(buffer); |
view = gtk_text_view_new_with_buffer(buffer); |
421 |
#else |
#else |
422 |
view = hildon_text_view_new(); |
view = hildon_text_view_new(); |