1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
3 * Copyright (C) 2001, 2002 Anders Carlsson <andersca@gnu.org>
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __GCONF_EDITOR_WINDOW_H__
21 #define __GCONF_EDITOR_WINDOW_H__
24 #include <gconf/gconf-client.h>
26 #define GCONF_TYPE_EDITOR_WINDOW (gconf_editor_window_get_type ())
27 #define GCONF_EDITOR_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCONF_TYPE_EDITOR_WINDOW, GConfEditorWindow))
28 #define GCONF_EDITOR_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GCONF_TYPE_EDITOR_WINDOW, GConfEditorWindowClass))
29 #define GCONF_IS_EDITOR_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCONF_TYPE_EDITOR_WINDOW))
30 #define GCONF_IS_EDITOR_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), GCONF_TYPE_EDITOR_WINDOW))
31 #define GCONF_EDITOR_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GCONF_TYPE_EDITOR_WINDOW, GConfEditorWindowClass))
33 #define RECENT_LIST_MAX_SIZE 20
36 GCONF_EDITOR_WINDOW_TYPE_NORMAL,
37 GCONF_EDITOR_WINDOW_TYPE_DEFAULTS,
38 GCONF_EDITOR_WINDOW_TYPE_MANDATORY
42 GCONF_EDITOR_WINDOW_OUTPUT_WINDOW_NONE,
43 GCONF_EDITOR_WINDOW_OUTPUT_WINDOW_SEARCH,
44 GCONF_EDITOR_WINDOW_OUTPUT_WINDOW_RECENTS
48 typedef struct _GConfEditorWindow GConfEditorWindow;
49 typedef struct _GConfEditorWindowClass GConfEditorWindowClass;
51 struct _GConfEditorWindow {
52 GtkWindow parent_instance;
58 GtkTreeModel *tree_model;
59 GtkTreeModel *sorted_tree_model;
62 GtkTreeModel *list_model;
63 GtkTreeModel *sorted_list_model;
65 GtkWidget *output_window;
66 int output_window_type;
70 GtkUIManager *ui_manager;
71 GtkWidget *popup_menu;
72 GtkTreeViewColumn *value_column;
74 GtkWidget *non_writable_label;
75 GtkWidget *key_name_label;
76 GtkWidget *short_desc_label;
77 GtkTextBuffer *long_desc_buffer;
78 GtkWidget *owner_label;
79 GtkWidget *no_schema_label;
81 guint tearoffs_notify_id;
82 guint icons_notify_id;
85 struct _GConfEditorWindowClass {
86 GtkWindowClass parent_class;
89 GType gconf_editor_window_get_type (void);
90 GtkWidget *gconf_editor_window_new (void);
92 void gconf_editor_window_go_to (GConfEditorWindow *window,
93 const char *location);
94 void gconf_editor_window_expand_first (GConfEditorWindow *window);
96 void gconf_editor_window_popup_error_dialog (GtkWindow *parent,
101 #endif /* __GCONF_EDITOR_WINDOW_H__ */