[PATCH] Finish dropping gnome_help



---
 src/file-manager/fm-directory-view.c      |    9 +++------
 src/file-manager/fm-properties-window.c   |   12 +++++-------
 src/nautilus-bookmarks-window.c           |    9 ++++-----
 src/nautilus-connect-server-dialog.c      |    8 +++-----
 src/nautilus-file-management-properties.c |   13 ++++++++-----
 src/nautilus-location-dialog.c            |    8 +++-----
 6 files changed, 26 insertions(+), 33 deletions(-)

diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c
index 844eb22..f94b2f7 100644
--- a/src/file-manager/fm-directory-view.c
+++ b/src/file-manager/fm-directory-view.c
@@ -38,7 +38,6 @@
 #include "fm-properties-window.h"
 #include "libnautilus-private/nautilus-open-with-dialog.h"
 
-#include <libgnome/gnome-url.h>
 #include <eel/eel-mount-operation.h>
 #include <eel/eel-background.h>
 #include <eel/eel-glib-extensions.h>
@@ -54,7 +53,6 @@
 #include <glib/gi18n.h>
 #include <glib/gstdio.h>
 #include <gio/gio.h>
-#include <libgnomeui/gnome-help.h>
 #include <libnautilus-private/nautilus-recent.h>
 #include <libnautilus-extension/nautilus-menu-provider.h>
 #include <libnautilus-private/nautilus-clipboard.h>
@@ -1127,10 +1125,9 @@ pattern_select_response_cb (GtkWidget *dialog, int response, gpointer user_data)
 		break;
 	case GTK_RESPONSE_HELP :
 		error = NULL;
