Updated Spanish translation
[anjuta-git-plugin.git] / plugins / gtodo / tasklists.c
blob2974ea284605caf11b2322ac7f3cac8480346828
1 #include <gtk/gtk.h>
2 #include "main.h"
5 void open_playlist(void)
7 GtkWidget *selection = NULL;
8 gchar *path = NULL;
9 selection = gtk_file_selection_new(_("Open a Task List"));
11 switch(gtk_dialog_run(GTK_DIALOG(selection)))
13 case GTK_RESPONSE_OK:
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);
17 g_free(path);
18 default:
19 gtk_widget_destroy(selection);
20 return;
26 void create_playlist(void)
28 GtkWidget *selection = NULL;
29 gchar *path = NULL;
30 selection = gtk_file_selection_new(_("Create a Task List"));
32 switch(gtk_dialog_run(GTK_DIALOG(selection)))
34 case GTK_RESPONSE_OK:
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);
38 g_free(path);
39 default:
40 gtk_widget_destroy(selection);
41 return;