[gnome-network] misc nettool patch



Hi,

This fixes a few issues with nettool.

OK to commit?

Jon
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-nettool/ChangeLog,v
retrieving revision 1.34
diff -p -u -r1.34 ChangeLog
--- ChangeLog	14 Jun 2004 10:08:35 -0000	1.34
+++ ChangeLog	29 Jun 2004 16:27:20 -0000
@@ -1,3 +1,28 @@
+2004-06-29  William Jon McCann  <mccann jhu edu>
+
+	* src/callbacks.c (on_about_activate): Update copyright date.
+
+	* src/gnome-nettool.glade: Use sentence capitalization for combobox
+	labels.  Make network device combobox expand to fill space.  Make
+	statistics text not expand to fill space.  Remove redundant verb
+	from ping radio button label.  Fixes #144393.
+	
+	* src/gnome-nettool.glade: 
+	* src/main.c (load_ping_widgets_from_xml) 
+	(load_traceroute_widgets_from_xml, load_info_widgets_from_xml) 
+	(load_scan_widgets_from_xml, load_lookup_widgets_from_xml) 
+	(load_finger_widgets_from_xml, load_whois_widgets_from_xml):
+	Activate the combobox when the label mnemonic is used.
+
+	* src/callbacks.c (on_about_activate): 
+	* pixmaps/Makefile.am (pixmaps_DATA): Return the application
+	icon into the pixmap directory so the .desktop file can find it.
+
+2004-06-14  William Jon McCann  <mccann jhu edu>
+
+	* src/callbacks.c (gn_quit_app): Use gboolean type for
+	delete-event handler.
+
 2004-06-14  Fernando Herrera  <fherrera onirica com>
 
 	* src/info.c: (info_get_nic_information), (info_get_interfaces):
Index: pixmaps/Makefile.am
===================================================================
RCS file: /cvs/gnome/gnome-nettool/pixmaps/Makefile.am,v
retrieving revision 1.1
diff -p -u -r1.1 Makefile.am
--- pixmaps/Makefile.am	8 Jun 2004 17:38:16 -0000	1.1
+++ pixmaps/Makefile.am	29 Jun 2004 16:27:20 -0000
@@ -2,9 +2,12 @@ pixmaps_DATA = 16_ethernet.xpm	 \
 	       16_loopback.xpm	 \
 	       16_plip.xpm	 \
 	       16_ppp.xpm	 \
-	       gnome-nettool.png \
 	       irda-16.png	 \
 	       network.png	 \
 	       wavelan-16.png
 
-EXTRA_DIST = $(pixmaps_DATA)
+icondir = $(datadir)/pixmaps
+icon_DATA = gnome-nettool.png
+
+EXTRA_DIST = $(pixmaps_DATA)	 \
+	     $(icon_DATA)
Index: src/callbacks.c
===================================================================
RCS file: /cvs/gnome/gnome-nettool/src/callbacks.c,v
retrieving revision 1.9
diff -p -u -r1.9 callbacks.c
--- src/callbacks.c	10 Jun 2004 23:10:28 -0000	1.9
+++ src/callbacks.c	29 Jun 2004 16:27:20 -0000
@@ -287,7 +287,7 @@ on_whois_activate (GtkWidget * widget, g
 	}
 }
 
