gnome-nettool r813 - in trunk: . src



Author: gpoo
Date: Tue Dec  9 14:09:46 2008
New Revision: 813
URL: http://svn.gnome.org/viewvc/gnome-nettool?rev=813&view=rev

Log:
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".



Modified:
   trunk/ChangeLog
   trunk/NEWS
   trunk/src/callbacks.c
   trunk/src/callbacks.h
   trunk/src/gnome-nettool.glade
   trunk/src/main.c

Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS	(original)
+++ trunk/NEWS	Tue Dec  9 14:09:46 2008
@@ -2,6 +2,7 @@
 ---------------------------------
 
  - 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)

Modified: trunk/src/callbacks.c
==============================================================================
--- trunk/src/callbacks.c	(original)
+++ trunk/src/callbacks.c	Tue Dec  9 14:09:46 2008
@@ -152,7 +152,7 @@
 							 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 @@
 	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);
+	}
+}

Modified: trunk/src/callbacks.h
==============================================================================
--- trunk/src/callbacks.h	(original)
+++ trunk/src/callbacks.h	Tue Dec  9 14:09:46 2008
@@ -27,8 +27,6 @@
 
 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 @@
                      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);

Modified: trunk/src/gnome-nettool.glade
==============================================================================
--- trunk/src/gnome-nettool.glade	(original)
+++ trunk/src/gnome-nettool.glade	Tue Dec  9 14:09:46 2008
@@ -58,6 +58,7 @@
                         <property name="use_underline">True</property>
                         <child internal-child="image">
                           <widget class="GtkImage" id="menu-item-image2">
+                            <property name="stock">gtk-missing-image</property>
                           </widget>
                         </child>
                       </widget>
@@ -93,6 +94,14 @@
                 <child>
                   <widget class="GtkMenu" id="help1_menu">
                     <child>
+                      <widget class="GtkImageMenuItem" id="m_help_contents">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">gtk-help</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                      </widget>
+                    </child>
+                    <child>
                       <widget class="GtkImageMenuItem" id="m_about">
                         <property name="visible">True</property>
                         <property name="label">gtk-about</property>
@@ -267,50 +276,36 @@
                                     <property name="column_spacing">6</property>
                                     <property name="row_spacing">6</property>
                                     <child>
-                                      <widget class="GtkLabel" id="info_state">
+                                      <widget class="GtkLabel" id="label_hw_address">
                                         <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
                                         <property name="xalign">0</property>
-                                        <property name="label" translatable="yes">Not Available</property>
-                                        <property name="selectable">True</property>
+                                        <property name="label" translatable="yes">Hardware address:</property>
                                       </widget>
                                       <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="right_attach">2</property>
-                                        <property name="top_attach">4</property>
-                                        <property name="bottom_attach">5</property>
                                         <property name="x_options">GTK_FILL</property>
                                         <property name="y_options"></property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkLabel" id="info_link_speed">
+                                      <widget class="GtkLabel" id="label_multicast">
                                         <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
                                         <property name="xalign">0</property>
-                                        <property name="label" translatable="yes">Not Available</property>
-                                        <property name="selectable">True</property>
+                                        <property name="label" translatable="yes">Multicast:</property>
                                       </widget>
                                       <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="right_attach">2</property>
-                                        <property name="top_attach">3</property>
-                                        <property name="bottom_attach">4</property>
+                                        <property name="top_attach">1</property>
+                                        <property name="bottom_attach">2</property>
                                         <property name="x_options">GTK_FILL</property>
                                         <property name="y_options"></property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkLabel" id="info_mtu">
+                                      <widget class="GtkLabel" id="label_mtu">
                                         <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
                                         <property name="xalign">0</property>
-                                        <property name="label" translatable="yes">Not Available</property>
-                                        <property name="selectable">True</property>
+                                        <property name="label" translatable="yes">MTU:</property>
                                       </widget>
                                       <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="right_attach">2</property>
                                         <property name="top_attach">2</property>
                                         <property name="bottom_attach">3</property>
                                         <property name="x_options">GTK_FILL</property>
@@ -318,71 +313,75 @@
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkLabel" id="info_multicast">
+                                      <widget class="GtkLabel" id="label_link_speed">
                                         <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
                                         <property name="xalign">0</property>
