3271
|
1 |
--- gconf-editor-2.5.4/configure.in 2004-07-07 12:32:37.000000000 +0530
|
|
2 |
+++ gconf-editor-2.5.4-new/configure.in 2004-07-07 12:46:35.000000000 +0530
|
|
3 |
@@ -29,7 +29,9 @@ AC_DEFINE_UNQUOTED(GNOMELOCALEDIR, "$GNO
|
|
4 |
|
|
5 |
PKG_CHECK_MODULES(GCONF_EDITOR,
|
|
6 |
gconf-2.0 >= 1.1.10 \
|
|
7 |
- gtk+-2.0 >= 2.0.2)
|
|
8 |
+ gtk+-2.0 >= 2.0.2 \
|
|
9 |
+ libgnome-2.0 >= 1.96.0 \
|
|
10 |
+ libgnomeui-2.0 >= 2.5.4)
|
|
11 |
|
|
12 |
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
|
|
13 |
|
|
14 |
--- gconf-editor-2.5.4/src/Makefile.am 2003-11-13 00:17:14.000000000 +0530
|
|
15 |
+++ gconf-editor-2.5.4-new/src/Makefile.am 2004-07-07 13:15:24.000000000 +0530
|
|
16 |
@@ -1,5 +1,6 @@
|
|
17 |
INCLUDES = \
|
|
18 |
-DLOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
|
|
19 |
+ -DDATADIR=\""$(datadir)"\" \
|
|
20 |
-DGCONF_EDITOR_IMAGEDIR=\""$(datadir)/pixmaps/gconf-editor"\" \
|
|
21 |
-DIMAGEDIR=\""$(datadir)/pixmaps"\" \
|
|
22 |
$(GCONF_EDITOR_CFLAGS)
|
|
23 |
--- gconf-editor-2.5.4/src/main.c 2003-02-14 04:34:06.000000000 +0530
|
|
24 |
+++ gconf-editor-2.5.4-new/src/main.c 2004-07-07 12:49:09.000000000 +0530
|
|
25 |
@@ -18,7 +18,6 @@
|
|
26 |
|
|
27 |
#include <config.h>
|
|
28 |
|
|
29 |
-#include <gtk/gtk.h>
|
|
30 |
#include <gconf/gconf.h>
|
|
31 |
#include <libintl.h>
|
|
32 |
|
|
33 |
@@ -27,8 +26,6 @@
|
|
34 |
#include "gconf-message-dialog.h"
|
|
35 |
#include "gconf-editor-window.h"
|
|
36 |
|
|
37 |
-#define _(x) gettext(x)
|
|
38 |
-
|
|
39 |
static void
|
|
40 |
invalid_arg_error_dialog (GtkWindow *parent,
|
|
41 |
const char *key,
|
|
42 |
@@ -59,7 +56,9 @@ main (gint argc, gchar **argv)
|
|
43 |
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
|
44 |
textdomain (GETTEXT_PACKAGE);
|
|
45 |
|
|
46 |
- gtk_init (&argc, &argv);
|
|
47 |
+ gnome_program_init ("gconf-editor", VERSION,
|
|
48 |
+ LIBGNOMEUI_MODULE, argc, argv,
|
|
49 |
+ GNOME_PARAM_APP_DATADIR, DATADIR, NULL);
|
|
50 |
|
|
51 |
/* Register our stock icons */
|
|
52 |
gconf_stock_icons_register ();
|
|
53 |
--- gconf-editor-2.5.4/src/gconf-editor-window.c 2004-01-22 00:15:25.000000000 +0530
|
|
54 |
+++ gconf-editor-2.5.4-new/src/gconf-editor-window.c 2004-07-07 13:11:21.000000000 +0530
|
|
55 |
@@ -30,35 +30,9 @@
|
|
56 |
#include "gconf-stock-icons.h"
|
|
57 |
#include "gconf-util.h"
|
|
58 |
#include <gconf/gconf.h>
|
|
59 |
-#include <gtk/gtkcellrendererpixbuf.h>
|
|
60 |
-#include <gtk/gtkcellrenderertext.h>
|
|
61 |
-#include <gtk/gtkclipboard.h>
|
|
62 |
-#include <gtk/gtkframe.h>
|
|
63 |
-#include <gtk/gtkhpaned.h>
|
|
64 |
-#include <gtk/gtkvpaned.h>
|
|
65 |
-#include <gtk/gtkimage.h>
|
|
66 |
-#include <gtk/gtkimagemenuitem.h>
|
|
67 |
-#include <gtk/gtkitemfactory.h>
|
|
68 |
-#include <gtk/gtkmain.h>
|
|
69 |
-#include <gtk/gtkmenubar.h>
|
|
70 |
-#include <gtk/gtkmessagedialog.h>
|
|
71 |
-#include <gtk/gtkscrolledwindow.h>
|
|
72 |
-#include <gtk/gtkstatusbar.h>
|
|
73 |
-#include <gtk/gtkstock.h>
|
|
74 |
-#include <gtk/gtktable.h>
|
|
75 |
-#include <gtk/gtktextview.h>
|
|
76 |
-#include <gtk/gtktreemodelsort.h>
|
|
77 |
-#include <gtk/gtktreeselection.h>
|
|
78 |
-#include <gtk/gtktreeview.h>
|
|
79 |
-#include <gtk/gtkvbox.h>
|
|
80 |
-#include <gtk/gtkvpaned.h>
|
|
81 |
-#include <gtk/gtklabel.h>
|
|
82 |
#include <libintl.h>
|
|
83 |
#include <string.h>
|
|
84 |
|
|
85 |
-#define _(x) gettext (x)
|
|
86 |
-#define N_(x) (x)
|
|
87 |
-
|
|
88 |
static GObjectClass *parent_class;
|
|
89 |
|
|
90 |
static char *
|
|
91 |
@@ -68,6 +42,28 @@ gconf_editor_window_item_factory_transla
|
|
92 |
}
|
|
93 |
|
|
94 |
static void
|
|
95 |
+gconf_editor_window_popup_error_dialog (GtkWindow *parent,
|
|
96 |
+ const gchar *message,
|
|
97 |
+ GError *error)
|
|
98 |
+{
|
|
99 |
+ GtkWidget *dialog;
|
|
100 |
+
|
|
101 |
+ g_return_if_fail (error != NULL);
|
|
102 |
+
|
|
103 |
+ dialog = gtk_message_dialog_new (parent,
|
|
104 |
+ GTK_DIALOG_DESTROY_WITH_PARENT,
|
|
105 |
+ GTK_MESSAGE_ERROR,
|
|
106 |
+ GTK_BUTTONS_CLOSE,
|
|
107 |
+ message,
|
|
108 |
+ error->message);
|
|
109 |
+ g_error_free (error);
|
|
110 |
+
|
|
111 |
+ g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
|
|
112 |
+
|
|
113 |
+ gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
|
|
114 |
+ gtk_widget_show (dialog);
|
|
115 |
+}
|
|
116 |
+static void
|
|
117 |
gconf_editor_window_close_window (gpointer callback_data, guint action, GtkWidget *widget)
|
|
118 |
{
|
|
119 |
GtkWidget *window = callback_data;
|
|
120 |
@@ -197,6 +193,19 @@ gconf_editor_window_new_window (gpointer
|
|
121 |
}
|
|
122 |
|
|
123 |
static void
|
|
124 |
+help_cb (gpointer callback_data, guint action, GtkWidget *widget)
|
|
125 |
+{
|
|
126 |
+ GError *error = NULL;
|
|
127 |
+
|
|
128 |
+ gnome_help_display_desktop (NULL, "gconf-editor", "gconf-editor", NULL, &error);
|
|
129 |
+
|
|
130 |
+ if (error != NULL) {
|
|
131 |
+ gconf_editor_window_popup_error_dialog (GTK_WINDOW (GCONF_EDITOR_WINDOW (callback_data)),
|
|
132 |
+ _("Couldn't display help: %s"), error);
|
|
133 |
+ }
|
|
134 |
+}
|
|
135 |
+
|
|
136 |
+static void
|
|
137 |
gconf_editor_window_about_window (gpointer callback_data, guint action, GtkWidget *widget)
|
|
138 |
{
|
|
139 |
GtkWidget *about_window;
|
|
140 |
@@ -271,6 +280,7 @@ static GtkItemFactoryEntry menu_items[]
|
|
141 |
{ N_("/Bookmarks/_Edit bookmarks..."), NULL, gconf_editor_window_edit_bookmarks, 0, "<Item>", },
|
|
142 |
{ N_("/_Help"), NULL, 0, 0, "<Branch>" },
|
|
143 |
{ N_("/Help/tearoff4"), NULL, NULL, 0, "<Tearoff>" },
|
|
144 |
+ { N_("/Help/_Contents..."), "F1", help_cb, 0, "<StockItem>", GTK_STOCK_HELP },
|
|
145 |
{ N_("/Help/_About..."), NULL, gconf_editor_window_about_window, 0, "<StockItem>", GCONF_STOCK_ABOUT },
|
|
146 |
};
|
|
147 |
|
|
148 |
@@ -290,29 +300,6 @@ const char *image_menu_items_paths [] =
|
|
149 |
};
|
|
150 |
|
|
151 |
static void
|
|
152 |
-gconf_editor_window_popup_error_dialog (GtkWindow *parent,
|
|
153 |
- const gchar *message,
|
|
154 |
- GError *error)
|
|
155 |
-{
|
|
156 |
- GtkWidget *dialog;
|
|
157 |
-
|
|
158 |
- g_return_if_fail (error != NULL);
|
|
159 |
-
|
|
160 |
- dialog = gtk_message_dialog_new (parent,
|
|
161 |
- GTK_DIALOG_DESTROY_WITH_PARENT,
|
|
162 |
- GTK_MESSAGE_ERROR,
|
|
163 |
- GTK_BUTTONS_CLOSE,
|
|
164 |
- message,
|
|
165 |
- error->message);
|
|
166 |
- g_error_free (error);
|
|
167 |
-
|
|
168 |
- g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
|
|
169 |
-
|
|
170 |
- gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
|
|
171 |
- gtk_widget_show (dialog);
|
|
172 |
-}
|
|
173 |
-
|
|
174 |
-static void
|
|
175 |
gconf_editor_popup_window_unset_key (gpointer callback_data, guint action, GtkWidget *widget)
|
|
176 |
{
|
|
177 |
GConfEditorWindow *window = GCONF_EDITOR_WINDOW (callback_data);
|
|
178 |
--- gconf-editor-2.5.4/src/gconf-editor-application.h 2002-01-14 23:43:05.000000000 +0530
|
|
179 |
+++ gconf-editor-2.5.4-new/src/gconf-editor-application.h 2004-07-07 13:05:07.000000000 +0530
|
|
180 |
@@ -21,6 +21,7 @@
|
|
181 |
#define __GCONF_EDITOR_APPLICATION_H__
|
|
182 |
|
|
183 |
#include <gtk/gtkwidget.h>
|
|
184 |
+#include <gnome.h>
|
|
185 |
|
|
186 |
GtkWidget *gconf_editor_application_create_editor_window (void);
|
|
187 |
|