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 */ |
347 |
} |
} |
348 |
#endif |
#endif |
349 |
|
|
|
/* panning a gtkhtml view currently doesn't work well */ |
|
|
#undef PANNABLE_HTML |
|
|
|
|
350 |
#ifdef PANNABLE_HTML |
#ifdef PANNABLE_HTML |
351 |
/* eat the button events */ |
/* eat the button events */ |
352 |
static gboolean on_button_press(GtkWidget *widget, GdkEventButton *event, |
static gboolean on_button_press(GtkWidget *widget, GdkEventButton *event, |
413 |
GtkTextBuffer *buffer = gtk_text_buffer_new(NULL); |
GtkTextBuffer *buffer = gtk_text_buffer_new(NULL); |
414 |
gtk_text_buffer_set_text(buffer, text, strlen(text)); |
gtk_text_buffer_set_text(buffer, text, strlen(text)); |
415 |
|
|
416 |
#ifndef USE_MAEMO |
#ifndef USE_HILDON_TEXT_VIEW |
417 |
view = gtk_text_view_new_with_buffer(buffer); |
view = gtk_text_view_new_with_buffer(buffer); |
418 |
#else |
#else |
419 |
view = hildon_text_view_new(); |
view = hildon_text_view_new(); |