5 void open_playlist(void)
7 GtkWidget
*selection
= NULL
;
9 selection
= gtk_file_selection_new(_("Open a Task List"));
11 switch(gtk_dialog_run(GTK_DIALOG(selection
)))
14 path
= g_strdup_printf("gtodo \"%s\"",gtk_file_selection_get_filename(GTK_FILE_SELECTION(selection
)));
15 g_print("%s\n", path
);
16 g_spawn_command_line_async(path
, NULL
);
19 gtk_widget_destroy(selection
);
26 void create_playlist(void)
28 GtkWidget
*selection
= NULL
;
30 selection
= gtk_file_selection_new(_("Create a Task List"));
32 switch(gtk_dialog_run(GTK_DIALOG(selection
)))
35 path
= g_strdup_printf("gtodo %s",gtk_file_selection_get_filename(GTK_FILE_SELECTION(selection
)));
36 g_print("%s\n", path
);
37 g_spawn_command_line_async(path
, NULL
);
40 gtk_widget_destroy(selection
);