-void
+gboolean
 gn_quit_app (GtkWidget * widget, gpointer data)
 {
 	gint status, pid;
@@ -302,6 +302,8 @@ gn_quit_app (GtkWidget * widget, gpointe
 	netinfo_progress_indicator_stop (NULL);
 
 	gtk_main_quit ();
+
+	return FALSE;
 }
 
 void
@@ -322,7 +324,7 @@ on_about_activate (GtkWidget *menu_item,
 
 	parent = (GtkWindow *) data;
 
-	g_sprintf (copyright, "Copyright \xc2\xa9 2003 %s", "Germán Poo Caamaño");
+	g_sprintf (copyright, "Copyright \xc2\xa9 2003-2004 %s", "Germán Poo Caamaño");
 	
 	if (about_box != NULL) {
 		gtk_window_present (GTK_WINDOW (about_box));
@@ -333,7 +335,7 @@ on_about_activate (GtkWidget *menu_item,
 	{
 		gchar *filename = NULL;
                                                                                 
-		filename = g_build_filename (PIXMAPS_DIR, "gnome-nettool.png", NULL);
+		filename = g_build_filename (GNOME_ICONDIR, "gnome-nettool.png", NULL);
 		if (filename != NULL) {
 			pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
 			g_free (filename);
Index: src/callbacks.h
===================================================================
RCS file: /cvs/gnome/gnome-nettool/src/callbacks.h,v
retrieving revision 1.4
diff -p -u -r1.4 callbacks.h
--- src/callbacks.h	10 Jun 2004 23:10:28 -0000	1.4
+++ src/callbacks.h	29 Jun 2004 16:27:20 -0000
@@ -21,7 +21,7 @@ void on_whois_activate (GtkWidget * edit
 void on_configure_button_clicked (GtkButton * widget, gpointer data);
 
 /* General stuff */
-void gn_quit_app (GtkWidget * widget, gpointer data);
+gboolean gn_quit_app (GtkWidget * widget, gpointer data);
 
 void on_about_activate (GtkWidget *menu_item, gpointer data);
 
Index: src/gnome-nettool.glade
===================================================================
RCS file: /cvs/gnome/gnome-nettool/src/gnome-nettool.glade,v
retrieving revision 1.11
diff -p -u -r1.11 gnome-nettool.glade
--- src/gnome-nettool.glade	10 Jun 2004 23:10:28 -0000	1.11
+++ src/gnome-nettool.glade	29 Jun 2004 16:27:20 -0000
@@ -151,9 +151,9 @@
 		  <property name="spacing">12</property>
 
 		  <child>
-		    <widget class="GtkLabel" id="label118">
+		    <widget class="GtkLabel" id="info_combo_label">
 		      <property name="visible">True</property>
-		      <property name="label" translatable="yes">_Network Device</property>
+		      <property name="label" translatable="yes">_Network device:</property>
 		      <property name="use_underline">True</property>
 		      <property name="use_markup">False</property>
 		      <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -177,7 +177,7 @@
 		    </widget>
 		    <packing>
 		      <property name="padding">0</property>
-		      <property name="expand">False</property>
+		      <property name="expand">True</property>
 		      <property name="fill">True</property>
 		    </packing>
 		  </child>
@@ -337,7 +337,7 @@
 	      <child>
 		<widget class="GtkHBox" id="hbox_info_detail">
 		  <property name="visible">True</property>
-		  <property name="homogeneous">True</property>
+		  <property name="homogeneous">False</property>
 		  <property name="spacing">4</property>
 
 		  <child>
@@ -1281,7 +1281,8 @@
 		<packing>
 		  <property name="padding">0</property>
 		  <property name="expand">False</property>
-		  <property name="fill">True</property>
+		  <property name="fill">False</property>
+		  <property name="pack_type">GTK_PACK_END</property>
 		</packing>
 	      </child>
 	    </widget>
@@ -1334,9 +1335,9 @@
 		      <property name="column_spacing">6</property>
 
 		      <child>
-			<widget class="GtkLabel" id="label108">
+			<widget class="GtkLabel" id="ping_host_label">
 			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">_Network Address: </property>
+			  <property name="label" translatable="yes">_Network address:</property>
 			  <property name="use_underline">True</property>
 			  <property name="use_markup">False</property>
 			  <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -1374,7 +1375,7 @@
 		      <child>
 			<widget class="GtkLabel" id="label109">
 			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Send: </property>
+			  <property name="label" translatable="yes">Send:</property>
 			  <property name="use_underline">False</property>
 			  <property name="use_markup">False</property>
 			  <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -1477,7 +1478,7 @@
 			    <widget class="GtkRadioButton" id="ping_unlimited">
 			      <property name="visible">True</property>
 			      <property name="can_focus">True</property>
-			      <property name="label" translatable="yes">Send unlimited requests</property>
+			      <property name="label" translatable="yes">Unlimited requests</property>
 			      <property name="use_underline">True</property>
 			      <property name="relief">GTK_RELIEF_NORMAL</property>
 			      <property name="focus_on_click">True</property>
@@ -1905,7 +1906,7 @@
 		    </widget>
 		    <packing>
 		      <property name="padding">0</property>
-		      <property name="expand">True</property>
+		      <property name="expand">False</property>
 		      <property name="fill">True</property>
 		    </packing>
 		  </child>
@@ -2108,7 +2109,7 @@
 		    </widget>
 		    <packing>
 		      <property name="padding">0</property>
-		      <property name="expand">True</property>
+		      <property name="expand">False</property>
 		      <property name="fill">True</property>
 		    </packing>
 		  </child>
@@ -2116,7 +2117,8 @@
 		<packing>
 		  <property name="padding">0</property>
 		  <property name="expand">False</property>
-		  <property name="fill">True</property>
+		  <property name="fill">False</property>
+		  <property name="pack_type">GTK_PACK_END</property>
 		</packing>
 	      </child>
 	    </widget>
@@ -2163,12 +2165,12 @@
 		    <widget class="GtkHBox" id="hbox43">
 		      <property name="visible">True</property>
 		      <property name="homogeneous">False</property>
-		      <property name="spacing">0</property>
+		      <property name="spacing">6</property>
 
 		      <child>
 			<widget class="GtkLabel" id="label110">
 			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">Display: </property>
+			  <property name="label" translatable="yes">Display:</property>
 			  <property name="use_underline">False</property>
 			  <property name="use_markup">False</property>
 			  <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -2259,7 +2261,7 @@
 		      </child>
 		    </widget>
 		    <packing>
-		      <property name="padding">0</property>
+		      <property name="padding">4</property>
 		      <property name="expand">True</property>
 		      <property name="fill">True</property>
 		    </packing>
@@ -2429,9 +2431,9 @@
 		      <property name="spacing">6</property>
 
 		      <child>
-			<widget class="GtkLabel" id="label111">
+			<widget class="GtkLabel" id="traceroute_host_label">
 			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">_Network Address: </property>
+			  <property name="label" translatable="yes">_Network address:</property>
 			  <property name="use_underline">True</property>
 			  <property name="use_markup">False</property>
 			  <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -2632,9 +2634,9 @@
 		      <property name="spacing">6</property>
 
 		      <child>
-			<widget class="GtkLabel" id="label112">
+			<widget class="GtkLabel" id="scan_host_label">
 			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">_Network Address: </property>
+			  <property name="label" translatable="yes">_Network address:</property>
 			  <property name="use_underline">True</property>
 			  <property name="use_markup">False</property>
 			  <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -2838,9 +2840,9 @@
 		      <property name="column_spacing">6</property>
 
 		      <child>
-			<widget class="GtkLabel" id="label113">
+			<widget class="GtkLabel" id="lookup_host_label">
 			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">_Network Address: </property>
+			  <property name="label" translatable="yes">_Network address:</property>
 			  <property name="use_underline">True</property>
 			  <property name="use_markup">False</property>
 			  <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -2876,9 +2878,9 @@
 		      </child>
 
 		      <child>
-			<widget class="GtkLabel" id="label114">
+			<widget class="GtkLabel" id="lookup_type_label">
 			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">_Information Type: </property>
+			  <property name="label" translatable="yes">_Information type:</property>
 			  <property name="use_underline">True</property>
 			  <property name="use_markup">False</property>
 			  <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -3087,9 +3089,9 @@
 		      <property name="column_spacing">6</property>
 
 		      <child>
-			<widget class="GtkLabel" id="label115">
+			<widget class="GtkLabel" id="finger_user_label">
 			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">_Username: </property>
+			  <property name="label" translatable="yes">_Username:</property>
 			  <property name="use_underline">True</property>
 			  <property name="use_markup">False</property>
 			  <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -3111,9 +3113,9 @@
 		      </child>
 
 		      <child>
-			<widget class="GtkLabel" id="label116">
+			<widget class="GtkLabel" id="finger_host_label">
 			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">_Network Address: </property>
+			  <property name="label" translatable="yes">_Network address:</property>
 			  <property name="use_underline">True</property>
 			  <property name="use_markup">False</property>
 			  <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -3343,9 +3345,9 @@
 		      <property name="spacing">6</property>
 
 		      <child>
-			<widget class="GtkLabel" id="label117">
+			<widget class="GtkLabel" id="whois_host_label">
 			  <property name="visible">True</property>
-			  <property name="label" translatable="yes">_Domain Address: </property>
+			  <property name="label" translatable="yes">_Domain address:</property>
 			  <property name="use_underline">True</property>
 			  <property name="use_markup">False</property>
 			  <property name="justify">GTK_JUSTIFY_LEFT</property>
Index: src/main.c
===================================================================
RCS file: /cvs/gnome/gnome-nettool/src/main.c,v
retrieving revision 1.9
diff -p -u -r1.9 main.c
--- src/main.c	10 Jun 2004 23:10:28 -0000	1.9
+++ src/main.c	29 Jun 2004 16:27:20 -0000
@@ -257,6 +257,7 @@ load_ping_widgets_from_xml (GladeXML * x
 {
 	Netinfo *pinger;
 	GtkWidget *vbox_ping;
+	GtkWidget *label;
 	GtkEntry  *entry_host;
 	GtkTreeModel *model;
 	GtkEntryCompletion *completion;
@@ -289,6 +290,9 @@ load_ping_widgets_from_xml (GladeXML * x
 	pinger->packets_loss = glade_xml_get_widget (xml, "ping_packets_loss");
 
 	vbox_ping = glade_xml_get_widget (xml, "vbox_ping");
+
+	label = glade_xml_get_widget (xml, "ping_host_label");
+	gtk_label_set_mnemonic_widget (GTK_LABEL (label), pinger->host);
 	
 	pinger->button_callback = G_CALLBACK (on_ping_activate);
 	pinger->process_line = NETINFO_FOREACH_FUNC (ping_foreach_with_tree);
@@ -329,6 +333,7 @@ load_traceroute_widgets_from_xml (GladeX
 {
 	Netinfo *tracer;
 	GtkWidget *vbox_traceroute;
+	GtkWidget *label;
 	GtkEntry  *entry_host;
 	GtkTreeModel *model;
 	GtkEntryCompletion *completion;
@@ -356,6 +361,9 @@ load_traceroute_widgets_from_xml (GladeX
 	
 	vbox_traceroute = glade_xml_get_widget (xml, "vbox_traceroute");
 
+	label = glade_xml_get_widget (xml, "traceroute_host_label");
+	gtk_label_set_mnemonic_widget (GTK_LABEL (label), tracer->host);
+
 	tracer->button_callback = G_CALLBACK (on_traceroute_activate);
 	tracer->process_line = NETINFO_FOREACH_FUNC (traceroute_foreach_with_tree);
 	tracer->copy_output = NETINFO_COPY_FUNC (traceroute_copy_to_clipboard);
@@ -537,6 +545,9 @@ load_info_widgets_from_xml (GladeXML * x
 	gtk_size_group_add_widget (group, label2);
 	g_object_unref (group);
 
+	label1 = glade_xml_get_widget (xml, "info_combo_label");
+	gtk_label_set_mnemonic_widget (GTK_LABEL (label1), info->combo);
+
 /*
 #ifdef IFCONFIG_PROGRAM
 */
@@ -571,6 +582,7 @@ load_scan_widgets_from_xml (GladeXML * x
 {
 	Netinfo *scan;
 	GtkEntry  *entry_host;
+	GtkWidget *label;
 	GtkTreeModel *model;
 	GtkEntryCompletion *completion;
 
@@ -595,6 +607,9 @@ load_scan_widgets_from_xml (GladeXML * x
 	scan->label_run = _("Scan");
 	scan->label_stop = NULL;
 	
+	label = glade_xml_get_widget (xml, "scan_host_label");
+	gtk_label_set_mnemonic_widget (GTK_LABEL (label), scan->host);
+
 	scan->button_callback = G_CALLBACK (on_scan_activate);
 	scan->copy_output = NETINFO_COPY_FUNC (scan_copy_to_clipboard);
 	scan->process_line = NETINFO_FOREACH_FUNC (scan_foreach);
@@ -678,6 +693,7 @@ load_lookup_widgets_from_xml (GladeXML *
 {
 	Netinfo *lookup;
 	GtkWidget *vbox_lookup;
+	GtkWidget *label;
 	GtkEntry  *entry_host;
 	GtkTreeModel *model;
 	GtkEntryCompletion *completion;
@@ -706,6 +722,11 @@ load_lookup_widgets_from_xml (GladeXML *
 	
 	vbox_lookup = glade_xml_get_widget (xml, "vbox_lookup");
 
+	label = glade_xml_get_widget (xml, "lookup_host_label");
+	gtk_label_set_mnemonic_widget (GTK_LABEL (label), lookup->host);
+	label = glade_xml_get_widget (xml, "lookup_type_label");
+	gtk_label_set_mnemonic_widget (GTK_LABEL (label), lookup->type);
+
 	lookup->button_callback = G_CALLBACK (on_lookup_activate);
 	lookup->process_line = NETINFO_FOREACH_FUNC (lookup_foreach_with_tree);
 	lookup->copy_output = NETINFO_COPY_FUNC (lookup_copy_to_clipboard);
@@ -747,6 +768,7 @@ load_finger_widgets_from_xml (GladeXML *
 {
 	Netinfo *finger;
 	GtkWidget *vbox_finger;
+	GtkWidget *label;
 	PangoFontDescription *font_desc;
 	GtkEntry  *entry_host;
 	GtkTreeModel *model;
@@ -777,6 +799,11 @@ load_finger_widgets_from_xml (GladeXML *
 	
 	vbox_finger = glade_xml_get_widget (xml, "vbox_finger");
 
+	label = glade_xml_get_widget (xml, "finger_user_label");
+	gtk_label_set_mnemonic_widget (GTK_LABEL (label), finger->user);
+	label = glade_xml_get_widget (xml, "finger_host_label");
+	gtk_label_set_mnemonic_widget (GTK_LABEL (label), finger->host);
+
 	font_desc = pango_font_description_new ();
 	pango_font_description_set_family (font_desc, "monospace");
 	gtk_widget_modify_font (finger->output, font_desc);
@@ -845,6 +872,7 @@ load_whois_widgets_from_xml (GladeXML * 
 {
 	Netinfo *whois;
 	GtkWidget *vbox_whois;
+	GtkWidget *label;
 	GtkEntry  *entry_host;
 	GtkTreeModel *model;
 	GtkEntryCompletion *completion;
@@ -873,6 +901,9 @@ load_whois_widgets_from_xml (GladeXML * 
 	whois->multicast = NULL;
 
 	vbox_whois = glade_xml_get_widget (xml, "vbox_whois");
+
+	label = glade_xml_get_widget (xml, "whois_host_label");
+	gtk_label_set_mnemonic_widget (GTK_LABEL (label), whois->host);
 
 	font_desc = pango_font_description_new ();
 	pango_font_description_set_family (font_desc, "monospace");


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