changeset 677:8990a8a26ccf

2005-1-24 Brian Masney <masneyb@gftp.org> * lib/protocols.c lib/rfc959.c src/gtk/dnd.c src/gtk/gftp-gtk.c src/gtk/gtkui.c src/gtk/menu-items.c src/gtk/misc-gtk.c src/gtk/transfer.c src/gtk/view-dialog.c src/uicommon/gftpui.c - make sure the logging level gftp_logging_error is used for all error messages
author masneyb
date Tue, 25 Jan 2005 02:34:19 +0000
parents 72a6de68d9c8
children f7cad3bdd390
files ChangeLog lib/protocols.c lib/rfc959.c src/gtk/dnd.c src/gtk/gftp-gtk.c src/gtk/gtkui.c src/gtk/menu-items.c src/gtk/misc-gtk.c src/gtk/transfer.c src/gtk/view_dialog.c src/uicommon/gftpui.c
diffstat 11 files changed, 42 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Jan 25 01:55:01 2005 +0000
+++ b/ChangeLog	Tue Jan 25 02:34:19 2005 +0000
@@ -1,4 +1,9 @@
 2005-1-24 Brian Masney <masneyb@gftp.org>
+	* lib/protocols.c lib/rfc959.c src/gtk/dnd.c src/gtk/gftp-gtk.c 
+	src/gtk/gtkui.c src/gtk/menu-items.c src/gtk/misc-gtk.c
+	src/gtk/transfer.c src/gtk/view-dialog.c src/uicommon/gftpui.c - make
+	sure the logging level gftp_logging_error is used for all error messages
+
 	* lib/protocols.c (gftp_parse_url) - rewrote the URL parser so that the
 	URL is parsed from right to left instead of left to right. There are
 	more checks done to the URL.
@@ -3251,7 +3256,7 @@
 
 	* cvsclean - added this script
 
