| 1 |
// ---------------------------------------------------------------------------- |
| 2 |
// Copyright (C) 2014 |
| 3 |
// David Freese, W1HKJ |
| 4 |
// |
| 5 |
// This file is part of flmsg |
| 6 |
// |
| 7 |
// flrig is free software; you can redistribute it and/or modify |
| 8 |
// it under the terms of the GNU General Public License as published by |
| 9 |
// the Free Software Foundation; either version 3 of the License, or |
| 10 |
// (at your option) any later version. |
| 11 |
// |
| 12 |
// flrig is distributed in the hope that it will be useful, |
| 13 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
// GNU General Public License for more details. |
| 16 |
// |
| 17 |
// You should have received a copy of the GNU General Public License |
| 18 |
// along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 19 |
// ---------------------------------------------------------------------------- |
| 20 |
|
| 21 |
#include "gettext.h" |
| 22 |
#include "status.h" |
| 23 |
#include "util.h" |
| 24 |
|
| 25 |
#include "flmsg_dialog.h" |
| 26 |
#include "flmsg.h" |
| 27 |
#include "transfer.h" |
| 28 |
#include "combo.h" |
| 29 |
|
| 30 |
Fl_Group *tab_transfer = (Fl_Group *)0; |
| 31 |
|
| 32 |
Fl_Button *btn_select_send = (Fl_Button *)0; |
| 33 |
Fl_Button *btn_open_rcvd = (Fl_Button *)0; |
| 34 |
|
| 35 |
Fl_Output *txt_send_filename = (Fl_Output *)0; |
| 36 |
Fl_Hold_Browser *brws_xfr_filenames = (Fl_Hold_Browser *)0; |
| 37 |
|
| 38 |
static void cb_btn_select_send(Fl_Button*, void*) { |
| 39 |
cb_transfer_open(); |
| 40 |
} |
| 41 |
|
| 42 |
static void cb_btn_open_rcvd(Fl_Button*, void*) { |
| 43 |
cb_transfer_open_as(); |
| 44 |
} |
| 45 |
|
| 46 |
void create_transfer_tab() |
| 47 |
{ |
| 48 |
tab_transfer = new Fl_Group(0, tab_top, 570, 430 - tab_top); |
| 49 |
tab_transfer->align(FL_ALIGN_TOP); |
| 50 |
|
| 51 |
txt_send_filename = new Fl_Output(5, tab_top + 40, 485, 24, _("Transmit file:")); |
| 52 |
txt_send_filename->align(FL_ALIGN_TOP_LEFT); |
| 53 |
txt_send_filename->tooltip(""); |
| 54 |
|
| 55 |
btn_select_send = new Fl_Button(495, tab_top + 40, 70, 24, _("Select")); |
| 56 |
btn_select_send->tooltip(_("Select data file to transfer")); |
| 57 |
btn_select_send->callback((Fl_Callback*)cb_btn_select_send); |
| 58 |
|
| 59 |
brws_xfr_filenames = new Fl_Hold_Browser( |
| 60 |
5, tab_top + 110, |
| 61 |
560, 260, _("Received files:")); |
| 62 |
brws_xfr_filenames->align(FL_ALIGN_TOP_LEFT); |
| 63 |
brws_xfr_filenames->tooltip("Select file to open"); |
| 64 |
|
| 65 |
btn_open_rcvd = new Fl_Button(495, tab_top + 80, 70, 24, _("Open")); |
| 66 |
btn_open_rcvd->tooltip(_("Open received file")); |
| 67 |
btn_open_rcvd->callback((Fl_Callback*)cb_btn_open_rcvd); |
| 68 |
|
| 69 |
tab_transfer->end(); |
| 70 |
tab_transfer->hide(); |
| 71 |
} |
| 72 |
|