src/configDialog.cc

changeset 587
507e5d5c348c
parent 581
c57ddcaf1b58
child 590
7aec744ce97b
equal deleted inserted replaced
586:89d1161197d3 587:507e5d5c348c
70 extern_cfg (Bool, prog_intersector_wine); 70 extern_cfg (Bool, prog_intersector_wine);
71 extern_cfg (Bool, prog_coverer_wine); 71 extern_cfg (Bool, prog_coverer_wine);
72 extern_cfg (Bool, prog_isecalc_wine); 72 extern_cfg (Bool, prog_isecalc_wine);
73 extern_cfg (Bool, prog_edger2_wine); 73 extern_cfg (Bool, prog_edger2_wine);
74 74
75 #define act(N) extern_cfg (KeySequence, key_##N);
76 #include "actions.h"
77
78 const char* g_extProgPathFilter = 75 const char* g_extProgPathFilter =
79 #ifdef _WIN32 76 #ifdef _WIN32
80 "Applications (*.exe)(*.exe);;All files (*.*)(*.*)"; 77 "Applications (*.exe)(*.exe);;All files (*.*)(*.*)";
81 #else 78 #else
82 ""; 79 "";
109 ui->implicitFiles->setChecked (gui_implicitfiles); 106 ui->implicitFiles->setChecked (gui_implicitfiles);
110 ui->m_logostuds->setChecked (gl_logostuds); 107 ui->m_logostuds->setChecked (gl_logostuds);
111 ui->linelengths->setChecked (gl_linelengths); 108 ui->linelengths->setChecked (gl_linelengths);
112 109
113 int i = 0; 110 int i = 0;
114 #define act(N) addShortcut (key_##N, ACTION(N), i); 111
115 #include "actions.h" 112 for (QAction* act : g_win->findChildren<QAction*>())
113 if (!act->objectName().isEmpty())
114 addShortcut (g_win->shortcutForAction (act), act, i);
116 115
117 ui->shortcutsList->setSortingEnabled (true); 116 ui->shortcutsList->setSortingEnabled (true);
118 ui->shortcutsList->sortItems(); 117 ui->shortcutsList->sortItems();
119 118
120 connect (ui->shortcut_set, SIGNAL (clicked()), this, SLOT (slot_setShortcut())); 119 connect (ui->shortcut_set, SIGNAL (clicked()), this, SLOT (slot_setShortcut()));
326 for (int i = 0; i < g_NumGrids; ++i) 325 for (int i = 0; i < g_NumGrids; ++i)
327 for (int j = 0; j < 4; ++j) 326 for (int j = 0; j < 4; ++j)
328 g_GridInfo[i].confs[j]->value = dsb_gridData[i][j]->value(); 327 g_GridInfo[i].confs[j]->value = dsb_gridData[i][j]->value();
329 328
330 // Apply key shortcuts 329 // Apply key shortcuts
331 #define act(N) ACTION(N)->setShortcut (key_##N); 330 g_win->updateActionShortcuts();
332 #include "actions.h"
333 331
334 // Ext program settings 332 // Ext program settings
335 for (const LDExtProgInfo& info : g_LDExtProgInfo) 333 for (const LDExtProgInfo& info : g_LDExtProgInfo)
336 { *info.path = info.input->text(); 334 { *info.path = info.input->text();
337 335

mercurial