-		gnome_help_display_desktop_on_screen (NULL, "user-guide", "user-guide.xml",
-						      "nautilus-select-pattern",
-						      gtk_window_get_screen (GTK_WINDOW (dialog)),
-						      &error);
+		gtk_show_uri (gtk_window_get_screen (GTK_WINDOW (dialog)),
+			      "ghelp:user-guide#nautilus-select-pattern",
+			      gtk_get_current_event_time (), &error);
 		if (error) {
 			eel_show_error_dialog (_("There was an error displaying help."), error->message,
 					       GTK_WINDOW (dialog));
diff --git a/src/file-manager/fm-properties-window.c b/src/file-manager/fm-properties-window.c
index ceb990e..748f417 100644
--- a/src/file-manager/fm-properties-window.c
+++ b/src/file-manager/fm-properties-window.c
@@ -39,12 +39,9 @@
 #include <eel/eel-vfs-extensions.h>
 #include <eel/eel-wrap-table.h>
 #include <gtk/gtk.h>
+#include <gdk/gdkkeysyms.h>
 #include <glib/gi18n.h>
-#include <libgnome/gnome-macros.h>
-#include <libgnomeui/gnome-dialog.h>
-#include <libgnomeui/gnome-help.h>
 #include <libgnomeui/gnome-thumbnail.h>
-#include <libgnomeui/gnome-uidefs.h>
 #include <libnautilus-extension/nautilus-property-page-provider.h>
 #include <libnautilus-private/nautilus-customization-data.h>
 #include <libnautilus-private/nautilus-entry.h>
@@ -5445,9 +5442,10 @@ real_response (GtkDialog *dialog,
 
 	switch (response) {
 	case GTK_RESPONSE_HELP:
-		gnome_help_display_desktop_on_screen (NULL, "user-guide", "user-guide.xml", "gosnautilus-51",
-						      gtk_window_get_screen (GTK_WINDOW (dialog)),
-						      &error);
+		gtk_show_uri (gtk_window_get_screen (GTK_WINDOW (dialog)),
+			      "ghelp:user-guide#gosnautilus-51",
+			      gtk_get_current_event_time (),
+			      &error);
 		if (error != NULL) {
 			eel_show_error_dialog (_("There was an error displaying help."), error->message,
 					       GTK_WINDOW (dialog));
diff --git a/src/nautilus-bookmarks-window.c b/src/nautilus-bookmarks-window.c
index 1e85167..1a0672c 100644
--- a/src/nautilus-bookmarks-window.c
+++ b/src/nautilus-bookmarks-window.c
@@ -36,8 +36,7 @@
 #include <eel/eel-gnome-extensions.h>
 #include <libnautilus-private/nautilus-undo-signal-handlers.h>
 #include <gtk/gtk.h>
-#include <gnome.h>
-#include <libgnomeui/gnome-help.h>
+#include <gdk/gdkkeysyms.h>
 #include <glade/glade.h>
 
 /* Static variables to keep track of window state. If there were
@@ -147,9 +146,9 @@ nautilus_bookmarks_window_response_callback (GtkDialog *dialog,
 	if (response_id == GTK_RESPONSE_HELP) {
 		GError *error = NULL;
 
-		gnome_help_display_desktop_on_screen (
-			NULL, "user-guide", "user-guide.xml", "gosnautilus-36",
-			gtk_window_get_screen (GTK_WINDOW (dialog)), &error);
+		gtk_show_uri (gtk_window_get_screen (GTK_WINDOW (dialog)),
+			      "ghelp:user-guide#gosnautilus-36",
+			      gtk_get_current_event_time (), &error);
 
 		if (error) {
 			GtkWidget *err_dialog;
diff --git a/src/nautilus-connect-server-dialog.c b/src/nautilus-connect-server-dialog.c
index 5e5506e..ad1645b 100644
--- a/src/nautilus-connect-server-dialog.c
+++ b/src/nautilus-connect-server-dialog.c
@@ -28,7 +28,6 @@
 #include <eel/eel-gtk-macros.h>
 #include <eel/eel-stock-dialogs.h>
 #include <eel/eel-vfs-extensions.h>
-#include <libgnomeui/gnome-help.h>
 #include <glib/gi18n.h>
 #include <gio/gio.h>
 #include <gtk/gtk.h>
@@ -335,10 +334,9 @@ response_callback (NautilusConnectServerDialog *dialog,
 		break;
 	case GTK_RESPONSE_HELP :
 		error = NULL;
-		gnome_help_display_desktop_on_screen (NULL, "user-guide", "user-guide.xml",
-						      "nautilus-server-connect",
-						      gtk_window_get_screen (GTK_WINDOW (dialog)),
-						      &error);
+		gtk_show_uri (gtk_window_get_screen (GTK_WINDOW (dialog)),
+			      "ghelp:user-guide#nautilus-server-connect",
+			      gtk_get_current_event_time (), &error);
 		if (error) {
 			eel_show_error_dialog (_("There was an error displaying help."), error->message,
 					       GTK_WINDOW (dialog));
diff --git a/src/nautilus-file-management-properties.c b/src/nautilus-file-management-properties.c
index a45b3c7..596c22c 100644
--- a/src/nautilus-file-management-properties.c
+++ b/src/nautilus-file-management-properties.c
@@ -31,7 +31,6 @@
 #include <gtk/gtk.h>
 #include <gio/gio.h>
 
-#include <libgnome/gnome-help.h>
 #include <glib/gi18n.h>
 
 #include <glade/glade.h>
@@ -190,13 +189,17 @@ preferences_show_help (GtkWindow *parent,
 {
 	GError *error = NULL;
 	GtkWidget *dialog;
+	char *help_string;
 
 	g_assert (helpfile != NULL);
 	g_assert (sect_id != NULL);
 
-	gnome_help_display_desktop (NULL,
-				    "user-guide",
-				    helpfile, sect_id, &error);
+	help_string = g_strdup_printf ("ghelp:%s#%s", helpfile, sect_id);
+
+	gtk_show_uri (gtk_window_get_screen (parent),
+		      help_string, gtk_get_current_event_time (),
+		      &error);
+	g_free (help_string);
 
 	if (error) {
 		dialog = gtk_message_dialog_new (GTK_WINDOW (parent),
@@ -241,7 +244,7 @@ nautilus_file_management_properties_dialog_response_cb (GtkDialog *parent,
 		case 4:
 			section = "gosnautilus-60";
 		}
-		preferences_show_help (GTK_WINDOW (parent), "user-guide.xml", section);
+		preferences_show_help (GTK_WINDOW (parent), "user-guide", section);
 	} else if (response_id == GTK_RESPONSE_CLOSE) {
 		/* remove gconf monitors */
 		eel_gconf_monitor_remove ("/apps/nautilus/icon_view");
diff --git a/src/nautilus-location-dialog.c b/src/nautilus-location-dialog.c
index f6c50b5..1ef58a7 100644
--- a/src/nautilus-location-dialog.c
+++ b/src/nautilus-location-dialog.c
@@ -27,7 +27,6 @@
 #include <eel/eel-gtk-macros.h>
 #include <eel/eel-stock-dialogs.h>
 #include <gtk/gtk.h>
-#include <libgnomeui/gnome-help.h>
 #include <libnautilus-private/nautilus-file-utilities.h>
 #include "nautilus-location-entry.h"
 #include "nautilus-desktop-window.h"
@@ -102,10 +101,9 @@ response_callback (NautilusLocationDialog *dialog,
 		break;
 	case GTK_RESPONSE_HELP :
 		error = NULL;
-		gnome_help_display_desktop_on_screen (NULL, "user-guide", "user-guide.xml",
-						      "nautilus-open-location",
-						      gtk_window_get_screen (GTK_WINDOW (dialog)),
-						      &error);
+		gtk_show_uri (gtk_window_get_screen (GTK_WINDOW (dialog)),
+			      "ghelp:user-guide#nautilus-open-location",
+			      gtk_get_current_event_time (), &error);
 		if (error) {
 			eel_show_error_dialog (_("There was an error displaying help."), error->message,
 					       GTK_WINDOW (dialog));
-- 
1.5.6.3


--=-M9WetJk+GBqnJK8uPecM
Content-Disposition: attachment; filename="0004-Drop-gnome-macros.patch"
Content-Type: text/x-patch; name="0004-Drop-gnome-macros.patch"; charset="UTF-8"
Content-Transfer-Encoding: 7bit



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]