summaryrefslogtreecommitdiff
path: root/menus.c
diff options
context:
space:
mode:
Diffstat (limited to 'menus.c')
-rw-r--r--menus.c31
1 files changed, 12 insertions, 19 deletions
diff --git a/menus.c b/menus.c
index 036e4c2..6bd2809 100644
--- a/menus.c
+++ b/menus.c
@@ -928,31 +928,31 @@ void Menu_Update_Display(void)
switch (globals.control_mode) {
case REMS_ctrl:
- ctrl_str = g_strdup ("GPIB CTRL ");
+ ctrl_str = g_strdup ("GPIB CTRL");
break;
case RWLS_ctrl:
- ctrl_str = g_strdup ("GPIB LOCK ");
+ ctrl_str = g_strdup ("GPIB LOCK");
break;
case RS232_ctrl:
- ctrl_str = g_strdup ("RS232 CTRL ");
+ ctrl_str = g_strdup ("RS232 CTRL");
break;
case WEB_ctrl:
- ctrl_str = g_strdup ("WEB CTRL ");
+ ctrl_str = g_strdup ("WEB CTRL");
break;
case TELNET_ctrl:
- ctrl_str = g_strdup ("TELNET CTRL ");
+ ctrl_str = g_strdup ("TELNET CTRL");
break;
case LWLS_ctrl:
- ctrl_str = g_strdup ("LOCAL LOCK ");
+ ctrl_str = g_strdup ("LOCAL LOCK");
break;
case LOCS_ctrl:
default:
- ctrl_str = g_strdup ("LOCAL CTRL ");
+ ctrl_str = g_strdup ("LOCAL CTRL");
break;
}
if (globals.Changes.update_whole_main_menu && Menu_Is_Item_Visible(LCD_entry)) {
- LCD_write(LCD_row,LCD_col,ctrl_str);
+ LCD_write_padded_spaces(LCD_row,LCD_col,ctrl_str,LCD_col_width);
}
g_free (ctrl_str);
@@ -968,7 +968,7 @@ void Menu_Update_Display(void)
LCD_col=((LCD_entry % LCD_max_entries_per_page) / LCD_rows) * LCD_col_width + 1;
if (globals.Changes.update_whole_main_menu && Menu_Is_Item_Visible(LCD_entry)) {
- LCD_write(LCD_row,LCD_col,"Memory menu ");
+ LCD_write_padded_spaces(LCD_row,LCD_col,"Memory menu",LCD_col_width);
}
@@ -983,7 +983,7 @@ void Menu_Update_Display(void)
LCD_col=((LCD_entry % LCD_max_entries_per_page) / LCD_rows) * LCD_col_width + 1;
if (globals.Changes.update_whole_main_menu && Menu_Is_Item_Visible(LCD_entry)) {
- LCD_write(LCD_row,LCD_col,"Setup menu ");
+ LCD_write_padded_spaces(LCD_row,LCD_col,"Setup menu",LCD_col_width);
}
@@ -1011,8 +1011,7 @@ void Menu_Update_Display(void)
for (i=(Main_Menu_max_entry%LCD_max_entries_per_page)+ 1; i<12; ++i) {
LCD_row=i % LCD_rows;
LCD_col=(i / LCD_rows) * LCD_col_width + 1;
- /*1234567890123*/
- LCD_write(LCD_row,LCD_col," ");
+ LCD_write_padded_spaces(LCD_row,LCD_col,"",LCD_col_width);
}
globals.Changes.update_whole_main_menu=NO;
@@ -1225,14 +1224,8 @@ static void Display_Number_on_LCD(int Is_Item_Visible,int LCD_row,int LCD_col,ch
strcpy(LCD_string,start_string);
}
- /* tack on spaces on end of string, but no wider than column */
- for (i=strlen(LCD_string); i<width_of_column; ++i) {
- LCD_string[i]=' ';
- }
- LCD_string[width_of_column]=0;
-
if (Is_Item_Visible) {
- LCD_write(LCD_row,LCD_col,LCD_string);
+ LCD_write_padded_spaces(LCD_row, LCD_col, LCD_string, width_of_column);
}
}