52 static bool g_bSelectionLocked = false; |
52 static bool g_bSelectionLocked = false; |
53 |
53 |
54 cfg (Bool, lv_colorize, true); |
54 cfg (Bool, lv_colorize, true); |
55 cfg (String, gui_colortoolbar, "16:24:|:1:2:4:14:0:15:|:33:34:36:46"); |
55 cfg (String, gui_colortoolbar, "16:24:|:1:2:4:14:0:15:|:33:34:36:46"); |
56 cfg (Bool, gui_implicitfiles, false); |
56 cfg (Bool, gui_implicitfiles, false); |
57 extern_cfg (String, io_recentfiles); |
57 extern_cfg (List, io_recentfiles); |
58 extern_cfg (Bool, gl_axes); |
58 extern_cfg (Bool, gl_axes); |
59 extern_cfg (String, gl_maincolor); |
59 extern_cfg (String, gl_maincolor); |
60 extern_cfg (Float, gl_maincolor_alpha); |
60 extern_cfg (Float, gl_maincolor_alpha); |
61 extern_cfg (Bool, gl_wireframe); |
61 extern_cfg (Bool, gl_wireframe); |
62 extern_cfg (Bool, gl_colorbfc); |
62 extern_cfg (Bool, gl_colorbfc); |
148 } |
148 } |
149 |
149 |
150 // ============================================================================= |
150 // ============================================================================= |
151 // ----------------------------------------------------------------------------- |
151 // ----------------------------------------------------------------------------- |
152 void ForgeWindow::updateRecentFilesMenu() { |
152 void ForgeWindow::updateRecentFilesMenu() { |
153 QStringList files = io_recentfiles.value.split ("@", QString::SkipEmptyParts); |
|
154 QStringListIterator it (files); |
|
155 |
|
156 // First, clear any items in the recent files menu |
153 // First, clear any items in the recent files menu |
157 for (QAction* recent : m_recentFiles) |
154 for (QAction* recent : m_recentFiles) |
158 delete recent; |
155 delete recent; |
159 m_recentFiles.clear(); |
156 m_recentFiles.clear(); |
160 |
157 |
161 it.toBack(); |
158 QAction* first = null; |
162 while (it.hasPrevious()) { |
159 |
163 str file = it.previous(); |
160 for (const QVariant& it : io_recentfiles) { |
|
161 str file = it.toString(); |
164 QAction* recent = new QAction (getIcon ("open-recent"), file, this); |
162 QAction* recent = new QAction (getIcon ("open-recent"), file, this); |
165 |
163 |
166 connect (recent, SIGNAL (triggered()), this, SLOT (slot_recentFile())); |
164 connect (recent, SIGNAL (triggered()), this, SLOT (slot_recentFile())); |
167 ui->menuOpenRecent->addAction (recent); |
165 ui->menuOpenRecent->insertAction (first, recent); |
168 m_recentFiles << recent; |
166 m_recentFiles << recent; |
|
167 first = recent; |
169 } |
168 } |
170 } |
169 } |
171 |
170 |
172 // ============================================================================= |
171 // ============================================================================= |
173 // ----------------------------------------------------------------------------- |
172 // ----------------------------------------------------------------------------- |