diff options
author | Timothy Pearson <[email protected]> | 2012-11-12 23:51:27 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-11-12 23:51:27 -0600 |
commit | acc82b617ddbee05e509392c09e2729bc2fc1911 (patch) | |
tree | 32e0a5705d9557a077c7a41bdb8254eaacb64258 /tdegtk/tdegtk-theme.cpp | |
parent | 7665959f2b71297d880ca1371a04c15611db2fce (diff) | |
download | gtk3-tqt-engine-acc82b617ddbee05e509392c09e2729bc2fc1911.tar.gz gtk3-tqt-engine-acc82b617ddbee05e509392c09e2729bc2fc1911.zip |
Migrate to TDE build system and fix crashes
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) { |