Mercurial > octave
comparison libgui/qterminal/libqterminal/QTerminal.cc @ 31621:0645ea65ca6b
handle icons and themes in gui_settings class, not resource_manager
* resource-manager.h, resource-manager.cc
(resource_manager::config_icon_theme, resource_manager::icon):
Move funtcions to gui-settings.h and gui-settings.cc.
* Canvas.cc, QTerminal.cc, documentation-bookmarks.cc,
documentation.cc, dw-main-window.cc, files-dock-widget.cc,
find-files-dialog.cc, gui-settings.cc, gui-settings.h,
history-dock-widget.cc, file-editor.cc, main-window.cc,
octave-dock-widget.cc, octave-qobject.cc, qt-interpreter-events.cc,
resource-manager.cc, resource-manager.h, variable-editor.cc:
Change all uses.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 02 Dec 2022 18:43:12 -0500 |
parents | ad014fc78bd6 |
children | 1a1f47f17ed4 |
comparison
equal
deleted
inserted
replaced
31620:6dfaaf8ecf3b | 31621:0645ea65ca6b |
---|---|
274 } | 274 } |
275 | 275 |
276 void | 276 void |
277 QTerminal::construct (octave::base_qobject& oct_qobj) | 277 QTerminal::construct (octave::base_qobject& oct_qobj) |
278 { | 278 { |
279 octave::resource_manager& rmgr = oct_qobj.get_resource_manager (); | 279 octave::gui_settings settings; |
280 | 280 |
281 // context menu | 281 // context menu |
282 setContextMenuPolicy (Qt::CustomContextMenu); | 282 setContextMenuPolicy (Qt::CustomContextMenu); |
283 | 283 |
284 _contextMenu = new QMenu (this); | 284 _contextMenu = new QMenu (this); |
285 | 285 |
286 _copy_action | 286 _copy_action |
287 = _contextMenu->addAction (rmgr.icon ("edit-copy"), tr ("Copy"), this, | 287 = _contextMenu->addAction (settings.icon ("edit-copy"), tr ("Copy"), this, |
288 SLOT (copyClipboard ())); | 288 SLOT (copyClipboard ())); |
289 | 289 |
290 _paste_action | 290 _paste_action |
291 = _contextMenu->addAction (rmgr.icon ("edit-paste"), tr ("Paste"), this, | 291 = _contextMenu->addAction (settings.icon ("edit-paste"), tr ("Paste"), this, |
292 SLOT (pasteClipboard ())); | 292 SLOT (pasteClipboard ())); |
293 | 293 |
294 _contextMenu->addSeparator (); | 294 _contextMenu->addSeparator (); |
295 | 295 |
296 _selectall_action | 296 _selectall_action |