[gnome-shell] Deal with title-less windows
- From: Dan Winship <danw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-shell] Deal with title-less windows
- Date: Fri, 13 Nov 2009 21:04:29 +0000 (UTC)
commit 8334b063f11a2032f1302a6d6eebcfe5da0ee1a2
Author: Dan Winship <danw gnome org>
Date: Fri Nov 13 14:38:38 2009 -0500
Deal with title-less windows
https://bugzilla.gnome.org/show_bug.cgi?id=601290
js/ui/altTab.js | 13 ++++++++-----
src/shell-app-system.c | 2 ++
2 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/altTab.js b/js/ui/altTab.js
index a1a5f16..dd77266 100644
--- a/js/ui/altTab.js
+++ b/js/ui/altTab.js
@@ -751,11 +751,14 @@ ThumbnailList.prototype = {
height: height * scale });
box.add_actor(clone);
- let name = new St.Label({ text: windows[i].get_title() });
- // St.Label doesn't support text-align so use a Bin
- let bin = new St.Bin({ x_align: St.Align.MIDDLE });
- bin.add_actor(name);
- box.add_actor(bin);
+ let title = windows[i].get_title();
+ if (title) {
+ let name = new St.Label({ text: title });
+ // St.Label doesn't support text-align so use a Bin
+ let bin = new St.Bin({ x_align: St.Align.MIDDLE });
+ bin.add_actor(name);
+ box.add_actor(bin);
+ }
this.addItem(box);
}
diff --git a/src/shell-app-system.c b/src/shell-app-system.c
index 898fd0f..2ec8774 100644
--- a/src/shell-app-system.c
+++ b/src/shell-app-system.c
@@ -740,6 +740,8 @@ shell_app_info_get_name (ShellAppInfo *info)
{
char *title;
g_object_get (info->window, "title", &title, NULL);
+ if (!title)
+ title = g_strdup ("");
return title;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]