2004-07-08 Balamurali Viswanathan <[email protected]>
authorbviswa
Thu, 08 Jul 2004 07:01:00 +0000
changeset 3271 bf3ac2182e4b
parent 3270 27095cadfa2e
child 3272 bcc1beefaaba
2004-07-08 Balamurali Viswanathan <[email protected]> * gconf-editor.spec: Update * patches/gconf-editor-02-enable-help.diff: Patch to add a Contents menu item in the Help menu. Fixes bug 5038096.
ChangeLog
gconf-editor.spec
patches/gconf-editor-02-enable-help.diff
--- a/ChangeLog	Wed Jul 07 14:46:20 2004 +0000
+++ b/ChangeLog	Thu Jul 08 07:01:00 2004 +0000
@@ -1,3 +1,9 @@
+2004-07-08  Balamurali Viswanathan  <[email protected]>
+
+	* gconf-editor.spec: Update
+	* patches/gconf-editor-02-enable-help.diff: Patch to add a Contents
+	menu item in the Help menu. Fixes bug 5038096.
+
 2004-07-07  Matt Keenan <[email protected]>
 
 	* Bump to 0.10 for new location of jhindexer
--- a/gconf-editor.spec	Wed Jul 07 14:46:20 2004 +0000
+++ b/gconf-editor.spec	Thu Jul 08 07:01:00 2004 +0000
@@ -2,7 +2,7 @@
 License:      GPL
 Group:        System/GUI/GNOME
 Version:      2.5.4
-Release:      16
+Release:      17
 Distribution: Cinnabar
 Vendor:       Sun Microsystems, Inc.
 Summary:      Editor/admin tool for GConf
@@ -11,6 +11,7 @@
 Source2:      gconf-editor.1.gz
 Source3:      gconf-editor-docs-0.2.tar.bz2
 Patch1:       gconf-editor-01-docs.diff
+Patch2:       gconf-editor-02-enable-help.diff
 URL:          http://www.gnome.org
 BuildRoot:    %{_tmppath}/%{name}-%{version}-build
 Docdir:       %{_defaultdocdir}/%{name}
@@ -32,6 +33,7 @@
 bzcat %SOURCE1 | tar xvf -
 bzcat %SOURCE3 | tar xvf -
 %patch1 -p1
+%patch2 -p1
 
 %build
 %ifos linux
@@ -81,6 +83,9 @@
 %{_datadir}/gnome
 
 %changelog
+* Thu Jul 08 2004 - [email protected]
+- Add a Help->Contents menu item. Fixes bug #5038096
+
 * Wed Jul 07 2004 - [email protected]
 - added "-j $CPUS" to make to speed up builds
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gconf-editor-02-enable-help.diff	Thu Jul 08 07:01:00 2004 +0000
@@ -0,0 +1,187 @@
+--- gconf-editor-2.5.4/configure.in	2004-07-07 12:32:37.000000000 +0530
++++ gconf-editor-2.5.4-new/configure.in	2004-07-07 12:46:35.000000000 +0530
+@@ -29,7 +29,9 @@ AC_DEFINE_UNQUOTED(GNOMELOCALEDIR, "$GNO
+ 
+ PKG_CHECK_MODULES(GCONF_EDITOR,
+ 		  gconf-2.0 >= 1.1.10 \
+-		  gtk+-2.0 >= 2.0.2)
++		  gtk+-2.0 >= 2.0.2 \
++		  libgnome-2.0 >= 1.96.0 \
++		  libgnomeui-2.0 >= 2.5.4)
+ 
+ AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
+ 
+--- gconf-editor-2.5.4/src/Makefile.am	2003-11-13 00:17:14.000000000 +0530
++++ gconf-editor-2.5.4-new/src/Makefile.am	2004-07-07 13:15:24.000000000 +0530
+@@ -1,5 +1,6 @@
+ INCLUDES = \
+ 	-DLOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
++	-DDATADIR=\""$(datadir)"\" \
+ 	-DGCONF_EDITOR_IMAGEDIR=\""$(datadir)/pixmaps/gconf-editor"\" \
+ 	-DIMAGEDIR=\""$(datadir)/pixmaps"\" \
+ 	$(GCONF_EDITOR_CFLAGS)	
+--- gconf-editor-2.5.4/src/main.c	2003-02-14 04:34:06.000000000 +0530
++++ gconf-editor-2.5.4-new/src/main.c	2004-07-07 12:49:09.000000000 +0530
+@@ -18,7 +18,6 @@
+ 
+ #include <config.h>
+ 
+-#include <gtk/gtk.h>
+ #include <gconf/gconf.h>
+ #include <libintl.h>
+ 
+@@ -27,8 +26,6 @@
+ #include "gconf-message-dialog.h"
+ #include "gconf-editor-window.h"
+ 
+-#define _(x) gettext(x)
+-
+ static void
+ invalid_arg_error_dialog (GtkWindow  *parent,
+ 			  const char *key,
+@@ -59,7 +56,9 @@ main (gint argc, gchar **argv)
+ 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+ 	textdomain (GETTEXT_PACKAGE);
+ 
+-	gtk_init (&argc, &argv);
++	gnome_program_init ("gconf-editor", VERSION,
++			    LIBGNOMEUI_MODULE, argc, argv,
++			    GNOME_PARAM_APP_DATADIR, DATADIR, NULL);
+ 
+ 	/* Register our stock icons */
+ 	gconf_stock_icons_register ();
+--- gconf-editor-2.5.4/src/gconf-editor-window.c	2004-01-22 00:15:25.000000000 +0530
++++ gconf-editor-2.5.4-new/src/gconf-editor-window.c	2004-07-07 13:11:21.000000000 +0530
+@@ -30,35 +30,9 @@
+ #include "gconf-stock-icons.h"
+ #include "gconf-util.h"
+ #include <gconf/gconf.h>
+-#include <gtk/gtkcellrendererpixbuf.h>
+-#include <gtk/gtkcellrenderertext.h>
+-#include <gtk/gtkclipboard.h>
+-#include <gtk/gtkframe.h>
+-#include <gtk/gtkhpaned.h>
+-#include <gtk/gtkvpaned.h>
+-#include <gtk/gtkimage.h>
+-#include <gtk/gtkimagemenuitem.h>
+-#include <gtk/gtkitemfactory.h>
+-#include <gtk/gtkmain.h>
+-#include <gtk/gtkmenubar.h>
+-#include <gtk/gtkmessagedialog.h>
+-#include <gtk/gtkscrolledwindow.h>
+-#include <gtk/gtkstatusbar.h>
+-#include <gtk/gtkstock.h>
+-#include <gtk/gtktable.h>
+-#include <gtk/gtktextview.h>
+-#include <gtk/gtktreemodelsort.h>
+-#include <gtk/gtktreeselection.h>
+-#include <gtk/gtktreeview.h>
+-#include <gtk/gtkvbox.h>
+-#include <gtk/gtkvpaned.h>
+-#include <gtk/gtklabel.h>
+ #include <libintl.h>
+ #include <string.h>
+ 
+-#define _(x) gettext (x)
+-#define N_(x) (x)
+-
+ static GObjectClass *parent_class;
+ 
+ static char *
+@@ -68,6 +42,28 @@ gconf_editor_window_item_factory_transla
+ }
+ 
+ static void
++gconf_editor_window_popup_error_dialog (GtkWindow   *parent,
++					const gchar *message,
++					GError      *error)
++{
++	GtkWidget *dialog;
++ 	 
++	g_return_if_fail (error != NULL);
++ 	 
++	dialog = gtk_message_dialog_new (parent,
++					 GTK_DIALOG_DESTROY_WITH_PARENT,
++					 GTK_MESSAGE_ERROR,
++					 GTK_BUTTONS_CLOSE,
++					 message,
++					 error->message);
++	g_error_free (error);
++ 	 
++	g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
++ 	 
++	gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
++	gtk_widget_show (dialog);
++}
++static void
+ gconf_editor_window_close_window (gpointer callback_data, guint action, GtkWidget *widget)
+ {
+ 	GtkWidget *window = callback_data;
+@@ -197,6 +193,19 @@ gconf_editor_window_new_window (gpointer
+ }
+ 
+ static void
++help_cb (gpointer callback_data, guint action, GtkWidget *widget)
++{
++	GError *error = NULL;
++
++	gnome_help_display_desktop (NULL, "gconf-editor", "gconf-editor", NULL, &error);
++
++	if (error != NULL) {
++		gconf_editor_window_popup_error_dialog (GTK_WINDOW (GCONF_EDITOR_WINDOW (callback_data)),
++							_("Couldn't display help: %s"), error);
++	}
++}
++
++static void
+ gconf_editor_window_about_window (gpointer callback_data, guint action, GtkWidget *widget)
+ {
+ 	GtkWidget *about_window;
+@@ -271,6 +280,7 @@ static GtkItemFactoryEntry menu_items[] 
+ 	{ N_("/Bookmarks/_Edit bookmarks..."), NULL,         gconf_editor_window_edit_bookmarks,  0, "<Item>", },
+ 	{ N_("/_Help"),                        NULL,         0,                                   0, "<Branch>" },
+ 	{ N_("/Help/tearoff4"),                NULL,         NULL,                                0, "<Tearoff>" },
++	{ N_("/Help/_Contents..."),               "F1",         help_cb,    0, "<StockItem>", GTK_STOCK_HELP },
+ 	{ N_("/Help/_About..."),               NULL,         gconf_editor_window_about_window,    0, "<StockItem>", GCONF_STOCK_ABOUT },
+ };
+ 
+@@ -290,29 +300,6 @@ const char *image_menu_items_paths [] = 
+ };
+ 
+ static void
+-gconf_editor_window_popup_error_dialog (GtkWindow   *parent,
+-					const gchar *message,
+-					GError      *error)
+-{
+-	GtkWidget *dialog;
+-
+-	g_return_if_fail (error != NULL);
+-
+-	dialog = gtk_message_dialog_new (parent,
+-					 GTK_DIALOG_DESTROY_WITH_PARENT,
+-					 GTK_MESSAGE_ERROR,
+-					 GTK_BUTTONS_CLOSE,
+-					 message,
+-					 error->message);
+-	g_error_free (error);
+-
+-	g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
+-
+-	gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
+-	gtk_widget_show (dialog);
+-}
+-
+-static void
+ gconf_editor_popup_window_unset_key (gpointer callback_data, guint action, GtkWidget *widget)
+ {
+ 	GConfEditorWindow *window = GCONF_EDITOR_WINDOW (callback_data);
+--- gconf-editor-2.5.4/src/gconf-editor-application.h	2002-01-14 23:43:05.000000000 +0530
++++ gconf-editor-2.5.4-new/src/gconf-editor-application.h	2004-07-07 13:05:07.000000000 +0530
+@@ -21,6 +21,7 @@
+ #define __GCONF_EDITOR_APPLICATION_H__
+ 
+ #include <gtk/gtkwidget.h>
++#include <gnome.h>
+ 
+ GtkWidget *gconf_editor_application_create_editor_window (void);
+