-                                        <property name="label" translatable="yes">Not Available</property>
-                                        <property name="selectable">True</property>
+                                        <property name="label" translatable="yes">Link speed:</property>
                                       </widget>
                                       <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="right_attach">2</property>
-                                        <property name="top_attach">1</property>
-                                        <property name="bottom_attach">2</property>
+                                        <property name="top_attach">3</property>
+                                        <property name="bottom_attach">4</property>
                                         <property name="x_options">GTK_FILL</property>
                                         <property name="y_options"></property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkLabel" id="info_hw_address">
+                                      <widget class="GtkLabel" id="label_state">
                                         <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
                                         <property name="xalign">0</property>
-                                        <property name="label" translatable="yes">Not Available</property>
-                                        <property name="justify">GTK_JUSTIFY_RIGHT</property>
-                                        <property name="selectable">True</property>
+                                        <property name="label" translatable="yes">State:</property>
                                       </widget>
                                       <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="right_attach">2</property>
+                                        <property name="top_attach">4</property>
+                                        <property name="bottom_attach">5</property>
                                         <property name="x_options">GTK_FILL</property>
                                         <property name="y_options"></property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkLabel" id="label_state">
+                                      <widget class="GtkLabel" id="info_hw_address">
                                         <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
                                         <property name="xalign">0</property>
-                                        <property name="label" translatable="yes">State:</property>
+                                        <property name="label" translatable="yes">Not Available</property>
+                                        <property name="justify">GTK_JUSTIFY_RIGHT</property>
+                                        <property name="selectable">True</property>
                                       </widget>
                                       <packing>
-                                        <property name="top_attach">4</property>
-                                        <property name="bottom_attach">5</property>
+                                        <property name="left_attach">1</property>
+                                        <property name="right_attach">2</property>
                                         <property name="x_options">GTK_FILL</property>
                                         <property name="y_options"></property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkLabel" id="label_link_speed">
+                                      <widget class="GtkLabel" id="info_multicast">
                                         <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
                                         <property name="xalign">0</property>
-                                        <property name="label" translatable="yes">Link speed:</property>
+                                        <property name="label" translatable="yes">Not Available</property>
+                                        <property name="selectable">True</property>
                                       </widget>
                                       <packing>
-                                        <property name="top_attach">3</property>
-                                        <property name="bottom_attach">4</property>
+                                        <property name="left_attach">1</property>
+                                        <property name="right_attach">2</property>
+                                        <property name="top_attach">1</property>
+                                        <property name="bottom_attach">2</property>
                                         <property name="x_options">GTK_FILL</property>
                                         <property name="y_options"></property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkLabel" id="label_mtu">
+                                      <widget class="GtkLabel" id="info_mtu">
                                         <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
                                         <property name="xalign">0</property>
-                                        <property name="label" translatable="yes">MTU:</property>
+                                        <property name="label" translatable="yes">Not Available</property>
+                                        <property name="selectable">True</property>
                                       </widget>
                                       <packing>
+                                        <property name="left_attach">1</property>
+                                        <property name="right_attach">2</property>
                                         <property name="top_attach">2</property>
                                         <property name="bottom_attach">3</property>
                                         <property name="x_options">GTK_FILL</property>
@@ -390,25 +389,35 @@
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkLabel" id="label_multicast">
+                                      <widget class="GtkLabel" id="info_link_speed">
                                         <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
                                         <property name="xalign">0</property>
-                                        <property name="label" translatable="yes">Multicast:</property>
+                                        <property name="label" translatable="yes">Not Available</property>
+                                        <property name="selectable">True</property>
                                       </widget>
                                       <packing>
-                                        <property name="top_attach">1</property>
-                                        <property name="bottom_attach">2</property>
+                                        <property name="left_attach">1</property>
+                                        <property name="right_attach">2</property>
+                                        <property name="top_attach">3</property>
+                                        <property name="bottom_attach">4</property>
                                         <property name="x_options">GTK_FILL</property>
                                         <property name="y_options"></property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkLabel" id="label_hw_address">
+                                      <widget class="GtkLabel" id="info_state">
                                         <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
                                         <property name="xalign">0</property>
-                                        <property name="label" translatable="yes">Hardware address:</property>
+                                        <property name="label" translatable="yes">Not Available</property>
+                                        <property name="selectable">True</property>
                                       </widget>
                                       <packing>
