[gnome-panel] wncklet: Remove obsolete help code



commit c1e7e41e3120f5ebe9a4a36ae9ef6697e8faca98
Author: Vincent Untz <vuntz gnome org>
Date:   Wed Feb 8 09:30:46 2012 +0100

    wncklet: Remove obsolete help code

 applets/wncklet/window-list.c         |    6 +--
 applets/wncklet/window-list.ui        |   15 -------
 applets/wncklet/wncklet.c             |   69 ---------------------------------
 applets/wncklet/wncklet.h             |    5 --
 applets/wncklet/workspace-switcher.c  |    7 +---
 applets/wncklet/workspace-switcher.ui |   15 -------
 6 files changed, 2 insertions(+), 115 deletions(-)
---
diff --git a/applets/wncklet/window-list.c b/applets/wncklet/window-list.c
index 25ea962..ff74dbc 100644
--- a/applets/wncklet/window-list.c
+++ b/applets/wncklet/window-list.c
@@ -79,11 +79,7 @@ response_cb (GtkWidget    *widget,
 	     int           id,
 	     TasklistData *tasklist)
 {
-	if (id == GTK_RESPONSE_HELP)
-		wncklet_display_help (widget, "user-guide",
-				      "windowlist-prefs", WINDOW_LIST_ICON);
-	else
-		gtk_widget_hide (widget);
+	gtk_widget_hide (widget);
 }
 
 static void
diff --git a/applets/wncklet/window-list.ui b/applets/wncklet/window-list.ui
index 3077bd8..aa9ab2c 100644
--- a/applets/wncklet/window-list.ui
+++ b/applets/wncklet/window-list.ui
@@ -265,21 +265,6 @@
           <object class="GtkHButtonBox" id="dialog-action_area2">
             <property name="visible">True</property>
             <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
               <object class="GtkButton" id="done_button">
                 <property name="label">gtk-close</property>
                 <property name="visible">True</property>
diff --git a/applets/wncklet/wncklet.c b/applets/wncklet/wncklet.c
index 5ac8d95..26771ce 100644
--- a/applets/wncklet/wncklet.c
+++ b/applets/wncklet/wncklet.c
@@ -38,75 +38,6 @@
 #include "window-list.h"
 #include "showdesktop.h"
 
-void
-wncklet_display_help (GtkWidget  *widget,
-		      const char *doc_id,
-		      const char *link_id,
-		      const char *icon_name)
-{
-	GError *error = NULL;
-	char   *uri;
-
-	if (link_id)
-		uri = g_strdup_printf ("ghelp:%s?%s", doc_id, link_id);
-	else
-		uri = g_strdup_printf ("ghelp:%s", doc_id);
-
-	gtk_show_uri (gtk_widget_get_screen (widget), uri,
-		      gtk_get_current_event_time (), &error);
-
-	g_free (uri);
-
-	if (error &&
-	    g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
-		g_error_free (error);
-	else if (error) {
-		GtkWidget *parent;
-		GtkWidget *dialog;
-		char      *primary;
-
-		if (GTK_IS_WINDOW (widget))
-			parent = widget;
-		else
-			parent = NULL;
-
-		primary = g_markup_printf_escaped (
-				_("Could not display help document '%s'"),
-				doc_id);
-		dialog = gtk_message_dialog_new (
-				parent ? GTK_WINDOW (parent) : NULL,
-				GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
-				GTK_MESSAGE_ERROR,
-				GTK_BUTTONS_CLOSE,
-				"%s", primary);
-
-		gtk_message_dialog_format_secondary_text (
-					GTK_MESSAGE_DIALOG (dialog),
-					"%s", error->message);
-
-		g_error_free (error);
-		g_free (primary);
-
-		g_signal_connect (dialog, "response",
-				  G_CALLBACK (gtk_widget_destroy),
-				  NULL);
-
-		gtk_window_set_icon_name (GTK_WINDOW (dialog), icon_name);
-		gtk_window_set_screen (GTK_WINDOW (dialog),
-				       gtk_widget_get_screen (widget));
-
-		if (parent == NULL) {
-			/* we have no parent window */
-			gtk_window_set_skip_taskbar_hint (GTK_WINDOW (dialog),
-							  FALSE);
-			gtk_window_set_title (GTK_WINDOW (dialog),
-					      _("Error displaying help document"));
-		}
-
-		gtk_widget_show (dialog);
-	}
-}
-
 WnckScreen *
 wncklet_get_screen (GtkWidget *applet)
 {
diff --git a/applets/wncklet/wncklet.h b/applets/wncklet/wncklet.h
index 2485c16..0c78480 100644
--- a/applets/wncklet/wncklet.h
+++ b/applets/wncklet/wncklet.h
@@ -34,11 +34,6 @@
 
 G_BEGIN_DECLS
 
-void        wncklet_display_help        (GtkWidget  *widget,
-					 const char *doc_id,
-					 const char *link_id,
-					 const char *icon_name);
-
 WnckScreen *wncklet_get_screen          (GtkWidget *applet);
 	
 void        wncklet_connect_while_alive (gpointer    object,
diff --git a/applets/wncklet/workspace-switcher.c b/applets/wncklet/workspace-switcher.c
index 8041046..9139a41 100644
--- a/applets/wncklet/workspace-switcher.c
+++ b/applets/wncklet/workspace-switcher.c
@@ -575,12 +575,7 @@ response_cb (GtkWidget *widget,
 	     int        id,
 	     PagerData *pager)
 {
-	if (id == GTK_RESPONSE_HELP)
-		wncklet_display_help (widget, "user-guide",
-				      "overview-workspaces",
-				      WORKSPACE_SWITCHER_ICON);
-	else
-		gtk_widget_destroy (widget);
+	gtk_widget_destroy (widget);
 }
 
 static void
diff --git a/applets/wncklet/workspace-switcher.ui b/applets/wncklet/workspace-switcher.ui
index ce7fd95..84e62cc 100644
--- a/applets/wncklet/workspace-switcher.ui
+++ b/applets/wncklet/workspace-switcher.ui
@@ -261,21 +261,6 @@
           <object class="GtkHButtonBox" id="dialog-action_area1">
             <property name="visible">True</property>
             <child>
-              <object class="GtkButton" id="help_button">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_stock">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
               <object class="GtkButton" id="done_button">
                 <property name="label">gtk-close</property>
                 <property name="visible">True</property>



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