Move the relevant code into init_left_tree() or init_right_tree().
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -1254,17 +1254,13 @@ static gboolean visible_func(GtkTreeModel *model, GtkTreeIter *iter, · 1253 unmodified lines | ||
| 1254 | 1254 | (opt_mode == OPT_PROMPT && menu_has_prompt(menu)); |
| 1255 | 1255 | } |
| 1256 | 1256 | |
| 1257 | −static void init_tree_model(void) | |
| 1257 | +static void init_left_tree(void) | |
| 1258 | 1258 | { |
| 1259 | − tree2 = gtk_tree_store_new(COL_NUMBER, | |
| 1260 | − G_TYPE_STRING, G_TYPE_STRING, | |
| 1261 | − G_TYPE_STRING, G_TYPE_STRING, | |
| 1262 | − G_TYPE_STRING, G_TYPE_STRING, | |
| 1263 | − G_TYPE_POINTER, GDK_TYPE_COLOR, | |
| 1264 | − G_TYPE_BOOLEAN, GDK_TYPE_PIXBUF, | |
| 1265 | − G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, | |
| 1266 | − G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, | |
| 1267 | − G_TYPE_BOOLEAN); | |
| 1259 | + GtkTreeView *view = GTK_TREE_VIEW(tree1_w); | |
| 1260 | + GtkCellRenderer *renderer; | |
| 1261 | + GtkTreeSelection *sel; | |
| 1262 | + GtkTreeViewColumn *column; | |
| 1263 | + GtkTreeModel *filter; | |
| 1268 | 1264 | |
| 1269 | 1265 | tree1 = gtk_tree_store_new(COL_NUMBER, |
| 1270 | 1266 | G_TYPE_STRING, G_TYPE_STRING, |
| @@ -1275,15 +1271,6 @@ static void init_tree_model(void) · 4 unmodified lines | ||
| 1275 | 1271 | G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, |
| 1276 | 1272 | G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, |
| 1277 | 1273 | G_TYPE_BOOLEAN); |
| 1278 | −} | |
| 1279 | − | |
| 1280 | −static void init_left_tree(void) | |
| 1281 | −{ | |
| 1282 | − GtkTreeView *view = GTK_TREE_VIEW(tree1_w); | |
| 1283 | − GtkCellRenderer *renderer; | |
| 1284 | − GtkTreeSelection *sel; | |
| 1285 | − GtkTreeViewColumn *column; | |
| 1286 | − GtkTreeModel *filter; | |
| 1287 | 1274 | |
| 1288 | 1275 | filter = gtk_tree_model_filter_new(GTK_TREE_MODEL(tree1), NULL); |
| 1289 | 1276 | |
| @@ -1326,6 +1313,16 @@ static void init_right_tree(void) · 36 unmodified lines | ||
| 1326 | 1313 | GtkTreeModel *filter; |
| 1327 | 1314 | gint i; |
| 1328 | 1315 | |
| 1316 | + tree2 = gtk_tree_store_new(COL_NUMBER, | |
| 1317 | + G_TYPE_STRING, G_TYPE_STRING, | |
| 1318 | + G_TYPE_STRING, G_TYPE_STRING, | |
| 1319 | + G_TYPE_STRING, G_TYPE_STRING, | |
| 1320 | + G_TYPE_POINTER, GDK_TYPE_COLOR, | |
| 1321 | + G_TYPE_BOOLEAN, GDK_TYPE_PIXBUF, | |
| 1322 | + G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, | |
| 1323 | + G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, | |
| 1324 | + G_TYPE_BOOLEAN); | |
| 1325 | + | |
| 1329 | 1326 | filter = gtk_tree_model_filter_new(GTK_TREE_MODEL(tree2), NULL); |
| 1330 | 1327 | |
| 1331 | 1328 | gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER(filter), |
| @@ -1448,7 +1445,6 @@ int main(int ac, char *av[]) · 116 unmodified lines | ||
| 1448 | 1445 | |
| 1449 | 1446 | /* Load the interface and connect signals */ |
| 1450 | 1447 | init_main_window(glade_file); |
| 1451 | − init_tree_model(); | |
| 1452 | 1448 | init_left_tree(); |
| 1453 | 1449 | init_right_tree(); |
| 1454 | 1450 | |