+                                        <property name="left_attach">1</property>
+                                        <property name="right_attach">2</property>
+                                        <property name="top_attach">4</property>
+                                        <property name="bottom_attach">5</property>
                                         <property name="x_options">GTK_FILL</property>
                                         <property name="y_options"></property>
                                       </packing>
@@ -455,21 +464,31 @@
                                     <property name="column_spacing">6</property>
                                     <property name="row_spacing">6</property>
                                     <child>
-                                      <widget class="GtkLabel" id="label22">
+                                      <widget class="GtkLabel" id="label73">
                                         <property name="visible">True</property>
                                         <property name="xalign">0</property>
-                                        <property name="label" translatable="yes">Collisions:</property>
-                                        <property name="justify">GTK_JUSTIFY_RIGHT</property>
+                                        <property name="label" translatable="yes">Transmitted bytes:</property>
                                       </widget>
                                       <packing>
-                                        <property name="top_attach">6</property>
-                                        <property name="bottom_attach">7</property>
                                         <property name="x_options">GTK_FILL</property>
                                         <property name="y_options"></property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkLabel" id="info_collisions">
+                                      <widget class="GtkLabel" id="label72">
+                                        <property name="visible">True</property>
+                                        <property name="xalign">0</property>
+                                        <property name="label" translatable="yes">Received bytes:</property>
+                                      </widget>
+                                      <packing>
+                                        <property name="top_attach">3</property>
+                                        <property name="bottom_attach">4</property>
+                                        <property name="x_options">GTK_FILL</property>
+                                        <property name="y_options"></property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <widget class="GtkLabel" id="info_rx_bytes">
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
                                         <property name="xalign">0</property>
@@ -479,27 +498,29 @@
                                       <packing>
                                         <property name="left_attach">1</property>
                                         <property name="right_attach">2</property>
-                                        <property name="top_attach">6</property>
-                                        <property name="bottom_attach">7</property>
+                                        <property name="top_attach">3</property>
+                                        <property name="bottom_attach">4</property>
                                         <property name="x_options">GTK_FILL</property>
                                         <property name="y_options"></property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkLabel" id="label21">
+                                      <widget class="GtkLabel" id="info_tx_bytes">
                                         <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
                                         <property name="xalign">0</property>
-                                        <property name="label" translatable="yes">Reception errors:</property>
+                                        <property name="label" translatable="yes">Not Available</property>
+                                        <property name="selectable">True</property>
                                       </widget>
                                       <packing>
-                                        <property name="top_attach">5</property>
-                                        <property name="bottom_attach">6</property>
+                                        <property name="left_attach">1</property>
+                                        <property name="right_attach">2</property>
                                         <property name="x_options">GTK_FILL</property>
                                         <property name="y_options"></property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkLabel" id="info_rx_errors">
+                                      <widget class="GtkLabel" id="info_tx_errors">
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
                                         <property name="xalign">0</property>
@@ -509,27 +530,27 @@
                                       <packing>
                                         <property name="left_attach">1</property>
                                         <property name="right_attach">2</property>
-                                        <property name="top_attach">5</property>
-                                        <property name="bottom_attach">6</property>
+                                        <property name="top_attach">2</property>
+                                        <property name="bottom_attach">3</property>
                                         <property name="x_options">GTK_FILL</property>
                                         <property name="y_options"></property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkLabel" id="label20">
+                                      <widget class="GtkLabel" id="label19">
                                         <property name="visible">True</property>
                                         <property name="xalign">0</property>
-                                        <property name="label" translatable="yes">Received packets:</property>
+                                        <property name="label" translatable="yes">Transmission errors:</property>
                                       </widget>
                                       <packing>
-                                        <property name="top_attach">4</property>
-                                        <property name="bottom_attach">5</property>
+                                        <property name="top_attach">2</property>
+                                        <property name="bottom_attach">3</property>
                                         <property name="x_options">GTK_FILL</property>
                                         <property name="y_options"></property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkLabel" id="info_rx">
+                                      <widget class="GtkLabel" id="info_tx">
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
                                         <property name="xalign">0</property>
@@ -539,8 +560,8 @@
                                       <packing>
                                         <property name="left_attach">1</property>
                                         <property name="right_attach">2</property>
