2 * Copyright (C) 2012-2013 jeanfi@gmail.com
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 const char *SETTINGS_KEY_WINDOW_WIDTH = "window-width";
23 const char *SETTINGS_KEY_WINDOW_HEIGHT = "window-height";
24 const char *SETTINGS_KEY_WINDOW_X = "window-x";
25 const char *SETTINGS_KEY_WINDOW_Y = "window-y";
26 const char *SETTINGS_KEY_SPLITER_VERTICAL_POS = "spliter-vertical-pos";
27 const char *SETTINGS_KEY_SPLITER_HORIZONTAL_POS = "spliter-horizontal-pos";
28 const char *SETTINGS_KEY_TASKS_SORT_COL = "tasks-sort-col";
29 const char *SETTINGS_KEY_TASKS_SORT_ORDER = "tasks-sort-order";
31 const char * const SETTINGS_VISIBLE_COL_KEYS[] = {
32 "tasktree-id-visible",
33 "tasktree-description-visible",
34 "tasktree-project-visible",
35 "tasktree-uuid-visible",
36 "tasktree-priority-visible",
37 "tasktree-urgency-visible",
38 "tasktree-creation-date-visible",
39 "tasktree-due-visible",
40 "tasktree-start-visible",
43 static GSettings *settings;
47 settings = g_settings_new("ptask");
50 gint settings_get_int(const gchar *key)
52 return g_settings_get_int(settings, key);
55 void settings_set_int(const gchar *key, gint value)
57 g_settings_set_int(settings, key, value);
60 gboolean settings_get_boolean(const gchar *key)
62 return g_settings_get_boolean(settings, key);
65 void settings_set_boolean(const gchar *key, gboolean value)
67 g_settings_set_boolean(settings, key, value);