4 * Copyright (C) 2003 Andreas Monzner <ghost@tuxbox.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 * $Id: software_update.cpp,v 1.5 2005/02/04 17:27:57 ghostrider Exp $
23 #include <software_update.h>
24 #include <flashtool.h>
25 #include <lib/gui/emessage.h>
28 eSoftwareUpdate::eSoftwareUpdate()
29 :eSetupWindow(_("Software Update"), 6, 400)
31 move(ePoint(140, 100));
32 #ifndef DISABLE_NETWORK
34 CONNECT((new eListBoxEntryMenu(&list
, _("Internet Update"), eString().sprintf("(%d) %s", ++entry
, _("open internet update")) ))->selected
, eSoftwareUpdate::internet_update
);
35 CONNECT((new eListBoxEntryMenu(&list
, _("Manual Update"), eString().sprintf("(%d) %s", ++entry
, _("open manual update")) ))->selected
, eSoftwareUpdate::manual_update
);
36 #ifdef ENABLE_FLASHTOOL
37 CONNECT((new eListBoxEntryMenu(&list
, _("Expert Flash Save/Restore"), eString().sprintf("(%d) %s", ++entry
, _("open expert flash tool")) ))->selected
, eSoftwareUpdate::flash_tool
);
42 #ifndef DISABLE_NETWORK
43 void eSoftwareUpdate::internet_update()
48 up
.setLCD(LCDTitle
, LCDElement
);
56 void eSoftwareUpdate::manual_update()
59 eMessageBox
box(_("Upload your Image via FTP or Samba to the '/tmp' folder."
60 "Then rename it to 'root.cramfs' and press ok."
61 "In the upcomming list select 'manual update' and follow the instructions."), _("Manual update"), eMessageBox::iconInfo
|eMessageBox::btOK
);
65 if ( ret
== eMessageBox::btOK
)
69 up
.setLCD(LCDTitle
, LCDElement
);
79 #ifdef ENABLE_FLASHTOOL
80 void eSoftwareUpdate::flash_tool()
85 setup
.setLCD(LCDTitle
, LCDElement
);