-                                        <property name="top_attach">4</property>
-                                        <property name="bottom_attach">5</property>
+                                        <property name="top_attach">1</property>
+                                        <property name="bottom_attach">2</property>
                                         <property name="x_options">GTK_FILL</property>
                                         <property name="y_options"></property>
                                       </packing>
@@ -559,7 +580,7 @@
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkLabel" id="info_tx">
+                                      <widget class="GtkLabel" id="info_rx">
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
                                         <property name="xalign">0</property>
@@ -569,27 +590,27 @@
                                       <packing>
                                         <property name="left_attach">1</property>
                                         <property name="right_attach">2</property>
-                                        <property name="top_attach">1</property>
-                                        <property name="bottom_attach">2</property>
+                                        <property name="top_attach">4</property>
+                                        <property name="bottom_attach">5</property>
                                         <property name="x_options">GTK_FILL</property>
                                         <property name="y_options"></property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkLabel" id="label19">
+                                      <widget class="GtkLabel" id="label20">
                                         <property name="visible">True</property>
                                         <property name="xalign">0</property>
-                                        <property name="label" translatable="yes">Transmission errors:</property>
+                                        <property name="label" translatable="yes">Received packets:</property>
                                       </widget>
                                       <packing>
-                                        <property name="top_attach">2</property>
-                                        <property name="bottom_attach">3</property>
+                                        <property name="top_attach">4</property>
+                                        <property name="bottom_attach">5</property>
                                         <property name="x_options">GTK_FILL</property>
                                         <property name="y_options"></property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkLabel" id="info_tx_errors">
+                                      <widget class="GtkLabel" id="info_rx_errors">
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
                                         <property name="xalign">0</property>
@@ -599,29 +620,27 @@
                                       <packing>
                                         <property name="left_attach">1</property>
                                         <property name="right_attach">2</property>
-                                        <property name="top_attach">2</property>
-                                        <property name="bottom_attach">3</property>
+                                        <property name="top_attach">5</property>
+                                        <property name="bottom_attach">6</property>
                                         <property name="x_options">GTK_FILL</property>
                                         <property name="y_options"></property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkLabel" id="info_tx_bytes">
+                                      <widget class="GtkLabel" id="label21">
                                         <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
                                         <property name="xalign">0</property>
-                                        <property name="label" translatable="yes">Not Available</property>
-                                        <property name="selectable">True</property>
+                                        <property name="label" translatable="yes">Reception errors:</property>
                                       </widget>
                                       <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="right_attach">2</property>
+                                        <property name="top_attach">5</property>
+                                        <property name="bottom_attach">6</property>
                                         <property name="x_options">GTK_FILL</property>
                                         <property name="y_options"></property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkLabel" id="info_rx_bytes">
+                                      <widget class="GtkLabel" id="info_collisions">
                                         <property name="visible">True</property>
                                         <property name="can_focus">True</property>
                                         <property name="xalign">0</property>
@@ -631,32 +650,22 @@
                                       <packing>
                                         <property name="left_attach">1</property>
                                         <property name="right_attach">2</property>
-                                        <property name="top_attach">3</property>
-                                        <property name="bottom_attach">4</property>
-                                        <property name="x_options">GTK_FILL</property>
-                                        <property name="y_options"></property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkLabel" id="label72">
-                                        <property name="visible">True</property>
-                                        <property name="xalign">0</property>
-                                        <property name="label" translatable="yes">Received bytes:</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="top_attach">3</property>
-                                        <property name="bottom_attach">4</property>
+                                        <property name="top_attach">6</property>
+                                        <property name="bottom_attach">7</property>
                                         <property name="x_options">GTK_FILL</property>
                                         <property name="y_options"></property>
                                       </packing>
                                     </child>
                                     <child>
-                                      <widget class="GtkLabel" id="label73">
+                                      <widget class="GtkLabel" id="label22">
                                         <property name="visible">True</property>
                                         <property name="xalign">0</property>
-                                        <property name="label" translatable="yes">Transmitted bytes:</property>
+                                        <property name="label" translatable="yes">Collisions:</property>
+                                        <property name="justify">GTK_JUSTIFY_RIGHT</property>
                                       </widget>
                                       <packing>
