Review Request 122352: dolphin: SpaceInfoToolsMenu: introduce KMoreTools

Gregor Mi codestruct at posteo.org
Sun Feb 1 23:05:22 GMT 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122352/
-----------------------------------------------------------

(Updated Feb. 1, 2015, 11:05 p.m.)


Review request for Dolphin, Dominik Haumann, Emmanuel Pescosta, Eike Hein, and Michael Lutynski.


Changes
-------

- use QLatin1String around strings
- icons can also be .svg (instead of only .png)
- add support for programs that don't install a desktop file (like gitk)


Repository: kde-baseapps


Description
-------

As said in https://git.reviewboard.kde.org/r/121478/ I created a set of classes called "KMoreTools" that should help with "more tools" scenarios like this one. The corresponding wiki page is now https://community.kde.org/Scratchpad/KMoreToolsFramework. The code examples there are not up-to-date, the latest demo code is in this RR.

Though the classes around KMoreTools are designed so that it could be used in any KDE application, for this RR I added it to dolphin because SpaceInfoToolsMenu is a first use-case and proof-of-concept for KMoreTools.

>From the standpoint of SpaceInfoToolsMenu (dolphin/src/statusbar/spaceinfotoolsmenu.cpp) the following has improved:

- The code for creating the menu is shorter and better readable.
- Not-installed applications are now automatically placed to the new "More" submenu under the "Not installed" menu section.
- The "More" menu is not created when not needed (e.g. when all applications in the menu are installed)
- A new application was added: gparted, which is placed in the "More" submenu by default.
- For "Not installed" applications there is a menu item that opens the applications homepage in the default browser or a hint if no such information was provided.
- Slightly reduced amount of needed translations since the not-installed handling is done by KMoreTools

There are some discussion points like the installation location of the locally-copied desktop files (kmt-desktopfiles).

I propose to use KMoreTools in its current state (after review) as replacement for the current SpaceInfoTools implementation. If it is considered useful it could be somewhen moved to a common module


Diffs (updated)
-----

  dolphin/src/kmoretools/kmoretools.h PRE-CREATION 
  dolphin/src/kmoretools/kmoretools.cpp PRE-CREATION 
  dolphin/src/statusbar/kmt-desktopfiles/filelight.desktop PRE-CREATION 
  dolphin/src/statusbar/kmt-desktopfiles/gparted.desktop PRE-CREATION 
  dolphin/src/statusbar/kmt-desktopfiles/gparted.png PRE-CREATION 
  dolphin/src/statusbar/kmt-desktopfiles/kdf.desktop PRE-CREATION 
  dolphin/src/statusbar/kmt-desktopfiles/myinvalidfileapp.desktop PRE-CREATION 
  dolphin/src/statusbar/kmt-desktopfiles/mynotinstalledapp.desktop PRE-CREATION 
  dolphin/src/statusbar/kmt-desktopfiles/mynotinstalledapp.png PRE-CREATION 
  dolphin/src/statusbar/spaceinfotoolsmenu.cpp bd3d648c9a2b6fc1f7806890813ced24756ec197 
  dolphin/src/kmoretools/CMakeLists.later.txt PRE-CREATION 
  dolphin/src/CMakeLists.txt 748b09316bdb4961c1ef21c5609655d39805194f 

Diff: https://git.reviewboard.kde.org/r/122352/diff/


Testing
-------


Thanks,

Gregor Mi

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20150201/976444c2/attachment.htm>


More information about the kfm-devel mailing list