├── .gitignore ├── AUTHORS ├── COPYING ├── ChangeLog ├── FAQ ├── Makefile.am ├── NEWS ├── README ├── autogen.sh ├── configure.ac ├── data ├── .gitignore ├── Makefile.am ├── album.png ├── artist.png ├── cover.png ├── genre.png ├── icons │ ├── 128x128 │ │ ├── Makefile.am │ │ └── pragha.png │ ├── 16x16 │ │ ├── Makefile.am │ │ ├── pragha-panel.png │ │ └── pragha.png │ ├── 24x24 │ │ ├── Makefile.am │ │ ├── pragha-panel.png │ │ └── pragha.png │ ├── 32x32 │ │ ├── Makefile.am │ │ ├── pragha-panel.png │ │ └── pragha.png │ ├── 48x48 │ │ ├── Makefile.am │ │ └── pragha.png │ ├── 64x64 │ │ ├── Makefile.am │ │ └── pragha.png │ ├── Makefile.am │ └── symbolic │ │ ├── Makefile.am │ │ └── pragha-panel-symbolic.svg ├── io.github.pragha_music_player.metainfo.xml.in ├── pragha.1 ├── pragha.desktop.in ├── track.png └── ui │ ├── Makefile.am │ └── pragha.css ├── plugins ├── .gitignore ├── Makefile.am ├── acoustid │ ├── Makefile.am │ ├── acoustid.plugin │ └── pragha-acoustid-plugin.c ├── ampache │ ├── Makefile.am │ ├── ampache.plugin │ ├── pragha-ampache-plugin.c │ └── pragha-ampache-plugin.h ├── cdrom │ ├── Makefile.am │ ├── cdrom.plugin │ ├── pragha-cdrom-plugin.c │ └── pragha-cdrom-plugin.h ├── dlna-renderer │ ├── Makefile.am │ ├── dlna-renderer.plugin │ ├── pragha-dlna-renderer-plugin.c │ └── pragha-dlna-renderer-plugin.h ├── dlna │ ├── Makefile.am │ ├── dlna.plugin │ ├── pragha-dlna-plugin.c │ └── pragha-dlna-plugin.h ├── keybinder │ ├── Makefile.am │ ├── keybinder.plugin │ ├── pragha-keybinder-plugin.c │ └── pragha-keybinder-plugin.h ├── koel │ ├── Makefile.am │ ├── koel.plugin │ ├── pragha-koel-plugin.c │ └── pragha-koel-plugin.h ├── lastfm │ ├── Makefile.am │ ├── lastfm.plugin │ ├── pragha-lastfm-menu.ui │ └── pragha-lastfm-plugin.c ├── mpris2 │ ├── Makefile.am │ ├── mpris2.plugin │ ├── pragha-mpris2-plugin.c │ └── pragha-mpris2-plugin.h ├── mtp │ ├── Makefile.am │ ├── mtp.plugin │ ├── pragha-devices-mtp.c │ ├── pragha-mtp-musicobject.c │ ├── pragha-mtp-musicobject.h │ ├── pragha-mtp-thread-data.c │ ├── pragha-mtp-thread-data.h │ ├── pragha-mtp-thread.c │ └── pragha-mtp-thread.h ├── notify │ ├── Makefile.am │ ├── notify.plugin │ └── pragha-notify-plugin.c ├── pragha-plugin-macros.h ├── removable-media │ ├── Makefile.am │ ├── pragha-devices-removable.c │ └── removable.plugin ├── song-info │ ├── Makefile.am │ ├── pragha-song-info-cache.c │ ├── pragha-song-info-cache.h │ ├── pragha-song-info-dialog.c │ ├── pragha-song-info-dialog.h │ ├── pragha-song-info-pane.c │ ├── pragha-song-info-pane.h │ ├── pragha-song-info-plugin.c │ ├── pragha-song-info-plugin.h │ ├── pragha-song-info-thread-albumart.c │ ├── pragha-song-info-thread-albumart.h │ ├── pragha-song-info-thread-artistart.c │ ├── pragha-song-info-thread-artistart.h │ ├── pragha-song-info-thread-dialog.c │ ├── pragha-song-info-thread-dialog.h │ ├── pragha-song-info-thread-pane.c │ ├── pragha-song-info-thread-pane.h │ ├── pragha-song-info.ui │ └── song-info.plugin ├── subsonic │ ├── Makefile.am │ ├── pragha-subsonic-api.c │ ├── pragha-subsonic-api.h │ ├── pragha-subsonic-plugin.c │ ├── pragha-subsonic-plugin.h │ ├── pragha-subsonic-preferences.c │ ├── pragha-subsonic-preferences.h │ └── subsonic.plugin ├── tunein │ ├── Makefile.am │ ├── pragha-tunein-plugin.c │ └── tunein.plugin └── visualizer │ ├── Makefile.am │ ├── pragha-visualizer-particle.c │ ├── pragha-visualizer-particle.h │ ├── pragha-visualizer-plugin.c │ ├── pragha-visualizer-plugin.h │ ├── pragha-visualizer.c │ ├── pragha-visualizer.h │ └── visualizer.plugin ├── po ├── .gitignore ├── ChangeLog ├── POTFILES.in ├── POTFILES.skip ├── ar.po ├── bg.po ├── ca_ES.po ├── cs.po ├── da.po ├── de.po ├── el.po ├── es.po ├── fr.po ├── hu.po ├── id.po ├── it.po ├── ja.po ├── ko_KR.po ├── lt.po ├── nl.po ├── no.po ├── pl.po ├── pragha.pot ├── pt.po ├── pt_BR.po ├── ru.po ├── sk.po ├── sv.po ├── tr.po ├── uk.po ├── vi.po └── zh_CN.po └── src ├── .gitignore ├── Makefile.am ├── gtkcellrendererbubble.c ├── gtkcellrendererbubble.h ├── info-bar-import-music.c ├── libpragha.pc.in ├── main.c ├── pragha-album-art.c ├── pragha-album-art.h ├── pragha-app-notification-container.c ├── pragha-app-notification-container.h ├── pragha-app-notification.c ├── pragha-app-notification.h ├── pragha-art-cache.c ├── pragha-art-cache.h ├── pragha-backend.c ├── pragha-backend.h ├── pragha-background-task-bar.c ├── pragha-background-task-bar.h ├── pragha-background-task-widget.c ├── pragha-background-task-widget.h ├── pragha-cmdline.c ├── pragha-database-provider.c ├── pragha-database-provider.h ├── pragha-database.c ├── pragha-database.h ├── pragha-debug.c ├── pragha-debug.h ├── pragha-device-client.c ├── pragha-device-client.h ├── pragha-dnd.c ├── pragha-dnd.h ├── pragha-equalizer-dialog.c ├── pragha-equalizer-dialog.h ├── pragha-favorites.c ├── pragha-favorites.h ├── pragha-file-utils.c ├── pragha-file-utils.h ├── pragha-filter-dialog.c ├── pragha-filter-dialog.h ├── pragha-hig.c ├── pragha-hig.h ├── pragha-library-pane.c ├── pragha-library-pane.h ├── pragha-menubar.c ├── pragha-menubar.h ├── pragha-music-enum.c ├── pragha-music-enum.h ├── pragha-musicobject-mgmt.c ├── pragha-musicobject-mgmt.h ├── pragha-musicobject.c ├── pragha-musicobject.h ├── pragha-playback.c ├── pragha-playback.h ├── pragha-playlist.c ├── pragha-playlist.h ├── pragha-playlists-mgmt.c ├── pragha-playlists-mgmt.h ├── pragha-plugins-engine.c ├── pragha-plugins-engine.h ├── pragha-preferences-dialog.c ├── pragha-preferences-dialog.h ├── pragha-preferences.c ├── pragha-preferences.h ├── pragha-prepared-statement-private.h ├── pragha-prepared-statement.c ├── pragha-prepared-statement.h ├── pragha-provider.c ├── pragha-provider.h ├── pragha-scanner.c ├── pragha-scanner.h ├── pragha-search-entry.c ├── pragha-search-entry.h ├── pragha-session.c ├── pragha-session.h ├── pragha-sidebar.c ├── pragha-sidebar.h ├── pragha-simple-async.c ├── pragha-simple-async.h ├── pragha-simple-widgets.c ├── pragha-simple-widgets.h ├── pragha-song-cache.c ├── pragha-song-cache.h ├── pragha-statusbar.c ├── pragha-statusbar.h ├── pragha-statusicon.c ├── pragha-statusicon.h ├── pragha-tagger.c ├── pragha-tagger.h ├── pragha-tags-dialog.c ├── pragha-tags-dialog.h ├── pragha-tags-mgmt.c ├── pragha-tags-mgmt.h ├── pragha-temp-provider.c ├── pragha-temp-provider.h ├── pragha-toolbar.c ├── pragha-toolbar.h ├── pragha-utils.c ├── pragha-utils.h ├── pragha-window.c ├── pragha-window.h ├── pragha-window.ui ├── pragha.c ├── pragha.h ├── win32 ├── Makefile.am ├── README ├── pragha.ico ├── pragha.rc ├── win32dep.c └── win32dep.h ├── xml_helper.c └── xml_helper.h /.gitignore: -------------------------------------------------------------------------------- 1 | compile 2 | config.* 3 | configure 4 | INSTALL 5 | *.cache 6 | *.m4 7 | /depcomp 8 | /install-sh 9 | /libtool 10 | /Makefile 11 | /Makefile.in 12 | /missing 13 | /mkinstalldirs 14 | /ltmain.sh 15 | /stamp-h1 16 | *.tar.bz2 17 | *Makefile.in 18 | *Makefile 19 | *-ui.h 20 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pragha-music-player/pragha/c6459372d14926a7ad63310c2a1df798c9aa980b/AUTHORS -------------------------------------------------------------------------------- /FAQ: -------------------------------------------------------------------------------- 1 | Frequently Answered Questions 2 | ============================= 3 | 4 | Q. Pragha does not play certain audio file. 5 | A. Pragha adds new audio formats on a par with taglib. 6 | If compiled with taglib = 1.4, pragha support ogg, flac, mpeg, wav 7 | and all variants. If taglib = 1.6 add support to asf, wma and m4a. 8 | If taglib >= 1.7 also support ape files. 9 | Then you need to install the gstreamer codecs needed to play them. 10 | In general installing gstreamer-plugins-bad and gstreamer-plugins-ugly 11 | you can play all files. 12 | 13 | Q. Pragha does not use symbolic icons. 14 | A. It was decided to use generic icons, and leave trhe design problems, to the 15 | designers!. 16 | As a developer, I just want to show an icon that when clicked, must start 17 | the playback. "media-playback-start" sounds good. Do not?. Well, The 18 | GNOME developers recommend using "media-playback-start-symbolic". Why?. 19 | because the icon may not look good with dark themes. Ok.. But this is my 20 | problem? No!. It's from the designers. 21 | They can make the icons look symbolic where they think convenient. You do not 22 | believe me? Add the following line to your favorite theme. 23 | '.header-bar { -gtk-icon-style: symbolic; }' 24 | or "GtkHeaderBar {-gtk-icon-style: symbolic;}' if you use gtk3 < 3.20. 25 | In the same way you can force system tray icons symbolics adding this line 26 | 'GtkTrayIcon { -gtk-icon-style: symbolic; }" 27 | If you only want to change the Pragha icons, you can do it by adding a file 28 | '~/.config/pragha/custom.css' with this. 29 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = \ 2 | data \ 3 | po \ 4 | src 5 | 6 | if HAVE_LIBPEAS 7 | SUBDIRS += plugins 8 | endif 9 | 10 | AUTOMAKE_OPTIONS = \ 11 | 1.8 \ 12 | dist-bzip2 13 | 14 | doc_DATA = ChangeLog FAQ NEWS README 15 | 16 | EXTRA_DIST = \ 17 | $(text_DATA) \ 18 | $(doc_DATA) 19 | 20 | transifex-setup: 21 | tx init 22 | tx set --auto-remote https://www.transifex.com/projects/p/Pragha/ 23 | tx set --auto-local -r Pragha.Pragha 'po/.po' --source-lang en --source-file po/pragha.pot --execute 24 | 25 | transifex-pull: 26 | tx pull -a -f 27 | @echo "You can now git commit -a -m 'Transfix pull, *.po update'" 28 | 29 | transifex-push: 30 | tx push -s 31 | @echo "You can now git commit -a -m 'Transfix push, pragha.pot update'" 32 | 33 | distclean-local: 34 | rm -rf *.cache *~ 35 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Pragha is a Lightweight Music Player for GNU/Linux, based on Gtk and sqlite. 2 | It is completely written in C, constructed to be fast, light, and 3 | simultaneously tries to be complete without obstructing the daily work. ;) 4 | 5 | A tiny history of the project.? 6 | Consonance, An excellent player emerged in the archlinux forums, was 7 | discontinued. The author, Sacamano said in his blog: 8 | "Which doesn't mean that it won't be maintained. I would still be fixing bugs, 9 | but major feature additions are not in the pipeline, because I have completed 10 | all that I wanted to see in Consonance. It has been a fun project. :)" 11 | 12 | Well.. Dissonance is the project to continue developing Consonance, and its 13 | result is Pragha Music Player. A New reproducer of music.. ;) 14 | 15 | Main features: 16 | * Full integration with GTK+3, but always completely independent of 17 | gnome or xfce. 18 | * Two panel design inspired by Amarok 1.4. Library and current playlist. 19 | * Library with multiple views, according to tags or folder structure. 20 | * Search, filter and queue songs on current playlist. 21 | * Play and edit tags of mp3, m4a, ogg, flac, asf, wma, and ape files. 22 | Limited only by codecs installed and taglib version used. 23 | * Playlist management: Export M3U and read M3U, PLS, XSPF and WAX 24 | playlists. 25 | * Playback control with command line. 26 | 27 | Extensible by plugins: 28 | * AcoustID: Get metadata from AcoustID service. 29 | * CD-ROM: Play audio CDs and identify them on CDDB. 30 | * DLNA Server: Share your playlist on a DLNA server. 31 | * DLNA Renderer: Play music from a DLNA server. 32 | * Gnome-Media-Keys: Control pragha with gnome-media-keys daemon. 33 | * Global Hotkeys: Control pragha with multimedia keys. 34 | * Last.fm: Scrobbling, love, unlove song, and append similar song to get 35 | related playlists. 36 | * MPRIS2: Control pragha with mpris2 interface. 37 | * Mtp Devices: Basic Management of MTP devices. 38 | * Notification: Show a notification when changing songs. 39 | * Removable media: Detect removable media and scan it. 40 | * Song-info: Get Artist info, Lyrics and Album art of your songs. 41 | * Get radios: Search radios on TuneIn service. 42 | 43 | Requirements: 44 | * gtk+-3.0 >= 3.8, glib-2.0 >= 2.36 45 | * gstreamer-1.0 >= 1.0, gstreamer-base-1.0 >= 1.0 46 | * taglib >= 1.8 47 | * sqlite3 >= 3.4 48 | 49 | Optional: 50 | * libpeas-1.0 >= 1.0.0 and libpeas-gtk-1.0 >= 1.0.0: Required for all plugins. 51 | * libxfce4ui >= 4.11.0: Better session managament support. Save the current 52 | playlist, last position when saving session, etc. 53 | * totem-plparser >= 2.26: Support to open many more formats and internet radio 54 | playlists. 55 | * gstreamer-plugins-base-devel >= 1.0: Use cubic volume for better volume 56 | control. 57 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "Running Xfce Developer Tools..." 4 | 5 | xdt-autogen $@ 6 | if [ $? -ne 0 ]; then 7 | echo "xdt-autogen Failed" 8 | echo "Please, install xfce4-dev-tools" 9 | echo "or verify Errors" 10 | fi 11 | -------------------------------------------------------------------------------- /data/.gitignore: -------------------------------------------------------------------------------- 1 | io.github.pragha_music_player.metainfo.xml 2 | pragha.desktop 3 | -------------------------------------------------------------------------------- /data/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = icons ui 2 | 3 | appstreamdir = $(datadir)/metainfo/ 4 | appstream_in_files = io.github.pragha_music_player.metainfo.xml.in 5 | appstream_DATA = $(appstream_in_files:.xml.in=.xml) 6 | @INTLTOOL_XML_RULE@ 7 | 8 | desktopdir=$(datadir)/applications 9 | desktop_in_files = pragha.desktop.in 10 | desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) 11 | @INTLTOOL_DESKTOP_RULE@ 12 | 13 | imagedir = $(datadir)/pixmaps/pragha 14 | image_DATA = \ 15 | album.png \ 16 | artist.png \ 17 | track.png \ 18 | cover.png \ 19 | genre.png 20 | 21 | man_MANS = pragha.1 22 | 23 | EXTRA_DIST = \ 24 | $(appstream_in_files) \ 25 | $(desktop_in_files) \ 26 | $(image_DATA) \ 27 | $(man_MANS) 28 | 29 | CLEANFILES = \ 30 | $(appstream_DATA) \ 31 | $(desktop_DATA) 32 | -------------------------------------------------------------------------------- /data/album.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pragha-music-player/pragha/c6459372d14926a7ad63310c2a1df798c9aa980b/data/album.png -------------------------------------------------------------------------------- /data/artist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pragha-music-player/pragha/c6459372d14926a7ad63310c2a1df798c9aa980b/data/artist.png -------------------------------------------------------------------------------- /data/cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pragha-music-player/pragha/c6459372d14926a7ad63310c2a1df798c9aa980b/data/cover.png -------------------------------------------------------------------------------- /data/genre.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pragha-music-player/pragha/c6459372d14926a7ad63310c2a1df798c9aa980b/data/genre.png -------------------------------------------------------------------------------- /data/icons/128x128/Makefile.am: -------------------------------------------------------------------------------- 1 | iconsdir = $(datadir)/icons/hicolor/128x128/apps 2 | icons_DATA = \ 3 | pragha.png 4 | 5 | EXTRA_DIST = \ 6 | $(icons_DATA) -------------------------------------------------------------------------------- /data/icons/128x128/pragha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pragha-music-player/pragha/c6459372d14926a7ad63310c2a1df798c9aa980b/data/icons/128x128/pragha.png -------------------------------------------------------------------------------- /data/icons/16x16/Makefile.am: -------------------------------------------------------------------------------- 1 | iconsdir = $(datadir)/icons/hicolor/16x16/apps 2 | icons_DATA = \ 3 | pragha-panel.png \ 4 | pragha.png 5 | 6 | EXTRA_DIST = \ 7 | $(icons_DATA) 8 | -------------------------------------------------------------------------------- /data/icons/16x16/pragha-panel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pragha-music-player/pragha/c6459372d14926a7ad63310c2a1df798c9aa980b/data/icons/16x16/pragha-panel.png -------------------------------------------------------------------------------- /data/icons/16x16/pragha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pragha-music-player/pragha/c6459372d14926a7ad63310c2a1df798c9aa980b/data/icons/16x16/pragha.png -------------------------------------------------------------------------------- /data/icons/24x24/Makefile.am: -------------------------------------------------------------------------------- 1 | iconsdir = $(datadir)/icons/hicolor/24x24/apps 2 | icons_DATA = \ 3 | pragha-panel.png \ 4 | pragha.png 5 | 6 | EXTRA_DIST = \ 7 | $(icons_DATA) 8 | -------------------------------------------------------------------------------- /data/icons/24x24/pragha-panel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pragha-music-player/pragha/c6459372d14926a7ad63310c2a1df798c9aa980b/data/icons/24x24/pragha-panel.png -------------------------------------------------------------------------------- /data/icons/24x24/pragha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pragha-music-player/pragha/c6459372d14926a7ad63310c2a1df798c9aa980b/data/icons/24x24/pragha.png -------------------------------------------------------------------------------- /data/icons/32x32/Makefile.am: -------------------------------------------------------------------------------- 1 | iconsdir = $(datadir)/icons/hicolor/32x32/apps 2 | icons_DATA = \ 3 | pragha-panel.png \ 4 | pragha.png 5 | 6 | EXTRA_DIST = \ 7 | $(icons_DATA) 8 | -------------------------------------------------------------------------------- /data/icons/32x32/pragha-panel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pragha-music-player/pragha/c6459372d14926a7ad63310c2a1df798c9aa980b/data/icons/32x32/pragha-panel.png -------------------------------------------------------------------------------- /data/icons/32x32/pragha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pragha-music-player/pragha/c6459372d14926a7ad63310c2a1df798c9aa980b/data/icons/32x32/pragha.png -------------------------------------------------------------------------------- /data/icons/48x48/Makefile.am: -------------------------------------------------------------------------------- 1 | iconsdir = $(datadir)/icons/hicolor/48x48/apps 2 | icons_DATA = \ 3 | pragha.png 4 | 5 | EXTRA_DIST = \ 6 | $(icons_DATA) -------------------------------------------------------------------------------- /data/icons/48x48/pragha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pragha-music-player/pragha/c6459372d14926a7ad63310c2a1df798c9aa980b/data/icons/48x48/pragha.png -------------------------------------------------------------------------------- /data/icons/64x64/Makefile.am: -------------------------------------------------------------------------------- 1 | iconsdir = $(datadir)/icons/hicolor/64x64/apps 2 | icons_DATA = \ 3 | pragha.png 4 | 5 | EXTRA_DIST = \ 6 | $(icons_DATA) -------------------------------------------------------------------------------- /data/icons/64x64/pragha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pragha-music-player/pragha/c6459372d14926a7ad63310c2a1df798c9aa980b/data/icons/64x64/pragha.png -------------------------------------------------------------------------------- /data/icons/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = \ 2 | 16x16 \ 3 | 24x24 \ 4 | 32x32 \ 5 | 48x48 \ 6 | 64x64 \ 7 | 128x128 \ 8 | symbolic 9 | 10 | gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor 11 | 12 | update-icon-cache: 13 | @-if test -z "$(DESTDIR)"; then \ 14 | echo "Updating Gtk icon cache."; \ 15 | $(gtk_update_icon_cache); \ 16 | else \ 17 | echo "*** Icon cache not updated. Remember to run:"; \ 18 | echo "***"; \ 19 | echo "*** $(gtk_update_icon_cache)"; \ 20 | echo "***"; \ 21 | fi 22 | 23 | install-data-hook: update-icon-cache 24 | uninstall-hook: update-icon-cache 25 | 26 | distuninstallcheck_listfiles = \ 27 | find . -type f -print | grep -v ./share/icons/hicolor/icon-theme.cache 28 | -------------------------------------------------------------------------------- /data/icons/symbolic/Makefile.am: -------------------------------------------------------------------------------- 1 | iconsdir = $(datadir)/icons/hicolor/symbolic/apps 2 | icons_DATA = \ 3 | pragha-panel-symbolic.svg 4 | 5 | EXTRA_DIST = \ 6 | $(icons_DATA) 7 | 8 | -------------------------------------------------------------------------------- /data/io.github.pragha_music_player.metainfo.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | io.github.pragha_music_player 5 | CC0-1.0 6 | GPL-3.0+ 7 | <_name>Pragha Music Player 8 | <_summary>Manage and listen your music 9 | <_description> 10 |