+                                        <property name="top_attach">6</property>
+                                        <property name="bottom_attach">7</property>
                                         <property name="x_options">GTK_FILL</property>
                                         <property name="y_options"></property>
                                       </packing>
@@ -723,45 +732,6 @@
                         <property name="column_spacing">6</property>
                         <property name="row_spacing">6</property>
                         <child>
-                          <widget class="GtkLabel" id="ping_host_label">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">_Network address:</property>
-                            <property name="use_underline">True</property>
-                          </widget>
-                          <packing>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkComboBoxEntry" id="ping_host">
-                            <property name="visible">True</property>
-                            <property name="items" translatable="yes">Host</property>
-                            <child internal-child="entry">
-                              <widget class="GtkEntry" id="comboboxentry-entry1">
-                              </widget>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="y_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label109">
-                            <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">Send:</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
                           <widget class="GtkHBox" id="hbox25">
                             <property name="visible">True</property>
                             <property name="spacing">12</property>
@@ -838,6 +808,45 @@
                             <property name="y_options">GTK_FILL</property>
                           </packing>
                         </child>
+                        <child>
+                          <widget class="GtkLabel" id="label109">
+                            <property name="visible">True</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">Send:</property>
+                          </widget>
+                          <packing>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkComboBoxEntry" id="ping_host">
+                            <property name="visible">True</property>
+                            <property name="items" translatable="yes">Host</property>
+                            <child internal-child="entry">
+                              <widget class="GtkEntry" id="comboboxentry-entry1">
+                              </widget>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="ping_host_label">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">_Network address:</property>
+                            <property name="use_underline">True</property>
+                          </widget>
+                          <packing>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
                       </widget>
                       <packing>
                         <property name="expand">False</property>
@@ -923,23 +932,29 @@
                                 <property name="column_spacing">6</property>
                                 <property name="row_spacing">6</property>
                                 <child>
-                                  <widget class="GtkLabel" id="label34">
+                                  <widget class="GtkLabel" id="ping_maximum">
                                     <property name="visible">True</property>
                                     <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">Minimum:</property>
+                                    <property name="label" translatable="yes">0.0</property>
                                   </widget>
                                   <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
+                                    <property name="top_attach">2</property>
+                                    <property name="bottom_attach">3</property>
                                     <property name="x_options">GTK_FILL</property>
                                     <property name="y_options"></property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkLabel" id="label35">
+                                  <widget class="GtkLabel" id="ping_average">
                                     <property name="visible">True</property>
                                     <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">Average:</property>
+                                    <property name="label" translatable="yes">0.0</property>
                                   </widget>
                                   <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
                                     <property name="top_attach">1</property>
                                     <property name="bottom_attach">2</property>
                                     <property name="x_options">GTK_FILL</property>
@@ -947,20 +962,20 @@
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkLabel" id="label36">
+                                  <widget class="GtkLabel" id="ping_minimum">
                                     <property name="visible">True</property>
                                     <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">Maximum:</property>
+                                    <property name="label" translatable="yes">0.0</property>
                                   </widget>
                                   <packing>
-                                    <property name="top_attach">2</property>
-                                    <property name="bottom_attach">3</property>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
                                     <property name="x_options">GTK_FILL</property>
                                     <property name="y_options"></property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkLabel" id="label37">
+                                  <widget class="GtkLabel" id="label39">
                                     <property name="visible">True</property>
                                     <property name="xalign">0</property>
                                     <property name="label" translatable="yes">ms</property>
@@ -968,6 +983,8 @@
                                   <packing>
                                     <property name="left_attach">2</property>
                                     <property name="right_attach">3</property>
+                                    <property name="top_attach">2</property>
+                                    <property name="bottom_attach">3</property>
                                     <property name="x_options">GTK_FILL</property>
                                     <property name="y_options"></property>
                                   </packing>
@@ -988,7 +1005,7 @@
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkLabel" id="label39">
+                                  <widget class="GtkLabel" id="label37">
                                     <property name="visible">True</property>
                                     <property name="xalign">0</property>
                                     <property name="label" translatable="yes">ms</property>
@@ -996,34 +1013,30 @@
                                   <packing>
                                     <property name="left_attach">2</property>
                                     <property name="right_attach">3</property>
