diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp
index 570502253cc7601e241cd4883b7847d8123223ec..15900d340c1e27969a35cb6d1dba2f2abc78710e 100644 (file)
--- a/src/widgets/icon.cpp
+++ b/src/widgets/icon.cpp
* Author:
* Lauris Kaplinski <lauris@kaplinski.com>
* Jon A. Cruz <jon@joncruz.org>
+ * Abhishek Sharma
*
* Copyright (C) 2002 Lauris Kaplinski
*
}
}
-static GdkPixbuf* renderup( gchar const* name, Inkscape::IconSize lsize, unsigned psize ) {
+GdkPixbuf* renderup( gchar const* name, Inkscape::IconSize lsize, unsigned psize ) {
GtkIconTheme *theme = gtk_icon_theme_get_default();
GdkPixbuf *pb = 0;
//g_message("Loaded icon file %s", doc_filename);
// prep the document
- doc->ensure_up_to_date();
+ doc->ensureUpToDate();
/* Create new arena */
NRArena *arena = NRArena::create();
/* Create ArenaItem and set transform */
==7014== by 0x5E9DDE: nr_arena_group_render(_cairo*, NRArenaItem*, NRRectL*, NRPixBlock*, unsigned int) (nr-arena-group.cpp:228)
==7014== by 0x5E72FB: nr_arena_item_invoke_render(_cairo*, NRArenaItem*, NRRectL const*, NRPixBlock*, unsigned int) (nr-arena-item.cpp:578)
*/
- root = SP_ITEM(SP_DOCUMENT_ROOT(doc))->invoke_show(arena, visionkey, SP_ITEM_SHOW_DISPLAY );
+ root = SP_ITEM(doc->getRoot())->invoke_show(arena, visionkey, SP_ITEM_SHOW_DISPLAY );
// store into the cache
info = new svg_doc_cache_t;
@@ -1183,7 +1184,8 @@ void Inkscape::queueIconPrerender( Glib::ustring const &name, Inkscape::IconSize
{
GtkStockItem stock;
gboolean stockFound = gtk_stock_lookup( name.c_str(), &stock );
- if (!stockFound && !gtk_icon_theme_has_icon(gtk_icon_theme_get_default(), name.c_str()) ) {
+ gboolean themedFound = gtk_icon_theme_has_icon(gtk_icon_theme_get_default(), name.c_str());
+ if (!stockFound && !themedFound ) {
gint trySize = CLAMP( static_cast<gint>(lsize), 0, static_cast<gint>(G_N_ELEMENTS(iconSizeLookup) - 1) );
if ( !sizeMapDone ) {
injectCustomSize();
}
gboolean icon_prerender_task(gpointer /*data*/) {
- if (!pendingRenders.empty()) {
+ if ( inkscapeIsCrashing() ) {
+ // stop
+ } else if (!pendingRenders.empty()) {
bool workDone = false;
do {
preRenderItem single = pendingRenders.front();
} while (!pendingRenders.empty() && !workDone);
}
- if (!pendingRenders.empty()) {
+ if (!inkscapeIsCrashing() && !pendingRenders.empty()) {
return TRUE;
} else {
callbackHooked = false;
fill-column:99
End:
*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :