Mercurial > dwindows
comparison gtk3/dw.c @ 1287:57ce07fbec45
Allow passing 0 as icon handle to remove container icon on GTK3.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Mon, 31 Oct 2011 09:37:47 +0000 |
parents | 87d6d11b6323 |
children | 5fb54aeba5e0 |
comparison
equal
deleted
inserted
replaced
1286:6a5df80cfb43 | 1287:57ce07fbec45 |
---|---|
5787 void **thisdata = (void **)data; | 5787 void **thisdata = (void **)data; |
5788 HICN hicon = *((HICN *)thisdata[0]); | 5788 HICN hicon = *((HICN *)thisdata[0]); |
5789 char *tmp = (char *)thisdata[1]; | 5789 char *tmp = (char *)thisdata[1]; |
5790 GdkPixbuf *pixbuf = _find_pixbuf(hicon, NULL, NULL); | 5790 GdkPixbuf *pixbuf = _find_pixbuf(hicon, NULL, NULL); |
5791 | 5791 |
5792 if(pixbuf) | 5792 gtk_list_store_set(store, &iter, 1, pixbuf, -1); |
5793 gtk_list_store_set(store, &iter, 1, pixbuf, -1); | |
5794 | |
5795 gtk_list_store_set(store, &iter, 2, tmp, -1); | 5793 gtk_list_store_set(store, &iter, 2, tmp, -1); |
5796 } | 5794 } |
5797 else if(flag & DW_CFA_BITMAPORICON) | 5795 else if(flag & DW_CFA_BITMAPORICON) |
5798 { | 5796 { |
5799 HICN hicon = *((HICN *)data); | 5797 HICN hicon = *((HICN *)data); |
5800 GdkPixbuf *pixbuf = _find_pixbuf(hicon, NULL, NULL); | 5798 GdkPixbuf *pixbuf = _find_pixbuf(hicon, NULL, NULL); |
5801 | 5799 |
5802 if(pixbuf) | 5800 gtk_list_store_set(store, &iter, column + 2, pixbuf, -1); |
5803 gtk_list_store_set(store, &iter, column + 2, pixbuf, -1); | |
5804 } | 5801 } |
5805 else if(flag & DW_CFA_STRING) | 5802 else if(flag & DW_CFA_STRING) |
5806 { | 5803 { |
5807 char *tmp = *((char **)data); | 5804 char *tmp = *((char **)data); |
5808 gtk_list_store_set(store, &iter, column + 2, tmp, -1); | 5805 gtk_list_store_set(store, &iter, column + 2, tmp, -1); |