summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d75e8f9)
raw | patch | inline | side by side (parent: d75e8f9)
author | Jon A. Cruz <jon@joncruz.org> | |
Mon, 6 Dec 2010 08:21:18 +0000 (00:21 -0800) | ||
committer | Jon A. Cruz <jon@joncruz.org> | |
Mon, 6 Dec 2010 08:21:18 +0000 (00:21 -0800) |
src/inkscape.cpp | patch | blob | history | |
src/inkscape.h | patch | blob | history | |
src/widgets/icon.cpp | patch | blob | history |
diff --git a/src/inkscape.cpp b/src/inkscape.cpp
index 8b31ba2670a95a78b86350fa20f3498e481b5b23..e4edb9d108c4a1369d1c98af324619dc08941de7 100644 (file)
--- a/src/inkscape.cpp
+++ b/src/inkscape.cpp
@@ -553,6 +553,13 @@ inkscape_deactivate_desktop_private (Inkscape::Application */*inkscape*/, SPDesk
#define SP_INDENT 8
+static bool crashIsHappening = false;
+
+bool inkscapeIsCrashing()
+{
+ return crashIsHappening;
+}
+
static void
inkscape_crash_handler (int /*signum*/)
{
}
recursion = TRUE;
+ crashIsHappening = true;
+
EventTracker<SimpleEvent<Inkscape::Debug::Event::CORE> > tracker("crash");
tracker.set<SimpleEvent<> >("emergency-save");
diff --git a/src/inkscape.h b/src/inkscape.h
index d9de5478258dacf146b6cbf25e6e9461eb2fb270..64cee1560d5ca2fb0b8a6b0ea0b57b5d5b9b5cf4 100644 (file)
--- a/src/inkscape.h
+++ b/src/inkscape.h
Inkscape::Application *inkscape_get_instance();
gboolean inkscape_use_gui();
+bool inkscapeIsCrashing();
+
SPDesktop * inkscape_find_desktop_by_dkey (unsigned int dkey);
#define SP_ACTIVE_EVENTCONTEXT inkscape_active_event_context ()
diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp
index f9d01113ef46a66b2bfbe537891b6aadf444bf69..c25e6aac2f88ed5786b89a239e5d7ad47513f346 100644 (file)
--- a/src/widgets/icon.cpp
+++ b/src/widgets/icon.cpp
}
}
-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;
@@ -1184,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;