Updated Spanish translation
[anjuta-git-plugin.git] / plugins / gtodo / main.h
blobd3e6a228ad91cd831d6c0235456879a764b5777a
1 #include <time.h>
2 #include <libxml/parser.h>
3 #include <libxml/tree.h>
4 #include <gtk/gtk.h>
5 #include <glib/gi18n.h>
6 #include <gconf/gconf-client.h>
8 // #include <libgtodo/libgtodo.h>
9 #include <libgtodo.h>
11 #define ICON_FILE "anjuta-gtodo-plugin-48.png"
13 int get_all_due_dates();
14 xmlNodePtr get_id_node(gchar *category, gint id);
15 extern GtkWidget *window;
16 extern GtkListStore *list;
17 extern GtkTreeModelSort *sortmodel;
19 enum
21 ID,
22 PRIORITY,
23 PRIOSTR,
24 DONE,
25 SUMMARY,
26 COMMENT,
27 END_DATE,
28 EDITABLE,
29 COLOR,
30 CATEGORY,
31 F_DATE, /* a formated date string */
32 START_DATE,
33 COMPLETED_DATE,
34 DUE,
35 N_COL
38 typedef struct{
39 GtkWidget *item;
40 gchar *date;
41 } catitems;
43 typedef struct{
44 GtkWidget *window;
45 GtkWidget *vbox;
46 GtkWidget *hbox;
47 GtkWidget *treeview;
48 GtkWidget *statusbar;
49 GtkWidget *toolbar;
50 GtkListStore *list;
51 GtkTreeModel *sortmodel;
52 GtkWidget *tbdelbut, *tbaddbut, *tbeditbut;
53 GtkWidget *tbeditlb;
54 GtkWidget *option, *menu;
55 catitems **mitems;
56 GtkAccelGroup *accel_group;
57 GtkItemFactory *item_factory;
59 } mwindow;
61 typedef struct
63 gboolean size, place;
64 gboolean ask_delete_category;
65 gboolean auto_purge;
66 gint purge_days;
67 gboolean hl_due, hl_today, hl_indays;
68 gchar *due_color;
69 gchar *due_today_color;
70 gchar *due_in_days_color;
71 gint due_days;
72 gboolean hide_done;
73 gboolean hide_due;
74 gboolean hide_nodate;
75 gint sorttype;
76 gint sortorder;
77 }sets;
80 /*interface.c*/
81 extern mwindow mw;
82 extern sets settings;
83 extern GConfClient *client;
84 extern GTodoClient *cl;
86 void about_window(void);
87 GtkWidget *gui_create_todo_widget(void);
88 GtkWidget *gui_create_main_window(void);
90 void gui_add_todo_item(GtkWidget *useless, gpointer data, guint32 openid);
92 void gtodo_load_settings (void);
93 void gtodo_update_settings (void);
94 void gtodo_set_hide_done (gboolean hide_it);
95 void gtodo_set_hide_due (gboolean hide_it);
96 void gtodo_set_hide_nodate (gboolean hide_it);
97 gboolean gtodo_get_hide_done (void);
98 gboolean gtodo_get_hide_due (void);
99 gboolean gtodo_get_hide_nodate (void);
100 void gtodo_set_sorting_order (gboolean ascending_sort);
101 void gtodo_set_sorting_type (int sorting_type);
103 /* callback.c*/
104 void remove_todo_item(GtkWidget *fake, gboolean internall);
105 int tray_clicked(GtkWidget *image, GdkEventButton *event);
106 void read_categorys(void);
107 void load_category(void);
108 /* void save_category(); */
109 void category_changed(void);
110 extern int categorys;
111 /* void save_categorys(); */
112 /* void change_category(); */
113 /* void delete_category(); */
114 extern gulong shand;
115 /* void add_category(); */
116 int tree_clicked(GtkWidget *tree, GdkEventButton *event);
117 void list_toggled_done(GtkCellRendererToggle *cell, gchar *path_str);
118 extern int hidden;
119 void tray_destroyed(GtkObject *object, gpointer data);
120 void gui_preferences(void);
121 void purge_category(void);
122 int message_box(gchar *text,gchar *buttext, GtkMessageType type);
123 void category_manager(void);
124 extern gboolean tray;
125 gboolean mw_motion_cb (GtkWidget *tv, GdkEventMotion *event, gpointer null);
126 void mw_leave_cb (GtkWidget *w, GdkEventCrossing *e, gpointer n);
127 int get_all_past_purge(void);
128 /* void update_settings(); */
130 /* preferences */
131 GtkWidget *preferences_widget(void);
132 void preferences_remove_signals(void);
134 // void preferences_cb_show_date(GtkWidget *chbox);
135 gint sort_function_test(GtkTreeModel *model,GtkTreeIter *a,GtkTreeIter *b,gpointer user_data);
137 void set_sorting_menu_item();
138 void windows_moved(GtkWidget *window);
140 int check_for_notification_event(void);
141 void pref_gconf_set_notifications(GConfClient *client);
143 void export_gui(void);
144 void open_playlist(void);
145 void create_playlist(void);
146 void export_backup_xml(void);