[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.5/kdebase/kioslave/media
From: Kevin Ottens <ervin () kde ! org>
Date: 2005-10-26 18:19:32
Message-ID: 1130350772.536400.31929.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 474560 by ervin:
Currently, we can't open a blank CD/DVD using media:/.
Moreover there's no need to popup the dialog when only the "do nothing"
action can be proposed.
M +6 -0 libmediacommon/notifieropenaction.cpp
M +1 -0 libmediacommon/notifieropenaction.h
M +11 -3 medianotifier/medianotifier.cpp
--- branches/KDE/3.5/kdebase/kioslave/media/libmediacommon/notifieropenaction.cpp #474559:474560
@@ -37,3 +37,9 @@
{
medium.run();
}
+
+bool NotifierOpenAction::supportsMimetype( const QString &mimetype ) const
+{
+ return !mimetype.contains( "blank" );
+}
+
--- branches/KDE/3.5/kdebase/kioslave/media/libmediacommon/notifieropenaction.h #474559:474560
@@ -28,6 +28,7 @@
NotifierOpenAction();
virtual QString id() const;
virtual void execute(KFileItem &medium);
+ bool supportsMimetype( const QString &mimetype ) const;
};
#endif
--- branches/KDE/3.5/kdebase/kioslave/media/medianotifier/medianotifier.cpp #474559:474560
@@ -265,9 +265,17 @@
if ( settings->autoActionForMimetype( medium.mimetype() )==0L )
{
- NotificationDialog *dialog
- = new NotificationDialog( medium, settings );
- dialog->show();
+ QValueList<NotifierAction*> actions
+ = settings->actionsForMimetype( medium.mimetype() );
+
+ // If only one action remains, it's the "do nothing" action
+ // no need to popup in this case.
+ if ( actions.size()>1 )
+ {
+ NotificationDialog *dialog
+ = new NotificationDialog( medium, settings );
+ dialog->show();
+ }
}
else
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic