Commit 1ed5801e authored by German Poo-Caamano's avatar German Poo-Caamano Committed by Germán Poó Caamaño

Fixed #394648. Added menu to access the documentation according to the

2008-12-09  German Poo-Caamano <gpoo@gnome.org>

	* src/gnome-nettool.glade: 
	* src/main.c (main):
	* src/callbacks.[ch] (on_help_activate): Fixed #394648. 
	  Added menu to access the documentation according to 
	  the proposal Goal "RemoveGnomeOpenGnomeHelp".


svn path=/trunk/; revision=813
parent 5a728d6e
2008-12-09 German Poo-Caamano <gpoo@gnome.org>
* src/gnome-nettool.glade:
* src/main.c (main):
* src/callbacks.[ch] (on_help_activate): Fixed #394648.
Added menu to access the documentation according to
the proposal Goal "RemoveGnomeOpenGnomeHelp".
2008-12-08 German Poo-Caamano <gpoo@gnome.org>
* src/gnome-nettool.glade: Fixed #487308. Restored the behaviour
......
......@@ -2,6 +2,7 @@ gnome-nettool 2.26.0,
---------------------------------
- Removed warnings from the Glade UI (Diego Escalante)
- #394648: Added menu for the documentation (Germán Póo-Caamaño)
- #487308: Restored the behaviour of 'Edit/Copy' as default in
Gnome. Added 'Copy as text report' to copy all the values
in a tab window (Germán Póo-Caamaño)
......
......@@ -152,7 +152,7 @@ on_configure_button_clicked (GtkButton *button, gpointer data)
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
error->message);
"%s", error->message);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
}
......@@ -459,3 +459,31 @@ on_page_switch (GtkNotebook * notebook,
gtk_window_set_title (GTK_WINDOW (netinfo->main_window), title);
g_free (title);
}
void
on_help_activate (GtkWidget *menu_item, gpointer window)
{
GdkScreen *screen;
GError *error = NULL;
screen = gtk_widget_get_screen (window);
gtk_show_uri (screen, "ghelp:gnome-nettool",
gtk_get_current_event_time (), &error);
if (error) {
GtkWidget *dialog;
dialog = gtk_message_dialog_new (
GTK_WINDOW (window),
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
"%s", _("Unable to open help file"));
gtk_message_dialog_format_secondary_text (
GTK_MESSAGE_DIALOG (dialog),
"%s", error->message);
g_signal_connect (dialog, "response",
G_CALLBACK (gtk_widget_destroy), NULL);
gtk_window_present (GTK_WINDOW (dialog));
g_error_free (error);
}
}
......@@ -27,8 +27,6 @@ gboolean gn_quit_app (GtkWidget * widget, gpointer data);
void on_beep_activate (GtkWidget *menu_item, gpointer data);
void on_about_activate (GtkWidget *menu_item, gpointer data);
void on_copy_activate (GtkWidget *menu_item, gpointer data);
void on_clear_history_activate (GtkWidget *menu_item, gpointer data);
......@@ -37,3 +35,7 @@ void on_page_switch (GtkNotebook * notebook,
GtkNotebookPage * page,
guint page_num,
gpointer data);
void on_about_activate (GtkWidget *menu_item, gpointer data);
void on_help_activate (GtkWidget *menu_item, gpointer data);
This diff is collapsed.
......@@ -55,7 +55,7 @@ main (int argc, char *argv[])
{
GtkWidget *window;
GtkWidget *menu_quit, *menu_about, *menu_copy, *menu_clear_history;
GtkWidget *menu_beep;
GtkWidget *menu_beep, *menu_help;
GladeXML *xml;
GtkWidget *notebook;
const gchar *dialog = DATADIR "gnome-nettool.glade";
......@@ -243,8 +243,12 @@ main (int argc, char *argv[])
G_CALLBACK (on_clear_history_activate),
(gpointer) notebook);
menu_help = glade_xml_get_widget (xml, "m_help_contents");
g_signal_connect (G_OBJECT (menu_help), "activate",
G_CALLBACK (on_help_activate),
(gpointer) window);
glade_xml_signal_autoconnect (xml);
g_object_unref (G_OBJECT (xml));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment