Skip to content

Commit

Permalink
Depend on Gtk3 >= 3.4 and Glib >= 2.32 and ignore deprecations since …
Browse files Browse the repository at this point in the history
…Gtk 3.10

First commit to port to GtkApplication.
Depend on libcdio_paranoia >= 0.90, so fix issue #46
  • Loading branch information
matiasdelellis committed Jan 21, 2014
1 parent f9bcba9 commit 106a806
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 31 deletions.
14 changes: 7 additions & 7 deletions configure.ac
Expand Up @@ -20,6 +20,10 @@ dnl Initialize automake
AM_INIT_AUTOMAKE([no-dist-gzip dist-bzip2])
AM_MAINTAINER_MODE()

dnl Set required and max glib/gdk versions
AC_DEFINE(GDK_VERSION_MIN_REQUIRED, GDK_VERSION_3_4, [Ignore post 3.10 deprecations])
AC_DEFINE(GDK_VERSION_MAX_ALLOWED, GDK_VERSION_3_10, [Ignore post 3.10 deprecations])

dnl *********************
dnl * Debugging support *
dnl *********************
Expand Down Expand Up @@ -77,11 +81,11 @@ GSTREAMER_REQUIRED=0.11.90
dnl Check for required packages
XDT_CHECK_PACKAGE([GSTREAMER], [gstreamer-1.0], [$GSTREAMER_REQUIRED])
XDT_CHECK_PACKAGE([GSTREAMER_BASE], [gstreamer-base-1.0], [$GSTREAMER_REQUIRED])
XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.28])
XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.2.0])
XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.32])
XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.4.0])
XDT_CHECK_PACKAGE([SQLITE3], [sqlite3], [3.4])
XDT_CHECK_PACKAGE([LIBCDIO], [libcdio], [0.80])
XDT_CHECK_PACKAGE([LIBCDIO_PARANOIA], [libcdio_paranoia], [0.80])
XDT_CHECK_PACKAGE([LIBCDIO_PARANOIA], [libcdio_paranoia], [0.90])
XDT_CHECK_PACKAGE([LIBCDDB], [libcddb], [1.3.0])
XDT_CHECK_PACKAGE([TAGLIB_C], [taglib_c], [1.4])

Expand Down Expand Up @@ -139,10 +143,6 @@ XDT_CHECK_OPTIONAL_PACKAGE([LIBMTP],
[libmtp library], [yes])
fi

dnl Test for new paranoia headers location
AC_CHECK_HEADER(cdio/paranoia/cdda.h, [
AC_DEFINE(HAVE_PARANOIA_NEW_INCLUDES, 1, [Define to 1 if cdio/paranoia/paranoia.h is present]) ])

