changeset 788:0e7ab0a51ddd

2006-7-28 Brian Masney <masneyb@gftp.org> * src/gtk/gftp-gtk.c src/gtk/gftp-gtk.h src/gtk/misc-gtk.c - warning fixes when creating the system menus. Removed some unused global variables.
author masneyb
date Fri, 28 Jul 2006 11:20:05 +0000
parents 3751478bb260
children afe56dd107ca
files ChangeLog src/gtk/gftp-gtk.c src/gtk/gftp-gtk.h src/gtk/misc-gtk.c
diffstat 4 files changed, 15 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Jul 28 01:44:54 2006 +0000
+++ b/ChangeLog	Fri Jul 28 11:20:05 2006 +0000
@@ -1,3 +1,8 @@
+2006-7-28 Brian Masney <masneyb@gftp.org>
+	* src/gtk/gftp-gtk.c src/gtk/gftp-gtk.h src/gtk/misc-gtk.c - warning
+	fixes when creating the system menus. Removed some unused global
+	variables.
+
 2006-7-27 Brian Masney <masneyb@gftp.org>
 	* lib/protocols.c (gftp_get_all_subdirs) - split this function into
 	several smaller functions. Added support for getting the true file
@@ -3496,7 +3501,7 @@
 
 	* cvsclean - added this script
 
-	* *.[ch] - added $Id: ChangeLog,v 1.457 2006/07/28 01:44:52 masneyb Exp $ tags
+	* *.[ch] - added $Id: ChangeLog,v 1.458 2006/07/28 11:20:04 masneyb Exp $ tags
 
 	* debian/* - updated files from Debian maintainer
 
--- a/src/gtk/gftp-gtk.c	Fri Jul 28 01:44:54 2006 +0000
+++ b/src/gtk/gftp-gtk.c	Fri Jul 28 11:20:05 2006 +0000
@@ -33,7 +33,7 @@
 #if GTK_MAJOR_VERSION > 1
 GtkTextMark * logwdw_textmark;
 #endif
-int local_start, remote_start, trans_start, log_start, tools_start;
+int local_start, remote_start, trans_start;
 GHashTable * graphic_hash_table = NULL;
 GtkItemFactoryEntry * menus = NULL;
 GtkItemFactory * factory = NULL;
@@ -236,7 +236,7 @@
 static GtkWidget *
 CreateMenus (GtkWidget * parent)
 {
-  int local_len, remote_len, len, i, trans_len, log_len, tools_len;
+  int local_len, remote_len, len, i, trans_len, log_len, tools_len, log_start;
   GtkAccelGroup *accel_group;
   intptr_t ascii_transfers;
   GtkWidget * tempwid;
@@ -248,9 +248,9 @@
     {N_("/FTP/Window _2"), NULL, change_setting, GFTP_MENU_ITEM_WIN2,
      MN_("/FTP/Window 1")},
     {N_("/FTP/sep"), NULL, 0, 0, MN_("<Separator>")},
-    {N_("/FTP/_Ascii"), NULL, change_setting, GFTP_MENU_ITEM_ASCII,
+    {N_("/FTP/Ascii"), NULL, change_setting, GFTP_MENU_ITEM_ASCII,
      MN_("<RadioItem>")},
-    {N_("/FTP/_Binary"), NULL, change_setting, GFTP_MENU_ITEM_BINARY,
+    {N_("/FTP/Binary"), NULL, change_setting, GFTP_MENU_ITEM_BINARY,
      MN_("/FTP/Ascii")},
     {N_("/FTP/sep"), NULL, 0, 0, MN_("<Separator>")},
     {N_("/FTP/_Preferences..."), NULL, options_dialog, 0,
@@ -378,7 +378,6 @@
 
   i += log_len;
   /* Tools Menu */
-  tools_start = i;
   tools_len = 4;
   create_item_factory (factory, tools_len, menu_items + i, NULL);
 
@@ -393,16 +392,16 @@
   gftp_lookup_global_option ("ascii_transfers", &ascii_transfers);
   if (ascii_transfers)
     {
-      tempwid = gtk_item_factory_get_widget (factory, menu_items[5].path);
+      tempwid = gtk_item_factory_get_widget (factory, "/FTP/Ascii");
       gtk_check_menu_item_set_state (GTK_CHECK_MENU_ITEM (tempwid), TRUE);
     }
   else
     {
-      tempwid = gtk_item_factory_get_widget (factory, menu_items[6].path);
+      tempwid = gtk_item_factory_get_widget (factory, "/FTP/Binary");
       gtk_check_menu_item_set_state (GTK_CHECK_MENU_ITEM (tempwid), TRUE);
     }
 
-  tempwid = gtk_item_factory_get_widget (factory, menu_items[3].path);
+  tempwid = gtk_item_factory_get_widget (factory, "/FTP/Window 2");
   gtk_check_menu_item_set_state (GTK_CHECK_MENU_ITEM (tempwid), TRUE);
 
   window1.ifactory = item_factory_new (GTK_TYPE_MENU, "<local>", NULL, "/Local");
--- a/src/gtk/gftp-gtk.h	Fri Jul 28 01:44:54 2006 +0000
+++ b/src/gtk/gftp-gtk.h	Fri Jul 28 11:20:05 2006 +0000
@@ -186,7 +186,7 @@
 #if GTK_MAJOR_VERSION > 1
 extern GtkTextMark * logwdw_textmark;
 #endif
-extern int local_start, remote_start, trans_start, log_start, tools_start;
+extern int local_start, remote_start, trans_start;
 extern GHashTable * graphic_hash_table;
 extern GtkItemFactoryEntry * menus;
 extern GtkItemFactory * factory;
--- a/src/gtk/misc-gtk.c	Fri Jul 28 01:44:54 2006 +0000
+++ b/src/gtk/misc-gtk.c	Fri Jul 28 11:20:05 2006 +0000
@@ -263,7 +263,7 @@
   update_window (&window1);
   update_window (&window2);
 
-  tempwid = gtk_item_factory_get_widget (factory, menus[tools_start+2].path);
+  tempwid = gtk_item_factory_get_widget (factory, "/Tools/Compare Windows");
   gtk_widget_set_sensitive (tempwid, GFTP_IS_CONNECTED (window1.request) 
 			    && GFTP_IS_CONNECTED (window2.request));
 }