11 | Pragha is a Lightweight Music Player for GNU/Linux, based on GTK3, SQLite, 12 | and completely written in C, constructed to be fast, light, and 13 | simultaneously tries to be complete without obstructing the daily work. 14 | Although it was especifically designed for the Xfce desktop, it integrates 15 | very well in other desktop environments. 16 |

17 |

Features:

18 | 29 | 30 | pragha.desktop 31 | 32 | AudioVideo 33 | Audio 34 | 35 | 36 | <_keyword>audio 37 | <_keyword>multimedia 38 | <_keyword>player 39 | 40 | https://github.com/pragha-music-player/pragha/issues 41 | https://www.bountysource.com/teams/pragha-music-player 42 | https://github.com/pragha-music-player/pragha/wiki/FAQ 43 | http://pragha-music-player.github.io 44 | https://www.transifex.com/projects/p/Pragha/ 45 | 46 | 47 | https://pragha-music-player.github.io/images/Pragha-Xfce-HIG.png 48 | 49 | 50 | https://pragha-music-player.github.io/images/pragha-classic-thumbnail-normal-HiDPI.png 51 | 52 | 53 | https://pragha-music-player.github.io/images/pragha-visuzalizer-thumbnail-normal-HiDPI.png 54 | 55 | 56 | 57 | pragha 58 | mati86dl_at_gmail.com 59 | Matias De lellis 60 | 61 | 62 | 63 | 64 |
65 | -------------------------------------------------------------------------------- /data/pragha.1: -------------------------------------------------------------------------------- 1 | .TH "pragha" "1" "1.3.99.1" "Matias De lellis" "" 2 | .SH "NAME" 3 | .LP 4 | pragha \- A lightweight music player, forked of Consonance Music Manager 5 | .SH "SYNTAX" 6 | .LP 7 | pragha [OPTION...] [FILE1 [FILE2...]] 8 | .SH "DESCRIPTION" 9 | .LP 10 | pragha is a lightweight music player that aims to be fast, bloat\-free, and light on memory consumption. It is written completely in C and GTK+. Some of the features are: 11 | .LP 12 | .br 13 | * Library management using sqlite3 14 | .br 15 | * Multiple views 16 | .br 17 | * OSD support 18 | .br 19 | * asf, ape, flac, mp3, mp4, ogg, wav, wma, and CDDA support 20 | .LP 21 | pragha is released under the GNU General Public Licence version 3 (GPLv3). 22 | 23 | .SH "OPTIONS" 24 | .LP 25 | .TP 26 | \fB\-?, \-\-help\fR 27 | Output help information and exit. 28 | .TP 29 | \fB\-\-help\-all\fR 30 | Output all help options and exit. 31 | .TP 32 | \fB\-\-help\-gtk\fR 33 | Output GTK+ Options and exit. 34 | .TP 35 | \fB\-v, \-\-version\fR 36 | Output version information and exit. 37 | .TP 38 | \fB\-e, \-\-debug\fR 39 | Enable Debug ( Levels: 1,2,3,4 ) 40 | .TP 41 | \fB\-l, \-\-log\-file\fR 42 | Log Debug to a file. 43 | .TP 44 | \fB\-p, \-\-play\fR 45 | Start playing. 46 | .TP 47 | \fB\-s, \-\-stop\fR 48 | Stop playing. 49 | .TP 50 | \fB\-t, \-\-pause\fR 51 | Play/Pause/Resume the current song. 52 | .TP 53 | \fB\-r, \-\-prev\fR 54 | Play the previous song in the playlist. 55 | .TP 56 | \fB\-n, \-\-next\fR 57 | Play the next song in the playlist. 58 | .TP 59 | \fB\-f, \-\-shuffle\fR 60 | Toggle shuffle mode. 61 | .TP 62 | \fB\-u, \-\-repeat\fR 63 | Toggle repeat mode. 64 | .TP 65 | \fB\-i, \-\-inc_vol\fR 66 | Increase the volume by 1. 67 | .TP 68 | \fB\-d, \-\-dec_vol\fR 69 | Decrease the volume by 1. 70 | .TP 71 | \fB\-o, \-\-show_osd\fR 72 | Show OSD notification (a popup window with info about the current song). 73 | .TP 74 | \fB\-x, \-\-toggle_view\fR 75 | Toggle player visibility 76 | .TP 77 | \fB\-c, \-\-current_state\fR 78 | Get current player state. 79 | .TP 80 | \fB\-a, \-\-audio_backend\fR 81 | Audio backend (valid options: alsa/oss) 82 | .TP 83 | \fB\-g, \-\-audio_device\fR 84 | Audio Device (For ALSA: hw:0,0 etc.., For OSS: /dev/dsp etc..) 85 | .TP 86 | \fB\-m, \-\-audio_mixer\fR 87 | Mixer Element (For ALSA: Master, PCM, etc.., For OSS: /dev/mixer, etc...) 88 | .TP 89 | \fB\-\-display=DISPLAY\fR 90 | Set the X display to use. 91 | 92 | .SH "USAGE" 93 | .LP 94 | * Add a library location in menu Edit \- Preferences. 95 | .br 96 | * Rescan Library from menu Tools. 97 | .br 98 | * Start using. :-) 99 | 100 | .SH "FILES" 101 | .TP 102 | $HOME/.config/pragha/pragha.db 103 | Library database (in sqlite3 format) 104 | .TP 105 | $HOME/.config/pragha/config 106 | personal settings (use the GUI interface to change them, Edit \- Preferences) 107 | .TP 108 | $HOME/.cache/pragha-album-art 109 | Basic cache for downloaded cover art saved as artist \- album.jpeg 110 | .SH "AUTHORS" 111 | .nf 112 | Pragha was originally a fork of Consonance written by Sujith 113 | At the moment developed by Matias De lellis. 114 | Man page written by Martin Zelaia 115 | .SH "SEE ALSO" 116 | .LP 117 | http://pragha-music-player.github.io and http://sites.google.com/site/consonancemanager 118 | -------------------------------------------------------------------------------- /data/pragha.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | 4 | Type=Application 5 | 6 | Name=Pragha 7 | _GenericName=Music Player 8 | _Comment=Manage and listen your music 9 | Icon=pragha 10 | 11 | Categories=GTK;AudioVideo;Player; 12 | _Keywords=audio;multimedia;player; 13 | 14 | Exec=pragha %F 15 | TryExec=pragha 16 | Terminal=false 17 | StartupNotify=true 18 | 19 | MimeType=application/x-ape;audio/ape;audio/x-ape;audio/x-m4a;video/x-ms-asf;audio/x-ms-wma;audio/x-mp3;audio/mpeg;audio/x-mpeg;audio/mpeg3;audio/mp3;application/ogg;application/x-ogg;audio/vorbis;audio/x-vorbis;audio/ogg;audio/x-ogg;audio/x-flac;application/x-flac;audio/flac;audio/x-wav;audio/mpegurl;audio/x-mpegurl;audio/x-scpls;application/xspf+xml;audio/x-ms-wax; 20 | -------------------------------------------------------------------------------- /data/track.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pragha-music-player/pragha/c6459372d14926a7ad63310c2a1df798c9aa980b/data/track.png -------------------------------------------------------------------------------- /data/ui/Makefile.am: -------------------------------------------------------------------------------- 1 | styledir = $(datadir)/pragha/style 2 | style_DATA = \ 3 | pragha.css 4 | 5 | EXTRA_DIST = \ 6 | $(style_DATA) 7 | -------------------------------------------------------------------------------- /data/ui/pragha.css: -------------------------------------------------------------------------------- 1 | /* Floating status bar */ 2 | .floating-bar { 3 | padding: 1px; 4 | background-color: @theme_base_color; 5 | border-width: 1px; 6 | border-style: solid solid none; 7 | border-color: @borders; 8 | border-radius: 3px 3px 0 0; 9 | } 10 | 11 | .floating-bar.bottom.left { /* axes left border and border radius */ 12 | border-left-style: none; 13 | border-top-left-radius: 0; 14 | } 15 | .floating-bar.bottom.right { /* axes right border and border radius */ 16 | border-right-style: none; 17 | border-top-right-radius: 0; 18 | } 19 | 20 | .floating-bar:backdrop { 21 | background-color: @theme_unfocused_base_color; 22 | border-color: @unfocused_borders; 23 | } 24 | 25 | .floating-bar button { 26 | padding: 0px; 27 | } 28 | 29 | -------------------------------------------------------------------------------- /plugins/.gitignore: -------------------------------------------------------------------------------- 1 | *.deps* 2 | *.libs* 3 | *.la 4 | *.lo 5 | *~ 6 | -------------------------------------------------------------------------------- /plugins/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = \ 2 | -I$(top_srcdir) \ 3 | -I$(srcdir) \ 4 | $(LIBPEAS_CFLAGS) \ 5 | $(LIB_PEAS_GTK_CFLAGS) \ 6 | $(WARN_CFLAGS) \ 7 | $(DISABLE_DEPRECATED) 8 | 9 | pluginincludedir = $(includedir)/libpragha/plugins 10 | plugininclude_HEADERS = pragha-plugin-macros.h 11 | 12 | SUBDIRS = \ 13 | visualizer 14 | 15 | if DBUS_PLUGINS_SUPPORT 16 | SUBDIRS += \ 17 | mpris2 18 | endif 19 | 20 | if HAVE_LIBGLYR 21 | SUBDIRS += song-info 22 | endif 23 | 24 | if HAVE_LIBKEYBINDER 25 | SUBDIRS += keybinder 26 | endif 27 | 28 | if HAVE_LIBNOTIFY 29 | SUBDIRS += notify 30 | endif 31 | 32 | if HAVE_GUDEV 33 | SUBDIRS += removable-media 34 | if HAVE_LIBMTP 35 | SUBDIRS += mtp 36 | endif 37 | endif 38 | 39 | if HAVE_LIBSOUP 40 | SUBDIRS += acoustid 41 | SUBDIRS += tunein 42 | endif 43 | 44 | if HAVE_RYGEL 45 | SUBDIRS += dlna 46 | endif 47 | 48 | if HAVE_GRILO3 49 | SUBDIRS += dlna-renderer 50 | endif 51 | if HAVE_GRILO2 52 | SUBDIRS += dlna-renderer 53 | endif 54 | 55 | if HAVE_GRILO_NET3 56 | SUBDIRS += ampache 57 | endif 58 | if HAVE_GRILO_NET2 59 | SUBDIRS += ampache 60 | endif 61 | 62 | if HAVE_GRILO_NET3 63 | SUBDIRS += subsonic 64 | endif 65 | if HAVE_GRILO_NET2 66 | SUBDIRS += subsonic 67 | endif 68 | 69 | if HAVE_JSON_GLIB 70 | if HAVE_LIBSOUP 71 | SUBDIRS += koel 72 | endif 73 | endif 74 | 75 | if HAVE_LIBCDIO 76 | if HAVE_LIBCDIO_PARANOIA 77 | if HAVE_LIBCDDB 78 | SUBDIRS += cdrom 79 | endif 80 | endif 81 | endif 82 | 83 | if HAVE_LIBCLASTFM 84 | SUBDIRS += lastfm 85 | endif 86 | 87 | -------------------------------------------------------------------------------- /plugins/acoustid/Makefile.am: -------------------------------------------------------------------------------- 1 | plugindir = $(libdir)/pragha/plugins/acoustid 2 | 3 | AM_CPPFLAGS = \ 4 | -I$(top_srcdir) \ 5 | $(LIBPEAS_CFLAGS) \ 6 | $(LIBPEAS_GTK_CFLAGS) 7 | 8 | plugin_LTLIBRARIES = libacoustid.la 9 | 10 | libacoustid_la_SOURCES = \ 11 | pragha-acoustid-plugin.c 12 | 13 | libacoustid_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) 14 | 15 | libacoustid_la_CFLAGS = \ 16 | $(PRAGHA_CFLAGS) \ 17 | $(LIBSOUP_CFLAGS) 18 | 19 | libacoustid_la_LIBADD = \ 20 | $(PRAGHA_LIBS) \ 21 | $(LIBSOUP_LIBS) \ 22 | $(top_builddir)/src/libpragha.la 23 | 24 | plugin_DATA = acoustid.plugin 25 | 26 | EXTRA_DIST = $(plugin_DATA) 27 | -------------------------------------------------------------------------------- /plugins/acoustid/acoustid.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=acoustid 3 | Name=AcoustID 4 | Description=Get metadata on AcoustID service 5 | Authors=Matias De lellis 6 | Copyright=Copyright © 2014 Matias De lellis 7 | Website=https://github.com/matiasdelellis/pragha 8 | Help=https://github.com/matiasdelellis/pragha 9 | 10 | -------------------------------------------------------------------------------- /plugins/ampache/Makefile.am: -------------------------------------------------------------------------------- 1 | plugindir = $(libdir)/pragha/plugins/ampache 2 | 3 | AM_CPPFLAGS = \ 4 | -I$(top_srcdir) \ 5 | $(LIBPEAS_CFLAGS) \ 6 | $(LIBPEAS_GTK_CFLAGS) 7 | 8 | plugin_LTLIBRARIES = libpampache.la 9 | 10 | libpampache_la_SOURCES = \ 11 | pragha-ampache-plugin.h \ 12 | pragha-ampache-plugin.c 13 | 14 | libpampache_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) 15 | 16 | libpampache_la_CFLAGS = \ 17 | $(PRAGHA_CFLAGS) \ 18 | $(GRILO_NET_CFLAGS) 19 | 20 | libpampache_la_LIBADD = \ 21 | $(PRAGHA_LIBS) \ 22 | $(GRILO_NET_LIBS) \ 23 | $(top_builddir)/src/libpragha.la 24 | 25 | if HAVE_GRILO3 26 | libpampache_la_CFLAGS += $(GRILO_NET3_CFLAGS) 27 | libpampache_la_LIBADD += $(GRILO_NET3_LIBS) 28 | endif 29 | if HAVE_GRILO2 30 | libpampache_la_CFLAGS += $(GRILO_NET2_CFLAGS) 31 | libpampache_la_LIBADD += $(GRILO_NET2_LIBS) 32 | endif 33 | 34 | plugin_DATA = ampache.plugin 35 | 36 | EXTRA_DIST = $(plugin_DATA) 37 | -------------------------------------------------------------------------------- /plugins/ampache/ampache.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=pampache 3 | Name=Ampache Client 4 | Description=Play music on a Ampache server 5 | Authors=Matias De lellis 6 | Copyright=Copyright © 2015 Matias De lellis 7 | Website=https://github.com/matiasdelellis/pragha 8 | Help=https://github.com/matiasdelellis/pragha 9 | 10 | -------------------------------------------------------------------------------- /plugins/ampache/pragha-ampache-plugin.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2015-2019 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef __PRAGHA_AMPACHE_PLUGIN_H__ 19 | #define __PRAGHA_AMPACHE_PLUGIN_H__ 20 | 21 | #include 22 | #include 23 | 24 | G_BEGIN_DECLS 25 | 26 | #define PRAGHA_TYPE_AMPACHE_PLUGIN (pragha_ampache_plugin_get_type ()) 27 | #define PRAGHA_AMPACHE_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PRAGHA_TYPE_AMPACHE_PLUGIN, PraghaAmpachePlugin)) 28 | #define PRAGHA_AMPACHEP_LUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PRAGHA_TYPE_AMPACHE_PLUGIN, PraghaAmpachePlugin)) 29 | #define PRAGHA_IS_AMPACHE_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PRAGHA_TYPE_AMPACHE_PLUGIN)) 30 | #define PRAGHA_IS_AMPACHE_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PRAGHA_TYPE_AMPACHE_PLUGIN)) 31 | #define PRAGHA_AMPACHE_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PRAGHA_TYPE_AMPACHE_PLUGIN, PraghaAmpachePluginClass)) 32 | 33 | GType pragha_ampache_plugin_get_type (void) G_GNUC_CONST; 34 | 35 | G_END_DECLS 36 | 37 | #endif /* __PRAGHA_AMPACHE_PLUGIN_H__ */ 38 | -------------------------------------------------------------------------------- /plugins/cdrom/Makefile.am: -------------------------------------------------------------------------------- 1 | plugindir = $(libdir)/pragha/plugins/cdrom 2 | 3 | AM_CPPFLAGS = \ 4 | -I$(top_srcdir) \ 5 | $(LIBPEAS_CFLAGS) \ 6 | $(LIBPEAS_GTK_CFLAGS) 7 | 8 | plugin_LTLIBRARIES = libcdrom.la 9 | 10 | libcdrom_la_SOURCES = \ 11 | pragha-cdrom-plugin.c \ 12 | pragha-cdrom-plugin.h 13 | 14 | libcdrom_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) 15 | 16 | libcdrom_la_CFLAGS = \ 17 | $(PRAGHA_CFLAGS) \ 18 | $(LIBCDIO_CFLAGS) \ 19 | $(LIBCDDB_CFLAGS) 20 | 21 | libcdrom_la_LIBADD = \ 22 | $(PRAGHA_LIBS) \ 23 | $(LIBCDIO_LIBS) \ 24 | $(LIBCDIO_PARANOIA_LIBS) \ 25 | $(LIBCDDB_LIBS) \ 26 | $(top_builddir)/src/libpragha.la 27 | 28 | plugin_DATA = cdrom.plugin 29 | 30 | EXTRA_DIST = $(plugin_DATA) 31 | -------------------------------------------------------------------------------- /plugins/cdrom/cdrom.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=cdrom 3 | Name=Play cdrom 4 | Description=Play audios cds 5 | Authors=Matias De lellis 6 | Copyright=Copyright © 2014-2019 Matias De lellis 7 | Website=https://github.com/matiasdelellis/pragha 8 | Help=https://github.com/matiasdelellis/pragha 9 | 10 | -------------------------------------------------------------------------------- /plugins/cdrom/pragha-cdrom-plugin.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2009-2019 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_CDROM_PLUGIN_H 19 | #define PRAGHA_CDROM_PLUGIN_H 20 | 21 | #endif /* PRAGHA_CDROM_PLUGIN_H */ 22 | -------------------------------------------------------------------------------- /plugins/dlna-renderer/Makefile.am: -------------------------------------------------------------------------------- 1 | plugindir = $(libdir)/pragha/plugins/dlna-renderer 2 | 3 | AM_CPPFLAGS = \ 4 | -I$(top_srcdir) \ 5 | $(LIBPEAS_CFLAGS) \ 6 | $(LIBPEAS_GTK_CFLAGS) 7 | 8 | plugin_LTLIBRARIES = libpdlnarenderer.la 9 | 10 | libpdlnarenderer_la_SOURCES = \ 11 | pragha-dlna-renderer-plugin.h \ 12 | pragha-dlna-renderer-plugin.c 13 | 14 | libpdlnarenderer_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) 15 | 16 | libpdlnarenderer_la_CFLAGS = \ 17 | $(PRAGHA_CFLAGS) 18 | 19 | libpdlnarenderer_la_LIBADD = \ 20 | $(PRAGHA_LIBS) \ 21 | $(top_builddir)/src/libpragha.la 22 | 23 | if HAVE_GRILO3 24 | libpdlnarenderer_la_CFLAGS += $(GRILO3_CFLAGS) 25 | libpdlnarenderer_la_LIBADD += $(GRILO3_LIBS) 26 | endif 27 | if HAVE_GRILO2 28 | libpdlnarenderer_la_CFLAGS += $(GRILO2_CFLAGS) 29 | libpdlnarenderer_la_LIBADD += $(GRILO2_LIBS) 30 | endif 31 | 32 | plugin_DATA = dlna-renderer.plugin 33 | 34 | EXTRA_DIST = $(plugin_DATA) 35 | -------------------------------------------------------------------------------- /plugins/dlna-renderer/dlna-renderer.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=pdlnarenderer 3 | Name=DLNA Renderer 4 | Description=Play music on a DLNA server 5 | Authors=Matias De lellis 6 | Copyright=Copyright © 2014 Matias De lellis 7 | Website=https://github.com/matiasdelellis/pragha 8 | Help=https://github.com/matiasdelellis/pragha 9 | 10 | -------------------------------------------------------------------------------- /plugins/dlna-renderer/pragha-dlna-renderer-plugin.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2014 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef __PRAGHA_DLNA_RENDERER_PLUGIN_H__ 19 | #define __PRAGHA_DLNA_RENDERER_PLUGIN_H__ 20 | 21 | #include 22 | #include 23 | 24 | #include "src/pragha.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define PRAGHA_TYPE_DLNA_RENDERER_PLUGIN (pragha_dlna_renderer_plugin_get_type ()) 29 | #define PRAGHA_DLNA_RENDERER_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PRAGHA_TYPE_DLNA_RENDERER_PLUGIN, PraghaDlnaRendererPlugin)) 30 | #define PRAGHA_DLNA_RENDERER_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PRAGHA_TYPE_DLNA_RENDERER_PLUGIN, PraghaDlnaRendererPlugin)) 31 | #define PRAGHA_IS_DLNA_RENDERER_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PRAGHA_TYPE_DLNA_RENDERER_PLUGIN)) 32 | #define PRAGHA_IS_DLNA_RENDERER_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PRAGHA_TYPE_DLNA_RENDERER_PLUGIN)) 33 | #define PRAGHA_DLNA_RENDERER_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PRAGHA_TYPE_DLNA_RENDERER_PLUGIN, PraghaDlnaRendererPluginClass)) 34 | 35 | GType pragha_dlna_renderer_plugin_get_type (void) G_GNUC_CONST; 36 | 37 | G_END_DECLS 38 | 39 | #endif /* __PRAGHA_DLNA_RENDERER_PLUGIN_H__ */ 40 | -------------------------------------------------------------------------------- /plugins/dlna/Makefile.am: -------------------------------------------------------------------------------- 1 | plugindir = $(libdir)/pragha/plugins/dlna 2 | 3 | AM_CPPFLAGS = \ 4 | -I$(top_srcdir) \ 5 | $(LIBPEAS_CFLAGS) \ 6 | $(LIBPEAS_GTK_CFLAGS) 7 | 8 | plugin_LTLIBRARIES = libdlna.la 9 | 10 | libdlna_la_SOURCES = \ 11 | pragha-dlna-plugin.h \ 12 | pragha-dlna-plugin.c 13 | 14 | libdlna_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) 15 | 16 | libdlna_la_CFLAGS = \ 17 | $(PRAGHA_CFLAGS) \ 18 | $(RYGEL_CFLAGS) 19 | 20 | libdlna_la_LIBADD = \ 21 | $(PRAGHA_LIBS) \ 22 | $(RYGEL_LIBS) \ 23 | $(top_builddir)/src/libpragha.la 24 | 25 | plugin_DATA = dlna.plugin 26 | 27 | EXTRA_DIST = $(plugin_DATA) 28 | -------------------------------------------------------------------------------- /plugins/dlna/dlna.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=dlna 3 | Name=DLNA Server 4 | Description=Share your playlist on a DLNA server 5 | Authors=Matias De lellis 6 | Copyright=Copyright © 2014 Matias De lellis 7 | Website=https://github.com/matiasdelellis/pragha 8 | Help=https://github.com/matiasdelellis/pragha 9 | 10 | -------------------------------------------------------------------------------- /plugins/dlna/pragha-dlna-plugin.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2014 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef __PRAGHA_DLNA_PLUGIN_H__ 19 | #define __PRAGHA_DLNA_PLUGIN_H__ 20 | 21 | #include 22 | #include 23 | 24 | #include "src/pragha.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define PRAGHA_TYPE_DLNA_PLUGIN (pragha_dlna_plugin_get_type ()) 29 | #define PRAGHA_DLNA_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PRAGHA_TYPE_DLNA_PLUGIN, PraghaDlnaPlugin)) 30 | #define PRAGHA_DLNA_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PRAGHA_TYPE_DLNA_PLUGIN, PraghaDlnaPlugin)) 31 | #define PRAGHA_IS_DLNA_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PRAGHA_TYPE_DLNA_PLUGIN)) 32 | #define PRAGHA_IS_DLNA_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PRAGHA_TYPE_DLNA_PLUGIN)) 33 | #define PRAGHA_DLNA_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PRAGHA_TYPE_DLNA_PLUGIN, PraghaDlnaPluginClass)) 34 | 35 | GType pragha_dlna_plugin_get_type (void) G_GNUC_CONST; 36 | 37 | G_END_DECLS 38 | 39 | #endif /* __PRAGHA_DLNA_PLUGIN_H__ */ 40 | -------------------------------------------------------------------------------- /plugins/keybinder/Makefile.am: -------------------------------------------------------------------------------- 1 | plugindir = $(libdir)/pragha/plugins/keybinder 2 | 3 | AM_CPPFLAGS = \ 4 | -I$(top_srcdir) \ 5 | $(LIBPEAS_CFLAGS) \ 6 | $(LIBPEAS_GTK_CFLAGS) 7 | 8 | plugin_LTLIBRARIES = libkeybinder.la 9 | 10 | libkeybinder_la_SOURCES = \ 11 | pragha-keybinder-plugin.h \ 12 | pragha-keybinder-plugin.c 13 | 14 | libkeybinder_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) 15 | 16 | libkeybinder_la_CFLAGS = \ 17 | $(PRAGHA_CFLAGS) \ 18 | $(LIBKEYBINDER_CFLAGS) 19 | 20 | libkeybinder_la_LIBADD = \ 21 | $(PRAGHA_LIBS) \ 22 | $(LIBKEYBINDER_LIBS) \ 23 | $(top_builddir)/src/libpragha.la 24 | 25 | plugin_DATA = keybinder.plugin 26 | 27 | EXTRA_DIST = $(plugin_DATA) 28 | -------------------------------------------------------------------------------- /plugins/keybinder/keybinder.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=keybinder 3 | Name=Global Hotkeys 4 | Description=Control pragha with multimedia keys 5 | Authors=Matias De lellis 6 | Copyright=Copyright © 2013 Matias De lellis 7 | Website=https://github.com/matiasdelellis/pragha 8 | Help=https://github.com/matiasdelellis/pragha 9 | 10 | -------------------------------------------------------------------------------- /plugins/keybinder/pragha-keybinder-plugin.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2009-2013 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef __PRAGHA_KEYBINDER_PLUGIN_H__ 19 | #define __PRAGHA_KEYBINDER_PLUGIN_H__ 20 | 21 | #include 22 | #include 23 | 24 | #include "src/pragha.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define PRAGHA_TYPE_KEYBINDER_PLUGIN (pragha_keybinder_plugin_get_type ()) 29 | #define PRAGHA_KEYBINDER_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PRAGHA_TYPE_KEYBINDER_PLUGIN, PraghaKeybinderPlugin)) 30 | #define PRAGHA_KEYBINDER_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PRAGHA_TYPE_KEYBINDER_PLUGIN, PraghaKeybinderPlugin)) 31 | #define PRAGHA_IS_KEYBINDER_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PRAGHA_TYPE_KEYBINDER_PLUGIN)) 32 | #define PRAGHA_IS_KEYBINDER_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PRAGHA_TYPE_KEYBINDER_PLUGIN)) 33 | #define PRAGHA_KEYBINDER_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PRAGHA_TYPE_KEYBINDER_PLUGIN, PraghaKeybinderPluginClass)) 34 | 35 | typedef struct _PraghaKeybinderPluginPrivate PraghaKeybinderPluginPrivate; 36 | 37 | struct _PraghaKeybinderPluginPrivate { 38 | PraghaApplication *pragha; 39 | }; 40 | 41 | GType pragha_keybinder_plugin_get_type (void) G_GNUC_CONST; 42 | 43 | G_END_DECLS 44 | 45 | #endif /* __PRAGHA_KEYBINDER_PLUGIN_H__ */ 46 | -------------------------------------------------------------------------------- /plugins/koel/Makefile.am: -------------------------------------------------------------------------------- 1 | plugindir = $(libdir)/pragha/plugins/koel 2 | 3 | AM_CPPFLAGS = \ 4 | -I$(top_srcdir) \ 5 | $(LIBPEAS_CFLAGS) \ 6 | $(LIBPEAS_GTK_CFLAGS) 7 | 8 | plugin_LTLIBRARIES = libpkoel.la 9 | 10 | libpkoel_la_SOURCES = \ 11 | pragha-koel-plugin.h \ 12 | pragha-koel-plugin.c 13 | 14 | libpkoel_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) 15 | 16 | libpkoel_la_CFLAGS = \ 17 | $(LIBSOUP_CFLAGS) \ 18 | $(JSON_GLIB_CFLAGS) \ 19 | $(PRAGHA_CFLAGS) 20 | 21 | libpkoel_la_LIBADD = \ 22 | $(PRAGHA_LIBS) \ 23 | $(LIBSOUP_LIBS) \ 24 | $(JSON_GLIB_LIBS) \ 25 | $(top_builddir)/src/libpragha.la 26 | 27 | plugin_DATA = koel.plugin 28 | 29 | EXTRA_DIST = $(plugin_DATA) 30 | -------------------------------------------------------------------------------- /plugins/koel/koel.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=pkoel 3 | Name=Koel Client 4 | Description=Play music on a Koel Server 5 | Authors=Matias De lellis 6 | Copyright=Copyright © 2018 Matias De lellis 7 | Website=https://github.com/matiasdelellis/pragha 8 | Help=https://github.com/matiasdelellis/pragha 9 | 10 | -------------------------------------------------------------------------------- /plugins/koel/pragha-koel-plugin.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2015-2019 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef __PRAGHA_KOEL_PLUGIN_H__ 19 | #define __PRAGHA_KOEL_PLUGIN_H__ 20 | 21 | #include 22 | #include 23 | 24 | G_BEGIN_DECLS 25 | 26 | #define PRAGHA_TYPE_KOEL_PLUGIN (pragha_koel_plugin_get_type ()) 27 | #define PRAGHA_KOEL_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PRAGHA_TYPE_KOEL_PLUGIN, PraghaKoelPlugin)) 28 | #define PRAGHA_KOELP_LUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PRAGHA_TYPE_KOEL_PLUGIN, PraghaKoelPlugin)) 29 | #define PRAGHA_IS_KOEL_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PRAGHA_TYPE_KOEL_PLUGIN)) 30 | #define PRAGHA_IS_KOEL_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PRAGHA_TYPE_KOEL_PLUGIN)) 31 | #define PRAGHA_KOEL_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PRAGHA_TYPE_KOEL_PLUGIN, PraghaKoelPluginClass)) 32 | 33 | GType pragha_koel_plugin_get_type (void) G_GNUC_CONST; 34 | 35 | G_END_DECLS 36 | 37 | #endif /* __PRAGHA_KOEL_PLUGIN_H__ */ 38 | -------------------------------------------------------------------------------- /plugins/lastfm/Makefile.am: -------------------------------------------------------------------------------- 1 | plugindir = $(libdir)/pragha/plugins/lastfm 2 | 3 | AM_CPPFLAGS = \ 4 | -I$(top_srcdir) \ 5 | $(LIBPEAS_CFLAGS) \ 6 | $(LIBPEAS_GTK_CFLAGS) 7 | 8 | plugin_LTLIBRARIES = libplastfm.la 9 | 10 | libplastfm_la_SOURCES = \ 11 | pragha-lastfm-plugin.c 12 | 13 | libplastfm_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) 14 | 15 | libplastfm_la_CFLAGS = \ 16 | $(PRAGHA_CFLAGS) \ 17 | $(LIBCLASTFM_CFLAGS) 18 | 19 | libplastfm_la_LIBADD = \ 20 | $(PRAGHA_LIBS) \ 21 | $(LIBCLASTFM_LIBS) \ 22 | $(top_builddir)/src/libpragha.la 23 | 24 | pragha-lastfm-menu-ui.h: pragha-lastfm-menu.ui Makefile 25 | $(AM_V_GEN) xdt-csource --strip-comments --strip-content --static --name=lastfm_menu_ui $< > $@ 26 | 27 | plugin_DATA = lastfm.plugin 28 | 29 | EXTRA_DIST = \ 30 | $(plugin_DATA) \ 31 | pragha-lastfm-menu.ui 32 | 33 | DISTCLEANFILES = \ 34 | pragha-lastfm-menu-ui.h 35 | 36 | BUILT_SOURCES = \ 37 | pragha-lastfm-menu-ui.h 38 | -------------------------------------------------------------------------------- /plugins/lastfm/lastfm.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=plastfm 3 | Name=Last.fm 4 | Description=Scrobble on Last.fm 5 | Authors=Matias De lellis 6 | Copyright=Copyright © 2014 Matias De lellis 7 | Website=https://github.com/matiasdelellis/pragha 8 | Help=https://github.com/matiasdelellis/pragha 9 | 10 | -------------------------------------------------------------------------------- /plugins/lastfm/pragha-lastfm-menu.ui: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 |
19 |
20 | 21 | _Lastfm 22 |
23 | 24 | Love track 25 | win.lastfm-love 26 | 27 | 28 | Unlove track 29 | win.lastfm-unlove 30 | 31 |
32 |
33 | 34 | Import a XSPF playlist 35 | win.lastfm-import 36 | 37 | 38 | Add favorites 39 | win.lastfm-favorities 40 | 41 | 42 | Add similar 43 | win.lastfm-similar 44 | 45 |
46 |
47 |
48 |
49 |
50 |
-------------------------------------------------------------------------------- /plugins/mpris2/Makefile.am: -------------------------------------------------------------------------------- 1 | plugindir = $(libdir)/pragha/plugins/mpris2 2 | 3 | AM_CPPFLAGS = \ 4 | -I$(top_srcdir) \ 5 | $(LIBPEAS_CFLAGS) \ 6 | $(LIBPEAS_GTK_CFLAGS) 7 | 8 | plugin_LTLIBRARIES = libmpris2.la 9 | 10 | libmpris2_la_SOURCES = \ 11 | pragha-mpris2-plugin.h \ 12 | pragha-mpris2-plugin.c 13 | 14 | libmpris2_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) 15 | 16 | libmpris2_la_CFLAGS = \ 17 | $(PRAGHA_CFLAGS) 18 | 19 | libmpris2_la_LIBADD = \ 20 | $(PRAGHA_LIBS) \ 21 | $(top_builddir)/src/libpragha.la 22 | 23 | 24 | plugin_DATA = mpris2.plugin 25 | 26 | EXTRA_DIST = $(plugin_DATA) 27 | -------------------------------------------------------------------------------- /plugins/mpris2/mpris2.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=mpris2 3 | Name=Mpris2 4 | Description=Control pragha with mpris2 interface 5 | Authors=Matias De lellis 6 | Copyright=Copyright © 2013 Matias De lellis 7 | Website=https://github.com/matiasdelellis/pragha 8 | Help=https://github.com/matiasdelellis/pragha 9 | 10 | -------------------------------------------------------------------------------- /plugins/mpris2/pragha-mpris2-plugin.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2009-2017 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef __PRAGHA_MPRIS2_PLUGIN_H__ 19 | #define __PRAGHA_MPRIS2_PLUGIN_H__ 20 | 21 | #include 22 | #include 23 | 24 | #include "src/pragha.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define PRAGHA_TYPE_MPRIS2_PLUGIN (pragha_mpris2_plugin_get_type ()) 29 | #define PRAGHA_MPRIS2_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PRAGHA_TYPE_MPRIS2_PLUGIN, PraghaMpris2Plugin)) 30 | #define PRAGHA_MPRIS2_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PRAGHA_TYPE_MPRIS2_PLUGIN, PraghaMpris2Plugin)) 31 | #define PRAGHA_IS_MPRIS2_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PRAGHA_TYPE_MPRIS2_PLUGIN)) 32 | #define PRAGHA_IS_MPRIS2_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PRAGHA_TYPE_MPRIS2_PLUGIN)) 33 | #define PRAGHA_MPRIS2_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PRAGHA_TYPE_MPRIS2_PLUGIN, PraghaMpris2PluginClass)) 34 | 35 | #define N_OBJECTS 4 36 | #define MPRIS_NAME "org.mpris.MediaPlayer2.pragha" 37 | #define MPRIS_PATH "/org/mpris/MediaPlayer2" 38 | 39 | typedef struct _PraghaMpris2PluginPrivate PraghaMpris2PluginPrivate; 40 | 41 | struct _PraghaMpris2PluginPrivate { 42 | PraghaApplication *pragha; 43 | 44 | guint owner_id; 45 | GDBusNodeInfo *introspection_data; 46 | GDBusConnection *dbus_connection; 47 | GQuark interface_quarks[N_OBJECTS]; 48 | guint registration_object_ids[N_OBJECTS]; 49 | 50 | gboolean saved_playbackstatus; 51 | gboolean saved_shuffle; 52 | gchar *saved_title; 53 | gdouble volume; 54 | gboolean saved_can_next; 55 | gboolean saved_can_prev; 56 | gboolean saved_can_play; 57 | gboolean saved_can_pause; 58 | gboolean saved_can_seek; 59 | 60 | PraghaBackendState state; 61 | }; 62 | 63 | GType pragha_mpris2_plugin_get_type (void) G_GNUC_CONST; 64 | 65 | G_END_DECLS 66 | 67 | #endif /* __PRAGHA_MPRIS2_PLUGIN_H__ */ 68 | -------------------------------------------------------------------------------- /plugins/mtp/Makefile.am: -------------------------------------------------------------------------------- 1 | plugindir = $(libdir)/pragha/plugins/mtp 2 | 3 | AM_CPPFLAGS = \ 4 | -I$(top_srcdir) \ 5 | $(LIBPEAS_CFLAGS) \ 6 | $(LIBPEAS_GTK_CFLAGS) 7 | 8 | plugin_LTLIBRARIES = libpmtp.la 9 | 10 | libpmtp_la_SOURCES = \ 11 | pragha-devices-mtp.c \ 12 | pragha-mtp-musicobject.c \ 13 | pragha-mtp-musicobject.h \ 14 | pragha-mtp-thread.c \ 15 | pragha-mtp-thread.h \ 16 | pragha-mtp-thread-data.c \ 17 | pragha-mtp-thread-data.h 18 | 19 | libpmtp_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) 20 | 21 | libpmtp_la_CFLAGS = \ 22 | $(PRAGHA_CFLAGS) \ 23 | $(LIBMTP_CFLAGS) 24 | 25 | libpmtp_la_LIBADD = \ 26 | $(PRAGHA_LIBS) \ 27 | $(LIBMTP_LIBS) \ 28 | $(top_builddir)/src/libpragha.la 29 | 30 | plugin_DATA = mtp.plugin 31 | 32 | EXTRA_DIST = $(plugin_DATA) 33 | -------------------------------------------------------------------------------- /plugins/mtp/mtp.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=pmtp 3 | Name=Mtp Devices 4 | Description=Management MTP devices 5 | Authors=Matias De lellis 6 | Copyright=Copyright © 2014-2019 Matias De lellis 7 | Website=https://github.com/matiasdelellis/pragha 8 | Help=https://github.com/matiasdelellis/pragha 9 | 10 | -------------------------------------------------------------------------------- /plugins/mtp/pragha-mtp-musicobject.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2012-2019 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef __PRAGHA_MTP_MUSICOBJECT_H__ 19 | #define __PRAGHA_MTP_MUSICOBJECT_H__ 20 | 21 | #include 22 | 23 | #include "src/pragha-musicobject.h" 24 | 25 | G_BEGIN_DECLS 26 | 27 | LIBMTP_track_t *mtp_track_new_from_pragha_musicobject (LIBMTP_mtpdevice_t *mtp_device, PraghaMusicobject *mobj); 28 | PraghaMusicobject *pragha_musicobject_new_from_mtp_track (LIBMTP_track_t *track); 29 | 30 | gint pragha_mtp_plugin_get_track_id (PraghaMusicobject *mobj); 31 | gchar *pragha_mtp_plugin_get_temp_filename (PraghaMusicobject *mobj); 32 | gboolean pragha_musicobject_is_mtp_file (PraghaMusicobject *mobj); 33 | 34 | G_END_DECLS 35 | 36 | #endif /* __PRAGHA_MTP_MUSICOBJECT_H__ */ 37 | -------------------------------------------------------------------------------- /plugins/notify/Makefile.am: -------------------------------------------------------------------------------- 1 | plugindir = $(libdir)/pragha/plugins/notify 2 | 3 | AM_CPPFLAGS = \ 4 | -I$(top_srcdir) \ 5 | $(LIBPEAS_CFLAGS) \ 6 | $(LIBPEAS_GTK_CFLAGS) 7 | 8 | plugin_LTLIBRARIES = libpnotify.la 9 | 10 | libpnotify_la_SOURCES = \ 11 | pragha-notify-plugin.c 12 | 13 | libpnotify_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) 14 | 15 | libpnotify_la_CFLAGS = \ 16 | $(PRAGHA_CFLAGS) \ 17 | $(LIBNOTIFY_CFLAGS) 18 | 19 | libpnotify_la_LIBADD = \ 20 | $(PRAGHA_LIBS) \ 21 | $(LIBNOTIFY_LIBS) \ 22 | $(top_builddir)/src/libpragha.la 23 | 24 | plugin_DATA = notify.plugin 25 | 26 | EXTRA_DIST = $(plugin_DATA) 27 | -------------------------------------------------------------------------------- /plugins/notify/notify.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=pnotify 3 | Name=Notification Plugin 4 | Description=Show notification when change songs 5 | Authors=Matias De lellis 6 | Copyright=Copyright © 2014 Matias De lellis 7 | Website=https://github.com/matiasdelellis/pragha 8 | Help=https://github.com/matiasdelellis/pragha 9 | 10 | -------------------------------------------------------------------------------- /plugins/removable-media/Makefile.am: -------------------------------------------------------------------------------- 1 | plugindir = $(libdir)/pragha/plugins/removable 2 | 3 | AM_CPPFLAGS = \ 4 | -I$(top_srcdir) \ 5 | $(LIBPEAS_CFLAGS) \ 6 | $(LIBPEAS_GTK_CFLAGS) 7 | 8 | plugin_LTLIBRARIES = libremovable.la 9 | 10 | libremovable_la_SOURCES = \ 11 | pragha-devices-removable.c 12 | 13 | libremovable_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) 14 | 15 | libremovable_la_CFLAGS = \ 16 | $(PRAGHA_CFLAGS) 17 | 18 | libremovable_la_LIBADD = \ 19 | $(PRAGHA_LIBS) \ 20 | $(top_builddir)/src/libpragha.la 21 | 22 | plugin_DATA = removable.plugin 23 | 24 | EXTRA_DIST = $(plugin_DATA) 25 | -------------------------------------------------------------------------------- /plugins/removable-media/removable.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=removable 3 | Name=Removable media 4 | Description=Detect removable media and scan it 5 | Authors=Matias De lellis 6 | Copyright=Copyright © 2014-2019 Matias De lellis 7 | Website=https://github.com/matiasdelellis/pragha 8 | Help=https://github.com/matiasdelellis/pragha 9 | 10 | -------------------------------------------------------------------------------- /plugins/song-info/Makefile.am: -------------------------------------------------------------------------------- 1 | plugindir = $(libdir)/pragha/plugins/song-info 2 | 3 | AM_CPPFLAGS = \ 4 | -I$(top_srcdir) \ 5 | $(LIBPEAS_CFLAGS) \ 6 | $(LIBPEAS_GTK_CFLAGS) 7 | 8 | plugin_LTLIBRARIES = libsong-info.la 9 | 10 | libsong_info_la_SOURCES = \ 11 | pragha-song-info-cache.c \ 12 | pragha-song-info-cache.h \ 13 | pragha-song-info-plugin.c \ 14 | pragha-song-info-plugin.h \ 15 | pragha-song-info-dialog.c \ 16 | pragha-song-info-dialog.h \ 17 | pragha-song-info-pane.c \ 18 | pragha-song-info-pane.h \ 19 | pragha-song-info-thread-albumart.c \ 20 | pragha-song-info-thread-albumart.h \ 21 | pragha-song-info-thread-artistart.c \ 22 | pragha-song-info-thread-artistart.h \ 23 | pragha-song-info-thread-dialog.c \ 24 | pragha-song-info-thread-dialog.h \ 25 | pragha-song-info-thread-pane.c \ 26 | pragha-song-info-thread-pane.h 27 | 28 | libsong_info_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) 29 | 30 | libsong_info_la_CFLAGS = \ 31 | $(PRAGHA_CFLAGS) \ 32 | $(LIBGLYR_CFLAGS) 33 | 34 | libsong_info_la_LIBADD = \ 35 | $(PRAGHA_LIBS) \ 36 | $(LIBGLYR_LIBS) \ 37 | $(top_builddir)/src/libpragha.la 38 | 39 | 40 | pragha-song-info-ui.h: pragha-song-info.ui Makefile 41 | $(AM_V_GEN) xdt-csource --strip-comments --strip-content --static --name=pragha_song_info_ui $< > $@ 42 | 43 | plugin_DATA = song-info.plugin 44 | 45 | EXTRA_DIST = \ 46 | $(plugin_DATA) \ 47 | pragha-song-info.ui 48 | 49 | DISTCLEANFILES = \ 50 | pragha-song-info-ui.h 51 | 52 | BUILT_SOURCES = \ 53 | pragha-song-info-ui.h 54 | -------------------------------------------------------------------------------- /plugins/song-info/pragha-song-info-dialog.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2011-2014 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef __PRAGHA_SONG_INFO_DIALOG_H__ 19 | #define __PRAGHA_SONG_INFO_DIALOG_H__ 20 | 21 | #include 22 | 23 | G_BEGIN_DECLS 24 | 25 | void 26 | pragha_show_related_text_info_dialog (GtkWidget *widget, 27 | const gchar *title_header, 28 | const gchar *subtitle_header, 29 | const gchar *text); 30 | G_END_DECLS 31 | 32 | #endif /* __PRAGHA_SONG_INFO_DIALOG_H__ */ 33 | -------------------------------------------------------------------------------- /plugins/song-info/pragha-song-info-plugin.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2011-2018 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifdef HAVE_CONFIG_H 19 | #include 20 | #endif 21 | 22 | #ifndef PRAGHA_SONGINFO_PLUGIN_H 23 | #define PRAGHA_SONGINFO_PLUGIN_H 24 | 25 | #include 26 | #include 27 | 28 | #include 29 | #include "pragha-song-info-cache.h" 30 | #include "pragha-song-info-pane.h" 31 | 32 | #include "src/pragha.h" 33 | 34 | #include "plugins/pragha-plugin-macros.h" 35 | 36 | G_BEGIN_DECLS 37 | 38 | #define PRAGHA_TYPE_SONG_INFO_PLUGIN (pragha_song_info_plugin_get_type ()) 39 | #define PRAGHA_SONG_INFO_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PRAGHA_TYPE_SONG_INFO_PLUGIN, PraghaSongInfoPlugin)) 40 | #define PRAGHA_SONG_INFO_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PRAGHA_TYPE_SONG_INFO_PLUGIN, PraghaSongInfoPlugin)) 41 | #define PRAGHA_IS_SONG_INFO_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PRAGHA_TYPE_SONG_INFO_PLUGIN)) 42 | #define PRAGHA_IS_SONG_INFO_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PRAGHA_TYPE_SONG_INFO_PLUGIN)) 43 | #define PRAGHA_SONG_INFO_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PRAGHA_TYPE_SONG_INFO_PLUGIN, PraghaSongInfoPluginClass)) 44 | 45 | typedef struct _PraghaSongInfoPluginPrivate PraghaSongInfoPluginPrivate; 46 | 47 | PRAGHA_PLUGIN_REGISTER_PUBLIC_HEADER (PRAGHA_TYPE_SONG_INFO_PLUGIN, 48 | PraghaSongInfoPlugin, 49 | pragha_song_info_plugin) 50 | 51 | PraghaApplication *pragha_songinfo_plugin_get_application (PraghaSongInfoPlugin *plugin); 52 | 53 | PraghaInfoCache *pragha_songinfo_plugin_get_cache_info (PraghaSongInfoPlugin *plugin); 54 | GlyrDatabase *pragha_songinfo_plugin_get_cache (PraghaSongInfoPlugin *plugin); 55 | PraghaSonginfoPane *pragha_songinfo_plugin_get_pane (PraghaSongInfoPlugin *plugin); 56 | void pragha_songinfo_plugin_init_glyr_query (gpointer data); 57 | 58 | G_END_DECLS 59 | 60 | #endif /* PRAGHA_SONGINFO_PLUGIN_H */ 61 | -------------------------------------------------------------------------------- /plugins/song-info/pragha-song-info-thread-albumart.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2011-2018 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_SONGINFO_THREAD_ALBUMART_H 19 | #define PRAGHA_SONGINFO_THREAD_ALBUMART_H 20 | 21 | #include 22 | 23 | #include 24 | #include "pragha-song-info-plugin.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | void 29 | pragha_songinfo_plugin_get_album_art (PraghaSongInfoPlugin *plugin, 30 | const gchar *artist, 31 | const gchar *album_art); 32 | 33 | G_END_DECLS 34 | 35 | #endif /* PRAGHA_SONGINFO_THREAD_ALBUMART_H */ 36 | -------------------------------------------------------------------------------- /plugins/song-info/pragha-song-info-thread-artistart.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2011-2018 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #if defined(GETTEXT_PACKAGE) 19 | #include 20 | #else 21 | #include 22 | #endif 23 | 24 | #include 25 | 26 | #include "pragha-song-info-plugin.h" 27 | #include "pragha-song-info-pane.h" 28 | 29 | #include "src/pragha-art-cache.h" 30 | #include "src/pragha-simple-async.h" 31 | 32 | typedef struct { 33 | PraghaSongInfoPlugin *plugin; 34 | GlyrQuery query; 35 | GlyrMemCache *head; 36 | } glyr_struct; 37 | 38 | /* Save the downloaded artist art in cache, and updates the gui.*/ 39 | 40 | static void 41 | glyr_finished_successfully (glyr_struct *glyr_info) 42 | { 43 | PraghaApplication *pragha; 44 | PraghaArtCache *art_cache; 45 | const gchar *artist = NULL; 46 | 47 | pragha = pragha_songinfo_plugin_get_application (glyr_info->plugin); 48 | 49 | artist = glyr_info->query.artist; 50 | 51 | art_cache = pragha_application_get_art_cache (pragha); 52 | 53 | if (glyr_info->head->data) 54 | pragha_art_cache_put_artist (art_cache, artist, glyr_info->head->data, glyr_info->head->size); 55 | 56 | glyr_free_list(glyr_info->head); 57 | } 58 | 59 | /* 60 | * Final threads 61 | */ 62 | 63 | static gboolean 64 | glyr_finished_thread_update (gpointer data) 65 | { 66 | glyr_struct *glyr_info = data; 67 | 68 | if (glyr_info->head != NULL) 69 | glyr_finished_successfully (glyr_info); 70 | 71 | glyr_query_destroy (&glyr_info->query); 72 | g_slice_free (glyr_struct, glyr_info); 73 | 74 | return FALSE; 75 | } 76 | 77 | /* Get artist bio or lyric on a thread. */ 78 | 79 | static gpointer 80 | get_related_info_idle_func (gpointer data) 81 | { 82 | GlyrMemCache *head; 83 | GLYR_ERROR error; 84 | 85 | glyr_struct *glyr_info = data; 86 | 87 | head = glyr_get (&glyr_info->query, &error, NULL); 88 | 89 | glyr_info->head = head; 90 | 91 | return glyr_info; 92 | } 93 | 94 | void 95 | pragha_songinfo_plugin_get_artist_art (PraghaSongInfoPlugin *plugin, 96 | const gchar *artist) 97 | { 98 | glyr_struct *glyr_info; 99 | 100 | CDEBUG(DBG_INFO, "Get artist art handler"); 101 | 102 | glyr_info = g_slice_new0 (glyr_struct); 103 | 104 | pragha_songinfo_plugin_init_glyr_query(&glyr_info->query); 105 | 106 | glyr_opt_type (&glyr_info->query, GLYR_GET_ARTIST_PHOTOS); 107 | glyr_opt_from (&glyr_info->query, "lastfm"); 108 | 109 | glyr_opt_artist (&glyr_info->query, artist); 110 | 111 | glyr_info->plugin = plugin; 112 | 113 | pragha_async_launch (get_related_info_idle_func, 114 | glyr_finished_thread_update, 115 | glyr_info); 116 | } 117 | 118 | -------------------------------------------------------------------------------- /plugins/song-info/pragha-song-info-thread-artistart.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2011-2018 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_SONGINFO_THREAD_ARTISTART_H 19 | #define PRAGHA_SONGINFO_THREAD_ARTISTART_H 20 | 21 | #include 22 | 23 | #include 24 | #include "pragha-song-info-plugin.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | void 29 | pragha_songinfo_plugin_get_artist_art (PraghaSongInfoPlugin *plugin, 30 | const gchar *artist); 31 | 32 | G_END_DECLS 33 | 34 | #endif /* PRAGHA_SONGINFO_THREAD_ARTISTART_H */ 35 | -------------------------------------------------------------------------------- /plugins/song-info/pragha-song-info-thread-dialog.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2011-2014 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_SONGINFO_THREAD_DIALOG_H 19 | #define PRAGHA_SONGINFO_THREAD_DIALOG_H 20 | 21 | #include 22 | 23 | #include 24 | #include "pragha-song-info-plugin.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | void 29 | pragha_songinfo_plugin_get_info_to_dialog (PraghaSongInfoPlugin *plugin, 30 | GLYR_GET_TYPE type, 31 | const gchar *artist, 32 | const gchar *title); 33 | 34 | G_END_DECLS 35 | 36 | #endif /* PRAGHA_SONGINFO_THREAD_DIALOG_H */ -------------------------------------------------------------------------------- /plugins/song-info/pragha-song-info-thread-pane.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2011-2019 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_SONGINFO_THREAD_PANE_H 19 | #define PRAGHA_SONGINFO_THREAD_PANE_H 20 | 21 | #include 22 | #include 23 | 24 | #include "pragha-song-info-plugin.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | GCancellable * 29 | pragha_songinfo_plugin_get_info_to_pane (PraghaSongInfoPlugin *plugin, 30 | GLYR_GET_TYPE type, 31 | const gchar *artist, 32 | const gchar *title, 33 | const gchar *filename); 34 | G_END_DECLS 35 | 36 | #endif /* PRAGHA_SONGINFO_THREAD_PANE_H */ 37 | -------------------------------------------------------------------------------- /plugins/song-info/pragha-song-info.ui: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 |
19 | 20 | Artist info 21 | info.artist 22 | 23 | 24 | Lyrics 25 | info.lyrics 26 | 27 | 28 | Similar songs 29 | info.similar 30 | 31 |
32 |
33 |
34 | -------------------------------------------------------------------------------- /plugins/song-info/song-info.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=song-info 3 | Name=Get Artist info, Lyrics and Album arts 4 | Description=Get Artist info, Lyrics and Album arts of yours songs 5 | Authors=Matias De lellis 6 | Copyright=Copyright © 2013 Matias De lellis 7 | Website=https://github.com/matiasdelellis/pragha 8 | Help=https://github.com/matiasdelellis/pragha 9 | 10 | -------------------------------------------------------------------------------- /plugins/subsonic/Makefile.am: -------------------------------------------------------------------------------- 1 | plugindir = $(libdir)/pragha/plugins/subsonic 2 | 3 | AM_CPPFLAGS = \ 4 | -I$(top_srcdir) \ 5 | $(LIBPEAS_CFLAGS) \ 6 | $(LIBPEAS_GTK_CFLAGS) 7 | 8 | plugin_LTLIBRARIES = libpsubsonic.la 9 | 10 | libpsubsonic_la_SOURCES = \ 11 | pragha-subsonic-api.c \ 12 | pragha-subsonic-api.h \ 13 | pragha-subsonic-preferences.c \ 14 | pragha-subsonic-preferences.h \ 15 | pragha-subsonic-plugin.c \ 16 | pragha-subsonic-plugin.h 17 | 18 | libpsubsonic_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) 19 | 20 | libpsubsonic_la_CFLAGS = \ 21 | $(PRAGHA_CFLAGS) \ 22 | $(GRILO_NET_CFLAGS) 23 | 24 | libpsubsonic_la_LIBADD = \ 25 | $(PRAGHA_LIBS) \ 26 | $(GRILO_NET_LIBS) \ 27 | $(top_builddir)/src/libpragha.la 28 | 29 | if HAVE_GRILO3 30 | libpsubsonic_la_CFLAGS += $(GRILO_NET3_CFLAGS) 31 | libpsubsonic_la_LIBADD += $(GRILO_NET3_LIBS) 32 | endif 33 | if HAVE_GRILO2 34 | libpsubsonic_la_CFLAGS += $(GRILO_NET2_CFLAGS) 35 | libpsubsonic_la_LIBADD += $(GRILO_NET2_LIBS) 36 | endif 37 | 38 | plugin_DATA = subsonic.plugin 39 | 40 | EXTRA_DIST = $(plugin_DATA) 41 | -------------------------------------------------------------------------------- /plugins/subsonic/pragha-subsonic-plugin.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2019 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef __PRAGHA_SUBSONIC_PLUGIN_H__ 19 | #define __PRAGHA_SUBSONIC_PLUGIN_H__ 20 | 21 | #include 22 | #include 23 | 24 | G_BEGIN_DECLS 25 | 26 | #define PRAGHA_TYPE_SUBSONIC_PLUGIN (pragha_subsonic_plugin_get_type ()) 27 | #define PRAGHA_SUBSONIC_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PRAGHA_TYPE_SUBSONIC_PLUGIN, PraghaSubsonicPlugin)) 28 | #define PRAGHA_SUBSONICP_LUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PRAGHA_TYPE_SUBSONIC_PLUGIN, PraghaSubsonicPlugin)) 29 | #define PRAGHA_IS_SUBSONIC_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PRAGHA_TYPE_SUBSONIC_PLUGIN)) 30 | #define PRAGHA_IS_SUBSONIC_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PRAGHA_TYPE_SUBSONIC_PLUGIN)) 31 | #define PRAGHA_SUBSONIC_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PRAGHA_TYPE_SUBSONIC_PLUGIN, PraghaSubsonicPluginClass)) 32 | 33 | GType pragha_subsonic_plugin_get_type (void) G_GNUC_CONST; 34 | 35 | G_END_DECLS 36 | 37 | #endif /* __PRAGHA_SUBSONIC_PLUGIN_H__ */ 38 | -------------------------------------------------------------------------------- /plugins/subsonic/pragha-subsonic-preferences.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2019 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef __PRAGHA_SUBSONIC_PREFERENCES_H__ 19 | #define __PRAGHA_SUBSONIC_PREFERENCES_H__ 20 | 21 | #include 22 | #include 23 | 24 | G_BEGIN_DECLS 25 | 26 | #define PRAGHA_TYPE_SUBSONIC_PREFERENCES (pragha_subsonic_preferences_get_type()) 27 | #define PRAGHA_SUBSONIC_PREFERENCES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_SUBSONIC_PREFERENCES, PraghaSubsonicPreferences)) 28 | #define PRAGHA_SUBSONIC_PREFERENCES_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_SUBSONIC_PREFERENCES, PraghaSubsonicPreferences const)) 29 | #define PRAGHA_SUBSONIC_PREFERENCES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_SUBSONIC_PREFERENCES, PraghaSubsonicPreferencesClass)) 30 | #define PRAGHA_IS_SUBSONIC_PREFERENCES(obj) ( G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_SUBSONIC_PREFERENCES)) 31 | #define PRAGHA_IS_SUBSONIC_PREFERENCES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_SUBSONIC_PREFERENCES)) 32 | #define PRAGHA_SUBSONIC_PREFERENCES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_SUBSONIC_PREFERENCES, PraghaSubsonicPreferencesClass)) 33 | 34 | typedef struct _PraghaSubsonicPreferences PraghaSubsonicPreferences; 35 | typedef struct _PraghaSubsonicPreferencesClass PraghaSubsonicPreferencesClass; 36 | 37 | struct _PraghaSubsonicPreferencesClass 38 | { 39 | GObjectClass parent_class; 40 | 41 | void (*server_changed) (PraghaSubsonicPreferences *subsonic); 42 | void (*credentials_changed) (PraghaSubsonicPreferences *subsonic); 43 | }; 44 | 45 | 46 | /* 47 | * Public methods 48 | */ 49 | 50 | const gchar * 51 | pragha_subsonic_preferences_get_server_text (PraghaSubsonicPreferences *preferences); 52 | 53 | const gchar * 54 | pragha_subsonic_preferences_get_username_text (PraghaSubsonicPreferences *preferences); 55 | 56 | const gchar * 57 | pragha_subsonic_preferences_get_password_text (PraghaSubsonicPreferences *preferences); 58 | 59 | void 60 | pragha_subsonic_preferences_forget_settings (PraghaSubsonicPreferences *preferences); 61 | 62 | PraghaSubsonicPreferences * 63 | pragha_subsonic_preferences_new (void); 64 | 65 | G_END_DECLS 66 | 67 | #endif /* __PRAGHA_SUBSONIC_PREFERENCES_H__ */ 68 | -------------------------------------------------------------------------------- /plugins/subsonic/subsonic.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=psubsonic 3 | Name=Subsonic Client 4 | Description=Play music from a Subsonic compatible server 5 | Authors=Matias De lellis 6 | Copyright=Copyright © 2019 Matias De lellis 7 | Website=https://github.com/matiasdelellis/pragha 8 | Help=https://github.com/matiasdelellis/pragha 9 | -------------------------------------------------------------------------------- /plugins/tunein/Makefile.am: -------------------------------------------------------------------------------- 1 | plugindir = $(libdir)/pragha/plugins/tunein 2 | 3 | AM_CPPFLAGS = \ 4 | -I$(top_srcdir) \ 5 | $(LIBPEAS_CFLAGS) \ 6 | $(LIBPEAS_GTK_CFLAGS) 7 | 8 | plugin_LTLIBRARIES = libtunein.la 9 | 10 | libtunein_la_SOURCES = \ 11 | pragha-tunein-plugin.c 12 | 13 | libtunein_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) 14 | 15 | libtunein_la_CFLAGS = \ 16 | $(PRAGHA_CFLAGS) \ 17 | $(LIBSOUP_CFLAGS) 18 | 19 | 20 | libtunein_la_LIBADD = \ 21 | $(PRAGHA_LIBS) \ 22 | $(LIBSOUP_LIBS) \ 23 | $(top_builddir)/src/libpragha.la 24 | 25 | plugin_DATA = tunein.plugin 26 | 27 | EXTRA_DIST = $(plugin_DATA) 28 | -------------------------------------------------------------------------------- /plugins/tunein/tunein.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=tunein 3 | Name=Get radios 4 | Description=Get radios on TuneIn 5 | Authors=Matias De lellis 6 | Copyright=Copyright © 2014 Matias De lellis 7 | Website=https://github.com/matiasdelellis/pragha 8 | Help=https://github.com/matiasdelellis/pragha 9 | 10 | -------------------------------------------------------------------------------- /plugins/visualizer/Makefile.am: -------------------------------------------------------------------------------- 1 | plugindir = $(libdir)/pragha/plugins/visualizer 2 | 3 | AM_CPPFLAGS = \ 4 | -I$(top_srcdir) \ 5 | $(LIBPEAS_CFLAGS) \ 6 | $(LIBPEAS_GTK_CFLAGS) 7 | 8 | plugin_LTLIBRARIES = libvisualizer.la 9 | 10 | libvisualizer_la_SOURCES = \ 11 | pragha-visualizer-plugin.h \ 12 | pragha-visualizer-plugin.c \ 13 | pragha-visualizer.h \ 14 | pragha-visualizer.c \ 15 | pragha-visualizer-particle.h \ 16 | pragha-visualizer-particle.c 17 | 18 | libvisualizer_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS) 19 | 20 | libvisualizer_la_CFLAGS = \ 21 | $(PRAGHA_CFLAGS) 22 | 23 | libvisualizer_la_LIBADD = \ 24 | $(PRAGHA_LIBS) \ 25 | $(top_builddir)/src/libpragha.la 26 | 27 | plugin_DATA = visualizer.plugin 28 | 29 | EXTRA_DIST = \ 30 | $(plugin_DATA) 31 | -------------------------------------------------------------------------------- /plugins/visualizer/pragha-visualizer-particle.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2018 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_VISUALIZER_PARTICLE_H 19 | #define PRAGHA_VISUALIZER_PARTICLE_H 20 | 21 | #include 22 | 23 | #include 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define PRAGHA_TYPE_PARTICLE (pragha_particle_get_type()) 29 | #define PRAGHA_PARTICLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_PARTICLE, PraghaParticle)) 30 | #define PRAGHA_PARTICLE_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_PARTICLE, PraghaParticle const)) 31 | #define PRAGHA_PARTICLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_PARTICLE, PraghaParticleClass)) 32 | #define PRAGHA_IS_PARTICLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_PARTICLE)) 33 | #define PRAGHA_IS_PARTICLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_PARTICLE)) 34 | #define PRAGHA_PARTICLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_PARTICLE, PraghaParticleClass)) 35 | 36 | typedef struct _PraghaParticle PraghaParticle; 37 | typedef struct _PraghaParticleClass PraghaParticleClass; 38 | 39 | struct _PraghaParticleClass 40 | { 41 | GObjectClass parent_class; 42 | }; 43 | 44 | void 45 | pragha_particle_reset (PraghaParticle *particle); 46 | 47 | void 48 | pragha_particle_move_to (PraghaParticle *particle, gint x, gint y); 49 | 50 | void 51 | pragha_particle_move (PraghaParticle *particle, guint width, guint height); 52 | 53 | void 54 | pragha_particle_set_energy (PraghaParticle *particle, gdouble energy); 55 | 56 | void 57 | pragha_particle_draw (PraghaParticle *particle, cairo_t *cr); 58 | 59 | PraghaParticle * 60 | pragha_particle_new (void); 61 | 62 | G_END_DECLS 63 | 64 | #endif /* PRAGHA_VISUALIZER_PARTICLE_H */ 65 | -------------------------------------------------------------------------------- /plugins/visualizer/pragha-visualizer-plugin.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2018 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef __PRAGHA_VISUALIZER_PLUGIN_H__ 19 | #define __PRAGHA_VISUALIZER_PLUGIN_H__ 20 | 21 | #include 22 | #include 23 | 24 | #include "src/pragha.h" 25 | 26 | #include "pragha-visualizer.h" 27 | 28 | G_BEGIN_DECLS 29 | 30 | #define PRAGHA_TYPE_VISUALIZER_PLUGIN (pragha_visualizer_plugin_get_type ()) 31 | #define PRAGHA_VISUALIZER_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PRAGHA_TYPE_VISUALIZER_PLUGIN, PraghaVisualizerPlugin)) 32 | #define PRAGHA_VISUALIZER_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), PRAGHA_TYPE_VISUALIZER_PLUGIN, PraghaVisualizerPlugin)) 33 | #define PRAGHA_IS_VISUALIZER_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PRAGHA_TYPE_VISUALIZER_PLUGIN)) 34 | #define PRAGHA_IS_VISUALIZER_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PRAGHA_TYPE_VISUALIZER_PLUGIN)) 35 | #define PRAGHA_VISUALIZER_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PRAGHA_TYPE_VISUALIZER_PLUGIN, PraghaVisualizerPluginClass)) 36 | 37 | typedef struct _PraghaVisualizerPluginPrivate PraghaVisualizerPluginPrivate; 38 | 39 | struct _PraghaVisualizerPluginPrivate { 40 | PraghaApplication *pragha; 41 | 42 | PraghaVisualizer *visualizer; 43 | 44 | /* Menu options */ 45 | GtkActionGroup *action_group_main_menu; 46 | guint merge_id_main_menu; 47 | GSimpleAction *gear_action; 48 | }; 49 | 50 | GType pragha_visualizer_plugin_get_type (void) G_GNUC_CONST; 51 | 52 | G_END_DECLS 53 | 54 | #endif /* __PRAGHA_VISUALIZER_PLUGIN_H__ */ 55 | -------------------------------------------------------------------------------- /plugins/visualizer/pragha-visualizer.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2018 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_VISUALIZER_H 19 | #define PRAGHA_VISUALIZER_H 20 | 21 | #include 22 | 23 | #include 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | typedef struct _PraghaVisualizer PraghaVisualizer; 29 | typedef struct _PraghaVisualizerClass PraghaVisualizerClass; 30 | 31 | void 32 | pragha_visualizer_set_magnitudes (PraghaVisualizer *visualizer, GValue *magnitudes); 33 | 34 | PraghaVisualizer * 35 | pragha_visualizer_new (void); 36 | 37 | G_END_DECLS 38 | 39 | #endif /* PRAGHA_VISUALIZER_H */ 40 | -------------------------------------------------------------------------------- /plugins/visualizer/visualizer.plugin: -------------------------------------------------------------------------------- 1 | [Plugin] 2 | Module=visualizer 3 | Name=Audio visualizer 4 | Description=A audio visualizer plugin 5 | Authors=Matias De lellis 6 | Copyright=Copyright © 2018 Matias De lellis 7 | Website=https://github.com/matiasdelellis/pragha 8 | Help=https://github.com/matiasdelellis/pragha 9 | -------------------------------------------------------------------------------- /po/.gitignore: -------------------------------------------------------------------------------- 1 | *.gmo 2 | Makefile* 3 | POTFILES 4 | *~ 5 | stamp-it 6 | .intltool-merge-cache 7 | -------------------------------------------------------------------------------- /po/ChangeLog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pragha-music-player/pragha/c6459372d14926a7ad63310c2a1df798c9aa980b/po/ChangeLog -------------------------------------------------------------------------------- /po/POTFILES.in: -------------------------------------------------------------------------------- 1 | # 2 | # Sources 3 | # 4 | src/info-bar-import-music.c 5 | src/pragha-background-task-bar.c 6 | src/pragha-device-client.c 7 | src/pragha-cmdline.c 8 | src/pragha-equalizer-dialog.c 9 | src/pragha-favorites.c 10 | src/pragha-filter-dialog.c 11 | src/pragha-library-pane.c 12 | src/pragha-menubar.c 13 | src/pragha-playlist.c 14 | src/pragha-playlists-mgmt.c 15 | src/pragha-preferences-dialog.c 16 | src/pragha-scanner.c 17 | src/pragha-search-entry.c 18 | src/pragha-statusicon.c 19 | src/pragha-tags-dialog.c 20 | src/pragha-tags-mgmt.c 21 | src/pragha-toolbar.c 22 | src/pragha-utils.c 23 | src/pragha-window.c 24 | src/pragha.c 25 | src/main.c 26 | # 27 | # Builder Files 28 | # 29 | [type: gettext/glade]src/pragha-window.ui 30 | 31 | 32 | # 33 | # Appdata 34 | # 35 | data/io.github.pragha_music_player.metainfo.xml.in 36 | 37 | # 38 | # Desktop Files 39 | # 40 | data/pragha.desktop.in 41 | 42 | # 43 | # Plugins 44 | # 45 | plugins/acoustid/pragha-acoustid-plugin.c 46 | plugins/ampache/pragha-ampache-plugin.c 47 | plugins/cdrom/pragha-cdrom-plugin.c 48 | plugins/dlna/pragha-dlna-plugin.c 49 | plugins/dlna-renderer/pragha-dlna-renderer-plugin.c 50 | plugins/lastfm/pragha-lastfm-plugin.c 51 | plugins/mtp/pragha-mtp-thread.c 52 | plugins/mpris2/pragha-mpris2-plugin.c 53 | plugins/notify/pragha-notify-plugin.c 54 | plugins/koel/pragha-koel-plugin.c 55 | plugins/removable-media/pragha-devices-removable.c 56 | plugins/song-info/pragha-song-info-dialog.c 57 | plugins/song-info/pragha-song-info-pane.c 58 | plugins/song-info/pragha-song-info-plugin.c 59 | plugins/song-info/pragha-song-info-thread-dialog.c 60 | plugins/song-info/pragha-song-info-thread-pane.c 61 | plugins/tunein/pragha-tunein-plugin.c 62 | plugins/visualizer/pragha-visualizer-plugin.c 63 | 64 | [type: gettext/glade]plugins/lastfm/pragha-lastfm-menu.ui 65 | [type: gettext/glade]plugins/song-info/pragha-song-info.ui 66 | -------------------------------------------------------------------------------- /po/POTFILES.skip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pragha-music-player/pragha/c6459372d14926a7ad63310c2a1df798c9aa980b/po/POTFILES.skip -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | pragha-window-ui.h 2 | *.deps* 3 | *.libs* 4 | pragha 5 | pragha.exe 6 | *.o 7 | *.la 8 | *.lo 9 | *.pc 10 | *~ 11 | -------------------------------------------------------------------------------- /src/gtkcellrendererbubble.h: -------------------------------------------------------------------------------- 1 | /* gtkcellrendererbubble.h 2 | * 3 | * Copyright (C) 2009 - Christian Hergert 4 | * 5 | * This is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef __GTK_CELL_RENDERER_BUBBLE_H__ 21 | #define __GTK_CELL_RENDERER_BUBBLE_H__ 22 | 23 | #include 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define GTK_TYPE_CELL_RENDERER_BUBBLE (gtk_cell_renderer_bubble_get_type ()) 29 | G_DECLARE_FINAL_TYPE (GtkCellRendererBubble, gtk_cell_renderer_bubble, GTK, CELL_RENDERER_BUBBLE, GtkCellRendererText) 30 | 31 | GType gtk_cell_renderer_bubble_get_type (void) G_GNUC_CONST; 32 | 33 | GtkCellRendererBubble* gtk_cell_renderer_bubble_new (void); 34 | gboolean gtk_cell_renderer_bubble_get_show_bubble (GtkCellRendererBubble *cell); 35 | void gtk_cell_renderer_bubble_set_show_bubble (GtkCellRendererBubble *cell, 36 | gboolean show_bubble); 37 | 38 | G_END_DECLS 39 | 40 | #endif /* __GTK_CELL_RENDERER_BUBBLE_H__ */ 41 | -------------------------------------------------------------------------------- /src/libpragha.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | libdir=@libdir@/pragha 3 | includedir=@includedir@/libpragha 4 | 5 | Name: libpragha 6 | Description: Library to write Pragha plugins 7 | Requires: gstreamer-1.0 gstreamer-base-1.0 gio-2.0 gtk+-3.0 gtk+-3.0 taglib_c libpeas-1.0 libpeas-gtk-1.0 8 | Version: @VERSION@ 9 | Libs: -L${libdir} -lpragha 10 | Cflags: -I${includedir} 11 | -------------------------------------------------------------------------------- /src/main.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2007-2009 sujith */ 3 | /* Copyright (C) 2009-2019 matias */ 4 | /* */ 5 | /* This program is free software: you can redistribute it and/or modify */ 6 | /* it under the terms of the GNU General Public License as published by */ 7 | /* the Free Software Foundation, either version 3 of the License, or */ 8 | /* (at your option) any later version. */ 9 | /* */ 10 | /* This program is distributed in the hope that it will be useful, */ 11 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 12 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 13 | /* GNU General Public License for more details. */ 14 | /* */ 15 | /* You should have received a copy of the GNU General Public License */ 16 | /* along with this program. If not, see . */ 17 | /*************************************************************************/ 18 | 19 | #if HAVE_CONFIG_H 20 | #include 21 | #endif 22 | 23 | #include "pragha.h" 24 | 25 | #if defined(GETTEXT_PACKAGE) 26 | #include 27 | #else 28 | #include 29 | #endif 30 | 31 | #include 32 | #include /* require LC_ALL */ 33 | #include 34 | #include 35 | 36 | #ifdef DEBUG 37 | GThread *pragha_main_thread = NULL; 38 | #endif 39 | 40 | gint main(gint argc, gchar *argv[]) 41 | { 42 | PraghaApplication *pragha; 43 | int status; 44 | #ifdef DEBUG 45 | g_print ("debug enabled\n"); 46 | pragha_main_thread = g_thread_self (); 47 | #endif 48 | debug_level = 0; 49 | 50 | /* setup translation domain */ 51 | setlocale (LC_ALL, ""); 52 | bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); 53 | bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); 54 | textdomain (GETTEXT_PACKAGE); 55 | 56 | /* Force unicode to taglib. */ 57 | taglib_set_strings_unicode(TRUE); 58 | taglib_set_string_management_enabled(FALSE); 59 | 60 | /* Setup application name and pulseaudio role */ 61 | g_set_application_name(_("Pragha Music Player")); 62 | g_setenv("PULSE_PROP_media.role", "audio", TRUE); 63 | 64 | pragha = pragha_application_new (); 65 | status = g_application_run (G_APPLICATION (pragha), argc, argv); 66 | g_object_run_dispose (G_OBJECT (pragha)); 67 | g_object_unref (pragha); 68 | 69 | return status; 70 | } -------------------------------------------------------------------------------- /src/pragha-album-art.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2012-2019 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_ALBUM_ART_H 19 | #define PRAGHA_ALBUM_ART_H 20 | 21 | #include 22 | #include 23 | 24 | G_BEGIN_DECLS 25 | 26 | #define PRAGHA_TYPE_ALBUM_ART (pragha_album_art_get_type ()) 27 | G_DECLARE_FINAL_TYPE (PraghaAlbumArt, pragha_album_art, PRAGHA, ALBUM_ART, GtkImage) 28 | 29 | 30 | PraghaAlbumArt *pragha_album_art_new (void); 31 | 32 | const gchar * 33 | pragha_album_art_get_path (PraghaAlbumArt *albumart); 34 | void 35 | pragha_album_art_set_path (PraghaAlbumArt *albumart, 36 | const char *path); 37 | 38 | guint 39 | pragha_album_art_get_size (PraghaAlbumArt *albumart); 40 | void 41 | pragha_album_art_set_size (PraghaAlbumArt *albumart, 42 | guint size); 43 | 44 | void 45 | pragha_album_art_set_pixbuf (PraghaAlbumArt *albumart, 46 | GdkPixbuf *pixbuf); 47 | GdkPixbuf * 48 | pragha_album_art_get_pixbuf (PraghaAlbumArt *albumart); 49 | 50 | G_END_DECLS 51 | 52 | #endif /* PRAGHA_ALBUM_ART_H */ 53 | -------------------------------------------------------------------------------- /src/pragha-app-notification-container.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2019 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #include "config.h" 19 | #include "pragha-app-notification-container.h" 20 | 21 | 22 | struct _PraghaAppNotificationContainer { 23 | GtkRevealer parent_instance; 24 | 25 | GtkWidget *grid; 26 | }; 27 | 28 | struct _PraghaAppNotificationContainerClass { 29 | GtkRevealerClass parent_class; 30 | }; 31 | 32 | G_DEFINE_TYPE (PraghaAppNotificationContainer, pragha_app_notification_container, GTK_TYPE_REVEALER); 33 | 34 | static PraghaAppNotificationContainer *notification_container = NULL; 35 | 36 | static void 37 | pragha_app_notification_container_init (PraghaAppNotificationContainer *self) 38 | { 39 | /* Globally accessible singleton */ 40 | g_assert (notification_container == NULL); 41 | notification_container = self; 42 | g_object_add_weak_pointer (G_OBJECT (notification_container), 43 | (gpointer *)¬ification_container); 44 | 45 | gtk_widget_set_halign (GTK_WIDGET (self), GTK_ALIGN_CENTER); 46 | gtk_widget_set_valign (GTK_WIDGET (self), GTK_ALIGN_START); 47 | 48 | self->grid = gtk_grid_new (); 49 | gtk_orientable_set_orientation (GTK_ORIENTABLE (self->grid), GTK_ORIENTATION_VERTICAL); 50 | gtk_grid_set_row_spacing (GTK_GRID (self->grid), 6); 51 | gtk_container_add (GTK_CONTAINER (self), self->grid); 52 | } 53 | 54 | static void 55 | pragha_app_notification_container_class_init (PraghaAppNotificationContainerClass *klass) 56 | { 57 | } 58 | 59 | PraghaAppNotificationContainer * 60 | pragha_app_notification_container_get_default (void) 61 | { 62 | if (notification_container != NULL) 63 | return notification_container; 64 | 65 | return g_object_new (PRAGHA_TYPE_APP_NOTIFICATION_CONTAINER, 66 | NULL); 67 | } 68 | 69 | void 70 | pragha_app_notification_container_add_notification (PraghaAppNotificationContainer *self, 71 | GtkWidget *notification) 72 | { 73 | g_assert (PRAGHA_IS_APP_NOTIFICATION_CONTAINER (self)); 74 | g_assert (GTK_IS_WIDGET (notification)); 75 | 76 | gtk_container_add (GTK_CONTAINER (self->grid), notification); 77 | 78 | gtk_widget_show (GTK_WIDGET (self)); 79 | gtk_widget_show (GTK_WIDGET (self->grid)); 80 | gtk_widget_show (GTK_WIDGET (notification)); 81 | 82 | gtk_revealer_set_reveal_child (GTK_REVEALER (self), TRUE); 83 | } 84 | 85 | guint 86 | pragha_app_notification_container_get_num_children (PraghaAppNotificationContainer *self) 87 | { 88 | GList *children; 89 | guint retval; 90 | 91 | g_assert (PRAGHA_IS_APP_NOTIFICATION_CONTAINER (self)); 92 | 93 | children = gtk_container_get_children (GTK_CONTAINER (self->grid)); 94 | retval = g_list_length (children); 95 | g_list_free (children); 96 | 97 | return retval; 98 | } 99 | -------------------------------------------------------------------------------- /src/pragha-app-notification-container.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2019 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_APP_NOTIFICATION_CONTAINER_H 19 | #define PRAGHA_APP_NOTIFICATION_CONTAINER_H 20 | 21 | #include 22 | 23 | 24 | G_BEGIN_DECLS 25 | 26 | typedef struct _PraghaAppNotificationContainerClass PraghaAppNotificationContainerClass; 27 | typedef struct _PraghaAppNotificationContainer PraghaAppNotificationContainer; 28 | 29 | #define PRAGHA_TYPE_APP_NOTIFICATION_CONTAINER (pragha_app_notification_container_get_type ()) 30 | #define PRAGHA_APP_NOTIFICATION_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_APP_NOTIFICATION_CONTAINER, PraghaAppNotificationContainer)) 31 | #define PRAGHA_APP_NOTIFICATION_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_APP_NOTIFICATION_CONTAINER, PraghaAppNotificationContainerClass)) 32 | #define PRAGHA_IS_APP_NOTIFICATION_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_APP_NOTIFICATION_CONTAINER)) 33 | #define PRAGHA_IS_APP_NOTIFICATION_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_APP_NOTIFICATION_CONTAINER)) 34 | #define PRAGHA_APP_NOTIFICATION_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_APP_NOTIFICATION_CONTAINER, PraghaAppNotificationContainerClass)) 35 | 36 | PraghaAppNotificationContainer * 37 | pragha_app_notification_container_get_default (void); 38 | 39 | void 40 | pragha_app_notification_container_add_notification (PraghaAppNotificationContainer *self, 41 | GtkWidget *notification); 42 | 43 | guint 44 | pragha_app_notification_container_get_num_children (PraghaAppNotificationContainer *self); 45 | 46 | G_END_DECLS 47 | 48 | #endif /* PRAGHA_APP_NOTIFICAION_CONTAINER_H */ 49 | -------------------------------------------------------------------------------- /src/pragha-app-notification.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2019 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_APP_NOTIFICATION_H 19 | #define PRAGHA_APP_NOTIFICATION_H 20 | 21 | #include 22 | #include 23 | 24 | 25 | G_BEGIN_DECLS 26 | 27 | typedef struct _PraghaAppNotificationClass PraghaAppNotificationClass; 28 | typedef struct _PraghaAppNotification PraghaAppNotification; 29 | 30 | #define PRAGHA_TYPE_APP_NOTIFICATION (pragha_app_notification_get_type ()) 31 | #define PRAGHA_APP_NOTIFICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_APP_NOTIFICATION, PraghaAppNotification)) 32 | #define PRAGHA_APP_NOTIFICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_APP_NOTIFICATION, PraghaAppNotificationClass)) 33 | #define PRAGHA_IS_APP_NOTIFICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_APP_NOTIFICATION)) 34 | #define PRAGHA_IS_APP_NOTIFICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_APP_NOTIFICATION)) 35 | #define PRAGHA_APP_NOTIFICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_APP_NOTIFICATION, PraghaAppNotificationClass)) 36 | 37 | PraghaAppNotification * 38 | pragha_app_notification_new (const char *head, 39 | const char *body); 40 | 41 | void 42 | pragha_app_notification_show (PraghaAppNotification *self); 43 | 44 | void 45 | pragha_app_notification_set_timeout (PraghaAppNotification *self, 46 | guint timeout); 47 | 48 | G_END_DECLS 49 | 50 | #endif /* PRAGHA_APP_NOTIFICATION_H */ 51 | -------------------------------------------------------------------------------- /src/pragha-art-cache.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011-2018 matias 3 | * Copyright (C) 2013 Pavel Vasin 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef PRAGHA_ART_CACHE_H 20 | #define PRAGHA_ART_CACHE_H 21 | 22 | #include 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define PRAGHA_TYPE_ART_CACHE (pragha_art_cache_get_type()) 28 | #define PRAGHA_ART_CACHE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_ART_CACHE, PraghaArtCache)) 29 | #define PRAGHA_ART_CACHE_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_ART_CACHE, PraghaArtCache const)) 30 | #define PRAGHA_ART_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_ART_CACHE, PraghaArtCacheClass)) 31 | #define PRAGHA_IS_ART_CACHE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_ART_CACHE)) 32 | #define PRAGHA_IS_ART_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_ART_CACHE)) 33 | #define PRAGHA_ART_CACHE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_ART_CACHE, PraghaArtCacheClass)) 34 | 35 | typedef struct _PraghaArtCache PraghaArtCache; 36 | typedef struct _PraghaArtCacheClass PraghaArtCacheClass; 37 | 38 | struct _PraghaArtCacheClass 39 | { 40 | GObjectClass parent_class; 41 | void (*cache_changed) (PraghaArtCache *cache); 42 | }; 43 | 44 | PraghaArtCache * pragha_art_cache_get (void); 45 | 46 | gchar * pragha_art_cache_get_album_uri (PraghaArtCache *cache, const gchar *artist, const gchar *album); 47 | gboolean pragha_art_cache_contains_album (PraghaArtCache *cache, const gchar *artist, const gchar *album); 48 | void pragha_art_cache_put_album (PraghaArtCache *cache, const gchar *artist, const gchar *album, gconstpointer data, gsize size); 49 | 50 | gchar * pragha_art_cache_get_artist_uri (PraghaArtCache *cache, const gchar *artist); 51 | gboolean pragha_art_cache_contains_artist (PraghaArtCache *cache, const gchar *artist); 52 | void pragha_art_cache_put_artist (PraghaArtCache *cache, const gchar *artist, gconstpointer data, gsize size); 53 | 54 | G_END_DECLS 55 | 56 | #endif /* PRAGHA_ART_CACHE_H */ 57 | -------------------------------------------------------------------------------- /src/pragha-background-task-bar.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2016-2019 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_BACKGROUND_TASK_BAR_H 19 | #define PRAGHA_BACKGROUND_TASK_BAR_H 20 | 21 | #include 22 | 23 | G_BEGIN_DECLS 24 | 25 | #define PRAGHA_TYPE_BACKGROUND_TASK_BAR (pragha_background_task_bar_get_type()) 26 | #define PRAGHA_BACKGROUND_TASK_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_BACKGROUND_TASK_BAR, PraghaBackgroundTaskBar)) 27 | #define PRAGHA_BACKGROUND_TASK_BAR_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_BACKGROUND_TASK_BAR, PraghaBackgroundTaskBar const)) 28 | #define PRAGHA_BACKGROUND_TASK_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_BACKGROUND_TASK_BAR, PraghaBackgroundTaskBarClass)) 29 | #define PRAGHA_IS_BACKGROUND_TASK_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_BACKGROUND_TASK_BAR)) 30 | #define PRAGHA_IS_BACKGROUND_TASK_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_BACKGROUND_TASK_BAR)) 31 | #define PRAGHA_BACKGROUND_TASK_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_BACKGROUND_TASK_BAR, PraghaBackgroundTaskBarClass)) 32 | 33 | GType pragha_background_task_bar_get_type (void); 34 | 35 | typedef struct _PraghaBackgroundTaskBar PraghaBackgroundTaskBar; 36 | 37 | void 38 | pragha_background_task_bar_prepend_widget (PraghaBackgroundTaskBar *taskbar, 39 | GtkWidget *widget); 40 | 41 | void 42 | pragha_background_task_bar_remove_widget (PraghaBackgroundTaskBar *taskbar, 43 | GtkWidget *widget); 44 | 45 | PraghaBackgroundTaskBar * 46 | pragha_background_task_bar_new (void); 47 | 48 | PraghaBackgroundTaskBar * 49 | pragha_background_task_bar_get (void); 50 | 51 | G_END_DECLS 52 | 53 | #endif /* PRAGHA_BACKGROUND_TASK_BAR_H */ 54 | -------------------------------------------------------------------------------- /src/pragha-background-task-widget.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2016-2020 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_BACKGROUND_TASK_WIDGET_H 19 | #define PRAGHA_BACKGROUND_TASK_WIDGET_H 20 | 21 | #include 22 | 23 | G_BEGIN_DECLS 24 | 25 | #define PRAGHA_TYPE_BACKGROUND_TASK_WIDGET (pragha_background_task_widget_get_type()) 26 | #define PRAGHA_BACKGROUND_TASK_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_BACKGROUND_TASK_WIDGET, PraghaBackgroundTaskWidget)) 27 | #define PRAGHA_BACKGROUND_TASK_WIDGET_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_BACKGROUND_TASK_WIDGET, PraghaBackgroundTaskWidget const)) 28 | #define PRAGHA_BACKGROUND_TASK_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_BACKGROUND_TASK_WIDGET, PraghaBackgroundTaskWidgetClass)) 29 | #define PRAGHA_IS_BACKGROUND_TASK_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_BACKGROUND_TASK_WIDGET)) 30 | #define PRAGHA_IS_BACKGROUND_TASK_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_BACKGROUND_TASK_WIDGET)) 31 | #define PRAGHA_BACKGROUND_TASK_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_BACKGROUND_TASK_WIDGET, PraghaBackgroundTaskWidgetClass)) 32 | 33 | GType pragha_background_task_widget_get_type (void); 34 | 35 | typedef struct _PraghaBackgroundTaskWidget PraghaBackgroundTaskWidget; 36 | 37 | void 38 | pragha_background_task_widget_set_description (PraghaBackgroundTaskWidget *taskwidget, 39 | const gchar *description); 40 | 41 | void 42 | pragha_background_task_widget_set_job_count (PraghaBackgroundTaskWidget *taskwidget, 43 | gint job_count); 44 | 45 | void 46 | pragha_background_task_widget_set_job_progress (PraghaBackgroundTaskWidget *taskwidget, 47 | gint job_progress); 48 | 49 | PraghaBackgroundTaskWidget * 50 | pragha_background_task_widget_new (const gchar *description, 51 | const gchar *icon_name, 52 | gint job_count, 53 | GCancellable *cancellable); 54 | 55 | G_END_DECLS 56 | 57 | #endif /* PRAGHA_BACKGROUND_TASK_WIDGET_H */ 58 | -------------------------------------------------------------------------------- /src/pragha-debug.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2007-2009 sujith */ 3 | /* Copyright (C) 2009-2011 matias */ 4 | /* */ 5 | /* This program is free software: you can redistribute it and/or modify */ 6 | /* it under the terms of the GNU General Public License as published by */ 7 | /* the Free Software Foundation, either version 3 of the License, or */ 8 | /* (at your option) any later version. */ 9 | /* */ 10 | /* This program is distributed in the hope that it will be useful, */ 11 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 12 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 13 | /* GNU General Public License for more details. */ 14 | /* */ 15 | /* You should have received a copy of the GNU General Public License */ 16 | /* along with this program. If not, see . */ 17 | /*************************************************************************/ 18 | 19 | #include "pragha-debug.h" 20 | 21 | #include 22 | 23 | /* Function to save debug on file. */ 24 | 25 | gint debug_level; 26 | 27 | void 28 | pragha_log_to_file (const gchar* log_domain, 29 | GLogLevelFlags log_level, 30 | const gchar* message, 31 | gpointer user_data) 32 | { 33 | FILE* logfile = fopen ((const char*)user_data, "a"); 34 | gchar* level_name = ""; 35 | 36 | switch (log_level) 37 | { 38 | /* skip irrelevant flags */ 39 | case G_LOG_LEVEL_MASK: 40 | case G_LOG_FLAG_FATAL: 41 | case G_LOG_FLAG_RECURSION: 42 | case G_LOG_LEVEL_ERROR: 43 | level_name = "ERROR"; 44 | break; 45 | case G_LOG_LEVEL_CRITICAL: 46 | level_name = "CRITICAL"; 47 | break; 48 | case G_LOG_LEVEL_WARNING: 49 | level_name = "WARNING"; 50 | break; 51 | case G_LOG_LEVEL_MESSAGE: 52 | level_name = "MESSAGE"; 53 | break; 54 | case G_LOG_LEVEL_INFO: 55 | level_name = "INFO"; 56 | break; 57 | case G_LOG_LEVEL_DEBUG: 58 | level_name = "DEBUG"; 59 | break; 60 | } 61 | 62 | fprintf (logfile, "%s %s: %s\n", 63 | log_domain ? log_domain : "Pragha", level_name, message); 64 | fclose (logfile); 65 | } 66 | -------------------------------------------------------------------------------- /src/pragha-debug.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2007-2009 sujith */ 3 | /* Copyright (C) 2009-2011 matias */ 4 | /* */ 5 | /* This program is free software: you can redistribute it and/or modify */ 6 | /* it under the terms of the GNU General Public License as published by */ 7 | /* the Free Software Foundation, either version 3 of the License, or */ 8 | /* (at your option) any later version. */ 9 | /* */ 10 | /* This program is distributed in the hope that it will be useful, */ 11 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 12 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 13 | /* GNU General Public License for more details. */ 14 | /* */ 15 | /* You should have received a copy of the GNU General Public License */ 16 | /* along with this program. If not, see . */ 17 | /*************************************************************************/ 18 | 19 | #ifndef PRAGHA_DEBUG_H 20 | #define PRAGHA_DEBUG_H 21 | 22 | #include 23 | 24 | enum debug_level { 25 | DBG_BACKEND = 1, 26 | DBG_INFO, 27 | DBG_PLUGIN, 28 | DBG_MOBJ, 29 | DBG_DB, 30 | DBG_VERBOSE, 31 | }; 32 | 33 | extern gint debug_level; 34 | 35 | #define CDEBUG(_lvl, _fmt, ...) \ 36 | if (G_UNLIKELY(_lvl <= debug_level)) \ 37 | g_debug(_fmt, ##__VA_ARGS__); 38 | 39 | void 40 | pragha_log_to_file (const gchar* log_domain, 41 | GLogLevelFlags log_level, 42 | const gchar* message, 43 | gpointer user_data); 44 | 45 | #endif /* PRAGHA_DEBUG_H */ -------------------------------------------------------------------------------- /src/pragha-dnd.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2007-2009 sujith */ 3 | /* Copyright (C) 2009-2013 matias */ 4 | /* */ 5 | /* This program is free software: you can redistribute it and/or modify */ 6 | /* it under the terms of the GNU General Public License as published by */ 7 | /* the Free Software Foundation, either version 3 of the License, or */ 8 | /* (at your option) any later version. */ 9 | /* */ 10 | /* This program is distributed in the hope that it will be useful, */ 11 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 12 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 13 | /* GNU General Public License for more details. */ 14 | /* */ 15 | /* You should have received a copy of the GNU General Public License */ 16 | /* along with this program. If not, see . */ 17 | /*************************************************************************/ 18 | 19 | #ifndef PRAGHA_DND_H 20 | #define PRAGHA_DND_H 21 | 22 | #include 23 | #include "pragha-database.h" 24 | 25 | typedef enum { 26 | TARGET_REF_LIBRARY, 27 | TARGET_URI_LIST, 28 | TARGET_PLAIN_TEXT 29 | } PraghaDndTarget; 30 | 31 | GList *pragha_dnd_library_get_mobj_list (GtkSelectionData *data, PraghaDatabase *dbase); 32 | GList *pragha_dnd_uri_list_get_mobj_list (GtkSelectionData *data); 33 | GList *pragha_dnd_plain_text_get_mobj_list (GtkSelectionData *data); 34 | 35 | #endif /* PRAGHA_DND_H */ 36 | -------------------------------------------------------------------------------- /src/pragha-equalizer-dialog.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2013 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_EQUALIZER_DIALOG_H 19 | #define PRAGHA_EQUALIZER_DIALOG_H 20 | 21 | #include 22 | 23 | #include "pragha-backend.h" 24 | 25 | void 26 | pragha_equalizer_dialog_show (PraghaBackend *backend, GtkWidget *parent); 27 | 28 | #endif /* PRAGHA_EQUALIZER_DIALOG_H */ -------------------------------------------------------------------------------- /src/pragha-favorites.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2018 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_FAVORITES_H 19 | #define PRAGHA_FAVORITES_H 20 | 21 | #include 22 | #include 23 | 24 | #include "pragha-musicobject.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define PRAGHA_TYPE_FAVORITES (pragha_favorites_get_type()) 29 | #define PRAGHA_FAVORITES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_FAVORITES, PraghaFavorites)) 30 | #define PRAGHA_FAVORITES_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_FAVORITES, PraghaFavorites const)) 31 | #define PRAGHA_FAVORITES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_FAVORITES, PraghaFavoritesClass)) 32 | #define PRAGHA_IS_FAVORITES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_FAVORITES)) 33 | #define PRAGHA_IS_FAVORITES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_FAVORITES)) 34 | #define PRAGHA_FAVORITES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_FAVORITES, PraghaFavoritesClass)) 35 | 36 | typedef struct _PraghaFavorites PraghaFavorites; 37 | typedef struct _PraghaFavoritesClass PraghaFavoritesClass; 38 | 39 | struct _PraghaFavoritesClass 40 | { 41 | GObjectClass parent_class; 42 | void (*song_added) (PraghaFavorites *favorites, PraghaMusicobject *mobj); 43 | void (*song_removed) (PraghaFavorites *favorites, PraghaMusicobject *mobj); 44 | }; 45 | 46 | PraghaFavorites * 47 | pragha_favorites_get (void); 48 | 49 | void pragha_favorites_put_song (PraghaFavorites *favorites, PraghaMusicobject *mobj); 50 | void pragha_favorites_remove_song (PraghaFavorites *favorites, PraghaMusicobject *mobj); 51 | gboolean pragha_favorites_contains_song (PraghaFavorites *favorites, PraghaMusicobject *mobj); 52 | 53 | G_END_DECLS 54 | 55 | #endif /* PRAGHA_FAVORITES_H */ 56 | -------------------------------------------------------------------------------- /src/pragha-file-utils.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2007-2009 sujith */ 3 | /* Copyright (C) 2009-2013 matias */ 4 | /* */ 5 | /* This program is free software: you can redistribute it and/or modify */ 6 | /* it under the terms of the GNU General Public License as published by */ 7 | /* the Free Software Foundation, either version 3 of the License, or */ 8 | /* (at your option) any later version. */ 9 | /* */ 10 | /* This program is distributed in the hope that it will be useful, */ 11 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 12 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 13 | /* GNU General Public License for more details. */ 14 | /* */ 15 | /* You should have received a copy of the GNU General Public License */ 16 | /* along with this program. If not, see . */ 17 | /**************************************************************************/ 18 | 19 | #ifndef PRAGHA_FILE_UTILS_H 20 | #define PRAGHA_FILE_UTILS_H 21 | 22 | #if HAVE_CONFIG_H 23 | #include 24 | #endif 25 | 26 | #include 27 | #include 28 | #include "pragha-musicobject.h" 29 | #include "pragha-preferences.h" 30 | 31 | /* Playlist type formats */ 32 | 33 | typedef enum { 34 | PL_FORMAT_UNKNOWN, 35 | PL_FORMAT_M3U, 36 | PL_FORMAT_PLS, 37 | PL_FORMAT_ASX, 38 | PL_FORMAT_XSPF 39 | } PraghaPlaylistType; 40 | 41 | typedef enum { 42 | MEDIA_TYPE_UNKNOWN, 43 | MEDIA_TYPE_AUDIO, 44 | MEDIA_TYPE_PLAYLIST, 45 | MEDIA_TYPE_IMAGE 46 | } PraghaMediaType; 47 | 48 | extern const gchar *mime_mpeg[]; 49 | extern const gchar *mime_wav[]; 50 | extern const gchar *mime_flac[]; 51 | extern const gchar *mime_ogg[]; 52 | extern const gchar *mime_asf[]; 53 | extern const gchar *mime_mp4[]; 54 | extern const gchar *mime_ape[]; 55 | extern const gchar *mime_tracker[]; 56 | 57 | extern const gchar *mime_image[]; 58 | 59 | #ifdef HAVE_PLPARSER 60 | extern const gchar *mime_playlist[]; 61 | extern const gchar *mime_dual[]; 62 | #endif 63 | 64 | gboolean is_playable_file(const gchar *file); 65 | 66 | PraghaMediaType pragha_file_get_media_type (const gchar *filename); 67 | gchar *pragha_file_get_music_type (const gchar *filename); 68 | PraghaPlaylistType pragha_pl_parser_guess_format_from_extension (const gchar *filename); 69 | 70 | gboolean is_dir_and_accessible(const gchar *dir); 71 | 72 | gchar *get_image_path_from_dir (const gchar *path); 73 | gchar *get_pref_image_path_dir (PraghaPreferences *preferences, const gchar *path); 74 | 75 | gint pragha_get_dir_count(const gchar *dir_name, GCancellable *cancellable); 76 | 77 | GList *append_mobj_list_from_folder(GList *list, gchar *dir_name); 78 | GList *append_mobj_list_from_unknown_filename(GList *list, gchar *filename); 79 | 80 | #endif /* PRAGHA_FILE_UTILS_H */ -------------------------------------------------------------------------------- /src/pragha-filter-dialog.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2011-2013 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_FILTER_DIALOG_H 19 | #define PRAGHA_FILTER_DIALOG_H 20 | 21 | #include "pragha-playlist.h" 22 | 23 | void 24 | pragha_filter_dialog (PraghaPlaylist *playlist); 25 | 26 | #endif /* PRAGHA_FILTER_DIALOG_H */ -------------------------------------------------------------------------------- /src/pragha-hig.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2012-2018 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_HIG_H 19 | #define PRAGHA_HIG_H 20 | 21 | #include 22 | 23 | void gtk_label_set_attribute_bold (GtkLabel *label); 24 | 25 | void pragha_hig_set_tiny_button (GtkWidget *button); 26 | 27 | GtkWidget *pragha_hig_workarea_table_add_section_title (GtkWidget *table, guint *row, const char *section_title); 28 | void pragha_hig_workarea_table_add_wide_control (GtkWidget *table, guint *row, GtkWidget *widget); 29 | void pragha_hig_workarea_table_add_wide_tall_control (GtkWidget *table, guint *row, GtkWidget *widget); 30 | void pragha_hig_workarea_table_add_row (GtkWidget *table, guint *row, GtkWidget *label, GtkWidget *control); 31 | GtkWidget *pragha_hig_workarea_table_new (); 32 | 33 | #endif /* PRAGHA_HIG_H */ -------------------------------------------------------------------------------- /src/pragha-music-enum.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2014 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_MUSIC_ENUM_H 19 | #define PRAGHA_MUSIC_ENUM_H 20 | 21 | #include 22 | #include 23 | 24 | G_BEGIN_DECLS 25 | 26 | #define MAX_ENUM_SIZE 10 27 | 28 | #define PRAGHA_TYPE_MUSIC_ENUM (pragha_music_enum_get_type()) 29 | #define PRAGHA_MUSIC_ENUM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_MUSIC_ENUM, PraghaMusicEnum)) 30 | #define PRAGHA_MUSIC_ENUM_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_MUSIC_ENUM, PraghaMusicEnum const)) 31 | #define PRAGHA_MUSIC_ENUM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_MUSIC_ENUM, PraghaMusicEnumClass)) 32 | #define PRAGHA_IS_MUSIC_ENUM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_MUSIC_ENUM)) 33 | #define PRAGHA_IS_MUSIC_ENUM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_MUSIC_ENUM)) 34 | #define PRAGHA_MUSIC_ENUM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_MUSIC_ENUM, PraghaMusicEnumClass)) 35 | 36 | typedef struct _PraghaMusicEnum PraghaMusicEnum; 37 | typedef struct _PraghaMusicEnumClass PraghaMusicEnumClass; 38 | 39 | struct _PraghaMusicEnumClass 40 | { 41 | GObjectClass parent_class; 42 | void (*enum_removed) (PraghaMusicEnum *enum_map, gint enum_removed); 43 | }; 44 | 45 | PraghaMusicEnum *pragha_music_enum_get (void); 46 | 47 | const gchar *pragha_music_enum_map_get_name (PraghaMusicEnum *enum_map, gint enum_code); 48 | gint pragha_music_enum_map_get (PraghaMusicEnum *enum_map, const gchar *name); 49 | gint pragha_music_enum_map_remove (PraghaMusicEnum *enum_map, const gchar *name); 50 | 51 | G_END_DECLS 52 | 53 | #endif /* PRAGHA_MUSIC_ENUM_H */ 54 | -------------------------------------------------------------------------------- /src/pragha-musicobject-mgmt.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2007-2009 sujith */ 3 | /* Copyright (C) 2009-2018 matias */ 4 | /* */ 5 | /* This program is free software: you can redistribute it and/or modify */ 6 | /* it under the terms of the GNU General Public License as published by */ 7 | /* the Free Software Foundation, either version 3 of the License, or */ 8 | /* (at your option) any later version. */ 9 | /* */ 10 | /* This program is distributed in the hope that it will be useful, */ 11 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 12 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 13 | /* GNU General Public License for more details. */ 14 | /* */ 15 | /* You should have received a copy of the GNU General Public License */ 16 | /* along with this program. If not, see . */ 17 | /*************************************************************************/ 18 | 19 | #ifndef PRAGHA_MUSICOBJECT_MGMT_H 20 | #define PRAGHA_MUSICOBJECT_MGMT_H 21 | 22 | #include "pragha-musicobject.h" 23 | #include "pragha-database.h" 24 | 25 | /* Flags to control tags changed. */ 26 | 27 | #define TAG_TNO_CHANGED 1<<0 28 | #define TAG_TITLE_CHANGED 1<<1 29 | #define TAG_ARTIST_CHANGED 1<<2 30 | #define TAG_ALBUM_CHANGED 1<<3 31 | #define TAG_GENRE_CHANGED 1<<4 32 | #define TAG_YEAR_CHANGED 1<<5 33 | #define TAG_COMMENT_CHANGED 1<<6 34 | 35 | PraghaMusicobject * 36 | new_musicobject_from_file (const gchar *file, 37 | const gchar *provider); 38 | 39 | PraghaMusicobject * 40 | new_musicobject_from_db (PraghaDatabase *cdbase, 41 | gint location_id); 42 | 43 | PraghaMusicobject * 44 | new_musicobject_from_location (const gchar *uri, 45 | const gchar *name); 46 | 47 | PraghaMusicobject * 48 | pragha_database_get_artist_and_title_song (PraghaDatabase *cdbase, 49 | const gchar *artist, 50 | const gchar *title); 51 | 52 | void 53 | pragha_update_musicobject_change_tag (PraghaMusicobject *mobj, 54 | gint changed, 55 | PraghaMusicobject *nmobj); 56 | 57 | #endif /* PRAGHA_MUSICOBJECT_MGMT_H */ 58 | -------------------------------------------------------------------------------- /src/pragha-playback.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2010-2019 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_PLAYBACK_H 19 | #define PRAGHA_PLAYBACK_H 20 | 21 | #include "pragha-backend.h" 22 | #include "pragha-playlist.h" 23 | 24 | #include "pragha.h" 25 | 26 | void pragha_playback_set_playlist_track (PraghaPlaylist *playlist, PraghaMusicobject *mobj, PraghaApplication *pragha); 27 | 28 | void pragha_playback_prev_track (PraghaApplication *pragha); 29 | void pragha_playback_play_pause_resume (PraghaApplication *pragha); 30 | void pragha_playback_stop (PraghaApplication *pragha); 31 | void pragha_playback_next_track (PraghaApplication *pragha); 32 | void pragha_advance_playback (PraghaApplication *pragha); 33 | 34 | gboolean pragha_playback_can_go_prev (PraghaApplication *pragha); 35 | gboolean pragha_playback_can_go_next (PraghaApplication *pragha); 36 | gint pragha_playback_get_no_tracks (PraghaApplication *pragha); 37 | 38 | void pragha_backend_finished_song (PraghaBackend *backend, PraghaApplication *pragha); 39 | void pragha_backend_finished_error (PraghaBackend *backend, const GError *error, PraghaApplication *pragha); 40 | 41 | void pragha_backend_tags_changed (PraghaBackend *backend, gint changed, PraghaApplication *pragha); 42 | 43 | void pragha_playback_show_current_album_art (GObject *object, PraghaApplication *pragha); 44 | void pragha_playback_edit_current_track (PraghaApplication *pragha); 45 | 46 | void pragha_playback_seek_fraction (GObject *object, gdouble fraction, PraghaApplication *pragha); 47 | void pragha_playback_toogle_favorite (GObject *object, PraghaApplication *pragha); 48 | 49 | #endif /* PRAGHA_PLAYBACK_H */ 50 | -------------------------------------------------------------------------------- /src/pragha-playlists-mgmt.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2007-2009 sujith */ 3 | /* Copyright (C) 2009-2019 matias */ 4 | /* */ 5 | /* This program is free software: you can redistribute it and/or modify */ 6 | /* it under the terms of the GNU General Public License as published by */ 7 | /* the Free Software Foundation, either version 3 of the License, or */ 8 | /* (at your option) any later version. */ 9 | /* */ 10 | /* This program is distributed in the hope that it will be useful, */ 11 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 12 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 13 | /* GNU General Public License for more details. */ 14 | /* */ 15 | /* You should have received a copy of the GNU General Public License */ 16 | /* along with this program. If not, see . */ 17 | /*************************************************************************/ 18 | 19 | #ifndef PRAGHA_PLAYLISTS_MGMT_H 20 | #define PRAGHA_PLAYLISTS_MGMT_H 21 | 22 | #include "pragha-database.h" 23 | #include "pragha-playlist.h" 24 | #include "pragha.h" 25 | 26 | /* Playlist management */ 27 | 28 | typedef enum { 29 | SAVE_COMPLETE, 30 | SAVE_SELECTED 31 | } PraghaPlaylistActionRange; 32 | 33 | #define SAVE_PLAYLIST_STATE "con_playlist" 34 | 35 | gchar *get_playlist_name(PraghaPlaylistActionRange type, GtkWidget *parent); 36 | void add_playlist_current_playlist(gchar *splaylist, PraghaApplication *pragha); 37 | GList * add_playlist_to_mobj_list(PraghaDatabase *cdbase, const gchar *playlist, GList *list); 38 | GList *add_radio_to_mobj_list(PraghaDatabase *cdbase, const gchar *playlist, GList *list); 39 | gboolean delete_existing_item_dialog(const gchar *item, GtkWidget *parent); 40 | gchar* rename_playlist_dialog(const gchar *oplaylist, GtkWidget *parent); 41 | GIOChannel *create_m3u_playlist(gchar *file); 42 | gint save_m3u_playlist(GIOChannel *chan, gchar *playlist, gchar *filename, PraghaDatabase *cdbase); 43 | gchar *playlist_export_dialog_get_filename(const gchar *prefix, GtkWidget *parent); 44 | 45 | void export_playlist (PraghaPlaylist* cplaylist, PraghaPlaylistActionRange choice); 46 | void save_playlist(PraghaPlaylist* cplaylist, gint playlist_id, PraghaPlaylistActionRange type); 47 | void new_playlist(PraghaPlaylist* cplaylist, const gchar *playlist, PraghaPlaylistActionRange type); 48 | void append_playlist(PraghaPlaylist* cplaylist, const gchar *playlist, PraghaPlaylistActionRange type); 49 | 50 | void 51 | pragha_playlist_database_update_playlist (PraghaDatabase *cdbase, const gchar *playlist, GList *mlist); 52 | void 53 | pragha_playlist_database_insert_playlist (PraghaDatabase *cdbase, const gchar *playlist, GList *mlist); 54 | 55 | void pragha_playlist_save_selection (PraghaPlaylist *playlist, const gchar *name); 56 | void pragha_playlist_save_playlist (PraghaPlaylist *playlist, const gchar *name); 57 | 58 | GList * 59 | pragha_pl_parser_append_mobj_list_by_extension (GList *mlist, const gchar *file); 60 | GSList *pragha_pl_parser_parse_from_file_by_extension (const gchar *filename); 61 | GSList *pragha_totem_pl_parser_parse_from_uri(const gchar *uri); 62 | void pragha_pl_parser_open_from_file_by_extension(const gchar *file, PraghaApplication *pragha); 63 | gchar * pragha_pl_get_first_playlist_item (const gchar *uri); 64 | 65 | gchar * 66 | new_radio (PraghaPlaylist *playlist, const gchar *uri, const gchar *basename); 67 | 68 | void update_playlist_changes_on_menu (PraghaPlaylist *playlist); 69 | 70 | #endif /* PRAGHA_PLAYLISTS_MGMT_H */ 71 | -------------------------------------------------------------------------------- /src/pragha-plugins-engine.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2013-2017 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_PLUGINS_ENGINE_H 19 | #define PRAGHA_PLUGINS_ENGINE_H 20 | 21 | #include 22 | #include 23 | 24 | G_BEGIN_DECLS 25 | 26 | #define PRAGHA_TYPE_PLUGINS_ENGINE (pragha_plugins_engine_get_type()) 27 | #define PRAGHA_PLUGINS_ENGINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_PLUGINS_ENGINE, PraghaPluginsEngine)) 28 | #define PRAGHA_PLUGINS_ENGINE_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_PLUGINS_ENGINE, PraghaPluginsEngine const)) 29 | #define PRAGHA_PLUGINS_ENGINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_PLUGINS_ENGINE, PraghaPluginsEngineClass)) 30 | #define PRAGHA_IS_PLUGINS_ENGINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_PLUGINS_ENGINE)) 31 | #define PRAGHA_IS_PLUGINS_ENGINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_PLUGINS_ENGINE)) 32 | #define PRAGHA_PLUGINS_ENGINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_PLUGINS_ENGINE, PraghaPluginsEngineClass)) 33 | 34 | typedef struct _PraghaPluginsEngine PraghaPluginsEngine; 35 | typedef struct _PraghaPluginsEngineClass PraghaPluginsEngineClass; 36 | 37 | struct _PraghaPluginsEngineClass 38 | { 39 | GObjectClass parent_class; 40 | }; 41 | 42 | gboolean pragha_plugins_engine_is_starting (PraghaPluginsEngine *engine); 43 | gboolean pragha_plugins_engine_is_shutdown (PraghaPluginsEngine *engine); 44 | 45 | void pragha_plugins_engine_shutdown (PraghaPluginsEngine *engine); 46 | void pragha_plugins_engine_startup (PraghaPluginsEngine *engine); 47 | 48 | PraghaPluginsEngine *pragha_plugins_engine_new (GObject *object); 49 | 50 | G_END_DECLS 51 | 52 | #endif /* PRAGHA_PLUGINS_ENGINE_H */ 53 | -------------------------------------------------------------------------------- /src/pragha-prepared-statement-private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Pavel Vasin 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | #ifndef PRAGHA_PREPARED_STATEMENT_PRIVATE_H 19 | #define PRAGHA_PREPARED_STATEMENT_PRIVATE_H 20 | 21 | #include 22 | 23 | #include "pragha-database.h" 24 | #include "pragha-prepared-statement.h" 25 | 26 | PraghaPreparedStatement* pragha_prepared_statement_new (sqlite3_stmt *stmt, PraghaDatabase *database); 27 | void pragha_prepared_statement_finalize (PraghaPreparedStatement *statement); 28 | 29 | #endif /* PRAGHA_PREPARED_STATEMENT_PRIVATE_H */ 30 | -------------------------------------------------------------------------------- /src/pragha-prepared-statement.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Pavel Vasin 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | #include "pragha-prepared-statement.h" 19 | #include "pragha-prepared-statement-private.h" 20 | 21 | #include 22 | 23 | #include "pragha-database.h" 24 | 25 | 26 | struct PraghaPreparedStatement { 27 | sqlite3_stmt *stmt; 28 | PraghaDatabase *database; 29 | }; 30 | 31 | PraghaPreparedStatement * 32 | pragha_prepared_statement_new (sqlite3_stmt *stmt, PraghaDatabase *database) 33 | { 34 | PraghaPreparedStatement *statement = g_slice_new (PraghaPreparedStatement); 35 | statement->stmt = stmt; 36 | statement->database = database; 37 | return statement; 38 | } 39 | 40 | void 41 | pragha_prepared_statement_finalize (PraghaPreparedStatement *statement) 42 | { 43 | sqlite3_finalize (statement->stmt); 44 | g_slice_free (PraghaPreparedStatement, statement); 45 | } 46 | 47 | void 48 | pragha_prepared_statement_free (PraghaPreparedStatement *statement) 49 | { 50 | pragha_database_release_statement (statement->database, statement); 51 | } 52 | 53 | static void 54 | on_sqlite_error (PraghaPreparedStatement *statement) 55 | { 56 | g_critical ("db: %s", pragha_database_get_last_error (statement->database)); 57 | } 58 | 59 | void 60 | pragha_prepared_statement_bind_string (PraghaPreparedStatement *statement, gint n, const gchar *value) 61 | { 62 | if (sqlite3_bind_text (statement->stmt, n, value, -1, SQLITE_TRANSIENT) != SQLITE_OK) 63 | on_sqlite_error (statement); 64 | } 65 | 66 | void 67 | pragha_prepared_statement_bind_int (PraghaPreparedStatement *statement, gint n, gint value) 68 | { 69 | if (sqlite3_bind_int (statement->stmt, n, value) != SQLITE_OK) 70 | on_sqlite_error (statement); 71 | } 72 | 73 | 74 | gboolean 75 | pragha_prepared_statement_step (PraghaPreparedStatement *statement) 76 | { 77 | int error_code = sqlite3_step (statement->stmt); 78 | 79 | if (error_code != SQLITE_OK && error_code != SQLITE_ROW && error_code != SQLITE_DONE) { 80 | on_sqlite_error (statement); 81 | } 82 | 83 | return error_code == SQLITE_ROW; 84 | } 85 | 86 | gint 87 | pragha_prepared_statement_get_int (PraghaPreparedStatement *statement, gint column) 88 | { 89 | return sqlite3_column_int (statement->stmt, column); 90 | } 91 | 92 | const gchar * 93 | pragha_prepared_statement_get_string (PraghaPreparedStatement *statement, gint column) 94 | { 95 | return (const gchar *) sqlite3_column_text (statement->stmt, column); 96 | } 97 | 98 | void 99 | pragha_prepared_statement_reset (PraghaPreparedStatement *statement) 100 | { 101 | sqlite3_stmt *stmt = statement->stmt; 102 | sqlite3_reset (stmt); 103 | sqlite3_clear_bindings (stmt); 104 | } 105 | 106 | const gchar * 107 | pragha_prepared_statement_get_sql (PraghaPreparedStatement *statement) 108 | { 109 | return sqlite3_sql (statement->stmt); 110 | } 111 | -------------------------------------------------------------------------------- /src/pragha-prepared-statement.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Pavel Vasin 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | */ 17 | 18 | #ifndef PRAGHA_PREPARED_STATEMENT_H 19 | #define PRAGHA_PREPARED_STATEMENT_H 20 | 21 | #include 22 | 23 | G_BEGIN_DECLS 24 | 25 | struct PraghaPreparedStatement; 26 | typedef struct PraghaPreparedStatement PraghaPreparedStatement; 27 | 28 | void pragha_prepared_statement_free (PraghaPreparedStatement *statement); 29 | void pragha_prepared_statement_bind_string (PraghaPreparedStatement *statement, gint n, const gchar *value); 30 | void pragha_prepared_statement_bind_int (PraghaPreparedStatement *statement, gint n, gint value); 31 | gboolean pragha_prepared_statement_step (PraghaPreparedStatement *statement); 32 | gint pragha_prepared_statement_get_int (PraghaPreparedStatement *statement, gint column); 33 | const gchar * pragha_prepared_statement_get_string (PraghaPreparedStatement *statement, gint column); 34 | void pragha_prepared_statement_reset (PraghaPreparedStatement *statement); 35 | const gchar * pragha_prepared_statement_get_sql (PraghaPreparedStatement *statement); 36 | 37 | G_END_DECLS 38 | 39 | #endif /* PRAGHA_PREPARED_STATEMENT_H */ 40 | -------------------------------------------------------------------------------- /src/pragha-provider.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2016 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_PROVIDER_H 19 | #define PRAGHA_PROVIDER_H 20 | 21 | #include 22 | 23 | G_BEGIN_DECLS 24 | 25 | GType pragha_provider_get_type (void); 26 | 27 | #define PRAGHA_TYPE_PROVIDER (pragha_provider_get_type()) 28 | #define PRAGHA_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_PROVIDER, PraghaProvider)) 29 | #define PRAGHA_PROVIDER_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_PROVIDER, PraghaProvider const)) 30 | #define PRAGHA_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_PROVIDER, PraghaProviderClass)) 31 | #define PRAGHA_IS_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_PROVIDER)) 32 | #define PRAGHA_IS_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_PROVIDER)) 33 | #define PRAGHA_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_PROVIDER, PraghaProviderClass)) 34 | 35 | typedef struct _PraghaProvider PraghaProvider; 36 | typedef struct _PraghaProviderClass PraghaProviderClass; 37 | 38 | struct _PraghaProviderClass { 39 | GObjectClass parent_class; 40 | }; 41 | 42 | /* 43 | * Public api. 44 | */ 45 | 46 | PraghaProvider * 47 | pragha_provider_new (const gchar *name, 48 | const gchar *kind, 49 | const gchar *friendly_name, 50 | const gchar *icon_name, 51 | gboolean visible, 52 | gboolean ignored); 53 | 54 | const gchar * 55 | pragha_provider_get_name (PraghaProvider *provider); 56 | const gchar * 57 | pragha_provider_get_kind (PraghaProvider *provider); 58 | const gchar * 59 | pragha_provider_get_friendly_name (PraghaProvider *provider); 60 | const gchar * 61 | pragha_provider_get_icon_name (PraghaProvider *provider); 62 | gboolean 63 | pragha_provider_get_visible (PraghaProvider *provider); 64 | gboolean 65 | pragha_provider_get_ignored (PraghaProvider *provider); 66 | 67 | G_END_DECLS 68 | 69 | #endif /* PRAGHA_PROVIDER_H */ 70 | 71 | -------------------------------------------------------------------------------- /src/pragha-scanner.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2013-2019 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_SCANNER_H 19 | #define PRAGHA_SCANNER_H 20 | 21 | typedef struct _PraghaScanner PraghaScanner; 22 | 23 | void 24 | pragha_scanner_update_library(PraghaScanner *scanner); 25 | 26 | void 27 | pragha_scanner_scan_library(PraghaScanner *scanner); 28 | 29 | void 30 | pragha_scanner_free(PraghaScanner *scanner); 31 | 32 | PraghaScanner * 33 | pragha_scanner_new(); 34 | 35 | #endif /* PRAGHA_SCANNER_H */ 36 | -------------------------------------------------------------------------------- /src/pragha-search-entry.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009-2013 matias 3 | * Copyright (C) 2013 Pavel Vasin 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef PRAGHA_SEARCH_ENTRY_H 20 | #define PRAGHA_SEARCH_ENTRY_H 21 | 22 | #include 23 | #include 24 | 25 | #include "pragha-preferences.h" 26 | 27 | G_BEGIN_DECLS 28 | 29 | GtkWidget * pragha_search_entry_new (PraghaPreferences *preferences); 30 | 31 | G_END_DECLS 32 | 33 | #endif /* PRAGHA_SEARCH_ENTRY_H */ 34 | -------------------------------------------------------------------------------- /src/pragha-session.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2009-2018 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #if HAVE_CONFIG_H 19 | #include 20 | #endif 21 | 22 | #include "pragha-session.h" 23 | 24 | #ifdef HAVE_LIBXFCE4UI 25 | #include 26 | #endif 27 | 28 | #include "pragha.h" 29 | 30 | #ifdef HAVE_LIBXFCE4UI 31 | void 32 | pragha_init_session_support(PraghaApplication *pragha) 33 | { 34 | XfceSMClient *client; 35 | GError *error = NULL; 36 | 37 | client = xfce_sm_client_get (); 38 | xfce_sm_client_set_priority (client, XFCE_SM_CLIENT_PRIORITY_DEFAULT); 39 | xfce_sm_client_set_restart_style (client, XFCE_SM_CLIENT_RESTART_NORMAL); 40 | xfce_sm_client_set_desktop_file(client, DESKTOPENTRY); 41 | 42 | g_signal_connect_swapped (G_OBJECT (client), "quit", 43 | G_CALLBACK (pragha_application_quit), pragha); 44 | 45 | if(!xfce_sm_client_connect (client, &error)) { 46 | g_warning ("Failed to connect to session manager: %s", error->message); 47 | g_error_free (error); 48 | 49 | // As fallback register DBUS session.. 50 | g_warning ("As fallback try to use dbus session manager"); 51 | g_object_set (GTK_APPLICATION(pragha), "register-session", TRUE, NULL); 52 | } 53 | } 54 | #else 55 | void 56 | pragha_init_session_support(PraghaApplication *pragha) 57 | { 58 | GtkWidget *window; 59 | gchar *role; 60 | 61 | window = pragha_application_get_window (pragha); 62 | 63 | /* set a unique role on each window (for session management) */ 64 | role = g_strdup_printf ("Pragha-%p-%d-%d", window, (gint) getpid (), (gint) time (NULL)); 65 | gtk_window_set_role (GTK_WINDOW (window), role); 66 | g_free (role); 67 | 68 | g_object_set (GTK_APPLICATION(pragha), "register-session", TRUE, NULL); 69 | } 70 | #endif 71 | -------------------------------------------------------------------------------- /src/pragha-session.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2009-2018 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_SESSION_H 19 | #define PRAGHA_SESSION_H 20 | 21 | #include "pragha.h" 22 | 23 | void pragha_init_session_support(PraghaApplication *pragha); 24 | 25 | #endif /* PRAGHA_SESSION_H */ 26 | -------------------------------------------------------------------------------- /src/pragha-sidebar.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2013-2019 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_SIDEBAR_H 19 | #define PRAGHA_SIDEBAR_H 20 | 21 | #include 22 | 23 | #define PRAGHA_TYPE_SIDEBAR (pragha_sidebar_get_type ()) 24 | #define PRAGHA_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_SIDEBAR, PraghaSidebar)) 25 | #define PRAGHA_IS_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_SIDEBAR)) 26 | #define PRAGHA_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_SIDEBAR, PraghaSidebarClass)) 27 | #define PRAGHA_IS_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_SIDEBAR)) 28 | #define PRAGHA_SIDEBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_SIDEBAR, PraghaSidebarClass)) 29 | 30 | typedef struct _PraghaSidebar PraghaSidebar; 31 | 32 | typedef struct { 33 | GtkScrolledWindowClass __parent__; 34 | void (*children_changed) (PraghaSidebar *sidebar); 35 | } PraghaSidebarClass; 36 | 37 | void 38 | pragha_sidebar_attach_plugin (PraghaSidebar *sidebar, 39 | GtkWidget *widget, 40 | GtkWidget *title, 41 | GtkWidget *popover); 42 | 43 | void 44 | pragha_sidebar_remove_plugin (PraghaSidebar *sidebar, 45 | GtkWidget *widget); 46 | 47 | gint 48 | pragha_sidebar_get_n_panes (PraghaSidebar *sidebar); 49 | 50 | void 51 | pragha_sidebar_style_position (PraghaSidebar *sidebar, 52 | GtkPositionType position); 53 | 54 | PraghaSidebar *pragha_sidebar_new (void); 55 | 56 | #endif /* PRAGHA_SIDEBAR_H */ 57 | -------------------------------------------------------------------------------- /src/pragha-simple-async.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2012-2019 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_SIMPLE_ASYNC_H 19 | #define PRAGHA_SIMPLE_ASYNC_H 20 | 21 | #include 22 | 23 | typedef struct _AsyncSimple AsyncSimple; 24 | 25 | typedef struct _IdleMessage IdleMessage; 26 | 27 | IdleMessage * 28 | pragha_idle_message_new (gchar *title, 29 | gchar *message, 30 | gboolean transient); 31 | 32 | void 33 | pragha_idle_message_free (IdleMessage *im); 34 | 35 | gboolean pragha_async_set_idle_message (gpointer user_data); 36 | 37 | void pragha_async_launch (GThreadFunc worker_func, GSourceFunc finish_func, gpointer userdata); 38 | 39 | GThread *pragha_async_launch_full (GThreadFunc worker_func, GSourceFunc finish_func, gpointer userdata); 40 | 41 | #endif /* PRAGHA_SIMPLE_ASYNC_H */ 42 | -------------------------------------------------------------------------------- /src/pragha-simple-widgets.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2009-2018 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_SIMPLE_WIDGETS_H 19 | #define PRAGHA_SIMPLE_WIDGETS_H 20 | 21 | #include 22 | 23 | G_BEGIN_DECLS 24 | 25 | typedef struct _PraghaHeader PraghaHeader; 26 | typedef struct _PraghaTrackProgress PraghaTrackProgress; 27 | typedef struct _PraghaContainer PraghaContainer; 28 | typedef struct _PraghaToolbarButton PraghaToolbarButton; 29 | typedef struct _PraghaToggleButton PraghaToggleButton; 30 | 31 | PraghaHeader *pragha_header_new (void); 32 | void 33 | pragha_header_set_icon_name (PraghaHeader *header, 34 | const gchar *icon_name); 35 | void 36 | pragha_header_set_title (PraghaHeader *header, 37 | const gchar *title); 38 | void 39 | pragha_header_set_subtitle (PraghaHeader *header, 40 | const gchar *subtitle); 41 | 42 | 43 | void pragha_toolbar_button_set_icon_name (PraghaToolbarButton *button, const gchar *icon_name); 44 | void pragha_toolbar_button_set_icon_size (PraghaToolbarButton *button, GtkIconSize icon_size); 45 | PraghaToolbarButton *pragha_toolbar_button_new (const gchar *icon_name); 46 | 47 | void pragha_toggle_button_set_icon_name (PraghaToggleButton *button, const gchar *icon_name); 48 | void pragha_toggle_button_set_icon_size (PraghaToggleButton *button, GtkIconSize icon_size); 49 | PraghaToggleButton *pragha_toggle_button_new (const gchar *icon_name); 50 | 51 | 52 | G_END_DECLS 53 | 54 | #endif /* PRAGHA_SIMPLE_WIDGETS_H */ 55 | -------------------------------------------------------------------------------- /src/pragha-song-cache.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2017 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_SONG_CACHE_H 19 | #define PRAGHA_SONG_CACHE_H 20 | 21 | #include 22 | #include 23 | 24 | G_BEGIN_DECLS 25 | 26 | #define PRAGHA_TYPE_SONG_CACHE (pragha_song_cache_get_type()) 27 | #define PRAGHA_SONG_CACHE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_SONG_CACHE, PraghaSongCache)) 28 | #define PRAGHA_SONG_CACHE_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_SONG_CACHE, PraghaSongCache const)) 29 | #define PRAGHA_SONG_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_SONG_CACHE, PraghaSongCacheClass)) 30 | #define PRAGHA_IS_SONG_CACHE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_SONG_CACHE)) 31 | #define PRAGHA_IS_SONG_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_SONG_CACHE)) 32 | #define PRAGHA_SONG_CACHE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_SONG_CACHE, PraghaSongCacheClass)) 33 | 34 | typedef struct _PraghaSongCache PraghaSongCache; 35 | typedef struct _PraghaSongCacheClass PraghaSongCacheClass; 36 | 37 | struct _PraghaSongCacheClass 38 | { 39 | GObjectClass parent_class; 40 | }; 41 | 42 | PraghaSongCache *pragha_song_cache_get (void); 43 | 44 | void pragha_song_cache_put_location (PraghaSongCache *cache, const gchar *location, const gchar *filename); 45 | gchar *pragha_song_cache_get_from_location (PraghaSongCache *cache, const gchar *location); 46 | 47 | 48 | G_END_DECLS 49 | 50 | #endif /* PRAGHA_SONG_CACHE_H */ 51 | -------------------------------------------------------------------------------- /src/pragha-statusbar.c: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2013-2019 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #include "pragha-statusbar.h" 19 | #include "pragha-background-task-bar.h" 20 | 21 | #include "pragha-preferences.h" 22 | 23 | struct _PraghaStatusbarClass 24 | { 25 | GtkStatusbarClass __parent__; 26 | }; 27 | 28 | struct _PraghaStatusbar 29 | { 30 | GtkBox __parent__; 31 | 32 | GtkWidget *label; 33 | }; 34 | 35 | G_DEFINE_TYPE (PraghaStatusbar, pragha_statusbar, GTK_TYPE_BOX) 36 | 37 | static void 38 | pragha_statusbar_class_init (PraghaStatusbarClass *klass) 39 | { 40 | } 41 | 42 | static void 43 | pragha_statusbar_init (PraghaStatusbar *statusbar) 44 | { 45 | GtkStyleContext *context; 46 | 47 | statusbar->label = gtk_label_new (NULL); 48 | g_object_set (statusbar->label, 49 | "margin-top", 2, 50 | "margin-bottom", 2, 51 | "margin-start", 12, 52 | "margin-end", 12, 53 | NULL); 54 | 55 | gtk_container_add(GTK_CONTAINER(statusbar), statusbar->label); 56 | 57 | context = gtk_widget_get_style_context (GTK_WIDGET (statusbar)); 58 | gtk_style_context_add_class (context, "floating-bar"); 59 | 60 | gtk_widget_show_all (GTK_WIDGET(statusbar)); 61 | } 62 | 63 | /** 64 | * pragha_statusbar_set_main_text: 65 | * @statusbar : a #PraghaStatusbar instance. 66 | * @text : the main text to be displayed in @statusbar. 67 | * 68 | * Sets up a new main text for @statusbar. 69 | **/ 70 | void 71 | pragha_statusbar_set_main_text (PraghaStatusbar *statusbar, 72 | const gchar *text) 73 | { 74 | g_return_if_fail (PRAGHA_IS_STATUSBAR (statusbar)); 75 | g_return_if_fail (text != NULL); 76 | 77 | gtk_label_set_text (GTK_LABEL (statusbar->label), text); 78 | } 79 | 80 | /** 81 | * pragha_statusbar_get: 82 | * 83 | * Queries the global #GtkStatusbar instance, which is shared 84 | * by all modules. The function automatically takes a reference 85 | * for the caller, so you'll need to call g_object_unref() when 86 | * you're done with it. 87 | * 88 | * Return value: the global #GtkStatusbar instance. 89 | **/ 90 | 91 | PraghaStatusbar * 92 | pragha_statusbar_get (void) 93 | { 94 | static PraghaStatusbar *statusbar = NULL; 95 | 96 | if (G_UNLIKELY (statusbar == NULL)) { 97 | statusbar = g_object_new(PRAGHA_TYPE_STATUSBAR, NULL); 98 | g_object_add_weak_pointer(G_OBJECT (statusbar), 99 | (gpointer) &statusbar); 100 | } 101 | else { 102 | g_object_ref (G_OBJECT(statusbar)); 103 | } 104 | return statusbar; 105 | } 106 | -------------------------------------------------------------------------------- /src/pragha-statusbar.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2013-2019 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | 19 | #ifndef __PRAGHA_STATUSBAR_H__ 20 | #define __PRAGHA_STATUSBAR_H__ 21 | 22 | #include 23 | 24 | G_BEGIN_DECLS; 25 | 26 | typedef struct _PraghaStatusbarClass PraghaStatusbarClass; 27 | typedef struct _PraghaStatusbar PraghaStatusbar; 28 | 29 | #define PRAGHA_TYPE_STATUSBAR (pragha_statusbar_get_type ()) 30 | #define PRAGHA_STATUSBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_STATUSBAR, PraghaStatusbar)) 31 | #define PRAGHA_STATUSBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_STATUSBAR, PraghaStatusbarClass)) 32 | #define PRAGHA_IS_STATUSBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_STATUSBAR)) 33 | #define PRAGHA_IS_STATUSBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_STATUSBAR)) 34 | #define PRAGHA_STATUSBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_STATUSBAR, PraghaStatusbarClass)) 35 | 36 | void 37 | pragha_statusbar_set_main_text (PraghaStatusbar *statusbar, 38 | const gchar *text); 39 | 40 | 41 | GType pragha_statusbar_get_type (void) G_GNUC_CONST; 42 | 43 | PraghaStatusbar * 44 | pragha_statusbar_get (void); 45 | 46 | G_END_DECLS; 47 | 48 | #endif /* !__PRAGHA_STATUSBAR_H__ */ 49 | 50 | -------------------------------------------------------------------------------- /src/pragha-statusicon.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2007-2009 sujith */ 3 | /* Copyright (C) 2009-2019 matias */ 4 | /* */ 5 | /* This program is free software: you can redistribute it and/or modify */ 6 | /* it under the terms of the GNU General Public License as published by */ 7 | /* the Free Software Foundation, either version 3 of the License, or */ 8 | /* (at your option) any later version. */ 9 | /* */ 10 | /* This program is distributed in the hope that it will be useful, */ 11 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 12 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 13 | /* GNU General Public License for more details. */ 14 | /* */ 15 | /* You should have received a copy of the GNU General Public License */ 16 | /* along with this program. If not, see . */ 17 | /*************************************************************************/ 18 | 19 | #ifndef PRAGHA_STATUSICON_H 20 | #define PRAGHA_STATUSICON_H 21 | 22 | #include 23 | 24 | /* pragha.h */ 25 | typedef struct _PraghaApplication PraghaApplication; 26 | 27 | #define PRAGHA_TYPE_STATUS_ICON (pragha_status_icon_get_type ()) 28 | #define PRAGHA_STATUS_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_STATUS_ICON, PraghaStatusIcon)) 29 | #define PRAGHA_IS_STATUS_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_STATUS_ICON)) 30 | #define PRAGHA_STATUS_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_STATUS_ICON, PraghaStatusIconClass)) 31 | #define PRAGHA_IS_STATUS_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_STATUS_ICON)) 32 | #define PRAGHA_STATUS_ICON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_STATUS_ICON, PraghaStatusIconClass)) 33 | 34 | typedef struct { 35 | G_GNUC_BEGIN_IGNORE_DEPRECATIONS 36 | GtkStatusIconClass __parent__; 37 | G_GNUC_END_IGNORE_DEPRECATIONS 38 | } PraghaStatusIconClass; 39 | 40 | typedef struct _PraghaStatusIcon PraghaStatusIcon; 41 | 42 | void 43 | pragha_systray_append_action (PraghaStatusIcon *status_icon, 44 | const gchar *placeholder, 45 | GSimpleAction *action, 46 | GMenuItem *item); 47 | 48 | void 49 | pragha_systray_remove_action (PraghaStatusIcon *status_icon, 50 | const gchar *placeholder, 51 | const gchar *action_name); 52 | 53 | PraghaStatusIcon *pragha_status_icon_new (PraghaApplication *pragha); 54 | 55 | #endif /* PRAGHA_STATUSICON_H */ 56 | -------------------------------------------------------------------------------- /src/pragha-tagger.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2013-2019 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_TAGGER_H 19 | #define PRAGHA_TAGGER_H 20 | 21 | #include 22 | #include "pragha-musicobject.h" 23 | 24 | G_BEGIN_DECLS 25 | 26 | #define PRAGHA_TYPE_TAGGER (pragha_tagger_get_type()) 27 | #define PRAGHA_TAGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_TAGGER, PraghaTagger)) 28 | #define PRAGHA_TAGGER_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_TAGGER, PraghaTagger const)) 29 | #define PRAGHA_TAGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_TAGGER, PraghaTaggerClass)) 30 | #define PRAGHA_IS_TAGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_TAGGER)) 31 | #define PRAGHA_IS_TAGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_TAGGER)) 32 | #define PRAGHA_TAGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_TAGGER, PraghaTaggerClass)) 33 | 34 | typedef struct _PraghaTagger PraghaTagger; 35 | typedef struct _PraghaTaggerClass PraghaTaggerClass; 36 | typedef struct _PraghaTaggerPrivate PraghaTaggerPrivate; 37 | 38 | struct _PraghaTagger 39 | { 40 | GObject parent; 41 | 42 | /*< private >*/ 43 | PraghaTaggerPrivate *priv; 44 | }; 45 | 46 | struct _PraghaTaggerClass 47 | { 48 | GObjectClass parent_class; 49 | }; 50 | 51 | void pragha_tagger_set_changes (PraghaTagger *tagger, PraghaMusicobject *mobj, gint changed); 52 | void pragha_tagger_add_file (PraghaTagger *tagger, const gchar *file); 53 | void pragha_tagger_add_location_id (PraghaTagger *tagger, gint location_id); 54 | void pragha_tagger_apply_changes (PraghaTagger *tagger); 55 | 56 | PraghaTagger *pragha_tagger_new (void); 57 | 58 | G_END_DECLS 59 | 60 | #endif /* PRAGHA_TAGGER_H */ 61 | -------------------------------------------------------------------------------- /src/pragha-tags-dialog.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2007-2009 sujith */ 3 | /* Copyright (C) 2009-2013 matias */ 4 | /* */ 5 | /* This program is free software: you can redistribute it and/or modify */ 6 | /* it under the terms of the GNU General Public License as published by */ 7 | /* the Free Software Foundation, either version 3 of the License, or */ 8 | /* (at your option) any later version. */ 9 | /* */ 10 | /* This program is distributed in the hope that it will be useful, */ 11 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 12 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 13 | /* GNU General Public License for more details. */ 14 | /* */ 15 | /* You should have received a copy of the GNU General Public License */ 16 | /* along with this program. If not, see . */ 17 | /*************************************************************************/ 18 | 19 | #ifndef PRAGHA_TAGS_DIALOG_H 20 | #define PRAGHA_TAGS_DIALOG_H 21 | 22 | #include 23 | #include 24 | 25 | #include "pragha-musicobject.h" 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define PRAGHA_TYPE_TAGS_DIALOG (pragha_tags_dialog_get_type ()) 30 | #define PRAGHA_TAGS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_TAGS_DIALOG, PraghaTagsDialog)) 31 | #define PRAGHA_TAGS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_TAGS_DIALOG, PraghaTagsDialogClass)) 32 | #define PRAGHA_IS_TAGS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_TAGS_DIALOG)) 33 | #define PRAGHA_IS_TAGS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHAL_TYPE_TAGS_DIALOG)) 34 | #define PRAGHA_TAGS_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_TAGS_DIALOG, PraghaTagsDialogClass)) 35 | 36 | #define TAG_MAX_LEN 256 37 | 38 | typedef struct _PraghaTagsDialogClass PraghaTagsDialogClass; 39 | typedef struct _PraghaTagsDialog PraghaTagsDialog; 40 | 41 | GType pragha_tags_dialog_get_type (void) G_GNUC_CONST; 42 | 43 | PraghaMusicobject *pragha_tags_dialog_get_musicobject (PraghaTagsDialog *dialog); 44 | void pragha_tags_dialog_set_musicobject (PraghaTagsDialog *dialog, PraghaMusicobject *mobj); 45 | 46 | void pragha_tags_dialog_set_changed (PraghaTagsDialog *dialog, gint changed); 47 | gint pragha_tags_dialog_get_changed (PraghaTagsDialog *dialog); 48 | 49 | GtkWidget *pragha_tags_dialog_new (void); 50 | 51 | void pragha_track_properties_dialog (PraghaMusicobject *mobj, GtkWidget *parent); 52 | 53 | G_END_DECLS 54 | 55 | #endif /* PRAGHA_TAGS_DIALOG_H */ -------------------------------------------------------------------------------- /src/pragha-tags-mgmt.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2007-2009 sujith */ 3 | /* Copyright (C) 2009-2013 matias */ 4 | /* */ 5 | /* This program is free software: you can redistribute it and/or modify */ 6 | /* it under the terms of the GNU General Public License as published by */ 7 | /* the Free Software Foundation, either version 3 of the License, or */ 8 | /* (at your option) any later version. */ 9 | /* */ 10 | /* This program is distributed in the hope that it will be useful, */ 11 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 12 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 13 | /* GNU General Public License for more details. */ 14 | /* */ 15 | /* You should have received a copy of the GNU General Public License */ 16 | /* along with this program. If not, see . */ 17 | /*************************************************************************/ 18 | 19 | #ifndef PRAGHA_TAGS_MGMT_H 20 | #define PRAGHA_TAGS_MGMT_H 21 | 22 | #include 23 | 24 | #include "pragha-musicobject.h" 25 | 26 | gboolean pragha_musicobject_set_tags_from_file(PraghaMusicobject *mobj, const gchar *file); 27 | gboolean pragha_musicobject_save_tags_to_file(gchar *file, PraghaMusicobject *mobj, int changed); 28 | gboolean confirm_tno_multiple_tracks(gint tno, GtkWidget *parent); 29 | gboolean confirm_title_multiple_tracks(const gchar *title, GtkWidget *parent); 30 | void pragha_update_local_files_change_tag(GPtrArray *file_arr, gint changed, PraghaMusicobject *mobj); 31 | 32 | #endif /* PRAGHA_TAGS_MGMT_H */ -------------------------------------------------------------------------------- /src/pragha-temp-provider.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2018-2019 matias */ 3 | /* */ 4 | /* This program is free software: you can redistribute it and/or modify */ 5 | /* it under the terms of the GNU General Public License as published by */ 6 | /* the Free Software Foundation, either version 3 of the License, or */ 7 | /* (at your option) any later version. */ 8 | /* */ 9 | /* This program is distributed in the hope that it will be useful, */ 10 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 11 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 12 | /* GNU General Public License for more details. */ 13 | /* */ 14 | /* You should have received a copy of the GNU General Public License */ 15 | /* along with this program. If not, see . */ 16 | /*************************************************************************/ 17 | 18 | #ifndef PRAGHA_TEMP_PROVIDER_H 19 | #define PRAGHA_TEMP_PROVIDER_H 20 | 21 | #include 22 | #include 23 | 24 | #include "pragha-musicobject.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define PRAGHA_TYPE_TEMP_PROVIDER (pragha_temp_provider_get_type()) 29 | #define PRAGHA_TEMP_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_TEMP_PROVIDER, PraghaTempProvider)) 30 | #define PRAGHA_TEMP_PROVIDER_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PRAGHA_TYPE_TEMP_PROVIDER, PraghaTempProvider const)) 31 | #define PRAGHA_TEMP_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PRAGHA_TYPE_TEMP_PROVIDER, PraghaTempProviderClass)) 32 | #define PRAGHA_IS_TEMP_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PRAGHA_TYPE_TEMP_PROVIDER)) 33 | #define PRAGHA_IS_TEMP_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PRAGHA_TYPE_TEMP_PROVIDER)) 34 | #define PRAGHA_TEMP_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PRAGHA_TYPE_TEMP_PROVIDER, PraghaTempProviderClass)) 35 | 36 | typedef struct _PraghaTempProvider PraghaTempProvider; 37 | typedef struct _PraghaTempProviderClass PraghaTempProviderClass; 38 | 39 | struct _PraghaTempProviderClass 40 | { 41 | GObjectClass parent_class; 42 | }; 43 | 44 | 45 | void 46 | pragha_temp_provider_insert_track (PraghaTempProvider *provider, 47 | PraghaMusicobject *mobj); 48 | 49 | void 50 | pragha_temp_provider_merge_database (PraghaTempProvider *provider); 51 | 52 | void 53 | pragha_temp_provider_commit_database (PraghaTempProvider *provider); 54 | 55 | void 56 | pragha_temp_provider_set_visible (PraghaTempProvider *provider, 57 | gboolean visible); 58 | 59 | PraghaTempProvider * 60 | pragha_temp_provider_new (const gchar *name, 61 | const gchar *type, 62 | const gchar *friendly_name, 63 | const gchar *icon_name); 64 | 65 | G_END_DECLS 66 | 67 | #endif /* PRAGHA_TEMP_PROVIDER_H */ 68 | -------------------------------------------------------------------------------- /src/pragha-utils.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2007-2009 sujith */ 3 | /* Copyright (C) 2009-2013 matias */ 4 | /* */ 5 | /* This program is free software: you can redistribute it and/or modify */ 6 | /* it under the terms of the GNU General Public License as published by */ 7 | /* the Free Software Foundation, either version 3 of the License, or */ 8 | /* (at your option) any later version. */ 9 | /* */ 10 | /* This program is distributed in the hope that it will be useful, */ 11 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 12 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 13 | /* GNU General Public License for more details. */ 14 | /* */ 15 | /* You should have received a copy of the GNU General Public License */ 16 | /* along with this program. If not, see . */ 17 | /*************************************************************************/ 18 | 19 | #ifndef PRAGHA_UTILS_H 20 | #define PRAGHA_UTILS_H 21 | 22 | #include 23 | 24 | #include "pragha-musicobject.h" 25 | #include "pragha-preferences.h" 26 | 27 | #define string_is_empty(s) (!(s) || !(s)[0]) 28 | #define string_is_not_empty(s) (s && (s)[0]) 29 | 30 | gchar *pragha_unescape_html_utf75 (const gchar *str); 31 | 32 | gchar *e2_utf8_ndup (const gchar *str, glong num); 33 | gsize levenshtein_strcmp(const gchar * s, const gchar * t); 34 | gsize levenshtein_safe_strcmp(const gchar * s, const gchar * t); 35 | gchar *g_strstr_lv (gchar *haystack, gchar *needle, gsize lv_distance); 36 | gchar *pragha_strstr_lv(gchar *haystack, gchar *needle, PraghaPreferences *preferences); 37 | 38 | void set_watch_cursor (GtkWidget *widget); 39 | void remove_watch_cursor (GtkWidget *widget); 40 | 41 | GdkPixbuf * pragha_gdk_pixbuf_new_from_memory (gconstpointer data, gsize size); 42 | gchar* convert_length_str(gint length); 43 | 44 | gboolean 45 | pragha_string_list_is_present (GSList *list, const gchar *str); 46 | gboolean 47 | pragha_string_list_is_not_present (GSList *list, const gchar *str); 48 | GSList * 49 | pragha_string_list_get_added (GSList *list, GSList *new_list); 50 | GSList * 51 | pragha_string_list_get_removed (GSList *list, GSList *new_list); 52 | 53 | gboolean is_present_str_list(const gchar *str, GSList *list); 54 | GSList* delete_from_str_list(const gchar *str, GSList *list); 55 | gchar * path_get_dir_as_uri (const gchar *path); 56 | gchar* get_display_filename(const gchar *filename, gboolean get_folder); 57 | gchar* get_display_name(PraghaMusicobject *mobj); 58 | void free_str_list(GSList *list); 59 | gint compare_utf8_str(const gchar *str1, const gchar *str2); 60 | gchar * pragha_escape_slashes (const gchar *str); 61 | gboolean validate_album_art_pattern(const gchar *pattern); 62 | void pragha_process_gtk_events (); 63 | void open_url(const gchar *url, GtkWidget *parent); 64 | 65 | void 66 | pragha_utils_set_menu_position (GtkMenu *menu, 67 | gint *x, 68 | gint *y, 69 | gboolean *push_in, 70 | gpointer user_data); 71 | 72 | #endif /* PRAGHA_UTILS_H */ 73 | -------------------------------------------------------------------------------- /src/pragha-window.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************/ 2 | /* Copyright (C) 2007-2009 sujith */ 3 | /* Copyright (C) 2009-2019 matias */ 4 | /* */ 5 | /* This program is free software: you can redistribute it and/or modify */ 6 | /* it under the terms of the GNU General Public License as published by */ 7 | /* the Free Software Foundation, either version 3 of the License, or */ 8 | /* (at your option) any later version. */ 9 | /* */ 10 | /* This program is distributed in the hope that it will be useful, */ 11 | /* but WITHOUT ANY WARRANTY; without even the implied warranty of */ 12 | /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ 13 | /* GNU General Public License for more details. */ 14 | /* */ 15 | /* You should have received a copy of the GNU General Public License */ 16 | /* along with this program. If not, see . */ 17 | /*************************************************************************/ 18 | 19 | #ifndef PRAGHA_WINDOW_H 20 | #define PRAGHA_WINDOW_H 21 | 22 | #include 23 | 24 | #include "pragha-backend.h" 25 | #include "pragha.h" 26 | 27 | gboolean pragha_close_window (GtkWidget *widget, GdkEvent *event, PraghaApplication *pragha); 28 | void pragha_destroy_window (GtkWidget *widget, PraghaApplication *pragha); 29 | void pragha_window_toggle_state (PraghaApplication *pragha, gboolean ignoreActivity); 30 | 31 | void pragha_window_show_backend_error_dialog (PraghaApplication *pragha); 32 | 33 | void gui_backend_error_update_current_playlist_cb (PraghaBackend *backend, const GError *error, PraghaApplication *pragha); 34 | 35 | void pragha_window_unfullscreen (GObject *object, PraghaApplication *pragha); 36 | 37 | void pragha_window_add_widget_to_infobox (PraghaApplication *pragha, GtkWidget *widget); 38 | 39 | void pragha_init_gui_state (PraghaApplication *pragha); 40 | 41 | void pragha_window_save_settings (PraghaApplication *pragha); 42 | 43 | void pragha_window_new (PraghaApplication *pragha); 44 | 45 | #endif /* PRAGHA_WINDOW_H */ 46 | -------------------------------------------------------------------------------- /src/win32/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_LTLIBRARIES=libwin32.la 2 | 3 | libwin32_la_SOURCES = \ 4 | win32dep.c \ 5 | win32dep.h 6 | 7 | libwin32_la_CFLAGS = $(PRAGHA_CFLAGS) 8 | libwin32_la_LIBADD = $(PRAGHA_LIBS) 9 | 10 | EXTRA_DIST = \ 11 | pragha.ico \ 12 | pragha.rc 13 | -------------------------------------------------------------------------------- /src/win32/README: -------------------------------------------------------------------------------- 1 | OVERVIEW: 2 | 3 | Here is a brief description of how to compile Pragha to Windows using MinGW 4 | from an Fedora host system. Note that these were my tests. Surely there are 5 | better ways of doing it. In any case send me a mail. 6 | 7 | Install deps: 8 | # sudo yum install mingw32-gcc mingw32-gtk3 mingw32-gstreamer1 \ 9 | mingw32-gstreamer1-plugins-base mingw32-sqlite mingw32-taglib 10 | 11 | Prepare the build: 12 | # git clone https://github.com/matiasdelellis/pragha.git PraghaWin32 13 | # cd PraghaWin32 14 | # ./autogen.sh --host=i586-mingw32msvc --enable-debug 15 | # mingw32-configure --host=i586-mingw32msvc --enable-debug 16 | 17 | Build and install: 18 | # make -j5 19 | # sudo make install 20 | 21 | How to test: 22 | # sudo yum install wine 23 | # wine /usr/i686-w64-mingw32/sys-root/mingw/bin/pragha.exe 24 | 25 | It work properly? 26 | Probably not, due to lack the support to directsound, and all proprietary 27 | codecs. You need install a complete version of Gstreamer SDK 28 | 29 | Please, continue with the next section: 30 | https://github.com/pragha-music-player/pragha-win32-installer 31 | -------------------------------------------------------------------------------- /src/win32/pragha.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pragha-music-player/pragha/c6459372d14926a7ad63310c2a1df798c9aa980b/src/win32/pragha.ico -------------------------------------------------------------------------------- /src/win32/pragha.rc: -------------------------------------------------------------------------------- 1 | A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "pragha.ico" 2 | -------------------------------------------------------------------------------- /src/win32/win32dep.c: -------------------------------------------------------------------------------- 1 | /* 2 | * easytag 3 | * 4 | * File: win32dep.c 5 | * Date: June, 2002 6 | * Description: Windows dependant code for Easytag 7 | * this code if largely taken from win32 Gaim and Purple 8 | * 9 | * Copyright (C) 2002-2003, Herman Bloggs 10 | * 11 | * This program is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License 22 | * along with this program; if not, write to the Free Software 23 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 24 | * 25 | */ 26 | 27 | /* Needed for G_OS_WIN32. */ 28 | #include 29 | 30 | #ifdef G_OS_WIN32 31 | 32 | #include 33 | 34 | #include "win32dep.h" 35 | 36 | /* 37 | * DEFINES & MACROS 38 | */ 39 | #define _(x) gettext(x) 40 | 41 | /* 42 | * LOCALS 43 | */ 44 | static char *install_dir = NULL, *locale_dir = NULL; 45 | 46 | /* 47 | * PUBLIC CODE 48 | */ 49 | 50 | /* Determine Easytag Paths during Runtime */ 51 | const gchar * 52 | weasytag_install_dir (void) 53 | { 54 | static gboolean initialized = FALSE; 55 | 56 | if (!initialized) 57 | { 58 | gchar *tmp; 59 | 60 | tmp = g_win32_get_package_installation_directory_of_module (NULL); 61 | 62 | if (tmp == NULL) 63 | { 64 | tmp = g_win32_error_message (GetLastError ()); 65 | g_debug ("GetModuleFileName error: %s", tmp); 66 | g_free (tmp); 67 | return NULL; 68 | } 69 | else 70 | { 71 | install_dir = tmp; 72 | initialized = TRUE; 73 | } 74 | } 75 | 76 | return install_dir; 77 | } 78 | 79 | const gchar * 80 | weasytag_locale_dir (void) 81 | { 82 | static gboolean initialized = FALSE; 83 | 84 | if (!initialized) 85 | { 86 | const gchar *inst_dir = weasytag_install_dir (); 87 | 88 | if (inst_dir != NULL) 89 | { 90 | locale_dir = g_build_filename (inst_dir, "share", "locale", NULL); 91 | initialized = TRUE; 92 | } 93 | else 94 | { 95 | return NULL; 96 | } 97 | } 98 | return locale_dir; 99 | } 100 | 101 | const gchar * 102 | weasytag_pixbuf_dir (void) 103 | { 104 | static gboolean initialized = FALSE; 105 | 106 | if (!initialized) 107 | { 108 | const gchar *inst_dir = weasytag_install_dir (); 109 | 110 | if (inst_dir != NULL) 111 | { 112 | locale_dir = g_build_filename (inst_dir, "share", "pixmaps", "pragha", NULL); 113 | initialized = TRUE; 114 | } 115 | else 116 | { 117 | return NULL; 118 | } 119 | } 120 | 121 | return locale_dir; 122 | } 123 | 124 | #endif /* G_OS_WIN32 */ 125 | -------------------------------------------------------------------------------- /src/win32/win32dep.h: -------------------------------------------------------------------------------- 1 | /* 2 | * easytag 3 | * 4 | * File: win32dep.h 5 | * 6 | * Copyright (C) 2002-2003, Herman Bloggs 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation; either version 2 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 | * 22 | */ 23 | #ifndef _WIN32DEP_H_ 24 | #define _WIN32DEP_H_ 25 | 26 | #include /* Needed for G_OS_WIN32. */ 27 | 28 | #ifdef G_OS_WIN32 29 | 30 | G_BEGIN_DECLS 31 | 32 | /* 33 | * Windows helper functions 34 | */ 35 | 36 | /* Determine Pragha paths */ 37 | 38 | const gchar * weasytag_install_dir (void); 39 | const gchar * weasytag_locale_dir (void); 40 | const gchar * weasytag_pixbuf_dir (void); 41 | 42 | #undef DATADIR 43 | #undef PACKAGE_LOCALE_DIR 44 | #undef PIXMAPDIR 45 | #define DATADIR weasytag_install_dir() 46 | #define PACKAGE_LOCALE_DIR weasytag_locale_dir() 47 | #define PIXMAPDIR weasytag_pixbuf_dir() 48 | 49 | G_END_DECLS 50 | 51 | #endif /* G_OS_WIN32 */ 52 | 53 | #endif /* _WIN32DEP_H_ */ 54 | -------------------------------------------------------------------------------- /src/xml_helper.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifndef HELPERS_H 4 | #define HELPERS_H 5 | 6 | #define CCA (const char *[]) 7 | 8 | /* Nodes can be an element or an attribute */ 9 | typedef struct _XMLNode XMLNode; 10 | 11 | struct _XMLNode { 12 | char *name; 13 | char *content; 14 | XMLNode *attributes; // List of attributes 15 | XMLNode *children; // List of child elements 16 | XMLNode *next; // List of peer elements 17 | }; 18 | 19 | char *unescape_HTML(const char *original); 20 | int strisspace(const char *string); 21 | 22 | XMLNode *xmlnode_get(XMLNode *root, const char **path, const char *name, const char *value); 23 | void xmlnode_free(XMLNode *node); 24 | XMLNode *tinycxml_parse(char *xml); 25 | 26 | #endif 27 | --------------------------------------------------------------------------------