~ubuntu-branches/ubuntu/wily/alsaplayer/wily

« back to all changes in this revision

Viewing changes to app/Main.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Hubert Chan
  • Date: 2007-04-15 16:31:28 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20070415163128-kknhuqht7472v6wk
Tags: 0.99.77-1
* New upstream release.
  * remove patches already added by upstream.
* New maintainer address.
* Add missing #include in CorePlayer.cpp. (closes: #417091)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*  Main.cpp - main() function and other utils
2
 
 *  Copyright (C) 1998-2003 Andy Lo A Foe <andy@alsaplayer.org>
 
2
 *  Copyright (C) 1998-2004 Andy Lo A Foe <andy@alsaplayer.org>
3
3
 *
4
4
 *  This program is free software; you can redistribute it and/or modify
5
5
 *  it under the terms of the GNU General Public License as published by
16
16
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
17
 *
18
18
 *
19
 
 *  $Id: Main.cpp,v 1.109 2003/09/18 17:31:23 sjah Exp $
 
19
 *  $Id: Main.cpp,v 1.111 2007/02/01 13:52:04 dominique_libre Exp $
20
20
 *
21
21
 *  VIM: set ts=8
22
22
 *
186
186
 
187
187
static char *copyright_string =
188
188
    "AlsaPlayer " VERSION
189
 
    "\n(C) 1999-2003 Andy Lo A Foe <andy@alsaplayer.org> and others.";
 
189
    "\n(C) 1999-2004 Andy Lo A Foe <andy@alsaplayer.org> and others.";
190
190
 
191
191
static void list_available_plugins(const char *plugindir)
192
192
{
916
916
                        goto _fatal_err;
917
917
                }
918
918
        } else {
919
 
                if (!(interface_plugin_info = load_interface(prefs_get_string
920
 
                                                (ap_prefs, "main", "default_interface", "gtk")))) {
 
919
                char *interface = prefs_get_string
 
920
                        (ap_prefs, "main", "default_interface", "gtk");
 
921
                // if we're trying to use the gtk interface, but we have no
 
922
                // $DISPLAY, use the text interface instead
 
923
                if (strcmp (interface, "gtk") == 0 && !getenv("DISPLAY"))
 
924
                        interface = "text";
 
925
                if (!(interface_plugin_info = load_interface(interface))) {
921
926
                        if (!(interface_plugin_info = load_interface(prefs_get_string
922
927
                                                 (ap_prefs, "main", "fallback_interface", "text")))) {
923
928
                                alsaplayer_error("Failed to load text interface. This is bad (%s,%s,%s)",
924
 
                                         prefs_get_string(ap_prefs, "main", "default_interface", "gtk"),
925
 
                                         prefs_get_string(ap_prefs, "main", "default_interface", "gtk"),
 
929
                                         interface, interface,
926
930
                                        global_pluginroot);
927
931
                                goto _fatal_err;
928
932
                        }