diff options
Diffstat (limited to 'tdegtk/tdegtk-theme.cpp')
-rw-r--r-- | tdegtk/tdegtk-theme.cpp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/tdegtk/tdegtk-theme.cpp b/tdegtk/tdegtk-theme.cpp index e214844..118b173 100644 --- a/tdegtk/tdegtk-theme.cpp +++ b/tdegtk/tdegtk-theme.cpp @@ -142,15 +142,12 @@ G_MODULE_EXPORT GtkThemingEngine* create_engine(void) { icon_sizes.push_back(std::make_pair("gtk-dialog", IconSize(KIcon::Small))); icon_sizes.push_back(std::make_pair("", IconSize(KIcon::Small))); - // FIXME - // GTK3 crashes if false is passed to writeGtkThemeControlFile - // Figure out why! -// if (gtk3TQtDebug) { + if (gtk3TQtDebug) { writeGtkThemeControlFile(true); -// } -// else { -// writeGtkThemeControlFile(false); -// } + } + else { + writeGtkThemeControlFile(false); + } // Initialize hooks m_widgetLookup.initializeHooks(); @@ -272,17 +269,23 @@ void gtk3_tqt_load_resource_string(const char* css_string) { void gtk3_tqt_reload_theme_definition_file(const char* filename) { GtkCssProvider *provider; - GError *error; + GError *error = NULL; provider = gtk_css_provider_new(); GdkDisplay *display = gdk_display_get_default(); GdkScreen *screen = gdk_display_get_default_screen(display); gtk_style_context_add_provider_for_screen(screen, GTK_STYLE_PROVIDER(provider), GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); - g_object_unref(provider); if (!gtk_css_provider_load_from_path(provider, filename, &error)) { - g_printerr("%s: error parsing %s: %s\n", G_STRFUNC, filename, error->message); - g_clear_error(&error); + if (error) { + g_printerr("[ERROR] %s: error parsing %s: %s\n", G_STRFUNC, filename, error->message); + g_clear_error(&error); + } + else { + g_printerr("[ERROR] %s: unknown failure parsing %s\n\r", G_STRFUNC, filename); fflush(stdout); + } } + + g_object_unref(provider); } TQString tdeFontToGTKFontString(TQFont font) { |