diff options
author | Stefan Kost <ensonic@users.sf.net> | 2010-10-11 22:09:38 +0300 |
---|---|---|
committer | Stefan Kost <ensonic@users.sf.net> | 2010-10-11 22:09:38 +0300 |
commit | 908da1dfc4407f3d0db5a4618df33e6e14973b42 (patch) | |
tree | 6a6b08dc092c2f890dbfdf370cd3fbc7bc7c07a0 | |
parent | 37651dd2a968e22e456b7b4c7bc03d16186aba57 (diff) |
ui: show pad-availability
Use a big "!" for sometimes (announced) and "?" for request pads (ask).
-rw-r--r-- | src/ui/main-window.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ui/main-window.c b/src/ui/main-window.c index d4abf68..8dbe45e 100644 --- a/src/ui/main-window.c +++ b/src/ui/main-window.c @@ -127,6 +127,7 @@ G_DEFINE_TYPE (GstTLMainWindow, gsttl_main_window, GTK_TYPE_WINDOW); #define LABEL_FONT_SIZE "7" #define LABEL_FONT_NAME "Sans" #define LABEL_FONT LABEL_FONT_NAME " " LABEL_FONT_SIZE +#define PAD_TYPE_FONT_SIZE "28" /* tell graphviz to have y=0 at top * causes negative coordinates :/, known bug in some graphviz 2.26 @@ -617,6 +618,15 @@ refresh_layout (GstTLMainWindow *self, GstTLRefreshMode mode) "stroke-color-rgba", 0x204a87ff, "fill-color-rgba", ((item->pad_type!=0)?0x9ebedeff:0x729fcfff), NULL); + if (item->pad_avail) { + goo_canvas_text_new (item->ci_group, + (item->pad_avail==1)?"<span weight=\"heavy\" stretch=\"ultraexpanded\">?</span>":"<span weight=\"heavy\" stretch=\"ultraexpanded\">!</span>", + (item->w/2.0), LABEL_FONT_SIZE_NUM * 2.5, -1, GTK_ANCHOR_CENTER, + "font", LABEL_FONT_NAME " " PAD_TYPE_FONT_SIZE, + "fill-color-rgba", 0x0000002f, + "use-markup", TRUE, + NULL); + } if (item->name) { update_pad_name (item); } |