Mercurial > gftp.yaz
comparison src/gtk/gftp-gtk.c @ 912:1f9c6baa458c
2007-4-18 Brian Masney <masneyb@gftp.org>
* src/gtk/gftp-gtk.c src/gtk/gtkui.c src/gtk/gftp-gtk.h - added new
function gftp_gtk_init_request(). It will initialize a gftp_request
structure inside the gftp_window_data structure.
* src/gtk/gtkui.c (gftpui_disconnect) - completely free the gftp_request
structure when the user disconnects from the site.
author | masneyb |
---|---|
date | Wed, 18 Apr 2007 23:38:55 +0000 |
parents | 2089f064a360 |
children | f37091406523 |
comparison
equal
deleted
inserted
replaced
911:e0d98c63614d | 912:1f9c6baa458c |
---|---|
760 GFTP_IS_CONNECTED (wdata->request) && IS_ONE_SELECTED (wdata)) | 760 GFTP_IS_CONNECTED (wdata->request) && IS_ONE_SELECTED (wdata)) |
761 list_doaction (wdata); | 761 list_doaction (wdata); |
762 } | 762 } |
763 | 763 |
764 | 764 |
765 void | |
766 gftp_gtk_init_request (gftp_window_data * wdata) | |
767 { | |
768 wdata->request = gftp_request_new (); | |
769 wdata->request->logging_function = ftp_log; | |
770 wdata->filespec = g_malloc0 (2); | |
771 *wdata->filespec = '*'; | |
772 } | |
773 | |
774 | |
765 static GtkWidget * | 775 static GtkWidget * |
766 CreateFTPWindow (gftp_window_data * wdata) | 776 CreateFTPWindow (gftp_window_data * wdata) |
767 { | 777 { |
768 const GtkTargetEntry possible_types[] = { | 778 const GtkTargetEntry possible_types[] = { |
769 {"STRING", 0, 0}, | 779 {"STRING", 0, 0}, |
780 titles[3] = _("User"); | 790 titles[3] = _("User"); |
781 titles[4] = _("Group"); | 791 titles[4] = _("Group"); |
782 titles[5] = _("Date"); | 792 titles[5] = _("Date"); |
783 titles[6] = _("Attribs"); | 793 titles[6] = _("Attribs"); |
784 | 794 |
785 wdata->request = gftp_request_new (); | 795 gftp_gtk_init_request (wdata); |
786 wdata->request->logging_function = ftp_log; | |
787 wdata->filespec = g_malloc0 (2); | |
788 *wdata->filespec = '*'; | |
789 | 796 |
790 parent = gtk_frame_new (NULL); | 797 parent = gtk_frame_new (NULL); |
791 | 798 |
792 gftp_lookup_global_option ("listbox_file_height", &listbox_file_height); | 799 gftp_lookup_global_option ("listbox_file_height", &listbox_file_height); |
793 g_snprintf (tempstr, sizeof (tempstr), "listbox_%s_width", wdata->prefix_col_str); | 800 g_snprintf (tempstr, sizeof (tempstr), "listbox_%s_width", wdata->prefix_col_str); |