summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Ferrare <kevin@rockbox.org>2005-10-30 01:24:35 +0000
committerKevin Ferrare <kevin@rockbox.org>2005-10-30 01:24:35 +0000
commita3ed62b36f4d8e4c118bab5f270aa3d73c8c86ec (patch)
tree170f7f5f8fe3f086d1bbb68843e77a0a8ea4a0ab
parent6934eaf225773b3892897f45a99a792c6aa2756b (diff)
Corrected a bug on archos with buttonbar which was erased when filetree refreshed (mistake introduced in 2005/10/29 commit; Changed some copyrights in the files (I hope this time will be the good one and the last one ! )
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7684 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/gui/buttonbar.c18
-rw-r--r--apps/gui/buttonbar.h2
-rw-r--r--apps/gui/icon.c2
-rw-r--r--apps/gui/icon.h2
-rw-r--r--apps/gui/list.c2
-rw-r--r--apps/gui/list.h2
-rw-r--r--apps/gui/scrollbar.c2
-rw-r--r--apps/gui/scrollbar.h2
-rw-r--r--apps/gui/splash.c2
-rw-r--r--apps/gui/splash.h2
-rw-r--r--apps/gui/statusbar.c2
-rw-r--r--apps/gui/statusbar.h2
-rw-r--r--apps/plugins/starfield.c2
-rw-r--r--apps/screen_access.c5
-rw-r--r--apps/screen_access.h4
15 files changed, 29 insertions, 22 deletions
diff --git a/apps/gui/buttonbar.c b/apps/gui/buttonbar.c
index 45dc056232..1f6d35700c 100644
--- a/apps/gui/buttonbar.c
+++ b/apps/gui/buttonbar.c
@@ -7,7 +7,7 @@
* \/ \/ \/ \/ \/
* $Id$
*
- * Copyright (C) Linus Nielsen Feltzing (2002), Kevin FERRARE (2005)
+ * Copyright (C) Linus Nielsen Feltzing (2002)
*
* All files in this archive are subject to the GNU General Public License.
* See the file COPYING in the source tree root for full license agreement.
@@ -16,7 +16,13 @@
* KIND, either express or implied.
*
****************************************************************************/
-
+/*
+2005 Kevin Ferrare :
+ - Multi screen support
+ - Rewrote a lot of code to avoid global vars and make it accept eventually
+ more that 3 buttons on the bar (just the prototype of gui_buttonbar_set
+ and the constant BUTTONBAR_MAX_BUTTONS to modify)
+*/
#include "config.h"
#include "buttonbar.h"
@@ -43,8 +49,7 @@ void gui_buttonbar_draw_button(struct gui_buttonbar * buttonbar, int num)
int xpos, ypos, button_width, text_width;
int fw, fh;
struct screen * display = buttonbar->display;
-
- display->setfont(FONT_SYSFIXED);
+
display->getstringsize("M", &fw, &fh);
button_width = display->width/BUTTONBAR_MAX_BUTTONS;
@@ -62,7 +67,6 @@ void gui_buttonbar_draw_button(struct gui_buttonbar * buttonbar, int num)
display->set_drawmode(DRMODE_COMPLEMENT);
display->fillrect(xpos, ypos, button_width - 1, fh);
display->set_drawmode(DRMODE_SOLID);
- display->setfont(FONT_UI);
}
void gui_buttonbar_set(struct gui_buttonbar * buttonbar,
@@ -99,7 +103,8 @@ void gui_buttonbar_draw(struct gui_buttonbar * buttonbar)
{
struct screen * display = buttonbar->display;
int i;
-
+ display->setfont(FONT_SYSFIXED);
+
display->set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
display->fillrect(0, display->height - BUTTONBAR_HEIGHT,
display->width, BUTTONBAR_HEIGHT);
@@ -109,6 +114,7 @@ void gui_buttonbar_draw(struct gui_buttonbar * buttonbar)
gui_buttonbar_draw_button(buttonbar, i);
display->update_rect(0, display->height - BUTTONBAR_HEIGHT,
display->width, BUTTONBAR_HEIGHT);
+ display->setfont(FONT_UI);
}
bool gui_buttonbar_isset(struct gui_buttonbar * buttonbar)
diff --git a/apps/gui/buttonbar.h b/apps/gui/buttonbar.h
index 9a3f9f4d01..e7a366420c 100644
--- a/apps/gui/buttonbar.h
+++ b/apps/gui/buttonbar.h
@@ -7,7 +7,7 @@
* \/ \/ \/ \/ \/
* $Id$
*
- * Copyright (C) 2005 by Kevin FERRARE
+ * Copyright (C) 2005 by Kevin Ferrare
*
* All files in this archive are subject to the GNU General Public License.
* See the file COPYING in the source tree root for full license agreement.
diff --git a/apps/gui/icon.c b/apps/gui/icon.c
index 073cabc532..db69b4b128 100644
--- a/apps/gui/icon.c
+++ b/apps/gui/icon.c
@@ -7,7 +7,7 @@
* \/ \/ \/ \/ \/
* $Id$
*
- * Copyright (C) Robert E. Hak(2002), Kevin FERRARE (2005)
+ * Copyright (C) Robert E. Hak(2002)
*
* All files in this archive are subject to the GNU General Public License.
* See the file COPYING in the source tree root for full license agreement.
diff --git a/apps/gui/icon.h b/apps/gui/icon.h
index 8fe7262ffe..3bafdd9084 100644
--- a/apps/gui/icon.h
+++ b/apps/gui/icon.h
@@ -7,7 +7,7 @@
* \/ \/ \/ \/ \/
* $Id$
*
- * Copyright (C) 2005 by Kevin FERRARE
+ * Copyright (C) 2005 by Kevin Ferrare
*
* All files in this archive are subject to the GNU General Public License.
* See the file COPYING in the source tree root for full license agreement.
diff --git a/apps/gui/list.c b/apps/gui/list.c
index ed26f1c9a8..8c4154631b 100644
--- a/apps/gui/list.c
+++ b/apps/gui/list.c
@@ -7,7 +7,7 @@
* \/ \/ \/ \/ \/
* $Id$
*
- * Copyright (C) 2005 by Kevin FERRARE
+ * Copyright (C) 2005 by Kevin Ferrare
*
* All files in this archive are subject to the GNU General Public License.
* See the file COPYING in the source tree root for full license agreement.
diff --git a/apps/gui/list.h b/apps/gui/list.h
index 4472fadbf8..012251b3d6 100644
--- a/apps/gui/list.h
+++ b/apps/gui/list.h
@@ -7,7 +7,7 @@
* \/ \/ \/ \/ \/
* $Id$
*
- * Copyright (C) 2005 by Kevin FERRARE
+ * Copyright (C) 2005 by Kevin Ferrare
*
* All files in this archive are subject to the GNU General Public License.
* See the file COPYING in the source tree root for full license agreement.
diff --git a/apps/gui/scrollbar.c b/apps/gui/scrollbar.c
index da6e18ca91..837b084b62 100644
--- a/apps/gui/scrollbar.c
+++ b/apps/gui/scrollbar.c
@@ -7,7 +7,7 @@
* \/ \/ \/ \/ \/
* $Id$
*
- * Copyright (C) Markus Braun (2002), Kevin FERRARE (2005)
+ * Copyright (C) Markus Braun (2002)
*
* All files in this archive are subject to the GNU General Public License.
* See the file COPYING in the source tree root for full license agreement.
diff --git a/apps/gui/scrollbar.h b/apps/gui/scrollbar.h
index c8ce694caa..3c562b415f 100644
--- a/apps/gui/scrollbar.h
+++ b/apps/gui/scrollbar.h
@@ -7,7 +7,7 @@
* \/ \/ \/ \/ \/
* $Id$
*
- * Copyright (C) 2005 Kevin FERRARE
+ * Copyright (C) 2005 Kevin Ferrare
*
* All files in this archive are subject to the GNU General Public License.
* See the file COPYING in the source tree root for full license agreement.
diff --git a/apps/gui/splash.c b/apps/gui/splash.c
index 9d1cf75732..385d75a2cf 100644
--- a/apps/gui/splash.c
+++ b/apps/gui/splash.c
@@ -7,7 +7,7 @@
* \/ \/ \/ \/ \/
* $Id$
*
- * Copyright (C) Daniel Stenberg (2002), Kevin FERRARE (2005)
+ * Copyright (C) Daniel Stenberg (2002)
*
* All files in this archive are subject to the GNU General Public License.
* See the file COPYING in the source tree root for full license agreement.
diff --git a/apps/gui/splash.h b/apps/gui/splash.h
index 3758c9bb23..ca4cf268dd 100644
--- a/apps/gui/splash.h
+++ b/apps/gui/splash.h
@@ -7,7 +7,7 @@
* \/ \/ \/ \/ \/
* $Id$
*
- * Copyright (C) 2005 by Kevin FERRARE
+ * Copyright (C) 2005 by Kevin Ferrare
*
* All files in this archive are subject to the GNU General Public License.
* See the file COPYING in the source tree root for full license agreement.
diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c
index 0f24208d33..c17a741732 100644
--- a/apps/gui/statusbar.c
+++ b/apps/gui/statusbar.c
@@ -7,7 +7,7 @@
* \/ \/ \/ \/ \/
* $Id$
*
- * Copyright (C) Robert E. Hak (2002), Linus Nielsen Feltzing (2002), Kevin FERRARE (2005)
+ * Copyright (C) Robert E. Hak (2002), Linus Nielsen Feltzing (2002)
*
* All files in this archive are subject to the GNU General Public License.
* See the file COPYING in the source tree root for full license agreement.
diff --git a/apps/gui/statusbar.h b/apps/gui/statusbar.h
index d80968ff5e..ff44b769e6 100644
--- a/apps/gui/statusbar.h
+++ b/apps/gui/statusbar.h
@@ -7,7 +7,7 @@
* \/ \/ \/ \/ \/
* $Id$
*
- * Copyright (C) 2005 by Kevin FERRARE
+ * Copyright (C) 2005 by Kevin Ferrare
*
* All files in this archive are subject to the GNU General Public License.
* See the file COPYING in the source tree root for full license agreement.
diff --git a/apps/plugins/starfield.c b/apps/plugins/starfield.c
index 3d86b4c395..cc8c8b7d20 100644
--- a/apps/plugins/starfield.c
+++ b/apps/plugins/starfield.c
@@ -5,7 +5,7 @@
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
-* Copyright (C) 2005 Kévin Ferrare
+* Copyright (C) 2005 Kevin Ferrare
*
* All files in this archive are subject to the GNU General Public License.
* See the file COPYING in the source tree root for full license agreement.
diff --git a/apps/screen_access.c b/apps/screen_access.c
index 8656ee8ace..815bdcfe49 100644
--- a/apps/screen_access.c
+++ b/apps/screen_access.c
@@ -7,7 +7,7 @@
* \/ \/ \/ \/ \/
* $Id$
*
- * Copyright (C) 2005 by Kevin FERRARE
+ * Copyright (C) 2005 by Kevin Ferrare
*
* All files in this archive are subject to the GNU General Public License.
* See the file COPYING in the source tree root for full license agreement.
@@ -27,7 +27,6 @@
#include <icons.h>
#include "screen_access.h"
-#include "buttonbar.h"
struct screen screens[NB_SCREENS];
@@ -156,7 +155,7 @@ void screen_update_nblines(struct screen * screen)
int height=screen->height;
if(global_settings.statusbar)
height -= STATUSBAR_HEIGHT;
-#if CONFIG_KEYPAD == RECORDER_PAD
+#ifdef HAS_BUTTONBAR
if(global_settings.buttonbar)
height -= BUTTONBAR_HEIGHT;
#endif
diff --git a/apps/screen_access.h b/apps/screen_access.h
index 2113a38757..a6190b1956 100644
--- a/apps/screen_access.h
+++ b/apps/screen_access.h
@@ -7,7 +7,7 @@
* \/ \/ \/ \/ \/
* $Id$
*
- * Copyright (C) 2005 by K�in FERRARE
+ * Copyright (C) 2005 by Kevin Ferrare
*
* All files in this archive are subject to the GNU General Public License.
* See the file COPYING in the source tree root for full license agreement.
@@ -21,6 +21,8 @@
#define _SCREEN_ACCESS_H_
#include "lcd.h"
+#include "buttonbar.h"
+
enum screen_type {
SCREEN_MAIN
#ifdef HAVE_REMOTE_LCD