-	* *.[ch] - added $Id: ChangeLog,v 1.398 2005/01/25 01:55:01 masneyb Exp $ tags
+	* *.[ch] - added $Id: ChangeLog,v 1.399 2005/01/25 02:34:18 masneyb Exp $ tags
 
 	* debian/* - updated files from Debian maintainer
 
--- a/lib/protocols.c	Tue Jan 25 01:55:01 2005 +0000
+++ b/lib/protocols.c	Tue Jan 25 02:34:19 2005 +0000
@@ -375,7 +375,7 @@
   if (locret == NULL)
     {
       locret = setlocale (LC_TIME, NULL);
-      request->logging_function (gftp_logging_misc, request,
+      request->logging_function (gftp_logging_error, request,
                                  _("Error setting LC_TIME to '%s'. Falling back to '%s'\n"),
                                  remote_lc_time, locret);
     }
@@ -822,7 +822,7 @@
 
       if (gftp_protocols[i].url_prefix == NULL)
         {
-          request->logging_function (gftp_logging_misc, NULL, 
+          request->logging_function (gftp_logging_error, NULL, 
                                      _("The protocol '%s' is currently not supported.\n"),
                                      new_url);
           g_free (new_url);
@@ -849,7 +849,7 @@
 
       if (gftp_protocols[i].url_prefix == NULL)
         {
-          request->logging_function (gftp_logging_misc, NULL, 
+          request->logging_function (gftp_logging_error, NULL, 
                                      _("The protocol '%s' is currently not supported.\n"),
                                      default_protocol);
           g_free (new_url);
--- a/lib/rfc959.c	Tue Jan 25 01:55:01 2005 +0000
+++ b/lib/rfc959.c	Tue Jan 25 02:34:19 2005 +0000
@@ -711,7 +711,7 @@
 #endif
 
           pos = (char *) &data_addr.sin_addr;
-          request->logging_function (gftp_logging_misc, request,
+          request->logging_function (gftp_logging_error, request,
                _("Ignoring IP address in PASV response, connecting to %d.%d.%d.%d:%d\n"),
                pos[0] & 0xff, pos[1] & 0xff, pos[2] & 0xff, pos[3] & 0xff,
                ntohs (data_addr.sin_port));
--- a/src/gtk/dnd.c	Tue Jan 25 01:55:01 2005 +0000
+++ b/src/gtk/dnd.c	Tue Jan 25 02:34:19 2005 +0000
@@ -118,7 +118,7 @@
 {
   if (current_wdata->request->stopable)
     {
-      ftp_log (gftp_logging_misc, NULL,
+      ftp_log (gftp_logging_error, NULL,
                _("%s: Please hit the stop button first to do anything else\n"),
                _("Connect"));
       return;
--- a/src/gtk/gftp-gtk.c	Tue Jan 25 01:55:01 2005 +0000
+++ b/src/gtk/gftp-gtk.c	Tue Jan 25 02:34:19 2005 +0000
@@ -209,7 +209,7 @@
 
   if (current_wdata->request->stopable)
     {
-      ftp_log (gftp_logging_misc, NULL,
+      ftp_log (gftp_logging_error, NULL,
                _("%s: Please hit the stop button first to do anything else\n"),
                _("OpenURL"));
       return;
@@ -1059,7 +1059,7 @@
 
   if (current_wdata->request->stopable)
     {
-      ftp_log (gftp_logging_misc, NULL,
+      ftp_log (gftp_logging_error, NULL,
                _("%s: Please hit the stop button first to do anything else\n"),
                _("Connect"));
       return;
--- a/src/gtk/gtkui.c	Tue Jan 25 01:55:01 2005 +0000
+++ b/src/gtk/gtkui.c	Tue Jan 25 02:34:19 2005 +0000
@@ -270,7 +270,7 @@
       edttext = gtk_entry_get_text (GTK_ENTRY (ddata->edit));
       if (*edttext == '\0')
         {
-          ftp_log (gftp_logging_misc, NULL,
+          ftp_log (gftp_logging_error, NULL,
                    _("Operation canceled...you must enter a string\n"));
           return;
         }
--- a/src/gtk/menu-items.c	Tue Jan 25 01:55:01 2005 +0000
+++ b/src/gtk/menu-items.c	Tue Jan 25 02:34:19 2005 +0000
@@ -33,7 +33,7 @@
   edttext = gtk_entry_get_text (GTK_ENTRY (ddata->edit));
   if (*edttext == '\0')
     {
-      ftp_log (gftp_logging_misc, NULL,
+      ftp_log (gftp_logging_error, NULL,
                _("Change Filespec: Operation canceled...you must enter a string\n"));
       return;
     }
@@ -101,7 +101,7 @@
   filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION (str->filew));
   if ((fd = fopen (filename, "w")) == NULL)
     {
-      ftp_log (gftp_logging_misc, NULL, 
+      ftp_log (gftp_logging_error, NULL, 
                _("Error: Cannot open %s for writing: %s\n"), filename, 
                g_strerror (errno));
       return;
@@ -309,7 +309,7 @@
   tempstr = g_strconcat (g_get_tmp_dir (), "/gftp-view.XXXXXXXXXX", NULL);
   if ((fd = mkstemp (tempstr)) < 0)
     {
-      ftp_log (gftp_logging_misc, NULL, 
+      ftp_log (gftp_logging_error, NULL, 
                _("Error: Cannot open %s for writing: %s\n"), tempstr, 
                g_strerror (errno));
       g_free (tempstr); 
@@ -337,7 +337,7 @@
     {
       if ((len = write (fd, pos, textlen)) == -1)
         { 
-          ftp_log (gftp_logging_misc, NULL, 
+          ftp_log (gftp_logging_error, NULL, 
                    _("Error: Error writing to %s: %s\n"), 
                    tempstr, g_strerror (errno));
           break;
@@ -373,7 +373,7 @@
   filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs));
   if ((fd = fopen (filename, "w")) == NULL)
     {
-      ftp_log (gftp_logging_misc, NULL, 
+      ftp_log (gftp_logging_error, NULL, 
                _("Error: Cannot open %s for writing: %s\n"), filename, 
                g_strerror (errno));
       return;
@@ -401,7 +401,7 @@
       if ((len = write (fileno (fd), pos, textlen)) == -1)
         {
           ok = 0;
-          ftp_log (gftp_logging_misc, NULL, 
+          ftp_log (gftp_logging_error, NULL, 
                    _("Error: Error writing to %s: %s\n"), 
                    filename, g_strerror (errno));
           break;
--- a/src/gtk/misc-gtk.c	Tue Jan 25 01:55:01 2005 +0000
+++ b/src/gtk/misc-gtk.c	Tue Jan 25 02:34:19 2005 +0000
@@ -508,7 +508,7 @@
 
   if (wdata->request->stopable)
     {
-      ftp_log (gftp_logging_misc, NULL,
+      ftp_log (gftp_logging_error, NULL,
 	       _("%s: Please hit the stop button first to do anything else\n"),
 	       name);
       return (0);
@@ -516,7 +516,7 @@
 
   if (check_other_stop && owdata->request->stopable)
     {
-      ftp_log (gftp_logging_misc, NULL,
+      ftp_log (gftp_logging_error, NULL,
 	       _("%s: Please hit the stop button first to do anything else\n"),
 	       name);
       return (0);
@@ -524,14 +524,14 @@
 
   if (!GFTP_IS_CONNECTED (wdata->request))
     {
-      ftp_log (gftp_logging_misc, NULL,
+      ftp_log (gftp_logging_error, NULL,
 	       _("%s: Not connected to a remote site\n"), name);
       return (0);
     }
 
   if (!func)
     {
-      ftp_log (gftp_logging_misc, NULL,
+      ftp_log (gftp_logging_error, NULL,
 	       _("%s: This feature is not available using this protocol\n"),
 	       name);
       return (0);
@@ -539,14 +539,14 @@
 
   if (only_one && !IS_ONE_SELECTED (wdata))
     {
-      ftp_log (gftp_logging_misc, NULL,
+      ftp_log (gftp_logging_error, NULL,
 	       _("%s: You must only have one item selected\n"), name);
       return (0);
     }
 
   if (at_least_one && !only_one && IS_NONE_SELECTED (wdata))
     {
-      ftp_log (gftp_logging_misc, NULL,
+      ftp_log (gftp_logging_error, NULL,
 	       _("%s: You must have at least one item selected\n"), name);
       return (0);
     }
--- a/src/gtk/transfer.c	Tue Jan 25 01:55:01 2005 +0000
+++ b/src/gtk/transfer.c	Tue Jan 25 02:34:19 2005 +0000
@@ -95,7 +95,7 @@
   if (!GFTP_IS_CONNECTED (fromwdata->request) || 
       !GFTP_IS_CONNECTED (towdata->request))
     {
-      ftp_log (gftp_logging_misc, NULL,
+      ftp_log (gftp_logging_error, NULL,
                _("Retrieve Files: Not connected to a remote site\n"));
       return;
     }
@@ -879,7 +879,7 @@
 
   if (GTK_CLIST (dlwdw)->selection == NULL)
     {
-      ftp_log (gftp_logging_misc, NULL,
+      ftp_log (gftp_logging_error, NULL,
 	       _("There are no file transfers selected\n"));
       return;
     }
@@ -901,7 +901,7 @@
 
   if (GTK_CLIST (dlwdw)->selection == NULL)
     {
-      ftp_log (gftp_logging_misc, NULL,
+      ftp_log (gftp_logging_error, NULL,
 	      _("There are no file transfers selected\n"));
       return;
     }
@@ -935,7 +935,7 @@
 
   if (GTK_CLIST (dlwdw)->selection == NULL)
     {
-      ftp_log (gftp_logging_misc, NULL,
+      ftp_log (gftp_logging_error, NULL,
 	      _("There are no file transfers selected\n"));
       return;
     }
@@ -975,7 +975,7 @@
 
   if (GTK_CLIST (dlwdw)->selection == NULL)
     {
-      ftp_log (gftp_logging_misc, NULL,
+      ftp_log (gftp_logging_error, NULL,
               _("There are no file transfers selected\n"));
       return;
     }
@@ -1028,7 +1028,7 @@
 
   if (GTK_CLIST (dlwdw)->selection == NULL)
     {
-      ftp_log (gftp_logging_misc, NULL,
+      ftp_log (gftp_logging_error, NULL,
 	      _("There are no file transfers selected\n"));
       return;
     }
@@ -1088,7 +1088,7 @@
 
   if (GTK_CLIST (dlwdw)->selection == NULL)
     {
-      ftp_log (gftp_logging_misc, NULL,
+      ftp_log (gftp_logging_error, NULL,
 	      _("There are no file transfers selected\n"));
       return;
     }
--- a/src/gtk/view_dialog.c	Tue Jan 25 01:55:01 2005 +0000
+++ b/src/gtk/view_dialog.c	Tue Jan 25 02:34:19 2005 +0000
@@ -44,7 +44,7 @@
 
   if (S_ISDIR (curfle->st_mode))
     {
-      ftp_log (gftp_logging_misc, NULL,
+      ftp_log (gftp_logging_error, NULL,
 	       _("View: %s is a directory. Cannot view it.\n"), curfle->file);
       return;
     }
@@ -72,7 +72,7 @@
 		
       if (new_fle->fd < 0)
         {
-          ftp_log (gftp_logging_misc, NULL, 
+          ftp_log (gftp_logging_error, NULL, 
                    _("Error: Cannot open %s for writing: %s\n"),  
                    new_fle->destfile, g_strerror (errno));
           gftp_file_destroy (new_fle, 1);
@@ -110,7 +110,7 @@
 
   if (*edit_program == '\0')
     {
-      ftp_log (gftp_logging_misc, NULL,
+      ftp_log (gftp_logging_error, NULL,
 	       _("Edit: You must specify an editor in the options dialog\n"));
       return;
     }
@@ -123,7 +123,7 @@
 
   if (S_ISDIR (curfle->st_mode))
     {
-      ftp_log (gftp_logging_misc, NULL,
+      ftp_log (gftp_logging_error, NULL,
 	       _("Edit: %s is a directory. Cannot edit it.\n"), curfle->file);
       return;
     }
@@ -151,7 +151,7 @@
 
       if (new_fle->fd < 0)
         {
-          ftp_log (gftp_logging_misc, NULL, 
+          ftp_log (gftp_logging_error, NULL, 
                    _("Error: Cannot open %s for writing: %s\n"),
                    new_fle->destfile, g_strerror (errno));
           gftp_file_destroy (new_fle, 1);
@@ -309,7 +309,7 @@
     {
       if ((fd = open (filename, O_RDONLY)) < 0)
         {
-          ftp_log (gftp_logging_misc, NULL, 
+          ftp_log (gftp_logging_error, NULL, 
                    _("View: Cannot open file %s: %s\n"), filename, 
                    g_strerror (errno));
           return;
--- a/src/uicommon/gftpui.c	Tue Jan 25 01:55:01 2005 +0000
+++ b/src/uicommon/gftpui.c	Tue Jan 25 02:34:19 2005 +0000
@@ -87,7 +87,7 @@
             break;
 
           cdata->retries--;
-          cdata->request->logging_function (gftp_logging_misc, cdata->request,
+          cdata->request->logging_function (gftp_logging_error, cdata->request,
                        _("Waiting %d seconds until trying to connect again\n"),
                        sleep_time);
           alarm (sleep_time);
@@ -1370,7 +1370,7 @@
       if (!GFTP_IS_CONNECTED (tdata->fromreq) ||
           !GFTP_IS_CONNECTED (tdata->toreq))
         {
-          tdata->fromreq->logging_function (gftp_logging_misc,
+          tdata->fromreq->logging_function (gftp_logging_error,
                          tdata->fromreq,
                          _("Error: Remote site disconnected after trying to transfer file\n"));
         }
@@ -1438,7 +1438,7 @@
         }
       else if (num_read < 0)
         {
-          tdata->fromreq->logging_function (gftp_logging_misc,
+          tdata->fromreq->logging_function (gftp_logging_error,
                                         tdata->fromreq,
                                         _("Could not download %s from %s\n"),
                                         curfle->file,