111 break; |
111 break; |
112 } |
112 } |
113 case UI_ICON_TEXT: |
113 case UI_ICON_TEXT: |
114 case UI_ICON_TEXT_FREE: { |
114 case UI_ICON_TEXT_FREE: { |
115 UiIcon *icon = data; |
115 UiIcon *icon = data; |
116 char *str = model->getvalue(elm, c); |
|
117 #if GTK_MAJOR_VERSION >= 4 |
116 #if GTK_MAJOR_VERSION >= 4 |
118 GValue iconvalue = G_VALUE_INIT; |
117 GValue iconvalue = G_VALUE_INIT; |
119 g_value_init(&iconvalue, G_TYPE_OBJECT); |
118 g_value_init(&iconvalue, G_TYPE_OBJECT); |
120 g_value_set_object(&iconvalue, icon->info); |
119 g_value_set_object(&iconvalue, ui_icon_pixbuf(icon)); |
121 gtk_list_store_set_value(store, &iter, c, &iconvalue); |
120 gtk_list_store_set_value(store, &iter, c, &iconvalue); |
122 #else |
121 #else |
123 GValue pixbufvalue = G_VALUE_INIT; |
122 GValue pixbufvalue = G_VALUE_INIT; |
124 if(!icon->pixbuf && icon->info) { |
123 if(!icon->pixbuf && icon->info) { |
125 GError *error = NULL; |
124 GError *error = NULL; |
129 g_value_init(&pixbufvalue, G_TYPE_OBJECT); |
128 g_value_init(&pixbufvalue, G_TYPE_OBJECT); |
130 g_value_set_object(&pixbufvalue, icon->pixbuf); |
129 g_value_set_object(&pixbufvalue, icon->pixbuf); |
131 gtk_list_store_set_value(store, &iter, c, &pixbufvalue); |
130 gtk_list_store_set_value(store, &iter, c, &pixbufvalue); |
132 #endif |
131 #endif |
133 c++; |
132 c++; |
|
133 |
|
134 char *str = model->getvalue(elm, c); |
134 g_value_init(&value, G_TYPE_STRING); |
135 g_value_init(&value, G_TYPE_STRING); |
135 g_value_set_string(&value, str); |
136 g_value_set_string(&value, str); |
136 if(model->types[i] == UI_ICON_TEXT_FREE) { |
137 if(model->types[i] == UI_ICON_TEXT_FREE) { |
137 free(str); |
138 free(str); |
138 } |
139 } |