-                                    <property name="top_attach">2</property>
-                                    <property name="bottom_attach">3</property>
                                     <property name="x_options">GTK_FILL</property>
                                     <property name="y_options"></property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkLabel" id="ping_minimum">
+                                  <widget class="GtkLabel" id="label36">
                                     <property name="visible">True</property>
                                     <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">0.0</property>
+                                    <property name="label" translatable="yes">Maximum:</property>
                                   </widget>
                                   <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="right_attach">2</property>
+                                    <property name="top_attach">2</property>
+                                    <property name="bottom_attach">3</property>
                                     <property name="x_options">GTK_FILL</property>
                                     <property name="y_options"></property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkLabel" id="ping_average">
+                                  <widget class="GtkLabel" id="label35">
                                     <property name="visible">True</property>
                                     <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">0.0</property>
+                                    <property name="label" translatable="yes">Average:</property>
                                   </widget>
                                   <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="right_attach">2</property>
                                     <property name="top_attach">1</property>
                                     <property name="bottom_attach">2</property>
                                     <property name="x_options">GTK_FILL</property>
@@ -1031,16 +1044,12 @@
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkLabel" id="ping_maximum">
+                                  <widget class="GtkLabel" id="label34">
                                     <property name="visible">True</property>
                                     <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">0.0</property>
+                                    <property name="label" translatable="yes">Minimum:</property>
                                   </widget>
                                   <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="right_attach">2</property>
-                                    <property name="top_attach">2</property>
-                                    <property name="bottom_attach">3</property>
                                     <property name="x_options">GTK_FILL</property>
                                     <property name="y_options"></property>
                                   </packing>
@@ -1082,25 +1091,24 @@
                                 <property name="column_spacing">6</property>
                                 <property name="row_spacing">6</property>
                                 <child>
-                                  <widget class="GtkLabel" id="label42">
+                                  <widget class="GtkLabel" id="label41">
                                     <property name="visible">True</property>
                                     <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">Packets received:</property>
+                                    <property name="label" translatable="yes">Packets transmitted:</property>
                                   </widget>
                                   <packing>
-                                    <property name="top_attach">1</property>
-                                    <property name="bottom_attach">2</property>
                                     <property name="x_options">GTK_FILL</property>
                                     <property name="y_options"></property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkLabel" id="label43">
+                                  <widget class="GtkLabel" id="ping_packets_success">
                                     <property name="visible">True</property>
                                     <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">Successful packets:</property>
                                   </widget>
                                   <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
                                     <property name="top_attach">2</property>
                                     <property name="bottom_attach">3</property>
                                     <property name="x_options">GTK_FILL</property>
@@ -1108,39 +1116,38 @@
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkLabel" id="ping_packets_transmitted">
+                                  <widget class="GtkLabel" id="ping_packets_received">
                                     <property name="visible">True</property>
                                     <property name="xalign">0</property>
                                   </widget>
                                   <packing>
                                     <property name="left_attach">1</property>
                                     <property name="right_attach">2</property>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
                                     <property name="x_options">GTK_FILL</property>
                                     <property name="y_options"></property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkLabel" id="ping_packets_received">
+                                  <widget class="GtkLabel" id="ping_packets_transmitted">
                                     <property name="visible">True</property>
                                     <property name="xalign">0</property>
                                   </widget>
                                   <packing>
                                     <property name="left_attach">1</property>
                                     <property name="right_attach">2</property>
-                                    <property name="top_attach">1</property>
-                                    <property name="bottom_attach">2</property>
                                     <property name="x_options">GTK_FILL</property>
                                     <property name="y_options"></property>
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkLabel" id="ping_packets_success">
+                                  <widget class="GtkLabel" id="label43">
                                     <property name="visible">True</property>
                                     <property name="xalign">0</property>
+                                    <property name="label" translatable="yes">Successful packets:</property>
                                   </widget>
                                   <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="right_attach">2</property>
                                     <property name="top_attach">2</property>
                                     <property name="bottom_attach">3</property>
                                     <property name="x_options">GTK_FILL</property>
@@ -1148,12 +1155,14 @@
                                   </packing>
                                 </child>
                                 <child>
-                                  <widget class="GtkLabel" id="label41">
+                                  <widget class="GtkLabel" id="label42">
                                     <property name="visible">True</property>
                                     <property name="xalign">0</property>
