Diffstat (limited to 'core/apps/embeddedkonsole/TEHistory.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/apps/embeddedkonsole/TEHistory.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/apps/embeddedkonsole/TEHistory.cpp b/core/apps/embeddedkonsole/TEHistory.cpp index 504cd13..2417af1 100644 --- a/core/apps/embeddedkonsole/TEHistory.cpp +++ b/core/apps/embeddedkonsole/TEHistory.cpp | |||
@@ -69,49 +69,49 @@ void HistoryScroll::setSize(int lines, int cells) | |||
69 | if (m_lines) { | 69 | if (m_lines) { |
70 | delete m_lines; | 70 | delete m_lines; |
71 | m_lines = NULL; | 71 | m_lines = NULL; |
72 | } | 72 | } |
73 | if (m_cells) { | 73 | if (m_cells) { |
74 | delete m_cells; | 74 | delete m_cells; |
75 | m_cells = NULL; | 75 | m_cells = NULL; |
76 | } | 76 | } |
77 | m_max_lines = m_max_cells = 0; | 77 | m_max_lines = m_max_cells = 0; |
78 | if (lines > 0 && cells > 0) { | 78 | if (lines > 0 && cells > 0) { |
79 | m_max_lines = lines; | 79 | m_max_lines = lines; |
80 | m_lines = new int[m_max_lines]; | 80 | m_lines = new int[m_max_lines]; |
81 | m_lines[0] = 0; | 81 | m_lines[0] = 0; |
82 | m_max_cells = cells; | 82 | m_max_cells = cells; |
83 | m_cells = new ca[m_max_cells]; | 83 | m_cells = new ca[m_max_cells]; |
84 | } | 84 | } |
85 | m_first_line = 0; | 85 | m_first_line = 0; |
86 | m_num_lines = 0; | 86 | m_num_lines = 0; |
87 | m_last_cell = 0; | 87 | m_last_cell = 0; |
88 | m_start_line = 0; | 88 | m_start_line = 0; |
89 | } | 89 | } |
90 | 90 | ||
91 | void HistoryScroll::setScroll(bool on) | 91 | void HistoryScroll::setScroll(bool on) |
92 | { | 92 | { |
93 | Config cfg("Qkonsole"); | 93 | Config cfg( "Konsole" ); |
94 | cfg.setGroup("History"); | 94 | cfg.setGroup("History"); |
95 | // printf("setScroll(%d)\n", on); | 95 | // printf("setScroll(%d)\n", on); |
96 | if (on) { | 96 | if (on) { |
97 | int lines = cfg.readNumEntry("history_lines",300); | 97 | int lines = cfg.readNumEntry("history_lines",300); |
98 | int avg_line = cfg.readNumEntry("avg_line_length",60); | 98 | int avg_line = cfg.readNumEntry("avg_line_length",60); |
99 | int cells = lines * avg_line; | 99 | int cells = lines * avg_line; |
100 | setSize(lines,cells); | 100 | setSize(lines,cells); |
101 | } else { | 101 | } else { |
102 | setSize(0,0); | 102 | setSize(0,0); |
103 | } | 103 | } |
104 | } | 104 | } |
105 | 105 | ||
106 | bool HistoryScroll::hasScroll() | 106 | bool HistoryScroll::hasScroll() |
107 | { | 107 | { |
108 | return (m_max_lines > 0); | 108 | return (m_max_lines > 0); |
109 | } | 109 | } |
110 | 110 | ||
111 | int HistoryScroll::getLines() | 111 | int HistoryScroll::getLines() |
112 | { | 112 | { |
113 | return(m_num_lines); | 113 | return(m_num_lines); |
114 | } | 114 | } |
115 | 115 | ||
116 | int HistoryScroll::getLineLen(int lineno) | 116 | int HistoryScroll::getLineLen(int lineno) |
117 | { | 117 | { |