"Fossies" - the Fresh Open Source Software Archive

Member "audacious-plugins-3.10.1/src/skins-qt/actions.cc" (26 Dec 2018, 3081 Bytes) of package /linux/misc/audacious-plugins-3.10.1.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "actions.cc" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 3.9_vs_3.10.

    1 /*  Audacious - Cross-platform multimedia player
    2  *  Copyright (C) 2005-2011  Audacious development team.
    3  *
    4  *  BMP - Cross-platform multimedia player
    5  *  Copyright (C) 2003-2004  BMP development team.
    6  *
    7  *  Based on XMMS:
    8  *  Copyright (C) 1998-2003  XMMS development team.
    9  *
   10  *  This program is free software; you can redistribute it and/or modify
   11  *  it under the terms of the GNU General Public License as published by
   12  *  the Free Software Foundation; under version 3 of the License.
   13  *
   14  *  This program is distributed in the hope that it will be useful,
   15  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
   16  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   17  *  GNU General Public License for more details.
   18  *
   19  *  You should have received a copy of the GNU General Public License
   20  *  along with this program.  If not, see <http://www.gnu.org/licenses>.
   21  *
   22  *  The Audacious team does not consider modular code linking to
   23  *  Audacious or using our public API to be a derived work.
   24  */
   25 
   26 #include "actions-mainwin.h"
   27 #include "actions-playlist.h"
   28 #include "main.h"
   29 #include "plugin-window.h"
   30 
   31 #include "../ui-common/menu-ops.h"
   32 
   33 #include <libaudcore/drct.h>
   34 #include <libaudcore/i18n.h>
   35 #include <libaudcore/playlist.h>
   36 #include <libaudcore/plugins.h>
   37 #include <libaudqt/libaudqt.h>
   38 
   39 #define ACTIVE (Playlist::active_playlist ())
   40 
   41 void action_ab_clear ()
   42 {
   43     mainwin_show_status_message (_("Repeat points cleared."));
   44     aud_drct_set_ab_repeat (-1, -1);
   45 }
   46 
   47 void action_ab_set ()
   48 {
   49     if (aud_drct_get_length () > 0)
   50     {
   51         int a, b;
   52         aud_drct_get_ab_repeat (a, b);
   53 
   54         if (a < 0 || b >= 0)
   55         {
   56             a = aud_drct_get_time ();
   57             b = -1;
   58             mainwin_show_status_message (_("Repeat point A set."));
   59         }
   60         else
   61         {
   62             b = aud_drct_get_time ();
   63             mainwin_show_status_message (_("Repeat point B set."));
   64         }
   65 
   66         aud_drct_set_ab_repeat (a, b);
   67     }
   68 }
   69 
   70 void action_play_file ()
   71     { audqt::fileopener_show (audqt::FileMode::Open); }
   72 void action_play_folder ()
   73     { audqt::fileopener_show (audqt::FileMode::OpenFolder); }
   74 void action_play_location ()
   75     { audqt::urlopener_show (true); }
   76 
   77 void action_playlist_manager ()
   78 {
   79     PluginHandle * manager = aud_plugin_lookup_basename ("playlist-manager-qt");
   80     if (manager)
   81     {
   82         aud_plugin_enable (manager, true);
   83         focus_plugin_window (manager);
   84     }
   85 }
   86 
   87 void action_search_tool ()
   88 {
   89     PluginHandle * search = aud_plugin_lookup_basename ("search-tool-qt");
   90     if (search)
   91     {
   92         aud_plugin_enable (search, true);
   93         focus_plugin_window (search);
   94     }
   95 }
   96 
   97 void action_playlist_rename ()
   98     { audqt::playlist_show_rename (ACTIVE); }
   99 void action_playlist_delete ()
  100     { audqt::playlist_confirm_delete (ACTIVE); }
  101 
  102 void action_playlist_add_url ()
  103     { audqt::urlopener_show (false); }
  104 void action_playlist_add_files ()
  105     { audqt::fileopener_show (audqt::FileMode::Add ); }
  106 void action_playlist_add_folder ()
  107     { audqt::fileopener_show (audqt::FileMode::AddFolder ); }