Image 01
profile-image

feder77

Federico Valido
Simple mount Iso service menu

Dolphin Service Menus by virgolus 19 comments

Hi! Nice idea!

Some improvements:
* Handle errors.
* There's no need to ask for mounted directory when unmounting.
* Support for OS without sudo configured [0]

[0]= Using gksu instead of sudo. Ok, I know, we are using kde, not gnome, but I like gksu very much.

Implementation:
[Desktop Action mountiso]
Exec=mntDir=`kdialog --getexistingdirectory ~/` && gksu -- mount -o loop -t iso9660 "%u" "$mntDir" && dolphin "$mntDir" || kdialog --error "Error mounting!"
...

[Desktop Action umountiso]
Exec=mntDir=`mount | grep iso | grep "%u" | sed 's/.* on \\(.*\\) type iso9660.*/\\1/' | perl -e '$matches = 1; while (<STDIN>) { print "$_"; if (!($_ =~ /^$/)) { $matches = 0 } }; exit $matches;'` && ( gksu -- umount "$mntDir" && kdialog --passivepopup "Unmounted!" || kdialog --error "Error unmounting!" ) || kdialog --error "Not mounted!"

Cheers! - Apr 23 2012
Takeoff

Plasma 4 Extensions by joseexposito89 185 comments

Thank you!
Finally the solution I found was using the grabKeyboard() function for the menuWidget

$ vi src/takeoff/takeoff_widget/TakeoffWidget.cpp

// Modify setFirstTab(bool) function
void TakeoffWidget::setFirstTab(bool changeMenuTab)
{
this->tabBar->setCurrentIndex(0);

// fix problem with keyboard shortcut
this->menuWidget->grabKeyboard();

if (changeMenuTab)
this->menuWidget->setFirstCategory();
}


plasma-desktop will complain in stdout/stderr with...

QGraphicsItem::grabKeyboard: already a keyboard grabber

... but that doesn't seems to be a problem.

The qt API, or the takeoff code, is strange to me so it could exists a better solution.

--

As an enhancement proposal, among other things that were proposed before, I think that It may be great to have a search button more like the kde's "Run command" (but I know it will require a lot of work).

Thank you again! - Mar 26 2012
Takeoff

Plasma 4 Extensions by joseexposito89 185 comments

Hi José! Excellent app! I think it should became part of kde as an alternative to the official kde launcher!

I have a problem that I can't figure out how to solve. When I use the plasmoid with a keyboard shortcut (ALT-F1 for example), the launcher never gets focus (actually task bar get's it). So I can't use the search function. In order to give focus to the launcher then I should click it with the mouse or launch it directly using the mouse. That takes away many benefits to the search function.
I've tried to modify your original code, but without results. The kde original launcher give focus to search box when using a keyboard shortcut so it should be possible to fix this problem.

I am using the launcher v1.0 (tar.gz package, compiled by myself), with kde 4.7.4 (debian wheezy).

Can you give me an idea of wich part of the code should I look to fix it? or wich API's function I should call? (I've tried out with some features of Popup applet without results)

Saludos y gracias!! :) - Mar 26 2012
Takeoff

Plasma 4 Extensions
by joseexposito89

8 .5
Mar 26 2012
Takeoff

Plasma 4 Extensions
by joseexposito89

8 .5
9   Mar 26 2012