Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Cleanup, app uniqueness, warning message fixes

  • Loading branch information...
commit 5ed295133f5e725dc1f2e5b246c3e3090477f441 1 parent 8c445da
Scott Ringwelski authored
45 INSTALL
View
@@ -1,41 +1,26 @@
--------------------------------------------------------------------------------
OPTIONAL
--------------------------------------------------------------------------------
-sudo add-apt-repository ppa:elementary-os/daily
+sudo add-apt-repository ppa:sgringwe/rdio
sudo apt-get build-dep beatbox
--------------------------------------------------------------------------------
-REQUIRED
---------------------------------------------------------------------------------
-sudo add-apt-repository ppa:nemequ/sqlheavy
-
---------------------------------------------------------------------------------
DEPENDENCIES
--------------------------------------------------------------------------------
-debhelper (>= 7.0.50~)
-valac (>= 0.13.0)
-cmake (>= 2.6)
-libgtk-3-dev (>= 3.0)
-libgee-dev (>= 0.5.3)
-libgstreamer0.10-dev (>= 0.10)
-libtagc0-dev (>= 1.6.3)
-libsqlheavy0.1-dev (>= 0.0)
-libglib2.0-dev
-libxml2-dev (>= 2.7.7)
-libnotify-dev (>= 0.5.0)
-libsoup2.4-dev (>= 2.25.2)
-libjson-glib-dev (>= 0.10)
-libdbus-glib-1-dev
-libzeitgeist-dev
-libwebkitgtk-dev
-libindicate-dev (>= 0.5)
-libclutter-gtk-1.0-dev
-libdbusmenu-glib-dev (>= 0.4)
-libgstreamer-plugins-base0.10-dev (>= 0.10)
-libdbusmenu-gtk3-dev
-libgpod-dev
-libgranite-dev
-libpeas-dev
+cmake (>= 2.6),
+debhelper (>= 7.0.50~),
+valac-0.18 (>= 0.17.7),
+libdbus-glib-1-dev,
+libdbusmenu-glib-dev (>= 0.4),
+libdbusmenu-gtk3-dev,
+libgtk-3-dev (>= 3.0),
+libglib2.0-dev,
+libnotify-dev (>= 0.5.0),
+libindicate-dev (>= 0.6),
+libunity-dev (>= 5.10),
+libsoup2.4-dev (>= 2.25.2),
+libjson-glib-dev (>= 0.10),
+libwebkitgtk-3.0-dev (>= 1.8.3)
--------------------------------------------------------------------------------
BUILDING
11 README
View
@@ -1,2 +1,9 @@
-This is a "native" rdio client for linux (ubuntu/debian). It (will) provide support
-for media key listening, sound menu, libunity dock integration and other native implementations.
+This is a "native" rdio client for linux (ubuntu/debian). It provides support
+for:
+
+* media key controls
+* sound menu
+* libunity dock integration
+* libnotify notificaitons on song change
+
+You can download .deb files or add a PPA at https://code.launchpad.net/~sgringwe/+archive/rdio.
1  rdio/CMakeLists.txt
View
@@ -4,7 +4,6 @@ ensure_vala_version("0.17.5" MINIMUM)
include(ValaPrecompile)
vala_precompile(VALA_C
- main.vala
config.vala
Rdio.vala
Settings.vala
1  rdio/MPRIS.vala
View
@@ -222,7 +222,6 @@ public class Rdio.MprisPlayer : GLib.Object {
// }
private void fill_metadata() {
- warning("filling up metadata now----- %s %s %s\n\n\n", App.middleware.title, App.middleware.artist, "album");
string[] artistArray = {};
artistArray += App.middleware.artist;
string[] genreArray = {};
20 rdio/Middleware.vala
View
@@ -24,16 +24,16 @@ public class Rdio.Middleware : GLib.Object {
WebKit.WebView webview;
public bool playing;
- public string title;
- public string album;
- public string artist;
- public string album_art;
- public int duration;
- public int position;
- public int notifications_count;
- public double volume;
- public int shuffle;
- public int repeat;
+ public string title = "Title";
+ public string album = "Album";
+ public string artist = "Artist";
+ public string album_art = "";
+ public int duration = 0;
+ public int position = 0;
+ public int notifications_count = 0;
+ public double volume = 1.0;
+ public int shuffle = 0;
+ public int repeat = 0;
public signal void played ();
public signal void paused ();
38 rdio/Rdio.vala
View
@@ -40,6 +40,18 @@ public class Rdio.App : Gtk.Application {
#endif
public App () {
+ application_id = "apps.rdio";
+ }
+
+ protected override void activate () {
+ message ("at activate ");
+ unowned List<Gtk.Window> windows = get_windows ();
+ if (windows != null) {
+ windows.data.present ();
+ return;
+ }
+
+ message ("initializing ");
settings = new Rdio.Settings ();
window = new Rdio.Window (this);
middleware = new Rdio.Middleware (window.webview);
@@ -65,16 +77,30 @@ public class Rdio.App : Gtk.Application {
#endif
window.initialize_events ();
+ window.set_application (this);
window.destroy.connect (Gtk.main_quit);
- Gtk.main ();
}
- protected override void activate () {
- if (window != null) {
- window.present ();
- return;
- }
+ protected override void shutdown ()
+ {
+ base.shutdown();
}
}
+public static int main (string[] args) {
+ Gtk.init(ref args);
+ Environment.set_prgname ("rdio");
+
+ // Init internationalization support before anything else
+ string package_name = Build.GETTEXT_PACKAGE;
+ string langpack_dir = Path.build_filename (Build.DATADIR, "locale");
+ Intl.setlocale (LocaleCategory.ALL, "");
+ Intl.bindtextdomain (package_name, langpack_dir);
+ Intl.bind_textdomain_codeset (package_name, "UTF-8");
+ Intl.textdomain (package_name);
+
+ var app = new Rdio.App ();
+ return app.run (args);
+}
+
13 rdio/Window.vala
View
@@ -32,7 +32,7 @@ public class Rdio.Window : Gtk.Window {
bool window_maximized;
public Window (Gtk.Application gtk_app) {
- app = gtk_app;
+ set_application (app);
// Window styling
// set_app_paintable (true);
@@ -60,9 +60,10 @@ public class Rdio.Window : Gtk.Window {
// Configure the browser
var settings = webview.get_settings ();
- settings.set_property ("enable-plugins", true);
- settings.set_property ("enable-private-browsing", true);
- settings.set_property ("enable-page-cache", true);
+ settings.enable_plugins = true;
+ settings.enable_private_browsing = true;
+ settings.enable_page_cache = true;
+ settings.enable_default_context_menu = false;
webview.set_settings (settings);
setup_cookies ();
@@ -121,7 +122,9 @@ public class Rdio.Window : Gtk.Window {
window_state_event.disconnect(window_state_changed);
// Terminate Libnotify
- // Notify.uninit ();
+ #if HAVE_LIBNOTIFY
+ Notify.uninit ();
+ #endif
// Save UI Information
if (window_maximized) {
28 rdio/main.vala
View
@@ -1,28 +0,0 @@
-/*-
- * Copyright (c) 2011-2012 Scott Ringwelski <sgringwe@mtu.edu>
- *
- * Originally Written by Scott Ringwelski for Rdio Music Player
- * Rdio Music Player: http://www.github.com/sgringwe/rdio
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-public static int main (string[] args) {
- Gtk.init(ref args);
-
- var app = new Rdio.App ();
- return app.run (args);
-}
Please sign in to comment.
Something went wrong with that request. Please try again.