diff src/gtk/misc-gtk.c @ 341:eedc2c5727fa

2003-12-28 Brian Masney <masneyb@gftp.org> **** NOTE: this commit breaks a lot of functionality in gftp. I **** **** still have more work to do on this. Please don't email me **** **** saying that the CVS code is broken. **** * lib/bookmark.c lib/gftp.h lib/local.c lib/options.h lib/rfc2068.c lib/rfc959.c lib/sshv2.c - moved the use_threads option from the request structure over to the protocol declaration in options.h. * lib/options.h src/gtk/gftp-gtk.c - added cmd_in_gui option. When this option is enabled, a new toolbar will be shown in the GTK+ port that will allow you to control the GUI by entering manual commands. * src/Makefile.am - added uicommon directory * src/gtk/Makefile.am src/text/Makefile.am - link in the uicommon library. * src/uicommon/* src/text/gftp-text.c - moved most of the functionality of the text port over to the uicommon directory. Made this code a little more generic so that the GTK+ port can have a text interface associated with it. * src/gtk/gtkui.c src/gtk/gftp-gtk.c src/gtk/mkdir_dialog.c src/gtk/rename_dialog.c src/gtk/menu-items.c src/gtk/misc-gtk.c - started to clean up the callback functions and make them more tightly integrated with the uicommon code. * src/gtk/bookmarks.c src/gtk/chmod_dialog.c src/gtk/delete_dialog.c src/gtk/gftp-gtk.c src/gtk/menu-items.c src/gtk/misc-gtk.c src/gtk/transfer.c - s/refresh/gftpui_refresh/g s/jmp_environment/gftpui_common_jmp_environment/g s/request->use_threads/gftpui_common_use_threads (request)/g * src/gtk/options_dialog.c (apply_changes) - whenever the options are saved, check to see if the command entry needs to be shown or hidden.
author masneyb
date Sun, 28 Dec 2003 16:02:07 +0000
parents 5f9d5aee0c1c
children 2ea37b3c0158
line wrap: on
line diff
--- a/src/gtk/misc-gtk.c	Sat Dec 20 22:00:04 2003 +0000
+++ b/src/gtk/misc-gtk.c	Sun Dec 28 16:02:07 2003 +0000
@@ -206,23 +206,6 @@
 
 
 void
-refresh (gftp_window_data * wdata)
-{
-  if (!check_status (_("Refresh"), wdata, 0, 0, 0, 1))
-    return;
-
-  if (check_reconnect (wdata) < 0) 
-    return;
-
-  gtk_clist_freeze (GTK_CLIST (wdata->listbox));
-  remove_files_window (wdata);
-  gftp_delete_cache_entry (wdata->request, NULL, 0);
-  ftp_list_files (wdata, 0);
-  gtk_clist_thaw (GTK_CLIST (wdata->listbox));
-}
-
-
-void
 update_window_info (void)
 {
   char *tempstr, empty[] = "";
@@ -895,6 +878,9 @@
 #else
   switch (okbutton)
     {
+      case gftp_dialog_button_ok:
+        yes_text = GTK_STOCK_OK;
+        break;
       case gftp_dialog_button_create:
         yes_text = GTK_STOCK_ADD;
         break;
@@ -966,6 +952,9 @@
 #if GTK_MAJOR_VERSION == 1
   switch (okbutton)
     {
+      case gftp_dialog_button_ok:
+        yes_text = GTK_STOCK_OK;
+        break;
       case gftp_dialog_button_create:
         yes_text = _("Add");
         break;
@@ -1168,40 +1157,6 @@
 }
 
 
-void *
-generic_thread (void * (*func) (void *), gftp_window_data * wdata)
-{
-  void * ret;
-
-  if (wdata->request->use_threads)
-    {
-      wdata->request->stopable = 1;
-      gtk_widget_set_sensitive (stop_btn, 1);
-      pthread_create (&wdata->tid, NULL, func, wdata);
-
-      while (wdata->request->stopable)
-        {
-          GDK_THREADS_LEAVE ();
-#if GTK_MAJOR_VERSION == 1
-          g_main_iteration (TRUE);
-#else
-          g_main_context_iteration (NULL, TRUE);
-#endif
-        }
-
-      pthread_join (wdata->tid, &ret);
-      gtk_widget_set_sensitive (stop_btn, 0);
-    }
-  else
-    ret = func (wdata);
-
-  if (!GFTP_IS_CONNECTED (wdata->request))
-    disconnect (wdata);
-
-  return (ret); 
-}
-
-
 int
 progress_timeout (gpointer data)
 {
@@ -1246,18 +1201,6 @@
 }
 
 
-RETSIGTYPE 
-signal_handler (int signo)
-{
-  signal (signo, signal_handler);
-
-  if (use_jmp_environment)
-    siglongjmp (jmp_environment, signo == SIGINT ? 1 : 2);
-  else if (signo == SIGINT)
-    exit (1);
-}
-
-
 char *
 get_xpm_path (char *filename, int quit_on_err)
 {