Set the node content with a row of strings */
| 1157 | |
| 1158 | /* Set the node content with a row of strings */ |
| 1159 | static void set_node(GtkTreeIter * node, struct menu *menu, gchar ** row) |
| 1160 | { |
| 1161 | GdkColor color; |
| 1162 | gboolean success; |
| 1163 | GdkPixbuf *pix; |
| 1164 | |
| 1165 | pix = gdk_pixbuf_new_from_xpm_data((const char **) |
| 1166 | row[COL_PIXBUF]); |
| 1167 | |
| 1168 | gdk_color_parse(row[COL_COLOR], &color); |
| 1169 | gdk_colormap_alloc_colors(gdk_colormap_get_system(), &color, 1, |
| 1170 | FALSE, FALSE, &success); |
| 1171 | |
| 1172 | gtk_tree_store_set(tree, node, |
| 1173 | COL_OPTION, row[COL_OPTION], |
| 1174 | COL_NAME, row[COL_NAME], |
| 1175 | COL_NO, row[COL_NO], |
| 1176 | COL_MOD, row[COL_MOD], |
| 1177 | COL_YES, row[COL_YES], |
| 1178 | COL_VALUE, row[COL_VALUE], |
| 1179 | COL_MENU, (gpointer) menu, |
| 1180 | COL_COLOR, &color, |
| 1181 | COL_EDIT, GPOINTER_TO_INT(row[COL_EDIT]), |
| 1182 | COL_PIXBUF, pix, |
| 1183 | COL_PIXVIS, GPOINTER_TO_INT(row[COL_PIXVIS]), |
| 1184 | COL_BTNVIS, GPOINTER_TO_INT(row[COL_BTNVIS]), |
| 1185 | COL_BTNACT, GPOINTER_TO_INT(row[COL_BTNACT]), |
| 1186 | COL_BTNINC, GPOINTER_TO_INT(row[COL_BTNINC]), |
| 1187 | COL_BTNRAD, GPOINTER_TO_INT(row[COL_BTNRAD]), |
| 1188 | -1); |
| 1189 | |
| 1190 | g_object_unref(pix); |
| 1191 | } |
| 1192 | |
| 1193 | |
| 1194 | /* Add a node to the tree */ |
no outgoing calls
no test coverage detected