diff options
author | Eric Polino <aluink@pidgin.im> | 2007-07-11 20:03:24 +0000 |
---|---|---|
committer | Eric Polino <aluink@pidgin.im> | 2007-07-11 20:03:24 +0000 |
commit | c51650479f462c0d983fabb5bcf939f25cd58eea (patch) | |
tree | 37517fbd2ed019362dc0edffd286675efb94ffdd | |
parent | b7ac8b357003311248d46908f8ab00bad49452d6 (diff) | |
parent | acefeaf181c0c7dade6a3ad25a7e8106e5ffc710 (diff) | |
download | pidgin-c51650479f462c0d983fabb5bcf939f25cd58eea.tar.gz |
merge of '63410823a172d188421e84f73dfbaed4a20be58a'
and '512a0d90be41a7d41a12e45615f79d75db70cb1d'
-rw-r--r-- | finch/libgnt/gntwm.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/finch/libgnt/gntwm.c b/finch/libgnt/gntwm.c index 0a52759ff0..a655fa9dcf 100644 --- a/finch/libgnt/gntwm.c +++ b/finch/libgnt/gntwm.c @@ -735,6 +735,7 @@ dump_screen(GntBindable *bindable, GList *null) print = ch; #ifndef NO_WIDECHAR if (wch.chars[0] > 255) { + /* XXX This lines throws a warning, can we quiet it? */ snprintf(unicode, sizeof(unicode), "&#x%x;", wch.chars[0]); print = unicode; } @@ -803,6 +804,9 @@ shift_left(GntBindable *bindable, GList *null) if (wm->_list.window) return TRUE; + if(!wm->cws->ordered) + return FALSE; + shift_window(wm, wm->cws->ordered->data, -1); return TRUE; } @@ -811,9 +815,13 @@ static gboolean shift_right(GntBindable *bindable, GList *null) { GntWM *wm = GNT_WM(bindable); + if (wm->_list.window) return TRUE; + if(!wm->cws->ordered) + return FALSE; + shift_window(wm, wm->cws->ordered->data, 1); return TRUE; } @@ -1146,7 +1154,13 @@ static gboolean help_for_window(GntBindable *bindable, GList *null) { GntWM *wm = GNT_WM(bindable); - GntWidget *widget = wm->cws->ordered->data; + GntWidget *widget; + + + if(!wm->cws->ordered) + return FALSE; + + widget = wm->cws->ordered->data; return help_for_bindable(wm,GNT_BINDABLE(widget)); } @@ -1947,7 +1961,8 @@ gnt_wm_give_focus(GntWM *wm, GntWidget *widget) if (!node) return; - + + /* XXX Should there be a check before access to 'data' to make sure 'ordered' isn't NULL? */ if (widget != wm->_list.window && !GNT_IS_MENU(widget) && wm->cws->ordered->data != widget) { GntWidget *w = wm->cws->ordered->data; @@ -2009,6 +2024,7 @@ void gnt_wm_raise_window(GntWM *wm, GntWidget *widget) GntWS *ws = gnt_wm_widget_find_workspace(wm, widget); if (wm->cws != ws) gnt_wm_switch_workspace(wm, g_list_index(wm->workspaces, ws)); + /* XXX Should there be a check before access to 'data' to make sure 'ordered' isn't NULL? */ if (widget != wm->cws->ordered->data) { GntWidget *wid = wm->cws->ordered->data; wm->cws->ordered = g_list_bring_to_front(wm->cws->ordered, widget); |