Mercurial > hg > octave-nkf
comparison libgui/src/m-editor/file-editor.cc @ 20108:a8a5415b05cb
new gui icons
* resource-manager.cc (do_icon): new function for getting an icon from
or from the fallback icon set if desired
* resource-manager.h (icon): new static function icon calling do_icon
if instance is ok
* QTerminal.h (QTerminal)
* files-dock-widget.cc (files_dock_widget,contextmenu_requested)
* main-window.cc (construct_file_menu, construct_new_menu,
construct_edit_menu, construct_tool_bar, construct_debug_menu_item)
* webinfo.cc (webinfo)
* file-editor.cc (construct): use icons from theme or icon set,
change order of prev/next breakpoint
* find-files-dialog.cc (find_files_dialog): new window icon
* applications-system.svg, bp-next.svg, bp-prev.svg, bp-rm-all.svg,
bp-toggle.svg, db-step-in.svg, db-step-out.svg, db-step.svg, db-stop.svg,
document-new.svg, document-open.svg, document-print.svg,
document-save-as.svg, document-save.svg, edit-copy.svg, edit-cut.svg,
edit-paste.svg, edit-delete.svg, edit-find.svg, edit-find-replace.svg,
edit-undo.svg, edit-redo.svg, folder-new.svg, folder.svg, go-first.svg,
go-last.svg, go-up.svg, media-playback-start.svg, preferences-system.svg,
system-run.svg user-home.svg, view-refresh.svg, zoom-in.svg, zoom-out.svg:
added new icon files together with created png files
* artsbuilderexecute.png, bp_next.png, bp_prev.png, bp_rm_all.png,
bp_toggle.png, db_step_in.png, db_step_out.png, db_step.png, db_stop.png,
db_cont.png, configure.png, editcopy.png, editcut.png, editdelete.png,
editpaste.png, fileclose.png, filenew.png, fileopen.png, fileprint.png,
filesave.png, filesaveas.png, find.png, findf.png, folder.png,
folder_documents.png, folder_new.png, gear.png, home.png, ok.png, redo.png,
reload.png, search.png, undo.png, zoom-in.png, zoom-out.png:
removed old icon files
* icons_license: update to new icon set
* module.mk
* resource.qrc
remove png icons and add svg/png icons
author | Torsten <ttl@justmail.de> |
---|---|
date | Fri, 27 Feb 2015 08:41:59 +0100 |
parents | 597fc0fd8e54 |
children | 6049bdfa8d56 |
comparison
equal
deleted
inserted
replaced
20107:2eed41ae3b64 | 20108:a8a5415b05cb |
---|---|
1286 _edit_function_action = add_action (_fileMenu, QIcon (), | 1286 _edit_function_action = add_action (_fileMenu, QIcon (), |
1287 tr ("&Edit Function"), SLOT (request_context_edit (bool))); | 1287 tr ("&Edit Function"), SLOT (request_context_edit (bool))); |
1288 | 1288 |
1289 _fileMenu->addSeparator (); | 1289 _fileMenu->addSeparator (); |
1290 | 1290 |
1291 _save_action = add_action (_fileMenu, QIcon (":/actions/icons/filesave.png"), | 1291 _save_action = add_action (_fileMenu, resource_manager::icon ("document-save"), |
1292 tr ("&Save File"), SLOT (request_save_file (bool))); | 1292 tr ("&Save File"), SLOT (request_save_file (bool))); |
1293 _save_as_action = add_action (_fileMenu, QIcon (":/actions/icons/filesaveas.png"), | 1293 _save_as_action = add_action (_fileMenu, resource_manager::icon ("document-save-as"), |
1294 tr ("Save File &As..."), SLOT (request_save_file_as (bool))); | 1294 tr ("Save File &As..."), SLOT (request_save_file_as (bool))); |
1295 | 1295 |
1296 _fileMenu->addSeparator (); | 1296 _fileMenu->addSeparator (); |
1297 | 1297 |
1298 _close_action = add_action (_fileMenu, | 1298 _close_action = add_action (_fileMenu, resource_manager::icon ("window-close",false), |
1299 QIcon::fromTheme("window-close",QIcon (":/actions/icons/fileclose.png")), | |
1300 tr ("&Close"), SLOT (request_close_file (bool))); | 1299 tr ("&Close"), SLOT (request_close_file (bool))); |
1301 _close_all_action = add_action (_fileMenu, | 1300 _close_all_action = add_action (_fileMenu, resource_manager::icon ("window-close",false), |
1302 QIcon::fromTheme("window-close", QIcon (":/actions/icons/fileclose.png")), | |
1303 tr ("Close All"), SLOT (request_close_all_files (bool))); | 1301 tr ("Close All"), SLOT (request_close_all_files (bool))); |
1304 _close_others_action = add_action (_fileMenu, | 1302 _close_others_action = add_action (_fileMenu, resource_manager::icon ("window-close",false), |
1305 QIcon::fromTheme("window-close", QIcon (":/actions/icons/fileclose.png")), | |
1306 tr ("Close Other Files"), SLOT (request_close_other_files (bool))); | 1303 tr ("Close Other Files"), SLOT (request_close_other_files (bool))); |
1307 | 1304 |
1308 _fileMenu->addSeparator (); | 1305 _fileMenu->addSeparator (); |
1309 | 1306 |
1310 _print_action = add_action (_fileMenu, QIcon (":/actions/icons/fileprint.png"), | 1307 _print_action = add_action (_fileMenu, resource_manager::icon ("document-print"), |
1311 tr ("Print..."), SLOT (request_print_file (bool))); | 1308 tr ("Print..."), SLOT (request_print_file (bool))); |
1312 | 1309 |
1313 // edit menu | 1310 // edit menu |
1314 | 1311 |
1315 QMenu *editMenu = m_add_menu (_menu_bar, tr ("&Edit")); | 1312 QMenu *editMenu = m_add_menu (_menu_bar, tr ("&Edit")); |
1316 | 1313 |
1317 _undo_action = add_action (editMenu, QIcon (":/actions/icons/undo.png"), | 1314 _undo_action = add_action (editMenu, resource_manager::icon ("edit-undo"), |
1318 tr ("&Undo"), SLOT (request_undo (bool))); | 1315 tr ("&Undo"), SLOT (request_undo (bool))); |
1319 _undo_action->setEnabled (false); | 1316 _undo_action->setEnabled (false); |
1320 _redo_action = add_action (editMenu, QIcon (":/actions/icons/redo.png"), | 1317 _redo_action = add_action (editMenu, resource_manager::icon ("edit-redo"), |
1321 tr ("&Redo"), SLOT (request_redo (bool))); | 1318 tr ("&Redo"), SLOT (request_redo (bool))); |
1322 _redo_action->setEnabled (false); | 1319 _redo_action->setEnabled (false); |
1323 | 1320 |
1324 editMenu->addSeparator (); | 1321 editMenu->addSeparator (); |
1325 | 1322 |
1326 _copy_action = add_action (editMenu, QIcon (":/actions/icons/editcopy.png"), | 1323 _copy_action = add_action (editMenu, resource_manager::icon ("edit-copy"), |
1327 tr ("&Copy"), SLOT (request_copy (bool))); | 1324 tr ("&Copy"), SLOT (request_copy (bool))); |
1328 _copy_action->setEnabled (false); | 1325 _copy_action->setEnabled (false); |
1329 _cut_action = add_action (editMenu, QIcon (":/actions/icons/editcut.png"), | 1326 _cut_action = add_action (editMenu, resource_manager::icon ("edit-cut"), |
1330 tr ("Cu&t"), SLOT (request_cut (bool))); | 1327 tr ("Cu&t"), SLOT (request_cut (bool))); |
1331 _cut_action->setEnabled (false); | 1328 _cut_action->setEnabled (false); |
1332 _paste_action = add_action (editMenu, QIcon (":/actions/icons/editpaste.png"), | 1329 _paste_action = add_action (editMenu, resource_manager::icon ("edit-paste"), |
1333 tr ("Paste"), SLOT (request_paste (bool))); | 1330 tr ("Paste"), SLOT (request_paste (bool))); |
1334 | 1331 |
1335 editMenu->addSeparator (); | 1332 editMenu->addSeparator (); |
1336 | 1333 |
1337 _selectall_action = add_action (editMenu, QIcon (), tr ("Select All"), | 1334 _selectall_action = add_action (editMenu, QIcon (), tr ("Select All"), |
1338 SLOT (request_selectall (bool))); | 1335 SLOT (request_selectall (bool))); |
1339 | 1336 |
1340 editMenu->addSeparator (); | 1337 editMenu->addSeparator (); |
1341 | 1338 |
1342 _find_action = add_action (editMenu, QIcon (":/actions/icons/find.png"), | 1339 _find_action = add_action (editMenu, resource_manager::icon ("edit-find-replace"), |
1343 tr ("&Find and Replace..."), SLOT (request_find (bool))); | 1340 tr ("&Find and Replace..."), SLOT (request_find (bool))); |
1344 | 1341 |
1345 editMenu->addSeparator (); | 1342 editMenu->addSeparator (); |
1346 | 1343 |
1347 _edit_cmd_menu = editMenu->addMenu (tr ("&Commands")); | 1344 _edit_cmd_menu = editMenu->addMenu (tr ("&Commands")); |
1421 _sel_to_matching_brace = add_action (_edit_nav_menu, QIcon (), | 1418 _sel_to_matching_brace = add_action (_edit_nav_menu, QIcon (), |
1422 tr ("Select to Matching Brace"), SLOT (request_sel_match_brace (bool))); | 1419 tr ("Select to Matching Brace"), SLOT (request_sel_match_brace (bool))); |
1423 | 1420 |
1424 _edit_nav_menu->addSeparator (); | 1421 _edit_nav_menu->addSeparator (); |
1425 | 1422 |
1423 _previous_bookmark_action = add_action (_edit_nav_menu, QIcon (), | |
1424 tr ("Pre&vious Bookmark"), SLOT (request_previous_bookmark (bool))); | |
1426 _next_bookmark_action = add_action (_edit_nav_menu, QIcon (), | 1425 _next_bookmark_action = add_action (_edit_nav_menu, QIcon (), |
1427 tr ("&Next Bookmark"), SLOT (request_next_bookmark (bool))); | 1426 tr ("&Next Bookmark"), SLOT (request_next_bookmark (bool))); |
1428 _previous_bookmark_action = add_action (_edit_nav_menu, QIcon (), | |
1429 tr ("Pre&vious Bookmark"), SLOT (request_previous_bookmark (bool))); | |
1430 _toggle_bookmark_action = add_action (_edit_nav_menu, QIcon (), | 1427 _toggle_bookmark_action = add_action (_edit_nav_menu, QIcon (), |
1431 tr ("Toggle &Bookmark"), SLOT (request_toggle_bookmark (bool))); | 1428 tr ("Toggle &Bookmark"), SLOT (request_toggle_bookmark (bool))); |
1432 _remove_bookmark_action = add_action (_edit_nav_menu, QIcon (), | 1429 _remove_bookmark_action = add_action (_edit_nav_menu, QIcon (), |
1433 tr ("&Remove All Bookmarks"), SLOT (request_remove_bookmark (bool))); | 1430 tr ("&Remove All Bookmarks"), SLOT (request_remove_bookmark (bool))); |
1434 | 1431 |
1435 editMenu->addSeparator (); | 1432 editMenu->addSeparator (); |
1436 | 1433 |
1437 _preferences_action = add_action (editMenu, | 1434 _preferences_action = add_action (editMenu, resource_manager::icon ("preferences-system"), |
1438 QIcon (":/actions/icons/configure.png"), | |
1439 tr ("&Preferences..."), SLOT (request_preferences (bool))); | 1435 tr ("&Preferences..."), SLOT (request_preferences (bool))); |
1440 _styles_preferences_action = add_action (editMenu, | 1436 _styles_preferences_action = add_action (editMenu, resource_manager::icon ("preferences-system"), |
1441 QIcon (":/actions/icons/configure.png"), | |
1442 tr ("&Styles Preferences..."), SLOT (request_styles_preferences (bool))); | 1437 tr ("&Styles Preferences..."), SLOT (request_styles_preferences (bool))); |
1443 | 1438 |
1444 // view menu | 1439 // view menu |
1445 | 1440 |
1446 QMenu *view_menu = m_add_menu (_menu_bar, tr ("&View")); | 1441 QMenu *view_menu = m_add_menu (_menu_bar, tr ("&View")); |
1467 tr ("Show Long Line &Marker"), SLOT (show_long_line (bool))); | 1462 tr ("Show Long Line &Marker"), SLOT (show_long_line (bool))); |
1468 _show_longline_action->setCheckable (true); | 1463 _show_longline_action->setCheckable (true); |
1469 | 1464 |
1470 view_menu->addSeparator (); | 1465 view_menu->addSeparator (); |
1471 | 1466 |
1472 _zoom_in_action = add_action (view_menu, QIcon (), | 1467 _zoom_in_action = add_action (view_menu, resource_manager::icon ("zoom-in"), |
1473 tr ("Zoom &In"), SLOT (zoom_in (bool))); | 1468 tr ("Zoom &In"), SLOT (zoom_in (bool))); |
1474 _zoom_out_action = add_action (view_menu, QIcon (), | 1469 _zoom_out_action = add_action (view_menu, resource_manager::icon ("zoom-out"), |
1475 tr ("Zoom &Out"), SLOT (zoom_out (bool))); | 1470 tr ("Zoom &Out"), SLOT (zoom_out (bool))); |
1476 _zoom_normal_action = add_action (view_menu, QIcon (), | 1471 _zoom_normal_action = add_action (view_menu, QIcon (), |
1477 tr ("&Normal Size"), SLOT (zoom_normal (bool))); | 1472 tr ("&Normal Size"), SLOT (zoom_normal (bool))); |
1478 | 1473 |
1479 _menu_bar->addMenu (view_menu); | 1474 _menu_bar->addMenu (view_menu); |
1480 | 1475 |
1481 // debug menu | 1476 // debug menu |
1482 | 1477 |
1483 _debug_menu = m_add_menu (_menu_bar, tr ("&Debug")); | 1478 _debug_menu = m_add_menu (_menu_bar, tr ("&Debug")); |
1484 | 1479 |
1485 _toggle_breakpoint_action = add_action (_debug_menu, | 1480 _toggle_breakpoint_action = add_action (_debug_menu, |
1486 QIcon (":/actions/icons/bp_toggle.png"), tr ("Toggle &Breakpoint"), | 1481 resource_manager::icon ("bp-toggle"), tr ("Toggle &Breakpoint"), |
1487 SLOT (request_toggle_breakpoint (bool))); | 1482 SLOT (request_toggle_breakpoint (bool))); |
1488 _next_breakpoint_action = add_action (_debug_menu, | 1483 _next_breakpoint_action = add_action (_debug_menu, |
1489 QIcon (":/actions/icons/bp_next.png"), tr ("&Next Breakpoint"), | 1484 resource_manager::icon ("bp-next"), tr ("&Next Breakpoint"), |
1490 SLOT (request_next_breakpoint (bool))); | 1485 SLOT (request_next_breakpoint (bool))); |
1491 _previous_breakpoint_action = add_action (_debug_menu, | 1486 _previous_breakpoint_action = add_action (_debug_menu, |
1492 QIcon (":/actions/icons/bp_prev.png"), tr ("Pre&vious Breakpoint"), | 1487 resource_manager::icon ("bp-prev"), tr ("Pre&vious Breakpoint"), |
1493 SLOT (request_previous_breakpoint (bool))); | 1488 SLOT (request_previous_breakpoint (bool))); |
1494 _remove_all_breakpoints_action = add_action (_debug_menu, | 1489 _remove_all_breakpoints_action = add_action (_debug_menu, |
1495 QIcon (":/actions/icons/bp_rm_all.png"), tr ("&Remove All Breakpoints"), | 1490 resource_manager::icon ("bp-rm-all"), tr ("&Remove All Breakpoints"), |
1496 SLOT (request_remove_breakpoint (bool))); | 1491 SLOT (request_remove_breakpoint (bool))); |
1497 | 1492 |
1498 _debug_menu->addSeparator (); | 1493 _debug_menu->addSeparator (); |
1499 | 1494 |
1500 // The other debug actions will be added by the main window. | 1495 // The other debug actions will be added by the main window. |
1501 | 1496 |
1502 // run menu | 1497 // run menu |
1503 | 1498 |
1504 QMenu *_run_menu = m_add_menu (_menu_bar, tr ("&Run")); | 1499 QMenu *_run_menu = m_add_menu (_menu_bar, tr ("&Run")); |
1505 | 1500 |
1506 _run_action = add_action (_run_menu, QIcon (":/actions/icons/artsbuilderexecute.png"), | 1501 _run_action = add_action (_run_menu, resource_manager::icon ("system-run"), |
1507 tr ("Save File and Run"), SLOT (request_run_file (bool))); | 1502 tr ("Save File and Run"), SLOT (request_run_file (bool))); |
1508 _run_selection_action = add_action (_run_menu, QIcon (), | 1503 _run_selection_action = add_action (_run_menu, QIcon (), |
1509 tr ("Run &Selection"), SLOT (request_context_run (bool))); | 1504 tr ("Run &Selection"), SLOT (request_context_run (bool))); |
1510 _run_selection_action->setEnabled (false); | 1505 _run_selection_action->setEnabled (false); |
1511 | 1506 |
1534 _tool_bar->addSeparator (); | 1529 _tool_bar->addSeparator (); |
1535 _tool_bar->addAction (_find_action); | 1530 _tool_bar->addAction (_find_action); |
1536 _tool_bar->addAction (_run_action); | 1531 _tool_bar->addAction (_run_action); |
1537 _tool_bar->addSeparator (); | 1532 _tool_bar->addSeparator (); |
1538 _tool_bar->addAction (_toggle_breakpoint_action); | 1533 _tool_bar->addAction (_toggle_breakpoint_action); |
1534 _tool_bar->addAction (_previous_breakpoint_action); | |
1539 _tool_bar->addAction (_next_breakpoint_action); | 1535 _tool_bar->addAction (_next_breakpoint_action); |
1540 _tool_bar->addAction (_previous_breakpoint_action); | |
1541 _tool_bar->addAction (_remove_all_breakpoints_action); | 1536 _tool_bar->addAction (_remove_all_breakpoints_action); |
1542 | 1537 |
1543 // layout | 1538 // layout |
1544 QVBoxLayout *vbox_layout = new QVBoxLayout (); | 1539 QVBoxLayout *vbox_layout = new QVBoxLayout (); |
1545 vbox_layout->addWidget (_menu_bar); | 1540 vbox_layout->addWidget (_menu_bar); |