dnl Check min taglib to add monkeyaudio support
TAGLIB_1_7_FOUND="no"
XDT_CHECK_OPTIONAL_PACKAGE([TAGLIB_1_7],
Expand Down
3 changes: 2 additions & 1 deletion plugins/devices/pragha-devices-cd.c
Expand Up @@ -28,6 +28,7 @@
#include <gudev/gudev.h>
#include <stdlib.h>

#include "src/pragha-cdda.h"
#include "src/pragha-file-utils.h"
#include "src/pragha-utils.h"
#include "src/pragha-debug.h"
Expand All @@ -45,7 +46,7 @@ pragha_devices_audio_cd_added (PraghaDevicesPlugin *plugin)
switch (response)
{
case PRAGHA_DEVICE_RESPONSE_PLAY:
add_audio_cd (pragha_device_get_application(plugin));
pragha_application_append_audio_cd (pragha_device_get_application(plugin));
break;
case PRAGHA_DEVICE_RESPONSE_NONE:
default:
Expand Down
3 changes: 2 additions & 1 deletion src/pragha-cdda.c
Expand Up @@ -16,6 +16,7 @@
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/*************************************************************************/

#include "pragha-cdda.h"
#include "pragha-utils.h"
#include "pragha-musicobject-mgmt.h"
#include "pragha.h"
Expand Down Expand Up @@ -115,7 +116,7 @@ static cdrom_drive_t* find_audio_cd(PraghaApplication *pragha)
return drive;
}

void add_audio_cd(PraghaApplication *pragha)
void pragha_application_append_audio_cd (PraghaApplication *pragha)
{
lba_t lba;
gint matches;
Expand Down
21 changes: 9 additions & 12 deletions src/pragha-cdda.h
Expand Up @@ -19,23 +19,20 @@
#ifndef CDDA_H
#define CDDA_H

#include <glib.h>
#if HAVE_CONFIG_H
#include <config.h>
#endif

/* pragha.h */
typedef struct _PraghaApplication PraghaApplication;
#include <glib.h>

#ifdef HAVE_PARANOIA_NEW_INCLUDES
#include <cdio/paranoia/cdda.h>
#else
#include <cdio/cdda.h>
#ifdef __CDIO_CONFIG_H__
#include <cdio/cdio_unconfig.h>
#endif
#endif
#include <cdio/paranoia/cdda.h>
#include <cdio/cd_types.h>
#include <cddb/cddb.h>

void add_audio_cd (PraghaApplication *pragha);
/* pragha.h */
typedef struct _PraghaApplication PraghaApplication;

void pragha_application_append_audio_cd (PraghaApplication *pragha);

void pragha_cdda_free ();

Expand Down
4 changes: 4 additions & 0 deletions src/pragha-file-utils.c
Expand Up @@ -16,6 +16,10 @@
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/*************************************************************************/

#if HAVE_CONFIG_H
#include <config.h>
#endif

#include <gtk/gtk.h>
#include <glib/gstdio.h>

Expand Down
3 changes: 2 additions & 1 deletion src/pragha-menubar.c
Expand Up @@ -28,6 +28,7 @@

#include <gdk/gdkkeysyms.h>
#include "pragha-menubar.h"
#include "pragha-cdda.h"
#include "pragha-playback.h"
#include "pragha-file-utils.h"
#include "pragha-utils.h"
Expand Down Expand Up @@ -519,7 +520,7 @@ void open_file_action(GtkAction *action, PraghaApplication *pragha)

void add_audio_cd_action(GtkAction *action, PraghaApplication *pragha)
{
add_audio_cd(pragha);
pragha_application_append_audio_cd (pragha);
}

/* Build a dialog to get a new playlist name */
Expand Down
4 changes: 4 additions & 0 deletions src/pragha-playback.c
Expand Up @@ -15,6 +15,10 @@
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
/*************************************************************************/

#if HAVE_CONFIG_H
#include <config.h>
#endif

#include "pragha-playback.h"
#include "pragha-menubar.h"
#include "pragha-file-utils.h"
Expand Down
9 changes: 0 additions & 9 deletions src/pragha.h
Expand Up @@ -19,10 +19,6 @@
#ifndef PRAGHA_H
#define PRAGHA_H

#ifndef HAVE_PARANOIA_NEW_INCLUDES
#include "pragha-cdda.h" // Should be before config.h, libcdio 0.83 issue
#endif

#if HAVE_CONFIG_H
#include <config.h>
#endif
Expand Down Expand Up @@ -50,11 +46,6 @@
#include "pragha-window.h"
#include "pragha-debug.h"

/* With libcio 0.83 should be before config.h. libcdio issue */
#ifdef HAVE_PARANOIA_NEW_INCLUDES
#include "pragha-cdda.h"
#endif

/* Some default preferences. */

#define MIN_WINDOW_WIDTH (gdk_screen_width() * 3 / 4)
Expand Down

2 comments on commit 106a806

@matiasdelellis
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rat4
Heyyyyyyyyyyy.. Nevert convert to GtkApplications!!!! very strange.. 😓

@matiasdelellis
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh..
I remember now.
Revert the change, because it stops saving changes properly.. It looks very easy to change the playlist and restart pragha.

Please sign in to comment.