diff options
author | Mavridis Philippe <mavridisf@gmail.com> | 2024-08-02 19:26:42 +0300 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-08-04 19:01:00 +0900 |
commit | c57ea5f28b963407717f62385cdd1d0df4740a9f (patch) | |
tree | 9c6d82c0bf198c0046e5b275646deb5c8fdbc5c7 | |
parent | 72fce97c2e965335bbd53ebe0af86386d0524204 (diff) | |
download | tdebase-c57ea5f28b963407717f62385cdd1d0df4740a9f.tar.gz tdebase-c57ea5f28b963407717f62385cdd1d0df4740a9f.zip |
TWin, Kicker: Add icons for tiling menus
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
(cherry picked from commit 66ebe21d5ef4cbeb0983d2456833f3e24fe44f0a)
-rw-r--r-- | kicker/taskmanager/taskrmbmenu.cpp | 19 | ||||
-rw-r--r-- | twin/CMakeLists.txt | 11 | ||||
-rw-r--r-- | twin/pics/CMakeLists.txt | 16 | ||||
-rw-r--r-- | twin/pics/tile_bottom.png | bin | 0 -> 3425 bytes | |||
-rw-r--r-- | twin/pics/tile_bottomleft.png | bin | 0 -> 3410 bytes | |||
-rw-r--r-- | twin/pics/tile_bottomright.png | bin | 0 -> 3414 bytes | |||
-rw-r--r-- | twin/pics/tile_left.png | bin | 0 -> 3417 bytes | |||
-rw-r--r-- | twin/pics/tile_right.png | bin | 0 -> 3416 bytes | |||
-rw-r--r-- | twin/pics/tile_top.png | bin | 0 -> 3437 bytes | |||
-rw-r--r-- | twin/pics/tile_topleft.png | bin | 0 -> 3427 bytes | |||
-rw-r--r-- | twin/pics/tile_topright.png | bin | 0 -> 3427 bytes | |||
-rw-r--r-- | twin/useractions.cpp | 16 |
12 files changed, 28 insertions, 34 deletions
diff --git a/kicker/taskmanager/taskrmbmenu.cpp b/kicker/taskmanager/taskrmbmenu.cpp index 85522357d..57109ba2d 100644 --- a/kicker/taskmanager/taskrmbmenu.cpp +++ b/kicker/taskmanager/taskrmbmenu.cpp @@ -24,6 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <assert.h> +#include <tdeglobal.h> #include <kiconloader.h> #include <tdelocale.h> @@ -44,6 +45,8 @@ TaskRMBMenu::TaskRMBMenu(const Task::List& theTasks, bool show, TQPopupMenu* mov , showAll( show ) , taskMoveMenu( moveMenu ) { + TDEGlobal::iconLoader()->addAppDir("twin"); + assert(tasks.count() > 0); if (tasks.count() == 1) { @@ -290,23 +293,23 @@ TQPopupMenu* TaskRMBMenu::makeTileMenu(Task::Ptr t) TQPopupMenu *m = new TQPopupMenu( this ); // Tile to side (the menu id matched the ActiveBorder index used for tiling) - int id = m->insertItem( i18n("&Left"), this, TQ_SLOT( slotTileTo(int) ) ); + int id = m->insertItem( UserIconSet("tile_left"), i18n("&Left"), this, TQ_SLOT( slotTileTo(int) ) ); m->setItemParameter( id, 6 ); - id = m->insertItem( i18n("&Right"), this, TQ_SLOT( slotTileTo(int) ) ); + id = m->insertItem( UserIconSet("tile_right"), i18n("&Right"), this, TQ_SLOT( slotTileTo(int) ) ); m->setItemParameter( id, 2 ); - id = m->insertItem( i18n("&Top"), this, TQ_SLOT( slotTileTo(int) ) ); + id = m->insertItem( UserIconSet("tile_top"), i18n("&Top"), this, TQ_SLOT( slotTileTo(int) ) ); m->setItemParameter( id, 0 ); - id = m->insertItem( i18n("&Bottom"), this, TQ_SLOT( slotTileTo(int) ) ); + id = m->insertItem( UserIconSet("tile_bottom"), i18n("&Bottom"), this, TQ_SLOT( slotTileTo(int) ) ); m->setItemParameter( id, 4 ); // Tile to corner (the menu id matched the ActiveBorder index used for tiling) - id = m->insertItem( i18n("Top &Left"), this, TQ_SLOT( slotTileTo(int) ) ); + id = m->insertItem( UserIconSet("tile_topleft"), i18n("Top &Left"), this, TQ_SLOT( slotTileTo(int) ) ); m->setItemParameter( id, 7 ); - id = m->insertItem( i18n("Top &Right"), this, TQ_SLOT( slotTileTo(int) ) ); + id = m->insertItem( UserIconSet("tile_topright"), i18n("Top &Right"), this, TQ_SLOT( slotTileTo(int) ) ); m->setItemParameter( id, 1 ); - id = m->insertItem( i18n("Bottom L&eft"), this, TQ_SLOT( slotTileTo(int) ) ); + id = m->insertItem( UserIconSet("tile_bottomleft"), i18n("Bottom L&eft"), this, TQ_SLOT( slotTileTo(int) ) ); m->setItemParameter( id, 5 ); - id = m->insertItem( i18n("&Bottom R&ight"), this, TQ_SLOT( slotTileTo(int) ) ); + id = m->insertItem( UserIconSet("tile_bottomright"), i18n("&Bottom R&ight"), this, TQ_SLOT( slotTileTo(int) ) ); m->setItemParameter( id, 3 ); return m; diff --git a/twin/CMakeLists.txt b/twin/CMakeLists.txt index 33a2302e4..261e0eb34 100644 --- a/twin/CMakeLists.txt +++ b/twin/CMakeLists.txt @@ -15,7 +15,6 @@ add_subdirectory( lib ) add_subdirectory( killer ) add_subdirectory( resumer ) add_subdirectory( kcmtwin ) -add_subdirectory( pics ) add_subdirectory( clients ) add_subdirectory( oldheaders ) add_subdirectory( data ) @@ -40,10 +39,18 @@ link_directories( install( FILES KWinInterface.h DESTINATION ${INCLUDE_INSTALL_DIR} ) -##### other data ################################ +##### icons ##################################### tde_install_icons( twin ) +install( + DIRECTORY pics/ + DESTINATION ${DATA_INSTALL_DIR}/twin/pics + FILES_MATCHING PATTERN *.png +) + +##### other data ################################ + tde_create_translated_desktop( SOURCE eventsrc DESTINATION ${DATA_INSTALL_DIR}/twin diff --git a/twin/pics/CMakeLists.txt b/twin/pics/CMakeLists.txt deleted file mode 100644 index e9068f5d9..000000000 --- a/twin/pics/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -install( FILES - close.png maximize.png maximizedown.png menu.png - iconify.png pindown.png pinup.png unknown.png fog.png - fog-grey.png bluesun.png greenie.light.png greenie.dim.png - DESTINATION ${DATA_INSTALL_DIR}/twin/pics ) diff --git a/twin/pics/tile_bottom.png b/twin/pics/tile_bottom.png Binary files differnew file mode 100644 index 000000000..de6a89093 --- /dev/null +++ b/twin/pics/tile_bottom.png diff --git a/twin/pics/tile_bottomleft.png b/twin/pics/tile_bottomleft.png Binary files differnew file mode 100644 index 000000000..30ae6d94d --- /dev/null +++ b/twin/pics/tile_bottomleft.png diff --git a/twin/pics/tile_bottomright.png b/twin/pics/tile_bottomright.png Binary files differnew file mode 100644 index 000000000..34ef23211 --- /dev/null +++ b/twin/pics/tile_bottomright.png diff --git a/twin/pics/tile_left.png b/twin/pics/tile_left.png Binary files differnew file mode 100644 index 000000000..14a77d1a6 --- /dev/null +++ b/twin/pics/tile_left.png diff --git a/twin/pics/tile_right.png b/twin/pics/tile_right.png Binary files differnew file mode 100644 index 000000000..c04d5fc1b --- /dev/null +++ b/twin/pics/tile_right.png diff --git a/twin/pics/tile_top.png b/twin/pics/tile_top.png Binary files differnew file mode 100644 index 000000000..ca1e277e8 --- /dev/null +++ b/twin/pics/tile_top.png diff --git a/twin/pics/tile_topleft.png b/twin/pics/tile_topleft.png Binary files differnew file mode 100644 index 000000000..1e0cd5b9e --- /dev/null +++ b/twin/pics/tile_topleft.png diff --git a/twin/pics/tile_topright.png b/twin/pics/tile_topright.png Binary files differnew file mode 100644 index 000000000..c0316cfa2 --- /dev/null +++ b/twin/pics/tile_topright.png diff --git a/twin/useractions.cpp b/twin/useractions.cpp index 64f3199d6..821828e19 100644 --- a/twin/useractions.cpp +++ b/twin/useractions.cpp @@ -49,23 +49,23 @@ TQPopupMenu* Workspace::makeTileMenu() TQPopupMenu *m = new TQPopupMenu; // Tile to side (the menu id matched the ActiveBorder index used for tiling) - int id = m->insertItem( i18n("&Left"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) ); + int id = m->insertItem( SmallIconSet("tile_left"), i18n("&Left"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) ); m->setItemParameter( id, 6 ); - id = m->insertItem( i18n("&Right"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) ); + id = m->insertItem( SmallIconSet("tile_right"), i18n("&Right"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) ); m->setItemParameter( id, 2 ); - id = m->insertItem( i18n("&Top"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) ); + id = m->insertItem( SmallIconSet("tile_top"), i18n("&Top"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) ); m->setItemParameter( id, 0 ); - id = m->insertItem( i18n("&Bottom"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) ); + id = m->insertItem( SmallIconSet("tile_bottom"), i18n("&Bottom"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) ); m->setItemParameter( id, 4 ); // Tile to corner (the menu id matched the ActiveBorder index used for tiling) - id = m->insertItem( i18n("Top &Left"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) ); + id = m->insertItem( SmallIconSet("tile_topleft"), i18n("Top &Left"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) ); m->setItemParameter( id, 7 ); - id = m->insertItem( i18n("Top &Right"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) ); + id = m->insertItem( SmallIconSet("tile_topright"), i18n("Top &Right"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) ); m->setItemParameter( id, 1 ); - id = m->insertItem( i18n("Bottom L&eft"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) ); + id = m->insertItem( SmallIconSet("tile_bottomleft"), i18n("Bottom L&eft"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) ); m->setItemParameter( id, 5 ); - id = m->insertItem( i18n("&Bottom R&ight"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) ); + id = m->insertItem( SmallIconSet("tile_bottomright"), i18n("&Bottom R&ight"), this, TQ_SLOT( tileCurrentWindowToBorder(int) ) ); m->setItemParameter( id, 3 ); return m; |