Skip to content

Commit

Permalink
added menu item for choosing an other music folder
Browse files Browse the repository at this point in the history
  • Loading branch information
artemanufrij committed Oct 1, 2017
1 parent d0b0e41 commit ab9ec7f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 18 deletions.
2 changes: 1 addition & 1 deletion data/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
install (FILES com.github.artemanufrij.playmymusic.desktop DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/applications)
#install (FILES com.github.artemanufrij.playmymusic.appdata.xml DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/metainfo)
install (FILES com.github.artemanufrij.playmymusic.appdata.xml DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/metainfo)

install (FILES icons/artemanufrij.playmymusic.svg DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/icons/hicolor/)
install (FILES icons/32/artemanufrij.playmymusic.svg DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/icons/hicolor/32x32/apps/)
Expand Down
16 changes: 0 additions & 16 deletions debian/control~

This file was deleted.

13 changes: 12 additions & 1 deletion src/MainWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,17 @@ namespace PlayMyMusic {
app_menu.set_image (new Gtk.Image.from_icon_name ("open-menu", Gtk.IconSize.LARGE_TOOLBAR));

var settings_menu = new Gtk.Menu ();
var menu_item_import = new Gtk.MenuItem.with_label (_("Import to Library…"));

var menu_item_library = new Gtk.MenuItem.with_label(_("Change Music Folder…"));
menu_item_library.activate.connect (() => {
var folder = library_manager.choose_folder ();
if(folder != null) {
settings.library_location = folder;
library_manager.scan_local_library (folder);
}
});

var menu_item_import = new Gtk.MenuItem.with_label (_("Import Music…"));
menu_item_import.activate.connect (() => {
var folder = library_manager.choose_folder ();
if(folder != null) {
Expand All @@ -202,6 +212,7 @@ namespace PlayMyMusic {
library_manager.rescan_library ();
});

settings_menu.append (menu_item_library);
settings_menu.append (menu_item_import);
settings_menu.append (new Gtk.SeparatorMenuItem ());
settings_menu.append (menu_item_rescan);
Expand Down

0 comments on commit ab9ec7f

Please sign in to comment.