diff --git a/src/core/delete.c b/src/core/delete.c index 030f04563..a6d7018d4 100644 --- a/src/core/delete.c +++ b/src/core/delete.c @@ -88,19 +88,31 @@ delete_ping_timeout_func (MetaDisplay *display, return; } - /* This is to get a bit better string if the title isn't representable + /* This is to get a better string if the title isn't representable * in the locale encoding; actual conversion to UTF-8 is done inside * meta_show_dialog */ - tmp = g_locale_from_utf8 (window->title, -1, NULL, NULL, NULL); - if (tmp == NULL) - window_title = "???"; + + if (window->title && window->title[0]) + { + tmp = g_locale_from_utf8 (window->title, -1, NULL, NULL, NULL); + if (tmp == NULL) + window_title = NULL; + else + window_title = window->title; + g_free (tmp); + } else - window_title = window->title; - g_free (tmp); + { + window_title = NULL; + } /* Translators: %s is a window title */ - tmp = g_markup_printf_escaped (_("%s is not responding."), - window_title); + if (window_title) + tmp = g_markup_printf_escaped (_("%s is not responding."), + window_title); + else + tmp = g_strdup (_("Application is not responding.")); + window_content = g_strdup_printf ( "%s\n\n%s", tmp,