-                                    <property name="label" translatable="yes">Packets transmitted:</property>
+                                    <property name="label" translatable="yes">Packets received:</property>
                                   </widget>
                                   <packing>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
                                     <property name="x_options">GTK_FILL</property>
                                     <property name="y_options"></property>
                                   </packing>
@@ -1710,13 +1719,28 @@
                         <property name="column_spacing">6</property>
                         <property name="row_spacing">6</property>
                         <child>
-                          <widget class="GtkLabel" id="lookup_host_label">
+                          <widget class="GtkComboBox" id="lookup_type">
+                            <property name="visible">True</property>
+                          </widget>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="lookup_type_label">
                             <property name="visible">True</property>
                             <property name="xalign">0</property>
-                            <property name="label" translatable="yes">_Network address:</property>
+                            <property name="label" translatable="yes">_Information type:</property>
                             <property name="use_underline">True</property>
                           </widget>
                           <packing>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
                             <property name="x_options">GTK_FILL</property>
                             <property name="y_options"></property>
                           </packing>
@@ -1737,32 +1761,17 @@
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkLabel" id="lookup_type_label">
+                          <widget class="GtkLabel" id="lookup_host_label">
                             <property name="visible">True</property>
                             <property name="xalign">0</property>
-                            <property name="label" translatable="yes">_Information type:</property>
+                            <property name="label" translatable="yes">_Network address:</property>
                             <property name="use_underline">True</property>
                           </widget>
                           <packing>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
                             <property name="x_options">GTK_FILL</property>
                             <property name="y_options"></property>
                           </packing>
                         </child>
-                        <child>
-                          <widget class="GtkComboBox" id="lookup_type">
-                            <property name="visible">True</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options">GTK_FILL</property>
-                          </packing>
-                        </child>
                       </widget>
                       <packing>
                         <property name="expand">False</property>
@@ -1879,29 +1888,21 @@
                         <property name="column_spacing">6</property>
                         <property name="row_spacing">6</property>
                         <child>
-                          <widget class="GtkLabel" id="finger_user_label">
-                            <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">_Username:</property>
-                            <property name="use_underline">True</property>
-                          </widget>
-                          <packing>
-                            <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"></property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="finger_host_label">
+                          <widget class="GtkComboBoxEntry" id="finger_host">
                             <property name="visible">True</property>
-                            <property name="xalign">0</property>
-                            <property name="label" translatable="yes">_Network address:</property>
-                            <property name="use_underline">True</property>
+                            <property name="items" translatable="yes">Host</property>
+                            <child internal-child="entry">
+                              <widget class="GtkEntry" id="comboboxentry-entry6">
+                              </widget>
+                            </child>
                           </widget>
                           <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
                             <property name="top_attach">1</property>
                             <property name="bottom_attach">2</property>
                             <property name="x_options">GTK_FILL</property>
-                            <property name="y_options"></property>
+                            <property name="y_options">GTK_FILL</property>
                           </packing>
                         </child>
                         <child>
@@ -1920,21 +1921,29 @@
                           </packing>
                         </child>
                         <child>
-                          <widget class="GtkComboBoxEntry" id="finger_host">
+                          <widget class="GtkLabel" id="finger_host_label">
                             <property name="visible">True</property>
-                            <property name="items" translatable="yes">Host</property>
-                            <child internal-child="entry">
-                              <widget class="GtkEntry" id="comboboxentry-entry6">
-                              </widget>
-                            </child>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">_Network address:</property>
+                            <property name="use_underline">True</property>
                           </widget>
                           <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
                             <property name="top_attach">1</property>
                             <property name="bottom_attach">2</property>
                             <property name="x_options">GTK_FILL</property>
-                            <property name="y_options">GTK_FILL</property>
+                            <property name="y_options"></property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkLabel" id="finger_user_label">
+                            <property name="visible">True</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">_Username:</property>
+                            <property name="use_underline">True</property>
+                          </widget>
+                          <packing>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"></property>
                           </packing>
                         </child>
                       </widget>

Modified: trunk/src/main.c
==============================================================================
--- trunk/src/main.c	(original)
+++ trunk/src/main.c	Tue Dec  9 14:09:46 2008
@@ -55,7 +55,7 @@
 {
 	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 @@
 			  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));



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