# HG changeset patch # User Eric Polino # Date 1184188209 0 # Node ID 3266c971527e0965f4de65d644e560427200b004 # Parent f65c287e466e2f500f5cc3404f3da620aa907b5f# Parent 58743fae0db2da9cb192a338257ca18d02635f2e merge of '16890deaaff10687d4bb05f2ee33efeac224027b' and 'be171823c0e7310de39e80aead1e59befce30c01' diff -r f65c287e466e -r 3266c971527e finch/gntsound.c diff -r f65c287e466e -r 3266c971527e finch/libgnt/gntwm.c --- a/finch/libgnt/gntwm.c Wed Jul 11 19:44:32 2007 +0000 +++ b/finch/libgnt/gntwm.c Wed Jul 11 21:10:09 2007 +0000 @@ -735,6 +735,7 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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);