Compare commits

...

110 Commits

Author SHA1 Message Date
TDE Gitea df62582d2a Reset submodule main/applications/multimedia/amarok/admin to latest HEAD
2 years ago
Slávek Banko 27567d79c2
Raise the minimum required version of CMake to 3.1.
2 years ago
Slávek Banko aa95942b72
Remove cmake submodule since it has now been replaced by cmake-trinity dependency.
3 years ago
TDE Gitea 88fd723582 Reset submodule main/applications/amarok/cmake to latest HEAD
3 years ago
TDE Gitea fc13a8fc5a Reset submodule main/applications/amarok/cmake to latest HEAD
3 years ago
TDE Gitea b49dc396a8 Reset submodule main/applications/amarok/cmake to latest HEAD
3 years ago
TDE Gitea 0129bc1a3a Reset submodule main/applications/amarok/cmake to latest HEAD
3 years ago
TDE Gitea 1f5fd3373e Reset submodule main/applications/amarok/admin to latest HEAD
3 years ago
TDE Gitea 177bc4ab1f Reset submodule main/applications/amarok/cmake to latest HEAD
3 years ago
TDE Gitea 0eb2e53192 Reset submodule main/applications/amarok/cmake to latest HEAD
3 years ago
TDE Gitea 61514f526c Reset submodule main/applications/amarok/admin to latest HEAD
3 years ago
TDE Gitea 38d47e45f2 Reset submodule main/applications/amarok/cmake to latest HEAD
4 years ago
TDE Gitea fb7ea534d9 Reset submodule main/applications/amarok/admin to latest HEAD
4 years ago
TDE Gitea 78c9bca5a5 Reset submodule main/applications/amarok/cmake to latest HEAD
4 years ago
TDE Gitea f96d35760c Reset submodule main/applications/amarok/admin to latest HEAD
4 years ago
TDE Gitea 431f96ab48 Reset submodule main/applications/amarok/cmake to latest HEAD
4 years ago
TDE Gitea bdb3dafafe Reset submodule main/applications/amarok/admin to latest HEAD
4 years ago
TDE Gitea 0e3023452e Reset submodule main/applications/amarok/cmake to latest HEAD
4 years ago
TDE Gitea fb69a14b7e Reset submodule main/applications/amarok/cmake to latest HEAD
4 years ago
TDE Gitea b191cf34ea Reset submodule main/applications/amarok/cmake to latest HEAD
4 years ago
TDE Gitea 35e48079ab Reset submodule main/applications/amarok/admin to latest HEAD
4 years ago
TDE Gitea f969039653 Reset submodule main/applications/amarok/cmake to latest HEAD
4 years ago
TDE Gitea f7d948029f Reset submodule main/applications/amarok/cmake to latest HEAD
4 years ago
TDE Gitea 9905211fa4 Reset submodule main/applications/amarok/cmake to latest HEAD
4 years ago
TDE Gitea 3b2e351c4f Reset submodule main/applications/amarok/cmake to latest HEAD
4 years ago
TDE Gitea 50586a16f7 Reset submodule main/applications/amarok/admin to latest HEAD
4 years ago
TDE Gitea 37a3a1abed Reset submodule main/applications/amarok/cmake to latest HEAD
4 years ago
TDE Gitea b03823efd2 Reset submodule main/applications/amarok/cmake to latest HEAD
4 years ago
TDE Gitea db4d2a5cc2 Reset submodule main/applications/amarok/cmake to latest HEAD
4 years ago
TDE Gitea e3935ee446 Reset submodule main/applications/amarok/cmake to latest HEAD
4 years ago
TDE Gitea 52cecc89b2 Reset submodule main/applications/amarok/cmake to latest HEAD
4 years ago
TDE Gitea e2e57504a5 Reset submodule main/applications/amarok/cmake to latest HEAD
4 years ago
TDE Gitea 2e30a663e3 Reset submodule main/applications/amarok/cmake to latest HEAD
4 years ago
TDE Gitea 797ddc9a27 Reset submodule main/applications/amarok/cmake to latest HEAD
4 years ago
TDE Gitea 7846aaa330 Reset submodule main/applications/amarok/cmake to latest HEAD
4 years ago
Slávek Banko 098a3178c7
Switch all submodules to https.
4 years ago
TDE Gitea 888fd30b16 Reset submodule main/applications/amarok/cmake to latest HEAD
5 years ago
TDE Gitea 3d68e97826 Reset submodule main/applications/amarok/cmake to latest HEAD
5 years ago
TDE Gitea ace484fb4b Reset submodule main/applications/amarok/cmake to latest HEAD
5 years ago
TDE Gitea 18957d9100 Reset submodule main/applications/amarok/cmake to latest HEAD
5 years ago
TDE Gitea 73ee82e258 Reset submodule main/applications/amarok/admin to latest HEAD
5 years ago
TDE Gitea c1e7c1aa22 Reset submodule main/applications/amarok/cmake to latest HEAD
5 years ago
TDE Gitea 51ded8e4f5 Reset submodule main/applications/amarok/cmake to latest HEAD
5 years ago
TDE Gitea 1e48cd6d99 Reset submodule main/applications/amarok/cmake to latest HEAD
5 years ago
TDE Gitea 7e784098f2 Reset submodule main/applications/amarok/cmake to latest HEAD
5 years ago
TDE Gitea ebd6960bb3 Reset submodule main/applications/amarok/cmake to latest HEAD
5 years ago
TDE Gitea fd1c7fff4c Reset submodule main/applications/amarok/cmake to latest HEAD
5 years ago
TDE Gitea 20ce1f9b7f Reset submodule main/applications/amarok/admin to latest HEAD
5 years ago
TDE Gitea e9a75e8a2e Reset submodule main/applications/amarok/cmake to latest HEAD
6 years ago
TDE Gitea ebe9cf8ef4 Reset submodule main/applications/amarok/cmake to latest HEAD
6 years ago
TDE Gitea 7cab6f8798 Reset submodule main/applications/amarok/admin to latest HEAD
6 years ago
Slávek Banko 8b45069b30 Reset submodule main/applications/amarok/admin to latest HEAD
6 years ago
Slávek Banko 7e147146e5 Reset submodule main/applications/amarok/admin to latest HEAD
6 years ago
Slávek Banko 26b4132c45 Reset submodule main/applications/amarok/admin to latest HEAD
6 years ago
Slávek Banko adde19a4aa Reset submodule main/applications/amarok/cmake to latest HEAD
7 years ago
Slávek Banko 32a1057031 Reset submodule main/applications/amarok/admin to latest HEAD
8 years ago
Slávek Banko 57588dbec6 Reset submodule main/applications/amarok/cmake to latest HEAD
9 years ago
Slávek Banko 7186a92865 Reset submodule main/applications/amarok/admin to latest HEAD
9 years ago
Slávek Banko 399727d9e8 Reset submodule main/applications/amarok/admin to latest HEAD
11 years ago
Timothy Pearson a1260b5f05 Use xine-ui relative seek method to work around long-standing libxine FLAC seek failure
11 years ago
Slávek Banko 6f1f8ad8c3 Add cmake support for mp4v2
11 years ago
Slávek Banko 22c1da75d2 Add mp4v2 MP4Tags* API support
11 years ago
Timothy Pearson 928ca6f861 Fix build of mp4 tag writing option
11 years ago
Timothy Pearson 8ae8d0c37d Use updated DrKonqi instead of internal crash handler
11 years ago
Timothy Pearson 543c6eef6d Fix ARGB mode playlist throbber
11 years ago
Timothy Pearson d2f156e185 Fix Amarok startup crashes
11 years ago
Timothy Pearson d806197381 Fix Amarok keyboard shortcuts
11 years ago
Slávek Banko 37ade66425 Reset submodule main/applications/amarok/admin to latest HEAD
11 years ago
Slávek Banko dd6f30d4a6 Reset submodule main/applications/amarok/cmake to latest HEAD
11 years ago
Slávek Banko 95a2136e45 Reset submodule main/applications/amarok/cmake to latest HEAD
11 years ago
Darrell Anderson 8070a7a349 Fix references to user profile directory.
12 years ago
Darrell Anderson 5f01214157 Fix deprecation build warnings. The "preferred" function has
12 years ago
Slávek Banko b86ba73163 Reset submodule main/applications/amarok/cmake to latest HEAD
12 years ago
Slávek Banko 38be547a0f Reset submodule main/applications/amarok/cmake to latest HEAD
12 years ago
Slávek Banko 53f3df77ce Reset submodule main/applications/amarok/admin to latest HEAD
12 years ago
Slávek Banko e1292570da Fix build on Ruby 1.9.x without pkgconfig file
12 years ago
Slávek Banko 15f9743a81 Fix FTBFS due to system scriptmanager.h
12 years ago
Slávek Banko 4ad314fae0 Add conditionnal inotify support
12 years ago
Darrell Anderson ecd24e4f3c Fix inadvertent tq changes.
12 years ago
Darrell Anderson b59d8a0d7e Fix inadvertent tq changes.
12 years ago
Darrell Anderson 9802427270 Remove unnecessary language.
12 years ago
Darrell Anderson 7d3e87f4d8 Fix inadvertent tqt changes.
12 years ago
Darrell Anderson cd9571507e Fix typo.
12 years ago
Darrell Anderson b3e11e7fe0 Add build support for xine 1.2.
12 years ago
Timothy Pearson 7b7aa437f8 Fix FTBFS on x86 systems
12 years ago
Timothy Pearson 4a132b511d Fix format not a string literal security error in rb_raise
12 years ago
Timothy Pearson 2762188456 Fix build system for ruby >= 1.9
12 years ago
Slávek Banko 8f7845b165 Reset submodule main/applications/amarok/cmake to latest HEAD
12 years ago
Slávek Banko 214af1a5f4 Reset submodule main/applications/amarok/cmake to latest HEAD
12 years ago
Slávek Banko 279ee5c243 Reset submodule main/applications/amarok/admin to latest HEAD
12 years ago
Slávek Banko 057c011e8c Update final HTML install path so all modules are consistent.
12 years ago
Darrell Anderson 7effe97052 Update HTML install path references.
12 years ago
Slávek Banko 6a07d4f7c8 Add akode support to CMake
12 years ago
Slávek Banko 6b522cd955 Enable riokarma support
12 years ago
Slávek Banko 9997261b7f Fix FTBFS due missing taglib includes
12 years ago
Slávek Banko 6ddaf115c5 Fix FTBFS - konqueror side bar build
12 years ago
Slávek Banko 32dd552dda Fix SDL detection on old distros (no pkgconfig file)
12 years ago
Slávek Banko 4fe698b281 Fix FTBFS due to missing includes
12 years ago
Darrell Anderson ecc45da354 Fix build support for both ruby 1.8.x and 1.9.x.
12 years ago
Darrell Anderson 5aedbb687a GCC 4.7 fixes.
12 years ago
Timothy Pearson 1e47e4a1a2 Fix missing argument warnings
12 years ago
Darrell Anderson 96defb9c82 Fix inadvertent "TQ" changes.
12 years ago
Timothy Pearson 815eda6b76 Fix linear alphabet string errors
12 years ago
Timothy Pearson f16993b2b4 Fix inotify detection
12 years ago
Timothy Pearson 925e5f7567 Rename a few stragglers
12 years ago
Timothy Pearson 3a4c7b39c5 Rename obsolete tq methods to standard names
12 years ago
Timothy Pearson 60136760bf Remove additional unneeded tq method conversions
12 years ago
Timothy Pearson ace5f8593c Rename old tq methods that no longer need a unique name
12 years ago
Timothy Pearson 75350e0e87 Fix FTBFS
12 years ago
Slávek Banko b5b1f654e8 Add common directories
12 years ago

3
.gitmodules vendored

@ -0,0 +1,3 @@
[submodule "admin"]
path = admin
url = https://system@scm.trinitydesktop.org/scm/git/tde-common-admin

@ -9,7 +9,7 @@
#
#################################################
cmake_minimum_required( VERSION 2.8 )
cmake_minimum_required( VERSION 3.1 )
##### general package setup #####################
@ -47,12 +47,15 @@ option( WITH_LIBVISUAL "Enable libvisual support" OFF )
option( WITH_KONQSIDEBAR "Enable konqsidebar plugin" OFF )
option( WITH_XINE "Enable xine-engine support" OFF )
option( WITH_YAUAP "Enable yauap-engine support" OFF )
option( WITH_AKODE "Enable akode-engine support" OFF )
option( WITH_IPOD "Enable iPod support from libgpod" OFF )
option( WITH_IFP "Enable ifp support" OFF )
option( WITH_NJB "Enable njb support" OFF )
option( WITH_MTP "Enable mtp support" OFF )
option( WITH_RIOKARMA "Enable riokarma support" OFF )
option( WITH_DAAP "Enable daap support" OFF )
option( WITH_MP4V2 "Enable mp4v2 support" OFF )
option( WITH_INOTIFY "Enable inotify support" OFF )
##### user requested modules ####################

@ -21,7 +21,25 @@ check_type_size( "long" SIZEOF_LONG BUILTIN_TYPES_ONLY )
check_include_file( stdint.h HAVE_STDINT_H )
check_include_file( systems.h HAVE_SYSTEMS_H )
check_include_file( linux/inotify.h HAVE_INOTIFY )
##### check for inotify ###########################
if( WITH_INOTIFY )
check_include_file( "inotify.h" INOTIFY_FOUND )
check_include_file( "sys/inotify.h" INOTIFY_SYS_FOUND )
if( NOT INOTIFY_FOUND )
if( NOT INOTIFY_SYS_FOUND )
message(FATAL_ERROR "\ninotify support was requested, but inotify was not found on your system" )
endif( NOT INOTIFY_SYS_FOUND )
endif( NOT INOTIFY_FOUND )
if( INOTIFY_FOUND )
set( HAVE_INOTIFY 1 )
endif( INOTIFY_FOUND )
if( INOTIFY_SYS_FOUND )
set( HAVE_INOTIFY 1 )
set( HAVE_SYS_INOTIFY 1 )
endif( INOTIFY_SYS_FOUND )
endif( )
check_function_exists( statvfs HAVE_STATVFS )
@ -88,7 +106,12 @@ if( WITH_LIBVISUAL )
pkg_search_module( SDL sdl )
if( NOT SDL_FOUND )
tde_message_fatal( "SDL are required, but not found on your system" )
check_include_file( SDL/SDL.h HAVE_SDL_H )
if( NOT HAVE_SDL_H )
tde_message_fatal( "SDL are required, but not found on your system" )
endif ( )
set ( SDL_INCLUDE_DIRS /usr/include/SDL )
set ( SDL_LIBRARIES SDL pthread )
endif( )
pkg_search_module( LIBVISUAL libvisual-0.4 )
@ -116,6 +139,18 @@ if( WITH_XINE )
endif( )
endif( )
# akode-engine
if( WITH_AKODE )
pkg_search_module( AKODE akode )
if( AKODE_FOUND )
if( ${AKODE_VERSION} VERSION_LESS "2.0.0" )
tde_message_fatal( "your akode version is too old; at least 2.0.0 is required" )
endif( )
else( )
tde_message_fatal( "akode is requested, but was not found on your system" )
endif( )
endif( )
# iPod
if( WITH_IPOD )
@ -163,7 +198,7 @@ if( WITH_KONQSIDEBAR )
set( CMAKE_REQUIRED_DEFINITIONS ${TQT_CFLAGS_OTHER} )
set( CMAKE_REQUIRED_INCLUDES ${TDE_INCLUDE_DIR};${TQT_INCLUDE_DIRS};${CMAKE_INCLUDE_PATH} )
set( CMAKE_REQUIRED_FLAGS "-include tqt.h" )
set( CMAKE_REQUIRED_LIBRARIES -L${TQT_LIBRARY_DIRS} ${TQT_LIBRARIES} )
set( CMAKE_REQUIRED_LIBRARIES -L${TQT_LIBRARY_DIRS} -L${QT_LIBRARY_DIRS} ${TQT_LIBRARIES} )
check_cxx_source_compiles("
#include <konqsidebarplugin.h>
int main(int, char**) { return 0; } "
@ -173,3 +208,23 @@ if( WITH_KONQSIDEBAR )
tde_message_fatal( "konqsidebarplugin.h are requested, but not found on your system" )
endif( )
endif( )
##### check for mp4v2 ###########################
if( WITH_MP4V2 )
check_include_file( "mp4v2/mp4v2.h" MP4V2_H_FOUND )
if( MP4V2_H_FOUND )
set( HAVE_MP4V2_H 1)
else( MP4V2_H_FOUND )
check_include_file( "mp4.h" MP4_H_FOUND )
if( MP4_H_FOUND )
set( HAVE_MP4_H 1)
endif( MP4_H_FOUND )
endif( MP4V2_H_FOUND )
if( HAVE_MP4V2_H OR HAVE_MP4_H )
set( HAVE_MP4V2 1 )
else( )
tde_message_fatal( "MP4V2 support was requested, but not found on your system" )
endif( )
endif( )

File diff suppressed because it is too large Load Diff

881
aclocal.m4 vendored

@ -1,881 +0,0 @@
# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(AC_AUTOCONF_VERSION, [2.61],,
[m4_warning([this file was generated for autoconf 2.61.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.10'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.10.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
# _AM_AUTOCONF_VERSION(VERSION)
# -----------------------------
# aclocal traces this macro to find the Autoconf version.
# This is a private macro too. Using m4_define simplifies
# the logic in aclocal, which can simply ignore this definition.
m4_define([_AM_AUTOCONF_VERSION], [])
# AM_SET_CURRENT_AUTOMAKE_VERSION
# -------------------------------
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.10.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
#
# Of course, Automake must honor this variable whenever it calls a
# tool from the auxiliary directory. The problem is that $srcdir (and
# therefore $ac_aux_dir as well) can be either absolute or relative,
# depending on how configure is run. This is pretty annoying, since
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
# source directory, any form will work fine, but in subdirectories a
# relative path needs to be adjusted first.
#
# $ac_aux_dir/missing
# fails when called from a subdirectory if $ac_aux_dir is relative
# $top_srcdir/$ac_aux_dir/missing
# fails if $ac_aux_dir is absolute,
# fails when called from a subdirectory in a VPATH build with
# a relative $ac_aux_dir
#
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
# are both prefixed by $srcdir. In an in-source build this is usually
# harmless because $srcdir is `.', but things will broke when you
# start a VPATH build or use an absolute $srcdir.
#
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
# and then we would define $MISSING as
# MISSING="\${SHELL} $am_aux_dir/missing"
# This will work as long as MISSING is not called from configure, because
# unfortunately $(top_srcdir) has no meaning in configure.
# However there are other variables, like CC, which are often used in
# configure, and could therefore not use this "fixed" $ac_aux_dir.
#
# Another solution, used here, is to always expand $ac_aux_dir to an
# absolute PATH. The drawback is that using absolute paths prevent a
# configured tree to be moved without reconfiguration.
AC_DEFUN([AM_AUX_DIR_EXPAND],
[dnl Rely on autoconf to set up CDPATH properly.
AC_PREREQ([2.50])dnl
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
])
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 8
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
# Define a conditional.
AC_DEFUN([AM_CONDITIONAL],
[AC_PREREQ(2.52)dnl
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_SUBST([$1_TRUE])dnl
AC_SUBST([$1_FALSE])dnl
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
if $2; then
$1_TRUE=
$1_FALSE='#'
else
$1_TRUE='#'
$1_FALSE=
fi
AC_CONFIG_COMMANDS_PRE(
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
AC_MSG_ERROR([[conditional "$1" was never defined.
Usually this means the macro was only invoked conditionally.]])
fi])])
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 9
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
# will think it sees a *use*, and therefore will trigger all it's
# C support machinery. Also note that it means that autoscan, seeing
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
# _AM_DEPENDENCIES(NAME)
# ----------------------
# See how the compiler implements dependency checking.
# NAME is "CC", "CXX", "GCJ", or "OBJC".
# We try a few techniques and use that to set a single cache variable.
#
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
# dependency, and given that the user is not expected to run this macro,
# just rely on AC_PROG_CC.
AC_DEFUN([_AM_DEPENDENCIES],
[AC_REQUIRE([AM_SET_DEPDIR])dnl
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
AC_REQUIRE([AM_DEP_TRACK])dnl
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
[$1], CXX, [depcc="$CXX" am_compiler_list=],
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
[$1], UPC, [depcc="$UPC" am_compiler_list=],
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
[depcc="$$1" am_compiler_list=])
AC_CACHE_CHECK([dependency style of $depcc],
[am_cv_$1_dependencies_compiler_type],
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
# We will build objects and dependencies in a subdirectory because
# it helps to detect inapplicable dependency modes. For instance
# both Tru64's cc and ICC support -MD to output dependencies as a
# side effect of compilation, but ICC will put the dependencies in
# the current directory while Tru64 will put them in the object
# directory.
mkdir sub
am_cv_$1_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
fi
for depmode in $am_compiler_list; do
# Setup a source with many dependencies, because some compilers
# like to wrap large dependency lists on column 80 (with \), and
# we should not choose a depcomp mode which is confused by this.
#
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
# Solaris 8's {/usr,}/bin/sh.
touch sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
case $depmode in
nosideeffect)
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
none) break ;;
esac
# We check with `-c' and `-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
if (grep 'ignoring option' conftest.err ||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_$1_dependencies_compiler_type=$depmode
break
fi
fi
done
cd ..
rm -rf conftest.dir
else
am_cv_$1_dependencies_compiler_type=none
fi
])
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
AM_CONDITIONAL([am__fastdep$1], [
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
])
# AM_SET_DEPDIR
# -------------
# Choose a directory name for dependency files.
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
AC_DEFUN([AM_SET_DEPDIR],
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
])
# AM_DEP_TRACK
# ------------
AC_DEFUN([AM_DEP_TRACK],
[AC_ARG_ENABLE(dependency-tracking,
[ --disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors])
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH])dnl
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
])
# Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
#serial 3
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
[for mf in $CONFIG_FILES; do
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
# We used to match only the files named `Makefile.in', but
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
# Grep'ing the whole file is not good either: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
dirpart=`AS_DIRNAME("$mf")`
else
continue
fi
# Extract the definition of DEPDIR, am__include, and am__quote
# from the Makefile without running `make'.
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
test -z "am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# When using ansi2knr, U may be empty or an underscore; expand it
U=`sed -n 's/^U = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
# simplest approach to changing $(DEPDIR) to its actual value in the
# expansion.
for file in `sed -n "
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`AS_DIRNAME(["$file"])`
AS_MKDIR_P([$dirpart/$fdir])
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
done
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
# AM_OUTPUT_DEPENDENCY_COMMANDS
# -----------------------------
# This macro should only be invoked once -- use via AC_REQUIRE.
#
# This code is only required when automatic dependency tracking
# is enabled. FIXME. This creates each `.P' file that we will
# need in order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AC_CONFIG_COMMANDS([depfiles],
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 8
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 13
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
# The call with PACKAGE and VERSION arguments is the old style
# call (pre autoconf-2.50), which is being phased out. PACKAGE
# and VERSION should now be passed to AC_INIT and removed from
# the call to AM_INIT_AUTOMAKE.
# We support both call styles for the transition. After
# the next Automake release, Autoconf can make the AC_INIT
# arguments mandatory, and then we can depend on a new Autoconf
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_PREREQ([2.60])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
AC_REQUIRE([AC_PROG_INSTALL])dnl
if test "`cd $srcdir && pwd`" != "`pwd`"; then
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
# is not polluted with repeated "-I."
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
# test to see if srcdir already configured
if test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
fi
# test whether we have cygpath
if test -z "$CYGPATH_W"; then
if (cygpath --version) >/dev/null 2>/dev/null; then
CYGPATH_W='cygpath -w'
else
CYGPATH_W=echo
fi
fi
AC_SUBST([CYGPATH_W])
# Define the identity of the package.
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
_AM_IF_OPTION([no-define],,
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
# Some tools Automake needs.
AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
AM_MISSING_PROG(AUTOCONF, autoconf)
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
AM_MISSING_PROG(AUTOHEADER, autoheader)
AM_MISSING_PROG(MAKEINFO, makeinfo)
AM_PROG_INSTALL_SH
AM_PROG_INSTALL_STRIP
AC_REQUIRE([AM_PROG_MKDIR_P])dnl
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
[_AM_PROG_TAR([v7])])])
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
[_AM_DEPENDENCIES(CC)],
[define([AC_PROG_CC],
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
AC_PROVIDE_IFELSE([AC_PROG_CXX],
[_AM_DEPENDENCIES(CXX)],
[define([AC_PROG_CXX],
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
[_AM_DEPENDENCIES(OBJC)],
[define([AC_PROG_OBJC],
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
])
])
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
# that is generated. The stamp files are numbered to have different names.
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
# loop where config.status creates the headers, so we can generate
# our stamp files there.
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
[# Compute $1's index in $config_headers.
_am_arg=$1
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
$_am_arg | $_am_arg:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
AC_SUBST(install_sh)])
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 2
# Check whether the underlying file-system supports filenames
# with a leading dot. For instance MS-DOS doesn't.
AC_DEFUN([AM_SET_LEADING_DOT],
[rm -rf .tst 2>/dev/null
mkdir .tst 2>/dev/null
if test -d .tst; then
am__leading_dot=.
else
am__leading_dot=_
fi
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 3
# AM_MAKE_INCLUDE()
# -----------------
# Check to see how make treats includes.
AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make}
cat > confinc << 'END'
am__doit:
@echo done
.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
AC_MSG_CHECKING([for style of include used by $am_make])
am__include="#"
am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
# We grep out `Entering directory' and `Leaving directory'
# messages which can occur if `w' ends up in MAKEFLAGS.
# In particular we don't look at `^make:' because GNU make might
# be invoked under some other name (usually "gmake"), in which
# case it prints its new name instead of `make'.
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
am__include=include
am__quote=
_am_result=GNU
fi
# Now try BSD make style include.
if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
am__include=.include
am__quote="\""
_am_result=BSD
fi
fi
AC_SUBST([am__include])
AC_SUBST([am__quote])
AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 5
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
AC_DEFUN([AM_MISSING_PROG],
[AC_REQUIRE([AM_MISSING_HAS_RUN])
$1=${$1-"${am_missing_run}$2"}
AC_SUBST($1)])
# AM_MISSING_HAS_RUN
# ------------------
# Define MISSING if not defined so far and test if it supports --run.
# If it does, set am_missing_run to use it, otherwise, to nothing.
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([missing])dnl
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
# Use eval to expand $SHELL
if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
AC_MSG_WARN([`missing' script is too old or missing])
fi
])
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PROG_MKDIR_P
# ---------------
# Check for `mkdir -p'.
AC_DEFUN([AM_PROG_MKDIR_P],
[AC_PREREQ([2.60])dnl
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
dnl while keeping a definition of mkdir_p for backward compatibility.
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
dnl Makefile.ins that do not define MKDIR_P, so we do our own
dnl adjustment using top_builddir (which is defined more often than
dnl MKDIR_P).
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
case $mkdir_p in
[[\\/$]]* | ?:[[\\/]]*) ;;
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
esac
])
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 3
# _AM_MANGLE_OPTION(NAME)
# -----------------------
AC_DEFUN([_AM_MANGLE_OPTION],
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
# _AM_SET_OPTION(NAME)
# ------------------------------
# Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
# _AM_SET_OPTIONS(OPTIONS)
# ----------------------------------
# OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS],
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
# -------------------------------------------
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 4
# AM_SANITY_CHECK
# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
echo timestamp > conftest.file
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
if test "$[*]" = "X"; then
# -L didn't work.
set X `ls -t $srcdir/configure conftest.file`
fi
rm -f conftest.file
if test "$[*]" != "X $srcdir/configure conftest.file" \
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
alias in your environment])
fi
test "$[2]" = conftest.file
)
then
# Ok.
:
else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
AC_MSG_RESULT(yes)])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PROG_INSTALL_STRIP
# ---------------------
# One issue with vendor `install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip
# is unlikely to handle the host's binaries.
# Fortunately install-sh will honor a STRIPPROG variable, so we
# always use install-sh in `make install-strip', and initialize
# STRIPPROG with the value of the STRIP variable (set by the user).
AC_DEFUN([AM_PROG_INSTALL_STRIP],
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
# Installed binaries are usually stripped using `strip' when the user
# run `make install-strip'. However `strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
# will honor the `STRIP' environment variable to overrule this program.
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
if test "$cross_compiling" != no; then
AC_CHECK_TOOL([STRIP], [strip], :)
fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Copyright (C) 2006 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
# This macro is traced by Automake.
AC_DEFUN([_AM_SUBST_NOTMAKE])
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 2
# _AM_PROG_TAR(FORMAT)
# --------------------
# Check how to create a tarball in format FORMAT.
# FORMAT should be one of `v7', `ustar', or `pax'.
#
# Substitute a variable $(am__tar) that is a command
# writing to stdout a FORMAT-tarball containing the directory
# $tardir.
# tardir=directory && $(am__tar) > result.tar
#
# Substitute a variable $(am__untar) that extract such
# a tarball read from stdin.
# $(am__untar) < result.tar
AC_DEFUN([_AM_PROG_TAR],
[# Always define AMTAR for backward compatibility.
AM_MISSING_PROG([AMTAR], [tar])
m4_if([$1], [v7],
[am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
[m4_case([$1], [ustar],, [pax],,
[m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive])
# Loop over all known methods to create a tar archive until one works.
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
# Do not fold the above two line into one, because Tru64 sh and
# Solaris sh will not grok spaces in the rhs of `-'.
for _am_tool in $_am_tools
do
case $_am_tool in
gnutar)
for _am_tar in tar gnutar gtar;
do
AM_RUN_LOG([$_am_tar --version]) && break
done
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
am__untar="$_am_tar -xf -"
;;
plaintar)
# Must skip GNU tar: if it does not support --format= it doesn't create
# ustar tarball either.
(tar --version) >/dev/null 2>&1 && continue
am__tar='tar chf - "$$tardir"'
am__tar_='tar chf - "$tardir"'
am__untar='tar xf -'
;;
pax)
am__tar='pax -L -x $1 -w "$$tardir"'
am__tar_='pax -L -x $1 -w "$tardir"'
am__untar='pax -r'
;;
cpio)
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
am__untar='cpio -i -H $1 -d'
;;
none)
am__tar=false
am__tar_=false
am__untar=false
;;
esac
# If the value was cached, stop now. We just wanted to have am__tar
# and am__untar set.
test -n "${am_cv_prog_tar_$1}" && break
# tar/untar a dummy directory, and stop if the command works
rm -rf conftest.dir
mkdir conftest.dir
echo GrepMe > conftest.dir/file
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
rm -rf conftest.dir
if test -s conftest.tar; then
AM_RUN_LOG([$am__untar <conftest.tar])
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
fi
done
rm -rf conftest.dir
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([acinclude.m4])

@ -0,0 +1 @@
Subproject commit 92a6d62b8f8f1836c43b54e3fb13b7ea7bb22e9f

@ -995,15 +995,29 @@ if test "$have_mp4v2" != "no"; then
ac_cppflags_save=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I."
AC_CHECK_HEADERS(systems.h)
AC_CHECK_HEADERS([mp4.h], [have_mp4_h=yes], [],
AC_CHECK_HEADERS([mp4v2/mp4v2.h], [have_mp4v2_h=yes], [],
[#ifdef HAVE_SYSTEMS_H
# include <systems.h>
#endif
])
if test "$have_mp4v2_h" = "yes"; then
AC_DEFINE(HAVE_MP4V2_H, 1, [have mp4v2 h])
else
AC_CHECK_HEADERS([mp4.h], [have_mp4_h=yes], [],
[#ifdef HAVE_SYSTEMS_H
# include <systems.h>
#endif
])
if test "$have_mp4_h" = "yes"; then
AC_DEFINE(HAVE_MP4_H, 1, [have mp4 h])
fi
fi
AC_CHECK_LIB( mp4v2, MP4Read, have_mp4v2=yes, have_mp4v2=no )
if test "$have_mp4v2_h" = "yes" -o "$have_mp4_h" = "yes"; then
AC_CHECK_LIB( mp4v2, MP4Read, have_mp4v2=yes, have_mp4v2=no )
fi
if test "$have_mp4v2" = "yes" -a "$have_mp4_h" = "yes"; then
if test "$have_mp4v2" = "yes"; then
AC_DEFINE(HAVE_MP4V2, 1, [have mp4v2])
MP4V2_INCLUDES="-I$mp4v2_dir/include"
MP4V2_LIBS="-L$mp4v2_dir/lib -lmp4v2"
@ -1100,15 +1114,54 @@ AC_CHECK_TYPES([uint8_t, u_int8_t, uint16_t, u_int16_t, uint32_t, u_int32_t, uin
AC_PATH_PROG(RUBY, ruby, no)
ruby_includes=[`$RUBY -rrbconfig -e 'puts Config.expand( Config::MAKEFILE_CONFIG["archdir"] )'`]
ruby_ldflags=[`$RUBY -rrbconfig -e 'puts Config.expand( Config::MAKEFILE_CONFIG["LIBRUBYARG_SHARED"] )'`]
if test -n "$PKG_CONFIG"; then
RUBY_VERSION=`$PKG_CONFIG ruby --modversion 2>/dev/null`
if test -n "$RUBY_VERSION"; then
RUBY_CFLAGS=`$PKG_CONFIG ruby --cflags`
fi
if test -z "$RUBY_VERSION"; then
RUBY_VERSION=`$PKG_CONFIG ruby-1.9 --modversion 2>/dev/null`
if test -n "$RUBY_VERSION"; then
RUBY_CFLAGS=`$PKG_CONFIG ruby-1.9 --cflags`
fi
fi
if test -z "$RUBY_VERSION"; then
# pkgconfig file does not exist but might be 1.9.1: RUBY_VERSION defined in ruby/version.h
if test -n "$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubyhdrdir"@:>@)'"; then
# rubyhdrdir parameter works only in >=1.9.1; this is 1.9.1
RUBY_MAJOR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"['MAJOR']"@:>@)'`
RUBY_MINOR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"['MINOR']"@:>@)'`
RUBY_TEENY=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"['TEENY']"@:>@)'`
if test "$RUBY_MAJOR" == "1" && test "$RUBY_MINOR" == "9"; then
RUBY_VERSION="$RUBY_MAJOR.$RUBY_MINOR.$RUBY_TEENY"
RUBY_CFLAGS="-I`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubyhdrdir"@:>@)'`"
RUBY_CFLAGS="$RUBY_CFLAGS/`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"arch"@:>@)'` $RUBY_CFLAGS"
fi
fi
fi
if test -n "$RUBY_VERSION"; then
RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"archdir"@:>@)'`
RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"sitearchdir"@:>@)'`
RUBY_SITEDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"sitelibdir"@:>@)'`
RUBY_RUBYLIBDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"rubylibdir"@:>@)'`
RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"libdir"@:>@)'`
RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'`
AC_DEFINE_UNQUOTED(HAVE_RUBY_1_9, 1, [Defines if your system has Ruby 1.9.x])
fi
fi
if test -z "$RUBY_VERSION"; then
ruby_includes=[`$RUBY -rrbconfig -e 'puts Config.expand( Config::MAKEFILE_CONFIG["archdir"] )'`]
ruby_ldflags=[`$RUBY -rrbconfig -e 'puts Config.expand( Config::MAKEFILE_CONFIG["LIBRUBYARG_SHARED"] )'`]
RUBY_CFLAGS="-I$ruby_includes"
RUBY_LIBRUBYARG="$ruby_ldflags"
fi
AC_SUBST(ruby_includes)
AC_SUBST(ruby_ldflags)
AC_SUBST(RUBY_CFLAGS)
AC_SUBST(RUBY_LIBRUBYARG)
OLDCFLAGS="$CFLAGS"
CFLAGS="-I$ruby_includes -Wall"
CFLAGS="$RUBY_CFLAGS -Wall"
OLDCPPFLAGS="$CPPFLAGS"
CPPFLAGS="-I$ruby_includes" #no I don't know why CPPFLAGS is used
CPPFLAGS="$RUBY_CFLAGS" #no I don't know why CPPFLAGS is used
AC_CHECK_HEADERS([ruby.h], [have_ruby_h=yes], [have_ruby_h=no]) #used in ruby check below
CFLAGS="$OLDCFLAGS"
CPPFLAGS="$OLDCPPFLAGS"

@ -74,7 +74,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout5</cstring>
<cstring>layout5</cstring>
</property>
<hbox>
<property name="name">
@ -90,7 +90,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>16</width>
<height>21</height>
@ -132,7 +132,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout4</cstring>
<cstring>layout4</cstring>
</property>
<hbox>
<property name="name">
@ -188,7 +188,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>30</width>
<height>20</height>
@ -199,7 +199,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout7</cstring>
<cstring>layout7</cstring>
</property>
<hbox>
<property name="name">
@ -209,7 +209,7 @@
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
@ -234,7 +234,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
@ -254,7 +254,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>50</width>
<height>21</height>
@ -265,7 +265,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout8</cstring>
<cstring>layout8</cstring>
</property>
<hbox>
<property name="name">
@ -278,7 +278,7 @@
<property name="enabled">
<bool>true</bool>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
@ -303,7 +303,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
@ -323,7 +323,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>50</width>
<height>21</height>
@ -443,7 +443,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout8_2_2</cstring>
<cstring>layout8_2_2</cstring>
</property>
<hbox>
<property name="name">
@ -459,7 +459,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>16</width>
<height>21</height>
@ -516,7 +516,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>130</width>
<height>20</height>
@ -527,7 +527,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout7_2_2</cstring>
<cstring>layout7_2_2</cstring>
</property>
<hbox>
<property name="name">
@ -543,7 +543,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>16</width>
<height>21</height>
@ -641,7 +641,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>30</height>

@ -172,7 +172,7 @@
<property name="text">
<string>Player Window:</string>
</property>
<property name="tqalignment">
<property name="alignment">
<set>AlignVCenter</set>
</property>
<property name="toolTip" stdset="0">
@ -282,7 +282,7 @@
</property>
<widget class="TQLayoutWidget" row="2" column="0">
<property name="name">
<cstring>tqlayout2</cstring>
<cstring>layout2</cstring>
</property>
<vbox>
<property name="name">
@ -349,7 +349,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
@ -443,13 +443,13 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>192</width>
<height>32767</height>
@ -528,7 +528,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout5</cstring>
<cstring>layout5</cstring>
</property>
<hbox>
<property name="name">
@ -576,7 +576,7 @@
</property>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout6</cstring>
<cstring>layout6</cstring>
</property>
<hbox>
<property name="name">
@ -616,7 +616,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout5</cstring>
<cstring>layout5</cstring>
</property>
<hbox>
<property name="name">
@ -660,7 +660,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>40</width>
<height>20</height>
@ -695,7 +695,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>30</height>

@ -137,7 +137,7 @@ void Options2::uninstallPushButton_clicked()
return;
if( KMessageBox::warningContinueCancel( 0,
i18n( "<p>Are you sure you want to uninstall the theme <strong>%1</strong>?</p>" ).tqarg( name ),
i18n( "<p>Are you sure you want to uninstall the theme <strong>%1</strong>?</p>" ).arg( name ),
i18n("Uninstall Theme"), i18n("Uninstall") ) == KMessageBox::Cancel )
return;
@ -152,7 +152,7 @@ void Options2::uninstallPushButton_clicked()
if( !KIO::NetAccess::del( themeDir, 0 ) ) {
KMessageBox::sorry( 0, i18n( "<p>Could not uninstall this theme.</p>"
"<p>You may not have sufficient permissions to delete the folder <strong>%1<strong></p>."
).tqarg( themeDir.isLocalFile() ? themeDir.path() : themeDir.url() ) );
).arg( themeDir.isLocalFile() ? themeDir.path() : themeDir.url() ) );
return;
}

@ -36,7 +36,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>0</width>
<height>180</height>
@ -75,7 +75,7 @@
</widget>
<widget class="TQLayoutWidget" row="1" column="1">
<property name="name">
<cstring>tqlayout11</cstring>
<cstring>layout11</cstring>
</property>
<hbox>
<property name="name">
@ -93,7 +93,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
@ -118,7 +118,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>160</width>
<height>0</height>
@ -158,7 +158,7 @@
</widget>
<widget class="TQLayoutWidget" row="3" column="1">
<property name="name">
<cstring>tqlayout9</cstring>
<cstring>layout9</cstring>
</property>
<hbox>
<property name="name">
@ -166,7 +166,7 @@
</property>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout7</cstring>
<cstring>layout7</cstring>
</property>
<vbox>
<property name="name">
@ -187,7 +187,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
@ -215,7 +215,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
@ -232,7 +232,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout8</cstring>
<cstring>layout8</cstring>
</property>
<vbox>
<property name="name">
@ -253,7 +253,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>50</width>
<height>0</height>
@ -308,7 +308,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>50</width>
<height>0</height>
@ -338,7 +338,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>16</width>
<height>20</height>
@ -379,7 +379,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>31</width>
<height>30</height>
@ -398,7 +398,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>0</width>
<height>120</height>
@ -445,7 +445,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>16</width>
<height>20</height>
@ -454,7 +454,7 @@
</spacer>
<widget class="TQLayoutWidget" row="2" column="1">
<property name="name">
<cstring>tqlayout9_2</cstring>
<cstring>layout9_2</cstring>
</property>
<hbox>
<property name="name">
@ -462,7 +462,7 @@
</property>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout7_2</cstring>
<cstring>layout7_2</cstring>
</property>
<vbox>
<property name="name">
@ -483,7 +483,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
@ -500,7 +500,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout8_2</cstring>
<cstring>layout8_2</cstring>
</property>
<vbox>
<property name="name">
@ -521,7 +521,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>50</width>
<height>0</height>

@ -38,7 +38,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout2</cstring>
<cstring>layout2</cstring>
</property>
<hbox>
<property name="name">
@ -54,7 +54,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>16</width>
<height>20</height>
@ -142,7 +142,7 @@
</property>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout3</cstring>
<cstring>layout3</cstring>
</property>
<vbox>
<property name="name">
@ -167,7 +167,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout1</cstring>
<cstring>layout1</cstring>
</property>
<hbox>
<property name="name">
@ -183,7 +183,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>16</width>
<height>20</height>

@ -33,7 +33,7 @@ email : fh@ez.no
void Options5::init()
{
m_pOSDPreview = new OSDPreviewWidget( this ); //must be child!!!
m_pOSDPreview->tqsetAlignment( static_cast<OSDWidget::Alignment>( AmarokConfig::osdAlignment() ) );
m_pOSDPreview->setAlignment( static_cast<OSDWidget::Alignment>( AmarokConfig::osdAlignment() ) );
m_pOSDPreview->setOffset( AmarokConfig::osdYOffset() );
connect( m_pOSDPreview, TQT_SIGNAL( positionChanged() ), TQT_SLOT( slotPositionChanged() ) );
@ -92,7 +92,7 @@ void Options5::init()
<< "%year " << "%length" << "%track" << "%filename" << "%directory"
<< "%type" << "%comment" << "%score" << "%playcount" << "%discnumber"
<< "%rating" << "%moodbar" << "%elapsed"
<< "%title {" + i18n( "Score: %1" ).tqarg( "%score" ) +'}' ) );
<< "%title {" + i18n( "Score: %1" ).arg( "%score" ) +'}' ) );
}
void

@ -12,7 +12,7 @@
<height>418</height>
</rect>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>1</width>
<height>1</height>
@ -30,7 +30,7 @@
</property>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout2</cstring>
<cstring>layout2</cstring>
</property>
<hbox>
<property name="name">
@ -54,7 +54,7 @@
<property name="text">
<string></string>
</property>
<property name="tqalignment">
<property name="alignment">
<set>AlignVCenter</set>
</property>
</widget>
@ -70,10 +70,10 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>-1</width>
<height>-1</height>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="text">
@ -111,7 +111,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout3</cstring>
<cstring>layout3</cstring>
</property>
<grid>
<property name="name">
@ -271,7 +271,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>30</height>

@ -122,7 +122,7 @@ Menu::Menu()
insertItem( SmallIconSet( Amarok::icon( "covermanager" ) ), i18n( "C&over Manager" ), ID_SHOW_COVER_MANAGER );
safePlug( ac, "queue_manager", this );
insertItem( SmallIconSet( Amarok::icon( "visualizations" ) ), i18n( "&Visualizations" ), ID_SHOW_VIS_SELECTOR );
insertItem( SmallIconSet( Amarok::icon( "equalizer" ) ), i18n( "E&qualizer" ), kapp, TQT_SLOT( slotConfigEqualizer() ), 0, ID_CONFIGURE_ETQUALIZER );
insertItem( SmallIconSet( Amarok::icon( "equalizer" ) ), i18n( "E&qualizer" ), kapp, TQT_SLOT( slotConfigEqualizer() ), 0, ID_CONFIGURE_EQUALIZER );
safePlug( ac, "script_manager", this );
safePlug( ac, "statistics", this );
@ -182,7 +182,7 @@ Menu::helpMenu( TQWidget *parent ) //STATIC
void
Menu::slotAboutToShow()
{
setItemEnabled( ID_CONFIGURE_ETQUALIZER, EngineController::hasEngineProperty( "HasEqualizer" ) );
setItemEnabled( ID_CONFIGURE_EQUALIZER, EngineController::hasEngineProperty( "HasEqualizer" ) );
setItemEnabled( ID_CONF_DECODER, EngineController::hasEngineProperty( "HasConfigure" ) );
}
@ -434,7 +434,7 @@ VolumeAction::plug( TQWidget *w, int index )
m_slider = new Amarok::VolumeSlider( w, Amarok::VOLUME_MAX );
m_slider->setName( "ToolBarVolume" );
m_slider->setValue( AmarokConfig::masterVolume() );
m_slider->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Ignored );
m_slider->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Ignored );
TQToolTip::add( m_slider, i18n( "Volume control" ) );
@ -608,7 +608,7 @@ StopMenu::StopMenu()
insertTitle( i18n( "Stop" ) );
insertItem( i18n("Now"), NOW );
insertItem( i18n("After Current Track"), AFTER_TRACK );
insertItem( i18n("After Queue"), AFTER_TQUEUE );
insertItem( i18n("After Queue"), AFTER_QUEUE );
connect( this, TQT_SIGNAL( aboutToShow() ), TQT_SLOT( slotAboutToShow() ) );
connect( this, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotActivated(int) ) );
@ -631,8 +631,8 @@ StopMenu::slotAboutToShow()
setItemEnabled( AFTER_TRACK, EngineController::engine()->loaded() );
setItemChecked( AFTER_TRACK, pl->stopAfterMode() == Playlist::StopAfterCurrent );
setItemEnabled( AFTER_TQUEUE, pl->nextTracks().count() );
setItemChecked( AFTER_TQUEUE, pl->stopAfterMode() == Playlist::StopAfterQueue );
setItemEnabled( AFTER_QUEUE, pl->nextTracks().count() );
setItemChecked( AFTER_QUEUE, pl->stopAfterMode() == Playlist::StopAfterQueue );
}
void
@ -653,7 +653,7 @@ StopMenu::slotActivated( int index )
? Playlist::DoNotStop
: Playlist::StopAfterCurrent );
break;
case AFTER_TQUEUE:
case AFTER_QUEUE:
pl->setStopAfterMode( mode == Playlist::StopAfterQueue
? Playlist::DoNotStop
: Playlist::StopAfterQueue );

@ -33,7 +33,7 @@ namespace Amarok
ID_CONF_DECODER,
ID_SHOW_VIS_SELECTOR,
ID_SHOW_COVER_MANAGER,
ID_CONFIGURE_ETQUALIZER,
ID_CONFIGURE_EQUALIZER,
ID_RESCAN_COLLECTION
};
@ -190,7 +190,7 @@ namespace Amarok
enum MenuIds {
NOW,
AFTER_TRACK,
AFTER_TQUEUE
AFTER_QUEUE
};
static KPopupMenu *instance();

@ -111,12 +111,12 @@ namespace Amarok
*/
class OverrideCursor { //defined in app.cpp
public:
OverrideCursor( TQt::tqCursorShape cursor = TQt::WaitCursor );
OverrideCursor( TQt::CursorShape cursor = TQt::WaitCursor );
~OverrideCursor();
};
/**
* For saving files to ~/.kde/share/apps/amarok/directory
* For saving files to ~/.trinity/share/apps/amarok/directory
* @param directory will be created if not existing, you MUST end the string
* with '/'
*/

@ -35,11 +35,11 @@ Name[ne]=अमारोकसँग अडियो सीडी बजाउ
Name[nl]=Audio-cd met Amarok afspelen
Name[nn]=Spel lyd-CD med Amarok
Name[pa]=ਅਮਰੋਕ ਨਾਲ ਆਡੀਓ CD ਚਲਾਓ
Name[pl]=Odtwórz Audio CD za potqmocą Amarok
Name[pl]=Odtwórz Audio CD za pomocą Amarok
Name[pt]=Tocar o CD de Áudio com o Amarok
Name[pt_BR]=Reproduzir CD de Áudio com o Amarok
Name[se]=Čuojat jietna-CD:a Amarokain
Name[sk]=Zahrať Audio CD potqmocou Amarok
Name[sk]=Zahrať Audio CD pomocou Amarok
Name[sr]=Пусти аудио CD помоћу Amarok-а
Name[sr@Latn]=Pusti audio CD pomoću Amarok-a
Name[sv]=Spela ljud-cd med Amarok

@ -404,7 +404,7 @@
<entry key="Osd Font" type="Font">
<label>Font for On-Screen Display</label>
<whatsthis>The font to use for the On-Screen Display.</whatsthis>
<default code="true">QFont("Arial",16)</default>
<default code="true">TQFont("Arial",16)</default>
</entry>
<entry key="Osd Draw Shadow" type="Bool">
<label>Draw a shadow around the text.</label>
@ -443,7 +443,7 @@
</entry>
<entry key="Osd Y Offset" type="Int">
<label>Y position offset</label>
<whatsthis>The Y position of the OSD relative to the chosen screen and OSD tqalignment. If Top tqalignment is chosen the Y offset is the space between the upper part of the OSD and the top of the screen. If Bottom tqalignment is chosen the Y offset is the space between the bottom part of the OSD and the bottom of the screen.</whatsthis>
<whatsthis>The Y position of the OSD relative to the chosen screen and OSD alignment. If Top alignment is chosen the Y offset is the space between the upper part of the OSD and the top of the screen. If Bottom alignment is chosen the Y offset is the space between the bottom part of the OSD and the bottom of the screen.</whatsthis>
<default>50</default>
<min>0</min>
<max>10000</max>

@ -39,7 +39,7 @@
#include "playlistitem.h"
#include "playlistwindow.h"
#include "scancontroller.h"
#include "scriptmanager.h"
#include "../scriptmanager.h"
#include "statusbar.h"
#include "lastfm.h"
@ -72,7 +72,7 @@ namespace Amarok
return APP_VERSION;
}
bool DcopPlayerHandler::dynamicModetqStatus()
bool DcopPlayerHandler::dynamicModeStatus()
{
return Amarok::dynamicMode();
}
@ -95,17 +95,17 @@ namespace Amarok
return EngineController::engine()->state() == Engine::Playing;
}
bool DcopPlayerHandler::randomModetqStatus()
bool DcopPlayerHandler::randomModeStatus()
{
return AmarokConfig::randomMode();
}
bool DcopPlayerHandler::repeatPlaylisttqStatus()
bool DcopPlayerHandler::repeatPlaylistStatus()
{
return Amarok::repeatPlaylist();
}
bool DcopPlayerHandler::repeatTracktqStatus()
bool DcopPlayerHandler::repeatTrackStatus()
{
return Amarok::repeatTrack();
}

@ -37,13 +37,13 @@ class DcopPlayerHandler : public TQObject, virtual public AmarokPlayerInterface
public:
virtual TQString version();
virtual bool dynamicModetqStatus();
virtual bool dynamicModeStatus();
virtual bool equalizerEnabled();
virtual bool osdEnabled();
virtual bool isPlaying();
virtual bool randomModetqStatus();
virtual bool repeatPlaylisttqStatus();
virtual bool repeatTracktqStatus();
virtual bool randomModeStatus();
virtual bool repeatPlaylistStatus();
virtual bool repeatTrackStatus();
virtual int getVolume();
virtual int sampleRate();
virtual float score ();

@ -36,13 +36,13 @@ class AmarokPlayerInterface : virtual public DCOPObject
k_dcop:
virtual TQString version() = 0; ///< returns amarok version string
virtual bool dynamicModetqStatus() = 0; ///< Return dynamic mode status.
virtual bool dynamicModeStatus() = 0; ///< Return dynamic mode status.
virtual bool equalizerEnabled() = 0; ///< Return the equalizer status.
virtual bool osdEnabled() = 0; ///< Return the OSD display status.
virtual bool isPlaying() = 0; ///< Return true if something is playing now.
virtual bool randomModetqStatus() = 0; ///< Return random mode status.
virtual bool repeatPlaylisttqStatus() = 0; ///< Return repeat playlist status.
virtual bool repeatTracktqStatus() = 0; ///< Return repeat track status.
virtual bool randomModeStatus() = 0; ///< Return random mode status.
virtual bool repeatPlaylistStatus() = 0; ///< Return repeat playlist status.
virtual bool repeatTrackStatus() = 0; ///< Return repeat track status.
virtual int getVolume() = 0; ///< Return volume in range 0-100%.
virtual int sampleRate() = 0; ///< Return the sample rate of the currently playing track.
virtual float score() = 0; ///< Return the score of the currently playing track.

@ -120,12 +120,12 @@ namespace Amarok
#endif
body = body.tqarg( AmarokConfig::soundSystem() )
.tqarg( qVersion() )
.tqarg( TAGLIB_MAJOR_VERSION )
.tqarg( TAGLIB_MINOR_VERSION )
.tqarg( TAGLIB_PATCH_VERSION )
.tqarg( cpucount );
body = body.arg( AmarokConfig::soundSystem() )
.arg( qVersion() )
.arg( TAGLIB_MAJOR_VERSION )
.arg( TAGLIB_MINOR_VERSION )
.arg( TAGLIB_PATCH_VERSION )
.arg( cpucount );
#ifdef NDEBUG
body += "NDEBUG: true";
@ -190,10 +190,10 @@ namespace Amarok
if( totalFrames > 0 ) {
const double validity = double(validFrames) / totalFrames;
subject += TQString("[validity: %1]").tqarg( validity, 0, 'f', 2 );
subject += TQString("[validity: %1]").arg( validity, 0, 'f', 2 );
if( validity <= 0.5 ) useful = false;
}
subject += TQString("[frames: %1]").tqarg( totalFrames, 3 /*padding*/ );
subject += TQString("[frames: %1]").arg( totalFrames, 3 /*padding*/ );
if( bt.find( TQRegExp(" at \\w*\\.cpp:\\d+\n") ) >= 0 )
subject += "[line numbers]";
@ -201,7 +201,7 @@ namespace Amarok
else
useful = false;
subject += TQString("[%1]").tqarg( AmarokConfig::soundSystem().remove( TQRegExp("-?engine") ) );
subject += TQString("[%1]").arg( AmarokConfig::soundSystem().remove( TQRegExp("-?engine") ) );
std::cout << subject.latin1() << std::endl;
@ -265,10 +265,10 @@ namespace Amarok
Amarok::CrashHandlerWidget::CrashHandlerWidget()
{
TQBoxLayout *tqlayout = new TQHBoxLayout( this, 18, 12 );
TQBoxLayout *layout = new TQHBoxLayout( this, 18, 12 );
{
TQBoxLayout *lay = new TQVBoxLayout( tqlayout );
TQBoxLayout *lay = new TQVBoxLayout( layout );
TQLabel *label = new TQLabel( this );
label->setPixmap( locate( "data", "drkonqi/pics/konqi.png" ) );
label->setFrameStyle( TQFrame::Plain | TQFrame::Box );
@ -276,9 +276,9 @@ Amarok::CrashHandlerWidget::CrashHandlerWidget()
lay->addItem( new TQSpacerItem( 3, 3, TQSizePolicy::Minimum, TQSizePolicy::Expanding ) );
}
tqlayout = new TQVBoxLayout( tqlayout, 6 );
layout = new TQVBoxLayout( layout, 6 );
tqlayout->add( new TQLabel( /*i18n*/(
layout->add( new TQLabel( /*i18n*/(
"<p>" "Amarok has crashed! We are terribly sorry about this :("
"<p>" "However you now have an opportunity to help us fix this crash so that it doesn't "
"happen again! Click <b>Send Email</b> and Amarok will prepare an email that you "
@ -286,11 +286,11 @@ Amarok::CrashHandlerWidget::CrashHandlerWidget()
"as soon as possible."
"<p>" "Thanks for choosing Amarok.<br>" ), this ) );
tqlayout = new TQHBoxLayout( tqlayout, 6 );
layout = new TQHBoxLayout( layout, 6 );
tqlayout->addItem( new TQSpacerItem( 6, 6, TQSizePolicy::Expanding ) );
tqlayout->add( new KPushButton( KGuiItem( i18n("Send Email"), "mail_send" ), this, "email" ) );
tqlayout->add( new KPushButton( KStdGuiItem::close(), this, "close" ) );
layout->addItem( new TQSpacerItem( 6, 6, TQSizePolicy::Expanding ) );
layout->add( new KPushButton( KGuiItem( i18n("Send Email"), "mail_send" ), this, "email" ) );
layout->add( new KPushButton( KStdGuiItem::close(), this, "close" ) );
static_cast<TQPushButton*>(child("email"))->setDefault( true );
@ -298,6 +298,6 @@ Amarok::CrashHandlerWidget::CrashHandlerWidget()
connect( child( "close" ), TQT_SIGNAL(clicked()), TQT_SLOT(reject()) );
setCaption( i18n("Crash Handler") );
setFixedSize( tqsizeHint() );
setFixedSize( sizeHint() );
}
#endif

@ -27,7 +27,7 @@
#include <GL/glu.h> //included for convenience
#endif
//#else
////this is a workaround for compile problems due to tqmoc
////this is a workaround for compile problems due to moc
//#define TQGLWidget TQWidget
//#endif
@ -106,12 +106,12 @@ private:
//This mess is because tqmoc generates an entry for this class despite the #if block
//This mess is because moc generates an entry for this class despite the #if block
//1. the Q_OBJECT macro must be exposed
//2. we have to define the class
//3. we have to declare a ctor (to satisfy the inheritance)
//4. the slot must also by visible (!)
//TODO find out how to stop tqmoc generating a metaobject for this class
//TODO find out how to stop moc generating a metaobject for this class
class Base3D : public Base<TQGLWidget>
{
Q_OBJECT

@ -73,7 +73,7 @@ TQWidget *Analyzer::Factory::createAnalyzer( TQWidget *parent )
case 5:
#endif
analyzer = new TQLabel( i18n( "Click for Analyzers" ), parent ); //blank analyzer to satisfy Grue
static_cast<TQLabel *>(analyzer)->tqsetAlignment( TQt::AlignCenter );
static_cast<TQLabel *>(analyzer)->setAlignment( TQt::AlignCenter );
break;
default:
@ -114,7 +114,7 @@ TQWidget *Analyzer::Factory::createPlaylistAnalyzer( TQWidget *parent)
case 4:
#endif
analyzer = new TQLabel( i18n( "Click for Analyzers" ), parent ); //blank analyzer to satisfy Grue
static_cast<TQLabel *>(analyzer)->tqsetAlignment( TQt::AlignCenter );
static_cast<TQLabel *>(analyzer)->setAlignment( TQt::AlignCenter );
break;
default:

@ -21,7 +21,7 @@ class BarAnalyzer : public Analyzer::Base2D
//virtual void transform( Scope& );
/**
* Resizes the widget to a new tqgeometry according to @p e
* Resizes the widget to a new geometry according to @p e
* @param e The resize-event
*/
void resizeEvent( TQResizeEvent * e);

@ -48,8 +48,9 @@ BlockAnalyzer::BlockAnalyzer( TQWidget *parent )
setMaximumWidth( MAX_COLUMNS*(WIDTH+1) -1 );
// mxcl says null pixmaps cause crashes, so let's play it safe
for ( uint i = 0; i < FADE_SIZE; ++i )
for ( uint i = 0; i < FADE_SIZE; ++i ) {
m_fade_bars[i].resize( 1, 1 );
}
}
BlockAnalyzer::~BlockAnalyzer()
@ -80,23 +81,26 @@ BlockAnalyzer::resizeEvent( TQResizeEvent *e )
if( m_rows != oldRows ) {
m_barPixmap.resize( WIDTH, m_rows*(HEIGHT+1) );
for ( uint i = 0; i < FADE_SIZE; ++i )
for ( uint i = 0; i < FADE_SIZE; ++i ) {
m_fade_bars[i].resize( WIDTH, m_rows*(HEIGHT+1) );
}
m_yscale.resize( m_rows + 1 );
const uint PRE = 1, PRO = 1; //PRE and PRO allow us to restrict the range somewhat
for( uint z = 0; z < m_rows; ++z )
for( uint z = 0; z < m_rows; ++z ) {
m_yscale[z] = 1 - (log10( PRE+z ) / log10( PRE+m_rows+PRO ));
}
m_yscale[m_rows] = 0;
determineStep();
paletteChange( palette() );
}
else if( width() > e->oldSize().width() || height() > e->oldSize().height() )
else if( width() > e->oldSize().width() || height() > e->oldSize().height() ) {
drawBackground();
}
analyze( m_scope );
}
@ -148,18 +152,25 @@ BlockAnalyzer::analyze( const Analyzer::Scope &s )
// Paint the background
bitBlt( canvas(), 0, 0, background() );
for( uint y, x = 0; x < m_scope.size(); ++x )
uint y;
for( uint x = 0; x < m_scope.size(); ++x )
{
if (m_yscale.size() < 1) {
return;
}
// determine y
for( y = 0; m_scope[x] < m_yscale[y]; ++y )
;
// this is opposite to what you'd think, higher than y
// means the bar is lower than y (physically)
if( (float)y > m_store[x] )
if( (float)y > m_store[x] ) {
y = int(m_store[x] += m_step);
else
}
else {
m_store[x] = y;
}
// if y is lower than m_fade_pos, then the bar has exceeded the height of the fadeout
// if the fadeout is quite faded now, then display the new one
@ -174,15 +185,17 @@ BlockAnalyzer::analyze( const Analyzer::Scope &s )
bitBlt( canvas(), x*(WIDTH+1), y, &m_fade_bars[offset], 0, 0, WIDTH, height() - y );
}
if( m_fade_intensity[x] == 0 )
if( m_fade_intensity[x] == 0 ) {
m_fade_pos[x] = m_rows;
}
//REMEMBER: y is a number from 0 to m_rows, 0 means all blocks are glowing, m_rows means none are
bitBlt( canvas(), x*(WIDTH+1), y*(HEIGHT+1) + m_y, bar(), 0, y*(HEIGHT+1) );
}
for( uint x = 0; x < m_store.size(); ++x )
for( uint x = 0; x < m_store.size(); ++x ) {
bitBlt( canvas(), x*(WIDTH+1), int(m_store[x])*(HEIGHT+1) + m_y, &m_topBarPixmap );
}
}
@ -354,7 +367,7 @@ ensureContrast( const TQColor &bg, const TQColor &fg, uint _amount = 150 )
void
BlockAnalyzer::paletteChange( const TQPalette& ) //virtual
{
const TQColor bg = tqpalette().active().background();
const TQColor bg = palette().active().background();
const TQColor fg = ensureContrast( bg, KGlobalSettings::activeTitleColor() );
m_topBarPixmap.fill( fg );
@ -372,11 +385,11 @@ BlockAnalyzer::paletteChange( const TQPalette& ) //virtual
p.fillRect( 0, y*(HEIGHT+1), WIDTH, HEIGHT, TQColor( r+int(dr*y), g+int(dg*y), b+int(db*y) ) );
{
const TQColor bg = tqpalette().active().background().dark( 112 );
const TQColor bg = palette().active().background().dark( 112 );
//make a complimentary fadebar colour
//TODO dark is not always correct, dumbo!
int h,s,v; tqpalette().active().background().dark( 150 ).getHsv( &h, &s, &v );
int h,s,v; palette().active().background().dark( 150 ).getHsv( &h, &s, &v );
const TQColor fg( h + 120, s, v, TQColor::Hsv );
const double dr = fg.red() - bg.red();
@ -386,7 +399,7 @@ BlockAnalyzer::paletteChange( const TQPalette& ) //virtual
// Precalculate all fade-bar pixmaps
for( uint y = 0; y < FADE_SIZE; ++y ) {
m_fade_bars[y].fill( tqpalette().active().background() );
m_fade_bars[y].fill( palette().active().background() );
TQPainter f( &m_fade_bars[y] );
for( int z = 0; (uint)z < m_rows; ++z ) {
const double Y = 1.0 - (log10( FADE_SIZE - y ) / log10( FADE_SIZE ));
@ -401,7 +414,7 @@ BlockAnalyzer::paletteChange( const TQPalette& ) //virtual
void
BlockAnalyzer::drawBackground()
{
const TQColor bg = tqpalette().active().background();
const TQColor bg = palette().active().background();
const TQColor bgdark = bg.dark( 112 );
background()->fill( bg );
@ -430,7 +443,7 @@ BlockAnalyzer::contextMenuEvent( TQContextMenuEvent *e )
{
const uint v = ids[x];
menu.insertItem( i18n( "%1 fps" ).tqarg( 1000/v ), v );
menu.insertItem( i18n( "%1 fps" ).arg( 1000/v ), v );
menu.setItemChecked( v, v == timeout() );
}

@ -71,7 +71,18 @@ BoomAnalyzer::init()
{
const double F = (double)y * h;
p.setPen( TQColor( 255 - int(229.0 * F), 255 - int(229.0 * F), 255 - int(191.0 * F) ) );
int r = 255 - int(229.0 * F);
int g = 255 - int(229.0 * F);
int b = 255 - int(191.0 * F);
if (r < 0) r = 0;
if (g < 0) g = 0;
if (b < 0) b = 0;
if (r > 255) r = 255;
if (g > 255) g = 255;
if (b > 255) b = 255;
p.setPen( TQColor( r, g, b ) );
p.drawLine( 0, y, COLUMN_WIDTH-2, y );
}
}

@ -232,7 +232,7 @@ void GLAnalyzer2::paintGL()
glLoadIdentity();
// glRotatef( -frame.rotDegrees, 0,0,1 );
glBegin( GL_TQUADS );
glBegin( GL_QUADS );
// Particle * particle = particleList.first();
// for (; particle; particle = particleList.next())
{

@ -347,7 +347,7 @@ void GLAnalyzer3::drawDot3s( float x, float y, float z, float size )
pYm = y - sizeY,
pYM = y + sizeY;
// Draw the Dot
glBegin( GL_TQUADS );
glBegin( GL_QUADS );
glTexCoord2f( 0, 0 ); // Bottom Left
glVertex3f( pXm, pYm, z );
glTexCoord2f( 0, 1 ); // Top Left
@ -370,7 +370,7 @@ void GLAnalyzer3::drawDot3s( float x, float y, float z, float size )
// Draw the top shadow
currentColor[3] = topSide * topSide * alpha;
glColor4fv( currentColor );
glBegin( GL_TQUADS );
glBegin( GL_QUADS );
glTexCoord2f( 0, 0 ); // Bottom Left
glVertex3f( pXm, 1, pZm );
glTexCoord2f( 0, 1 ); // Top Left
@ -383,7 +383,7 @@ void GLAnalyzer3::drawDot3s( float x, float y, float z, float size )
// Draw the bottom shadow
currentColor[3] = bottomSide * bottomSide * alpha;
glColor4fv( currentColor );
glBegin( GL_TQUADS );
glBegin( GL_QUADS );
glTexCoord2f( 0, 0 ); // Bottom Left
glVertex3f( pXm, -1, pZm );
glTexCoord2f( 0, 1 ); // Top Left

@ -96,7 +96,7 @@ int App::mainThreadId = 0;
static AEEventHandlerUPP appleEventProcessorUPP = 0;
OStqStatus
OSStatus
appleEventProcessor(const AppleEvent *ae, AppleEvent *, long /*handlerRefCon*/)
{
OSType aeID = typeWildCard;
@ -675,7 +675,7 @@ void App::applySettings( bool firstTime )
//Set the caption correctly.
if ( !EngineController::instance()->bundle().prettyTitle().isEmpty() )
m_pPlaylistWindow->setCaption( i18n("Amarok - %1").tqarg( EngineController::instance()->bundle().veryNiceTitle() ) );
m_pPlaylistWindow->setCaption( i18n("Amarok - %1").arg( EngineController::instance()->bundle().veryNiceTitle() ) );
else
m_pPlaylistWindow->setCaption( "Amarok" );
@ -871,7 +871,7 @@ App::applyColorScheme()
else if( AmarokConfig::schemeAmarok() )
{
group = TQApplication::tqpalette().active();
group = TQApplication::palette().active();
const TQColor bg( Amarok::blue );
AltBase.setRgb( 57, 64, 98 );
@ -906,7 +906,7 @@ App::applyColorScheme()
Background = 0x002090;
Foreground = 0x80A0FF;
//all tqchildren() derive their palette from this
//all children() derive their palette from this
playlistWindow()->setPalette( TQPalette( group, group, group ) );
browserBar->unsetPalette();
contextBrowser->setPalette( TQPalette( group, group, group ) );
@ -916,7 +916,7 @@ App::applyColorScheme()
{
// we try to be smart: this code figures out contrasting colors for
// selection and alternate background rows
group = TQApplication::tqpalette().active();
group = TQApplication::palette().active();
const TQColor fg( AmarokConfig::playlistWindowFgColor() );
const TQColor bg( AmarokConfig::playlistWindowBgColor() );
@ -1084,7 +1084,7 @@ void App::engineStateChanged( Engine::State state, Engine::State oldState )
if ( oldState == Engine::Paused )
Amarok::OSD::instance()->OSDWidget::show( i18n( "state, as in playing", "Play" ) );
if ( !bundle.prettyTitle().isEmpty() )
m_pPlaylistWindow->setCaption( i18n("Amarok - %1").tqarg( bundle.veryNiceTitle() ) );
m_pPlaylistWindow->setCaption( i18n("Amarok - %1").arg( bundle.veryNiceTitle() ) );
break;
case Engine::Paused:
@ -1106,7 +1106,7 @@ void App::engineNewMetaData( const MetaBundle &bundle, bool /*trackChanged*/ )
{
Amarok::OSD::instance()->show( bundle );
if ( !bundle.prettyTitle().isEmpty() )
m_pPlaylistWindow->setCaption( i18n("Amarok - %1").tqarg( bundle.veryNiceTitle() ) );
m_pPlaylistWindow->setCaption( i18n("Amarok - %1").arg( bundle.veryNiceTitle() ) );
TrackToolTip::instance()->setTrack( bundle );
}
@ -1313,7 +1313,7 @@ namespace Amarok
{
//URL can be in whatever forms KURL::fromPathOrURL understands - ie most.
const TQString cmd = "%1 \"%2\"";
return KRun::runCommand( cmd.tqarg( AmarokConfig::externalBrowser(), KURL::fromPathOrURL( url ).url() ) ) > 0;
return KRun::runCommand( cmd.arg( AmarokConfig::externalBrowser(), KURL::fromPathOrURL( url ).url() ) ) > 0;
}
namespace ColorScheme
@ -1325,7 +1325,7 @@ namespace Amarok
TQColor AltBase;
}
OverrideCursor::OverrideCursor( TQt::tqCursorShape cursor )
OverrideCursor::OverrideCursor( TQt::CursorShape cursor )
{
TQApplication::setOverrideCursor( cursor == TQt::WaitCursor ? KCursor::waitCursor() : KCursor::workingCursor() );
}

@ -82,7 +82,7 @@ TQString AtomicString::string() const
TQString AtomicString::deepCopy() const
{
if (m_string)
return TQString( m_string->tqunicode(), m_string->length() );
return TQString( m_string->unicode(), m_string->length() );
return TQString();
}

@ -38,18 +38,18 @@ namespace Amarok
Splitter( BrowserBar *w ) : TQWidget( w, "divider" )
{
setCursor( TQCursor(SplitHCursor) );
styleChange( tqstyle() );
styleChange( style() );
}
virtual void paintEvent( TQPaintEvent* )
{
TQPainter p( this );
parentWidget()->tqstyle().tqdrawPrimitive( TQStyle::PE_Splitter, &p, rect(), tqcolorGroup(), TQStyle::Style_Horizontal );
parentWidget()->style().tqdrawPrimitive( TQStyle::PE_Splitter, &p, rect(), colorGroup(), TQStyle::Style_Horizontal );
}
virtual void styleChange( TQStyle& )
{
setFixedWidth( tqstyle().tqpixelMetric( TQStyle::PM_SplitterWidth, this ) );
setFixedWidth( style().pixelMetric( TQStyle::PM_SplitterWidth, this ) );
}
virtual void mouseMoveEvent( TQMouseEvent *e )
@ -81,12 +81,12 @@ BrowserBar::BrowserBar( TQWidget *parent )
m_tabBar = new MultiTabBar( MultiTabBar::Vertical, this );
m_tabManagementButton->setFixedWidth(m_tabBar->tqsizeHint().width());
m_tabManagementButton->setFixedHeight(m_tabBar->tqsizeHint().width());
m_tabManagementButton->setFixedWidth(m_tabBar->sizeHint().width());
m_tabManagementButton->setFixedHeight(m_tabBar->sizeHint().width());
s_instance = this;
m_pos = m_tabBar->tqsizeHint().width() + 5; //5 = esthetic spacing
m_pos = m_tabBar->sizeHint().width() + 5; //5 = esthetic spacing
m_tabBar->setStyle( MultiTabBar::AMAROK );
m_tabBar->setPosition( MultiTabBar::Left );
@ -94,9 +94,11 @@ BrowserBar::BrowserBar( TQWidget *parent )
m_tabBar->setFixedWidth( m_pos );
m_tabBar->move( 0, 25 );
TQVBoxLayout *tqlayout = new TQVBoxLayout( m_browserBox );
tqlayout->addSpacing( 3 ); // aesthetics
tqlayout->setAutoAdd( true );
if (m_browserBox && (!m_browserBox->layout())) {
TQVBoxLayout *layout = new TQVBoxLayout( m_browserBox );
layout->addSpacing( 3 ); // aesthetics
layout->setAutoAdd( true );
}
m_browserBox->move( m_pos, 0 );
m_browserBox->hide();
@ -133,7 +135,7 @@ int
BrowserBar::restoreWidth()
{
const int index = indexForName( Amarok::config( "BrowserBar" )->readEntry( "CurrentPane" ) );
const int width = Amarok::config( "BrowserBar" )->readNumEntry( "Width", browser( index )->tqsizeHint().width() );
const int width = Amarok::config( "BrowserBar" )->readNumEntry( "Width", browser( index )->sizeHint().width() );
m_browserBox->resize( width, height() );
m_pos = m_browserBox->width() + m_tabBar->width();
@ -170,7 +172,7 @@ BrowserBar::polish()
void
BrowserBar::adjustWidgetSizes()
{
//TODO set the tqgeometry of the PlaylistWindow before
//TODO set the geometry of the PlaylistWindow before
// the browsers are loaded so this isn't called twice
const uint w = width();

@ -40,14 +40,14 @@ ClickLineEdit::ClickLineEdit( const TQString &msg, TQWidget *parent, const char*
void ClickLineEdit::setClickMessage( const TQString &msg )
{
mClickMessage = msg;
tqrepaint();
repaint();
}
void ClickLineEdit::setText( const TQString &txt )
{
mDrawClickMsg = txt.isEmpty();
tqrepaint();
repaint();
KLineEdit::setText( txt );
}
@ -86,7 +86,7 @@ void ClickLineEdit::focusInEvent( TQFocusEvent *ev )
{
if ( mDrawClickMsg == true ) {
mDrawClickMsg = false;
tqrepaint();
repaint();
}
TQLineEdit::focusInEvent( ev );
}
@ -96,7 +96,7 @@ void ClickLineEdit::focusOutEvent( TQFocusEvent *ev )
{
if ( text().isEmpty() ) {
mDrawClickMsg = true;
tqrepaint();
repaint();
}
TQLineEdit::focusOutEvent( ev );
}

@ -128,7 +128,7 @@ CollectionBrowser::CollectionBrowser( const char* name )
m_timeFilter = new KComboBox( m_ipodHbox, "timeFilter" );
m_ipodHbox->setStretchFactor( m_timeFilter, 1 );
// Allow the combobox to shrink so the iPod buttons are still visible
m_timeFilter->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed );
m_timeFilter->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed );
m_timeFilter->insertItem( i18n( "Entire Collection" ) );
m_timeFilter->insertItem( i18n( "Added Today" ) );
m_timeFilter->insertItem( i18n( "Added Within One Week" ) );
@ -415,7 +415,7 @@ CollectionBrowser::layoutToolbar()
m_configureAction->plug( m_toolbar );
//This would break things if the toolbar is too big, see bug #121915
//setMinimumWidth( m_toolbar->tqsizeHint().width() + 2 ); //set a reasonable minWidth
//setMinimumWidth( m_toolbar->sizeHint().width() + 2 ); //set a reasonable minWidth
}
@ -785,7 +785,7 @@ CollectionView::slotEnsureSelectedItemVisible() //SLOT
ensureItemVisible( lastChild() );
//Create a reverse list of parents, grandparents etc.
//Later we try to make the grandparents in view, then their tqchildren etc.
//Later we try to make the grandparents in view, then their children etc.
//This means that the selected item has the most priority as it is done last.
TQValueStack<TQListViewItem*> parents;
while ( r )
@ -864,7 +864,7 @@ CollectionView::slotExpand( TQListViewItem* item ) //SLOT
}
if ( translateTimeFilter( timeFilter() ) > 0 )
qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::tqcurrentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::currentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
TQString itemText;
bool isUnknown;
@ -1175,7 +1175,7 @@ CollectionView::slotCollapse( TQListViewItem* item ) //SLOT
TQListViewItem* child = item->firstChild();
TQListViewItem* childTmp;
//delete all tqchildren
//delete all children
while ( child )
{
childTmp = child;
@ -1416,7 +1416,7 @@ CollectionView::rmbPressed( TQListViewItem* item, const TQPoint& point, int ) //
cat = catArr[m_currentDepth];
}
enum Actions { APPEND, TQUEUE, MAKE, SAVE, MEDIA_DEVICE, BURN_ARTIST,
enum Actions { APPEND, QUEUE, MAKE, SAVE, MEDIA_DEVICE, BURN_ARTIST,
BURN_COMPOSER, BURN_ALBUM, BURN_CD, FETCH, INFO,
COMPILATION_SET, COMPILATION_UNSET, ORGANIZE, DELETE, TRASH,
FILE_MENU };
@ -1428,7 +1428,7 @@ CollectionView::rmbPressed( TQListViewItem* item, const TQPoint& point, int ) //
menu.insertItem( SmallIconSet( Amarok::icon( "files" ) ), i18n( "&Load" ), MAKE );
menu.insertItem( SmallIconSet( Amarok::icon( "add_playlist" ) ), i18n( "&Append to Playlist" ), APPEND );
menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), selection.count() == 1 ? i18n( "&Queue Track" )
: i18n( "&Queue Tracks" ), TQUEUE );
: i18n( "&Queue Tracks" ), QUEUE );
if( selection.count() > 1 || item->isExpandable() )
menu.insertItem( SmallIconSet( Amarok::icon( "save" ) ), i18n( "&Save as Playlist..." ), SAVE );
@ -1471,7 +1471,7 @@ CollectionView::rmbPressed( TQListViewItem* item, const TQPoint& point, int ) //
if( (cat == IdAlbum || cat == IdVisYearAlbum) && siblingSelection.count() == 1 ) // cover fetch isn't multiselection capable
{
menu.insertItem( SmallIconSet( Amarok::icon( "download" ) ), i18n( "&Fetch Cover From amazon.%1" ).tqarg( CoverManager::amazonTld() ), this, TQT_SLOT( fetchCover() ), 0, FETCH );
menu.insertItem( SmallIconSet( Amarok::icon( "download" ) ), i18n( "&Fetch Cover From amazon.%1" ).arg( CoverManager::amazonTld() ), this, TQT_SLOT( fetchCover() ), 0, FETCH );
#ifndef AMAZON_SUPPORT
menu.setItemEnabled( FETCH, false );
#endif
@ -1504,7 +1504,7 @@ CollectionView::rmbPressed( TQListViewItem* item, const TQPoint& point, int ) //
case SAVE:
playlistFromURLs( selection );
break;
case TQUEUE:
case QUEUE:
Playlist::instance()->insertMedia( selection, Playlist::Queue );
break;
case MEDIA_DEVICE:
@ -1698,7 +1698,7 @@ CollectionView::fetchCover() //SLOT
"SELECT DISTINCT artist.name FROM artist, album, tags "
"WHERE artist.id = tags.artist AND tags.album = album.id "
"AND album.name = '%1';" )
.tqarg( CollectionDB::instance()->escapeString( album ) ) );
.arg( CollectionDB::instance()->escapeString( album ) ) );
if ( !values.isEmpty() )
CollectionDB::instance()->fetchCover( this, values[0], album, false, static_cast<TQListViewItem*>(item) );
@ -2220,7 +2220,7 @@ KURL::List
CollectionView::listSelected()
{
//Here we determine the URLs of all selected items. We use two passes, one for the parent items,
//and another one for the tqchildren.
//and another one for the children.
KURL::List list;
TQListViewItem* item;
@ -2266,7 +2266,7 @@ CollectionView::listSelected()
// The iPod selection code is written to resemble the tree mode
// selection logic, as well as what happens on an actual iPod. If
// we're in track mode, just return the list of tracks selected.
// Otherwise select all tqchildren of all currently selected items,
// Otherwise select all children of all currently selected items,
// sorting first by m_cat1, then m_cat2, then m_cat3. Sort by
// track first if one of the categories is Id(VisYear)Album.
// There is a difficulty with compilation albums -- if we're
@ -2335,7 +2335,7 @@ CollectionView::listSelected()
buildIpodQuery( qb, trackDepth(), filters, filterYear, true, true );
if ( translateTimeFilter( timeFilter() ) > 0 )
qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::tqcurrentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::currentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
qb.setOptions( QueryBuilder::optOnlyCompilations );
qb.setGoogleFilter( tables | QueryBuilder::tabSong, m_filter );
@ -2350,7 +2350,7 @@ CollectionView::listSelected()
buildIpodQuery( qb, trackDepth(), filters, filterYear, true, false );
if ( translateTimeFilter( timeFilter() ) > 0 )
qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::tqcurrentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::currentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
if( sortByTrackFirst )
qb.setOptions( QueryBuilder::optNoCompilations );
@ -2385,7 +2385,7 @@ CollectionView::listSelected()
const bool sampler = static_cast<CollectionItem*>( item )->isSampler();
qb.clear();
if ( translateTimeFilter( timeFilter() ) > 0 )
qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::tqcurrentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::currentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
qb.addReturnValue( QueryBuilder::tabSong, QueryBuilder::valURL );
@ -2461,7 +2461,7 @@ CollectionView::listSelected()
const bool sampler = static_cast<CollectionItem*>( item )->isSampler();
qb.clear();
if ( translateTimeFilter( timeFilter() ) > 0 )
qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::tqcurrentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::currentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
qb.addReturnValue( QueryBuilder::tabSong, QueryBuilder::valURL );
@ -2565,7 +2565,7 @@ CollectionView::listSelected()
const bool sampler = static_cast<CollectionItem*>( item )->isSampler();
qb.clear();
if ( translateTimeFilter( timeFilter() ) > 0 )
qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::tqcurrentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::currentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
qb.addReturnValue( QueryBuilder::tabSong, QueryBuilder::valURL );
@ -2693,7 +2693,7 @@ CollectionView::playlistFromURLs( const KURL::List &urls )
KURL rpath;
MountPointManager::instance()->getRelativePath( deviceid, *it, rpath );
const TQString query = TQString("SELECT title, length FROM tags WHERE url = '%1' AND deviceid = %2;")
.tqarg( db->escapeString( rpath.path() ) ).tqarg( deviceid );
.arg( db->escapeString( rpath.path() ) ).arg( deviceid );
debug() << "media id: " << deviceid << " rpath: " << rpath.path() << endl;
TQStringList result = db->query( query );
titles << result[0];
@ -3483,7 +3483,7 @@ CollectionView::manipulateThe( TQString &str, bool reverse )
if( reverse )
{
TQString begin = str.left( 3 );
str = TQString(str.append( ", %1" )).tqarg( begin );
str = TQString(str.append( ", %1" )).arg( begin );
str = str.mid( 4 );
return;
}
@ -3492,7 +3492,7 @@ CollectionView::manipulateThe( TQString &str, bool reverse )
return;
TQString end = str.right( 3 );
str = TQString(str.prepend( "%1 " )).tqarg( end );
str = TQString(str.prepend( "%1 " )).arg( end );
uint newLen = str.length() - end.length() - 2;
@ -3502,7 +3502,7 @@ CollectionView::manipulateThe( TQString &str, bool reverse )
bool
CollectionView::endsInThe( const TQString & text )
{
return text.tqendsWith( ", the", false );
return text.endsWith( ", the", false );
}
// avoid code duplication
@ -3539,9 +3539,9 @@ CollectionView::viewportPaintEvent( TQPaintEvent *e )
const uint w = t.width() + 20;
const uint h = t.height() + 20;
p.setBrush( tqcolorGroup().background() );
p.setBrush( colorGroup().background() );
p.drawRoundRect( 15, 15, w, h, (8*200)/w, (8*200)/h );
t.draw( &p, 20, 20, TQRect(), tqcolorGroup() );
t.draw( &p, 20, 20, TQRect(), colorGroup() );
}
}
@ -3710,7 +3710,7 @@ CollectionView::renderFlatModeView( bool /*=false*/ )
QueryBuilder qb;
if ( translateTimeFilter( timeFilter() ) > 0 )
qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::tqcurrentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::currentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
if ( translateTimeFilter( timeFilter() ) <= 0
&& (m_filter.length() < 3 || (!m_filter.contains( " " ) && m_filter.endsWith( ":" ) ) ) )
@ -3883,7 +3883,7 @@ CollectionView::renderTreeModeView( bool /*=false*/ )
QueryBuilder qb;
if ( translateTimeFilter( timeFilter() ) > 0 )
qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::tqcurrentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::currentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
setSorting( 0 );
int VisYearAlbum = -1;
@ -3985,7 +3985,7 @@ CollectionView::renderTreeModeView( bool /*=false*/ )
//Dividers for "The Who" should be created as "W", not "T", because
//that's how we sort it
TQString actualStr = *it;
if ( m_cat1 == IdArtist && actualStr.tqstartsWith( "the ", false ) )
if ( m_cat1 == IdArtist && actualStr.startsWith( "the ", false ) )
manipulateThe( actualStr, true );
TQString headerStr = DividerItem::createGroup( actualStr, m_cat1);
@ -4020,7 +4020,7 @@ CollectionView::renderTreeModeView( bool /*=false*/ )
qb.clear();
if ( translateTimeFilter( timeFilter() ) > 0 )
qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate,
TQString().setNum( TQDateTime::tqcurrentDateTime().toTime_t() -
TQString().setNum( TQDateTime::currentDateTime().toTime_t() -
translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
qb.addReturnValue( q_cat1, QueryBuilder::valName, true );
@ -4061,7 +4061,7 @@ CollectionView::renderTreeModeView( bool /*=false*/ )
continue;
couldOpen.push_back( top );
}
//Expand suggested items and expand or enqueue their tqchildren until we run out of
//Expand suggested items and expand or enqueue their children until we run out of
//rows or have expanded everything
for ( TQValueList<TQListViewItem*>::iterator it = couldOpen.begin(); it != couldOpen.end() && totalCount < maxRows; ++it )
{
@ -4080,7 +4080,7 @@ CollectionView::renderTreeModeView( bool /*=false*/ )
}
else
{
//Prioritize expanding its tqchildren - add it immediately next
//Prioritize expanding its children - add it immediately next
TQValueList<TQListViewItem*>::iterator next = it;
++next;
couldOpen.insert( next, j );
@ -4131,9 +4131,9 @@ CollectionView::removeDuplicatedHeaders()
{
if ( empty )
{
if ( !current->text(0).tqat(0).isLetterOrNumber()
|| ( last->text(0).tqat(0).isLetterOrNumber()
&& current->text(0).tqat(0).tqunicode() > last->text(0).tqat(0).tqunicode() ) )
if ( !current->text(0).at(0).isLetterOrNumber()
|| ( last->text(0).at(0).isLetterOrNumber()
&& current->text(0).at(0).unicode() > last->text(0).at(0).unicode() ) )
toDelete += current;
else
{
@ -4174,7 +4174,7 @@ CollectionView::renderIpodModeView( bool /*=false*/ )
QueryBuilder qb;
if ( translateTimeFilter( timeFilter() ) > 0 )
qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::tqcurrentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
qb.addFilter( QueryBuilder::tabSong, QueryBuilder::valCreateDate, TQString().setNum( TQDateTime::currentDateTime().toTime_t() - translateTimeFilter( timeFilter() ) ), QueryBuilder::modeGreater );
int catArr[3] = {m_cat1, m_cat2, m_cat3};
// stillFiltering is true when we're not viewing tracks
@ -4300,7 +4300,7 @@ CollectionView::renderIpodModeView( bool /*=false*/ )
//because that's how we sort it
TQString actualStr = item->text( 0 );
if ( m_cat == IdArtist &&
actualStr.tqstartsWith( "the ", false ) )
actualStr.startsWith( "the ", false ) )
manipulateThe( actualStr, true );
TQString headerStr = DividerItem::createGroup( actualStr, m_cat );
@ -4366,7 +4366,7 @@ CollectionItem::paintCell ( TQPainter * painter, const TQColorGroup & cg,
TQPixmap buf( width, height() );
TQPainter p( &buf, true );
const TQColorGroup _cg = listView()->tqpalette().active();
const TQColorGroup _cg = listView()->palette().active();
TQColor bg = isSelected() ? _cg.highlight()
: isAlternate() ? listView()->alternateBackground()
@ -4510,9 +4510,9 @@ CollectionItem::compare( TQListViewItem* i, int col, bool ascending ) const
return -1;
//For artists, we sort by ignoring "The" eg "The Who" sorts as if it were "Who"
case IdArtist:
if ( a.tqstartsWith( "the ", false ) )
if ( a.startsWith( "the ", false ) )
CollectionView::manipulateThe( a, true );
if ( b.tqstartsWith( "the ", false ) )
if ( b.startsWith( "the ", false ) )
CollectionView::manipulateThe( b, true );
break;
}
@ -4698,7 +4698,7 @@ DividerItem::shareTheSameGroup(const TQString& itemStr, const TQString& divStr,
}
case IdArtist:
//"The Who" should count as being in "W" and not "T"
if ( tmp.tqstartsWith( "the ", false ) )
if ( tmp.startsWith( "the ", false ) )
CollectionView::manipulateThe( tmp, true );
//Fall through
default:
@ -4706,7 +4706,7 @@ DividerItem::shareTheSameGroup(const TQString& itemStr, const TQString& divStr,
if (divStr == "0-9" && TQChar(tmp.at(0)).isDigit()) {
inGroup = true;
}
else if (tmp.tqstartsWith(divStr, 0)) {
else if (tmp.startsWith(divStr, 0)) {
inGroup = true;
}
}

File diff suppressed because it is too large Load Diff

@ -257,13 +257,13 @@ class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver
inline bool boolFromSql( const TQString &b ) { return ( b == boolT() || b == "t" ); }
//textColumnType should be used for normal strings, which need to be compared
//either case-sensitively or -insensitively
TQString textColumnType( int length=255 ) const { if ( getDbConnectionType() == DbConnection::postgresql ) return "TEXT"; else return TQString("VARCHAR(%1)").tqarg(length); }
TQString textColumnType( int length=255 ) const { if ( getDbConnectionType() == DbConnection::postgresql ) return "TEXT"; else return TQString("VARCHAR(%1)").arg(length); }
//exactTextColumnType should be used for strings that must be stored exactly, such
//as URLs (necessary for holding control chars etc. if present in URL), except for
//trailing spaces. Comparisions should always be done case-sensitively.
//As we create indices on these columns, we have to restrict them to
//<= 255 chars for mysql < 5.0.3
TQString exactTextColumnType( int length=1024 ) const { if ( getDbConnectionType() == DbConnection::mysql ) return TQString( "VARBINARY(%1)" ).tqarg( length>255 ? 255 : length ); else return textColumnType( length ); }
TQString exactTextColumnType( int length=1024 ) const { if ( getDbConnectionType() == DbConnection::mysql ) return TQString( "VARBINARY(%1)" ).arg( length>255 ? 255 : length ); else return textColumnType( length ); }
// We might consider using LONGTEXT type, as some lyrics could be VERY long..???
TQString longTextColumnType() const { if ( getDbConnectionType() == DbConnection::postgresql ) return "TEXT"; else return "TEXT"; }
TQString randomFunc() const { if ( getDbConnectionType() == DbConnection::postgresql ) return "random()"; else return "RAND()"; }

@ -15,6 +15,7 @@ include_directories(
${CMAKE_SOURCE_DIR}/amarok/src
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
${TAGLIB_INCLUDE_DIRS}
)
link_directories(

@ -177,8 +177,9 @@ CollectionScanner::readDir( const TQString& dir, TQStringList& entries )
static DCOPRef dcopRef( "amarok", "collection" );
// linux specific, but this fits the 90% rule
if( dir.startsWith( "/dev" ) || dir.startsWith( "/sys" ) || dir.startsWith( "/proc" ) )
if( dir.startsWith( "/dev" ) || dir.startsWith( "/sys" ) || dir.startsWith( "/proc" ) ) {
return;
}
const TQCString dir8Bit = TQFile::encodeName( dir );
DIR *d = opendir( dir8Bit );
@ -213,7 +214,9 @@ CollectionScanner::readDir( const TQString& dir, TQStringList& entries )
f = i; break;
}
#else
f = m_processedDirs.find( de );
if (m_processedDirs.count() > 0) {
f = m_processedDirs.find( de );
}
#endif
if ( ! S_ISDIR( statBuf.st_mode ) || f != -1 ) {

@ -153,23 +153,23 @@ AmarokConfigDialog::AmarokConfigDialog( TQWidget *parent, const char* name, KCon
TQVBox *topbox = new TQVBox( opt9 );
topbox->setSpacing( KDialog::spacingHint() );
TQGroupBox *mediaBox = new TQGroupBox( 2, Qt::Horizontal, i18n("Media Devices"), topbox );
mediaBox->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum );
mediaBox->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum );
TQVBox *vbox = new TQVBox( mediaBox );
vbox->setSpacing( KDialog::spacingHint() );
m_deviceManager = new MediumPluginManager( vbox );
TQHBox *hbox = new TQHBox( topbox );
hbox->setSpacing( KDialog::spacingHint() );
hbox->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum );
hbox->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum );
KPushButton *autodetect = new KPushButton( i18n( "Autodetect Devices" ), hbox );
autodetect->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
autodetect->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
connect( autodetect, TQT_SIGNAL(clicked()), m_deviceManager, TQT_SLOT(redetectDevices()) );
KPushButton *add = new KPushButton( i18n( "Add Device..." ), hbox );
add->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
add->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
connect( add, TQT_SIGNAL(clicked()), m_deviceManager, TQT_SLOT(newDevice()) );
TQFrame *frame = new TQFrame( topbox );
frame->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
frame->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
// add pages
addPage( m_opt1, i18n( "General" ), Amarok::icon( "settings_general" ), i18n( "Configure General Options" ) );
@ -264,7 +264,7 @@ void AmarokConfigDialog::updateSettings()
{
#ifdef TQ_WS_X11
OSDPreviewWidget *osd = static_cast<OSDPreviewWidget*>( TQT_TQWIDGET(child( "osdpreview" )) );
AmarokConfig::setOsdAlignment( osd->tqalignment() );
AmarokConfig::setOsdAlignment( osd->alignment() );
AmarokConfig::setOsdYOffset( osd->y() );
Amarok::OSD::instance()->applySettings();
#endif
@ -357,8 +357,8 @@ bool AmarokConfigDialog::hasChanged()
return m_soundSystem->currentText() != m_pluginAmarokName[AmarokConfig::soundSystem()] ||
#ifdef TQ_WS_X11
osd->tqalignment() != AmarokConfig::osdAlignment() ||
osd->tqalignment() != OSDWidget::Center && osd->y() != AmarokConfig::osdYOffset() ||
osd->alignment() != AmarokConfig::osdAlignment() ||
osd->alignment() != OSDWidget::Center && osd->y() != AmarokConfig::osdYOffset() ||
#endif
m_opt2->styleComboBox->currentText() != AmarokConfig::contextBrowserStyleSheet() ||
Amarok::databaseTypeCode( m_opt7->dbSetupFrame->databaseEngine->currentText() ) != AmarokConfig::databaseEngine().toInt() ||
@ -385,7 +385,7 @@ bool AmarokConfigDialog::isDefault()
void AmarokConfigDialog::aboutEngine() //SLOT
{
PluginManager::showAbout( TQString( "Name == '%1'" ).tqarg( m_soundSystem->currentText() ) );
PluginManager::showAbout( TQString( "Name == '%1'" ).arg( m_soundSystem->currentText() ) );
}
@ -407,7 +407,7 @@ void AmarokConfigDialog::soundSystemChanged()
m_engineConfig = EngineController::engine()->configure();
m_engineConfig->view()->reparent( m_engineConfigFrame, TQPoint() );
m_engineConfig->view()->show();
m_engineConfigFrame->setTitle( i18n( "to change settings", "Configure %1" ).tqarg( m_soundSystem->currentText() ) );
m_engineConfigFrame->setTitle( i18n( "to change settings", "Configure %1" ).arg( m_soundSystem->currentText() ) );
m_engineConfigFrame->show();
connect( m_engineConfig, TQT_SIGNAL(viewChanged()), TQT_SLOT(updateButtons()) );

@ -91,13 +91,13 @@ namespace Amarok
TQString verboseTimeSince( const TQDateTime &datetime )
{
const TQDateTime now = TQDateTime::tqcurrentDateTime();
const TQDateTime now = TQDateTime::currentDateTime();
const int datediff = datetime.daysTo( now );
if( datediff >= 6*7 /*six weeks*/ ) { // return absolute month/year
const KCalendarSystem *cal = KGlobal::locale()->calendar();
const TQDate date = datetime.date();
return i18n( "monthname year", "%1 %2" ).tqarg( cal->monthName(date), cal->yearString(date, false) );
return i18n( "monthname year", "%1 %2" ).arg( cal->monthName(date), cal->yearString(date, false) );
}
//TODO "last week" = maybe within 7 days, but prolly before last sunday
@ -175,7 +175,7 @@ static
TQString albumImageTooltip( const TQString &albumImage, int size )
{
if ( albumImage == CollectionDB::instance()->notAvailCover( false, size ) )
return escapeHTMLAttr( i18n( "Click to fetch cover from amazon.%1, right-click for menu." ).tqarg( CoverManager::amazonTld() ) );
return escapeHTMLAttr( i18n( "Click to fetch cover from amazon.%1, right-click for menu." ).arg( CoverManager::amazonTld() ) );
return escapeHTMLAttr( i18n( "Click for information from Amazon, right-click for menu." ) );
}
@ -361,7 +361,7 @@ ContextBrowser::ContextBrowser( const char *name )
this, TQT_SLOT( tagsChanged( const TQString&, const TQString& ) ) );
connect( CollectionDB::instance(), TQT_SIGNAL( ratingChanged( const TQString&, int ) ),
this, TQT_SLOT( ratingOrScoreOrLabelsChanged( const TQString& ) ) );
connect( StarManager::instance(), TQT_SIGNAL( ratingsColorsChanged() ),
connect( StarManager::instance(), TQT_SIGNAL( ratingsColorsChanged( const TQString& ) ),
this, TQT_SLOT( ratingOrScoreOrLabelsChanged( const TQString& ) ) );
connect( CollectionDB::instance(), TQT_SIGNAL( scoreChanged( const TQString&, float ) ),
this, TQT_SLOT( ratingOrScoreOrLabelsChanged( const TQString& ) ) );
@ -497,7 +497,7 @@ void ContextBrowser::openURLRequest( const KURL &url )
else if ( url.protocol() == "musicbrainz" )
{
const TQString url = "http://www.musicbrainz.org/taglookup.html?artist=%1&album=%2&track=%3";
Amarok::invokeBrowser( url.tqarg( KURL::encode_string_no_slash( artist, 106 /*utf-8*/ ),
Amarok::invokeBrowser( url.arg( KURL::encode_string_no_slash( artist, 106 /*utf-8*/ ),
KURL::encode_string_no_slash( album, 106 /*utf-8*/ ),
KURL::encode_string_no_slash( track, 106 /*utf-8*/ ) ) );
}
@ -547,7 +547,7 @@ void ContextBrowser::openURLRequest( const KURL &url )
else if( url.protocol() == "ggartist" )
{
const TQString url2 = TQString( "http://www.google.com/musicsearch?q=%1&res=artist" )
.tqarg( KURL::encode_string_no_slash( unescapeHTMLAttr( url.path() ).replace( " ", "+" ), 106 /*utf-8*/ ) );
.arg( KURL::encode_string_no_slash( unescapeHTMLAttr( url.path() ).replace( " ", "+" ), 106 /*utf-8*/ ) );
Amarok::invokeBrowser( url2 );
}
@ -709,7 +709,7 @@ void ContextBrowser::engineNewMetaData( const MetaBundle& bundle, bool trackChan
{
line = stream.readLine().simplifyWhiteSpace();
if( line.tqstartsWith( "file", false ) )
if( line.startsWith( "file", false ) )
{
line = line.mid( 5 ).remove( '"' );
@ -802,7 +802,7 @@ void ContextBrowser::saveHtmlData()
.replace( "<html>",
TQString( "<html><head><style type=\"text/css\">"
"%1</style></head>" )
.tqarg( HTMLView::loadStyleSheet() ) ); // and the
.arg( HTMLView::loadStyleSheet() ) ); // and the
// stylesheet
// code
exportedDocument.close();
@ -829,7 +829,7 @@ void ContextBrowser::reloadStyleSheet()
//////////////////////////////////////////////////////////////////////////////////////////
//parts of this function from ktabwidget.cpp, copyright (C) 2003 Zack Rusin and Stephan Binner
//fucking setCurrentTab() isn't virtual so we have to override this instead =(
//setCurrentTab() isn't virtual so we have to override this instead =(
void ContextBrowser::wheelDelta( int delta )
{
if ( count() < 2 || delta == 0 )
@ -1243,7 +1243,7 @@ void ContextBrowser::showCurrentTrack() //SLOT
debug() << "current browser is not context, aborting showCurrentTrack()" << endl;
m_dirtyCurrentTrackPage = true;
m_currentTrackPage->set( TQString( "<html><body><div class='box-body'>%1</div></body></html>" )
.tqarg( i18n( "Updating..." ) ) );
.arg( i18n( "Updating..." ) ) );
return;
}
#endif
@ -1492,7 +1492,7 @@ CurrentTrackJob::constructHTMLAlbums( const TQStringList &reqResult, TQString &h
<< albumValues[6]
<< reqResult[ i + 1 ] //album.id
<< escapeHTMLAttr( discNumber )
<< i18n( "Disc %1" ).tqarg( discNumber ) ) );
<< i18n( "Disc %1" ).arg( discNumber ) ) );
}
TQString track = albumValues[j + 2].stripWhiteSpace();
if( track.length() > 0 )
@ -1576,7 +1576,7 @@ CurrentTrackJob::showHomeByAlbums()
date = ep.dateTime().toString();
TQString image = CollectionDB::instance()->podcastImage( pcb.imageURL().url(), true, 50 );
TQString imageAttr = escapeHTMLAttr( i18n( "Click to go to podcast website: %1." ).tqarg( pcb.link().prettyURL() ) );
TQString imageAttr = escapeHTMLAttr( i18n( "Click to go to podcast website: %1." ).arg( pcb.link().prettyURL() ) );
m_HTMLSource.append( QStringx (
"<tr class='" + TQString( (i % 2) ? "box-row-alt" : "box-row" ) + "'>\n"
@ -1615,7 +1615,7 @@ CurrentTrackJob::showHomeByAlbums()
)
);
m_HTMLSource.append( QStringx ( "<p>%1</p>\n" ).tqarg( ep.description() ) );
m_HTMLSource.append( QStringx ( "<p>%1</p>\n" ).arg( ep.description() ) );
m_HTMLSource.append(
"</div>\n"
@ -1929,7 +1929,7 @@ void CurrentTrackJob::addMetaHistory()
for ( uint i = 0; i < m_metadataHistory.count(); ++i )
{
const TQString &str = m_metadataHistory[i];
m_HTMLSource.append( QStringx( "<tr class='box-row'><td>%1</td></tr>\n" ).tqarg( str ) );
m_HTMLSource.append( QStringx( "<tr class='box-row'><td>%1</td></tr>\n" ).arg( str ) );
}
m_HTMLSource.append(
@ -1959,7 +1959,7 @@ void CurrentTrackJob::showPodcast( const MetaBundle &currentTrack )
image = CollectionDB::instance()->notAvailCover( true );
TQString imageAttr = escapeHTMLAttr( pcb.link().isValid()
? i18n( "Click to go to podcast website: %1." ).tqarg( pcb.link().prettyURL() )
? i18n( "Click to go to podcast website: %1." ).arg( pcb.link().prettyURL() )
: i18n( "No podcast website." )
);
@ -1994,7 +1994,7 @@ void CurrentTrackJob::showPodcast( const MetaBundle &currentTrack )
<< imageAttr
<< escapeHTML( peb.author().isEmpty()
? i18n( "Podcast" )
: i18n( "Podcast by %1" ).tqarg( peb.author() ) )
: i18n( "Podcast by %1" ).arg( peb.author() ) )
<< ( peb.localUrl().isValid()
? "<br />\n" + escapeHTML( i18n( "(Cached)" ) )
: "" )
@ -2011,7 +2011,7 @@ void CurrentTrackJob::showPodcast( const MetaBundle &currentTrack )
for ( uint i = 0; i < m_metadataHistory.count(); ++i )
{
const TQString &str = m_metadataHistory[i];
m_HTMLSource.append( QStringx( "<tr class='box-row'><td>%1</td></tr>\n" ).tqarg( str ) );
m_HTMLSource.append( QStringx( "<tr class='box-row'><td>%1</td></tr>\n" ).arg( str ) );
}
m_HTMLSource.append(
@ -2024,7 +2024,7 @@ void CurrentTrackJob::showPodcast( const MetaBundle &currentTrack )
"<div id='albums_box-header' class='box-header'>\n"
"<span id='albums_box-header-title' class='box-header-title'>\n"
+ ( channelInDB
? i18n( "Episodes from %1" ).tqarg( escapeHTML( pcb.title() ) )
? i18n( "Episodes from %1" ).arg( escapeHTML( pcb.title() ) )
: i18n( "Episodes from this Channel" )
)
+ "</span>\n"
@ -2072,7 +2072,7 @@ void CurrentTrackJob::showPodcast( const MetaBundle &currentTrack )
)
);
m_HTMLSource.append( QStringx ( "<p>%1</p>\n" ).tqarg( ep.description() ) );
m_HTMLSource.append( QStringx ( "<p>%1</p>\n" ).arg( ep.description() ) );
m_HTMLSource.append(
"</div>\n"
@ -2106,9 +2106,9 @@ void CurrentTrackJob::showBrowseArtistHeader( const TQString &artist )
"<td><div id='current_box-header-nav' class='box-header-nav'>%3</div></td>\n"
"</tr></table>\n"
"</div>\n" )
.tqarg( escapeHTML( artist ) )
.tqarg( escapeHTML( i18n( "Browse Artist" ) ) )
.tqarg( back ) );
.arg( escapeHTML( artist ) )
.arg( escapeHTML( i18n( "Browse Artist" ) ) )
.arg( back ) );
m_HTMLSource.append(
"<table id='current_box-table' class='box-body' width='100%' cellpadding='0' cellspacing='0'>\n"
);
@ -2126,16 +2126,16 @@ void CurrentTrackJob::showBrowseArtistHeader( const TQString &artist )
m_HTMLSource.append(
"<tr>\n"
"<td id='artist-wikipedia'>\n"
+ TQString( "<a id='artist-wikipedia-a' href='wikipedia:%1'>\n" ).tqarg( escapeHTMLAttr( artist + b->wikiArtistPostfix() ) )
+ i18n( "Wikipedia Information for %1" ).tqarg( escapeHTML( artist ) ) +
+ TQString( "<a id='artist-wikipedia-a' href='wikipedia:%1'>\n" ).arg( escapeHTMLAttr( artist + b->wikiArtistPostfix() ) )
+ i18n( "Wikipedia Information for %1" ).arg( escapeHTML( artist ) ) +
"</a>\n"
"</td>\n"
"</tr>\n");
m_HTMLSource.append(
"<tr>\n"
"<td id='artist-google'>\n"
+ TQString( "<a id='artist-google-a' href='ggartist:%1'>\n" ).tqarg( escapeHTMLAttr( artist ) )
+ i18n( "Google Musicsearch for %1" ).tqarg( escapeHTML( artist ) ) +
+ TQString( "<a id='artist-google-a' href='ggartist:%1'>\n" ).arg( escapeHTMLAttr( artist ) )
+ i18n( "Google Musicsearch for %1" ).arg( escapeHTML( artist ) ) +
"</a>\n"
"</td>\n"
"</tr>\n"
@ -2170,9 +2170,9 @@ CurrentTrackJob::showBrowseLabelHeader( const TQString &label )
"<td><div id='current_box-header-nav' class='box-header-nav'>%3</div></td>\n"
"</tr></table>\n"
"</div>\n" )
.tqarg( escapeHTML( label ) )
.tqarg( escapeHTML( i18n( "Browse Label" ) ) )
.tqarg( back ) );
.arg( escapeHTML( label ) )
.arg( escapeHTML( i18n( "Browse Label" ) ) )
.arg( back ) );
m_HTMLSource.append(
"<table id='current_box-table' class='box-body' width='100%' cellpadding='0' cellspacing='0'>\n"
);
@ -2190,8 +2190,8 @@ CurrentTrackJob::showBrowseLabelHeader( const TQString &label )
m_HTMLSource.append(
"<tr>\n"
"<td id='label-lastfm'>\n"
+ TQString( "<a id='label-lastfm-a' href='externalurl://www.last.fm/tag/%1'>\n" ).tqarg( escapeHTMLAttr( label ) )
+ i18n( "Last.fm Information for %1" ).tqarg( escapeHTML( label ) ) +
+ TQString( "<a id='label-lastfm-a' href='externalurl://www.last.fm/tag/%1'>\n" ).arg( escapeHTMLAttr( label ) )
+ i18n( "Last.fm Information for %1" ).arg( escapeHTML( label ) ) +
"</a>\n"
"</td>\n"
"</tr>\n");
@ -2281,11 +2281,11 @@ void CurrentTrackJob::showCurrentArtistHeader( const MetaBundle &currentTrack )
"</td>\n"
"<td id='current_box-information-td' align='right'>\n"
)
.tqarg( escapeHTML( currentTrack.prettyTitle() ) )
.tqarg( escapeHTMLAttr( currentTrack.artist() ) )
.tqarg( escapeHTMLAttr( currentTrack.album() ) )
.tqarg( escapeHTMLAttr( albumImage ) )
.tqarg( albumImageTitleAttr )
.arg( escapeHTML( currentTrack.prettyTitle() ) )
.arg( escapeHTMLAttr( currentTrack.artist() ) )
.arg( escapeHTMLAttr( currentTrack.album() ) )
.arg( escapeHTMLAttr( albumImage ) )
.arg( albumImageTitleAttr )
) );
if ( !values.isEmpty() && values[2].toInt() )
@ -2299,18 +2299,18 @@ void CurrentTrackJob::showCurrentArtistHeader( const MetaBundle &currentTrack )
const uint score = static_cast<uint>( values[3].toFloat() );
const uint rating = values[4].toInt();
//SAFE = .tqarg( x, y )
//UNSAFE = .tqarg( x ).tqarg( y )
//SAFE = .arg( x, y )
//UNSAFE = .arg( x ).arg( y )
m_HTMLSource.append( TQString(
"<span>%1</span><br />\n"
"<div>%2</div>\n"
"<span>%3</span><br />\n"
"<span>%4</span>\n"
)
.tqarg( i18n( "Track played once", "Track played %n times", playtimes ),
.arg( i18n( "Track played once", "Track played %n times", playtimes ),
statsHTML( score, rating, false ),
i18n( "Last played: %1" ).tqarg( Amarok::verboseTimeSince( lastPlay ) ),
i18n( "First played: %1" ).tqarg( Amarok::verboseTimeSince( firstPlay ) ) ) );
i18n( "Last played: %1" ).arg( Amarok::verboseTimeSince( lastPlay ) ),
i18n( "First played: %1" ).arg( Amarok::verboseTimeSince( firstPlay ) ) ) );
}
else
m_HTMLSource.append( i18n( "Never played before" ) );
@ -2391,7 +2391,7 @@ void CurrentTrackJob::showRelatedArtists( const TQString &artist, const TQString
"<span id='related_box-header-title' class='box-header-title'>%1</span>\n"
"</div>\n"
"<table class='box-body' id='T_RA' width='100%' border='0' cellspacing='0' cellpadding='1'>\n" )
.tqarg( i18n( "Artists Related to %1" ).tqarg( escapeHTML( artist ) ) ) );
.arg( i18n( "Artists Related to %1" ).arg( escapeHTML( artist ) ) ) );
m_HTMLSource.append( "<tr><td>\n" );
for ( uint i = 0; i < relArtists.count(); i += 1 )
{
@ -2492,7 +2492,7 @@ CurrentTrackJob::showSongsWithLabel( const TQString &label )
"<div id='suggested_box' class='box'>\n"
"<div id='suggested_box-header' class='box-header' onClick=\"toggleBlock('T_SS'); window.location.href='togglebox:ss';\" style='cursor: pointer;'>\n"
"<span id='suggested_box-header-title' class='box-header-title'>\n"
+ i18n( "Songs with label %1" ).tqarg( label ) +
+ i18n( "Songs with label %1" ).arg( label ) +
"</span>\n"
"</div>\n"
"<table class='box-body' id='T_' width='100%' border='0' cellspacing='0' cellpadding='0'>\n" );
@ -2540,7 +2540,7 @@ CurrentTrackJob::showUserLabels( const MetaBundle &currentTrack )
"<div id='songlabels_box' class='box'>\n"
"<div id='songlabels-header' class='box-header' onCLick=\"toggleBlock('T_SL');window.location.href='togglebox:sl';\" style='cursor: pointer;'>\n"
"<span id='songlabels_box-header-title' class='box-header-title'>\n"
+ i18n( " Labels for %1 " ).tqarg( escapeHTML( title ) ) +
+ i18n( " Labels for %1 " ).arg( escapeHTML( title ) ) +
"</span>\n"
"</div>\n"
"<table class='box-body' id='T_SL' width='100%' border='0' cellspacing='0' cellpadding='1'>\n" );
@ -2555,7 +2555,7 @@ CurrentTrackJob::showUserLabels( const MetaBundle &currentTrack )
}
}
m_HTMLSource.append( "</td></tr>\n" );
m_HTMLSource.append( "<tr><td><a id='songlabels_box_addlabel' href='show:editLabels'>" + i18n( "Add labels to %1" ).tqarg( escapeHTML( title ) ) + "</a></td></tr>\n" );
m_HTMLSource.append( "<tr><td><a id='songlabels_box_addlabel' href='show:editLabels'>" + i18n( "Add labels to %1" ).arg( escapeHTML( title ) ) + "</a></td></tr>\n" );
m_HTMLSource.append(
"</table>\n"
"</div>\n" );
@ -2588,7 +2588,7 @@ void CurrentTrackJob::showArtistsFaves( const TQString &artist, uint artist_id )
"<div id='favoritesby_box' class='box'>\n"
"<div id='favoritesby-header' class='box-header' onClick=\"toggleBlock('T_FT'); window.location.href='togglebox:ft';\" style='cursor: pointer;'>\n"
"<span id='favoritesby_box-header-title' class='box-header-title'>\n"
+ i18n( "Favorite Tracks by %1" ).tqarg( artistName ) +
+ i18n( "Favorite Tracks by %1" ).arg( artistName ) +
"</span>\n"
"</div>\n"
"<table class='box-body' id='T_FT' width='100%' border='0' cellspacing='0' cellpadding='0'>\n" );
@ -2642,7 +2642,7 @@ void CurrentTrackJob::showArtistsAlbums( const TQString &artist, uint artist_id,
"<div id='albums_box' class='box'>\n"
"<div id='albums_box-header' class='box-header'>\n"
"<span id='albums_box-header-title' class='box-header-title'>\n"
+ i18n( "Albums by %1" ).tqarg( artistName ) +
+ i18n( "Albums by %1" ).arg( artistName ) +
"</span>\n"
"</div>\n"
"<table id='albums_box-body' class='box-body' width='100%' border='0' cellspacing='0' cellpadding='0'>\n" );
@ -2744,7 +2744,7 @@ void CurrentTrackJob::showArtistsAlbums( const TQString &artist, uint artist_id,
<< TQString::number( artist_id )
<< values[ i + 1 ] //album.id
<< escapeHTMLAttr( discNumber )
<< i18n( "Disc %1" ).tqarg( discNumber ) ) );
<< i18n( "Disc %1" ).arg( discNumber ) ) );
}
TQString track = albumValues[j + 2].stripWhiteSpace();
if( track.length() > 0 ) {
@ -2806,7 +2806,7 @@ void CurrentTrackJob::showArtistsCompilations( const TQString &artist, uint arti
"<div id='albums_box' class='box'>\n"
"<div id='albums_box-header' class='box-header'>\n"
"<span id='albums_box-header-title' class='box-header-title'>\n"
+ i18n( "Compilations with %1" ).tqarg( artistName ) +
+ i18n( "Compilations with %1" ).arg( artistName ) +
"</span>\n"
"</div>\n"
"<table id='albums_box-body' class='box-body' width='100%' border='0' cellspacing='0' cellpadding='0'>\n" );
@ -2904,7 +2904,7 @@ void CurrentTrackJob::showArtistsCompilations( const TQString &artist, uint arti
.args( TQStringList()
<< values[ i + 1 ] //album.id
<< escapeHTMLAttr( discNumber )
<< i18n( "Disc %1" ).tqarg( discNumber ) ) );
<< i18n( "Disc %1" ).arg( discNumber ) ) );
}
TQString track = albumValues[j + 2].stripWhiteSpace();
@ -2921,7 +2921,7 @@ void CurrentTrackJob::showArtistsCompilations( const TQString &artist, uint arti
TQString tracktitle_formated;
TQString tracktitle;
tracktitle = escapeHTML( i18n("%1 - %2").tqarg( albumValues[j + 5], albumValues[j] ) );
tracktitle = escapeHTML( i18n("%1 - %2").arg( albumValues[j + 5], albumValues[j] ) );
tracktitle_formated = "<span class='album-song-title'>\n";
if( i==vectorPlace && albumValues[j + 2].toInt() == m_currentTrack.track() && discNumber.toInt() == m_currentTrack.discNumber() )
tracktitle_formated += "<i>\n";
@ -2966,11 +2966,11 @@ TQString CurrentTrackJob::statsHTML( int score, int rating, bool statsbox ) //st
rating = 10;
TQString table = TQString( "<table %1 align='right' border='0' cellspacing='0' cellpadding='0' width='100%'>%2</table>\n" )
.tqarg( statsbox ? "class='statsBox'" : "" );
.arg( statsbox ? "class='statsBox'" : "" );
TQString contents;
if( AmarokConfig::useScores() )
contents += TQString( "<tr title='%1'>\n" ).tqarg( i18n( "Score: %1" ).tqarg( score ) ) +
contents += TQString( "<tr title='%1'>\n" ).arg( i18n( "Score: %1" ).arg( score ) ) +
"<td class='sbtext' width='100%' align='right'>\n" + TQString::number( score ) + "</td>\n"
"<td align='left' width='1'>\n"
"<div class='sbouter'>\n"
@ -2982,8 +2982,8 @@ TQString CurrentTrackJob::statsHTML( int score, int rating, bool statsbox ) //st
if( AmarokConfig::useRatings() )
{
contents += TQString( "<tr title='%1'>\n" ).tqarg( i18n( "Rating: %1" )
.tqarg( MetaBundle::ratingDescription( rating ) ) ) +
contents += TQString( "<tr title='%1'>\n" ).arg( i18n( "Rating: %1" )
.arg( MetaBundle::ratingDescription( rating ) ) ) +
"<td class='ratingBox' align='right' colspan='2'>\n";
if( rating )
{
@ -3002,7 +3002,7 @@ TQString CurrentTrackJob::statsHTML( int score, int rating, bool statsbox ) //st
const TQString img = "<img src='%1' height='13px' class='ratingStar'></img>\n";
for( int i = 0, n = rating / 2; i < n; ++i )
contents += img.tqarg( TQString("data:image/png;base64," + fullStar) );
contents += img.arg( TQString("data:image/png;base64," + fullStar) );
if( rating % 2 )
{
TQImageIO halfStarIO;
@ -3014,7 +3014,7 @@ TQString CurrentTrackJob::statsHTML( int score, int rating, bool statsbox ) //st
halfStarIO.write();
halfStarBuf.close();
TQCString halfStar = KCodecs::base64Encode( halfStarBuf.buffer(), true );
contents += img.tqarg( TQString("data:image/png;base64," + halfStar) );
contents += img.arg( TQString("data:image/png;base64," + halfStar) );
}
contents += "</nobr>\n";
}
@ -3024,7 +3024,7 @@ TQString CurrentTrackJob::statsHTML( int score, int rating, bool statsbox ) //st
"</tr>\n";
}
return table.tqarg( contents );
return table.arg( contents );
}
bool CurrentTrackJob::doJob()
@ -3220,7 +3220,7 @@ ContextBrowser::getEncodedImage( const TQString &imageUrl )
tqApp->lock();
img.save( &buffer, "PNG" ); // writes image into ba in PNG format
tqApp->unlock();
const TQString coverImage = TQString( "data:image/png;base64,%1" ).tqarg( KCodecs::base64Encode( ba ).data() );
const TQString coverImage = TQString( "data:image/png;base64,%1" ).arg( KCodecs::base64Encode( ba ).data() );
//debug() << "Encoded imageUrl: " << coverImage << endl;
return coverImage;
}
@ -3282,7 +3282,7 @@ void ContextBrowser::showLyrics( const TQString &url )
}
m_lyricSearchUrl = TQString( "http://www.google.com/search?ie=UTF-8&q=lyrics+%1+%2" )
.tqarg( KURL::encode_string_no_slash( '"' + artist + '"', 106 /*utf-8*/ ),
.arg( KURL::encode_string_no_slash( '"' + artist + '"', 106 /*utf-8*/ ),
KURL::encode_string_no_slash( '"' + title + '"', 106 /*utf-8*/ ) );
m_lyricsToolBar->getButton( LYRICS_BROWSER )->setEnabled(false);
@ -3294,7 +3294,7 @@ void ContextBrowser::showLyrics( const TQString &url )
"<br /><div class='info'>\n"+
i18n( "Available Lyrics Scripts:" ) + "<br />\n";
foreach ( scripts ) {
lyrics += TQString( "<a href=\"runscript:%1\">%2</a><br />\n" ).tqarg( *it, *it );
lyrics += TQString( "<a href=\"runscript:%1\">%2</a><br />\n" ).arg( *it, *it );
}
lyrics += "<br />\n" + i18n( "Click on one of the scripts to run it, or use the Script Manager, to be able"
" to see all the scripts, and download new ones from the Web." );
@ -3425,12 +3425,12 @@ ContextBrowser::lyricsResult( TQCString cXmlDoc, bool cached ) //SLOT
const TQString artist = l.item( i ).toElement().attribute( "artist" );
const TQString title = l.item( i ).toElement().attribute( "title" );
lyrics += "<a href='show:suggestLyric-" + url + "'>\n" + i18n("%1 - %2").tqarg( artist, title );
lyrics += "<a href='show:suggestLyric-" + url + "'>\n" + i18n("%1 - %2").arg( artist, title );
lyrics += "</a><br/>\n";
}
}
lyrics += i18n( "<p>You can <a href=\"%1\">search for the lyrics</a> on the Web.</p>" )
.tqarg( TQString( m_lyricSearchUrl ).replace( TQRegExp( "^http:" ), "externalurl:" ) );
.arg( TQString( m_lyricSearchUrl ).replace( TQRegExp( "^http:" ), "externalurl:" ) );
}
else {
lyrics = el.text();
@ -3444,7 +3444,7 @@ ContextBrowser::lyricsResult( TQCString cXmlDoc, bool cached ) //SLOT
lyrics.prepend( "<font size='2'><b>\n" + title + "</b><br/><u>\n" + artist+ "</font></u></font><br/>\n" );
if( !cached ) {
lyrics.append( "<br/><br/><i>\n" + i18n( "Powered by %1 (%2)" ).tqarg( site, site_url ) + "</i>\n" );
lyrics.append( "<br/><br/><i>\n" + i18n( "Powered by %1 (%2)" ).arg( site, site_url ) + "</i>\n" );
CollectionDB::instance()->setLyrics( EngineController::instance()->bundle().url().path(), xmldoc, EngineController::instance()->bundle().uniqueId() );
}
}
@ -3742,7 +3742,7 @@ ContextBrowser::wikiURL( const TQString &item )
// add any special characters to be replaced here
TQString wStr = TQString(item).replace( "/", " " );
return TQString( "http://%1.wikipedia.org/wiki/" ).tqarg( wikiLocale() )
return TQString( "http://%1.wikipedia.org/wiki/" ).arg( wikiLocale() )
+ KURL::encode_string_no_slash( wStr, 106 /*utf-8*/ );
}
@ -3783,7 +3783,7 @@ ContextBrowser::showLabelsDialog()
m_labelListView = new TQListView( dialog->mainWidget() );
m_labelListView->addColumn( i18n( "Label" ) );
m_labelListView->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
m_labelListView->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
m_labelListView->setColumnWidthMode( 0, TQListView::Maximum );
foreach( allLabels )
@ -3815,7 +3815,7 @@ ContextBrowser::showLabelsDialog()
showCurrentTrack();
}
}
delete dialog; //deletes tqchildren
delete dialog; //deletes children
m_addLabelEdit = 0;
m_labelListView = 0;
}
@ -4352,11 +4352,12 @@ void ContextBrowser::ratingOrScoreOrLabelsChanged( const TQString &path ) //SLOT
//have their ratings changed in the playlist won't be reflected until the context browser refreshes
//which can be confusing, and looks less polished/professional
//This can be changed if it slows things down too much...
if( m_browseLabels || ( currentTrack.isFile() && ( currentTrack.url().path() == path || AmarokConfig::useRatings() ) ) )
if( m_browseLabels || ( currentTrack.isFile() && ( currentTrack.url().path() == path || AmarokConfig::useRatings() ) ) ) {
m_dirtyCurrentTrackPage = true; // will be reloaded when viewed (much faster)
if( currentPage() == m_contextTab )
}
if( currentPage() == m_contextTab ) {
refreshCurrentTrackPage();
}
}
void ContextBrowser::tagsChanged( const MetaBundle &bundle ) //SLOT

@ -43,7 +43,7 @@ Amarok::coverContextMenu( TQWidget *parent, TQPoint point, const TQString &artis
menu.insertTitle( i18n( "Cover Image" ) );
menu.insertItem( SmallIconSet( Amarok::icon( "zoom" ) ), i18n( "&Show Fullsize" ), SHOW );
menu.insertItem( SmallIconSet( Amarok::icon( "download" ) ), i18n( "&Fetch From amazon.%1" ).tqarg( CoverManager::amazonTld() ), FETCH );
menu.insertItem( SmallIconSet( Amarok::icon( "download" ) ), i18n( "&Fetch From amazon.%1" ).arg( CoverManager::amazonTld() ), FETCH );
menu.insertItem( SmallIconSet( Amarok::icon( "files" ) ), i18n( "Set &Custom Cover" ), CUSTOM );
bool disable = !album.isEmpty(); // disable setting covers for unknown albums
menu.setItemEnabled( FETCH, disable );
@ -143,7 +143,7 @@ CoverFetcher::CoverFetcher( TQWidget *parent, const TQString &artist, TQString a
//the others have the above strings removed with the following regex, as this can increase hit-rate
const TQString template1 = " ?-? ?[(^{]* ?%1 ?\\d*[)^}\\]]* *$"; //eg album - [disk 1] -> album
foreach( extensions ) {
TQRegExp regexp( template1.tqarg( *it ) );
TQRegExp regexp( template1.arg( *it ) );
regexp.setCaseSensitive( false );
album.remove( regexp );
}
@ -599,13 +599,13 @@ CoverFetcher::getUserQuery( TQString explanation )
KPushButton *nextcover = new KPushButton( i18n( "&Next Cover" ), buttons, "NextCover" );
KPushButton *cancel = new KPushButton( KStdGuiItem::cancel(), buttons );
labelPix ->tqsetAlignment( TQt::AlignHCenter );
labelName->tqsetAlignment( TQt::AlignHCenter );
labelPix ->setAlignment( TQt::AlignHCenter );
labelName->setAlignment( TQt::AlignHCenter );
labelPix ->setPixmap( cover );
labelName->setText( productname );
save->setDefault( true );
this->setFixedSize( tqsizeHint() );
this->setFixedSize( sizeHint() );
this->setCaption( i18n("Cover Found") );
connect( save, TQT_SIGNAL(clicked()), TQT_SLOT(accept()) );

@ -73,9 +73,9 @@ class ArtistItem : public KListViewItem
TQString a = text(0);
TQString b = i->text(0);
if ( a.tqstartsWith( "the ", false ) )
if ( a.startsWith( "the ", false ) )
CollectionView::manipulateThe( a, true );
if ( b.tqstartsWith( "the ", false ) )
if ( b.startsWith( "the ", false ) )
CollectionView::manipulateThe( b, true );
return TQString::localeAwareCompare( a.lower(), b.lower() );
@ -276,10 +276,10 @@ CoverViewDialog::CoverViewDialog( const TQString& artist, const TQString& album,
{
KWin::setType( winId(), NET::Utility );
kapp->setTopWidget( this );
setCaption( kapp->makeStdCaption( i18n("%1 - %2").tqarg( artist, album ) ) );
setCaption( kapp->makeStdCaption( i18n("%1 - %2").arg( artist, album ) ) );
m_tqlayout = new TQHBoxLayout( this );
m_tqlayout->setAutoAdd( true );
m_layout = new TQHBoxLayout( this );
m_layout->setAutoAdd( true );
m_pixmapViewer = new PixmapViewer( this, m_pixmap );
setFixedSize( m_pixmapViewer->maximalSize() );
@ -396,7 +396,7 @@ void CoverManager::slotArtistSelected( TQListViewItem *item ) //SLOT
//NOTE we MUST show the dialog, otherwise the closeEvents get processed
// in the processEvents() calls below, GRUMBLE! TQt sux0rs
progress.show();
progress.tqrepaint( false ); //ensures the dialog isn't blank
progress.repaint( false ); //ensures the dialog isn't blank
//this is an extra processEvent call for the sake of init() and aesthetics
//it isn't necessary
@ -499,7 +499,7 @@ void CoverManager::showCoverMenu( TQIconViewItem *item, const TQPoint &p ) //SLO
}
else {
menu.insertItem( SmallIconSet( Amarok::icon( "zoom" ) ), i18n( "&Show Fullsize" ), SHOW );
menu.insertItem( SmallIconSet( Amarok::icon( "download" ) ), i18n( "&Fetch From amazon.%1" ).tqarg( CoverManager::amazonTld() ), FETCH );
menu.insertItem( SmallIconSet( Amarok::icon( "download" ) ), i18n( "&Fetch From amazon.%1" ).arg( CoverManager::amazonTld() ), FETCH );
menu.insertItem( SmallIconSet( Amarok::icon( "files" ) ), i18n( "Set &Custom Cover" ), CUSTOM );
menu.insertItem( SmallIconSet( Amarok::icon( "add_playlist" ) ), i18n( "&Append to Playlist" ), APPEND );
menu.insertSeparator();
@ -817,9 +817,9 @@ void CoverManager::updateStatusBar()
if ( values.count() >= 2 )
{
if( values[0].isEmpty() )
text = i18n( "Fetching cover for %1..." ).tqarg( values[1] );
text = i18n( "Fetching cover for %1..." ).arg( values[1] );
else
text = i18n( "Fetching cover for %1 - %2..." ).tqarg( values[0], values[1] );
text = i18n( "Fetching cover for %1 - %2..." ).arg( values[0], values[1] );
}
}
else if( m_fetchingCovers ) {
@ -851,7 +851,7 @@ void CoverManager::updateStatusBar()
}
if( !m_filter.isEmpty() )
text = i18n( "1 result for \"%1\"", "%n results for \"%1\"", totalCounter ).tqarg( m_filter );
text = i18n( "1 result for \"%1\"", "%n results for \"%1\"", totalCounter ).arg( m_filter );
else if( m_artistView->selectedItem() ) {
text = i18n( "1 album", "%n albums", totalCounter );
if( m_artistView->selectedItem() != m_artistView->firstChild() ) //showing albums by an artist
@ -864,7 +864,7 @@ void CoverManager::updateStatusBar()
}
if( missingCounter )
text += i18n(" - ( <b>%1</b> without cover )" ).tqarg( missingCounter );
text += i18n(" - ( <b>%1</b> without cover )" ).arg( missingCounter );
#ifdef AMAZON_SUPPORT
m_fetchButton->setEnabled( missingCounter );
@ -912,7 +912,7 @@ TQDragObject *CoverView::dragObject()
return 0;
const TQString sql = "SELECT tags.url FROM tags, album WHERE album.name %1 AND tags.album = album.id ORDER BY tags.track;";
const TQStringList values = CollectionDB::instance()->query( sql.tqarg( CollectionDB::likeCondition( item->album() ) ) );
const TQStringList values = CollectionDB::instance()->query( sql.arg( CollectionDB::likeCondition( item->album() ) ) );
KURL::List urls;
for( TQStringList::ConstIterator it = values.begin(), end = values.end(); it != end; ++it )
@ -939,8 +939,8 @@ void CoverView::setStatusText( TQIconViewItem *item )
//FIXME: Don't rely on other independent code, use an sql query
if( item->artist().isEmpty() ) sampler = true;
TQString tipContent = i18n( "%1 - %2" ).tqarg( sampler ? i18n("Various Artists") : item->artist() )
.tqarg( item->album() );
TQString tipContent = i18n( "%1 - %2" ).arg( sampler ? i18n("Various Artists") : item->artist() )
.arg( item->album() );
CoverManager::instance()->setStatusText( tipContent );
@ -973,7 +973,7 @@ void CoverViewItem::loadCover()
m_coverImagePath = CollectionDB::instance()->albumImage( m_artist, m_album, false, 1, &m_embedded );
m_coverPixmap = TQPixmap( m_coverImagePath ); //create the scaled cover
tqrepaint();
repaint();
}
@ -983,27 +983,27 @@ void CoverViewItem::calcRect( const TQString& )
TQFontMetrics fm = iconView()->fontMetrics();
TQRect itemPixmapRect( 5, 1, thumbWidth, thumbWidth );
TQRect tqitemRect = rect();
tqitemRect.setWidth( thumbWidth + 10 );
tqitemRect.setHeight( thumbWidth + fm.lineSpacing() + 2 );
TQRect itemTextRect( 0, thumbWidth+2, tqitemRect.width(), fm.lineSpacing() );
TQRect itemRect = rect();
itemRect.setWidth( thumbWidth + 10 );
itemRect.setHeight( thumbWidth + fm.lineSpacing() + 2 );
TQRect itemTextRect( 0, thumbWidth+2, itemRect.width(), fm.lineSpacing() );
setPixmapRect( itemPixmapRect );
setTextRect( itemTextRect );
setItemRect( tqitemRect );
setItemRect( itemRect );
}
void CoverViewItem::paintItem(TQPainter* p, const TQColorGroup& cg)
{
TQRect tqitemRect = rect();
TQRect itemRect = rect();
p->save();
p->translate( tqitemRect.x(), tqitemRect.y() );
p->translate( itemRect.x(), itemRect.y() );
// draw the border
p->setPen( cg.mid() );
p->drawRect( 0, 0, tqitemRect.width(), pixmapRect().height()+2 );
p->drawRect( 0, 0, itemRect.width(), pixmapRect().height()+2 );
// draw the cover image
if( !m_coverPixmap.isNull() )

@ -136,7 +136,7 @@ class CoverViewItem : public KIconViewItem
TQPixmap coverPixmap() const { return m_coverPixmap; }
protected:
void paintItem(TQPainter* painter, const TQColorGroup& tqcolorGroup);
void paintItem(TQPainter* painter, const TQColorGroup& colorGroup);
void paintFocus(TQPainter *, const TQColorGroup &) { }
void dropped( TQDropEvent *, const TQValueList<TQIconDragItem> & );
void dragEntered();
@ -160,7 +160,7 @@ class CoverViewDialog : public TQDialog {
CoverViewDialog(const TQString& artist, const TQString& album, TQWidget *parent);
private:
TQHBoxLayout *m_tqlayout;
TQHBoxLayout *m_layout;
TQPixmap m_pixmap;
PixmapViewer *m_pixmapViewer;
TQLabel *m_label;

@ -87,7 +87,7 @@ bool CueFile::load(int mediaLength)
{
line = stream.readLine().simplifyWhiteSpace();
if( line.tqstartsWith( "title", false ) )
if( line.startsWith( "title", false ) )
{
title = line.mid( 6 ).remove( '"' );
if( mode == BEGIN )
@ -100,7 +100,7 @@ bool CueFile::load(int mediaLength)
debug() << "Title: " << title << endl;
}
else if( line.tqstartsWith( "performer", false ))
else if( line.startsWith( "performer", false ))
{
artist = line.mid( 10 ).remove( '"' );
if( mode == BEGIN )
@ -113,7 +113,7 @@ bool CueFile::load(int mediaLength)
debug() << "Artist: " << artist << endl;
}
else if( line.tqstartsWith( "track", false ) )
else if( line.startsWith( "track", false ) )
{
if( mode == TRACK_FOUND )
{
@ -139,7 +139,7 @@ bool CueFile::load(int mediaLength)
debug() << "Track: " << track << endl;
mode = TRACK_FOUND;
}
else if( line.tqstartsWith( "index", false ) )
else if( line.startsWith( "index", false ) )
{
if( mode == TRACK_FOUND)
{

@ -81,7 +81,7 @@ CollectionDB::CollectionDB()
// Load DBEngine plugin
TQString query = "[X-KDE-Amarok-plugintype] == 'dbengine' and [X-KDE-Amarok-name] != '%1'";
KTrader::OfferList offers = PluginManager::query( query.tqarg( "sqlite-dbengine" ) );
KTrader::OfferList offers = PluginManager::query( query.arg( "sqlite-dbengine" ) );
m_dbEngine = (DBEngine*) PluginManager::createFromService( offers.first() );
//<OPEN DATABASE>
@ -272,8 +272,8 @@ CollectionDB::createTables( DbConnection *conn )
"length INTEGER,"
"samplerate INTEGER,"
"sampler BOOL );" )
.tqarg( conn ? "TEMPORARY" : "" )
.tqarg( conn ? "_temp" : "" ), conn );
.arg( conn ? "TEMPORARY" : "" )
.arg( conn ? "_temp" : "" ), conn );
TQString albumAutoIncrement = "";
TQString artistAutoIncrement = "";
@ -302,59 +302,59 @@ CollectionDB::createTables( DbConnection *conn )
query( TQString( "CREATE %1 TABLE album%2 ("
"id INTEGER PRIMARY KEY %3,"
"name " + textColumnType() + ");" )
.tqarg( conn ? "TEMPORARY" : "" )
.tqarg( conn ? "_temp" : "" )
.tqarg( albumAutoIncrement ), conn );
.arg( conn ? "TEMPORARY" : "" )
.arg( conn ? "_temp" : "" )
.arg( albumAutoIncrement ), conn );
//create artist table
query( TQString( "CREATE %1 TABLE artist%2 ("
"id INTEGER PRIMARY KEY %3,"
"name " + textColumnType() + ");" )
.tqarg( conn ? "TEMPORARY" : "" )
.tqarg( conn ? "_temp" : "" )
.tqarg( artistAutoIncrement ), conn );
.arg( conn ? "TEMPORARY" : "" )
.arg( conn ? "_temp" : "" )
.arg( artistAutoIncrement ), conn );
//create genre table
query( TQString( "CREATE %1 TABLE genre%2 ("
"id INTEGER PRIMARY KEY %3,"
"name " + textColumnType() +");" )
.tqarg( conn ? "TEMPORARY" : "" )
.tqarg( conn ? "_temp" : "" )
.tqarg( genreAutoIncrement ), conn );
.arg( conn ? "TEMPORARY" : "" )
.arg( conn ? "_temp" : "" )
.arg( genreAutoIncrement ), conn );
//create year table
query( TQString( "CREATE %1 TABLE year%2 ("
"id INTEGER PRIMARY KEY %3,"
"name " + textColumnType() + ");" )
.tqarg( conn ? "TEMPORARY" : "" )
.tqarg( conn ? "_temp" : "" )
.tqarg( yearAutoIncrement ), conn );
.arg( conn ? "TEMPORARY" : "" )
.arg( conn ? "_temp" : "" )
.arg( yearAutoIncrement ), conn );
//create images table
query( TQString( "CREATE %1 TABLE images%2 ("
"path " + textColumnType() + ","
"artist " + textColumnType() + ","
"album " + textColumnType() + ");" )
.tqarg( conn ? "TEMPORARY" : "" )
.tqarg( conn ? "_temp" : "" ), conn );
.arg( conn ? "TEMPORARY" : "" )
.arg( conn ? "_temp" : "" ), conn );
// create directory statistics table
query( TQString( "CREATE %1 TABLE directories%2 ("
"dir " + textColumnType() + " UNITQUE,"
"dir " + textColumnType() + " UNIQUE,"
"changedate INTEGER );" )
.tqarg( conn ? "TEMPORARY" : "" )
.tqarg( conn ? "_temp" : "" ), conn );
.arg( conn ? "TEMPORARY" : "" )
.arg( conn ? "_temp" : "" ), conn );
//create indexes
query( TQString( "CREATE INDEX album_idx%1 ON album%2( name );" )
.tqarg( conn ? "_temp" : "" ).tqarg( conn ? "_temp" : "" ), conn );
.arg( conn ? "_temp" : "" ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "CREATE INDEX artist_idx%1 ON artist%2( name );" )
.tqarg( conn ? "_temp" : "" ).tqarg( conn ? "_temp" : "" ), conn );
.arg( conn ? "_temp" : "" ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "CREATE INDEX genre_idx%1 ON genre%2( name );" )
.tqarg( conn ? "_temp" : "" ).tqarg( conn ? "_temp" : "" ), conn );
.arg( conn ? "_temp" : "" ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "CREATE INDEX year_idx%1 ON year%2( name );" )
.tqarg( conn ? "_temp" : "" ).tqarg( conn ? "_temp" : "" ), conn );
.arg( conn ? "_temp" : "" ).arg( conn ? "_temp" : "" ), conn );
if ( !conn )
{
@ -385,13 +385,13 @@ CollectionDB::dropTables( DbConnection *conn )
{
DEBUG_FUNC_INFO
query( TQString( "DROP TABLE tags%1;" ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "DROP TABLE album%1;" ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "DROP TABLE artist%1;" ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "DROP TABLE genre%1;" ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "DROP TABLE year%1;" ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "DROP TABLE images%1;" ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "DROP TABLE directories%1;" ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "DROP TABLE tags%1;" ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "DROP TABLE album%1;" ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "DROP TABLE artist%1;" ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "DROP TABLE genre%1;" ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "DROP TABLE year%1;" ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "DROP TABLE images%1;" ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "DROP TABLE directories%1;" ).arg( conn ? "_temp" : "" ), conn );
if ( !conn )
{
query( TQString( "DROP TABLE related_artists;" ) );
@ -421,16 +421,16 @@ CollectionDB::clearTables( DbConnection *conn )
clearCommand = "TRUNCATE TABLE";
}
query( TQString( "%1 tags%2;" ).tqarg( clearCommand ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "%1 album%2;" ).tqarg( clearCommand ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "%1 artist%2;" ).tqarg( clearCommand ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "%1 genre%2;" ).tqarg( clearCommand ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "%1 year%2;" ).tqarg( clearCommand ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "%1 images%2;" ).tqarg( clearCommand ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "%1 directories%2;" ).tqarg( clearCommand ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "%1 tags%2;" ).arg( clearCommand ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "%1 album%2;" ).arg( clearCommand ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "%1 artist%2;" ).arg( clearCommand ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "%1 genre%2;" ).arg( clearCommand ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "%1 year%2;" ).arg( clearCommand ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "%1 images%2;" ).arg( clearCommand ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "%1 directories%2;" ).arg( clearCommand ).arg( conn ? "_temp" : "" ), conn );
if ( !conn )
{
query( TQString( "%1 related_artists;" ).tqarg( clearCommand ) );
query( TQString( "%1 related_artists;" ).arg( clearCommand ) );
}
}
@ -455,7 +455,7 @@ CollectionDB::createStatsTable()
// create music statistics database
query( TQString( "CREATE TABLE statistics ("
"url " + textColumnType() + " UNITQUE,"
"url " + textColumnType() + " UNIQUE,"
"createdate INTEGER,"
"accessdate INTEGER,"
"percentage FLOAT,"
@ -584,16 +584,16 @@ CollectionDB::IDFromValue( TQString name, TQString value, bool autocreate, const
TQStringList values =
query( TQString(
"SELECT id, name FROM %1 WHERE name LIKE '%2';" )
.tqarg( name )
.tqarg( CollectionDB::instance()->escapeString( value ) ), conn );
.arg( name )
.arg( CollectionDB::instance()->escapeString( value ) ), conn );
if ( updateSpelling && !values.isEmpty() && ( values[1] != value ) )
{
query( TQString( "UPDATE %1 SET id = %2, name = '%3' WHERE id = %4;" )
.tqarg( name )
.tqarg( values.first() )
.tqarg( CollectionDB::instance()->escapeString( value ) )
.tqarg( values.first() ), conn );
.arg( name )
.arg( values.first() )
.arg( CollectionDB::instance()->escapeString( value ) )
.arg( values.first() ), conn );
}
//check if item exists. if not, should we autocreate it?
@ -601,8 +601,8 @@ CollectionDB::IDFromValue( TQString name, TQString value, bool autocreate, const
if ( values.isEmpty() && autocreate )
{
id = insert( TQString( "INSERT INTO %1 ( name ) VALUES ( '%2' );" )
.tqarg( name )
.tqarg( CollectionDB::instance()->escapeString( value ) ), name, conn );
.arg( name )
.arg( CollectionDB::instance()->escapeString( value ) ), name, conn );
return id;
}
@ -617,8 +617,8 @@ CollectionDB::valueFromID( TQString table, uint id )
TQStringList values =
query( TQString(
"SELECT name FROM %1 WHERE id=%2;" )
.tqarg( table )
.tqarg( id ) );
.arg( table )
.arg( id ) );
return values.isEmpty() ? 0 : values.first();
@ -631,8 +631,8 @@ CollectionDB::albumSongCount( const TQString &artist_id, const TQString &album_i
TQStringList values =
query( TQString(
"SELECT COUNT( url ) FROM tags WHERE album = %1 AND artist = %2;" )
.tqarg( album_id )
.tqarg( artist_id ) );
.arg( album_id )
.arg( artist_id ) );
return values.first();
}
@ -642,8 +642,8 @@ CollectionDB::albumIsCompilation( const TQString &album_id )
TQStringList values =
query( TQString(
"SELECT sampler FROM tags WHERE sampler=%1 AND album=%2" )
.tqarg( CollectionDB::instance()->boolT() )
.tqarg( album_id ) );
.arg( CollectionDB::instance()->boolT() )
.arg( album_id ) );
return (values.count() != 0);
}
@ -655,17 +655,17 @@ CollectionDB::albumTracks( const TQString &artist_id, const TQString &album_id )
return query( TQString( "SELECT tags.url, tags.track AS __discard FROM tags, year WHERE tags.album = %1 AND "
"( tags.sampler = %2 OR tags.artist = %3 ) AND year.id = tags.year "
"ORDER BY tags.track;" )
.tqarg( album_id )
.tqarg( boolT() )
.tqarg( artist_id ) );
.arg( album_id )
.arg( boolT() )
.arg( artist_id ) );
}
else
{
return query( TQString( "SELECT tags.url FROM tags, year WHERE tags.album = %1 AND "
"( tags.sampler = 1 OR tags.artist = %2 ) AND year.id = tags.year "
"ORDER BY tags.track;" )
.tqarg( album_id )
.tqarg( artist_id ) );
.arg( album_id )
.arg( artist_id ) );
}
}
@ -680,10 +680,10 @@ CollectionDB::addImageToAlbum( const TQString& image, TQValueList< TQPair<TQStri
debug() << "Added image for album: " << (*it).first << " - " << (*it).second << ": " << image << endl;
insert( TQString( "INSERT INTO images%1 ( path, artist, album ) VALUES ( '%1', '%2', '%3' );" )
.tqarg( conn ? "_temp" : "" )
.tqarg( escapeString( image ) )
.tqarg( escapeString( (*it).first ) )
.tqarg( escapeString( (*it).second ) ), NULL, conn );
.arg( conn ? "_temp" : "" )
.arg( escapeString( image ) )
.arg( escapeString( (*it).first ) )
.arg( escapeString( (*it).second ) ), NULL, conn );
}
}
@ -879,8 +879,8 @@ CollectionDB::getImageForAlbum( const TQString& artist, const TQString& album, u
TQStringList values =
query( TQString(
"SELECT path FROM images WHERE artist LIKE '%1' AND album LIKE '%2' ORDER BY path;" )
.tqarg( escapeString( artist ) )
.tqarg( escapeString( album ) ) );
.arg( escapeString( artist ) )
.arg( escapeString( album ) ) );
if ( !values.isEmpty() )
{
@ -1165,7 +1165,7 @@ CollectionDB::bundleForUrl( MetaBundle* bundle )
"FROM tags, album, artist, genre, year "
"WHERE album.id = tags.album AND artist.id = tags.artist AND "
"genre.id = tags.genre AND year.id = tags.year AND tags.url = '%1';" )
.tqarg( escapeString( bundle->url().path() ) ) );
.arg( escapeString( bundle->url().path() ) ) );
if ( !values.empty() )
fillInBundle( values, *bundle );
@ -1260,10 +1260,10 @@ void
CollectionDB::addAudioproperties( const MetaBundle& bundle )
{
query( TQString( "UPDATE tags SET bitrate='%1', length='%2', samplerate='%3' WHERE url='%4';" )
.tqarg( bundle.bitrate() )
.tqarg( bundle.length() )
.tqarg( bundle.sampleRate() )
.tqarg( escapeString( bundle.url().path() ) ) );
.arg( bundle.bitrate() )
.arg( bundle.length() )
.arg( bundle.sampleRate() )
.arg( escapeString( bundle.url().path() ) ) );
}
@ -1275,7 +1275,7 @@ CollectionDB::addSongPercentage( const TQString &url, int percentage )
query( TQString(
"SELECT playcounter, createdate, percentage FROM statistics "
"WHERE url = '%1';" )
.tqarg( escapeString( url ) ) );
.arg( escapeString( url ) ) );
// check boundaries
if ( percentage > 100 ) percentage = 100;
@ -1288,19 +1288,19 @@ CollectionDB::addSongPercentage( const TQString &url, int percentage )
if (m_dbConnPool->getDbConnectionType() == DbConnection::postgresql) {
query( TQString( "UPDATE statistics SET percentage=%1, playcounter=%2+1 WHERE url='%3';" )
.tqarg( score )
.tqarg( values[0] + " + 1" )
.tqarg( escapeString( url ) ) );
.arg( score )
.arg( values[0] + " + 1" )
.arg( escapeString( url ) ) );
}
else
{
query( TQString( "REPLACE INTO statistics ( url, createdate, accessdate, percentage, playcounter ) "
"VALUES ( '%1', %2, %3, %4, %5 );" )
.tqarg( escapeString( url ) )
.tqarg( values[1] )
.tqarg( TQDateTime::tqcurrentDateTime().toTime_t() )
.tqarg( score )
.tqarg( values[0] + " + 1" ) );
.arg( escapeString( url ) )
.arg( values[1] )
.arg( TQDateTime::currentDateTime().toTime_t() )
.arg( score )
.arg( values[0] + " + 1" ) );
}
}
else
@ -1310,10 +1310,10 @@ CollectionDB::addSongPercentage( const TQString &url, int percentage )
insert( TQString( "INSERT INTO statistics ( url, createdate, accessdate, percentage, playcounter ) "
"VALUES ( '%1', %2, %3, %4, 1 );" )
.tqarg( escapeString( url ) )
.tqarg( TQDateTime::tqcurrentDateTime().toTime_t() )
.tqarg( TQDateTime::tqcurrentDateTime().toTime_t() )
.tqarg( score ), NULL );
.arg( escapeString( url ) )
.arg( TQDateTime::currentDateTime().toTime_t() )
.arg( TQDateTime::currentDateTime().toTime_t() )
.arg( score ), NULL );
}
int iscore = getSongPercentage( url );
@ -1326,7 +1326,7 @@ int
CollectionDB::getSongPercentage( const TQString &url )
{
TQStringList values = query( TQString( "SELECT round( percentage + 0.4 ) FROM statistics WHERE url = '%1';" )
.tqarg( escapeString( url ) ) );
.arg( escapeString( url ) ) );
if( values.count() )
return values.first().toInt();
@ -1341,7 +1341,7 @@ CollectionDB::setSongPercentage( const TQString &url , int percentage )
TQStringList values =
query( TQString(
"SELECT playcounter, createdate, accessdate FROM statistics WHERE url = '%1';" )
.tqarg( escapeString( url ) ) );
.arg( escapeString( url ) ) );
// check boundaries
if ( percentage > 100 ) percentage = 100;
@ -1351,29 +1351,29 @@ CollectionDB::setSongPercentage( const TQString &url , int percentage )
{
if (m_dbConnPool->getDbConnectionType() == DbConnection::postgresql) {
query( TQString( "UPDATE statistics SET percentage=%1 WHERE url='%2';" )
.tqarg( percentage )
.tqarg( escapeString( url ) ) );
.arg( percentage )
.arg( escapeString( url ) ) );
}
else
{
// entry exists
query( TQString( "REPLACE INTO statistics ( url, createdate, accessdate, percentage, playcounter ) "
"VALUES ( '%1', '%2', '%3', %4, %5 );" )
.tqarg( escapeString( url ) )
.tqarg( values[1] )
.tqarg( values[2] )
.tqarg( percentage )
.tqarg( values[0] ) );
.arg( escapeString( url ) )
.arg( values[1] )
.arg( values[2] )
.arg( percentage )
.arg( values[0] ) );
}
}
else
{
insert( TQString( "INSERT INTO statistics ( url, createdate, accessdate, percentage, playcounter ) "
"VALUES ( '%1', %2, %3, %4, 0 );" )
.tqarg( escapeString( url ) )
.tqarg( TQDateTime::tqcurrentDateTime().toTime_t() )
.tqarg( TQDateTime::tqcurrentDateTime().toTime_t() )
.tqarg( percentage ), NULL );
.arg( escapeString( url ) )
.arg( TQDateTime::currentDateTime().toTime_t() )
.arg( TQDateTime::currentDateTime().toTime_t() )
.arg( percentage ), NULL );
}
emit scoreChanged( url, percentage );
@ -1388,16 +1388,16 @@ CollectionDB::updateDirStats( TQString path, const long datetime, DbConnection *
if (m_dbConnPool->getDbConnectionType() == DbConnection::postgresql) {
query( TQString( "UPDATE directories%1 SET changedate=%2 WHERE dir='%3';")
.tqarg( conn ? "_temp" : "" )
.tqarg( datetime )
.tqarg( escapeString( path ) ), conn );
.arg( conn ? "_temp" : "" )
.arg( datetime )
.arg( escapeString( path ) ), conn );
}
else
{
query( TQString( "REPLACE INTO directories%1 ( dir, changedate ) VALUES ( '%3', %2 );" )
.tqarg( conn ? "_temp" : "" )
.tqarg( datetime )
.tqarg( escapeString( path ) ),
.arg( conn ? "_temp" : "" )
.arg( datetime )
.arg( escapeString( path ) ),
conn );
}
}
@ -1410,7 +1410,7 @@ CollectionDB::removeSongsInDir( TQString path )
path = path.left( path.length() - 1 );
query( TQString( "DELETE FROM tags WHERE dir = '%1';" )
.tqarg( escapeString( path ) ) );
.arg( escapeString( path ) ) );
}
@ -1422,7 +1422,7 @@ CollectionDB::isDirInCollection( TQString path )
TQStringList values =
query( TQString( "SELECT changedate FROM directories WHERE dir = '%1';" )
.tqarg( escapeString( path ) ) );
.arg( escapeString( path ) ) );
return !values.isEmpty();
}
@ -1433,7 +1433,7 @@ CollectionDB::isFileInCollection( const TQString &url )
{
TQStringList values =
query( TQString( "SELECT url FROM tags WHERE url = '%1';" )
.tqarg( escapeString( url ) ) );
.arg( escapeString( url ) ) );
return !values.isEmpty();
}
@ -1445,7 +1445,7 @@ CollectionDB::removeSongs( const KURL::List& urls )
for( KURL::List::ConstIterator it = urls.begin(), end = urls.end(); it != end; ++it )
{
query( TQString( "DELETE FROM tags WHERE url = '%1';" )
.tqarg( escapeString( (*it).path() ) ) );
.arg( escapeString( (*it).path() ) ) );
}
}
@ -1457,12 +1457,12 @@ CollectionDB::similarArtists( const TQString &artist, uint count )
if (m_dbConnPool->getDbConnectionType() == DbConnection::postgresql) {
values = query( TQString( "SELECT suggestion FROM related_artists WHERE artist = '%1' OFFSET 0 LIMIT %2;" )
.tqarg( escapeString( artist ) ).tqarg( count ) );
.arg( escapeString( artist ) ).arg( count ) );
}
else
{
values = query( TQString( "SELECT suggestion FROM related_artists WHERE artist = '%1' LIMIT 0, %2;" )
.tqarg( escapeString( artist ) ).tqarg( count ) );
.arg( escapeString( artist ) ).arg( count ) );
}
if ( values.isEmpty() )
@ -1480,8 +1480,8 @@ CollectionDB::checkCompilations( const TQString &path, const bool temporary, DbC
TQStringList dirs;
albums = query( TQString( "SELECT DISTINCT album.name FROM tags_temp, album%1 AS album WHERE tags_temp.dir = '%2' AND album.id = tags_temp.album;" )
.tqarg( temporary ? "_temp" : "" )
.tqarg( escapeString( path ) ), conn );
.arg( temporary ? "_temp" : "" )
.arg( escapeString( path ) ), conn );
for ( uint i = 0; i < albums.count(); i++ )
{
@ -1489,16 +1489,16 @@ CollectionDB::checkCompilations( const TQString &path, const bool temporary, DbC
const uint album_id = albumID( albums[ i ], false, temporary, false, conn );
artists = query( TQString( "SELECT DISTINCT artist.name FROM tags_temp, artist%1 AS artist WHERE tags_temp.album = '%2' AND tags_temp.artist = artist.id;" )
.tqarg( temporary ? "_temp" : "" )
.tqarg( album_id ), conn );
.arg( temporary ? "_temp" : "" )
.arg( album_id ), conn );
dirs = query( TQString( "SELECT DISTINCT dir FROM tags_temp WHERE album = '%1';" )
.tqarg( album_id ), conn );
.arg( album_id ), conn );
if ( artists.count() > dirs.count() )
{
debug() << "Detected compilation: " << albums[ i ] << " - " << artists.count() << ":" << dirs.count() << endl;
query( TQString( "UPDATE tags_temp SET sampler = %1 WHERE album = '%2';" )
.tqarg(boolT()).tqarg( album_id ), conn );
.arg(boolT()).arg( album_id ), conn );
}
}
}
@ -1508,8 +1508,8 @@ void
CollectionDB::setCompilation( const TQString &album, const bool enabled, const bool updateView )
{
query( TQString( "UPDATE tags, album SET tags.sampler = %1 WHERE tags.album = album.id AND album.name = '%2';" )
.tqarg( enabled ? "1" : "0" )
.tqarg( escapeString( album ) ) );
.arg( enabled ? "1" : "0" )
.arg( escapeString( album ) ) );
// Update the Collection-Browser view,
// using TQTimer to make sure we don't manipulate the GUI from a thread
@ -1525,7 +1525,7 @@ CollectionDB::removeDirFromCollection( TQString path )
path = path.left( path.length() - 1 );
query( TQString( "DELETE FROM directories WHERE dir = '%1';" )
.tqarg( escapeString( path ) ) );
.arg( escapeString( path ) ) );
}
@ -1755,13 +1755,13 @@ class SimilarArtistsInsertionJob : public ThreadWeaver::DependentJob
{
virtual bool doJob()
{
CollectionDB::instance()->query( TQString( "DELETE FROM related_artists WHERE artist = '%1';" ).tqarg( escapedArtist ) );
CollectionDB::instance()->query( TQString( "DELETE FROM related_artists WHERE artist = '%1';" ).arg( escapedArtist ) );
const TQString sql = "INSERT INTO related_artists ( artist, suggestion, changedate ) VALUES ( '%1', '%2', 0 );";
foreach( suggestions )
CollectionDB::instance()->insert( sql
.tqarg( escapedArtist )
.tqarg( CollectionDB::instance()->escapeString( *it ) ), NULL );
.arg( escapedArtist )
.arg( CollectionDB::instance()->escapeString( *it ) ), NULL );
return true;
}

@ -216,10 +216,10 @@ QueryBuilder::addMatch( int tables, int value, const TQString& match )
if ( !match.isEmpty() )
{
m_where += "AND ( true ";
m_where += TQString( "OR %1.%2 LIKE '" ).tqarg( tableName( tables ) ).tqarg( valueName( value ) ) + escapeString( match ) + "' ";
m_where += TQString( "OR %1.%2 LIKE '" ).arg( tableName( tables ) ).arg( valueName( value ) ) + escapeString( match ) + "' ";
if ( ( value & valName ) && match == i18n( "Unknown" ) )
m_where += TQString( "OR %1.%2 = '' " ).tqarg( tableName( tables ) ).tqarg( valueName( value ) );
m_where += TQString( "OR %1.%2 = '' " ).arg( tableName( tables ) ).arg( valueName( value ) );
m_where += " ) ";
}
@ -410,7 +410,7 @@ QueryBuilder::groupBy( int table, int value )
void
QueryBuilder::setLimit( int startPos, int length )
{
m_limit = TQString( " LIMIT %1, %2 " ).tqarg( startPos ).tqarg( length );
m_limit = TQString( " LIMIT %1, %2 " ).arg( startPos ).arg( length );
}

@ -102,7 +102,7 @@
<property name="name">
<cstring>kcfg_MySqlPort</cstring>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>100</width>
<height>32767</height>
@ -164,7 +164,7 @@
</widget>
<widget class="TQLayoutWidget" row="3" column="0" rowspan="1" colspan="4">
<property name="name">
<cstring>tqlayout4</cstring>
<cstring>layout4</cstring>
</property>
<hbox>
<property name="name">
@ -281,7 +281,7 @@
<property name="name">
<cstring>kcfg_PostgresqlPort</cstring>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>100</width>
<height>32767</height>
@ -343,7 +343,7 @@
</widget>
<widget class="TQLayoutWidget" row="3" column="0" rowspan="1" colspan="4">
<property name="name">
<cstring>tqlayout4</cstring>
<cstring>layout4</cstring>
</property>
<hbox>
<property name="name">

@ -12,7 +12,7 @@
<height>374</height>
</rect>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>420</width>
<height>320</height>
@ -27,7 +27,7 @@
</property>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout4</cstring>
<cstring>layout4</cstring>
</property>
<hbox>
<property name="name">
@ -51,7 +51,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout3</cstring>
<cstring>layout3</cstring>
</property>
<vbox>
<property name="name">
@ -64,7 +64,7 @@
<property name="text">
<string>Deletion method placeholder, never shown to user.</string>
</property>
<property name="tqalignment">
<property name="alignment">
<set>WordBreak|AlignCenter</set>
</property>
</widget>
@ -93,7 +93,7 @@
<property name="text">
<string>Placeholder for number of files, not in GUI</string>
</property>
<property name="tqalignment">
<property name="alignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>

@ -126,20 +126,20 @@ DeviceHandler * MassStorageDeviceHandlerFactory::createHandler( const Medium * m
{
TQStringList ids = CollectionDB::instance()->query( TQString( "SELECT id, label, lastmountpoint "
"FROM devices WHERE type = 'uuid' "
"AND uuid = '%1';" ).tqarg( m->id() ) );
"AND uuid = '%1';" ).arg( m->id() ) );
if ( ids.size() == 3 )
{
debug() << "Found existing UUID config for ID " << ids[0] << " , uuid " << m->id() << endl;
CollectionDB::instance()->query( TQString( "UPDATE devices SET lastmountpoint = '%2' WHERE "
"id = %1;" ).tqarg( ids[0] ).tqarg( m->mountPoint() ) );
"id = %1;" ).arg( ids[0] ).arg( m->mountPoint() ) );
return new MassStorageDeviceHandler( ids[0].toInt(), m->mountPoint(), m->id() );
}
else
{
int id = CollectionDB::instance()->insert( TQString( "INSERT INTO devices( type, uuid, lastmountpoint ) "
"VALUES ( 'uuid', '%1', '%2' );" )
.tqarg( m->id() )
.tqarg( m->mountPoint() ), "devices" );
.arg( m->id() )
.arg( m->mountPoint() ), "devices" );
if ( id == 0 )
{
warning() << "Inserting into devices failed for type=uuid, uuid=" << m->id() << endl;

@ -135,13 +135,13 @@ NfsDeviceHandlerFactory::createHandler( const Medium * m ) const
TQStringList ids = CollectionDB::instance()->query( TQString( "SELECT id, label, lastmountpoint "
"FROM devices WHERE type = 'nfs' "
"AND servername = '%1' AND sharename = '%2';" )
.tqarg( server )
.tqarg( share ) );
.arg( server )
.arg( share ) );
if ( ids.size() == 3 )
{
debug() << "Found existing NFS config for ID " << ids[0] << " , server " << server << " ,share " << share << endl;
CollectionDB::instance()->query( TQString( "UPDATE devices SET lastmountpoint = '%2' WHERE "
"id = %1;" ).tqarg( ids[0] ).tqarg( m->mountPoint() ) );
"id = %1;" ).arg( ids[0] ).arg( m->mountPoint() ) );
return new NfsDeviceHandler( ids[0].toInt(), server, share, m->mountPoint() );
}
else
@ -149,9 +149,9 @@ NfsDeviceHandlerFactory::createHandler( const Medium * m ) const
int id = CollectionDB::instance()->insert( TQString( "INSERT INTO devices"
"( type, servername, sharename, lastmountpoint ) "
"VALUES ( 'nfs', '%1', '%2', '%3' );" )
.tqarg( server )
.tqarg( share )
.tqarg( m->mountPoint() ), "devices" );
.arg( server )
.arg( share )
.arg( m->mountPoint() ), "devices" );
if ( id == 0 )
{
warning() << "Inserting into devices failed for type=nfs, server=" << server << ", share=" << share << endl;

@ -137,13 +137,13 @@ SmbDeviceHandlerFactory::createHandler( const Medium * m ) const
TQStringList ids = CollectionDB::instance()->query( TQString( "SELECT id, label, lastmountpoint "
"FROM devices WHERE type = 'smb' "
"AND servername = '%1' AND sharename = '%2';" )
.tqarg( server )
.tqarg( share ) );
.arg( server )
.arg( share ) );
if ( ids.size() == 3 )
{
debug() << "Found existing SMB config for ID " << ids[0] << " , server " << server << " ,share " << share << endl;
CollectionDB::instance()->query( TQString( "UPDATE devices SET lastmountpoint = '%2' WHERE "
"id = %1;" ).tqarg( ids[0] ).tqarg( m->mountPoint() ) );
"id = %1;" ).arg( ids[0] ).arg( m->mountPoint() ) );
return new SmbDeviceHandler( ids[0].toInt(), server, share, m->mountPoint() );
}
else
@ -151,9 +151,9 @@ SmbDeviceHandlerFactory::createHandler( const Medium * m ) const
int id = CollectionDB::instance()->insert( TQString( "INSERT INTO devices"
"( type, servername, sharename, lastmountpoint ) "
"VALUES ( 'smb', '%1', '%2', '%3' );" )
.tqarg( server )
.tqarg( share )
.tqarg( m->mountPoint() ), "devices" );
.arg( server )
.arg( share )
.arg( m->mountPoint() ), "devices" );
if ( id == 0 )
{
warning() << "Inserting into devices failed for type=smb, server=" << server << ", share=" << share << endl;

@ -39,7 +39,7 @@ CollectionSetup::CollectionSetup( TQWidget *parent )
(new TQLabel( i18n(
"These folders will be scanned for "
"media to make up your collection:"), this ))->tqsetAlignment( TQt::WordBreak );
"media to make up your collection:"), this ))->setAlignment( TQt::WordBreak );
m_view = new TQFixedListView( this );
m_recursive = new TQCheckBox( i18n("&Scan folders recursively"), this );
@ -61,7 +61,7 @@ CollectionSetup::CollectionSetup( TQWidget *parent )
m_view->addColumn( TQString() );
m_view->setRootIsDecorated( true );
m_view->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
m_view->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
m_view->setResizeMode( TQListView::LastColumn );
reinterpret_cast<TQWidget*>(m_view->header())->hide();
@ -212,8 +212,8 @@ Item::stateChange( bool b )
}
}
else {
//Deselect item and recurse through tqchildren but only deselect tqchildren if they
//do not exist unless we are in recursive mode (where no tqchildren should be
//Deselect item and recurse through children but only deselect children if they
//do not exist unless we are in recursive mode (where no children should be
//selected if the parent is being unselected)
//Note this does not do anything to the checkboxes, but they should be doing
//the same thing as we are (hopefully)
@ -258,7 +258,7 @@ Item::newItems( const KFileItemList &list ) //SLOT
for( KFileItemListIterator it( list ); *it; ++it )
{
//Fully disable (always appears off and grayed-out) if it is "/proc", "/sys" or
//"/dev" or one of their tqchildren. This is because we will never scan them, so we
//"/dev" or one of their children. This is because we will never scan them, so we
//might as well show that.
//These match up with the skipped dirs in CollectionScanner::readDir.
bool fully_disable=false;
@ -294,7 +294,7 @@ Item::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width,
// Figure out if a child folder is activated
for ( TQStringList::const_iterator iter = cs_m_dirs.begin(); iter != cs_m_dirs.end();
++iter )
if ( ( *iter ).tqstartsWith( m_url.path(1) ) )
if ( ( *iter ).startsWith( m_url.path(1) ) )
if ( *iter != "/" ) // "/" should not match as a child of "/"
dirty = true;
@ -303,13 +303,13 @@ Item::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width,
TQColorGroup _cg = cg;
if ( dirty )
{
_cg.setColor( TQColorGroup::Text, listView()->tqcolorGroup().link() );
_cg.setColor( TQColorGroup::Text, listView()->colorGroup().link() );
TQFont font = p->font();
font.setBold( !font.bold() );
p->setFont( font );
}
TQCheckListItem::paintCell( p, isDisabled() ? listView()->tqpalette().disabled() : _cg, column, width, align );
TQCheckListItem::paintCell( p, isDisabled() ? listView()->palette().disabled() : _cg, column, width, align );
p->setFont( f );
}

@ -30,12 +30,12 @@
namespace Collection { class Item; }
class TQFixedListView : public TQListView
// Reimplement tqsizeHint to have directorylist not being too big for "low" (1024x768 is not exactly low) resolutions
// Reimplement sizeHint to have directorylist not being too big for "low" (1024x768 is not exactly low) resolutions
{
public:
TQFixedListView ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 )
:TQListView(parent, name, f) {};
TQSize tqsizeHint() const
TQSize sizeHint() const
{
return TQSize(400, 100);
}
@ -88,7 +88,7 @@ public:
public slots:
void newItems( const KFileItemList& );
void completed() { if( childCount() == 0 ) { setExpandable( false ); tqrepaint(); } }
void completed() { if( childCount() == 0 ) { setExpandable( false ); repaint(); } }
private:
KDirLister m_lister;

@ -274,8 +274,8 @@ DEBUG_BLOCK
{
TQRegExp limit( "(LIMIT.*)?;$" );
sql.replace( limit, TQString(" ORDER BY %1 LIMIT %2 OFFSET 0;")
.tqarg( CollectionDB::instance()->randomFunc() )
.tqarg( songCount ) );
.arg( CollectionDB::instance()->randomFunc() )
.arg( songCount ) );
}
else
{
@ -309,8 +309,8 @@ DEBUG_BLOCK
TQRegExp orderLimit( "(ORDER BY.*)?;$" );
sql.replace( orderLimit, TQString(" ORDER BY %1 LIMIT %2 OFFSET 0;")
.tqarg( CollectionDB::instance()->randomFunc() )
.tqarg( songCount ) );
.arg( CollectionDB::instance()->randomFunc() )
.arg( songCount ) );
}
else // time ordered criteria, only mess with the limits
{
@ -324,11 +324,11 @@ DEBUG_BLOCK
if( findLocation == -1 ) // there is no limit
{
TQRegExp queryEnd( ";$" ); // find the end of the query an add a limit
sql.replace( queryEnd, TQString(" LIMIT %1 OFFSET %2;" ).tqarg( songCount*5 ).tqarg( offset ) );
sql.replace( queryEnd, TQString(" LIMIT %1 OFFSET %2;" ).arg( songCount*5 ).arg( offset ) );
useDirect = false;
}
else // there is a limit, so find it and replace it
sql.replace( limitSearch, TQString(" LIMIT %1 OFFSET %2;" ).tqarg( songCount ).tqarg( offset ) );
sql.replace( limitSearch, TQString(" LIMIT %1 OFFSET %2;" ).arg( songCount ).arg( offset ) );
}
}

@ -223,7 +223,7 @@ EditFilterDialog::EditFilterDialog( TQWidget* parent, bool metaBundleKeywords, c
connect(m_spinMax1, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(maxSpinChanged(int)));
TQHBoxLayout *filesizeLayout = new TQHBoxLayout( vertLayout );
filesizeLayout->tqsetAlignment( AlignLeft );
filesizeLayout->setAlignment( AlignLeft );
m_filesizeLabel = new TQLabel( i18n("Unit:"), m_groupBox, "filesizeLabel");
filesizeLayout->addWidget( m_filesizeLabel );
filesizeLayout->addItem( new TQSpacerItem( 5, 10, TQSizePolicy::Fixed, TQSizePolicy::Minimum ) );
@ -243,7 +243,7 @@ EditFilterDialog::EditFilterDialog( TQWidget* parent, bool metaBundleKeywords, c
connect( m_comboCondition, TQT_SIGNAL(activated(int)), TQT_SLOT(chooseCondition(int)) );
TQHBoxLayout *otherOptionsLayout = new TQHBoxLayout( plainPage() );
otherOptionsLayout->tqsetAlignment( AlignHCenter );
otherOptionsLayout->setAlignment( AlignHCenter );
m_mainLay->addLayout( otherOptionsLayout );
// the groupbox to select the action filter
@ -532,7 +532,7 @@ void EditFilterDialog::selectedKeyword(int index) // SLOT
{
// year: set useful values for the spinboxes
m_spinMin1->setValue( 1900 );
m_spinMax1->setValue( TQDate::tqcurrentDate().year() );
m_spinMax1->setValue( TQDate::currentDate().year() );
valueWanted();
}
else if( key=="track" || key=="disc" || key=="discnumber" )

@ -14,3 +14,4 @@
add_subdirectory( void )
tde_conditional_add_subdirectory( WITH_XINE xine )
tde_conditional_add_subdirectory( WITH_YAUAP yauap )
tde_conditional_add_subdirectory( WITH_AKODE akode )

@ -0,0 +1,37 @@
#################################################
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/amarok/src/amarokcore
${CMAKE_SOURCE_DIR}/amarok/src
${CMAKE_SOURCE_DIR}/amarok/src/engine/akode
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
${AKODE_INCLUDE_DIRS}
)
link_directories(
${TQT_LIBRARY_DIRS}
)
##### other data ################################
install( FILES amarok_aKode-engine.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
##### libamarok_aKode-engine (module) ############
tde_add_kpart( libamarok_aKode-engine AUTOMOC
SOURCES
akode-scope.cpp akode-engine.cpp
LINK amarok-shared ${AKODE_LIBRARIES}
DESTINATION ${PLUGIN_INSTALL_DIR}
)

@ -180,7 +180,7 @@ AkodeEngine::event( TQEvent *e )
case 3002:
m_player->stop();
emit trackEnded();
emit infoMessage( i18n("Unable to decode <i>%1</i>").tqarg( m_url.prettyURL()) );
emit infoMessage( i18n("Unable to decode <i>%1</i>").arg( m_url.prettyURL()) );
break;
default:

@ -1,14 +1,14 @@
DEFINES=-DTEST_APP -D_REENTRANT_ -DQT_THREAD_SUPPORT
CXX=g++
TQMOC=/usr/lib/qt-3.3/bin/tqmoc
MOC=/usr/lib/qt-3.3/bin/moc
CXXFLAGS=-g -fpic -pipe -Wall -Wreturn-type -fno-exceptions --permissive -fno-rtti -Wno-ctor-dtor-privacy -march=pentium -mcpu=pentium -O2 $(INCLUDES) $(DEFINES)
SRCS=main.cpp hxsplay.cpp
LIBSRCS=helix-engine.cpp helix-config.cpp hxsplay.cpp
TQMOCSRCS=helix-engine.tqmoc helix-config.tqmoc
TQMOCHDRS=$(TQMOCSRCS:.tqmoc=.h)
MOCSRCS=helix-engine.moc helix-config.moc
MOCHDRS=$(MOCSRCS:.moc=.h)
OBJS=$(SRCS:.cpp=.o)
LIBOBJS=$(LIBSRCS:.cpp=.o)
@ -30,7 +30,7 @@ INCLUDES=\
LIBRARIES=-Lhelix-sp -lhelix-sp --lstdc++ -ldl -lm -L/usr/lib/qt-3.3/lib -lqt-mt
.SUFFIXES: .cpp .so .h .tqmoc
.SUFFIXES: .cpp .so .h .moc
.c.o:
$(CC) $(CCFLAGS) -o $@ -c $<
@ -38,14 +38,14 @@ LIBRARIES=-Lhelix-sp -lhelix-sp --lstdc++ -ldl -lm -L/usr/lib/qt-3.3/lib -lqt-mt
.cpp.o:
$(CXX) $(CXXFLAGS) -o $@ -c $<
.h.tqmoc:
$(TQMOC) $< -o $@
.h.moc:
$(MOC) $< -o $@
PROGRAM=splay
SLIBRARY=libamarok_helixengine_plugin.so
all: $(TQMOCSRCS) $(SLIBRARY) $(OBJS) $(LIBOBJS) $(PROGRAM)
all: $(MOCSRCS) $(SLIBRARY) $(OBJS) $(LIBOBJS) $(PROGRAM)
$(PROGRAM): $(OBJS)
$(CXX) -o $(PROGRAM) $(OBJS) $(LIBRARIES)
@ -55,7 +55,7 @@ $(SLIBRARY): $(LIBOBJS)
$(OBJS): $(SRCS)
$(TQMOCSRCS): $(TQMOCHDRS)
$(MOCSRCS): $(MOCHDRS)
install:
install -p -C -m 755 $(SLIBRARY) /usr/lib/trinity/$(SLIBRARY)
@ -69,7 +69,7 @@ uninstall:
rm -f /usr/share/services/amarok_helixengine_plugin.desktop
clean:
rm -f $(PROGRAM) $(SLIBRARY) $(LIBOBJS) $(OBJS) helix-engine.tqmoc *~
rm -f $(PROGRAM) $(SLIBRARY) $(LIBOBJS) $(OBJS) helix-engine.moc *~
depend:
makedepend $(DEFINES) $(INCLUDES) -o.o -- $(SRCS)
@ -116,4 +116,4 @@ hxsplay.o: /usr/lib/qt-3.3/include/qwinexport.h /usr/include/string.h
hxsplay.o: /usr/lib/qt-3.3/include/qnamespace.h
hxsplay.o: /usr/lib/qt-3.3/include/qmutex.h
hxsplay.o: /usr/lib/qt-3.3/include/qsemaphore.h
hxsplay.o: /usr/lib/qt-3.3/include/qwaitcondition.h hxsplay.h hxsplay.tqmoc
hxsplay.o: /usr/lib/qt-3.3/include/qwaitcondition.h hxsplay.h hxsplay.moc

@ -53,7 +53,7 @@ HelixConfigEntry::HelixConfigEntry( TQWidget *parent,
, m_valueChanged( false )
, m_stringValue( defaultvalue )
{
TQGridLayout *grid = (TQGridLayout*)parent->tqlayout();
TQGridLayout *grid = (TQGridLayout*)parent->layout();
m_w = new KLineEdit( m_stringValue, parent );
connect( (TQWidget *) m_w, TQT_SIGNAL(textChanged( const TQString& )), this, TQT_SLOT(slotStringChanged( const TQString& )) );
@ -62,7 +62,7 @@ HelixConfigEntry::HelixConfigEntry( TQWidget *parent,
TQToolTip::add( (TQWidget *) m_w, "<qt>" + tooltip );
TQLabel* d = new TQLabel( description + ':', parent );
d->tqsetAlignment( TQLabel::WordBreak | TQLabel::AlignVCenter );
d->setAlignment( TQLabel::WordBreak | TQLabel::AlignVCenter );
grid->addWidget( (TQWidget *) m_w, row, 1 );
grid->addWidget( d, row, 0 );
@ -79,7 +79,7 @@ HelixConfigEntry::HelixConfigEntry( TQWidget *parent,
, m_valueChanged( false )
, m_stringValue( defaultvalue )
{
TQGridLayout *grid = (TQGridLayout*)parent->tqlayout();
TQGridLayout *grid = (TQGridLayout*)parent->layout();
m_key = str;
@ -90,7 +90,7 @@ HelixConfigEntry::HelixConfigEntry( TQWidget *parent,
TQToolTip::add( m_w, "<qt>" + tooltip );
TQLabel* d = new TQLabel( description + ':', parent );
d->tqsetAlignment( TQLabel::WordBreak | TQLabel::AlignVCenter );
d->setAlignment( TQLabel::WordBreak | TQLabel::AlignVCenter );
grid->addWidget( m_w, row, 1 );
grid->addWidget( d, row, 0 );
@ -110,7 +110,7 @@ HelixSoundDevice::HelixSoundDevice( TQWidget *parent,
HelixEngine *engine )
: deviceComboBox(0), checkBox_outputDevice(0), lineEdit_outputDevice(0), m_changed(false), m_engine(engine)
{
TQGridLayout *grid = (TQGridLayout*)parent->tqlayout();
TQGridLayout *grid = (TQGridLayout*)parent->layout();
deviceComboBox = new KComboBox( false, parent, "deviceComboBox" );
deviceComboBox->insertItem("oss"); // I believe these are not subject to translation (they don't seem to be in xine,
@ -119,7 +119,7 @@ HelixSoundDevice::HelixSoundDevice( TQWidget *parent,
#endif
deviceComboBox->setCurrentItem(HelixConfig::outputplugin());
TQLabel* op = new TQLabel( i18n("Output plugin:"), parent );
op->tqsetAlignment( TQLabel::WordBreak | TQLabel::AlignVCenter );
op->setAlignment( TQLabel::WordBreak | TQLabel::AlignVCenter );
grid->addWidget( op, row, 0 );
grid->addWidget( deviceComboBox, row, 1);
connect( (TQWidget *)deviceComboBox, TQT_SIGNAL( activated( const TQString& ) ), this, TQT_SLOT( slotNewDevice( const TQString& )) );
@ -128,7 +128,7 @@ HelixSoundDevice::HelixSoundDevice( TQWidget *parent,
++row;
checkBox_outputDevice = new TQCheckBox( parent, "checkBox_outputDevice" );
checkBox_outputDevice->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, checkBox_outputDevice->sizePolicy().hasHeightForWidth() ) );
checkBox_outputDevice->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, checkBox_outputDevice->sizePolicy().hasHeightForWidth() ) );
grid->addWidget( checkBox_outputDevice, row, 0 );
checkBox_outputDevice->setText( i18n( "Device:" ) );
@ -276,7 +276,7 @@ HelixConfigDialogBase::HelixConfigDialogBase( HelixEngine *engine, Amarok::Plugi
grid->setColStretch( 1, 1 );
if( sv )
sv->setMinimumWidth( grid->tqsizeHint().width() + 20 );
sv->setMinimumWidth( grid->sizeHint().width() + 20 );
engine->m_coredir = HelixConfig::coreDirectory();
m_core = new HelixConfigEntry( parent, engine->m_coredir,
@ -349,7 +349,7 @@ HelixConfigDialogBase::HelixConfigDialogBase( HelixEngine *engine, Amarok::Plugi
TQTextEdit *le = new TQTextEdit( parent );
if( sv )
sv->setMinimumWidth( le->tqsizeHint().width() );
sv->setMinimumWidth( le->sizeHint().width() );
grid = new TQGridLayout( parent, /*rows*/1, /*cols*/1, /*margin*/2, /*spacing*/1 );
grid->addMultiCellWidget( le, 0, 1, 0, 1, 0 );

@ -15,6 +15,7 @@
#include <climits>
#include <cmath>
#include <stdarg.h>
#include <cstring>
#include <config.h>
@ -126,7 +127,7 @@ void HelixEngine::notifyUser(unsigned long code, const char *moreinfo, const cha
{
TQString *err = HelixErrors::errorText(code);
if (err)
emit statusText(i18n("Helix Core returned error: %1 %2 %3").tqarg(TQString(*err)).tqarg(TQString(moreinfo)).tqarg(TQString(moreinfourl)));
emit statusText(i18n("Helix Core returned error: %1 %2 %3").arg(TQString(*err)).arg(TQString(moreinfo)).arg(TQString(moreinfourl)));
else
emit statusText(i18n("Helix Core returned error: <unknown>"));
}
@ -135,7 +136,7 @@ void HelixEngine::interruptUser(unsigned long code, const char *moreinfo, const
{
TQString *err = HelixErrors::errorText(code);
if (err)
emit infoMessage(i18n("Helix Core returned error: %1 %1 %1").tqarg(TQString(*err)).tqarg(TQString(moreinfo)).tqarg(TQString(moreinfourl)));
emit infoMessage(i18n("Helix Core returned error: %1 %1 %1").arg(TQString(*err)).arg(TQString(moreinfo)).arg(TQString(moreinfourl)));
else
emit infoMessage(i18n("Helix Core returned error: <unknown>"));
@ -146,13 +147,13 @@ void HelixEngine::interruptUser(unsigned long code, const char *moreinfo, const
void HelixEngine::onContacting(const char *host)
{
emit statusText( i18n("Contacting: %1").tqarg( TQString(host) ) );
emit statusText( i18n("Contacting: %1").arg( TQString(host) ) );
}
void HelixEngine::onBuffering(int pcnt)
{
if (pcnt != 100) // let's not report that...
emit statusText( i18n( "Buffering %1%" ).tqarg( pcnt ) );
emit statusText( i18n( "Buffering %1%" ).arg( pcnt ) );
}
@ -289,7 +290,7 @@ HelixEngine::load( const KURL &url, bool isStream )
{
const TQString path = url.path();
const TQString ext = path.mid( path.findRev( '.' ) + 1 ).lower();
emit statusText( i18n("No plugin found for the %1 format").tqarg(ext) );
emit statusText( i18n("No plugin found for the %1 format").arg(ext) );
return false;
}

@ -18,7 +18,7 @@
* and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS
* ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TQUIET
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET
* ENJOYMENT OR NON-INFRINGEMENT.
*
* Technology Compatibility Kit Test Suite(s) Location:

@ -18,7 +18,7 @@
* and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS
* ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TQUIET
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET
* ENJOYMENT OR NON-INFRINGEMENT.
*
* Technology Compatibility Kit Test Suite(s) Location:

@ -332,7 +332,7 @@ do { \
} while (0) \
#define RETQUIRE_REPORT(targ,file,line) HXAssertFailedLine(targ,file,line)
#define REQUIRE_REPORT(targ,file,line) HXAssertFailedLine(targ,file,line)
@ -525,7 +525,7 @@ int safe_int_func_call(LONG32 f);
#define HX_ASSERT_VALID_READ_PTR(pOb) ((void)0)
#define HXOutputDebugString(f) ((void)0)
#define RETQUIRE_REPORT(targ,file,line) ((int)0)
#define REQUIRE_REPORT(targ,file,line) ((int)0)
#if defined (_MACINTOSH)
// this is the proper release version of HX_VERIFY that preserves the syntactic
@ -574,104 +574,104 @@ class LogInfo
/////////////////////////////////////////////////////////////////////////////
// CHECK/RETQUIRE MACROS
// CHECK/REQUIRE MACROS
//
// These macros are always valid (debug and release builds)
//
//
//
// RETQUIRE and RETQUIRE_ACTION _always_ emit code for the goto if the statement is false
// REQUIRE and REQUIRE_ACTION _always_ emit code for the goto if the statement is false
//
// RETQUIRE_REPORT only generates code in Debug builds
// REQUIRE_REPORT only generates code in Debug builds
//
// The do {} while (0) construct ensures this is legal wherever a statement is legal
//
#define CHECK(stmt) HX_ASSERT(stmt)
#define RETQUIRE_VOID_RETURN(stmt) \
do { if ((stmt) == 0) { if (RETQUIRE_REPORT(#stmt,__FILE__,__LINE__)) HXDebugBreak(); return; } } while (0)
#define RETQUIRE_RETURN(stmt,returned) \
do { if ((stmt) == 0) { if (RETQUIRE_REPORT(#stmt,__FILE__,__LINE__)) HXDebugBreak(); return (returned); } } while (0)
#define RETQUIRE_VOID_RETURN_TQUIET(stmt) \
#define REQUIRE_VOID_RETURN(stmt) \
do { if ((stmt) == 0) { if (REQUIRE_REPORT(#stmt,__FILE__,__LINE__)) HXDebugBreak(); return; } } while (0)
#define REQUIRE_RETURN(stmt,returned) \
do { if ((stmt) == 0) { if (REQUIRE_REPORT(#stmt,__FILE__,__LINE__)) HXDebugBreak(); return (returned); } } while (0)
#define REQUIRE_VOID_RETURN_QUIET(stmt) \
do { if ((stmt) == 0) { return; } } while (0)
#define RETQUIRE_RETURN_TQUIET(stmt,returned) \
#define REQUIRE_RETURN_QUIET(stmt,returned) \
do { if ((stmt) == 0) { return (returned); } } while (0)
#define RETQUIRE(stmt,target) \
do { if ((stmt) == 0) { RETQUIRE_REPORT(#target,__FILE__,__LINE__); goto target; } } while (0)
#define RETQUIRE_ACTION(stmt,target,action) \
do { if ((stmt) == 0) { RETQUIRE_REPORT(#target,__FILE__,__LINE__); {{action;} goto target;} } } while (0)
#define RETQUIRE_TQUIET(stmt,target) \
#define REQUIRE(stmt,target) \
do { if ((stmt) == 0) { REQUIRE_REPORT(#target,__FILE__,__LINE__); goto target; } } while (0)
#define REQUIRE_ACTION(stmt,target,action) \
do { if ((stmt) == 0) { REQUIRE_REPORT(#target,__FILE__,__LINE__); {{action;} goto target;} } } while (0)
#define REQUIRE_QUIET(stmt,target) \
do { if ((stmt) == 0) goto target; } while (0)
#define RETQUIRE_ACTION_TQUIET(stmt,target,action) \
#define REQUIRE_ACTION_QUIET(stmt,target,action) \
do { if ((stmt) == 0) {{action;} goto target;} } while (0)
#define PRE_RETQUIRE_RETURN(stmt,returned) \
RETQUIRE_RETURN(stmt,returned)
#define PRE_RETQUIRE_VOID_RETURN(stmt) \
RETQUIRE_VOID_RETURN(stmt)
#define POST_RETQUIRE_RETURN(stmt,returned) \
RETQUIRE_RETURN(stmt,returned)
#define POST_RETQUIRE_VOID_RETURN(stmt) \
RETQUIRE_VOID_RETURN(stmt)
#define RETQUIRE_SUCCESS_RETURN_TQUIET(expr) \
#define PRE_REQUIRE_RETURN(stmt,returned) \
REQUIRE_RETURN(stmt,returned)
#define PRE_REQUIRE_VOID_RETURN(stmt) \
REQUIRE_VOID_RETURN(stmt)
#define POST_REQUIRE_RETURN(stmt,returned) \
REQUIRE_RETURN(stmt,returned)
#define POST_REQUIRE_VOID_RETURN(stmt) \
REQUIRE_VOID_RETURN(stmt)
#define REQUIRE_SUCCESS_RETURN_QUIET(expr) \
do { register HX_RESULT const res = expr; if (FAILED (res)) return res; } while (0)
#define RETQUIRE_SUCCESS_RETURN(expr) \
do { register HX_RESULT const res = expr; if (FAILED (res)) { RETQUIRE_REPORT("False condition, Aborting...",__FILE__,__LINE__); return res; } } while (0)
#define REQUIRE_SUCCESS_RETURN(expr) \
do { register HX_RESULT const res = expr; if (FAILED (res)) { REQUIRE_REPORT("False condition, Aborting...",__FILE__,__LINE__); return res; } } while (0)
//
// RETQUIRE_SUCCESS reports the error if an expected result failed
// REQUIRE_SUCCESS reports the error if an expected result failed
// Ideally, this should report the status value as well
//
#define CHECK_SUCCESS(stat) HX_ASSERT(((unsigned long)(stat)>>31) == 0)
#define RETQUIRE_SUCCESS(stat,target) \
do { if (((unsigned long)(stat)>>31) != 0) { RETQUIRE_REPORT(#target,__FILE__,__LINE__); goto target; } } while (0)
#define RETQUIRE_SUCCESS_ACTION(stat,target,action) \
do { if (((unsigned long)(stat)>>31) != 0) { RETQUIRE_REPORT(#target,__FILE__,__LINE__); {{action;} goto target;} } } while (0)
#define RETQUIRE_SUCCESS_TQUIET(stat,target) \
#define REQUIRE_SUCCESS(stat,target) \
do { if (((unsigned long)(stat)>>31) != 0) { REQUIRE_REPORT(#target,__FILE__,__LINE__); goto target; } } while (0)
#define REQUIRE_SUCCESS_ACTION(stat,target,action) \
do { if (((unsigned long)(stat)>>31) != 0) { REQUIRE_REPORT(#target,__FILE__,__LINE__); {{action;} goto target;} } } while (0)
#define REQUIRE_SUCCESS_QUIET(stat,target) \
do { if (((unsigned long)(stat)>>31) != 0) goto target; } while (0)
#define RETQUIRE_SUCCESS_ACTION_TQUIET(stat,target,action) \
#define REQUIRE_SUCCESS_ACTION_QUIET(stat,target,action) \
do { if (((unsigned long)(stat)>>31) != 0) {{action;} goto target;} } while (0)
//
// RETQUIRE_NOERR reports the error if the error value is non-zero
// REQUIRE_NOERR reports the error if the error value is non-zero
// Ideally, this should report the error value as well
//
#define CHECK_NOERR(err) HX_ASSERT((err) == 0)
#define RETQUIRE_NOERR_RETURN(err,returned) \
do { if ((err) != 0) { RETQUIRE_REPORT("Toolbox error, Aborting...",__FILE__,__LINE__); return (returned); } } while (0)
#define RETQUIRE_NOERR(err,target) \
do { if ((err) != 0) { RETQUIRE_REPORT(#target,__FILE__,__LINE__); goto target; } } while (0)
#define RETQUIRE_NOERR_ACTION(err,target,action) \
do { if ((err) != 0) { RETQUIRE_REPORT(#target,__FILE__,__LINE__); {{action;} goto target;} } } while (0)
#define RETQUIRE_NOERR_TQUIET(err,target) \
#define REQUIRE_NOERR_RETURN(err,returned) \
do { if ((err) != 0) { REQUIRE_REPORT("Toolbox error, Aborting...",__FILE__,__LINE__); return (returned); } } while (0)
#define REQUIRE_NOERR(err,target) \
do { if ((err) != 0) { REQUIRE_REPORT(#target,__FILE__,__LINE__); goto target; } } while (0)
#define REQUIRE_NOERR_ACTION(err,target,action) \
do { if ((err) != 0) { REQUIRE_REPORT(#target,__FILE__,__LINE__); {{action;} goto target;} } } while (0)
#define REQUIRE_NOERR_QUIET(err,target) \
do { if ((err) != 0) goto target; } while (0)
#define RETQUIRE_NOERR_ACTION_TQUIET(err,target,action) \
#define REQUIRE_NOERR_ACTION_QUIET(err,target,action) \
do { if ((err) != 0) {{action;} goto target;} } while (0)
//
// RETQUIRE_NONNULL reports the error if the ptr value is null
// REQUIRE_NONNULL reports the error if the ptr value is null
// Ideally, this should report the error value as well
//
#define CHECK_NONNULL(ptr) HX_ASSERT((ptr) != 0L)
#define CHECK_NULL(ptr) HX_ASSERT((ptr) == 0L)
#define RETQUIRE_NONNULL_VOID_RETURN(ptr) \
do { if ((ptr) == 0L) { RETQUIRE_REPORT(#ptr" is nil, Aborting...",__FILE__,__LINE__); return; } } while (0)
#define RETQUIRE_NONNULL_RETURN(ptr,returned) \
do { if ((ptr) == 0L) { RETQUIRE_REPORT(#ptr" is nil, Aborting...",__FILE__,__LINE__); return (returned); } } while (0)
#define RETQUIRE_NONNULL(ptr,target) \
do { if ((ptr) == 0L) { RETQUIRE_REPORT(#target,__FILE__,__LINE__); goto target; } } while (0)
#define RETQUIRE_NONNULL_ACTION(ptr,target,action) \
do { if ((ptr) == 0L) { RETQUIRE_REPORT(#target,__FILE__,__LINE__); {{action;} goto target;} } } while (0)
#define RETQUIRE_NONNULL_TQUIET(ptr,target) \
#define REQUIRE_NONNULL_VOID_RETURN(ptr) \
do { if ((ptr) == 0L) { REQUIRE_REPORT(#ptr" is nil, Aborting...",__FILE__,__LINE__); return; } } while (0)
#define REQUIRE_NONNULL_RETURN(ptr,returned) \
do { if ((ptr) == 0L) { REQUIRE_REPORT(#ptr" is nil, Aborting...",__FILE__,__LINE__); return (returned); } } while (0)
#define REQUIRE_NONNULL(ptr,target) \
do { if ((ptr) == 0L) { REQUIRE_REPORT(#target,__FILE__,__LINE__); goto target; } } while (0)
#define REQUIRE_NONNULL_ACTION(ptr,target,action) \
do { if ((ptr) == 0L) { REQUIRE_REPORT(#target,__FILE__,__LINE__); {{action;} goto target;} } } while (0)
#define REQUIRE_NONNULL_QUIET(ptr,target) \
do { if ((ptr) == 0L) goto target; } while (0)
#define RETQUIRE_NONNULL_ACTION_TQUIET(ptr,target,action) \
#define REQUIRE_NONNULL_ACTION_QUIET(ptr,target,action) \
do { if ((ptr) == 0L) {{action;} goto target;} } while (0)
// lower case versions make source code more readable
@ -690,38 +690,38 @@ class LogInfo
#define check(stmt) CHECK(stmt)
#define require_void_return(stmt) RETQUIRE_VOID_RETURN(stmt)
#define require_return_void(stmt) RETQUIRE_VOID_RETURN(stmt)
#define require_return(stmt,returned) RETQUIRE_RETURN(stmt,returned)
#define require(stmt,target) RETQUIRE(stmt,target)
#define require_action(stmt,target,action) RETQUIRE_ACTION(stmt,target,action)
#define require_quiet(stmt,target) RETQUIRE_TQUIET(stmt,target)
#define require_action_quiet(stmt,target,action) RETQUIRE_ACTION_TQUIET(stmt,target,action)
#define require_void_return(stmt) REQUIRE_VOID_RETURN(stmt)
#define require_return_void(stmt) REQUIRE_VOID_RETURN(stmt)
#define require_return(stmt,returned) REQUIRE_RETURN(stmt,returned)
#define require(stmt,target) REQUIRE(stmt,target)
#define require_action(stmt,target,action) REQUIRE_ACTION(stmt,target,action)
#define require_quiet(stmt,target) REQUIRE_QUIET(stmt,target)
#define require_action_quiet(stmt,target,action) REQUIRE_ACTION_QUIET(stmt,target,action)
#define check_success(stat) CHECK_SUCCESS(stat)
#define require_success(stat,target) RETQUIRE_SUCCESS(stat,target)
#define require_success_action(stat,target,action) RETQUIRE_SUCCESS_ACTION(stat,target,action)
#define require_success_quiet(stat,target) RETQUIRE_SUCCESS_TQUIET(stat,target)
#define require_success_action_quiet(stat,target,action) RETQUIRE_SUCCESS_ACTION_TQUIET(stat,target,action)
#define require_success(stat,target) REQUIRE_SUCCESS(stat,target)
#define require_success_action(stat,target,action) REQUIRE_SUCCESS_ACTION(stat,target,action)
#define require_success_quiet(stat,target) REQUIRE_SUCCESS_QUIET(stat,target)
#define require_success_action_quiet(stat,target,action) REQUIRE_SUCCESS_ACTION_QUIET(stat,target,action)
#define check_noerr(err) CHECK_NOERR(err)
#define require_noerr_return(err,returned) RETQUIRE_NOERR_RETURN(err,returned)
#define require_noerr(err,target) RETQUIRE_NOERR(err,target)
#define require_noerr_action(err,target,action) RETQUIRE_NOERR_ACTION(err,target,action)
#define require_noerr_quiet(err,target) RETQUIRE_NOERR_TQUIET(err,target)
#define require_noerr_action_quiet(err,target,action) RETQUIRE_NOERR_ACTION_TQUIET(err,target,action)
#define require_noerr_return(err,returned) REQUIRE_NOERR_RETURN(err,returned)
#define require_noerr(err,target) REQUIRE_NOERR(err,target)
#define require_noerr_action(err,target,action) REQUIRE_NOERR_ACTION(err,target,action)
#define require_noerr_quiet(err,target) REQUIRE_NOERR_QUIET(err,target)
#define require_noerr_action_quiet(err,target,action) REQUIRE_NOERR_ACTION_QUIET(err,target,action)
#define check_nonnull(ptr) CHECK_NONNULL(ptr)
#define check_null(ptr) CHECK_NULL(ptr)
#define require_nonnull_void_return(ptr) RETQUIRE_NONNULL_VOID_RETURN(ptr)
#define require_nonnull_return(ptr,returned) RETQUIRE_NONNULL_RETURN(ptr,returned)
#define require_nonnull(ptr,target) RETQUIRE_NONNULL(ptr,target)
#define require_nonnull_action(ptr,target,action) RETQUIRE_NONNULL_ACTION(ptr,target,action)
#define require_nonnull_quiet(ptr,target) RETQUIRE_NONNULL_TQUIET(ptr,target)
#define require_nonnull_action_quiet(ptr,target,action) RETQUIRE_NONNULL_ACTION_TQUIET(ptr,target,action)
#define require_nonnull_void_return(ptr) REQUIRE_NONNULL_VOID_RETURN(ptr)
#define require_nonnull_return(ptr,returned) REQUIRE_NONNULL_RETURN(ptr,returned)
#define require_nonnull(ptr,target) REQUIRE_NONNULL(ptr,target)
#define require_nonnull_action(ptr,target,action) REQUIRE_NONNULL_ACTION(ptr,target,action)
#define require_nonnull_quiet(ptr,target) REQUIRE_NONNULL_QUIET(ptr,target)
#define require_nonnull_action_quiet(ptr,target,action) REQUIRE_NONNULL_ACTION_QUIET(ptr,target,action)
#endif // !_HXASSERT_H_

@ -224,7 +224,7 @@ DECLARE_INTERFACE_(IHXStream, IUnknown)
/************************************************************************
* Method:
* IHXStream::ReportRebuffertqStatus
* IHXStream::ReportRebufferStatus
* Purpose:
* Call this method to report to the playback context that the
* available data has dropped to a critically low level, and that
@ -235,12 +235,12 @@ DECLARE_INTERFACE_(IHXStream, IUnknown)
* NOTE: The values of unNeeded and unAvailable are used to indicate
* the general status of the rebuffering effort. For example, if a
* renderer has "run dry" and needs 5 data packets to play smoothly
* again, it should call ReportRebuffertqStatus() with 5,0 then as
* again, it should call ReportRebufferStatus() with 5,0 then as
* packet arrive it should call again with 5,1; 5,2... and eventually
* 5,5.
*
*/
STDTQT_METHOD(ReportRebuffertqStatus) (THIS_
STDTQT_METHOD(ReportRebufferStatus) (THIS_
UINT8 unNeeded,
UINT8 unAvailable) PURE;
@ -302,20 +302,20 @@ DECLARE_INTERFACE_(IHXStream2, IHXStream)
{
/************************************************************************
* Method:
* IHXStream2::ReportAudioRebuffertqStatus
* IHXStream2::ReportAudioRebufferStatus
* Purpose:
* For audio only, when it's called, the rebuffer will only occur when
* there aren't any packets in the transport and the amount of audio in
* audio device falls below the minimum startup audio pushdown(1000ms
* by default)
*
* Non-audio renderers should still call ReportRebuffertqStatus(), the
* Non-audio renderers should still call ReportRebufferStatus(), the
* rebuffer will occur when the core drains out all the packets from
* the transport buffer
*
* The rest semantic are the same between the 2 calls.
*/
STDTQT_METHOD(ReportAudioRebuffertqStatus) (THIS_
STDTQT_METHOD(ReportAudioRebufferStatus) (THIS_
UINT8 unNeeded,
UINT8 unAvailable) PURE;
};
@ -1129,7 +1129,7 @@ DECLARE_INTERFACE_(IHXLayoutStream, IUnknown)
* Method:
* IHXLayoutStream::GetProperty
* Purpose:
* Get tqlayout stream property
* Get layout stream property
*
*
*/
@ -1140,7 +1140,7 @@ DECLARE_INTERFACE_(IHXLayoutStream, IUnknown)
* Method:
* IHXLayoutStream::SetProperty
* Purpose:
* Set tqlayout stream property
* Set layout stream property
*
*/
STDTQT_METHOD(SetProperties) (THIS_

@ -2252,7 +2252,7 @@ typedef enum
NI_OPER_STATUS_CONNECTING,
NI_OPER_STATUS_CONNECTED,
NI_OPER_STATUS_OPERATIONAL
} NItqStatus;
} NIStatus;
typedef enum
{
@ -2290,7 +2290,7 @@ struct NIInfo
{
NIType type;
IHXBuffer* pDescription;
NItqStatus status;
NIStatus status;
UINT32 ulIPv4Index;
UINT32 ulIPv6Index;
UINT32 ulMTU;

@ -87,7 +87,7 @@ typedef _INTERFACE IHXPostDataHandler IHXPostDataHandler;
* Purpose:
* Flags for file response Advise method
*/
#define HX_FILERESPONSEADVISE_RETQUIREFULLREAD 1
#define HX_FILERESPONSEADVISE_REQUIREFULLREAD 1
#if defined(_UNIX) || defined(_WINDOWS)

@ -695,10 +695,10 @@ DEFINE_GUID_ENUM(IID_IHXSourceHandler, 0xb2646da0, 0x410a, 0x11d6,
* Description:
* Interfaces related to get pending status from objects
* Interfaces:
* IHXPendingtqStatus: {00001100-0901-11d1-8B06-00A024406D59}
* IHXPendingStatus: {00001100-0901-11d1-8B06-00A024406D59}
*/
#ifndef _HXPENDS_H_
DEFINE_GUID_ENUM(IID_IHXPendingtqStatus, 0x00001100, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59)
DEFINE_GUID_ENUM(IID_IHXPendingStatus, 0x00001100, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59)
#endif
/*
* File:

@ -531,7 +531,7 @@ DECLARE_INTERFACE_(IHXRegistry, IUnknown)
* Returns the count of the number of Properties under the one
* whose name is specified in "pName".
*
* pName - IN - name of the Property whose number of tqchildren is to be
* pName - IN - name of the Property whose number of children is to be
* retrieved
*/
STDMETHOD_(INT32, GetNumPropsByName) (THIS_
@ -544,7 +544,7 @@ DECLARE_INTERFACE_(IHXRegistry, IUnknown)
* Returns the count of the number of Properties under the one
* whose unique id is specified in "ulId".
*
* ulId - IN - unique id of the Property whose number of tqchildren is
* ulId - IN - unique id of the Property whose number of children is
* to be retrieved
*/
STDMETHOD_(INT32, GetNumPropsById) (THIS_
@ -1594,7 +1594,7 @@ DECLARE_INTERFACE_(IHXRegistry2, IUnknown)
* Returns the count of the number of Properties under the one
* whose name is specified in "pName".
*
* pName - IN - name of the Property whose number of tqchildren is to be
* pName - IN - name of the Property whose number of children is to be
* retrieved
*/
STDMETHOD_(INT32, GetNumPropsByName) (THIS_
@ -1607,7 +1607,7 @@ DECLARE_INTERFACE_(IHXRegistry2, IUnknown)
* Returns the count of the number of Properties under the one
* whose unique id is specified in "ulId".
*
* ulId - IN - unique id of the Property whose number of tqchildren is
* ulId - IN - unique id of the Property whose number of children is
* to be retrieved
*/
STDMETHOD_(INT32, GetNumPropsById) (THIS_
@ -2089,10 +2089,10 @@ DECLARE_INTERFACE_(IHXRegistry2, IUnknown)
* Method:
* IHXRegistry2::GetChildIdListByName
* Purpose:
* Get a array which enumerates all of the tqchildren under a
* Get a array which enumerates all of the children under a
* property by id.
*
* pName - IN - name of the Property whose tqchildren are to be enumerated.
* pName - IN - name of the Property whose children are to be enumerated.
* pValues - OUT - array of unique Property id's.
* ulCount - OUT - size of the returned pValues array.
*
@ -2108,10 +2108,10 @@ DECLARE_INTERFACE_(IHXRegistry2, IUnknown)
* Method:
* IHXRegistry2::GetChildIdListById
* Purpose:
* Get a array which enumerates all of the tqchildren under a
* Get a array which enumerates all of the children under a
* property by id.
*
* ulId - IN - unique id of the Property whose tqchildren are to be enumerated.
* ulId - IN - unique id of the Property whose children are to be enumerated.
* pValues - OUT - array of unique Property id's.
* ulCount - OUT - size of the returned pValues array.
*

@ -740,7 +740,7 @@ DEFINE_GUID_ENUM(IID_IHXMMSResendResponse, 0xa581f3a4, 0xc508, 0x4800, 0xba, 0xd
*
*/
DEFINE_GUID_ENUM(IID_IHXDistributedLicenseRequester, 0x00005702, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59)
DEFINE_GUID_ENUM(IID_IHXDistributedLicenseRequesttqStatus, 0x00005703, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59)
DEFINE_GUID_ENUM(IID_IHXDistributedLicenseRequestStatus, 0x00005703, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59)
/*
* File: hxauto.h

@ -27,8 +27,8 @@ typedef LONG32 HX_RESULT;
# define MAKE_HRESULT(sev,fac,code) \
((HRESULT) (((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | \
((unsigned long)(code))) )
# define SUCCEEDED(tqStatus) (((unsigned long)(tqStatus)>>31) == 0)
# define FAILED(tqStatus) (((unsigned long)(tqStatus)>>31) != 0)
# define SUCCEEDED(Status) (((unsigned long)(Status)>>31) == 0)
# define FAILED(Status) (((unsigned long)(Status)>>31) != 0)
#else
# ifndef _HRESULT_DEFINED
typedef LONG32 HRESULT;
@ -120,7 +120,7 @@ typedef LONG32 HX_RESULT;
#define HXR_WM_OPL_NOT_SUPPORTED MAKE_HX_RESULT(1,SS_GLO,36) // 80040024
// $Private:
/* tqStatus Code for backup/restore*/
/* Status Code for backup/restore*/
#define HXR_RESTORATION_COMPLETE MAKE_HX_RESULT(1,SS_GLO,27) // 8004001b
#define HXR_BACKUP_COMPLETE MAKE_HX_RESULT(1,SS_GLO,28) // 8004001c
#define HXR_TLC_NOT_CERTIFIED MAKE_HX_RESULT(1,SS_GLO,29) // 8004001d
@ -319,7 +319,7 @@ typedef LONG32 HX_RESULT;
#define HXR_RMT_INVALID_ENDTIME MAKE_HX_RESULT(1,SS_RMT,2) // 800403c2
#define HXR_RMT_MISSING_INPUT_FILE MAKE_HX_RESULT(1,SS_RMT,3) // 800403c3
#define HXR_RMT_MISSING_OUTPUT_FILE MAKE_HX_RESULT(1,SS_RMT,4) // 800403c4
#define HXR_RMT_INPUT_ETQUALS_OUTPUT_FILE MAKE_HX_RESULT(1,SS_RMT,5) // 800403c5
#define HXR_RMT_INPUT_EQUALS_OUTPUT_FILE MAKE_HX_RESULT(1,SS_RMT,5) // 800403c5
#define HXR_RMT_UNSUPPORTED_AUDIO_VERSION MAKE_HX_RESULT(1,SS_RMT,6) // 800403c6
#define HXR_RMT_DIFFERENT_AUDIO MAKE_HX_RESULT(1,SS_RMT,7) // 800403c7
#define HXR_RMT_DIFFERENT_VIDEO MAKE_HX_RESULT(1,SS_RMT,8) // 800403c8
@ -463,11 +463,11 @@ typedef LONG32 HX_RESULT;
#define HXR_SE_MAX_FAILED_AUTHENTICATIONS MAKE_HX_RESULT(1, SS_SAM, 33) // 80041921
#define HXR_SE_AUTH_ACCESS_DENIED MAKE_HX_RESULT(1, SS_SAM, 34) // 80041922
#define HXR_SE_AUTH_UUID_READ_ONLY MAKE_HX_RESULT(1, SS_SAM, 35) // 80041923
#define HXR_SE_AUTH_UUID_NOT_UNITQUE MAKE_HX_RESULT(1, SS_SAM, 36) // 80041924
#define HXR_SE_AUTH_UUID_NOT_UNIQUE MAKE_HX_RESULT(1, SS_SAM, 36) // 80041924
#define HXR_SE_AUTH_NO_SUCH_USER MAKE_HX_RESULT(1, SS_SAM, 37) // 80041925
#define HXR_SE_AUTH_REGISTRATION_SUCCEEDED MAKE_HX_RESULT(1, SS_SAM, 38) // 80041926
#define HXR_SE_AUTH_REGISTRATION_FAILED MAKE_HX_RESULT(1, SS_SAM, 39) // 80041927
#define HXR_SE_AUTH_REGISTRATION_GUID_RETQUIRED MAKE_HX_RESULT(1, SS_SAM, 40) // 80041928
#define HXR_SE_AUTH_REGISTRATION_GUID_REQUIRED MAKE_HX_RESULT(1, SS_SAM, 40) // 80041928
#define HXR_SE_AUTH_UNREGISTERED_PLAYER MAKE_HX_RESULT(1, SS_SAM, 41) // 80041929
#define HXR_SE_AUTH_TIME_EXPIRED MAKE_HX_RESULT(1, SS_SAM, 42) // 8004192a
#define HXR_SE_AUTH_NO_TIME_LEFT MAKE_HX_RESULT(1, SS_SAM, 43) // 8004192b

@ -113,7 +113,7 @@ typedef TBool BOOL;
#endif
#define ARE_BOOLS_ETQUAL(a,b) (((a) && (b)) || (!(a) && !(b)))
#define ARE_BOOLS_EQUAL(a,b) (((a) && (b)) || (!(a) && !(b)))
#ifndef HX_BITFIELD
typedef unsigned char HX_BITFIELD;

@ -614,9 +614,9 @@ DECLARE_INTERFACE_(IHXSiteSupplier, IUnknown)
* Method:
* IHXSiteSupplier::BeginChangeLayout
* Purpose:
* Called to inform the site supplier a tqlayout change has beginning
* Called to inform the site supplier a layout change has beginning
* it can expect to receive SitesNeeded() and SitesNotNeeded() calls
* while a tqlayout change is in progress,
* while a layout change is in progress,
*/
STDTQT_METHOD(BeginChangeLayout) (THIS) PURE;
@ -624,7 +624,7 @@ DECLARE_INTERFACE_(IHXSiteSupplier, IUnknown)
* Method:
* IHXSiteSupplier::DoneChangeLayout
* Purpose:
* Called to inform the site supplier the tqlayout change has been
* Called to inform the site supplier the layout change has been
* completed.
*/
STDTQT_METHOD(DoneChangeLayout) (THIS) PURE;
@ -642,7 +642,7 @@ DECLARE_INTERFACE_(IHXSiteSupplier, IUnknown)
*
* Interface implemented by the client core. This interface is called
* by users of the client core to inform it of IHXSite's which are
* available for tqlayout of renderers
* available for layout of renderers
*
* IID_IHXSiteManager:
*
@ -923,7 +923,7 @@ DECLARE_INTERFACE_(IHXSiteFullScreen, IUnknown)
*
* Purpose:
*
* Allow tqlayout site groups to be added and removed
* Allow layout site groups to be added and removed
*
* IID_IHXLayoutSiteGroupManager:
*
@ -1091,7 +1091,7 @@ DECLARE_INTERFACE_(IHXStatusMessage, IUnknown)
* IHXStatusMessage methods
*/
STDTQT_METHOD(SettqStatus) (THIS_ const char* pText) PURE;
STDTQT_METHOD(SetStatus) (THIS_ const char* pText) PURE;
};
// $Private:

@ -835,7 +835,7 @@ HelixSimplePlayer::~HelixSimplePlayer()
{
tearDown();
// only now tqinvalidate the device, not whenever we teardown
// only now invalidate the device, not whenever we teardown
delete [] m_device;
}

@ -23,6 +23,7 @@ class HelixSimplePlayerAudioStreamInfoResponse;
#include <limits.h>
#include <sys/param.h>
#include <pthread.h>
#include <cstring>
#include <vector>
#include <config.h>
#include <iostream>

@ -15,6 +15,8 @@
the alsa guys
***************************************************************************/
#include <cstdlib>
#include <cstring>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/wait.h>
@ -69,7 +71,7 @@ PlayerControl::PlayerControl() : m_eq_enabled(false), m_preamp(0), m_err(0), iam
m_inited(false), m_api( HelixSimplePlayer::OSS ), m_device(0), mimehead(0), mimelistlen(0),
m_numPlugins(0), m_pluginInfo(0)
{
memset(m_tqchildren, 0, sizeof(m_tqchildren));
memset(m_children, 0, sizeof(m_children));
}
PlayerControl::~PlayerControl()
@ -100,7 +102,7 @@ void PlayerControl::init(const char *corelibpath, const char *pluginslibpath, co
return;
}
memset(&m_tqchildren, 0, numPlayers * sizeof(struct playerChildren));
memset(&m_children, 0, numPlayers * sizeof(struct playerChildren));
m_inited = false;
@ -121,30 +123,30 @@ void PlayerControl::init(const char *corelibpath, const char *pluginslibpath, co
{
if (pmapped)
{
m_tqchildren[i].current_time = &(pmapped[i].current_time);
m_tqchildren[i].duration = &(pmapped[i].duration);
m_tqchildren[i].md = &(pmapped[i].md);
m_children[i].current_time = &(pmapped[i].current_time);
m_children[i].duration = &(pmapped[i].duration);
m_children[i].md = &(pmapped[i].md);
m_tqchildren[i].m_current = &(pmapped[i].m_current);
m_tqchildren[i].m_consumed = &(pmapped[i].m_consumed);
//m_tqchildren[i].q = pmapped[i].q;
m_children[i].m_current = &(pmapped[i].m_current);
m_children[i].m_consumed = &(pmapped[i].m_consumed);
//m_children[i].q = pmapped[i].q;
//for (int j=0; j<NUM_SCOPEBUFS; j++)
//{
// m_tqchildren[i].q[j].allocd = false;
// m_tqchildren[i].q[j].buf = pmapped[i].b[j];
// m_children[i].q[j].allocd = false;
// m_children[i].q[j].buf = pmapped[i].b[j];
//}
}
err = pipe(m_tqchildren[i].m_pipeA);
err |= pipe(m_tqchildren[i].m_pipeB);
err = pipe(m_children[i].m_pipeA);
err |= pipe(m_children[i].m_pipeB);
if ( !err && (iamparent = fork()) )
{
// parent
print2stderr("%%%%%% parent initializes player %d\n", i);
// parent's m_pid remains 0
m_tqchildren[i].m_pid = iamparent;
close(m_tqchildren[i].m_pipeA[1]); // parent uses A for reading
close(m_tqchildren[i].m_pipeB[0]); // and B for writing
m_children[i].m_pid = iamparent;
close(m_children[i].m_pipeA[1]); // parent uses A for reading
close(m_children[i].m_pipeB[0]); // and B for writing
}
else if (!err)
{
@ -153,17 +155,17 @@ void PlayerControl::init(const char *corelibpath, const char *pluginslibpath, co
cerr << "%%%%%% child initializes as player " << i << endl;;
m_index = i; // child's index is saved
close(m_tqchildren[i].m_pipeA[0]); // child uses A for writing
close(m_tqchildren[i].m_pipeB[1]); // and B for reading
close(m_children[i].m_pipeA[0]); // child uses A for writing
close(m_children[i].m_pipeB[1]); // and B for reading
break;
}
}
if (!iamparent) // tqchildren stay here, parents return
if (!iamparent) // children stay here, parents return
{
int rfd = m_tqchildren[m_index].m_pipeB[0];
int wfd = m_tqchildren[m_index].m_pipeA[1];
int rfd = m_children[m_index].m_pipeB[0];
int wfd = m_children[m_index].m_pipeA[1];
int n;
struct timeval timeout;
HSPPlayerControlled *player = 0;
@ -237,7 +239,7 @@ void PlayerControl::init(const char *corelibpath, const char *pluginslibpath, co
if (m_inited)
{
if (pmapped)
*m_tqchildren[m_index].current_time = 0;
*m_children[m_index].current_time = 0;
if (sz == sizeof(unsigned long) + 1)
{
@ -397,7 +399,7 @@ void PlayerControl::init(const char *corelibpath, const char *pluginslibpath, co
{
player->clearScopeQ(0);
if (pmapped)
*m_tqchildren[m_index].m_consumed = *m_tqchildren[m_index].m_current = 0;
*m_children[m_index].m_consumed = *m_children[m_index].m_current = 0;
}
break;
case TEARDOWN:
@ -437,36 +439,36 @@ void PlayerControl::init(const char *corelibpath, const char *pluginslibpath, co
playing = false;
if (pmapped)
{
*m_tqchildren[m_index].current_time = 0;
*m_tqchildren[m_index].duration = 0;
*m_children[m_index].current_time = 0;
*m_children[m_index].duration = 0;
}
}
if (pmapped)
{
*m_tqchildren[m_index].current_time = player->where(0);
*m_tqchildren[m_index].duration = player->duration(0);
*m_children[m_index].current_time = player->where(0);
*m_children[m_index].duration = player->duration(0);
HelixSimplePlayer::metaData *md = player->getMetaData(0);
if (md)
memcpy((void *) m_tqchildren[m_index].md, (void *) md, sizeof(HelixSimplePlayer::metaData));
memcpy((void *) m_children[m_index].md, (void *) md, sizeof(HelixSimplePlayer::metaData));
struct DelayQueue *item;
//int j;
while ((item = player->getScopeBuf(0)))
{
//j = (*m_tqchildren[m_index].m_current + 1) % NUM_SCOPEBUFS;
//j = (*m_children[m_index].m_current + 1) % NUM_SCOPEBUFS;
//cerr << "player:" << m_index << " j=" << j << " time=" << item->time << " etime=" << item->etime << " len=" << item->len << endl;
//m_tqchildren[m_index].q[j].len = item->len;
//m_tqchildren[m_index].q[j].time = item->time;
//m_tqchildren[m_index].q[j].etime = item->etime;
//m_tqchildren[m_index].q[j].nchan = item->nchan;
//m_tqchildren[m_index].q[j].bps = item->bps;
//m_tqchildren[m_index].q[j].tps = item->tps;
//m_tqchildren[m_index].q[j].spb = item->spb;
//memcpy((void *)m_tqchildren[m_index].q[j].buf, (void *) item->buf, item->len );
//*m_tqchildren[m_index].m_current = j;
//m_children[m_index].q[j].len = item->len;
//m_children[m_index].q[j].time = item->time;
//m_children[m_index].q[j].etime = item->etime;
//m_children[m_index].q[j].nchan = item->nchan;
//m_children[m_index].q[j].bps = item->bps;
//m_children[m_index].q[j].tps = item->tps;
//m_children[m_index].q[j].spb = item->spb;
//memcpy((void *)m_children[m_index].q[j].buf, (void *) item->buf, item->len );
//*m_children[m_index].m_current = j;
//cerr << "player:" << m_index << " time=" << item->time << " etime=" << item->etime << endl;
sendscopebuf(wfd, item);
delete item;
@ -488,15 +490,15 @@ void PlayerControl::init(const char *corelibpath, const char *pluginslibpath, co
sendsetdevice();
sendinit();
// wait for ready from tqchildren
// wait for ready from children
while (!done && !dead)
{
dispatch();
done = true;
for (i=0; i<numPlayers; i++)
{
done &= m_tqchildren[i].isready;
dead |= m_tqchildren[i].isdead;
done &= m_children[i].isready;
dead |= m_children[i].isdead;
}
}
@ -540,12 +542,12 @@ void PlayerControl::tearDown()
{
if (m_inited)
{
sendteardown(m_tqchildren[i].m_pipeB[1]);
close(m_tqchildren[i].m_pipeB[1]);
close(m_tqchildren[i].m_pipeA[0]);
cerr << "About to waitpid for pid " << m_tqchildren[i].m_pid << endl;
kill(m_tqchildren[i].m_pid, SIGTERM);
waitpid(m_tqchildren[i].m_pid, &tmp, 0);
sendteardown(m_children[i].m_pipeB[1]);
close(m_children[i].m_pipeB[1]);
close(m_children[i].m_pipeA[0]);
cerr << "About to waitpid for pid " << m_children[i].m_pid << endl;
kill(m_children[i].m_pid, SIGTERM);
waitpid(m_children[i].m_pid, &tmp, 0);
}
}
}
@ -553,16 +555,16 @@ void PlayerControl::tearDown()
void PlayerControl::start(int playerIndex, bool fadein, unsigned long fadetime)
{
m_tqchildren[playerIndex].isplaying = true;
m_children[playerIndex].isplaying = true;
if (pmapped)
*m_tqchildren[playerIndex].m_consumed = *m_tqchildren[playerIndex].m_current = 0;
sendstart(m_tqchildren[playerIndex].m_pipeB[1], fadein, fadetime);
*m_children[playerIndex].m_consumed = *m_children[playerIndex].m_current = 0;
sendstart(m_children[playerIndex].m_pipeB[1], fadein, fadetime);
}
int PlayerControl::setURL(const char *url, int playerIndex, bool islocal)
{
m_tqchildren[playerIndex].islocal = islocal;
if (sendsetURL(m_tqchildren[playerIndex].m_pipeB[1], url, islocal))
m_children[playerIndex].islocal = islocal;
if (sendsetURL(m_children[playerIndex].m_pipeB[1], url, islocal))
return 0;
return -1;
@ -570,7 +572,7 @@ int PlayerControl::setURL(const char *url, int playerIndex, bool islocal)
bool PlayerControl::done(int playerIndex)
{
return (!m_tqchildren[playerIndex].isplaying);
return (!m_children[playerIndex].isplaying);
}
void PlayerControl::stop(int playerIndex)
@ -582,30 +584,30 @@ void PlayerControl::stop(int playerIndex)
}
else
{
m_tqchildren[playerIndex].isplaying = false;
sendstop(m_tqchildren[playerIndex].m_pipeB[1]);
m_children[playerIndex].isplaying = false;
sendstop(m_children[playerIndex].m_pipeB[1]);
}
}
void PlayerControl::pause(int playerIndex)
{
sendpause(m_tqchildren[playerIndex].m_pipeB[1]);
sendpause(m_children[playerIndex].m_pipeB[1]);
}
void PlayerControl::resume(int playerIndex)
{
sendresume(m_tqchildren[playerIndex].m_pipeB[1]);
sendresume(m_children[playerIndex].m_pipeB[1]);
}
void PlayerControl::seek(unsigned long pos, int playerIndex)
{
sendmessage(m_tqchildren[playerIndex].m_pipeB[1], SEEK, (unsigned char *) &pos, sizeof(unsigned long));
sendmessage(m_children[playerIndex].m_pipeB[1], SEEK, (unsigned char *) &pos, sizeof(unsigned long));
}
unsigned long PlayerControl::where(int playerIndex) const
{
if (pmapped)
return *m_tqchildren[playerIndex].current_time;
return *m_children[playerIndex].current_time;
else
return 0;
}
@ -613,7 +615,7 @@ unsigned long PlayerControl::where(int playerIndex) const
unsigned long PlayerControl::duration(int playerIndex) const
{
if (pmapped)
return *m_tqchildren[playerIndex].duration;
return *m_children[playerIndex].duration;
else
return 0;
}
@ -627,7 +629,7 @@ void PlayerControl::setVolume(unsigned long vol)
{
m_volume = vol;
for (int i = 0; i < nNumPlayers; i++)
sendsetvolume(m_tqchildren[i].m_pipeB[1], vol);
sendsetvolume(m_children[i].m_pipeB[1], vol);
}
void PlayerControl::dispatch()
@ -647,8 +649,8 @@ void PlayerControl::dispatch()
for (i=0; i<nNumPlayers; i++)
{
rfd = m_tqchildren[i].m_pipeA[0];
wfd = m_tqchildren[i].m_pipeB[1];
rfd = m_children[i].m_pipeA[0];
wfd = m_children[i].m_pipeB[1];
FD_SET(rfd, &rdset);
FD_SET(wfd, &wrset); // really should check to see if we can write, but not gonna
if (rfd > n)
@ -661,8 +663,8 @@ void PlayerControl::dispatch()
ntot = select(n + 1, &rdset, 0, 0, &timeout);
for (i=0; ntot && i < nNumPlayers; i++)
{
rfd = m_tqchildren[i].m_pipeA[0];
wfd = m_tqchildren[i].m_pipeB[1];
rfd = m_children[i].m_pipeA[0];
wfd = m_children[i].m_pipeB[1];
if ( FD_ISSET(rfd, &rdset) )
{
msgid m;
@ -675,14 +677,14 @@ void PlayerControl::dispatch()
{
case READY:
print2stderr("CHILD %d is READY\n", i);
m_tqchildren[i].isready = true;;
m_children[i].isready = true;;
break;
case DONE:
print2stderr("CHILD %d is DONE\n", i);
if (!sz)
{
m_tqchildren[i].isplaying = false;
m_children[i].isplaying = false;
clearScopeQ(i);
play_finished(i);
}
@ -852,7 +854,7 @@ void PlayerControl::dispatch()
}
else
{
m_tqchildren[i].isdead = true;
m_children[i].isdead = true;
return; // should never happen
}
}
@ -860,16 +862,16 @@ void PlayerControl::dispatch()
for (i=0; pmapped && i<nNumPlayers; i++)
{
while (*m_tqchildren[i].m_consumed != *m_tqchildren[i].m_current)
while (*m_children[i].m_consumed != *m_children[i].m_current)
{
addScopeBuf(&m_tqchildren[i].q[*m_tqchildren[i].m_consumed], i);
addScopeBuf(&m_children[i].q[*m_children[i].m_consumed], i);
//cerr << "j=" << *m_tqchildren[i].m_consumed <<
// " time=" << m_tqchildren[i].q[*m_tqchildren[i].m_consumed].time <<
// " etime=" << m_tqchildren[i].q[*m_tqchildren[i].m_consumed].etime <<
// " len=" << m_tqchildren[i].q[*m_tqchildren[i].m_consumed].len << endl;
//cerr << "j=" << *m_children[i].m_consumed <<
// " time=" << m_children[i].q[*m_children[i].m_consumed].time <<
// " etime=" << m_children[i].q[*m_children[i].m_consumed].etime <<
// " len=" << m_children[i].q[*m_children[i].m_consumed].len << endl;
*m_tqchildren[i].m_consumed = (*m_tqchildren[i].m_consumed + 1) % NUM_SCOPEBUFS;
*m_children[i].m_consumed = (*m_children[i].m_consumed + 1) % NUM_SCOPEBUFS;
}
}
}
@ -881,37 +883,37 @@ void PlayerControl::cleanUpStream(int playerIndex)
bool PlayerControl::isPlaying(int playerIndex) const
{
return m_tqchildren[playerIndex].isplaying;
return m_children[playerIndex].isplaying;
}
bool PlayerControl::isLocal(int playerIndex) const
{
return m_tqchildren[playerIndex].islocal;
return m_children[playerIndex].islocal;
}
void PlayerControl::setFadeout(bool fadeout, unsigned long fadelength, int playerIndex)
{
sendsetfade(m_tqchildren[playerIndex].m_pipeB[1], fadeout, fadelength);
sendsetfade(m_children[playerIndex].m_pipeB[1], fadeout, fadelength);
}
void PlayerControl::addScopeBuf(struct DelayQueue *item, int playerIndex)
{
if (playerIndex >=0 && playerIndex < nNumPlayers)
{
if (m_tqchildren[playerIndex].scopebuftail)
if (m_children[playerIndex].scopebuftail)
{
item->fwd = 0;
m_tqchildren[playerIndex].scopebuftail->fwd = item;
m_tqchildren[playerIndex].scopebuftail = item;
m_tqchildren[playerIndex].scopecount++;
m_children[playerIndex].scopebuftail->fwd = item;
m_children[playerIndex].scopebuftail = item;
m_children[playerIndex].scopecount++;
}
else
{
item->fwd = 0;
m_tqchildren[playerIndex].scopebufhead = item;
m_tqchildren[playerIndex].scopebuftail = item;
m_tqchildren[playerIndex].scopecount = 1;
m_children[playerIndex].scopebufhead = item;
m_children[playerIndex].scopebuftail = item;
m_children[playerIndex].scopecount = 1;
}
}
}
@ -920,14 +922,14 @@ DelayQueue *PlayerControl::getScopeBuf(int playerIndex)
{
if (playerIndex >=0 && playerIndex < nNumPlayers)
{
struct DelayQueue *item = m_tqchildren[playerIndex].scopebufhead;
struct DelayQueue *item = m_children[playerIndex].scopebufhead;
if (item)
{
m_tqchildren[playerIndex].scopebufhead = item->fwd;
m_tqchildren[playerIndex].scopecount--;
if (!m_tqchildren[playerIndex].scopebufhead)
m_tqchildren[playerIndex].scopebuftail = 0;
m_children[playerIndex].scopebufhead = item->fwd;
m_children[playerIndex].scopecount--;
if (!m_children[playerIndex].scopebufhead)
m_children[playerIndex].scopebuftail = 0;
}
return item;
}
@ -937,15 +939,15 @@ DelayQueue *PlayerControl::getScopeBuf(int playerIndex)
int PlayerControl::getScopeCount(int playerIndex)
{
return (playerIndex >= 0 && playerIndex < nNumPlayers ? m_tqchildren[playerIndex].scopecount : 0);
return (playerIndex >= 0 && playerIndex < nNumPlayers ? m_children[playerIndex].scopecount : 0);
}
int PlayerControl::peekScopeTime(unsigned long &t, int playerIndex)
{
if (playerIndex >=0 && playerIndex < nNumPlayers)
{
if (m_tqchildren[playerIndex].scopebufhead)
t = m_tqchildren[playerIndex].scopebufhead->time;
if (m_children[playerIndex].scopebufhead)
t = m_children[playerIndex].scopebufhead->time;
else
return -1;
return 0;
@ -962,7 +964,7 @@ void PlayerControl::clearScopeQ(int playerIndex)
}
else
{
sendscopeclear(m_tqchildren[playerIndex].m_pipeB[1]);
sendscopeclear(m_children[playerIndex].m_pipeB[1]);
struct DelayQueue *item;
while ((item = getScopeBuf(playerIndex)))
if (item->allocd)
@ -976,7 +978,7 @@ void PlayerControl::enableEQ(bool enabled)
unsigned char c = (char) enabled;
for (i=0; i<nNumPlayers; i++)
sendmessage(m_tqchildren[i].m_pipeB[1], ENABLEEQ, (unsigned char *) &c, 1);
sendmessage(m_children[i].m_pipeB[1], ENABLEEQ, (unsigned char *) &c, 1);
m_eq_enabled = enabled;
}
@ -1021,7 +1023,7 @@ int PlayerControl::getMimeListLen() const
HelixSimplePlayer::metaData *PlayerControl::getMetaData(int playerIndex )
{
return m_tqchildren[playerIndex].md;
return m_children[playerIndex].md;
}
bool PlayerControl::sendsetoutputsink()
@ -1031,7 +1033,7 @@ bool PlayerControl::sendsetoutputsink()
bool ok = false;
for (i=0; i<nNumPlayers; i++)
ok |= sendmessage(m_tqchildren[i].m_pipeB[1], OUTPUTSINK, (unsigned char *) &c, 1);
ok |= sendmessage(m_children[i].m_pipeB[1], OUTPUTSINK, (unsigned char *) &c, 1);
return ok;
}
@ -1045,7 +1047,7 @@ bool PlayerControl::sendsetdevice()
bool ok = false;
for (i=0; i<nNumPlayers; i++)
ok |= sendmessage(m_tqchildren[i].m_pipeB[1], DEVICE, (unsigned char *) m_device, len + 1);
ok |= sendmessage(m_children[i].m_pipeB[1], DEVICE, (unsigned char *) m_device, len + 1);
return ok;
}
@ -1056,7 +1058,7 @@ bool PlayerControl::sendinit()
bool ok = false;
for (i=0; i<nNumPlayers; i++)
ok |= sendrequest(m_tqchildren[i].m_pipeB[1], INIT);
ok |= sendrequest(m_children[i].m_pipeB[1], INIT);
return ok;
}
@ -1077,12 +1079,12 @@ bool PlayerControl::sendupdateeqgains()
memcpy((void *)&buf[ sizeof(m_preamp) + (i+1) * sizeof(int) ], (void *) &bandGain, sizeof(int));
}
for ( i = 0; i < (uint) nNumPlayers; i++ )
ok |= sendmessage(m_tqchildren[i].m_pipeB[1], UPDATEETQGAINS, buf, sizeof(m_preamp) + (m_equalizerGains.size()+1) * sizeof(int));
ok |= sendmessage(m_children[i].m_pipeB[1], UPDATEETQGAINS, buf, sizeof(m_preamp) + (m_equalizerGains.size()+1) * sizeof(int));
return ok;
}
// tqchildren send this!
// children send this!
bool PlayerControl::sendnotifyuser(unsigned long code, const char *moreinfo, const char *moreinfourl)
{
int len1 = strlen(moreinfo), len2 = strlen(moreinfourl), len;
@ -1095,10 +1097,10 @@ bool PlayerControl::sendnotifyuser(unsigned long code, const char *moreinfo, con
memcpy( (void *) &buf[ len ], (void *) moreinfourl, len2 + 1);
len += len2 + 1;
return (sendmessage(m_tqchildren[m_index].m_pipeA[1], NOTIFYUSER, buf, len));
return (sendmessage(m_children[m_index].m_pipeA[1], NOTIFYUSER, buf, len));
}
// tqchildren send this!
// children send this!
bool PlayerControl::sendinterruptuser(unsigned long code, const char *moreinfo, const char *moreinfourl)
{
int len1 = strlen(moreinfo), len2 = strlen(moreinfourl), len;
@ -1111,21 +1113,21 @@ bool PlayerControl::sendinterruptuser(unsigned long code, const char *moreinfo,
memcpy( (void *) &buf[ len ], (void *) moreinfourl, len2 + 1);
len += len2 + 1;
return (sendmessage(m_tqchildren[m_index].m_pipeA[1], INTERRUPTUSER, buf, len));
return (sendmessage(m_children[m_index].m_pipeA[1], INTERRUPTUSER, buf, len));
}
// tqchildren send this!
// children send this!
bool PlayerControl::sendcontacting(const char *host)
{
int len = strlen(host);
return (sendmessage(m_tqchildren[m_index].m_pipeA[1], CONTACTING, (unsigned char *) host, len + 1));
return (sendmessage(m_children[m_index].m_pipeA[1], CONTACTING, (unsigned char *) host, len + 1));
}
// tqchildren send this!
// children send this!
bool PlayerControl::sendbuffering(int percentage)
{
return (sendmessage(m_tqchildren[m_index].m_pipeA[1], BUFFERING, (unsigned char *) &percentage, sizeof(unsigned long)));
return (sendmessage(m_children[m_index].m_pipeA[1], BUFFERING, (unsigned char *) &percentage, sizeof(unsigned long)));
}

@ -87,7 +87,7 @@ public:
virtual void onContacting(const char */*host*/) {}
virtual void onBuffering(int /*percentage*/) {}
// tqchildren send functions
// children send functions
bool sendnotifyuser(unsigned long code, const char *moreinfo, const char *moreinfourl);
bool sendinterruptuser(unsigned long code, const char *moreinfo, const char *moreinfourl);
bool sendcontacting(const char *host);
@ -129,7 +129,7 @@ private:
DelayQueue *q;
int *m_current;
int *m_consumed;
} m_tqchildren[2];
} m_children[2];
unsigned long m_volume;

@ -44,8 +44,8 @@ what : interface to the Media Application Server (MAS)
//#define DB_CUTOFF -40.0
#define BUFFER_TIME_MS 300
#define POSTOUT_TIME_MS 100
//#define TQUERY_MIX_VOLUME 0
//#define TQUERY_MIX_EPSILON 5
//#define QUERY_MIX_VOLUME 0
//#define QUERY_MIX_EPSILON 5
@ -401,7 +401,7 @@ bool MasEngine::masinit()
warning() << "MAS daemon not running. Starting! Please provide password..." << endl;
// masd seems not to be running, let's try to run it
TQCString cmdline;
cmdline = TQFile::encodeName( KStandardDirs::findExe( TQString::tqfromLatin1( "kdesu" ) ) );
cmdline = TQFile::encodeName( KStandardDirs::findExe( TQString::fromLatin1( "kdesu" ) ) );
// TODO !!!hardcoded path
cmdline += " -n -f /usr/local/mas/log/mas-1.log -c ";
cmdline += "/usr/local/mas/bin/mas-launch";

@ -52,7 +52,7 @@ HostList::HostList( TQWidget *parent, const char *name )
setColumnAlignment( HostListItem::Video, TQt::AlignCenter );
setColumnAlignment( HostListItem::Audio, TQt::AlignCenter );
setColumnAlignment( HostListItem::Volume, TQt::AlignCenter );
setColumnAlignment( HostListItem::tqStatus, TQt::AlignLeft );
setColumnAlignment( HostListItem::Status, TQt::AlignLeft );
}
HostList::~HostList()
@ -67,8 +67,8 @@ void HostList::notifyHostError( TQString hostname, int error)
if( host->text(HostListItem::Hostname) == hostname )
{
host->setText( HostListItem::Hostname, hostname );
host->settqStatus( error );
host->tqrepaint();
host->setStatus( error );
host->repaint();
return;
}
++it;
@ -101,8 +101,8 @@ void HostList::contentsMousePressEvent( TQMouseEvent *e)
}
// status column
else
if( e->pos().x() > header()->sectionPos( HostListItem::tqStatus ) &&
e->pos().x() < header()->sectionPos( HostListItem::tqStatus ) + header()->sectionSize( HostListItem::tqStatus ) )
if( e->pos().x() > header()->sectionPos( HostListItem::Status ) &&
e->pos().x() < header()->sectionPos( HostListItem::Status ) + header()->sectionSize( HostListItem::Status ) )
{
item->statusToolTip();
}

@ -51,8 +51,8 @@ HostListItem::HostListItem( TQListView *parent, TQString hostname, bool audio, b
{
setText( HostListItem::Hostname, hostname);
setPixmap( HostListItem::tqStatus, SmallIcon("info") );
setText( HostListItem::tqStatus, i18n("Unknown") );
setPixmap( HostListItem::Status, SmallIcon("info") );
setText( HostListItem::Status, i18n("Unknown") );
setPixmap( HostListItem::Playback, SmallIcon("info") );
setText( HostListItem::Playback, i18n("Unknown") );
@ -77,7 +77,7 @@ int HostListItem::volumeAtPosition( int x )
void HostListItem::updateColumn( int column ) const
{
const TQRect r = listView()->tqitemRect( this );
const TQRect r = listView()->itemRect( this );
if( !r.isValid() )
return;
@ -88,10 +88,10 @@ void HostListItem::updateColumn( int column ) const
void HostListItem::statusToolTip()
{
TQWhatsThis::display( prettytqStatus( m_status ) );
TQWhatsThis::display( prettyStatus( m_status ) );
}
TQString HostListItem::prettytqStatus( int error )
TQString HostListItem::prettyStatus( int error )
{
TQString st;
@ -146,24 +146,24 @@ void HostListItem::paintCell(TQPainter * p, const TQColorGroup & cg, int column,
if( ! m_read_only)
setPixmap( HostListItem::Audio, SmallIcon("nmm_option_off") );
}
else if( column == HostListItem::tqStatus )
else if( column == HostListItem::Status )
{
TQFont font( p->font() );
if( ! m_status ) // Unknown
{
font.setBold( false );
setText( HostListItem::tqStatus , i18n("Unknown") );
setText( HostListItem::Status , i18n("Unknown") );
}
else if( m_status == NmmEngine::STATUS_OK )
{
font.setBold( false );
m_cg.setColor( TQColorGroup::Text, TQt::darkGreen );
setText( HostListItem::tqStatus , i18n("OK") );
setText( HostListItem::Status , i18n("OK") );
}
else { // error
font.setBold( true );
m_cg.setColor( TQColorGroup::Text, TQt::red );
setText( HostListItem::tqStatus , i18n("Failed") );
setText( HostListItem::Status , i18n("Failed") );
}
p->setFont( font );
}
@ -257,9 +257,9 @@ TQPixmap HostListItem::generateGradient( int type )
KPixmap result = TQPixmap( 113, 24 );
if( type == PixRight)
KPixmapEffect::gradient( result, listView()->tqcolorGroup().background(), listView()->tqcolorGroup().highlight(), KPixmapEffect::HorizontalGradient );
KPixmapEffect::gradient( result, listView()->colorGroup().background(), listView()->colorGroup().highlight(), KPixmapEffect::HorizontalGradient );
else
KPixmapEffect::gradient( result, listView()->tqcolorGroup().highlight(), listView()->tqcolorGroup().background(), KPixmapEffect::HorizontalGradient );
KPixmapEffect::gradient( result, listView()->colorGroup().highlight(), listView()->colorGroup().background(), KPixmapEffect::HorizontalGradient );
result.setMask( mask);
return result;

@ -36,7 +36,7 @@ class HostListItem : public KListViewItem {
Video,
Audio,
Volume,
tqStatus,
Status,
Playback
};
@ -49,7 +49,7 @@ class HostListItem : public KListViewItem {
bool isAudioEnabled() const { return m_audio; }
void toggleAudio() { m_audio = !m_audio; }
void settqStatus( int s ) { m_status = s; }
void setStatus( int s ) { m_status = s; }
int status() const { return m_status; }
void setVolume( int v ) { m_volume = v; }
@ -69,7 +69,7 @@ class HostListItem : public KListViewItem {
* \todo make it user friendly/understandable
* \todo right place for this method?
*/
static TQString prettytqStatus( int );
static TQString prettyStatus( int );
protected:
void paintCell( TQPainter * painter, const TQColorGroup & cg, int column, int width, int align );

@ -46,7 +46,7 @@ class NmmLocation {
int volume() const { return m_volume; }
void setVolume( int v ) { m_volume = v; }
void settqStatus( int s ) { m_status = s; }
void setStatus( int s ) { m_status = s; }
int status() const { return m_status; }
private:

@ -21,7 +21,7 @@
</property>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout6</cstring>
<cstring>layout6</cstring>
</property>
<hbox>
<property name="name">
@ -68,7 +68,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>16</width>
<height>16</height>
@ -130,7 +130,7 @@ This setting will enable audio on the three hosts desktop, laptop and kitchen, a
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout5</cstring>
<cstring>layout5</cstring>
</property>
<hbox>
<property name="name">
@ -159,7 +159,7 @@ This setting will enable audio on the three hosts desktop, laptop and kitchen, a
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout13</cstring>
<cstring>layout13</cstring>
</property>
<vbox>
<property name="name">
@ -191,7 +191,7 @@ This setting will enable audio on the three hosts desktop, laptop and kitchen, a
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>1</height>
@ -214,7 +214,7 @@ This setting will enable audio on the three hosts desktop, laptop and kitchen, a
<property name="sizeType">
<enum>Minimum</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>16</height>

@ -155,14 +155,14 @@ void NmmEngine::notifyHostError( TQString hostname, int error )
for( TQValueList<NmmLocation>::Iterator it = tmp_user_list.begin(); it != tmp_user_list.end(); ++it ) {
if( (*it).hostname() == hostname ) {
(*it).settqStatus( error );
(*it).setStatus( error );
break;
}
}
for( TQValueList<NmmLocation>::Iterator it = tmp_environment_list.begin(); it != tmp_environment_list.end(); ++it ) {
if( (*it).hostname() == hostname ) {
(*it).settqStatus( error );
(*it).setStatus( error );
break;
}
}
@ -368,7 +368,7 @@ bool NmmEngine::load(const KURL& url, bool stream)
if( NmmKDEConfig::location() == NmmKDEConfig::EnumLocation::LocalhostOnly )
{
m_localhostonly_errordialog = true;
TQString detailed_status = HostListItem::prettytqStatus( error );
TQString detailed_status = HostListItem::prettyStatus( error );
KMessageBox::detailedError( 0, i18n("Local NMM playback failed."), detailed_status, i18n("Error"), KMessageBox::AllowLink );
m_localhostonly_errordialog = false;
}

@ -245,7 +245,7 @@ private:
static NmmEngine* s_instance;
public:
enum HosttqStatus {
enum HostStatus {
STATUS_UNKNOWN = 0,
STATUS_OK = 1 << 0,
ERROR_PLAYBACKNODE = 1 << 1,

@ -155,9 +155,9 @@ XineEnumEntry::XineEnumEntry(TQComboBox* input, const TQCString & key, xine_t *x
for( int i = 0; ent.enum_values[i]; ++i )
{
input->insertItem( TQString(TQString::fromLocal8Bit( ent.enum_values[i] )) );
input->setCurrentItem( ent.num_value );
m_val = ent.num_value;
}
input->setCurrentItem( ent.num_value );
m_val = ent.num_value;
}
connect( input, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( entryChanged( int ) ) );
}

@ -47,10 +47,12 @@ extern "C"
#define LLONG_MAX 9223372036854775807LL
#endif
//define this to use xine in a more standard way
//#define XINE_SAFE_MODE
//define this to enable libxine debug spew
//#define XINE_DEBUG_ENGINE 1
///some logging static globals
namespace Log
@ -174,8 +176,13 @@ XineEngine::makeNewStream()
return false;
}
if( m_eventQueue )
#ifdef XINE_DEBUG_ENGINE
xine_set_param(m_stream, XINE_PARAM_VERBOSITY, XINE_VERBOSITY_DEBUG);
#endif // XINE_DEBUG_ENGINE
if( m_eventQueue ) {
xine_event_dispose_queue( m_eventQueue );
}
xine_event_create_listener_thread(
m_eventQueue = xine_event_new_queue( m_stream ),
@ -203,8 +210,9 @@ XineEngine::makeNewStream()
bool
XineEngine::ensureStream()
{
if( !m_stream )
if( !m_stream ) {
return makeNewStream();
}
return true;
}
@ -242,7 +250,7 @@ XineEngine::load( const KURL &url, bool isStream )
setEqualizerParameters( m_intPreamp, m_equalizerGains );
}
// for users who stubbonly refuse to use DMIX or buy a good soundcard
// for users who stubbornly refuse to use DMIX or buy a good soundcard
// why doesn't xine do this? I cannot say.
xine_close( m_stream );
@ -448,8 +456,9 @@ XineEngine::state() const
uint
XineEngine::position() const
{
if ( state() == Engine::Empty )
if ( state() == Engine::Empty ) {
return 0;
}
int pos;
int time = 0;
@ -509,16 +518,45 @@ XineEngine::length() const
void
XineEngine::seek( uint ms )
{
if( !ensureStream() )
if( !ensureStream() ) {
return;
}
bool seekable = (xine_get_stream_info( m_stream, XINE_STREAM_INFO_SEEKABLE ) != 0);
if (!seekable) {
return;
}
bool use_xine_ui_seek_method = false;
TQString audioCodec = TQString::fromUtf8(xine_get_meta_info(m_stream, XINE_META_INFO_SYSTEMLAYER));
if (audioCodec == "FLAC") {
// Work around Xine bug with FLAC files
// See Bug 1204
use_xine_ui_seek_method = true;
}
if( xine_get_param( m_stream, XINE_PARAM_SPEED ) == XINE_SPEED_PAUSE ) {
// FIXME this is a xine API issue really, they need to add a seek function
xine_play( m_stream, 0, (int)ms );
if (use_xine_ui_seek_method) {
int pos, time, length = 0;
xine_get_pos_length( m_stream, &pos, &time, &length );
xine_play( m_stream, ((ms*65535.0)/length), 0 );
}
else {
xine_play( m_stream, 0, (int)ms );
}
xine_set_param( m_stream, XINE_PARAM_SPEED, XINE_SPEED_PAUSE );
}
else
xine_play( m_stream, 0, (int)ms );
else {
if (use_xine_ui_seek_method) {
int pos, time, length = 0;
xine_get_pos_length( m_stream, &pos, &time, &length );
xine_play( m_stream, ((ms*65535.0)/length), 0 );
}
else {
xine_play( m_stream, 0, (int)ms );
}
}
}
void
@ -801,7 +839,7 @@ XineEngine::customEvent( TQCustomEvent *e )
break;
case 3001:
emit infoMessage( (*message).tqarg( m_url.prettyURL() ) );
emit infoMessage( (*message).arg( m_url.prettyURL() ) );
delete message;
break;
@ -818,7 +856,7 @@ XineEngine::customEvent( TQCustomEvent *e )
} break;
case 3004:
emit statusText( i18n("Redirecting to: ").tqarg( *message ) );
emit statusText( i18n("Redirecting to: ").arg( *message ) );
load( KURL( *message ), false );
play();
delete message;
@ -923,8 +961,8 @@ XineEngine::XineEventListener( void *p, const xine_event_t* xineEvent )
TQString
msg = "%1 %2%";
msg = msg.tqarg( TQString::fromUtf8( pd->description ) )
.tqarg( KGlobal::locale()->formatNumber( pd->percent, 0 ) );
msg = msg.arg( TQString::fromUtf8( pd->description ) )
.arg( KGlobal::locale()->formatNumber( pd->percent, 0 ) );
TQCustomEvent *e = new TQCustomEvent( 3002 );
e->setData( new TQString( msg ) );
@ -937,7 +975,7 @@ XineEngine::XineEventListener( void *p, const xine_event_t* xineEvent )
/// xine has read the stream and found it actually links to something else
/// so we need to play that instead
TQString message = TQString::fromUtf8( static_cast<xine_mrl_reference_data_t*>(xineEvent->data)->mrl );
TQString message = TQString::fromUtf8( static_cast<xine_mrl_reference_data_ext_t*>(xineEvent->data)->mrl );
TQCustomEvent *e = new TQCustomEvent( 3004 );
e->setData( new TQString( message ) );
@ -974,11 +1012,11 @@ XineEngine::XineEventListener( void *p, const xine_event_t* xineEvent )
case XINE_MSG_UNKNOWN_HOST:
message = i18n("The host is unknown for the URL: <i>%1</i>"); goto param;
case XINE_MSG_UNKNOWN_DEVICE:
message = i18n("The device name you specified seems invalid."); goto param;
message = i18n("The device name you specified seems invalid.<br>%1"); goto param;
case XINE_MSG_NETWORK_UNREACHABLE:
message = i18n("The network appears unreachable."); goto param;
message = i18n("The network appears unreachable.<br>%1"); goto param;
case XINE_MSG_AUDIO_OUT_UNAVAILABLE:
message = i18n("Audio output unavailable; the device is busy."); goto param;
message = i18n("Audio output unavailable; the device is busy.<br>%1"); goto param;
case XINE_MSG_CONNECTION_REFUSED:
message = i18n("The connection was refused for the URL: <i>%1</i>"); goto param;
case XINE_MSG_FILE_NOT_FOUND:
@ -988,7 +1026,7 @@ XineEngine::XineEventListener( void *p, const xine_event_t* xineEvent )
case XINE_MSG_READ_ERROR:
message = i18n("The source cannot be read for the URL: <i>%1</i>"); goto param;
case XINE_MSG_LIBRARY_LOAD_ERROR:
message = i18n("A problem occurred while loading a library or decoder."); goto param;
message = i18n("A problem occurred while loading a library or decoder.<br>%1"); goto param;
case XINE_MSG_GENERAL_WARNING:
message = i18n("General Warning"); goto explain;
@ -1102,7 +1140,7 @@ bool XineEngine::metaDataForUrl(const KURL &url, Engine::SimpleMetaBundle &b)
if( b.tracknr.isEmpty() )
b.tracknr = url.filename();
} else {
b.title = TQString(i18n("Track %1")).tqarg(url.filename());
b.title = TQString(i18n("Track %1")).arg(url.filename());
b.album = i18n("AudioCD");
}
}
@ -1131,7 +1169,11 @@ bool XineEngine::metaDataForUrl(const KURL &url, Engine::SimpleMetaBundle &b)
bool XineEngine::getAudioCDContents(const TQString &device, KURL::List &urls)
{
#if XINE_MAJOR_VERSION > 1 || ( XINE_MAJOR_VERSION == 1 && XINE_MINOR_VERSION >= 2 )
const char * const* xine_urls = NULL;
#else
char **xine_urls = NULL;
#endif
int num;
int i = 0;

@ -32,7 +32,7 @@
</property>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout11</cstring>
<cstring>layout11</cstring>
</property>
<hbox>
<property name="name">
@ -68,13 +68,13 @@
<property name="text">
<string></string>
</property>
<property name="tqalignment">
<property name="alignment">
<set>AlignCenter</set>
</property>
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout10</cstring>
<cstring>layout10</cstring>
</property>
<vbox>
<property name="name">
@ -82,7 +82,7 @@
</property>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout10</cstring>
<cstring>layout10</cstring>
</property>
<vbox>
<property name="name">
@ -90,7 +90,7 @@
</property>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout2</cstring>
<cstring>layout2</cstring>
</property>
<hbox>
<property name="name">
@ -129,7 +129,7 @@
<property name="text">
<string>Sound device may be modified after the output plugin has been changed to ALSA or OSS.</string>
</property>
<property name="tqalignment">
<property name="alignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
@ -241,7 +241,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout5</cstring>
<cstring>layout5</cstring>
</property>
<hbox>
<property name="name">
@ -278,7 +278,7 @@
</property>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout4</cstring>
<cstring>layout4</cstring>
</property>
<hbox>
<property name="name">
@ -318,7 +318,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout2</cstring>
<cstring>layout2</cstring>
</property>
<hbox>
<property name="name">
@ -376,7 +376,7 @@
</property>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout11</cstring>
<cstring>layout11</cstring>
</property>
<vbox>
<property name="name">
@ -419,7 +419,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout12</cstring>
<cstring>layout12</cstring>
</property>
<vbox>
<property name="name">
@ -435,7 +435,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout10</cstring>
<cstring>layout10</cstring>
</property>
<hbox>
<property name="name">
@ -486,7 +486,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>16</height>

@ -646,7 +646,7 @@ yauapEngine::getAudioCDContents(const TQString &device, KURL::List &urls)
KURL url = TQString(TQString("cdda://").append( strtok_r(reply_ptr,"=",&saveptr)));
urls << url;
debug() << url << endl;
b.title = TQString( i18n( "Track %1" ) ).tqarg( i+1 );
b.title = TQString( i18n( "Track %1" ) ).arg( i+1 );
b.length = strtok_r(NULL,"=",&saveptr);
b.album = "AudioCD";
b.tracknr = i+1;

@ -120,8 +120,8 @@ EngineController::loadEngine() //static
Amarok::StatusBar::instance()->longMessage( i18n(
"Sorry, the '%1' could not be loaded, instead we have loaded the '%2'." )
.tqarg( AmarokConfig::soundSystem() )
.tqarg( engineName ),
.arg( AmarokConfig::soundSystem() )
.arg( engineName ),
KDE::StatusBar::Sorry );
AmarokConfig::setSoundSystem( engineName );
@ -143,7 +143,7 @@ EngineController::loadEngine( const TQString &engineName )
DEBUG_BLOCK
TQString query = "[X-KDE-Amarok-plugintype] == 'engine' and [X-KDE-Amarok-name] != '%1'";
KTrader::OfferList offers = PluginManager::query( query.tqarg( engineName ) );
KTrader::OfferList offers = PluginManager::query( query.arg( engineName ) );
// sort by rank, TQValueList::operator[] is O(n), so this is quite inefficient
#define rank( x ) (x)->property( "X-KDE-Amarok-rank" ).toInt()
@ -155,7 +155,7 @@ EngineController::loadEngine( const TQString &engineName )
// this is the actual engine we want
query = "[X-KDE-Amarok-plugintype] == 'engine' and [X-KDE-Amarok-name] == '%1'";
offers = PluginManager::query( query.tqarg( engineName ) ) + offers;
offers = PluginManager::query( query.arg( engineName ) ) + offers;
foreachType( KTrader::OfferList, offers ) {
Amarok::Plugin *plugin = PluginManager::createFromService( *it );
@ -265,13 +265,13 @@ void EngineController::unplayableNotification() {
"<p>You may want to choose a different engine from the <i>Configure Dialog</i>, or examine "
"the installation of the multimedia-framework that the current engine uses. "
"<p>You may find useful information in the <i>FAQ</i> section of the <i>Amarok HandBook</i>." )
.tqarg( AmarokConfig::soundSystem() ), KDE::StatusBar::Error );
.arg( AmarokConfig::soundSystem() ), KDE::StatusBar::Error );
}
bool EngineController::installDistroCodec( const TQString& engine /*Filetype type*/)
{
KService::Ptr service = KTrader::self()->query( "Amarok/CodecInstall"
, TQString("[X-KDE-Amarok-codec] == 'mp3' and [X-KDE-Amarok-engine] == '%1'").tqarg(engine) ).first();
, TQString("[X-KDE-Amarok-codec] == 'mp3' and [X-KDE-Amarok-engine] == '%1'").arg(engine) ).first();
if( service )
{
TQString installScript = service->exec();

@ -51,7 +51,7 @@ EqualizerGraph::resizeEvent( TQResizeEvent* )
}
TQSize
EqualizerGraph::tqsizeHint() const
EqualizerGraph::sizeHint() const
{
return TQSize( 100, 60 );
}
@ -65,11 +65,11 @@ EqualizerGraph::paintEvent( TQPaintEvent* )
// Draw middle line
int middleLineY = (int) ( ( height() - 1 ) / 2.0 + AmarokConfig::equalizerPreamp() * ( height() - 1 ) / 200.0 );
TQPen pen( tqcolorGroup().dark(), 0, TQt::DotLine);
TQPen pen( colorGroup().dark(), 0, TQt::DotLine);
p.setPen( pen );
p.drawLine( 8, middleLineY, width() - 1, middleLineY );
TQColor color( tqcolorGroup().highlight() );
TQColor color( colorGroup().highlight() );
int h, s, v;
color.getHsv( &h, &s, &v );
@ -141,14 +141,14 @@ EqualizerGraph::drawBackground()
m_backgroundPixmap->resize( size() );
m_composePixmap->resize( size() );
m_backgroundPixmap->fill( tqcolorGroup().background().dark( 105 ) );
m_backgroundPixmap->fill( colorGroup().background().dark( 105 ) );
TQPainter p( m_backgroundPixmap );
// Erase background for scale
p.fillRect( 0, 0, 7, height() -1, tqcolorGroup().background());
p.fillRect( 0, 0, 7, height() -1, colorGroup().background());
// Draw scale
p.setPen( tqcolorGroup().shadow() );
p.setPen( colorGroup().shadow() );
p.drawLine( 7, 0, 7, height() - 1 );
p.drawLine( 0, 0, 7, 0 );
p.drawLine( 0, height() / 2 - 1, 7, height() / 2 - 1 );

@ -15,8 +15,8 @@
* *
***************************************************************************/
#ifndef AMAROK_ETQUALIZERGRAPH_H
#define AMAROK_ETQUALIZERGRAPH_H
#ifndef AMAROK_EQUALIZERGRAPH_H
#define AMAROK_EQUALIZERGRAPH_H
#include <tqwidget.h> //baseclass
@ -28,7 +28,7 @@ class EqualizerGraph : public TQWidget
public:
EqualizerGraph( TQWidget* parent );
~EqualizerGraph();
TQSize tqsizeHint() const;
TQSize sizeHint() const;
protected:
void resizeEvent( TQResizeEvent* );
@ -47,4 +47,4 @@ class EqualizerGraph : public TQWidget
};
#endif /*AMAROK_ETQUALIZERGRAPH_H*/
#endif /*AMAROK_EQUALIZERGRAPH_H*/

@ -63,7 +63,7 @@ EqualizerPresetManager::EqualizerPresetManager( TQWidget *parent, const char *na
updateButtonState();
resize( TQSize(300, 250).expandedTo(tqminimumSizeHint()) );
resize( TQSize(300, 250).expandedTo(minimumSizeHint()) );
}
@ -103,7 +103,7 @@ EqualizerPresetManager::slotRename()
if ( ok && item->text(0) != title ) {
// Check if the new preset title exists
if ( m_presets.find( title ) != m_presets.end() ) {
int button = KMessageBox::warningYesNo( this, i18n( "A preset with the name %1 already exists. Overwrite?" ).tqarg( title ) );
int button = KMessageBox::warningYesNo( this, i18n( "A preset with the name %1 already exists. Overwrite?" ).arg( title ) );
if ( button != KMessageBox::Yes )
return;

@ -17,8 +17,8 @@
* 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef AMAROK_ETQUALIZERPRESETMANAGER_H
#define AMAROK_ETQUALIZERPRESETMANAGER_H
#ifndef AMAROK_EQUALIZERPRESETMANAGER_H
#define AMAROK_EQUALIZERPRESETMANAGER_H
#include "equalizersetup.h"
@ -57,4 +57,4 @@ class EqualizerPresetManager : public KDialogBase
};
#endif /* AMAROK_ETQUALIZERPRESETMANAGER_H */
#endif /* AMAROK_EQUALIZERPRESETMANAGER_H */

@ -73,7 +73,7 @@ EqualizerSetup::EqualizerSetup()
new TQLabel( i18n("Presets:"), presetBox );
m_presetCombo = new KComboBox( presetBox );
m_presetCombo->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Preferred ) );
m_presetCombo->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Preferred ) );
TQPushButton* presetAdd = new TQPushButton( presetBox );
presetAdd->setIconSet( SmallIconSet( Amarok::icon( "add_playlist" ) ) );
@ -98,7 +98,7 @@ EqualizerSetup::EqualizerSetup()
// Helper widget for layouting inside the groupbox
TQWidget* slidersLayoutWidget = new TQWidget( m_groupBoxSliders );
slidersLayoutWidget->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
slidersLayoutWidget->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
TQGridLayout* slidersGridLayout = new TQGridLayout( slidersLayoutWidget, 1, 1, 0, KDialog::spacingHint() );
// END GroupBox
@ -149,12 +149,12 @@ EqualizerSetup::EqualizerSetup()
TQLabel* graphLabel1 = new TQLabel("+20 db", graphVBox);
TQLabel* graphLabel2 = new TQLabel("0 db", graphVBox);
TQLabel* graphLabel3 = new TQLabel("-20 db", graphVBox);
graphLabel1->tqsetAlignment( TQt::AlignRight | TQt::AlignTop );
graphLabel2->tqsetAlignment( TQt::AlignRight | TQt::AlignVCenter );
graphLabel3->tqsetAlignment( TQt::AlignRight | TQt::AlignBottom );
graphLabel1->setAlignment( TQt::AlignRight | TQt::AlignTop );
graphLabel2->setAlignment( TQt::AlignRight | TQt::AlignVCenter );
graphLabel3->setAlignment( TQt::AlignRight | TQt::AlignBottom );
m_equalizerGraph = new EqualizerGraph( graphGBox );
m_equalizerGraph->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
m_equalizerGraph->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
// END Graph Widget
// Fill the combobox
@ -213,7 +213,7 @@ EqualizerSetup::setPreset( TQString name )
}
/////////////////////////////////////////////////////////////////////////////////////
// ETQUALIZER PRESETS
// EQUALIZER PRESETS
/////////////////////////////////////////////////////////////////////////////////////
TQString
@ -370,7 +370,7 @@ EqualizerSetup::addPreset()
if (ok) {
// Check if the new preset title exists
if ( m_presets.find( title ) != m_presets.end() ) {
int button = KMessageBox::warningYesNo( this, i18n( "A preset with the name %1 already exists. Overwrite?" ).tqarg( title ) );
int button = KMessageBox::warningYesNo( this, i18n( "A preset with the name %1 already exists. Overwrite?" ).arg( title ) );
if ( button != KMessageBox::Yes )
return;

@ -15,8 +15,8 @@
* *
***************************************************************************/
#ifndef AMAROK_ETQUALIZERSETUP_H
#define AMAROK_ETQUALIZERSETUP_H
#ifndef AMAROK_EQUALIZERSETUP_H
#define AMAROK_EQUALIZERSETUP_H
#include <tqptrlist.h> //stack alloc
#include <kdialogbase.h>
@ -75,4 +75,4 @@ class EqualizerSetup : public KDialogBase
TQMap< TQString, TQValueList<int> > m_presets;
};
#endif /*AMAROK_ETQUALIZERSETUP_H*/
#endif /*AMAROK_EQUALIZERSETUP_H*/

@ -145,7 +145,7 @@ FileBrowser::FileBrowser( const char * name, Medium * medium )
m_dir->setOnlyDoubleClickSelectsFiles( true ); //Amarok type settings
m_dir->readConfig( Amarok::config( "Filebrowser" ) );
m_dir->setView( KFile::Default ); //will set userconfigured view, will load URL
m_dir->tqsetSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Expanding );
m_dir->setSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Expanding );
m_dir->setAcceptDrops( true );
//Automatically open folder after hovering above it...probably a good thing
//but easily disabled by commenting this line out
@ -264,7 +264,7 @@ FileBrowser::FileBrowser( const char * name, Medium * medium )
setSpacing( 4 );
setFocusProxy( m_dir ); //so the dirOperator is focused when we get focus events
// Toolbar is more than 250px wide, BrowserBar doesn't allow that. -> Resizing issues.
setMinimumWidth( 250 /* toolbar->tqsizeHint().width() */ );
setMinimumWidth( 250 /* toolbar->sizeHint().width() */ );
}
@ -575,9 +575,9 @@ public:
const uint w = t.width() + 20;
const uint h = t.height() + 20;
p.setBrush( tqcolorGroup().background() );
p.setBrush( colorGroup().background() );
p.drawRoundRect( 15, 15, w, h, (8*200)/w, (8*200)/h );
t.draw( &p, 20, 20, TQRect(), tqcolorGroup() );
t.draw( &p, 20, 20, TQRect(), colorGroup() );
}
else {
p.setPen( palette().color( TQPalette::Disabled, TQColorGroup::Text ) );

@ -74,7 +74,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>40</width>
<height>20</height>
@ -130,7 +130,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>257</height>
@ -147,7 +147,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>194</height>
@ -197,7 +197,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>32767</width>
<height>32767</height>
@ -221,7 +221,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>21</width>
<height>294</height>

@ -83,8 +83,8 @@ HTMLView::copyText()
TQString text = selectedText();
// Copy both to clipboard and X11-selection
TQApplication::tqclipboard()->setText( text, TQClipboard::Clipboard );
TQApplication::tqclipboard()->setText( text, TQClipboard::Selection );
TQApplication::clipboard()->setText( text, TQClipboard::Clipboard );
TQApplication::clipboard()->setText( text, TQClipboard::Selection );
}
void HTMLView::paletteChange() {
@ -112,21 +112,21 @@ HTMLView::loadStyleSheet()
const TQString fontFamily = AmarokConfig::useCustomFonts() ?
AmarokConfig::contextBrowserFont().family() :
TQApplication::font().family();
const TQString text = ContextBrowser::instance()->tqcolorGroup().text().name();
const TQString link = ContextBrowser::instance()->tqcolorGroup().link().name();
const TQString fg = ContextBrowser::instance()->tqcolorGroup().highlightedText().name();
const TQString bg = ContextBrowser::instance()->tqcolorGroup().highlight().name();
const TQString base = ContextBrowser::instance()->tqcolorGroup().base().name();
const TQColor bgColor = ContextBrowser::instance()->tqcolorGroup().highlight();
const TQString text = ContextBrowser::instance()->colorGroup().text().name();
const TQString link = ContextBrowser::instance()->colorGroup().link().name();
const TQString fg = ContextBrowser::instance()->colorGroup().highlightedText().name();
const TQString bg = ContextBrowser::instance()->colorGroup().highlight().name();
const TQString base = ContextBrowser::instance()->colorGroup().base().name();
const TQColor bgColor = ContextBrowser::instance()->colorGroup().highlight();
TQColor gradientColor = bgColor;
//we have to set the color for body due to a KHTML bug
//KHTML sets the base color but not the text color
styleSheet = TQString( "body { margin: 8px; font-size: %1px; color: %2; background-color: %3; font-family: %4; }" )
.tqarg( pxSize )
.tqarg( text )
.tqarg( AmarokConfig::schemeAmarok() ? fg : TQString(gradientColor.name()) )
.tqarg( fontFamily );
.arg( pxSize )
.arg( text )
.arg( AmarokConfig::schemeAmarok() ? fg : TQString(gradientColor.name()) )
.arg( fontFamily );
TQTextStream eCSSts( &ExternalCSS );
TQString tmpCSS = eCSSts.read();
@ -142,7 +142,7 @@ HTMLView::loadStyleSheet()
tmpCSS.replace( "AMAROK_BGCOLOR", bg );
tmpCSS.replace( "AMAROK_FGCOLOR", fg );
tmpCSS.replace( "AMAROK_BASECOLOR", base );
tmpCSS.replace( "AMAROK_DARKBASECOLOR", ContextBrowser::instance()->tqcolorGroup().base().dark( 120 ).name() );
tmpCSS.replace( "AMAROK_DARKBASECOLOR", ContextBrowser::instance()->colorGroup().base().dark( 120 ).name() );
tmpCSS.replace( "AMAROK_GRADIENTCOLOR", gradientColor.name() );
styleSheet += tmpCSS;
@ -151,12 +151,12 @@ HTMLView::loadStyleSheet()
{
int pxSize = ContextBrowser::instance()->fontMetrics().height() - 4;
const TQString fontFamily = AmarokConfig::useCustomFonts() ? AmarokConfig::contextBrowserFont().family() : TQApplication::font().family();
const TQString text = ContextBrowser::instance()->tqcolorGroup().text().name();
const TQString link = ContextBrowser::instance()->tqcolorGroup().link().name();
const TQString fg = ContextBrowser::instance()->tqcolorGroup().highlightedText().name();
const TQString bg = ContextBrowser::instance()->tqcolorGroup().highlight().name();
const TQColor baseColor = ContextBrowser::instance()->tqcolorGroup().base();
const TQColor bgColor = ContextBrowser::instance()->tqcolorGroup().highlight();
const TQString text = ContextBrowser::instance()->colorGroup().text().name();
const TQString link = ContextBrowser::instance()->colorGroup().link().name();
const TQString fg = ContextBrowser::instance()->colorGroup().highlightedText().name();
const TQString bg = ContextBrowser::instance()->colorGroup().highlight().name();
const TQColor baseColor = ContextBrowser::instance()->colorGroup().base();
const TQColor bgColor = ContextBrowser::instance()->colorGroup().highlight();
const TQColor gradientColor = bgColor;
if ( !m_bgGradientImage ) {
@ -188,103 +188,103 @@ HTMLView::loadStyleSheet()
//we have to set the color for body due to a KHTML bug
//KHTML sets the base color but not the text color
styleSheet = TQString( "body { margin: 4px; font-size: %1px; color: %2; background-color: %3; background-image: url( %4 ); background-repeat: repeat; font-family: %5; }" )
.tqarg( pxSize )
.tqarg( text )
.tqarg( AmarokConfig::schemeAmarok() ? fg : TQString(gradientColor.name()) )
.tqarg( m_bgGradientImage->name() )
.tqarg( fontFamily );
.arg( pxSize )
.arg( text )
.arg( AmarokConfig::schemeAmarok() ? fg : TQString(gradientColor.name()) )
.arg( m_bgGradientImage->name() )
.arg( fontFamily );
//text attributes
styleSheet += TQString( "h1 { font-size: %1px; }" ).tqarg( pxSize + 8 );
styleSheet += TQString( "h2 { font-size: %1px; }" ).tqarg( pxSize + 6 );
styleSheet += TQString( "h3 { font-size: %1px; }" ).tqarg( pxSize + 4 );
styleSheet += TQString( "h4 { font-size: %1px; }" ).tqarg( pxSize + 3 );
styleSheet += TQString( "h5 { font-size: %1px; }" ).tqarg( pxSize + 2 );
styleSheet += TQString( "h6 { font-size: %1px; }" ).tqarg( pxSize + 1 );
styleSheet += TQString( "a { font-size: %1px; color: %2; }" ).tqarg( pxSize ).tqarg( text );
styleSheet += TQString( "h1 { font-size: %1px; }" ).arg( pxSize + 8 );
styleSheet += TQString( "h2 { font-size: %1px; }" ).arg( pxSize + 6 );
styleSheet += TQString( "h3 { font-size: %1px; }" ).arg( pxSize + 4 );
styleSheet += TQString( "h4 { font-size: %1px; }" ).arg( pxSize + 3 );
styleSheet += TQString( "h5 { font-size: %1px; }" ).arg( pxSize + 2 );
styleSheet += TQString( "h6 { font-size: %1px; }" ).arg( pxSize + 1 );
styleSheet += TQString( "a { font-size: %1px; color: %2; }" ).arg( pxSize ).arg( text );
styleSheet += TQString( ".info { display: block; margin-left: 4px; font-weight: normal; }" );
styleSheet += TQString( ".song a { display: block; padding: 1px 2px; font-weight: normal; text-decoration: none; }" );
styleSheet += TQString( ".song a:hover { color: %1; background-color: %2; }" ).tqarg( fg ).tqarg( bg );
styleSheet += TQString( ".song a:hover { color: %1; background-color: %2; }" ).arg( fg ).arg( bg );
styleSheet += TQString( ".song-title { font-weight: bold; }" );
styleSheet += TQString( ".song-place { font-size: %1px; font-weight: bold; }" ).tqarg( pxSize + 3 );
styleSheet += TQString( ".song-place { font-size: %1px; font-weight: bold; }" ).arg( pxSize + 3 );
//box: the base container for every block (border hilighted on hover, 'A' without underlining)
styleSheet += TQString( ".box { border: solid %1 1px; text-align: left; margin-bottom: 10px; }" ).tqarg( bg );
styleSheet += TQString( ".box { border: solid %1 1px; text-align: left; margin-bottom: 10px; }" ).arg( bg );
styleSheet += TQString( ".box a { text-decoration: none; }" );
styleSheet += TQString( ".box:hover { border: solid %1 1px; }" ).tqarg( text );
styleSheet += TQString( ".box:hover { border: solid %1 1px; }" ).arg( text );
//box contents: header, body, rows and alternate-rows
styleSheet += TQString( ".box-header { color: %1; background-color: %2; background-image: url( %4 ); background-repeat: repeat-x; font-size: %3px; font-weight: bold; padding: 1px 0.5em; border-bottom: 1px solid #000; }" )
.tqarg( fg )
.tqarg( bg )
.tqarg( pxSize + 2 )
.tqarg( m_headerGradientImage->name() );
.arg( fg )
.arg( bg )
.arg( pxSize + 2 )
.arg( m_headerGradientImage->name() );
styleSheet += TQString( ".box-body { padding: 2px; background-color: %1; background-image: url( %2 ); background-repeat: repeat-x; font-size:%3px; }" )
.tqarg( ContextBrowser::instance()->tqcolorGroup().base().name() )
.tqarg( m_shadowGradientImage->name() )
.tqarg( pxSize );
.arg( ContextBrowser::instance()->colorGroup().base().name() )
.arg( m_shadowGradientImage->name() )
.arg( pxSize );
//"Related Artists" related styles
styleSheet += TQString( ".box-header-nav { color: %1; background-color: %2; font-size: %3px; font-weight: bold; padding: 1px 0.5em; border-bottom: 1px solid #000; text-align: right; }" )
.tqarg( fg )
.tqarg( bg )
.tqarg( pxSize );
.arg( fg )
.arg( bg )
.arg( pxSize );
//"Albums by ..." related styles
styleSheet += TQString( ".album-header:hover { color: %1; background-color: %2; cursor: pointer; }" ).tqarg( fg ).tqarg( bg );
styleSheet += TQString( ".album-header:hover a { color: %1; }" ).tqarg( fg );
styleSheet += TQString( ".album-body { background-color: %1; border-bottom: solid %2 1px; border-top: solid %3 1px; }" ).tqarg( ContextBrowser::instance()->tqcolorGroup().base().name() ).tqarg( bg ).tqarg( bg );
styleSheet += TQString( ".album-header:hover { color: %1; background-color: %2; cursor: pointer; }" ).arg( fg ).arg( bg );
styleSheet += TQString( ".album-header:hover a { color: %1; }" ).arg( fg );
styleSheet += TQString( ".album-body { background-color: %1; border-bottom: solid %2 1px; border-top: solid %3 1px; }" ).arg( ContextBrowser::instance()->colorGroup().base().name() ).arg( bg ).arg( bg );
styleSheet += TQString( ".album-title { font-weight: bold; }" );
styleSheet += TQString( ".album-info { float:right; padding-right:4px; font-size: %1px }" ).tqarg( pxSize );
styleSheet += TQString( ".album-length { float:right; padding-right:4px; font-size: %1px; clear:right; }" ).tqarg( pxSize );
styleSheet += TQString( ".album-info { float:right; padding-right:4px; font-size: %1px }" ).arg( pxSize );
styleSheet += TQString( ".album-length { float:right; padding-right:4px; font-size: %1px; clear:right; }" ).arg( pxSize );
styleSheet += TQString( ".album-image { padding-right: 4px; }" );
styleSheet += TQString( ".album-song a { display: block; padding: 1px 2px; font-weight: normal; text-decoration: none; }" );
styleSheet += TQString( ".album-song a:hover { color: %1; background-color: %2; }" ).tqarg( fg ).tqarg( bg );
styleSheet += TQString( ".album-song a:hover { color: %1; background-color: %2; }" ).arg( fg ).arg( bg );
styleSheet += TQString( ".album-song-trackno { font-weight: bold; }" );
styleSheet += TQString( ".disc-separator { color: %1; border-bottom: 1px solid %2; }" ).tqarg( bg ).tqarg( bg );
styleSheet += TQString( ".disc-separator { color: %1; border-bottom: 1px solid %2; }" ).arg( bg ).arg( bg );
styleSheet += TQString( ".disc-separator a { display: block; padding: 1px 2px; font-weight: normal; text-decoration: none; }" );
styleSheet += TQString( ".disc-separator a:hover { color: %1; background-color: %2; }" ).tqarg( fg ).tqarg( bg );
styleSheet += TQString( ".disc-separator a:hover { color: %1; background-color: %2; }" ).arg( fg ).arg( bg );
styleSheet += TQString( ".button { width: 100%; }" );
//boxes used to display score (sb: score box)
styleSheet += TQString( ".sbtext { text-align: right; padding: 0px 4px; }" );
styleSheet += TQString( ".sbinner { height: 8px; background-color: %1; border: solid %2 1px; }" )
.tqarg( ContextBrowser::instance()->tqcolorGroup().highlight().name() )
.tqarg( ContextBrowser::instance()->tqcolorGroup().highlightedText().name() );
.arg( ContextBrowser::instance()->colorGroup().highlight().name() )
.arg( ContextBrowser::instance()->colorGroup().highlightedText().name() );
styleSheet += TQString( ".sbouter { width: 52px; height: 10px; background-color: %1; border: solid %2 1px; }" )
.tqarg( ContextBrowser::instance()->tqcolorGroup().base().dark( 120 ).name() )
.tqarg( ContextBrowser::instance()->tqcolorGroup().highlight().name() );
.arg( ContextBrowser::instance()->colorGroup().base().dark( 120 ).name() )
.arg( ContextBrowser::instance()->colorGroup().highlight().name() );
styleSheet += TQString( ".ratingBox { padding: 0px 4px; }" );
styleSheet += TQString( ".ratingStar { height: 0.9em; }" );
styleSheet += TQString( ".statsBox { border-left: solid %1 1px; }" )
.tqarg( ContextBrowser::instance()->tqcolorGroup().base().dark( 120 ).name() );
.arg( ContextBrowser::instance()->colorGroup().base().dark( 120 ).name() );
styleSheet += TQString( "#current_box-header-album { font-weight: normal; }" );
styleSheet += TQString( "#current_box-information-td { text-align: right; vertical-align: bottom; padding: 3px; }" );
styleSheet += TQString( "#current_box-largecover-td { text-align: left; width: 100px; padding: 0; vertical-align: bottom; }" );
styleSheet += TQString( "#current_box-largecover-image { padding: 4px; vertical-align: bottom; }" );
styleSheet += TQString( "#wiki_box-body a { color: %1; }" ).tqarg( link );
styleSheet += TQString( "#wiki_box-body a { color: %1; }" ).arg( link );
styleSheet += TQString( "#wiki_box-body a:hover { text-decoration: underline; }" );
//labels in tag dialog
styleSheet += ".label a:hover { font-weight: bold; }";
styleSheet += TQString( ".label.size1 { font-size: %1px; }" ).tqarg( pxSize );
styleSheet += TQString( ".label.size2 { font-size: %1px; }" ).tqarg( pxSize + 1 );
styleSheet += TQString( ".label.size3 { font-size: %1px; }" ).tqarg( pxSize + 2 );
styleSheet += TQString( ".label.size4 { font-size: %1px; }" ).tqarg( pxSize + 3 );
styleSheet += TQString( ".label.size5 { font-size: %1px; }" ).tqarg( pxSize + 4);
styleSheet += TQString( ".label.size6 { font-size: %1px; }" ).tqarg( pxSize + 5 );
styleSheet += TQString( ".label.size7 { font-size: %1px; }" ).tqarg( pxSize + 6 );
styleSheet += TQString( ".label.size8 { font-size: %1px; }" ).tqarg( pxSize + 7 );
styleSheet += TQString( ".label.size9 { font-size: %1px; }" ).tqarg( pxSize + 8 );
styleSheet += TQString( ".label.size10 { font-size: %1px; }" ).tqarg( pxSize + 9 );
styleSheet += TQString( ".label.size1 { font-size: %1px; }" ).arg( pxSize );
styleSheet += TQString( ".label.size2 { font-size: %1px; }" ).arg( pxSize + 1 );
styleSheet += TQString( ".label.size3 { font-size: %1px; }" ).arg( pxSize + 2 );
styleSheet += TQString( ".label.size4 { font-size: %1px; }" ).arg( pxSize + 3 );
styleSheet += TQString( ".label.size5 { font-size: %1px; }" ).arg( pxSize + 4);
styleSheet += TQString( ".label.size6 { font-size: %1px; }" ).arg( pxSize + 5 );
styleSheet += TQString( ".label.size7 { font-size: %1px; }" ).arg( pxSize + 6 );
styleSheet += TQString( ".label.size8 { font-size: %1px; }" ).arg( pxSize + 7 );
styleSheet += TQString( ".label.size9 { font-size: %1px; }" ).arg( pxSize + 8 );
styleSheet += TQString( ".label.size10 { font-size: %1px; }" ).arg( pxSize + 9 );
}
return styleSheet;

@ -123,7 +123,7 @@ UniversalAmarok::UniversalAmarok(KInstance *inst,TQObject *parent,TQWidget *widg
fileInfo = new TQFileInfo(HTML_FILE);
TQTimer *t = new TQTimer( this );
connect( t, TQT_SIGNAL(timeout()), TQT_SLOT(updatetqStatus() ) );
connect( t, TQT_SIGNAL(timeout()), TQT_SLOT(updateStatus() ) );
t->start( 2000, false );
kdDebug() << "Connecting widget signal" << endl;
@ -208,9 +208,9 @@ void UniversalAmarok::updateBrowser(const TQString& file)
/*!
\fn UniversalAmarok::updatetqStatus()
\fn UniversalAmarok::updateStatus()
*/
void UniversalAmarok::updatetqStatus()
void UniversalAmarok::updateStatus()
{
checkForAmarok();
vol_slider->setValue( playerStub->getVolume() );

@ -17,8 +17,8 @@
* Free Software Foundation, Inc., *
* 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef KONTQUERORSIDEBAR_H
#define KONTQUERORSIDEBAR_H
#ifndef KONQUERORSIDEBAR_H
#define KONQUERORSIDEBAR_H
#include <khtml_part.h>
#include <konqsidebarplugin.h>
@ -84,7 +84,7 @@ private:
public slots:
void updateBrowser(const TQString&);
void updatetqStatus();
void updateStatus();
void sendPrev() { checkForAmarok(); playerStub->prev(); }
void sendPlay() { checkForAmarok(); playerStub->play(); }
void sendPause() { checkForAmarok(); playerStub->pause(); }

@ -162,7 +162,7 @@ protected:
short port;
tp_GetServer(m_pimp, server, 255, &port);
TQString tunepimpHost = TQString(server);
TQString tunepimpHostWithPort = (tunepimpHost + ":%1").tqarg(port);
TQString tunepimpHostWithPort = (tunepimpHost + ":%1").arg(port);
for(TQStringList::ConstIterator it = noProxies.constBegin(); it != noProxies.constEnd(); ++it) {
TQString normalizedHost = KNetwork::KResolver::normalizeDomain(*it);
@ -212,7 +212,7 @@ private:
class KTRMEvent : public TQCustomEvent
{
public:
enum tqStatus {
enum Status {
Recognized,
Unrecognized,
Collision,
@ -220,7 +220,7 @@ public:
Error
};
KTRMEvent(int fileId, tqStatus status) :
KTRMEvent(int fileId, Status status) :
TQCustomEvent(id),
m_fileId(fileId),
m_status(status) {}
@ -230,7 +230,7 @@ public:
return m_fileId;
}
tqStatus status() const
Status status() const
{
return m_status;
}
@ -239,7 +239,7 @@ public:
private:
int m_fileId;
tqStatus m_status;
Status m_status;
};
/**
@ -250,7 +250,7 @@ private:
class KTRMEventHandler : public TQObject
{
public:
static void send(int fileId, KTRMEvent::tqStatus status)
static void send(int fileId, KTRMEvent::Status status)
{
KApplication::postEvent(instance(), new KTRMEvent(fileId, status));
}
@ -324,7 +324,7 @@ static void TRMNotifyCallback(tunepimp_t pimp, void */*data*/, TPCallbackEnum ty
#if HAVE_TUNEPIMP < 4
track_t track = tp_GetTrack(pimp, fileId);
TPFiletqStatus status = tr_GettqStatus(track);
TPFileStatus status = tr_GetStatus(track);
#endif
//debug() << "Status is: " << status << endl;
@ -731,7 +731,7 @@ void KTRMLookup::puidGenerated()
tp_ReleaseTrack(KTRMRequestHandler::instance()->tunePimp(), track);
d->results.clear();
KIO::Job *job = KIO::storedGet( TQString( "http://musicbrainz.org/ws/1/track/?type=xml&puid=%1" ).tqarg( puid ) , false, false );
KIO::Job *job = KIO::storedGet( TQString( "http://musicbrainz.org/ws/1/track/?type=xml&puid=%1" ).arg( puid ) , false, false );
Amarok::StatusBar::instance()->newProgressOperation( job )
.setDescription( i18n( "MusicBrainz Lookup" ) );

@ -61,9 +61,9 @@ int
AmarokHttp::get ( const TQString & path )
{
TQString uri = TQString( "http://%1:%2/%3" )
.tqarg( m_hostname )
.tqarg( m_port )
.tqarg( path );
.arg( m_hostname )
.arg( m_port )
.arg( path );
m_done = false;
m_error = TQHttp::NoError;
@ -104,7 +104,7 @@ AmarokHttp::slotData(KIO::Job*, const TQByteArray& data)
else if ( m_result.size() == 0 ) {
m_result = data;
}
else if ( m_result.tqresize( m_result.size() + data.size() ) ) {
else if ( m_result.resize( m_result.size() + data.size() ) ) {
memcpy( m_result.end(), data.data(), data.size() );
}
}
@ -308,17 +308,17 @@ Controller::stationDescription( TQString url )
/// TAG RADIOS
// eg: lastfm://globaltag/rock
if ( elements[1] == "globaltags" )
return i18n( "Global Tag Radio: %1" ).tqarg( elements[2] );
return i18n( "Global Tag Radio: %1" ).arg( elements[2] );
/// ARTIST RADIOS
if ( elements[1] == "artist" )
{
// eg: lastfm://artist/Queen/similarartists
if ( elements[3] == "similarartists" )
return i18n( "Similar Artists to %1" ).tqarg( elements[2] );
return i18n( "Similar Artists to %1" ).arg( elements[2] );
if ( elements[3] == "fans" )
return i18n( "Artist Fan Radio: %1" ).tqarg( elements[2] );
return i18n( "Artist Fan Radio: %1" ).arg( elements[2] );
}
/// CUSTOM STATION
@ -336,7 +336,7 @@ Controller::stationDescription( TQString url )
artists.replace( *it, capitalized );
}
return i18n( "Custom Station: %1" ).tqarg( artists );
return i18n( "Custom Station: %1" ).arg( artists );
}
/// USER RADIOS
@ -344,25 +344,25 @@ Controller::stationDescription( TQString url )
{
// eg: lastfm://user/sebr/neighbours
if ( elements[3] == "neighbours" )
return i18n( "%1's Neighbor Radio" ).tqarg( elements[2] );
return i18n( "%1's Neighbor Radio" ).arg( elements[2] );
// eg: lastfm://user/sebr/personal
if ( elements[3] == "personal" )
return i18n( "%1's Personal Radio" ).tqarg( elements[2] );
return i18n( "%1's Personal Radio" ).arg( elements[2] );
// eg: lastfm://user/sebr/loved
if ( elements[3] == "loved" )
return i18n( "%1's Loved Radio" ).tqarg( elements[2] );
return i18n( "%1's Loved Radio" ).arg( elements[2] );
// eg: lastfm://user/sebr/recommended/100 : 100 is number for how obscure the music should be
if ( elements[3] == "recommended" )
return i18n( "%1's Recommended Radio" ).tqarg( elements[2] );
return i18n( "%1's Recommended Radio" ).arg( elements[2] );
}
/// GROUP RADIOS
//eg: lastfm://group/Amarok%20users
else if ( elements[1] == "group" )
return i18n( "Group Radio: %1" ).tqarg( elements[2] );
return i18n( "Group Radio: %1" ).arg( elements[2] );
/// TRACK RADIOS
else if ( elements[1] == "play" )
@ -429,11 +429,11 @@ WebService::handshake( const TQString& username, const TQString& password )
const TQString path =
TQString( "/radio/handshake.php?version=%1&platform=%2&username=%3&passwordmd5=%4&debug=%5" )
.tqarg( APP_VERSION ) //Muesli-approved: Amarok version, and Amarok-as-platform
.tqarg( TQString("Amarok") )
.tqarg( TQString( TQUrl( username ).encodedPathAndQuery() ) )
.tqarg( KMD5( m_password.utf8() ).hexDigest().data() )
.tqarg( "0" );
.arg( APP_VERSION ) //Muesli-approved: Amarok version, and Amarok-as-platform
.arg( TQString("Amarok") )
.arg( TQString( TQUrl( username ).encodedPathAndQuery() ) )
.arg( KMD5( m_password.utf8() ).hexDigest().data() )
.arg( "0" );
http.get( path );
@ -478,7 +478,7 @@ WebService::handshake( const TQString& username, const TQString& password )
debug() << "Proxy server using port: " << port << endl;
delete socket;
m_proxyUrl = TQString( "http://localhost:%1/lastfm.mp3" ).tqarg( port );
m_proxyUrl = TQString( "http://localhost:%1/lastfm.mp3" ).arg( port );
m_server = new Amarok::ProcIO();
m_server->setComm( KProcess::Communication( KProcess::AllOutput ) );
@ -523,8 +523,8 @@ WebService::changeStation( TQString url )
AmarokHttp http( m_baseHost, 80 );
http.get( TQString( m_basePath + "/adjust.php?session=%1&url=%2&debug=0" )
.tqarg( m_session )
.tqarg( url ) );
.arg( m_session )
.arg( url ) );
m_deletionUnsafe = true;
do
@ -568,8 +568,8 @@ WebService::requestMetaData() //SLOT
connect( http, TQT_SIGNAL( requestFinished( int, bool ) ), this, TQT_SLOT( metaDataFinished( int, bool ) ) );
http->get( TQString( m_basePath + "/np.php?session=%1&debug=%2" )
.tqarg( m_session )
.tqarg( "0" ) );
.arg( m_session )
.arg( "0" ) );
}
@ -655,9 +655,9 @@ WebService::enableScrobbling( bool enabled ) //SLOT
connect( http, TQT_SIGNAL( requestFinished( int, bool ) ), this, TQT_SLOT( enableScrobblingFinished( int, bool ) ) );
http->get( TQString( m_basePath + "/control.php?session=%1&command=%2&debug=%3" )
.tqarg( m_session )
.tqarg( enabled ? TQString( "rtp" ) : TQString( "nortp" ) )
.tqarg( "0" ) );
.arg( m_session )
.arg( enabled ? TQString( "rtp" ) : TQString( "nortp" ) )
.arg( "0" ) );
}
@ -679,8 +679,8 @@ WebService::love() //SLOT
connect( http, TQT_SIGNAL( requestFinished( int, bool ) ), this, TQT_SLOT( loveFinished( int, bool ) ) );
http->get( TQString( m_basePath + "/control.php?session=%1&command=love&debug=%2" )
.tqarg( m_session )
.tqarg( "0" ) );
.arg( m_session )
.arg( "0" ) );
Amarok::StatusBar::instance()->shortMessage( i18n("love, as in affection", "Loving song...") );
}
@ -692,8 +692,8 @@ WebService::skip() //SLOT
connect( http, TQT_SIGNAL( requestFinished( int, bool ) ), this, TQT_SLOT( skipFinished( int, bool ) ) );
http->get( TQString( m_basePath + "/control.php?session=%1&command=skip&debug=%2" )
.tqarg( m_session )
.tqarg( "0" ) );
.arg( m_session )
.arg( "0" ) );
Amarok::StatusBar::instance()->shortMessage( i18n("Skipping song...") );
}
@ -705,8 +705,8 @@ WebService::ban() //SLOT
connect( http, TQT_SIGNAL( requestFinished( int, bool ) ), this, TQT_SLOT( banFinished( int, bool ) ) );
http->get( TQString( m_basePath + "/control.php?session=%1&command=ban&debug=%2" )
.tqarg( m_session )
.tqarg( "0" ) );
.arg( m_session )
.arg( "0" ) );
Amarok::StatusBar::instance()->shortMessage( i18n("Ban, as in dislike", "Banning song...") );
}
@ -763,7 +763,7 @@ WebService::friends( TQString username )
connect( http, TQT_SIGNAL( requestFinished( bool ) ), this, TQT_SLOT( friendsFinished( bool ) ) );
http->get( TQString( "/1.0/user/%1/friends.xml" )
.tqarg( TQString( TQUrl( username ).encodedPathAndQuery() ) ) );
.arg( TQString( TQUrl( username ).encodedPathAndQuery() ) ) );
}
@ -805,7 +805,7 @@ WebService::neighbours( TQString username )
connect( http, TQT_SIGNAL( requestFinished( bool ) ), this, TQT_SLOT( neighboursFinished( bool ) ) );
http->get( TQString( "/1.0/user/%1/neighbours.xml" )
.tqarg( TQString( TQUrl( username ).encodedPathAndQuery() ) ) );
.arg( TQString( TQUrl( username ).encodedPathAndQuery() ) ) );
}
@ -847,7 +847,7 @@ WebService::userTags( TQString username )
connect( http, TQT_SIGNAL( requestFinished( bool ) ), this, TQT_SLOT( userTagsFinished( bool ) ) );
http->get( TQString( "/1.0/user/%1/tags.xml?debug=%2" )
.tqarg( TQString( TQUrl( username ).encodedPathAndQuery() ) ) );
.arg( TQString( TQUrl( username ).encodedPathAndQuery() ) ) );
}
@ -889,7 +889,7 @@ WebService::recentTracks( TQString username )
connect( http, TQT_SIGNAL( requestFinished( bool ) ), this, TQT_SLOT( recentTracksFinished( bool ) ) );
http->get( TQString( "/1.0/user/%1/recenttracks.xml" )
.tqarg( TQString( TQUrl( username ).encodedPathAndQuery() ) ) );
.arg( TQString( TQUrl( username ).encodedPathAndQuery() ) ) );
}
@ -931,35 +931,35 @@ WebService::recommend( int type, TQString username, TQString artist, TQString to
switch ( type )
{
case 0:
modeToken = TQString( "artist_name=%1" ).tqarg( TQString( TQUrl( artist ).encodedPathAndQuery() ) );
modeToken = TQString( "artist_name=%1" ).arg( TQString( TQUrl( artist ).encodedPathAndQuery() ) );
break;
case 1:
modeToken = TQString( "album_artist=%1&album_name=%2" )
.tqarg( TQString( TQUrl( artist ).encodedPathAndQuery() ) )
.tqarg( TQString( TQUrl( token ).encodedPathAndQuery() ) );
.arg( TQString( TQUrl( artist ).encodedPathAndQuery() ) )
.arg( TQString( TQUrl( token ).encodedPathAndQuery() ) );
break;
case 2:
modeToken = TQString( "track_artist=%1&track_name=%2" )
.tqarg( TQString( TQUrl( artist ).encodedPathAndQuery() ) )
.tqarg( TQString( TQUrl( token ).encodedPathAndQuery() ) );
.arg( TQString( TQUrl( artist ).encodedPathAndQuery() ) )
.arg( TQString( TQUrl( token ).encodedPathAndQuery() ) );
break;
}
TQHttp *http = new TQHttp( "wsdev.audioscrobbler.com", 80, this );
connect( http, TQT_SIGNAL( requestFinished( bool ) ), this, TQT_SLOT( recommendFinished( bool ) ) );
uint currentTime = TQDateTime::tqcurrentDateTime( Qt::UTC ).toTime_t();
uint currentTime = TQDateTime::currentDateTime( Qt::UTC ).toTime_t();
TQString challenge = TQString::number( currentTime );
TQCString md5pass = KMD5( KMD5( m_password.utf8() ).hexDigest() + currentTime ).hexDigest();
token = TQString( "user=%1&auth=%2&nonce=%3recipient=%4" )
.tqarg( TQString( TQUrl( currentUsername() ).encodedPathAndQuery() ) )
.tqarg( TQString( TQUrl( md5pass ).encodedPathAndQuery() ) )
.tqarg( TQString( TQUrl( challenge ).encodedPathAndQuery() ) )
.tqarg( TQString( TQUrl( username ).encodedPathAndQuery() ) );
.arg( TQString( TQUrl( currentUsername() ).encodedPathAndQuery() ) )
.arg( TQString( TQUrl( md5pass ).encodedPathAndQuery() ) )
.arg( TQString( TQUrl( challenge ).encodedPathAndQuery() ) )
.arg( TQString( TQUrl( username ).encodedPathAndQuery() ) );
TQHttpRequestHeader header( "POST", "/1.0/rw/recommend.php?" + token.utf8() );
header.setValue( "Host", "wsdev.audioscrobbler.com" );

@ -56,7 +56,7 @@ MagnatuneArtistInfoBox::displayAlbumInfo( MagnatuneAlbum *album )
const MagnatuneArtist artist = MagnatuneDatabaseHandler::instance()->getArtistById( album->getArtistId() );
const TQString artistName = artist.getName();
TQString infoHtml = "<HTML><HEAD><META HTTP-ETQUIV=\"Content-Type\" "
TQString infoHtml = "<HTML><HEAD><META HTTP-EQUIV=\"Content-Type\" "
"CONTENT=\"text/html; charset=iso-8859-1\"></HEAD><BODY>";
infoHtml += "<div align=\"center\"><strong>";
@ -133,7 +133,7 @@ MagnatuneArtistInfoBox::extractArtistInfo( TQString artistPage )
}
TQString infoHtml = "<HTML><HEAD><META HTTP-ETQUIV=\"Content-Type\" "
TQString infoHtml = "<HTML><HEAD><META HTTP-EQUIV=\"Content-Type\" "
"CONTENT=\"text/html; charset=iso-8859-1\"></HEAD><BODY>";
infoHtml += trimmedHtml;

@ -92,7 +92,7 @@
<property name="text">
<string>If you download to a location that is already being monitored by Amarok, the album will automatically be added to your collection.</string>
</property>
<property name="tqalignment">
<property name="alignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>

@ -48,13 +48,13 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>200</width>
<height>201</height>
</size>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>200</width>
<height>201</height>
@ -74,7 +74,7 @@
<property name="text">
<string>You have chosen to purchase the following album from Magnatune.com</string>
</property>
<property name="tqalignment">
<property name="alignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
@ -158,7 +158,7 @@
</widget>
<widget class="TQLayoutWidget" row="3" column="0">
<property name="name">
<cstring>tqlayout2</cstring>
<cstring>layout2</cstring>
</property>
<hbox>
<property name="name">
@ -180,7 +180,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>41</width>
<height>21</height>
@ -614,7 +614,7 @@
<property name="text">
<string>The amount you choose to pay will be split 50/50 between the artist and Magnatune.com. Your credit card information is sent directly to Magnatune.com using SSL encryption and is not stored by Amarok.</string>
</property>
<property name="tqalignment">
<property name="alignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
@ -656,7 +656,7 @@
<property name="sizeType">
<enum>Minimum</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>

@ -53,7 +53,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>170</width>
<height>20</height>

@ -48,9 +48,9 @@ MagnatuneXmlParser::completeJob( )
{
Amarok::StatusBar::instance() ->longMessage(
i18n( "Magnatune.com database update complete. Added %1 tracks on %2 albums from %3 artists" )
.tqarg( m_nNumberOfTracks )
.tqarg( m_nNumberOfAlbums )
.tqarg( m_nNumberOfArtists ), KDE::StatusBar::Information );
.arg( m_nNumberOfTracks )
.arg( m_nNumberOfAlbums )
.arg( m_nNumberOfArtists ), KDE::StatusBar::Information );
emit( doneParsing() );
}

@ -97,8 +97,8 @@ private:
void parseElement( TQDomElement e );
/**
* Parses all tqchildren of a DOM element
* @param e The element whose tqchildren is to be parsed
* Parses all children of a DOM element
* @param e The element whose children is to be parsed
*/
void parseChildren( TQDomElement e );

@ -22,7 +22,7 @@
#include "metadata/tplugins.h"
//#define AMAROK_USE_DRKONQI
#define AMAROK_USE_DRKONQI
extern class KAboutData aboutData; //defined in amarokcore/app.cpp

@ -122,7 +122,7 @@ class SpaceLabel : public TQLabel {
void paintEvent(TQPaintEvent *e)
{
TQPainter p(this);
p.fillRect(e->rect(), tqcolorGroup().brush(TQColorGroup::Background));
p.fillRect(e->rect(), colorGroup().brush(TQColorGroup::Background));
if(m_total > 0)
{
@ -165,7 +165,7 @@ class SpaceLabel : public TQLabel {
if(scheduled > left)
left = scheduled;
int right = e->rect().right();
p.fillRect(left, e->rect().top(), right, e->rect().bottom()+1, tqcolorGroup().brush(TQColorGroup::Background));
p.fillRect(left, e->rect().top(), right, e->rect().bottom()+1, colorGroup().brush(TQColorGroup::Background));
}
}
TQLabel::paintEvent(e);
@ -630,11 +630,11 @@ MediaBrowser::updateDevices()
TQString name = (*it)->name();
if( !(*it)->deviceNode().isEmpty() )
{
name = i18n( "%1 at %2" ).tqarg( name, (*it)->deviceNode() );
name = i18n( "%1 at %2" ).arg( name, (*it)->deviceNode() );
}
if( (*it)->hasMountPoint() && !(*it)->mountPoint().isEmpty() )
{
name += i18n( " (mounted at %1)" ).tqarg( (*it)->mountPoint() );
name += i18n( " (mounted at %1)" ).arg( (*it)->mountPoint() );
}
m_deviceCombo->insertItem( name, i );
if( it == m_currentDevice )
@ -721,7 +721,7 @@ MediaBrowser::transcode( const KURL &src, const TQString &filetype )
while( m_waitForTranscode && sm->transcodeScriptRunning() != TQString() )
{
usleep( 10000 );
kapp->tqprocessEvents( 100 );
kapp->processEvents( 100 );
}
return m_transcodedUrl;
@ -1090,10 +1090,10 @@ MediaItem::compare( TQListViewItem *i, int col, bool ascending ) const
else if( item && item->type() == MediaItem::ARTIST )
{
TQString key1 = key( col, ascending );
if( key1.tqstartsWith( "the ", false ) )
if( key1.startsWith( "the ", false ) )
key1 = key1.mid( 4 );
TQString key2 = i->key( col, ascending );
if( key2.tqstartsWith( "the ", false ) )
if( key2.startsWith( "the ", false ) )
key2 = key2.mid( 4 );
return key1.localeAwareCompare( key2 );
@ -1127,13 +1127,13 @@ class MediaItemTip : public TQToolTip
{
if( b->track() )
text = TQString( "%1 - %2 (%3)" )
.tqarg( TQString::number(b->track()), b->title(), b->prettyLength() );
.arg( TQString::number(b->track()), b->title(), b->prettyLength() );
if( !b->genre().isEmpty() )
{
if( !text.isEmpty() )
text += "<br>";
text += TQString( "<i>Genre: %1</i>" )
.tqarg( b->genre() );
.arg( b->genre() );
}
}
}
@ -1164,7 +1164,7 @@ class MediaItemTip : public TQToolTip
}
if( !text.isEmpty() && !text.isNull() )
tip( m_view->tqitemRect( i ), text );
tip( m_view->itemRect( i ), text );
}
TQListView *m_view;
@ -1498,9 +1498,9 @@ MediaView::viewportPaintEvent( TQPaintEvent *e )
const uint w = t.width() + 20;
const uint h = t.height() + 20;
p.setBrush( tqcolorGroup().background() );
p.setBrush( colorGroup().background() );
p.drawRoundRect( 15, 15, w, h, (8*200)/w, (8*200)/h );
t.draw( &p, 20, 20, TQRect(), tqcolorGroup() );
t.draw( &p, 20, 20, TQRect(), colorGroup() );
}
MediaBrowser::instance()->updateButtons();
}
@ -1629,7 +1629,7 @@ MediaBrowser::mediumChanged( const Medium *medium, TQString /*name*/ )
Amarok::StatusBar::instance()->longMessage(
i18n( "The device %1 was unmounted before it was synchronized. "
"In order to avoid data loss, press the \"Disconnect\" button "
"before unmounting the device." ).tqarg( name ),
"before unmounting the device." ).arg( name ),
KDE::StatusBar::Warning );
//(*it)->disconnectDevice();
}
@ -1658,7 +1658,7 @@ MediaBrowser::mediumRemoved( const Medium *medium, TQString name )
Amarok::StatusBar::instance()->longMessage(
i18n( "The device %1 was removed before it was disconnected. "
"In order to avoid possible data loss, press the \"Disconnect\" "
"button before disconnecting the device." ).tqarg( name ),
"button before disconnecting the device." ).arg( name ),
KDE::StatusBar::Warning );
}
else
@ -1678,7 +1678,7 @@ MediaBrowser::loadDevicePlugin( const TQString &deviceType )
return 0;
TQString query = "[X-KDE-Amarok-plugintype] == 'mediadevice' and [X-KDE-Amarok-name] == '%1'";
Amarok::Plugin *plugin = PluginManager::createFromQuery( query.tqarg( deviceType ) );
Amarok::Plugin *plugin = PluginManager::createFromQuery( query.arg( deviceType ) );
if( plugin )
{
@ -1839,13 +1839,13 @@ MediaBrowser::updateStats()
TQString text = i18n( "1 track in queue", "%n tracks in queue", m_queue->childCount() );
if(m_queue->childCount() > 0)
{
text += i18n(" (%1)").tqarg( KIO::convertSize( queued ) );
text += i18n(" (%1)").arg( KIO::convertSize( queued ) );
}
KIO::filesize_t total, avail;
if( currentDevice() && currentDevice()->getCapacity(&total, &avail) )
{
text += i18n( " - %1 of %2 available" ).tqarg( KIO::convertSize( avail ) ).tqarg( KIO::convertSize( total ) );
text += i18n( " - %1 of %2 available" ).arg( KIO::convertSize( avail ) ).arg( KIO::convertSize( total ) );
m_stats->m_used = total-avail;
m_stats->m_total = total;
@ -1884,7 +1884,7 @@ MediaView::setFilter( const TQString &filter, MediaItem *parent )
it = dynamic_cast<MediaItem *>(parent->firstChild());
}
bool tqchildrenVisible = false;
bool childrenVisible = false;
for( ; it; it = dynamic_cast<MediaItem *>(it->nextSibling()))
{
bool visible = true;
@ -1929,13 +1929,13 @@ MediaView::setFilter( const TQString &filter, MediaItem *parent )
visible = true;
it->setVisible( visible );
if(visible)
tqchildrenVisible = true;
childrenVisible = true;
}
if( root && m_device )
m_device->updateRootItems();
return tqchildrenVisible;
return childrenVisible;
}
MediaDevice::MediaDevice()
@ -2110,7 +2110,7 @@ MediaDevice::bundlesToSync( const TQString &name, const KURL &url )
BundleList bundles;
if( !PlaylistFile::isPlaylistFile( url ) )
{
Amarok::StatusBar::instance()->longMessage( i18n( "Not a playlist file: %1" ).tqarg( url.path() ),
Amarok::StatusBar::instance()->longMessage( i18n( "Not a playlist file: %1" ).arg( url.path() ),
KDE::StatusBar::Sorry );
return bundles;
}
@ -2118,7 +2118,7 @@ MediaDevice::bundlesToSync( const TQString &name, const KURL &url )
PlaylistFile playlist( url.path() );
if( playlist.isError() )
{
Amarok::StatusBar::instance()->longMessage( i18n( "Failed to load playlist: %1" ).tqarg( url.path() ),
Amarok::StatusBar::instance()->longMessage( i18n( "Failed to load playlist: %1" ).arg( url.path() ),
KDE::StatusBar::Sorry );
return bundles;
}
@ -2253,7 +2253,7 @@ MediaQueue::addURL( const KURL& url2, MetaBundle *bundle, const TQString &playli
if( playlist.isError() )
{
Amarok::StatusBar::instance()->longMessage( i18n( "Failed to load playlist: %1" ).tqarg( url.path() ),
Amarok::StatusBar::instance()->longMessage( i18n( "Failed to load playlist: %1" ).arg( url.path() ),
KDE::StatusBar::Sorry );
return;
}
@ -2295,7 +2295,7 @@ MediaQueue::addURL( const KURL& url2, MetaBundle *bundle, const TQString &playli
if( it->url() == url )
{
Amarok::StatusBar::instance()->shortMessage(
i18n( "Track already queued for transfer: %1" ).tqarg( url.url() ) );
i18n( "Track already queued for transfer: %1" ).arg( url.url() ) );
return;
}
}
@ -2453,7 +2453,7 @@ int MediaDevice::sysCall( const TQString &command )
sysProc->clearArguments();
(*sysProc) << command;
if (!sysProc->start( KProcess::Block, KProcess::AllOutput ))
kdFatal() << i18n("could not execute %1").tqarg(command.local8Bit().data()) << endl;
kdFatal() << i18n("could not execute %1").arg(command.local8Bit().data()) << endl;
return (sysProc->exitStatus());
}
@ -2490,7 +2490,7 @@ MediaDevice::kioCopyTrack( const KURL &src, const KURL &dst )
else
{
usleep(10000);
kapp->tqprocessEvents( 100 );
kapp->processEvents( 100 );
}
}
@ -2501,7 +2501,7 @@ MediaDevice::kioCopyTrack( const KURL &src, const KURL &dst )
tryToRemove = true;
Amarok::StatusBar::instance()->longMessage(
i18n( "Media Device: Copying %1 to %2 failed" )
.tqarg( src.prettyURL(), dst.prettyURL() ),
.arg( src.prettyURL(), dst.prettyURL() ),
KDE::StatusBar::Error );
}
else
@ -2512,7 +2512,7 @@ MediaDevice::kioCopyTrack( const KURL &src, const KURL &dst )
tryToRemove = true;
// probably s.th. went wrong
Amarok::StatusBar::instance()->longMessage(
i18n( "Media Device: Reading tags from %1 failed" ).tqarg( dst.prettyURL() ),
i18n( "Media Device: Reading tags from %1 failed" ).arg( dst.prettyURL() ),
KDE::StatusBar::Error );
}
}
@ -2783,7 +2783,7 @@ MediaDevice::syncStatsFromDevice( MediaItem *root )
it = static_cast<MediaItem *>( root->firstChild() );
}
kapp->tqprocessEvents( 100 );
kapp->processEvents( 100 );
for( ; it; it = static_cast<MediaItem *>( it->nextSibling() ) )
{
@ -2885,7 +2885,7 @@ MediaDevice::syncStatsToDevice( MediaItem *root )
it = static_cast<MediaItem *>( root->firstChild() );
}
kapp->tqprocessEvents( 100 );
kapp->processEvents( 100 );
for( ; it; it = static_cast<MediaItem *>( it->nextSibling() ) )
{
@ -2958,7 +2958,7 @@ MediaDevice::transferFiles()
delete transferredItem;
setProgress( progress() + 1 );
m_parent->m_queue->itemCountChanged();
kapp->tqprocessEvents( 100 );
kapp->processEvents( 100 );
continue;
}
@ -3051,7 +3051,7 @@ MediaDevice::transferFiles()
if( !isPlayable( *bundle ) )
{
Amarok::StatusBar::instance()->shortMessage( i18n( "Track not playable on media device: %1" ).tqarg( bundle->url().path() ),
Amarok::StatusBar::instance()->shortMessage( i18n( "Track not playable on media device: %1" ).arg( bundle->url().path() ),
KDE::StatusBar::Sorry );
unplayable += (*it).url();
transferredItem->setFailed();
@ -3071,7 +3071,7 @@ MediaDevice::transferFiles()
if( !isCanceled() )
{
Amarok::StatusBar::instance()->longMessage(
i18n( "Failed to copy track to media device: %1" ).tqarg( bundle->url().path() ),
i18n( "Failed to copy track to media device: %1" ).arg( bundle->url().path() ),
KDE::StatusBar::Sorry );
transferredItem->setFailed();
}
@ -3132,7 +3132,7 @@ MediaDevice::transferFiles()
}
m_parent->updateStats();
kapp->tqprocessEvents( 100 );
kapp->processEvents( 100 );
}
synchronizeDevice();
unlockDevice();

@ -14,15 +14,51 @@ if( NOT RUBY_EXECUTABLE )
tde_message_fatal( "ruby is required, but was not found on your system" )
endif( )
# In ruby 1.9.x, ruby.h is located in a different location than previous releases.
execute_process(
COMMAND ${RUBY_EXECUTABLE} -rrbconfig -e "puts Config.expand( Config::MAKEFILE_CONFIG['archdir'] )"
OUTPUT_VARIABLE RUBY_INCLUDE_DIR
COMMAND ${RUBY_EXECUTABLE} -rrbconfig -e "puts Config.expand( Config::MAKEFILE_CONFIG['MAJOR'] )"
OUTPUT_VARIABLE RUBY_VERSION_MAJOR
RESULT_VARIABLE _result
OUTPUT_STRIP_TRAILING_WHITESPACE )
if( _result )
tde_message_fatal( "Unable to run ${RUBY_EXECUTABLE}!\n RUBY is correctly installed?" )
endif( )
execute_process(
COMMAND ${RUBY_EXECUTABLE} -rrbconfig -e "puts Config.expand( Config::MAKEFILE_CONFIG['MINOR'] )"
OUTPUT_VARIABLE RUBY_VERSION_MINOR
RESULT_VARIABLE _result
OUTPUT_STRIP_TRAILING_WHITESPACE )
if( _result )
tde_message_fatal( "Unable to run ${RUBY_EXECUTABLE}!\n RUBY is correctly installed?" )
endif( )
set( RUBY_VERSION ${RUBY_VERSION_MAJOR}${RUBY_VERSION_MINOR} )
if ( "${RUBY_VERSION}" GREATER "18" )
execute_process(
COMMAND ${RUBY_EXECUTABLE} -rrbconfig -e "puts Config.expand( Config::MAKEFILE_CONFIG['rubyhdrdir'] )"
OUTPUT_VARIABLE RUBY_INCLUDE_DIR
RESULT_VARIABLE _result
OUTPUT_STRIP_TRAILING_WHITESPACE )
if( _result )
tde_message_fatal( "Unable to run ${RUBY_EXECUTABLE}!\n RUBY is correctly installed?" )
endif( )
else( )
execute_process(
COMMAND ${RUBY_EXECUTABLE} -rrbconfig -e "puts Config.expand( Config::MAKEFILE_CONFIG['archdir'] )"
OUTPUT_VARIABLE RUBY_INCLUDE_DIR
RESULT_VARIABLE _result
OUTPUT_STRIP_TRAILING_WHITESPACE )
if( _result )
tde_message_fatal( "Unable to run ${RUBY_EXECUTABLE}!\n RUBY is correctly installed?" )
endif( )
endif( )
execute_process(
COMMAND ${RUBY_EXECUTABLE} -rrbconfig -e "puts Config.expand( Config::MAKEFILE_CONFIG['arch'] )"
OUTPUT_VARIABLE RUBY_ARCH
RESULT_VARIABLE _result
OUTPUT_STRIP_TRAILING_WHITESPACE )
if( _result )
tde_message_fatal( "Unable to run ${RUBY_EXECUTABLE}!\n RUBY is correctly installed?" )
endif( )
execute_process(
COMMAND ${RUBY_EXECUTABLE} -rrbconfig -e "puts Config.expand( Config::MAKEFILE_CONFIG['LIBRUBYARG_SHARED'] )"
OUTPUT_VARIABLE RUBY_LDFLAGS
@ -36,4 +72,11 @@ if( RUBY_INCLUDE_DIR AND RUBY_LDFLAGS )
message( STATUS "Found RUBY: ${RUBY_EXECUTABLE}" )
message( STATUS " RUBY_INCLUDE_DIR: ${RUBY_INCLUDE_DIR}" )
message( STATUS " RUBY_LDFLAGS: ${RUBY_LDFLAGS}" )
message( STATUS " RUBY_VERSION_MAJOR: ${RUBY_VERSION_MAJOR}")
message( STATUS " RUBY_VERSION_MINOR: ${RUBY_VERSION_MINOR}")
message( STATUS " RUBY_ARCH: ${RUBY_ARCH}")
endif( )
if ( "${RUBY_VERSION_MAJOR}${RUBY_VERSION_MINOR}" VERSION_LESS "19" )
message( STATUS " You have an older version of Ruby! (<1.9)")
set ( HAVE_OLD_RUBY 1 CACHE INTERNAL "" )
endif( )

@ -24,7 +24,7 @@
</property>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout4</cstring>
<cstring>layout4</cstring>
</property>
<grid>
<property name="name">
@ -42,7 +42,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>64</width>
<height>64</height>
@ -84,7 +84,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>130</height>
@ -95,7 +95,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout5</cstring>
<cstring>layout5</cstring>
</property>
<hbox>
<property name="name">
@ -124,7 +124,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>30</width>
<height>20</height>

@ -227,7 +227,7 @@ DaapClient::rmbPressed( TQListViewItem* qitem, const TQPoint& point, int )
{
DEBUG_BLOCK
enum Actions { APPEND, LOAD, TQUEUE, INFO, CONNECT, REMOVE, DOWNLOAD };
enum Actions { APPEND, LOAD, QUEUE, INFO, CONNECT, REMOVE, DOWNLOAD };
MediaItem *item = dynamic_cast<MediaItem *>(qitem);
ServerItem* sitem = dynamic_cast<ServerItem *>(qitem);
@ -258,7 +258,7 @@ DaapClient::rmbPressed( TQListViewItem* qitem, const TQPoint& point, int )
urls = m_view->nodeBuildDragList( 0 );
menu.insertItem( SmallIconSet( Amarok::icon( "playlist" ) ), i18n( "&Load" ), LOAD );
menu.insertItem( SmallIconSet( Amarok::icon( "add_playlist" ) ), i18n( "&Append to Playlist" ), APPEND );
menu.insertItem( SmallIconSet( Amarok::icon( "fastforward" ) ), i18n( "&Queue Tracks" ), TQUEUE );
menu.insertItem( SmallIconSet( Amarok::icon( "fastforward" ) ), i18n( "&Queue Tracks" ), QUEUE );
menu.insertSeparator();
menu.insertItem( SmallIconSet( Amarok::icon( "playlist" ) ), i18n( "&Copy Files to Collection..." ), DOWNLOAD );
@ -286,7 +286,7 @@ DaapClient::rmbPressed( TQListViewItem* qitem, const TQPoint& point, int )
case APPEND:
Playlist::instance()->insertMedia( urls, Playlist::Append );
break;
case TQUEUE:
case QUEUE:
Playlist::instance()->insertMedia( urls, Playlist::Queue );
break;
case INFO:
@ -483,7 +483,7 @@ DaapClient::customClicked()
if( dialog.exec() == TQDialog::Accepted ) {
TQString ip = resolve( dialog.m_base->m_hostName->text() );
if( ip == "0" )
Amarok::StatusBar::instance()->shortMessage( i18n("Could not resolve %1.").tqarg( dialog.m_base->m_hostName->text() ) );
Amarok::StatusBar::instance()->shortMessage( i18n("Could not resolve %1.").arg( dialog.m_base->m_hostName->text() ) );
else
{
TQString key = ServerItem::key( dialog.m_base->m_hostName->text(), dialog.m_base->m_portInput->value() );
@ -735,7 +735,7 @@ ServerItem::setOpen( bool o )
startAnimation();
connect( &m_animationTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAnimation()) );
setText( 0, i18n( "Loading %1").tqarg( text( 0 ) ) );
setText( 0, i18n( "Loading %1").arg( text( 0 ) ) );
Daap::Reader* reader = new Daap::Reader( m_ip, m_port, this,
TQString(), m_daapClient, ( m_ip + ":3689" ).ascii() );
@ -781,7 +781,7 @@ ServerItem::httpError( const TQString& errorString )
{
stopAnimation();
resetTitle();
Amarok::StatusBar::instance()->longMessage( i18n( "The following error occurred while trying to connect to the remote server:<br>%1").tqarg( errorString ) );
Amarok::StatusBar::instance()->longMessage( i18n( "The following error occurred while trying to connect to the remote server:<br>%1").arg( errorString ) );
m_reader->deleteLater();
m_reader = 0;
m_loaded = false;

@ -29,7 +29,7 @@
#else
namespace DNSSD {
namespace RemoteService {
class Ptr {}; //HACK Dummy class, so that daapclient.tqmoc compiles
class Ptr {}; //HACK Dummy class, so that daapclient.moc compiles
}
}
#endif

@ -258,7 +258,7 @@ Reader::databaseIdFinished( int /*id*/, bool error )
m_databaseId = TQString::number( dbIdResults["avdb"].asList()[0].asMap()["mlcl"].asList()[0].asMap()["mlit"].asList()[0].asMap()["miid"].asList()[0].asInt() );
connect( http, TQT_SIGNAL( requestFinished( int, bool ) ), this, TQT_SLOT( songListFinished( int, bool ) ) );
http->getDaap( TQString("/databases/%1/items?type=music&meta=dmap.itemid,dmap.itemname,daap.songformat,daap.songartist,daap.songalbum,daap.songtime,daap.songtracknumber,daap.songcomment,daap.songyear,daap.songgenre&%2")
.tqarg( m_databaseId, m_loginString ) );
.arg( m_databaseId, m_loginString ) );
}
@ -388,7 +388,7 @@ Reader::parse( TQDataStream &raw, uint containerLength, bool first )
TQ_INT8 patchLevel;
raw >> major >> minor >> patchLevel; DEBUGTAG( patchLevel )
TQString version("%1.%2.%3");
version.tqarg(major, minor, patchLevel);
version.arg(major, minor, patchLevel);
addElement( childMap, tag, TQVariant(version) );
}
break;

@ -52,7 +52,7 @@ DaapServer::~DaapServer()
void
DaapServer::readSql()
{
static const TQCString sqlPrefix = "SQL TQUERY: ";
static const TQCString sqlPrefix = "SQL QUERY: ";
static const TQCString serverStartPrefix = "SERVER STARTING: ";
TQString line;
while( m_server->readln( line ) != -1 )
@ -71,7 +71,7 @@ DaapServer::readSql()
#if DNSSD_SUPPORT
KUser current;
if( !m_service )
m_service = new DNSSD::PublicService( i18n("%1's Amarok Share").tqarg( current.fullName() ), "_daap._tcp", line.toInt() );
m_service = new DNSSD::PublicService( i18n("%1's Amarok Share").arg( current.fullName() ), "_daap._tcp", line.toInt() );
debug() << "port number: " << line.toInt() << endl;
m_service->publishAsync();
#endif

@ -15,6 +15,8 @@ add_definitions(
)
include_directories(
${CMAKE_BINARY_DIR}
${RUBY_INCLUDE_DIR}/${RUBY_ARCH}
${RUBY_INCLUDE_DIR}
)

@ -4,14 +4,11 @@ amarokrubylib_LTLIBRARIES = libhttp11.la
amarokrubylib_DATA = http11.rb
INCLUDES = -I$(ruby_includes) -Dinline=__inline__ -Dasm=__asm__
INCLUDES = $(RUBY_CFLAGS) -Dinline=__inline__ -Dasm=__asm__
libhttp11_la_LDFLAGS = \
-shared \
$(ruby_ldflags)
#http11_so_LIBADD = \
# -lruby18
$(RUBY_LIBRUBYARG)
libhttp11_la_SOURCES = \
http11.c \

@ -3,7 +3,7 @@
#define RAISE_NOT_NULL(T) if(T == NULL) rb_raise(rb_eArgError, "NULL found for " # T " when shouldn't be.");
#define DATA_GET(from,type,name) Data_Get_Struct(from,type,name); RAISE_NOT_NULL(name);
#define RETQUIRE_TYPE(V, T) if(TYPE(V) != T) rb_raise(rb_eTypeError, "Wrong argument type for " # V " required " # T);
#define REQUIRE_TYPE(V, T) if(TYPE(V) != T) rb_raise(rb_eTypeError, "Wrong argument type for " # V " required " # T);
#ifdef DEBUG
#define TRACE() fprintf(stderr, "> %s:%d:%s\n", __FILE__, __LINE__, __FUNCTION__)

@ -2,6 +2,11 @@
* Copyright (c) 2005 Zed A. Shaw
* You can redistribute it and/or modify it under the same terms as Ruby.
*/
#define HAVE_STRLCAT_PROTO 1
#define HAVE_STRLCPY_PROTO 1
#include "config.h"
#include "ruby.h"
#include "ext_help.h"
#include <assert.h>
@ -45,7 +50,7 @@ static VALUE global_port_80;
#define DEF_MAX_LENGTH(N,length) const size_t MAX_##N##_LENGTH = length; const char *MAX_##N##_LENGTH_ERR = "HTTP element " # N " is longer than the " # length " allowed length."
/** Validates the max length of given input and throws an HttpParserError exception if over. */
#define VALIDATE_MAX_LENGTH(len, N) if(len > MAX_##N##_LENGTH) { rb_raise(eHttpParserError, MAX_##N##_LENGTH_ERR); }
#define VALIDATE_MAX_LENGTH(len, N) if(len > MAX_##N##_LENGTH) { rb_raise(eHttpParserError, "%s", MAX_##N##_LENGTH_ERR); }
/** Defines global strings in the init method. */
#define DEF_GLOBAL(N, val) global_##N = rb_obj_freeze(rb_str_new2(val)); rb_global_variable(&global_##N)
@ -56,7 +61,7 @@ DEF_MAX_LENGTH(FIELD_NAME, 256);
DEF_MAX_LENGTH(FIELD_VALUE, 80 * 1024);
DEF_MAX_LENGTH(REQUEST_URI, 1024 * 12);
DEF_MAX_LENGTH(REQUEST_PATH, 1024);
DEF_MAX_LENGTH(TQUERY_STRING, (1024 * 10));
DEF_MAX_LENGTH(QUERY_STRING, (1024 * 10));
DEF_MAX_LENGTH(HEADER, (1024 * (80 + 32)));
@ -74,7 +79,11 @@ void http_field(void *data, const char *field, size_t flen, const char *value, s
f = rb_str_dup(global_http_prefix);
f = rb_str_buf_cat(f, field, flen);
for(ch = RSTRING(f)->ptr, end = ch + RSTRING(f)->len; ch < end; ch++) {
#ifdef HAVE_OLD_RUBY
for(ch = RSTRING(f)->ptr, end = ch + RSTRING(f)->len; ch < end; ch++) {
#else
for(ch = RSTRING_PTR(f), end = ch + RSTRING_LEN(f); ch < end; ch++) {
#endif
if(*ch == '-') {
*ch = '_';
} else {
@ -121,7 +130,7 @@ void query_string(void *data, const char *at, size_t length)
VALUE req = (VALUE)data;
VALUE val = Qnil;
VALIDATE_MAX_LENGTH(length, TQUERY_STRING);
VALIDATE_MAX_LENGTH(length, QUERY_STRING);
val = rb_str_new(at, length);
rb_hash_aset(req, global_query_string, val);
@ -157,12 +166,25 @@ void header_done(void *data, const char *at, size_t length)
rb_hash_aset(req, global_gateway_interface, global_gateway_interface_value);
if((temp = rb_hash_aref(req, global_http_host)) != Qnil) {
colon = strchr(RSTRING(temp)->ptr, ':');
#ifdef HAVE_OLD_RUBY
colon = strchr(RSTRING(temp)->ptr, ':');
#else
colon = strchr(RSTRING_PTR(temp), ':');
#endif
if(colon != NULL) {
rb_hash_aset(req, global_server_name, rb_str_substr(temp, 0, colon - RSTRING(temp)->ptr));
#ifdef HAVE_OLD_RUBY
rb_hash_aset(req, global_server_name, rb_str_substr(temp, 0, colon - RSTRING(temp)->ptr));
#else
rb_hash_aset(req, global_server_name, rb_str_substr(temp, 0, colon - RSTRING_PTR(temp)));
#endif
rb_hash_aset(req, global_server_port,
rb_str_substr(temp, colon - RSTRING(temp)->ptr+1,
RSTRING(temp)->len));
#ifdef HAVE_OLD_RUBY
rb_str_substr(temp, colon - RSTRING(temp)->ptr+1,
RSTRING(temp)->len));
#else
rb_str_substr(temp, colon - RSTRING_PTR(temp)+1,
RSTRING_LEN(temp)));
#endif
} else {
rb_hash_aset(req, global_server_name, temp);
rb_hash_aset(req, global_server_port, global_port_80);
@ -281,8 +303,13 @@ VALUE HttpParser_execute(VALUE self, VALUE req_hash, VALUE data, VALUE start)
DATA_GET(self, http_parser, http);
from = FIX2INT(start);
dptr = RSTRING(data)->ptr;
dlen = RSTRING(data)->len;
#ifdef HAVE_OLD_RUBY
dptr = RSTRING(data)->ptr;
dlen = RSTRING(data)->len;
#else
dptr = RSTRING_PTR(data);
dlen = RSTRING_LEN(data);
#endif
if(from >= dlen) {
rb_raise(eHttpParserError, "Requested start is after data buffer end.");
@ -512,7 +539,11 @@ VALUE URIClassifier_resolve(VALUE self, VALUE uri)
if(pref_len == 1 && uri_str[0] == '/') {
rb_ary_push(result, uri);
} else {
rb_ary_push(result, rb_str_substr(uri, pref_len, RSTRING(uri)->len));
#ifdef HAVE_OLD_RUBY
rb_ary_push(result, rb_str_substr(uri, pref_len, RSTRING(uri)->len));
#else
rb_ary_push(result, rb_str_substr(uri, pref_len, RSTRING_LEN(uri)));
#endif
}
rb_ary_push(result, (VALUE)handler);

@ -73,7 +73,7 @@ module Mongrel
@head['Server'] = options['server'] || env_table['SERVER_SOFTWARE']
# remaining possible options they can give
@head['tqStatus'] = options['status'] if options['status']
@head['Status'] = options['status'] if options['status']
@head['Content-Language'] = options['language'] if options['language']
@head['Expires'] = options['expires'] if options['expires']
@ -117,7 +117,7 @@ module Mongrel
# The dumb thing is people can call header or this or both and in any order.
# So, we just reuse header and then finalize the HttpResponse the right way.
# tqStatus is taken from the various options and converted to what Mongrel needs
# Status is taken from the various options and converted to what Mongrel needs
# via the CGIWrapper.status function.
#
# We also prevent Rails from actually doing the final send by adding a

@ -399,7 +399,7 @@ module Mongrel
def process(request, response)
response.start do |head,out|
out.write <<-END
<html><body><title>Mongrel Server tqStatus</title>
<html><body><title>Mongrel Server Status</title>
#{describe_listener}
</body></html>
END

@ -395,11 +395,11 @@ class TarReader
end
def close
tqinvalidate
invalidate
end
private
def tqinvalidate
def invalidate
extend InvalidEntry
end
end

@ -56,7 +56,7 @@ Proxy::Proxy(KURL stream, DaapClient* client, const char* name)
const int port = socket->port();
debug() << "Proxy server using port: " << port << endl;
delete socket;
m_proxyUrl = KURL( TQString("http://localhost:%1/daap.mp3").tqarg( port ) );
m_proxyUrl = KURL( TQString("http://localhost:%1/daap.mp3").arg( port ) );
//start proxy
m_proxy->setComm( KProcess::Communication( KProcess::AllOutput ) );
*m_proxy << "amarok_proxy.rb";

@ -113,7 +113,7 @@ class GenericMediaFile
, m_device( device )
{
m_listed = false;
m_tqchildren = new MediaFileList();
m_children = new MediaFileList();
if( m_parent )
{
@ -152,8 +152,8 @@ class GenericMediaFile
m_parent->removeChild( this );
m_device->getItemMap().erase( m_viewItem );
m_device->getFileMap().erase( m_fullName );
if ( m_tqchildren )
delete m_tqchildren;
if ( m_children )
delete m_children;
if ( m_viewItem )
delete m_viewItem;
}
@ -174,7 +174,7 @@ class GenericMediaFile
}
void
removeChild( GenericMediaFile* childToDelete ) { m_tqchildren->remove( childToDelete ); }
removeChild( GenericMediaFile* childToDelete ) { m_children->remove( childToDelete ); }
GenericMediaItem*
getViewItem() { return m_viewItem; }
@ -209,15 +209,15 @@ class GenericMediaFile
}
MediaFileList*
getChildren() { return m_tqchildren; }
getChildren() { return m_children; }
void
deleteAll( bool onlyChildren )
{
GenericMediaFile *vmf;
if( m_tqchildren && !m_tqchildren->isEmpty() )
if( m_children && !m_children->isEmpty() )
{
MediaFileListIterator it( *m_tqchildren );
MediaFileListIterator it( *m_children );
while( ( vmf = it.current() ) != 0 )
{
++it;
@ -232,9 +232,9 @@ class GenericMediaFile
renameAllChildren()
{
GenericMediaFile *vmf;
if( m_tqchildren && !m_tqchildren->isEmpty() )
if( m_children && !m_children->isEmpty() )
{
for( vmf = m_tqchildren->first(); vmf; vmf = m_tqchildren->next() )
for( vmf = m_children->first(); vmf; vmf = m_children->next() )
vmf->renameAllChildren();
}
setNamesFromBase();
@ -244,7 +244,7 @@ class GenericMediaFile
TQString m_fullName;
TQString m_baseName;
GenericMediaFile *m_parent;
MediaFileList *m_tqchildren;
MediaFileList *m_children;
GenericMediaItem *m_viewItem;
GenericMediaDevice* m_device;
bool m_listed;
@ -626,7 +626,7 @@ GenericMediaDevice::buildPodcastDestination( const PodcastEpisodeBundle *bundle
TQString name;
while ( parent > 0 )
{
values = CollectionDB::instance()->query( sql.tqarg( parent ) );
values = CollectionDB::instance()->query( sql.arg( parent ) );
name = values.first();
parent = values.last().toInt();
location += cleanPath( name ) + '/';
@ -653,7 +653,7 @@ GenericMediaDevice::copyTrackToDevice( const MetaBundle& bundle )
const KURL desturl = KURL::fromPathOrURL( path );
//kapp->tqprocessEvents( 100 );
//kapp->processEvents( 100 );
if( !kioCopyTrack( bundle.url(), desturl ) )
{
@ -667,7 +667,7 @@ GenericMediaDevice::copyTrackToDevice( const MetaBundle& bundle )
//other than to see if it is NULL or not
//if we're here the transfer shouldn't have failed, so we shouldn't get into a loop by waiting...
while( !m_view->firstChild() )
kapp->tqprocessEvents( 100 );
kapp->processEvents( 100 );
return static_cast<MediaItem*>(m_view->firstChild());
}
@ -774,7 +774,7 @@ GenericMediaDevice::expandItem( TQListViewItem *item ) // SLOT
while( !m_dirListerComplete )
{
kapp->tqprocessEvents( 100 );
kapp->processEvents( 100 );
usleep(10000);
}
}
@ -866,10 +866,10 @@ GenericMediaDevice::addTrackToList( int type, KURL url, int /*size*/ )
//or just update the list in the plugin as appropriate
else if( type == MediaItem::TRACK ) //file
{
if( baseName.tqendsWith( "mp3", false ) || baseName.tqendsWith( "wma", false ) ||
baseName.tqendsWith( "wav", false ) || baseName.tqendsWith( "ogg", false ) ||
baseName.tqendsWith( "asf", false ) || baseName.tqendsWith( "flac", false ) ||
baseName.tqendsWith( "aac", false ) || baseName.tqendsWith( "m4a", false ) )
if( baseName.endsWith( "mp3", false ) || baseName.endsWith( "wma", false ) ||
baseName.endsWith( "wav", false ) || baseName.endsWith( "ogg", false ) ||
baseName.endsWith( "asf", false ) || baseName.endsWith( "flac", false ) ||
baseName.endsWith( "aac", false ) || baseName.endsWith( "m4a", false ) )
newItem->getViewItem()->setType( MediaItem::TRACK );
@ -898,7 +898,7 @@ GenericMediaDevice::getCapacity( KIO::filesize_t *total, KIO::filesize_t *availa
while( m_kBSize == 0 && m_kBAvail == 0){
usleep( 10000 );
kapp->tqprocessEvents( 100 );
kapp->processEvents( 100 );
count++;
if (count > 120){
debug() << "KDiskFreeSp taking too long. Returning false from getCapacity()" << endl;
@ -929,7 +929,7 @@ GenericMediaDevice::foundMountPoint( const TQString & mountPoint, unsigned long
void
GenericMediaDevice::rmbPressed( TQListViewItem* qitem, const TQPoint& point, int )
{
enum Actions { APPEND, LOAD, TQUEUE,
enum Actions { APPEND, LOAD, QUEUE,
DOWNLOAD,
BURN_DATACD, BURN_AUDIOCD,
DIRECTORY, RENAME,
@ -941,7 +941,7 @@ GenericMediaDevice::rmbPressed( TQListViewItem* qitem, const TQPoint& point, int
KPopupMenu menu( m_view );
menu.insertItem( SmallIconSet( Amarok::icon( "playlist" ) ), i18n( "&Load" ), LOAD );
menu.insertItem( SmallIconSet( Amarok::icon( "1downarrow" ) ), i18n( "&Append to Playlist" ), APPEND );
menu.insertItem( SmallIconSet( Amarok::icon( "fastforward" ) ), i18n( "&Queue Tracks" ), TQUEUE );
menu.insertItem( SmallIconSet( Amarok::icon( "fastforward" ) ), i18n( "&Queue Tracks" ), QUEUE );
menu.insertSeparator();
menu.insertItem( SmallIconSet( Amarok::icon( "collection" ) ), i18n( "&Copy Files to Collection..." ), DOWNLOAD );
menu.insertItem( SmallIconSet( Amarok::icon( "cdrom_unmount" ) ), i18n( "Burn to CD as Data" ), BURN_DATACD );
@ -966,7 +966,7 @@ GenericMediaDevice::rmbPressed( TQListViewItem* qitem, const TQPoint& point, int
case APPEND:
Playlist::instance()->insertMedia( getSelectedItems(), Playlist::Append );
break;
case TQUEUE:
case QUEUE:
Playlist::instance()->insertMedia( getSelectedItems(), Playlist::Queue );
break;
case DOWNLOAD:

@ -35,7 +35,7 @@
</property>
<widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
<cstring>tqlayout88</cstring>
<cstring>layout88</cstring>
</property>
<vbox>
<property name="name">
@ -88,7 +88,7 @@
</widget>
<widget class="TQLayoutWidget" row="1" column="0">
<property name="name">
<cstring>tqlayout24</cstring>
<cstring>layout24</cstring>
</property>
<hbox>
<property name="name">
@ -96,7 +96,7 @@
</property>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout23</cstring>
<cstring>layout23</cstring>
</property>
<vbox>
<property name="name">
@ -133,7 +133,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout19</cstring>
<cstring>layout19</cstring>
</property>
<vbox>
<property name="name">
@ -171,7 +171,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>93</height>
@ -221,7 +221,7 @@
</property>
<widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
<cstring>tqlayout120</cstring>
<cstring>layout120</cstring>
</property>
<vbox>
<property name="name">
@ -229,7 +229,7 @@
</property>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout119</cstring>
<cstring>layout119</cstring>
</property>
<grid>
<property name="name">
@ -277,7 +277,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout96</cstring>
<cstring>layout96</cstring>
</property>
<vbox>
<property name="name">
@ -293,7 +293,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout86</cstring>
<cstring>layout86</cstring>
</property>
<hbox>
<property name="name">

@ -255,10 +255,10 @@ GenericMediaDeviceConfigDialog::buildFormatTip()
continue;
args[MetaBundle::exactColumnName( i ).lower()] = MetaBundle::prettyColumnName( i );
}
args["albumartist"] = i18n( "%1 or %2" ).tqarg( "Album Artist, The" , "The Album Artist" );
args["albumartist"] = i18n( "%1 or %2" ).arg( "Album Artist, The" , "The Album Artist" );
args["thealbumartist"] = "The Album Artist";
args["theartist"] = "The Artist";
args["artist"] = i18n( "%1 or %2" ).tqarg( "Artist, The" , "The Artist" );
args["artist"] = i18n( "%1 or %2" ).arg( "Artist, The" , "The Artist" );
args["initial"] = i18n( "Artist's Initial" );
args["filetype"] = i18n( "File Extension of Source" );
args["track"] = i18n( "Track Number" );
@ -270,7 +270,7 @@ GenericMediaDeviceConfigDialog::buildFormatTip()
it != args.end();
++it )
{
tooltip += TQString( "<li>%1 - %2" ).tqarg( it.data(), "%" + it.key() );
tooltip += TQString( "<li>%1 - %2" ).arg( it.data(), "%" + it.key() );
}
tooltip += "</ul>";

@ -419,7 +419,7 @@ IfpMediaDevice::copyTrackToDevice( const MetaBundle& bundle )
const TQCString dest = TQFile::encodeName( cleanPath(directory + newFilename) );
kapp->tqprocessEvents( 100 );
kapp->processEvents( 100 );
int result = uploadTrack( src, dest );
if( !result ) //success
@ -486,7 +486,7 @@ IfpMediaDevice::filetransferCallback( void *pData, struct ifp_transfer_status *p
{
// will be called by 'ifp_upload_file' by callback
kapp->tqprocessEvents( 100 );
kapp->processEvents( 100 );
IfpMediaDevice *that = static_cast<IfpMediaDevice *>(pData);
@ -526,14 +526,14 @@ IfpMediaDevice::deleteItemFromDevice( MediaItem *item, int /*flags*/ )
case MediaItem::DIRECTORY:
err = ifp_delete_dir_recursive( &m_ifpdev, encodedPath );
debug() << "Deleting folder: " << encodedPath << endl;
checkResult( err, i18n("Directory cannot be deleted: '%1'").tqarg(encodedPath.data()) );
checkResult( err, i18n("Directory cannot be deleted: '%1'").arg(encodedPath.data()) );
break;
default:
err = ifp_delete( &m_ifpdev, encodedPath );
debug() << "Deleting file: " << encodedPath << endl;
count += 1;
checkResult( err, i18n("File does not exist: '%1'").tqarg(encodedPath.data()) );
checkResult( err, i18n("File does not exist: '%1'").arg(encodedPath.data()) );
break;
}
if( err == 0 ) //success
@ -564,7 +564,7 @@ void
IfpMediaDevice::listDir( const TQString &dir )
{
int err = ifp_list_dirs( &m_ifpdev, TQFile::encodeName( dir ), listDirCallback, this );
checkResult( err, i18n("Cannot enter directory: '%1'").tqarg(dir) );
checkResult( err, i18n("Cannot enter directory: '%1'").arg(dir) );
}
// will be called by 'ifp_list_dirs'
@ -587,9 +587,9 @@ IfpMediaDevice::addTrackToList( int type, TQString name, int /*size*/ )
else if( type == IFP_FILE ) //file
{
if( name.tqendsWith( "mp3", false ) || name.tqendsWith( "wma", false ) ||
name.tqendsWith( "wav", false ) || name.tqendsWith( "ogg", false ) ||
name.tqendsWith( "asf", false ) )
if( name.endsWith( "mp3", false ) || name.endsWith( "wma", false ) ||
name.endsWith( "wav", false ) || name.endsWith( "ogg", false ) ||
name.endsWith( "asf", false ) )
m_last->setType( MediaItem::TRACK );

@ -316,13 +316,13 @@ IpodMediaDevice::IpodMediaDevice()
}
if( info->capacity > 0.f )
gen->insertItem( i18n( "%1 GB %2 (x%3)" )
.tqarg( TQString::number( info->capacity ),
.arg( TQString::number( info->capacity ),
itdb_info_get_ipod_model_name_string( info->ipod_model ),
info->model_number ),
index );
else
gen->insertItem( i18n( "%1 (x%2)" )
.tqarg( itdb_info_get_ipod_model_name_string( info->ipod_model ),
.arg( itdb_info_get_ipod_model_name_string( info->ipod_model ),
info->model_number ),
index );
}
@ -385,12 +385,12 @@ IpodMediaDevice::slotIpodAction( int id )
g_error_free(err);
//FIXME: update i18n files for next message
Amarok::StatusBar::instance()->longMessage(
i18n( "Could not write SysInfo file to iPod (check the permissions of the file \"%1\" on your iPod)" ).tqarg( itunesDir( "Device:SysInfo" ) ) );
i18n( "Could not write SysInfo file to iPod (check the permissions of the file \"%1\" on your iPod)" ).arg( itunesDir( "Device:SysInfo" ) ) );
//FIXME: update i18n files for next message
Amarok::StatusBar::instance()->shortMessage(
i18n( "Unable to set iPod model to %1 GB %2 (x%3)" )
.tqarg( TQString::number( table[index].capacity ),
.arg( TQString::number( table[index].capacity ),
itdb_info_get_ipod_model_name_string( table[index].ipod_model ),
table[index].model_number ) );
}
@ -398,7 +398,7 @@ IpodMediaDevice::slotIpodAction( int id )
{
Amarok::StatusBar::instance()->shortMessage(
i18n( "Setting iPod model to %1 GB %2 (x%3)" )
.tqarg( TQString::number( table[index].capacity ),
.arg( TQString::number( table[index].capacity ),
itdb_info_get_ipod_model_name_string( table[index].ipod_model ),
table[index].model_number ) );
}
@ -515,7 +515,7 @@ IpodMediaDevice::updateTrackInDB( IpodMediaItem *item, const TQString &pathname,
TQString genre = metaBundle.genre();
if( genre.tqstartsWith("audiobook", false) )
if( genre.startsWith("audiobook", false) )
audiobook = true;
if( audiobook )
{
@ -684,7 +684,7 @@ IpodMediaDevice::copyTrackToDevice(const MetaBundle &bundle)
if ( !dir.exists() )
{
Amarok::StatusBar::instance()->longMessage(
i18n( "Media Device: Creating directory for file %1 failed" ).tqarg( url.path() ),
i18n( "Media Device: Creating directory for file %1 failed" ).arg( url.path() ),
KDE::StatusBar::Error );
return NULL;
}
@ -962,7 +962,7 @@ IpodMediaDevice::deleteItemFromDevice(MediaItem *mediaitem, int flags )
if(!(flags & OnlyPlayed) || item->played() > 0 || item->childCount() == 0)
{
if(item->childCount() > 0)
debug() << "recursive deletion should have removed all tqchildren from " << item << "(" << item->text(0) << ")" << endl;
debug() << "recursive deletion should have removed all children from " << item << "(" << item->text(0) << ")" << endl;
else
delete item;
}
@ -992,9 +992,9 @@ IpodMediaDevice::createLockFile( bool silent )
if( m_lockFile->exists() )
{
ok = false;
msg = i18n( "Media Device: iPod mounted at %1 already locked. " ).tqarg( mountPoint() );
msg = i18n( "Media Device: iPod mounted at %1 already locked. " ).arg( mountPoint() );
msg += i18n( "If you are sure that this is an error, then remove the file %1 and try again." )
.tqarg( lockFilePath );
.arg( lockFilePath );
if( !silent )
{
@ -1003,7 +1003,7 @@ IpodMediaDevice::createLockFile( bool silent )
== KMessageBox::Continue )
{
msg = i18n( "Media Device: removing lockfile %1 failed: %2. " )
.tqarg( lockFilePath, m_lockFile->errorString() );
.arg( lockFilePath, m_lockFile->errorString() );
ok = m_lockFile->remove();
}
else
@ -1017,7 +1017,7 @@ IpodMediaDevice::createLockFile( bool silent )
{
ok = false;
msg = i18n( "Media Device: failed to create lockfile on iPod mounted at %1: %2" )
.tqarg(mountPoint(), m_lockFile->errorString());
.arg(mountPoint(), m_lockFile->errorString());
}
if( ok )
@ -1038,7 +1038,7 @@ IpodMediaDevice::initializeIpod()
if( !dir.exists() )
{
Amarok::StatusBar::instance()->longMessage(
i18n("Media device: Mount point %1 does not exist").tqarg(mountPoint()),
i18n("Media device: Mount point %1 does not exist").arg(mountPoint()),
KDE::StatusBar::Error );
return false;
}
@ -1091,7 +1091,7 @@ IpodMediaDevice::initializeIpod()
return false;
Amarok::StatusBar::instance()->longMessage(
i18n("Media Device: Initialized iPod mounted at %1").tqarg(mountPoint()),
i18n("Media Device: Initialized iPod mounted at %1").arg(mountPoint()),
KDE::StatusBar::Information );
return true;
@ -1113,7 +1113,7 @@ IpodMediaDevice::openDevice( bool silent )
if( m_itdb )
{
Amarok::StatusBar::instance()->longMessage(
i18n("Media Device: iPod at %1 already opened").tqarg(mountPoint()),
i18n("Media Device: iPod at %1 already opened").arg(mountPoint()),
KDE::StatusBar::Sorry );
return false;
}
@ -1185,7 +1185,7 @@ IpodMediaDevice::openDevice( bool silent )
if( !m_itdb && canInitialize )
{
TQString msg = i18n( "Media Device: could not find iTunesDB on device mounted at %1. "
"Should I try to initialize your iPod?" ).tqarg( mountPoint() );
"Should I try to initialize your iPod?" ).arg( mountPoint() );
if( !silent
&& KMessageBox::warningContinueCancel( m_parent, msg, i18n( "Initialize iPod?" ),
@ -1200,7 +1200,7 @@ IpodMediaDevice::openDevice( bool silent )
}
Amarok::StatusBar::instance()->longMessage(
i18n("Media Device: Failed to initialize iPod mounted at %1").tqarg(mountPoint()),
i18n("Media Device: Failed to initialize iPod mounted at %1").arg(mountPoint()),
KDE::StatusBar::Sorry );
return false;
@ -1236,7 +1236,7 @@ IpodMediaDevice::openDevice( bool silent )
{
debug() << "failed to create hash dir " << real << endl;
Amarok::StatusBar::instance()->longMessage(
i18n("Media device: Failed to create directory %1").tqarg(real),
i18n("Media device: Failed to create directory %1").arg(real),
KDE::StatusBar::Error );
return false;
}
@ -1244,7 +1244,7 @@ IpodMediaDevice::openDevice( bool silent )
}
if( !silent )
kapp->tqprocessEvents( 100 );
kapp->processEvents( 100 );
initView();
GList *cur = m_itdb->playlists;
@ -1255,7 +1255,7 @@ IpodMediaDevice::openDevice( bool silent )
}
if( !silent )
kapp->tqprocessEvents( 100 );
kapp->processEvents( 100 );
for( cur = m_itdb->tracks; cur; cur = cur->next )
{
@ -1264,7 +1264,7 @@ IpodMediaDevice::openDevice( bool silent )
}
if( !silent )
kapp->tqprocessEvents( 100 );
kapp->processEvents( 100 );
updateRootItems();
m_customAction->setEnabled( true );
@ -1364,7 +1364,7 @@ IpodMediaDevice::detectModel()
#endif
}
if( modelString )
m_name = TQString( "iPod %1" ).tqarg( TQString::fromUtf8( modelString ) );
m_name = TQString( "iPod %1" ).arg( TQString::fromUtf8( modelString ) );
if( m_needsFirewireGuid )
{
@ -1372,7 +1372,7 @@ IpodMediaDevice::detectModel()
if( !fwid )
{
Amarok::StatusBar::instance()->longMessage(
i18n("Your iPod's Firewire GUID is required for correctly updating its music database, but it is not known. See %1 for more information.").tqarg( "http://amarok.kde.org/wiki/Media_Device:IPod" ) );
i18n("Your iPod's Firewire GUID is required for correctly updating its music database, but it is not known. See %1 for more information.").arg( "http://amarok.kde.org/wiki/Media_Device:IPod" ) );
}
else
g_free( fwid );
@ -2233,7 +2233,7 @@ IpodMediaDevice::rmbPressed( TQListViewItem* qitem, const TQPoint& point, int )
KURL::List urls = m_view->nodeBuildDragList( 0 );
KPopupMenu menu( m_view );
enum Actions { CREATE_PLAYLIST, APPEND, LOAD, TQUEUE,
enum Actions { CREATE_PLAYLIST, APPEND, LOAD, QUEUE,
COPY_TO_COLLECTION,
BURN_ARTIST, BURN_ALBUM, BURN_DATACD, BURN_AUDIOCD,
RENAME, SUBSCRIBE,
@ -2253,7 +2253,7 @@ IpodMediaDevice::rmbPressed( TQListViewItem* qitem, const TQPoint& point, int )
{
menu.insertItem( SmallIconSet( Amarok::icon( "playlist" ) ), i18n( "&Load" ), LOAD );
menu.insertItem( SmallIconSet( Amarok::icon( "add_playlist" ) ), i18n( "&Append to Playlist" ), APPEND );
menu.insertItem( SmallIconSet( Amarok::icon( "fastforward" ) ), i18n( "&Queue Tracks" ), TQUEUE );
menu.insertItem( SmallIconSet( Amarok::icon( "fastforward" ) ), i18n( "&Queue Tracks" ), QUEUE );
}
menu.insertSeparator();
@ -2372,7 +2372,7 @@ IpodMediaDevice::rmbPressed( TQListViewItem* qitem, const TQPoint& point, int )
case APPEND:
Playlist::instance()->insertMedia( urls, Playlist::Append );
break;
case TQUEUE:
case QUEUE:
Playlist::instance()->insertMedia( urls, Playlist::Queue );
break;
case COPY_TO_COLLECTION:
@ -2693,7 +2693,7 @@ IpodMediaDevice::deleteFile( const KURL &url )
this, TQT_SLOT( fileDeleted( KIO::Job * ) ) );
do
{
kapp->tqprocessEvents( 100 );
kapp->processEvents( 100 );
if( isCanceled() )
break;
usleep( 10000 );

@ -24,6 +24,8 @@
#define DEBUG_PREFIX "MtpMediaDevice"
#include <stdlib.h>
#include <config.h>
#include "mtpmediadevice.h"
@ -139,7 +141,7 @@ MtpMediaDevice::progressCallback( uint64_t const sent, uint64_t const total, voi
Q_UNUSED( sent );
Q_UNUSED( total );
kapp->tqprocessEvents( 100 );
kapp->processEvents( 100 );
MtpMediaDevice *dev = (MtpMediaDevice*)(data);
@ -321,7 +323,7 @@ MediaItem
LIBMTP_destroy_track_t( trackmeta );
kapp->tqprocessEvents( 100 );
kapp->processEvents( 100 );
// add track to view and to new tracks list
MediaItem *newItem = addTrackToView( taggedTrack );
@ -436,7 +438,7 @@ MtpMediaDevice::updateAlbumArt( TQPtrList<MediaItem> *items )
setCanceled( false );
kapp->tqprocessEvents( 100 );
kapp->processEvents( 100 );
TQMap< TQString, TQPtrList<MediaItem> > albumList;
for( MtpMediaItem *it = dynamic_cast<MtpMediaItem*>(items->first()); it && !(m_canceled); it = dynamic_cast<MtpMediaItem*>(items->next()) )
@ -453,14 +455,14 @@ MtpMediaDevice::updateAlbumArt( TQPtrList<MediaItem> *items )
}
int i = 0;
setProgress( i, albumList.count() );
kapp->tqprocessEvents( 100 );
kapp->processEvents( 100 );
TQMap< TQString, TQPtrList<MediaItem> >::Iterator it;
for( it = albumList.begin(); it != albumList.end(); ++it )
{
sendAlbumArt( &it.data() );
setProgress( ++i );
if( i % 20 == 0 )
kapp->tqprocessEvents( 100 );
kapp->processEvents( 100 );
}
hideProgress();
}
@ -756,7 +758,7 @@ MediaItem
}
}
uint32_t folderId = checkFolderStructure( bundle, false );
MediaItem *file = m_fileNameToItem[ TQString( "%1/%2" ).tqarg( folderId ).tqarg( bundle.filename() ) ];
MediaItem *file = m_fileNameToItem[ TQString( "%1/%2" ).arg( folderId ).arg( bundle.filename() ) ];
if( file != 0 )
return file;
return 0;
@ -1050,10 +1052,10 @@ MtpMediaDevice::deleteObject( MtpMediaItem *deleteItem )
// clear cached filename
if( deleteItem->type() == MediaItem::TRACK )
m_fileNameToItem.remove( TQString( "%1/%2" ).tqarg( deleteItem->track()->folderId() ).tqarg( deleteItem->bundle()->filename() ) );
m_fileNameToItem.remove( TQString( "%1/%2" ).arg( deleteItem->track()->folderId() ).arg( deleteItem->bundle()->filename() ) );
// remove from the media view
delete deleteItem;
kapp->tqprocessEvents( 100 );
kapp->processEvents( 100 );
return 1;
}
@ -1454,7 +1456,7 @@ MtpMediaItem
item->setType( MediaItem::TRACK );
item->setBundle( track->bundle() );
item->track()->setId( track->id() );
m_fileNameToItem[ TQString( "%1/%2" ).tqarg( track->folderId() ).tqarg( track->bundle()->filename() ) ] = item;
m_fileNameToItem[ TQString( "%1/%2" ).arg( track->folderId() ).arg( track->bundle()->filename() ) ] = item;
m_idToTrack[ track->id() ] = track;
}
return item;
@ -1478,7 +1480,7 @@ MtpMediaDevice::readMtpMusic()
int progress = 0;
setProgress( progress, total ); // we don't know how many tracks. fake progress bar.
kapp->tqprocessEvents( 100 );
kapp->processEvents( 100 );
LIBMTP_track_t *tracks = LIBMTP_Get_Tracklisting_With_Callback( m_device, progressCallback, this );
@ -1512,7 +1514,7 @@ MtpMediaDevice::readMtpMusic()
progress++;
setProgress( progress );
if( progress % 50 == 0 )
kapp->tqprocessEvents( 100 );
kapp->processEvents( 100 );
}
}
@ -1562,7 +1564,7 @@ MtpMediaDevice::readPlaylists()
tmp = playlists;
playlists = playlists->next;
LIBMTP_destroy_playlist_t( tmp );
kapp->tqprocessEvents( 50 );
kapp->processEvents( 50 );
}
}
}
@ -1585,7 +1587,7 @@ MtpMediaDevice::readAlbums()
tmp = albums;
albums = albums->next;
LIBMTP_destroy_album_t( tmp );
kapp->tqprocessEvents( 50 );
kapp->processEvents( 50 );
}
}
}

@ -452,7 +452,7 @@ NjbMediaDevice::copyTrackToDevice(const MetaBundle& bundle)
njb_songid_t* songid = NJB_Songid_New();
taggedTrack->writeToSongid( songid );
m_busy = true;
kapp->tqprocessEvents( 100 );
kapp->processEvents( 100 );
if(NJB_Send_Track (m_njb, bundle.url().path().utf8(), songid, progressCallback, this, &id) != NJB_SUCCESS)
{
debug() << ": NJB_Send_Track failed\n";
@ -687,7 +687,7 @@ NjbMediaDevice::runTransferDialog()
int
NjbMediaDevice::progressCallback( u_int64_t sent, u_int64_t total, const char* /*buf*/, unsigned /*len*/, void* data)
{
kapp->tqprocessEvents( 100 );
kapp->processEvents( 100 );
NjbMediaDevice *njb_media = reinterpret_cast<NjbMediaDevice*>(data);
@ -733,7 +733,7 @@ NjbMediaDevice::readJukeboxMusic( void )
m_playlistItem->m_order = -5;
m_playlistItem->setType( MediaItem::PLAYLISTSROOT );*/
kapp->tqprocessEvents( 100 );
kapp->processEvents( 100 );
for( trackValueList::iterator it = trackList.begin(); it != trackList.end(); it++ )
{
@ -804,7 +804,7 @@ void
NjbMediaDevice::expandItem( TQListViewItem *item )
{
DEBUG_BLOCK
// First clear the item's tqchildren to repopulate.
// First clear the item's children to repopulate.
while( item->firstChild() )
delete item->firstChild();
@ -886,7 +886,7 @@ NjbMediaDevice::customClicked()
{
TQString Information;
TQString tracksFound;
TQString powertqStatus;
TQString powerStatus;
TQString batteryLevel;
TQString batteryCharging;
@ -894,12 +894,12 @@ NjbMediaDevice::customClicked()
{
tracksFound = i18n( "1 track found on device",
"%n tracks found on device ", trackList.size() );
powertqStatus = ( (NJB_Get_Auxpower( m_njb ) == 1) ? i18n("On auxiliary power") : i18n("On main power") );
powerStatus = ( (NJB_Get_Auxpower( m_njb ) == 1) ? i18n("On auxiliary power") : i18n("On main power") );
batteryCharging = ( (NJB_Get_Battery_Charging( m_njb ) == 1) ? i18n("Battery charging") : i18n("Battery not charging") );
batteryLevel = (i18n("Battery level: ") + TQString::number( NJB_Get_Battery_Level( m_njb ) ) );
Information = ( i18n("Player Information for ") + m_name +'\n' +
i18n("Power status: ") + powertqStatus + '\n' +
i18n("Power status: ") + powerStatus + '\n' +
i18n("Battery status: ") + batteryLevel + " (" +
batteryCharging + ')' );
}

@ -295,7 +295,7 @@ playlistValueList::readFromDevice( void)
NJB_Reset_Get_Playlist( NjbMediaDevice::theNjb());
while( njb_playlist_t* pl = NJB_Get_Playlist( NjbMediaDevice::theNjb()) ) {
// FIXME (acejones) Make this a signal
// infoMessage( i18n( "Downloading playlist %1...").tqarg( ++playlists));
// infoMessage( i18n( "Downloading playlist %1...").arg( ++playlists));
++playlists;
append( NjbPlaylist(pl));
NJB_Playlist_Destroy( pl);

@ -9,7 +9,7 @@
#
#################################################
tde_message_fatal( "riokarma support is not buildable, it needs to link to karma-sharp.dll" )
#tde_message_fatal( "riokarma support is not buildable, it needs to link to karma-sharp.dll" )
include( ConfigureChecks.cmake )
@ -38,6 +38,6 @@ install( FILES
tde_add_kpart( libamarok_riokarma-mediadevice AUTOMOC
SOURCES riokarmamediadevice.cpp
LINK amarok-shared ${KARMA_LIBRARIES}
LINK amarok-shared ${KARMA_LIBRARIES} karma
DESTINATION ${PLUGIN_INSTALL_DIR}
)

@ -288,7 +288,7 @@ RioKarmaMediaDevice::openDevice( bool silent )
if( !dir.exists() )
{
Amarok::StatusBar::instance()->longMessage(
i18n( "Media device: Mount point %1 does not exist" ).tqarg( mountPoint() ),
i18n( "Media device: Mount point %1 does not exist" ).arg( mountPoint() ),
KDE::StatusBar::Error );
return false;
}

@ -52,22 +52,22 @@ MediumPluginManagerDialog::MediumPluginManagerDialog()
TQVBox* vbox = makeVBoxMainWidget();
vbox->setSpacing( KDialog::spacingHint() );
vbox->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );
vbox->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );
m_location = new TQGroupBox( 1, Qt::Vertical, i18n( "Devices" ), vbox );
m_location->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Preferred ) );
m_location->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Preferred ) );
m_devicesBox = new TQVBox( m_location );
m_devicesBox->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );
m_devicesBox->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) );
m_manager = new MediumPluginManager( m_devicesBox );
TQHBox *hbox = new TQHBox( vbox );
KPushButton *detectDevices = new KPushButton( i18n( "Autodetect Devices" ), hbox);
detectDevices->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
detectDevices->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
connect( detectDevices, TQT_SIGNAL( clicked() ), m_manager, TQT_SLOT( redetectDevices() ) );
KPushButton *addButton = new KPushButton( i18n( "Add Device..." ), hbox );
addButton->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
addButton->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
connect( addButton, TQT_SIGNAL( clicked() ), m_manager, TQT_SLOT( newDevice() ) );
}
@ -392,36 +392,36 @@ MediaDeviceConfig::MediaDeviceConfig( Medium *medium, MediumPluginManager *mgr,
if( !m_oldPlugin.isEmpty() )
m_new = false;
tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
setSpacing( 5 );
const TQString labelTextNone = i18n( "(none)" );
TQString row = "<tr><td>%1</td><td>%2</td></tr>";
TQString table;
table += row.tqarg( escapeHTML( i18n( "Autodetected:" ) ),
table += row.arg( escapeHTML( i18n( "Autodetected:" ) ),
escapeHTML( medium->isAutodetected() ? i18n("Yes") : i18n("No") ) );
table += row.tqarg( escapeHTML( i18n( "ID:" ) ),
table += row.arg( escapeHTML( i18n( "ID:" ) ),
escapeHTML( medium->id() ) );
table += row.tqarg( escapeHTML( i18n( "Name:" ) ),
table += row.arg( escapeHTML( i18n( "Name:" ) ),
escapeHTML( medium->name() ) );
table += row.tqarg( escapeHTML( i18n( "Label:" ) ),
table += row.arg( escapeHTML( i18n( "Label:" ) ),
escapeHTML( medium->label().isEmpty() ? labelTextNone : medium->label() ) );
table += row.tqarg( escapeHTML( i18n( "User Label:" ) ),
table += row.arg( escapeHTML( i18n( "User Label:" ) ),
escapeHTML( medium->userLabel().isEmpty() ? labelTextNone : medium->userLabel() ) );
table += row.tqarg( escapeHTML( i18n( "Device Node:" ) ),
table += row.arg( escapeHTML( i18n( "Device Node:" ) ),
escapeHTML( medium->deviceNode().isEmpty() ? labelTextNone : medium->deviceNode() ) );
table += row.tqarg( escapeHTML( i18n( "Mount Point:" ) ),
table += row.arg( escapeHTML( i18n( "Mount Point:" ) ),
escapeHTML( medium->mountPoint().isEmpty() ? labelTextNone : medium->mountPoint() ) );
table += row.tqarg( escapeHTML( i18n( "Mime Type:" ) ),
table += row.arg( escapeHTML( i18n( "Mime Type:" ) ),
escapeHTML( medium->mimeType().isEmpty() ? labelTextNone : medium->mimeType() ) );
TQString title = escapeHTML( i18n( "Device information for %1").tqarg(medium->name() ) );
TQString details = TQString( "<em>%1</em><br />" "<table>%2</table>" ).tqarg( title, table );
TQString title = escapeHTML( i18n( "Device information for %1").arg(medium->name() ) );
TQString details = TQString( "<em>%1</em><br />" "<table>%2</table>" ).arg( title, table );
(void)new TQLabel( i18n("Name: "), this );
(void)new TQLabel( medium->name(), this );
(void)new KActiveLabel( i18n( "(<a href='whatsthis:%1'>Details</a>)" )
.tqarg( Amarok::escapeHTMLAttr( details ) ), this );
.arg( Amarok::escapeHTMLAttr( details ) ), this );
(void)new TQLabel( i18n("Plugin:"), this );
m_pluginCombo = new KComboBox( false, this );

@ -1051,7 +1051,7 @@ MetaBundle::prettyTitle() const
if( s.isEmpty() )
s = title();
else
s = i18n("%1 - %2").tqarg( artist(), title() );
s = i18n("%1 - %2").arg( artist(), title() );
if( s.isEmpty() ) s = prettyTitle( filename() );
@ -1067,7 +1067,7 @@ MetaBundle::veryNiceTitle() const
if( !title().isEmpty() )
{
if( !artist().isEmpty() )
s = i18n( "%1 by %2" ).tqarg( title(), artist() );
s = i18n( "%1 by %2" ).arg( title(), artist() );
else
s = title();
}
@ -1146,10 +1146,10 @@ MetaBundle::veryPrettyTime( int time )
switch( s.count() )
{
case 1: return i18n( "seconds", "%1s" ).tqarg( s[0] );
case 2: return i18n( "minutes, seconds", "%2m %1s" ).tqarg( s[0], s[1] );
case 3: return i18n( "hours, minutes, seconds", "%3h %2m %1s" ).tqarg( s[0], s[1], s[2] );
case 4: return i18n( "days, hours, minutes, seconds", "%4d %3h %2m %1s" ).tqarg( s[0], s[1], s[2], s[3] );
case 1: return i18n( "seconds", "%1s" ).arg( s[0] );
case 2: return i18n( "minutes, seconds", "%2m %1s" ).arg( s[0], s[1] );
case 3: return i18n( "hours, minutes, seconds", "%3h %2m %1s" ).arg( s[0], s[1], s[2] );
case 4: return i18n( "days, hours, minutes, seconds", "%4d %3h %2m %1s" ).arg( s[0], s[1], s[2], s[3] );
default: return "omg bug!";
}
}
@ -1208,13 +1208,13 @@ MetaBundle::fuzzyTime( int time )
TQString hours = i18n( "1 hour", "%n hours", hr );
if( week )
return weeks.tqarg( day ? days.tqarg("") : "" ).simplifyWhiteSpace();
return weeks.arg( day ? days.arg("") : "" ).simplifyWhiteSpace();
else if ( day )
return days.tqarg( hr ? hours : "" ).simplifyWhiteSpace();
return days.arg( hr ? hours : "" ).simplifyWhiteSpace();
else if ( hr )
return i18n( "%1:%2 hours" ).tqarg( hr ).tqarg( zeroPad( min ) );
return i18n( "%1:%2 hours" ).arg( hr ).arg( zeroPad( min ) );
else
return i18n( "%1:%2").tqarg( min ).tqarg( zeroPad( secs ) );
return i18n( "%1:%2").arg( min ).arg( zeroPad( secs ) );
}
TQString
@ -1271,7 +1271,7 @@ MetaBundle::ratingList()
TQStringList list;
list += ratingDescription( 0 );
for ( int i = 1; i<=10; i++ )
list += s.tqarg( prettyRating( i, true ) ).tqarg( ratingDescription( i ) );
list += s.arg( prettyRating( i, true ) ).arg( ratingDescription( i ) );
return list;
}
@ -1509,7 +1509,7 @@ MetaBundle::save( TagLib::FileRef* fileref )
// QT's version encodeAttr is 1) private to TQDom, and 2) a litte slow. This
// one can be made public if needed. It happens to be on a critical path
// (each char of playlist / undo save). TQStyleSheet::escape does not deal with
// tqunicode chars illegal for XML. There's a lot of junk in those tags
// unicode chars illegal for XML. There's a lot of junk in those tags
static inline void xmlEncode(TQTextStream &stream, const TQString &str)
{
TQString tmp;
@ -1517,7 +1517,7 @@ static inline void xmlEncode(TQTextStream &stream, const TQString &str)
uint i = 0;
while ( i < cur->length() )
{
uint uc = (*cur)[i].tqunicode();
uint uc = (*cur)[i].unicode();
// we try to accumulate unescaped chars before writing to stream
const char *escaped;
// careful about the order of tests, common before less common
@ -1530,7 +1530,7 @@ static inline void xmlEncode(TQTextStream &stream, const TQString &str)
else if ( uc == '"' ) escaped = "&quot;";
else
{
// see if it's a XML-valid tqunicode char at all
// see if it's a XML-valid unicode char at all
if ( (0x20 <= uc && uc <= 0xD7FF || 0xE000 <= uc && uc <= 0xFFFD
|| uc == 0x9 || uc == 0xA || uc == 0xD) )
// fairly common, other ascii chars

@ -420,7 +420,7 @@ private:
static inline TQString prettyGeneric( const TQString &s, const int i )
{
return (i > 0) ? s.tqarg( i ) : (i == Undetermined) ? "?" : "-";
return (i > 0) ? s.arg( i ) : (i == Undetermined) ? "?" : "-";
}
void init( TagLib::AudioProperties *ap = 0 );
@ -533,7 +533,7 @@ inline TQString MetaBundle::prettySampleRate( bool shortened ) const
return prettyGeneric( i18n( "SampleRate", "%1 Hz" ), m_sampleRate );
}
inline TQString MetaBundle::zeroPad( uint i ) { return ( i < 10 ) ? TQString( "0%1" ).tqarg( i ) : TQString::number( i ); }
inline TQString MetaBundle::zeroPad( uint i ) { return ( i < 10 ) ? TQString( "0%1" ).arg( i ) : TQString::number( i ); }
inline bool MetaBundle::hasExtendedMetaInformation() const
{

@ -12,6 +12,7 @@
include_directories(
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
${TAGLIB_INCLUDE_DIRS}
)

@ -13,6 +13,7 @@ include_directories(
${CMAKE_BINARY_DIR}
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
${TAGLIB_INCLUDE_DIRS}
)

@ -10,15 +10,16 @@
#################################################
include_directories(
${CMAKE_BINARY_DIR}
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
${TAGLIB_INCLUDE_DIRS}
)
##### tagmp4 (static) ###########################
##### tagm4a (static) ###########################
tde_add_library( tagmp4 STATIC_PIC
tde_add_library( tagm4a STATIC_PIC
SOURCES
taglib_mp4filetyperesolver.cpp mp4file.cpp mp4itunestag.cpp mp4isobox.cpp
mp4isofullbox.cpp mp4skipbox.cpp mp4moovbox.cpp mp4mvhdbox.cpp

@ -104,7 +104,7 @@ namespace TagLib {
/*!
* This will remove all tags.
*
* \note This will also tqinvalidate pointers to the tags
* \note This will also invalidate pointers to the tags
* as their memory will be freed.
* \note In order to make the removal permanent save() still needs to be called
*/

@ -39,7 +39,7 @@ public:
TagLib::uint timescale;
//! duration of presentation
TagLib::ulonglong duration;
//! ptqlayout speed
//! playout speed
TagLib::uint rate;
//! volume for entire presentation
TagLib::uint volume;

@ -44,7 +44,7 @@ namespace TagLib
uint timescale() const;
//! function to get the presentation duration in the mp4 file
ulonglong duration() const;
//! function to get the rate (ptqlayout speed) - typically 1.0;
//! function to get the rate (playout speed) - typically 1.0;
uint rate() const;
//! function to get volume level for presentation - typically 1.0;
uint volume() const;

@ -0,0 +1,33 @@
#################################################
#
# (C) 2010-2013 Darrell Anderson
# humanreadable (AT) yahoo.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
include_directories(
${CMAKE_BINARY_DIR}
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
${TAGLIB_INCLUDE_DIRS}
${MP4V2_INCLUDE_DIRS}
)
link_directories(
${MP4V2_LIBRARY_DIRS}
)
##### tagmp4 (static) ###########################
tde_add_library( tagmp4 STATIC_PIC
SOURCES
mp4file.cpp mp4file.h mp4properties.cpp mp4properties.h mp4tag.cpp mp4tag.h
taglib_mp4filetyperesolver.cpp taglib_mp4filetyperesolver.h
LINK
mp4v2
)

@ -23,6 +23,8 @@ email : aumuell@reserv.at
* MA 02110-1301 USA *
***************************************************************************/
#include <config.h>
#include "mp4file.h"
#include "mp4tag.h"
@ -30,8 +32,15 @@ email : aumuell@reserv.at
#include <audioproperties.h>
#include <stdint.h>
#include <cstdlib>
#include <stdlib.h>
#include <sys/types.h>
#ifdef HAVE_MP4V2_H
#define USE_ITMF_TAGS
#else
#define MP4V2_HAS_WRITE_BUG 1
#endif
namespace TagLib {
////////////////////////////////////////////////////////////////////////////////
@ -99,6 +108,11 @@ bool MP4::File::save()
return false;
}
#ifdef USE_ITMF_TAGS
const MP4Tags* filetags = MP4TagsAlloc();
MP4TagsFetch(filetags, handle);
#endif
#ifdef MP4V2_HAS_WRITE_BUG
/* according to gtkpod we have to delete all meta data before modifying it,
save the stuff we would not touch */
@ -114,7 +128,14 @@ bool MP4::File::save()
#endif
#ifdef USE_ITMF_TAGS
MP4TagsSetName(filetags, mp4tag->title().isNull() ? "" : mp4tag->title().toCString(true));
MP4TagsSetArtist(filetags, mp4tag->artist().isNull() ? "" : mp4tag->artist().toCString(true));
MP4TagsSetAlbum(filetags, mp4tag->album().isNull() ? "" : mp4tag->album().toCString(true));
MP4TagsSetComments(filetags, mp4tag->comment().isNull() ? "" : mp4tag->comment().toCString(true));
MP4TagsSetGenre(filetags, mp4tag->genre().isNull() ? "" : mp4tag->genre().toCString(true));
MP4TagsSetComposer(filetags, mp4tag->composer().isNull() ? "" : mp4tag->composer().toCString(true));
#else
#define setmeta(val, tag) \
if(mp4tag->val().isNull()) { \
/*MP4DeleteMetadata##tag(handle);*/ \
@ -122,27 +143,65 @@ bool MP4::File::save()
} else { \
MP4SetMetadata##tag(handle, mp4tag->val().toCString(true)); \
}
setmeta(title, Name);
setmeta(artist, Artist);
setmeta(album, Album);
setmeta(comment, Comment);
setmeta(genre, Genre);
setmeta(composer, Writer);
#endif
char buf[100] = "";
if(mp4tag->year())
snprintf(buf, sizeof(buf), "%u", mp4tag->year());
#ifdef USE_ITMF_TAGS
MP4TagsSetReleaseDate(filetags, buf);
#else
MP4SetMetadataYear(handle, buf);
#endif
u_int16_t t1, t2;
#ifdef USE_ITMF_TAGS
MP4TagTrack track = *filetags->track;
track.index = t1;
MP4TagsSetTrack(filetags, &track);
#else
MP4GetMetadataTrack(handle, &t1, &t2);
MP4SetMetadataTrack(handle, mp4tag->track(), t2);
if(mp4tag->bpm() != 0)
#endif
if(mp4tag->bpm() != 0) {
#ifdef USE_ITMF_TAGS
u_int16_t tempo = mp4tag->bpm();
MP4TagsSetTempo(filetags, &tempo);
#else
MP4SetMetadataTempo(handle, mp4tag->bpm());
#endif
}
if(mp4tag->compilation() != MP4::Tag::Undefined) {
#ifdef USE_ITMF_TAGS
u_int8_t compilation = mp4tag->compilation();
MP4TagsSetCompilation(filetags, &compilation);
#else
MP4SetMetadataCompilation(handle, mp4tag->compilation());
#endif
}
#ifdef USE_ITMF_TAGS
if(mp4tag->cover().size()) {
MP4TagArtwork art;
art.size = mp4tag->cover().size();
art.data = mp4tag->cover().size() ? const_cast<u_int8_t *>( reinterpret_cast<const u_int8_t *>( mp4tag->cover().data() ) ) : 0;
art.type = MP4_ART_UNDEFINED; // delegate typing to libmp4v2
if(filetags->artworkCount > 0) {
MP4TagsSetArtwork(filetags, 0, &art);
}
else {
MP4TagsAddArtwork(filetags, &art);
}
}
#else
MP4SetMetadataCoverArt(handle, mp4tag->cover().size() ? const_cast<u_int8_t *>( reinterpret_cast<const u_int8_t *>( mp4tag->cover().data() ) ) : 0, mp4tag->cover().size());
#endif
#ifdef MP4V2_HAS_WRITE_BUG
// set the saved data again
@ -156,6 +215,10 @@ bool MP4::File::save()
}
#endif
#ifdef USE_ITMF_TAGS
MP4TagsStore(filetags, handle);
MP4TagsFree(filetags);
#endif
MP4Close(handle);
mp4file = MP4Read(name());

@ -30,6 +30,8 @@ email : andrew.leadbetter@gmail.com
#endif
#include <stdint.h>
#include <cstring>
#include <sys/types.h>
#ifndef UINT64_TO_DOUBLE
#define UINT64_TO_DOUBLE(a) ((double)((int64_t)(a)))

@ -22,13 +22,20 @@ email : andrew.leadbetter@gmail.com
#ifndef TAGLIB_MP4PROPERTIES_H
#define TAGLIB_MP4PROPERTIES_H
#include <config.h>
#include <audioproperties.h>
#include <tstring.h>
#ifdef HAVE_MP4V2_H
#include <mp4v2/mp4v2.h>
#endif
#ifdef HAVE_MP4_H
#include <mp4.h>
// mp4.h drags in mp4_config.h that defines these
// get rid of them so they don't conflict with our config.h
#undef VERSION
#undef PACKAGE
#endif
namespace TagLib {

@ -20,10 +20,20 @@ email : andrew.leadbetter@gmail.com
* MA 02110-1301 USA *
***************************************************************************/
#include <config.h>
#include "mp4tag.h"
#include <tag.h>
#include <stdint.h>
#include <cstdlib>
#include <cstring>
#include <stdlib.h>
#include <sys/types.h>
#ifdef HAVE_MP4V2_H
#define USE_ITMF_TAGS
#endif
using namespace TagLib;
@ -63,21 +73,66 @@ void MP4::Tag::duplicate(const Tag *source, Tag *target, bool overwrite) {
// Duplicate standard information
Tag::duplicate(source, target, overwrite);
if (overwrite || target->compilation() == Undefined && source->compilation() != Undefined)
if ((overwrite || target->compilation() == Undefined) && (source->compilation() != Undefined)) {
target->setCompilation(source->compilation());
}
if (overwrite || target->cover().size() == 0)
if (overwrite || target->cover().size() == 0) {
target->setCover(source->cover());
}
}
void MP4::Tag::readTags( MP4FileHandle mp4file )
{
// Now parse tag.
#ifdef USE_ITMF_TAGS
const MP4Tags* filetags = MP4TagsAlloc();
MP4TagsFetch(filetags, mp4file);
if(filetags->name != NULL) {
m_title = String(filetags->name, String::UTF8);
}
if(filetags->artist != NULL) {
m_artist = String(filetags->artist, String::UTF8);
}
if(filetags->comments != NULL) {
m_comment = String(filetags->comments, String::UTF8);
}
if(filetags->releaseDate != NULL) {
m_year = strtol(filetags->releaseDate, NULL, 0);
}
if(filetags->album != NULL) {
m_album = String(filetags->album, String::UTF8);
}
if(filetags->track != NULL) {
m_track = filetags->track->index;
}
if(filetags->disk != NULL) {
m_disk = filetags->disk->index;
}
if(filetags->tempo != NULL) {
m_bpm = *filetags->tempo;
}
if(filetags->compilation != NULL) {
m_compilation = *filetags->compilation;
}
if(filetags->genre != NULL) {
m_genre = String(filetags->genre, String::UTF8);
}
if(filetags->composer != NULL) {
m_composer = String(filetags->composer, String::UTF8);
}
if(filetags->artworkCount > 0) {
m_image.setData(reinterpret_cast<const char *>( filetags->artwork[0].data ), filetags->artwork[0].size);
}
MP4TagsFree(filetags);
#else
char *value;
uint8_t boolvalue;
uint16_t numvalue, numvalue2;
uint8_t *image;
uint32_t imageSize;
if (MP4GetMetadataName(mp4file, &value) && value != NULL) {
m_title = String(value, String::UTF8);
free(value);
@ -124,4 +179,5 @@ void MP4::Tag::readTags( MP4FileHandle mp4file )
m_image.setData(reinterpret_cast<const char *>( image ), imageSize);
free(image);
}
#endif
}

@ -21,9 +21,16 @@ email : andrew.leadbetter@gmail.com
#ifndef TAGLIB_MP4TAG_H
#define TAGLIB_MP4TAG_H
#include <config.h>
#include <tag.h>
#include "mp4file.h"
#ifdef HAVE_MP4V2_H
#include <mp4v2/mp4v2.h>
#endif
#ifdef HAVE_MP4_H
#include <mp4.h>
#endif
namespace TagLib {

@ -24,6 +24,7 @@
#include "taglib_mp4filetyperesolver.h"
#include "mp4file.h"
#include <cstring>
TagLib::File *MP4FileTypeResolver::createFile(const char *fileName,
bool readProperties,
@ -35,7 +36,11 @@ TagLib::File *MP4FileTypeResolver::createFile(const char *fileName,
|| !strcasecmp(ext, ".mp4")
|| !strcasecmp(ext, ".m4v") || !strcasecmp(ext, ".mp4v")))
{
#if defined(MP4V2_PROJECT_version_hex) && MP4V2_PROJECT_version_hex >= 0x00020000
MP4FileHandle h = MP4Read(fileName);
#else
MP4FileHandle h = MP4Read(fileName, 0);
#endif
if(MP4_INVALID_FILE_HANDLE == h)
{
return 0;

@ -154,7 +154,7 @@ namespace TagLib {
* This will remove the tags that match the OR-ed together TagTypes from the
* file. By default it removes all tags.
*
* \note This will also tqinvalidate pointers to the tags
* \note This will also invalidate pointers to the tags
* as their memory will be freed.
* \note In order to make the removal permanent save() still needs to be called
*/

@ -13,6 +13,7 @@ include_directories(
${CMAKE_BINARY_DIR}
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
${TAGLIB_INCLUDE_DIRS}
)

@ -136,7 +136,7 @@ namespace TagLib {
* This will remove the tags that match the OR-ed together TagTypes from the
* file. By default it removes all tags.
*
* \note This will also tqinvalidate pointers to the tags
* \note This will also invalidate pointers to the tags
* as their memory will be freed.
* \note In order to make the removal permanent save() still needs to be called
*/

@ -514,11 +514,11 @@ MoodServer::slotJobCompleted( KProcess *proc )
if( proc != m_currentProcess )
warning() << "MoodServer::slotJobCompleted: proc != m_currentProcess!" << endl;
ReturntqStatus returnval;
ReturnStatus returnval;
if( !m_currentProcess->normalExit() )
returnval = Crash;
else
returnval = (ReturntqStatus) m_currentProcess->exitStatus();
returnval = (ReturnStatus) m_currentProcess->exitStatus();
bool success = (returnval == Success);
KURL url = m_currentData.m_url;
@ -972,7 +972,7 @@ Moodbar::draw( int width, int height )
m_mutex.lock();
// Do we have to tqrepaint, or can we use the cache?
// Do we have to repaint, or can we use the cache?
if( m_pixmap.width() == width && m_pixmap.height() == height )
{
m_mutex.unlock();

@ -166,7 +166,7 @@ private:
NoPlugin = 1,
NoFile = 2,
CommandLine = 3
} ReturntqStatus;
} ReturnStatus;
MoodServer( void );
void setMoodbarBroken( void );

@ -210,7 +210,7 @@ MountPointManager::getAbsolutePath( const int deviceId, const KURL& relativePath
m_handlerMapMutex.unlock();
TQStringList lastMountPoint = CollectionDB::instance()->query(
TQString( "SELECT lastmountpoint FROM devices WHERE id = %1" )
.tqarg( deviceId ) );
.arg( deviceId ) );
if ( lastMountPoint.count() == 0 )
{
//hmm, no device with that id in the DB...serious problem
@ -471,10 +471,10 @@ MountPointManager::migrateStatistics()
int deviceid = getIdForUrl( *it );
TQString rpath = getRelativePath( deviceid, *it );
TQString update = TQString( "UPDATE statistics SET deviceid = %1, url = '%2'" )
.tqarg( deviceid )
.tqarg( CollectionDB::instance()->escapeString( rpath ) );
.arg( deviceid )
.arg( CollectionDB::instance()->escapeString( rpath ) );
update += TQString( " WHERE url = '%1' AND deviceid = -2;" )
.tqarg( CollectionDB::instance()->escapeString( *it ) );
.arg( CollectionDB::instance()->escapeString( *it ) );
CollectionDB::instance()->query( update );
}
}
@ -539,15 +539,15 @@ void UrlUpdateJob::updateStatistics( )
int statCount = collDB->query(
TQString( "SELECT COUNT( url ) FROM statistics WHERE deviceid = %1 AND url = '%2';" )
.tqarg( newDeviceid )
.tqarg( collDB->escapeString( newRpath ) ) ).first().toInt();
.arg( newDeviceid )
.arg( collDB->escapeString( newRpath ) ) ).first().toInt();
if( statCount )
continue; //statistics row with new URL/deviceid values already exists
TQString sql = TQString( "UPDATE statistics SET deviceid = %1, url = '%2'" )
.tqarg( newDeviceid ).tqarg( collDB->escapeString( newRpath ) );
.arg( newDeviceid ).arg( collDB->escapeString( newRpath ) );
sql += TQString( " WHERE deviceid = %1 AND url = '%2';" )
.tqarg( deviceid ).tqarg( collDB->escapeString( rpath ) );
.arg( deviceid ).arg( collDB->escapeString( rpath ) );
collDB->query( sql );
}
}
@ -576,7 +576,7 @@ void UrlUpdateJob::updateLabels( )
//only update rows if there is not already a row with the new deviceid/rpath and the same labelid
TQStringList labelids = collDB->query(
TQString( "SELECT labelid FROM tags_labels WHERE deviceid = %1 AND url = '%2';" )
.tqarg( TQString::number( newDeviceid ), collDB->escapeString( newRpath ) ) );
.arg( TQString::number( newDeviceid ), collDB->escapeString( newRpath ) ) );
TQString existingLabelids;
if( !labelids.isEmpty() )
{
@ -591,8 +591,8 @@ void UrlUpdateJob::updateLabels( )
}
TQString sql = TQString( "UPDATE tags_labels SET deviceid = %1, url = '%2' "
"WHERE deviceid = %3 AND url = '%4'%5;" )
.tqarg( newDeviceid )
.tqarg( collDB->escapeString( newRpath ),
.arg( newDeviceid )
.arg( collDB->escapeString( newRpath ),
TQString::number( deviceid ),
collDB->escapeString( rpath ),
existingLabelids );

@ -77,7 +77,7 @@ public:
/**
* returns the type of the DeviceHandler. Should be the same as the value used in
* ~/.kde/share/config/amarokrc
* ~/.trinity/share/config/amarokrc
* @return a TQString describing the type of the DeviceHandler
*/
virtual TQString type() const = 0;
@ -99,7 +99,7 @@ public:
/**
* returns the type of the DeviceHandler. Should be the same as the value used in
* ~/.kde/share/config/amarokrc
* ~/.trinity/share/config/amarokrc
* @return a TQString describing the type of the DeviceHandler
*/
virtual TQString type() const = 0;

@ -124,7 +124,7 @@ void MultiTabBarInternal::setStyle( enum MultiTabBar::MultiTabBarStyle style )
mainLayout->setAutoAdd( true );
}
viewport() ->tqrepaint();
viewport() ->repaint();
}
void MultiTabBarInternal::drawContents ( TQPainter * paint, int clipx, int clipy, int clipw, int cliph )
@ -133,32 +133,32 @@ void MultiTabBarInternal::drawContents ( TQPainter * paint, int clipx, int clipy
if ( m_position == MultiTabBar::Right ) {
paint->setPen( tqcolorGroup().shadow() );
paint->setPen( colorGroup().shadow() );
paint->drawLine( 0, 0, 0, viewport() ->height() );
paint->setPen( tqcolorGroup().background().dark( 120 ) );
paint->setPen( colorGroup().background().dark( 120 ) );
paint->drawLine( 1, 0, 1, viewport() ->height() );
} else
if ( m_position == MultiTabBar::Left ) {
paint->setPen( tqcolorGroup().light() );
paint->setPen( colorGroup().light() );
paint->drawLine( 23, 0, 23, viewport() ->height() );
paint->drawLine( 22, 0, 22, viewport() ->height() );
paint->setPen( tqcolorGroup().shadow() );
paint->setPen( colorGroup().shadow() );
paint->drawLine( 0, 0, 0, viewport() ->height() );
} else
if ( m_position == MultiTabBar::Bottom ) {
paint->setPen( tqcolorGroup().shadow() );
paint->setPen( colorGroup().shadow() );
paint->drawLine( 0, 0, viewport() ->width(), 0 );
paint->setPen( tqcolorGroup().background().dark( 120 ) );
paint->setPen( colorGroup().background().dark( 120 ) );
paint->drawLine( 0, 1, viewport() ->width(), 1 );
} else {
paint->setPen( tqcolorGroup().light() );
paint->setPen( colorGroup().light() );
paint->drawLine( 0, 23, viewport() ->width(), 23 );
paint->drawLine( 0, 22, viewport() ->width(), 22 );
/* paint->setPen(tqcolorGroup().shadow());
/* paint->setPen(colorGroup().shadow());
paint->drawLine(0,0,0,viewport()->height());*/
}
}
@ -219,8 +219,8 @@ void MultiTabBarInternal::mousePressEvent( TQMouseEvent *ev )
void MultiTabBarInternal::resizeEvent( TQResizeEvent *ev )
{
/* kdDebug()<<"MultiTabBarInternal::resizeEvent"<<endl;
kdDebug()<<"MultiTabBarInternal::resizeEvent - box tqgeometry"<<box->tqgeometry()<<endl;
kdDebug()<<"MultiTabBarInternal::resizeEvent - tqgeometry"<<tqgeometry()<<endl;*/
kdDebug()<<"MultiTabBarInternal::resizeEvent - box geometry"<<box->geometry()<<endl;
kdDebug()<<"MultiTabBarInternal::resizeEvent - geometry"<<geometry()<<endl;*/
if ( ev ) TQScrollView::resizeEvent( ev );
@ -481,7 +481,7 @@ void MultiTabBarInternal::setPosition( enum MultiTabBar::MultiTabBarPosition pos
m_position = pos;
for ( uint i = 0;i < m_tabs.count();i++ )
m_tabs.at( i ) ->setTabsPosition( m_position );
viewport() ->tqrepaint();
viewport() ->repaint();
}
@ -584,13 +584,13 @@ void MultiTabBarButton::slotClicked()
void MultiTabBarButton::setPosition( MultiTabBar::MultiTabBarPosition pos )
{
m_position = pos;
tqrepaint();
repaint();
}
void MultiTabBarButton::setStyle( MultiTabBar::MultiTabBarStyle style )
{
m_style = style;
tqrepaint();
repaint();
}
void MultiTabBarButton::hideEvent( TQHideEvent* he )
@ -660,18 +660,18 @@ void MultiTabBarButton::slotAnimTimer()
{
if ( m_animEnter ) {
m_animCount += 1;
tqrepaint( false );
repaint( false );
if ( m_animCount >= ANIM_MAX )
m_animTimer->stop();
} else {
m_animCount -= 1;
tqrepaint( false );
repaint( false );
if ( m_animCount <= 0 )
m_animTimer->stop();
}
}
TQSize MultiTabBarButton::tqsizeHint() const
TQSize MultiTabBarButton::sizeHint() const
{
constPolish();
@ -687,7 +687,7 @@ TQSize MultiTabBarButton::tqsizeHint() const
}
#endif
if ( isMenuButton() )
w += tqstyle().tqpixelMetric( TQStyle::PM_MenuButtonIndicator, this );
w += style().pixelMetric( TQStyle::PM_MenuButtonIndicator, this );
if ( pixmap() ) {
TQPixmap * pm = const_cast< TQPixmap * >( pixmap() );
@ -697,7 +697,7 @@ TQSize MultiTabBarButton::tqsizeHint() const
TQString s( text() );
bool empty = s.isEmpty();
if ( empty )
s = TQString::tqfromLatin1( "XXXX" );
s = TQString::fromLatin1( "XXXX" );
TQFontMetrics fm = fontMetrics();
TQSize sz = fm.size( ShowPrefix, s );
if ( !empty || !w )
@ -714,7 +714,7 @@ TQSize MultiTabBarButton::tqsizeHint() const
// h = ( parentWidget()->width() - 3 ) / NUM_TABS;
// }
return ( tqstyle().tqsizeFromContents( TQStyle::CT_ToolButton, this, TQSize( w, h ) ).
return ( style().tqsizeFromContents( TQStyle::CT_ToolButton, this, TQSize( w, h ) ).
expandedTo( TQApplication::globalStrut() ) );
}
@ -754,7 +754,7 @@ void MultiTabBarTab::setTabsPosition( MultiTabBar::MultiTabBarPosition pos )
}
setPosition( pos );
// tqrepaint();
// repaint();
}
void MultiTabBarTab::setIcon( const TQString& icon )
@ -785,7 +785,7 @@ void MultiTabBarTab::slotClicked()
if ( m_animTimer->isActive() ) {
m_animCount = ANIM_MAX;
m_animTimer->stop();
tqrepaint();
repaint();
}
updateState();
@ -812,12 +812,12 @@ void MultiTabBarTab::updateState()
if ( ( m_position == MultiTabBar::Right || m_position == MultiTabBar::Left ) ) {
setFixedWidth( 24 );
if ( ( m_style == MultiTabBar::KDEV3 ) || ( m_style == MultiTabBar::KDEV3ICON ) || ( m_style == MultiTabBar::AMAROK ) || ( isOn() ) ) {
setFixedHeight( MultiTabBarButton::tqsizeHint().width() );
setFixedHeight( MultiTabBarButton::sizeHint().width() );
} else setFixedHeight( 36 );
} else {
setFixedHeight( 24 );
if ( ( m_style == MultiTabBar::KDEV3 ) || ( m_style == MultiTabBar::KDEV3ICON ) || ( m_style == MultiTabBar::AMAROK ) || ( isOn() ) ) {
setFixedWidth( MultiTabBarButton::tqsizeHint().width() );
setFixedWidth( MultiTabBarButton::sizeHint().width() );
} else setFixedWidth( 36 );
}
} else {
@ -870,7 +870,7 @@ void MultiTabBarTab::drawButtonStyled( TQPainter *paint )
const int height = 24;
if ( ( m_style == MultiTabBar::KDEV3 ) || ( m_style == MultiTabBar::KDEV3ICON ) || ( m_style == MultiTabBar::AMAROK ) || ( isOn() ) ) {
if ( ( m_position == MultiTabBar::Left ) || ( m_position == MultiTabBar::Right ) )
sh = TQSize( this->height(), this->width() ); //MultiTabBarButton::tqsizeHint();
sh = TQSize( this->height(), this->width() ); //MultiTabBarButton::sizeHint();
else
sh = TQSize( this->width(), this->height() );
} else
@ -887,8 +887,8 @@ void MultiTabBarTab::drawButtonStyled( TQPainter *paint )
if ( isOn() ) st |= TQStyle::Style_On;
tqstyle().tqdrawControl( TQStyle::CE_PushButton, &painter, this, TQRect( 0, 0, pixmap.width(), pixmap.height() ), tqcolorGroup(), st );
tqstyle().tqdrawControl( TQStyle::CE_PushButtonLabel, &painter, this, TQRect( 0, 0, pixmap.width(), pixmap.height() ), tqcolorGroup(), st );
style().drawControl( TQStyle::CE_PushButton, &painter, this, TQRect( 0, 0, pixmap.width(), pixmap.height() ), colorGroup(), st );
style().drawControl( TQStyle::CE_PushButtonLabel, &painter, this, TQRect( 0, 0, pixmap.width(), pixmap.height() ), colorGroup(), st );
switch ( m_position ) {
case MultiTabBar::Left:
@ -904,8 +904,8 @@ void MultiTabBarTab::drawButtonStyled( TQPainter *paint )
paint->drawPixmap( 0, 0, pixmap );
break;
}
// style().tqdrawControl(TQStyle::CE_PushButtonLabel,painter,this, TQRect(0,0,pixmap.width(),pixmap.height()),
// tqcolorGroup(),TQStyle::Style_Enabled);
// style().drawControl(TQStyle::CE_PushButtonLabel,painter,this, TQRect(0,0,pixmap.width(),pixmap.height()),
// colorGroup(),TQStyle::Style_Enabled);
}
void MultiTabBarTab::drawButtonClassic( TQPainter *paint )
@ -913,52 +913,52 @@ void MultiTabBarTab::drawButtonClassic( TQPainter *paint )
TQPixmap pixmap;
if ( iconSet() )
pixmap = iconSet() ->pixmap( TQIconSet::Small, TQIconSet::Normal );
paint->fillRect( 0, 0, 24, 24, tqcolorGroup().background() );
paint->fillRect( 0, 0, 24, 24, colorGroup().background() );
if ( !isOn() ) {
if ( m_position == MultiTabBar::Right ) {
paint->fillRect( 0, 0, 21, 21, TQBrush( tqcolorGroup().background() ) );
paint->fillRect( 0, 0, 21, 21, TQBrush( colorGroup().background() ) );
paint->setPen( tqcolorGroup().background().dark( 150 ) );
paint->setPen( colorGroup().background().dark( 150 ) );
paint->drawLine( 0, 22, 23, 22 );
paint->drawPixmap( 12 - pixmap.width() / 2, 12 - pixmap.height() / 2, pixmap );
paint->setPen( tqcolorGroup().shadow() );
paint->setPen( colorGroup().shadow() );
paint->drawLine( 0, 0, 0, 23 );
paint->setPen( tqcolorGroup().background().dark( 120 ) );
paint->setPen( colorGroup().background().dark( 120 ) );
paint->drawLine( 1, 0, 1, 23 );
} else
if ( ( m_position == MultiTabBar::Bottom ) || ( m_position == MultiTabBar::Top ) ) {
paint->fillRect( 0, 1, 23, 22, TQBrush( tqcolorGroup().background() ) );
paint->fillRect( 0, 1, 23, 22, TQBrush( colorGroup().background() ) );
paint->drawPixmap( 12 - pixmap.width() / 2, 12 - pixmap.height() / 2, pixmap );
paint->setPen( tqcolorGroup().background().dark( 120 ) );
paint->setPen( colorGroup().background().dark( 120 ) );
paint->drawLine( 23, 0, 23, 23 );
paint->setPen( tqcolorGroup().light() );
paint->setPen( colorGroup().light() );
paint->drawLine( 0, 22, 23, 22 );
paint->drawLine( 0, 23, 23, 23 );
paint->setPen( tqcolorGroup().shadow() );
paint->setPen( colorGroup().shadow() );
paint->drawLine( 0, 0, 23, 0 );
paint->setPen( tqcolorGroup().background().dark( 120 ) );
paint->setPen( colorGroup().background().dark( 120 ) );
paint->drawLine( 0, 1, 23, 1 );
} else {
paint->setPen( tqcolorGroup().background().dark( 120 ) );
paint->setPen( colorGroup().background().dark( 120 ) );
paint->drawLine( 0, 23, 23, 23 );
paint->fillRect( 0, 0, 23, 21, TQBrush( tqcolorGroup().background() ) );
paint->fillRect( 0, 0, 23, 21, TQBrush( colorGroup().background() ) );
paint->drawPixmap( 12 - pixmap.width() / 2, 12 - pixmap.height() / 2, pixmap );
paint->setPen( tqcolorGroup().light() );
paint->setPen( colorGroup().light() );
paint->drawLine( 23, 0, 23, 23 );
paint->drawLine( 22, 0, 22, 23 );
paint->setPen( tqcolorGroup().shadow() );
paint->setPen( colorGroup().shadow() );
paint->drawLine( 0, 0, 0, 23 );
}
@ -966,12 +966,12 @@ void MultiTabBarTab::drawButtonClassic( TQPainter *paint )
} else {
if ( m_position == MultiTabBar::Right ) {
paint->setPen( tqcolorGroup().shadow() );
paint->setPen( colorGroup().shadow() );
paint->drawLine( 0, height() - 1, 23, height() - 1 );
paint->drawLine( 0, height() - 2, 23, height() - 2 );
paint->drawLine( 23, 0, 23, height() - 1 );
paint->drawLine( 22, 0, 22, height() - 1 );
paint->fillRect( 0, 0, 21, height() - 3, TQBrush( tqcolorGroup().light() ) );
paint->fillRect( 0, 0, 21, height() - 3, TQBrush( colorGroup().light() ) );
paint->drawPixmap( 10 - pixmap.width() / 2, 10 - pixmap.height() / 2, pixmap );
if ( m_showActiveTabText ) {
@ -980,9 +980,9 @@ void MultiTabBarTab::drawButtonClassic( TQPainter *paint )
TQPixmap tpixmap( height() - 25 - 3, width() - 2 );
TQPainter painter( &tpixmap );
painter.fillRect( 0, 0, tpixmap.width(), tpixmap.height(), TQBrush( tqcolorGroup().light() ) );
painter.fillRect( 0, 0, tpixmap.width(), tpixmap.height(), TQBrush( colorGroup().light() ) );
painter.setPen( tqcolorGroup().text() );
painter.setPen( colorGroup().text() );
painter.drawText( 0, + width() / 2 + TQFontMetrics( TQFont() ).height() / 2, m_text );
paint->rotate( 90 );
@ -992,31 +992,31 @@ void MultiTabBarTab::drawButtonClassic( TQPainter *paint )
} else
if ( m_position == MultiTabBar::Top ) {
paint->fillRect( 0, 0, width() - 1, 23, TQBrush( tqcolorGroup().light() ) );
paint->fillRect( 0, 0, width() - 1, 23, TQBrush( colorGroup().light() ) );
paint->drawPixmap( 10 - pixmap.width() / 2, 10 - pixmap.height() / 2, pixmap );
if ( m_showActiveTabText ) {
paint->setPen( tqcolorGroup().text() );
paint->setPen( colorGroup().text() );
paint->drawText( 25, height() / 2 + TQFontMetrics( TQFont() ).height() / 2, m_text );
}
} else
if ( m_position == MultiTabBar::Bottom ) {
paint->setPen( tqcolorGroup().shadow() );
paint->setPen( colorGroup().shadow() );
paint->drawLine( 0, 23, width() - 1, 23 );
paint->drawLine( 0, 22, width() - 1, 22 );
paint->fillRect( 0, 0, width() - 1, 21, TQBrush( tqcolorGroup().light() ) );
paint->fillRect( 0, 0, width() - 1, 21, TQBrush( colorGroup().light() ) );
paint->drawPixmap( 10 - pixmap.width() / 2, 10 - pixmap.height() / 2, pixmap );
if ( m_showActiveTabText ) {
paint->setPen( tqcolorGroup().text() );
paint->setPen( colorGroup().text() );
paint->drawText( 25, height() / 2 + TQFontMetrics( TQFont() ).height() / 2, m_text );
}
} else {
paint->setPen( tqcolorGroup().shadow() );
paint->setPen( colorGroup().shadow() );
paint->drawLine( 0, height() - 1, 23, height() - 1 );
paint->drawLine( 0, height() - 2, 23, height() - 2 );
paint->fillRect( 0, 0, 23, height() - 3, TQBrush( tqcolorGroup().light() ) );
paint->fillRect( 0, 0, 23, height() - 3, TQBrush( colorGroup().light() ) );
paint->drawPixmap( 10 - pixmap.width() / 2, 10 - pixmap.height() / 2, pixmap );
if ( m_showActiveTabText ) {
@ -1025,9 +1025,9 @@ void MultiTabBarTab::drawButtonClassic( TQPainter *paint )
TQPixmap tpixmap( height() - 25 - 3, width() - 2 );
TQPainter painter( &tpixmap );
painter.fillRect( 0, 0, tpixmap.width(), tpixmap.height(), TQBrush( tqcolorGroup().light() ) );
painter.fillRect( 0, 0, tpixmap.width(), tpixmap.height(), TQBrush( colorGroup().light() ) );
painter.setPen( tqcolorGroup().text() );
painter.setPen( colorGroup().text() );
painter.drawText( tpixmap.width() - TQFontMetrics( TQFont() ).width( m_text ), + width() / 2 + TQFontMetrics( TQFont() ).height() / 2, m_text );
paint->rotate( -90 );
@ -1046,14 +1046,14 @@ void MultiTabBarTab::drawButtonAmarok( TQPainter *paint )
{
TQColor fillColor, textColor;
if ( isOn() ) {
fillColor = blendColors( tqcolorGroup().highlight(), tqcolorGroup().background(), static_cast<int>( m_animCount * 3.5 ) );
textColor = blendColors( tqcolorGroup().highlightedText(), tqcolorGroup().text(), static_cast<int>( m_animCount * 4.5 ) );
fillColor = blendColors( colorGroup().highlight(), colorGroup().background(), static_cast<int>( m_animCount * 3.5 ) );
textColor = blendColors( colorGroup().highlightedText(), colorGroup().text(), static_cast<int>( m_animCount * 4.5 ) );
} else if ( isEnabled() ) {
fillColor = blendColors( tqcolorGroup().background(), tqcolorGroup().highlight(), static_cast<int>( m_animCount * 3.5 ) );
textColor = blendColors( tqcolorGroup().text(), tqcolorGroup().highlightedText(), static_cast<int>( m_animCount * 4.5 ) );
fillColor = blendColors( colorGroup().background(), colorGroup().highlight(), static_cast<int>( m_animCount * 3.5 ) );
textColor = blendColors( colorGroup().text(), colorGroup().highlightedText(), static_cast<int>( m_animCount * 4.5 ) );
} else {
fillColor = tqcolorGroup().background();
textColor = tqcolorGroup().text();
fillColor = colorGroup().background();
textColor = colorGroup().text();
}
#ifndef TQT_NO_ICONSET
@ -1071,7 +1071,7 @@ void MultiTabBarTab::drawButtonAmarok( TQPainter *paint )
TQPainter painter( &pixmap );
// Draw the frame
painter.setPen( tqcolorGroup().mid() );
painter.setPen( colorGroup().mid() );
/*if ( m_id != bar->visibleTabCount() - 1 )*/ painter.drawLine( 0, 0, 0, pixmap.height() - 1 );
painter.drawLine( 0, pixmap.height() - 1, pixmap.width() - 1, pixmap.height() - 1 );
@ -1099,7 +1099,7 @@ void MultiTabBarTab::drawButtonAmarok( TQPainter *paint )
TQPainter painter( &pixmap );
// Draw the frame
painter.setPen( tqcolorGroup().mid() );
painter.setPen( colorGroup().mid() );
/*if ( m_id != bar->visibleTabCount() - 1 )*/ painter.drawLine( 0, 0, 0, pixmap.height() - 1 );
painter.drawLine( 0, pixmap.height() - 1, pixmap.width() - 1, pixmap.height() - 1 );
@ -1147,11 +1147,11 @@ MultiTabBar::MultiTabBar( MultiTabBarMode bm, TQWidget *parent, const char *name
m_buttons.setAutoDelete( false );
if ( bm == Vertical ) {
m_l = new TQVBoxLayout( this );
tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Expanding, true );
setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Expanding, true );
// setFixedWidth(24);
} else {
m_l = new TQHBoxLayout( this );
tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed, true );
setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed, true );
// setFixedHeight(24);
}
m_l->setMargin( 0 );
@ -1295,7 +1295,7 @@ void MultiTabBar::fontChange( const TQFont& /* oldFont */ )
{
for ( uint i = 0;i < tabs() ->count();i++ )
tabs() ->at( i ) ->resize();
tqrepaint();
repaint();
}
TQPtrList<MultiTabBarTab>* MultiTabBar::tabs() { return m_internal->tabs();}

@ -205,7 +205,7 @@ class MultiTabBarButton: public TQPushButton
*/
void proxyDrops( DropProxyTarget *finalDropTarget );
TQSize tqsizeHint() const;
TQSize sizeHint() const;
protected:
static const int ANIM_INTERVAL = 18;

@ -21,15 +21,15 @@ protected:
EngineController::canDecode( item->url() ) ||
item->url().protocol() == "audiocd" ||
PlaylistFile::isPlaylistFile( item->name() ) ||
item->name().tqendsWith( ".mp3", false ) || //for now this is less confusing for the user
item->name().tqendsWith( ".aa", false ) || //for adding to iPod
item->name().tqendsWith( ".mp4", false ) || //for adding to iPod
item->name().tqendsWith( ".m4v", false ) || //for adding to iPod
item->name().tqendsWith( ".m4b", false ) || //for adding to iPod
item->name().tqendsWith( ".ogg", false ) ||
item->name().tqendsWith( ".flac", false ) ||
item->name().tqendsWith( ".wma", false ) ||
item->name().tqendsWith( ".asf", false );
item->name().endsWith( ".mp3", false ) || //for now this is less confusing for the user
item->name().endsWith( ".aa", false ) || //for adding to iPod
item->name().endsWith( ".mp4", false ) || //for adding to iPod
item->name().endsWith( ".m4v", false ) || //for adding to iPod
item->name().endsWith( ".m4b", false ) || //for adding to iPod
item->name().endsWith( ".ogg", false ) ||
item->name().endsWith( ".flac", false ) ||
item->name().endsWith( ".wma", false ) ||
item->name().endsWith( ".asf", false );
}
};

@ -24,7 +24,7 @@ void
MyDirOperator::myCdUp()
{
KURL tmp( url() );
tmp.cd( TQString::tqfromLatin1(".."));
tmp.cd( TQString::fromLatin1(".."));
if( m_medium && !tmp.path().startsWith( m_medium->mountPoint() ) )
tmp.setPath( m_medium->mountPoint() );
setURL(tmp, true);

@ -43,7 +43,7 @@
<property name="sizeType">
<enum>MinimumExpanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>21</width>
<height>5</height>
@ -60,7 +60,7 @@
<property name="sizeType">
<enum>Preferred</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>80</width>
<height>21</height>
@ -146,7 +146,7 @@
<property name="sizeType">
<enum>Preferred</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>110</width>
<height>21</height>
@ -165,7 +165,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>60</width>
<height>0</height>
@ -203,7 +203,7 @@
<property name="sizeType">
<enum>Preferred</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>90</width>
<height>21</height>
@ -239,7 +239,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>250</width>
<height>250</height>
@ -302,7 +302,7 @@
<property name="text">
<string></string>
</property>
<property name="tqalignment">
<property name="alignment">
<set>AlignVCenter</set>
</property>
</widget>

@ -81,7 +81,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout5</cstring>
<cstring>layout5</cstring>
</property>
<vbox>
<property name="name">
@ -118,7 +118,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>16</height>
@ -238,7 +238,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>16</height>
@ -305,7 +305,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout4</cstring>
<cstring>layout4</cstring>
</property>
<hbox>
<property name="name">
@ -357,7 +357,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>16</height>
@ -404,7 +404,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout7</cstring>
<cstring>layout7</cstring>
</property>
<hbox>
<property name="name">
@ -420,7 +420,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>347</width>
<height>20</height>
@ -450,7 +450,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>16</height>

@ -65,10 +65,10 @@ TQString OrganizeCollectionDialog::buildFormatTip()
continue;
args[MetaBundle::exactColumnName( i ).lower()] = MetaBundle::prettyColumnName( i );
}
args["albumartist"] = i18n( "%1 or %2" ).tqarg( i18n("This feature only works with \"The\", so either don't translate it at all, or only translate artist and album", "Album Artist, The") , i18n("The Album Artist") );
args["albumartist"] = i18n( "%1 or %2" ).arg( i18n("This feature only works with \"The\", so either don't translate it at all, or only translate artist and album", "Album Artist, The") , i18n("The Album Artist") );
args["thealbumartist"] = i18n( "The Album Artist" );
args["theartist"] = i18n( "The Artist" );
args["artist"] = i18n( "%1 or %2" ).tqarg( i18n( "This feature only works with \"The\", so either don't translate it at all, or only translate Artist", "Artist, The") , i18n( "The Artist") );
args["artist"] = i18n( "%1 or %2" ).arg( i18n( "This feature only works with \"The\", so either don't translate it at all, or only translate Artist", "Artist, The") , i18n( "The Artist") );
args["folder"] = i18n( "Collection Base Folder" );
args["initial"] = i18n( "Artist's Initial" );
args["filetype"] = i18n( "File Extension of Source" );
@ -81,7 +81,7 @@ TQString OrganizeCollectionDialog::buildFormatTip()
it != args.end();
++it )
{
tooltip += TQString( "<li>%1 - %2" ).tqarg( it.data(), "%" + it.key() );
tooltip += TQString( "<li>%1 - %2" ).arg( it.data(), "%" + it.key() );
}
tooltip += "</ul>";

@ -52,7 +52,7 @@ OSDWidget::OSDWidget( TQWidget *parent, const char *name )
: TQWidget( parent, name, WType_TopLevel | WNoAutoErase | WStyle_Customize | WX11BypassWM | WStyle_StaysOnTop )
, m_duration( 2000 )
, m_timer( new TQTimer( this ) )
, m_tqalignment( Middle )
, m_alignment( Middle )
, m_screen( 0 )
, m_y( MARGIN )
, m_drawShadow( false )
@ -118,7 +118,7 @@ OSDWidget::volChanged( unsigned char volume )
{
m_volume = true;
m_newvolume = volume;
m_text = m_newvolume ? i18n("Volume: %1%").tqarg( m_newvolume ) : i18n("Mute");
m_text = m_newvolume ? i18n("Volume: %1%").arg( m_newvolume ) : i18n("Mute");
show();
}
@ -247,7 +247,7 @@ OSDWidget::determineMetrics( const uint M )
const TQRect screen = TQApplication::desktop()->screenGeometry( m_screen );
TQPoint newPos( MARGIN, m_y );
switch( m_tqalignment )
switch( m_alignment )
{
case Left:
break;
@ -349,8 +349,8 @@ OSDWidget::render( const uint M, const TQSize &size )
const uint shadowSize = static_cast<uint>( m_scaledCover.width() / 100.0 * 6.0 );
const TQString folder = Amarok::saveLocation( "covershadow-cache/" );
const TQString file = TQString( "shadow_albumcover%1x%2.png" ).tqarg( m_scaledCover.width() + shadowSize )
.tqarg( m_scaledCover.height() + shadowSize );
const TQString file = TQString( "shadow_albumcover%1x%2.png" ).arg( m_scaledCover.width() + shadowSize )
.arg( m_scaledCover.height() + shadowSize );
if ( TQFile::exists( folder + file ) )
shadow.load( folder + file );
else {
@ -395,8 +395,8 @@ OSDWidget::render( const uint M, const TQSize &size )
p.end();
pixmapGradient = TQPixmap( vol.size() );
KPixmapEffect::gradient( pixmapGradient, tqcolorGroup().background(),
tqcolorGroup().highlight(), KPixmapEffect::EllipticGradient );
KPixmapEffect::gradient( pixmapGradient, colorGroup().background(),
colorGroup().highlight(), KPixmapEffect::EllipticGradient );
pixmapGradient.setMask( mask );
}
@ -580,7 +580,7 @@ OSDWidget::mousePressEvent( TQMouseEvent* )
void
OSDWidget::unsetColors()
{
const TQColorGroup c = TQApplication::tqpalette().active();
const TQColorGroup c = TQApplication::palette().active();
setPaletteForegroundColor( c.highlightedText() );
setPaletteBackgroundColor( c.highlight() );
@ -670,11 +670,11 @@ void OSDPreviewWidget::mouseMoveEvent( TQMouseEvent *e )
if( destination.y() > maxY ) destination.ry() = maxY;
if( eGlobalPosX < (hcenter-snapZone) ) {
m_tqalignment = Left;
m_alignment = Left;
destination.rx() = MARGIN;
}
else if( eGlobalPosX > (hcenter+snapZone) ) {
m_tqalignment = Right;
m_alignment = Right;
destination.rx() = screen.width() - MARGIN - width();
}
else {
@ -685,10 +685,10 @@ void OSDPreviewWidget::mouseMoveEvent( TQMouseEvent *e )
if( eGlobalPosY >= (vcenter-snapZone) && eGlobalPosY <= (vcenter+snapZone) )
{
m_tqalignment = Center;
m_alignment = Center;
destination.ry() = vcenter - height()/2;
}
else m_tqalignment = Middle;
else m_alignment = Middle;
}
destination += screen.topLeft();
@ -760,7 +760,7 @@ Amarok::OSD::show( const MetaBundle &bundle ) //slot
: ( parens.contains( column ) || parens.contains( availableTags.at( i - 1 ) ) ) ? " "
: i18n(" - ");
append += ( parens.contains( column ) ? "(%1)" : "%1" );
text += append.tqarg( tags.at( column + 1 ) );
text += append.arg( tags.at( column + 1 ) );
}
}
else
@ -834,7 +834,7 @@ Amarok::OSD::show( const MetaBundle &bundle ) //slot
if( text.isEmpty() )
text = MetaBundle::prettyTitle( bundle.url().fileName() ).stripWhiteSpace();
if( text.startsWith( "- " ) ) //When we only have a title tag, _something_ prepends a fucking hyphen. Remove that.
if( text.startsWith( "- " ) ) //When we only have a title tag, _something_ prepends a hyphen. Remove that.
text = text.mid( 2 );
if( text.isEmpty() ) //still
@ -849,7 +849,7 @@ Amarok::OSD::show( const MetaBundle &bundle ) //slot
void
Amarok::OSD::applySettings()
{
tqsetAlignment( static_cast<OSDWidget::Alignment>( AmarokConfig::osdAlignment() ) );
setAlignment( static_cast<OSDWidget::Alignment>( AmarokConfig::osdAlignment() ) );
setDuration( AmarokConfig::osdDuration() );
#ifdef TQ_WS_X11
setEnabled( AmarokConfig::osdEnabled() );

@ -57,7 +57,7 @@ class OSDWidget : public TQWidget
void setTextColor( const TQColor &color ) { setPaletteForegroundColor( color ); }
void setBackgroundColor(const TQColor &color ) { setPaletteBackgroundColor( color ); }
void setOffset( int y ) { m_y = y; }
void tqsetAlignment( Alignment tqalignment ) { m_tqalignment = tqalignment; }
void setAlignment( Alignment alignment ) { m_alignment = alignment; }
void setImage( const TQImage &image ) { m_cover = image; }
void setScreen( int screen );
void setText( const TQString &text ) { m_text = text; }
@ -88,7 +88,7 @@ class OSDWidget : public TQWidget
int m_duration;
TQTimer *m_timer;
Alignment m_tqalignment;
Alignment m_alignment;
int m_screen;
uint m_y;
bool m_drawShadow;
@ -116,7 +116,7 @@ public:
OSDPreviewWidget( TQWidget *parent );
int screen() { return m_screen; }
int tqalignment() { return m_tqalignment; }
int alignment() { return m_alignment; }
int y() { return m_y; }
public slots:

@ -54,10 +54,10 @@ namespace Amarok
TQPixmap getPNG( const TQString &filename )
{
TQString file = !filename.tqendsWith( ".png", false ) ? "amarok/images/%1.png" : "amarok/images/%1";
TQString file = !filename.endsWith( ".png", false ) ? "amarok/images/%1.png" : "amarok/images/%1";
TQPixmap pix;
TQImage img( locate( "data", file.tqarg( filename ) ), "PNG" );
TQImage img( locate( "data", file.arg( filename ) ), "PNG" );
if (TQPaintDevice::x11AppDepth() == 32) pix.convertFromImage(KImageEffect::convertToPremultipliedAlpha( img ));
else pix.convertFromImage( img );
return pix;
@ -65,10 +65,10 @@ namespace Amarok
TQPixmap getJPG( const TQString &filename )
{
TQString file = !filename.tqendsWith( ".jpg", false ) ? "amarok/images/%1.jpg" : "amarok/images/%1";
TQString file = !filename.endsWith( ".jpg", false ) ? "amarok/images/%1.jpg" : "amarok/images/%1";
TQPixmap pix;
TQImage img( locate( "data", TQString( "amarok/images/%1.jpg" ).tqarg( filename ) ), "JPEG" );
TQImage img( locate( "data", TQString( "amarok/images/%1.jpg" ).arg( filename ) ), "JPEG" );
if (TQPaintDevice::x11AppDepth() == 32) pix.convertFromImage(KImageEffect::convertToPremultipliedAlpha( img ));
else pix.convertFromImage( img );
return pix;
@ -100,7 +100,7 @@ PlayerWidget::PlayerWidget( TQWidget *parent, const char *name, bool enablePlayl
, m_pAnalyzer( 0 )
{
//the createWidget template function is used here
//createWidget just creates a widget which has it's tqgeometry set too
//createWidget just creates a widget which has it's geometry set too
// Sets caption and icon correctly (needed e.g. for GNOME)
kapp->setTopWidget( this );
@ -127,7 +127,7 @@ PlayerWidget::PlayerWidget( TQWidget *parent, const char *name, bool enablePlayl
setFont( font );
{ //<NavButtons>
//NOTE we use a tqlayout for the buttons so resizing will be possible
//NOTE we use a layout for the buttons so resizing will be possible
m_pFrameButtons = createWidget<TQHBox>( TQRect(0, 118, 311, 22), this );
KActionCollection *ac =Amarok::actionCollection();
@ -140,7 +140,7 @@ PlayerWidget::PlayerWidget( TQWidget *parent, const char *name, bool enablePlayl
new NavButton( m_pFrameButtons, "next", ac->action( "next" ) );
KPushButton *switchView = new KPushButton( KGuiItem( "", "mini_dock" ), m_pFrameButtons );
switchView->tqsetSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ); // too big!
switchView->setSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Preferred ); // too big!
switchView->setFocusPolicy( TQ_NoFocus );
connect( switchView, TQT_SIGNAL( clicked() ), TQT_SLOT( toggleView() ) );
@ -381,7 +381,7 @@ void PlayerWidget::engineNewMetaData( const MetaBundle &bundle, bool )
if( m_rateString.isEmpty() )
m_rateString = Hz;
else
m_rateString = i18n("%1 kBit - %2").tqarg( m_rateString, Hz );
m_rateString = i18n("%1 kBit - %2").arg( m_rateString, Hz );
}
TQStringList list( bundle.prettyTitle() );
@ -774,15 +774,15 @@ void PlayerWidget::mousePressEvent( TQMouseEvent *e )
{
//Amarok::Menu::instance()->exec( e->globalPos() );
}
else if ( m_pAnalyzer->tqgeometry().contains( e->pos() ) )
else if ( m_pAnalyzer->geometry().contains( e->pos() ) )
{
createAnalyzer( e->state() & TQt::ControlButton ? -1 : +1 );
}
else
{
TQRect
rect = m_pTimeLabel->tqgeometry();
rect |= m_pTimeSign->tqgeometry();
rect = m_pTimeLabel->geometry();
rect |= m_pTimeSign->geometry();
if ( rect.contains( e->pos() ) )
{

@ -166,7 +166,7 @@ Playlist *Playlist::s_instance = 0;
Playlist::Playlist( TQWidget *parent )
: KListView( parent, "ThePlaylist" )
, EngineObserver( EngineController::instance() )
, m_startupTime_t( TQDateTime::tqcurrentDateTime().toTime_t() )
, m_startupTime_t( TQDateTime::currentDateTime().toTime_t() )
, m_oldestTime_t( CollectionDB::instance()->query( "SELECT MIN( createdate ) FROM statistics;" ).first().toInt() )
, m_currentTrack( 0 )
, m_marker( 0 )
@ -958,7 +958,7 @@ Playlist::playNextTrack( bool forceNext )
if( !AmarokConfig::randomMode() ) {
item = MyIt::nextVisible( item );
while( item && ( !checkFiletqStatus( item ) || !item->exists() ) )
while( item && ( !checkFileStatus( item ) || !item->exists() ) )
item = MyIt::nextVisible( item );
setCurrentTrack( item );
}
@ -1002,7 +1002,7 @@ Playlist::playNextTrack( bool forceNext )
}
else
for( MyIt it( this ); *it; ++it )
if ( !m_prevTracks.containsRef( *it ) && checkFiletqStatus( *it ) && (*it)->exists() )
if ( !m_prevTracks.containsRef( *it ) && checkFileStatus( *it ) && (*it)->exists() )
tracks.push_back( *it );
if( tracks.isEmpty() )
{
@ -1082,7 +1082,7 @@ Playlist::playNextTrack( bool forceNext )
item = tracks.at( KApplication::random() % tracks.count() ); //is O(1)
else
{
const uint currenttime_t = TQDateTime::tqcurrentDateTime().toTime_t();
const uint currenttime_t = TQDateTime::currentDateTime().toTime_t();
TQValueVector<int> weights( tracks.size() );
TQ_INT64 total = m_total;
if( Amarok::randomAlbums() )
@ -1131,13 +1131,13 @@ Playlist::playNextTrack( bool forceNext )
else if( item )
{
item = MyIt::nextVisible( item );
while( item && ( !checkFiletqStatus( item ) || !item->exists() ) )
while( item && ( !checkFileStatus( item ) || !item->exists() ) )
item = MyIt::nextVisible( item );
}
else
{
item = *MyIt( this ); //ie. first visible item
while( item && ( !checkFiletqStatus( item ) || !item->exists() ) )
while( item && ( !checkFileStatus( item ) || !item->exists() ) )
item = item->nextSibling();
}
@ -1227,7 +1227,7 @@ Playlist::playPrevTrack()
if( !item )
{
item = *static_cast<MyIt&>(--MyIt( item ));
while( item && !checkFiletqStatus( item ) )
while( item && !checkFileStatus( item ) )
item = *static_cast<MyIt&>(--MyIt( item ));
}
}
@ -1241,13 +1241,13 @@ Playlist::playPrevTrack()
if( item )
{
item = MyIt::prevVisible( item );
while( item && ( !checkFiletqStatus( item ) || !item->isEnabled() ) )
while( item && ( !checkFileStatus( item ) || !item->isEnabled() ) )
item = MyIt::prevVisible( item );
}
else
{
item = *MyIt( this ); //ie. first visible item
while( item && ( !checkFiletqStatus( item ) || !item->isEnabled() ) )
while( item && ( !checkFileStatus( item ) || !item->isEnabled() ) )
item = item->nextSibling();
}
}
@ -1562,7 +1562,7 @@ Playlist::slotCountChanged()
}
bool
Playlist::checkFiletqStatus( PlaylistItem * item )
Playlist::checkFileStatus( PlaylistItem * item )
{
//DEBUG_BLOCK
//debug() << "uniqueid of item = " << item->uniqueId() << ", url = " << item->url().path() << endl;
@ -1622,7 +1622,7 @@ Playlist::activate( TQListViewItem *item )
#define item static_cast<PlaylistItem*>(item)
if ( !checkFiletqStatus( item ) )
if ( !checkFileStatus( item ) )
{
Amarok::StatusBar::instance()->shortMessage( i18n("Local file does not exist.") );
return;
@ -1712,7 +1712,7 @@ TQPair<TQString, TQRect> Playlist::toolTipText( TQWidget*, const TQPoint &pos )
else
text = item->text( col );
TQRect irect = tqitemRect( item );
TQRect irect = itemRect( item );
const int headerPos = header()->sectionPos( col );
irect.setLeft( headerPos - 1 );
irect.setRight( headerPos + header()->sectionSize( col ) );
@ -1755,7 +1755,7 @@ TQPair<TQString, TQRect> Playlist::toolTipText( TQWidget*, const TQPoint &pos )
text = text.replace( "&", "&amp;" ).replace( "<", "&lt;" ).replace( ">", "&gt;" );
if( item->isCurrent() )
{
text = TQString("<i>%1</i>").tqarg( text );
text = TQString("<i>%1</i>").arg( text );
Amarok::ToolTip::s_hack = 1; //HACK for precise positioning
}
return TQPair<TQString, TQRect>( text, globalRect );
@ -2277,7 +2277,7 @@ Playlist::writeTag( TQListViewItem *qitem, const TQString &, int column ) //SLOT
for( PlaylistItem *item = m_itemsToChangeTagsFor.first(); item; item = m_itemsToChangeTagsFor.next() )
{
if( !checkFiletqStatus( item ) )
if( !checkFileStatus( item ) )
continue;
const TQString oldTag = item == qitem ? m_editOldTag : item->exactText(column);
@ -2340,8 +2340,8 @@ Playlist::paletteChange( const TQPalette &p )
const uint steps = STEPS+5+5; //so we don't fade all the way to base, and all the way up to highlight either
fg = tqcolorGroup().highlight();
bg = tqcolorGroup().base();
fg = colorGroup().highlight();
bg = colorGroup().base();
dr = double(bg.red() - fg.red()) / steps;
dg = double(bg.green() - fg.green()) / steps;
@ -2357,8 +2357,8 @@ Playlist::paletteChange( const TQPalette &p )
const uint steps = STEPS + 5; //so we don't fade all the way to base
fg = tqcolorGroup().highlightedText();
bg = tqcolorGroup().text();
fg = colorGroup().highlightedText();
bg = colorGroup().text();
dr = double(bg.red() - fg.red()) / steps;
dg = double(bg.green() - fg.green()) / steps;
@ -2372,7 +2372,7 @@ Playlist::paletteChange( const TQPalette &p )
KListView::paletteChange( p );
counter = 0; // reset the counter or apparently the text lacks contrast
slotGlowTimer(); // tqrepaint currentTrack marker
slotGlowTimer(); // repaint currentTrack marker
}
void
@ -2404,7 +2404,7 @@ Playlist::contentsDragMoveEvent( TQDragMoveEvent* e )
const TQPoint p = contentsToViewport( e->pos() );
TQListViewItem *item = itemAt( p );
if( !item || ctrlPressed ) item = lastItem();
else if( p.y() - tqitemRect( item ).top() < (item->height()/2) ) item = item->itemAbove();
else if( p.y() - itemRect( item ).top() < (item->height()/2) ) item = item->itemAbove();
if( item != m_marker ) {
//NOTE this if block prevents flicker
@ -2532,7 +2532,7 @@ Playlist::viewportPaintEvent( TQPaintEvent *e )
TQPainter p( viewport() );
p.fillRect(
drawDropVisualizer( 0, 0, m_marker ),
TQBrush( tqcolorGroup().highlight().dark(), TQBrush::Dense4Pattern ) );
TQBrush( colorGroup().highlight().dark(), TQBrush::Dense4Pattern ) );
}
else if( m_showHelp && isEmpty() ) {
TQPainter p( viewport() );
@ -2569,9 +2569,9 @@ Playlist::viewportPaintEvent( TQPaintEvent *e )
const uint x = (viewport()->width() - w - 30) / 2 ;
const uint y = (viewport()->height() - h - 30) / 2 ;
p.setBrush( tqcolorGroup().background() );
p.setBrush( colorGroup().background() );
p.drawRoundRect( x, y, w+30, h+30, (8*200)/w, (8*200)/h );
t->draw( &p, x+15, y+15, TQRect(), tqcolorGroup() );
t->draw( &p, x+15, y+15, TQRect(), colorGroup() );
delete t;
}
}
@ -2737,7 +2737,7 @@ Playlist::eventFilter( TQObject *o, TQEvent *e )
KPopupMenu popup;
if( mouseOverColumn >= 0 )
popup.insertItem( i18n("&Hide %1").tqarg( columnText( mouseOverColumn ) ), HIDE ); //TODO
popup.insertItem( i18n("&Hide %1").arg( columnText( mouseOverColumn ) ), HIDE ); //TODO
KPopupMenu sub;
for( int i = 0; i < columns(); ++i ) //columns() references a property
@ -3124,10 +3124,10 @@ Playlist::saveXML( const TQString &path )
const TQString title = ( dynamicMode()->title() ).replace( "&", "&amp;" )
.replace( "<", "&lt;" )
.replace( ">", "&gt;" );
dynamic = TQString(" dynamicMode=\"%1\"").tqarg( title );
dynamic = TQString(" dynamicMode=\"%1\"").arg( title );
}
stream << TQString( "<playlist product=\"%1\" version=\"%2\"%3>\n" )
.tqarg( "Amarok" ).tqarg( Amarok::xmlVersion() ).tqarg( dynamic );
.arg( "Amarok" ).arg( Amarok::xmlVersion() ).arg( dynamic );
for( MyIt it( this, MyIt::All ); *it; ++it )
{
@ -3526,10 +3526,10 @@ Playlist::copyToClipboard( const TQListViewItem *item ) const //SLOT
text.append( " :: " + playlistItem->url().url() );
// Copy both to clipboard and X11-selection
TQApplication::tqclipboard()->setText( text, TQClipboard::Clipboard );
TQApplication::tqclipboard()->setText( text, TQClipboard::Selection );
TQApplication::clipboard()->setText( text, TQClipboard::Clipboard );
TQApplication::clipboard()->setText( text, TQClipboard::Selection );
Amarok::OSD::instance()->OSDWidget::show( i18n( "Copied: %1" ).tqarg( text ),
Amarok::OSD::instance()->OSDWidget::show( i18n( "Copied: %1" ).arg( text ),
TQImage(CollectionDB::instance()->albumImage(*playlistItem )) );
}
}
@ -3594,7 +3594,7 @@ Playlist::changeFromQueueManager(TQPtrList<PlaylistItem> list)
m_nextTracks = list;
PLItemList in, out;
// make sure we tqrepaint items no longer queued
// make sure we repaint items no longer queued
for( PlaylistItem* item = oldQueue.first(); item; item = oldQueue.next() )
if( !m_nextTracks.containsRef( item ) )
out << item;
@ -3604,7 +3604,7 @@ Playlist::changeFromQueueManager(TQPtrList<PlaylistItem> list)
emit queueChanged( in, out );
// tqrepaint newly queued or altered queue items
// repaint newly queued or altered queue items
if( dynamicMode() )
sortQueuedItems();
else
@ -3777,7 +3777,7 @@ Playlist::showContextMenu( TQListViewItem *item, const TQPoint &p, int col ) //S
Amarok::actionCollection()->action("playlist_shuffle")->plug( &popup );
m = PlaylistBrowser::instance()->findDynamicModeByTitle( AmarokConfig::lastDynamicMode() );
if( m )
popup.insertItem( SmallIconSet( Amarok::icon( "dynamic" ) ), i18n("L&oad %1").tqarg( m->title().replace( '&', "&&" ) ), ENABLEDYNAMIC);
popup.insertItem( SmallIconSet( Amarok::icon( "dynamic" ) ), i18n("L&oad %1").arg( m->title().replace( '&', "&&" ) ), ENABLEDYNAMIC);
}
switch(popup.exec(p))
{
@ -3915,11 +3915,11 @@ Playlist::showContextMenu( TQListViewItem *item, const TQPoint &p, int col ) //S
popup.insertItem( trackColumn
? i18n("Iteratively Assign Track &Numbers")
: i18n("&Write '%1' for Selected Tracks")
.tqarg( KStringHandler::rsqueeze( tag, 30 ).replace( "&", "&&" ) ), FILL_DOWN );
.arg( KStringHandler::rsqueeze( tag, 30 ).replace( "&", "&&" ) ), FILL_DOWN );
popup.insertItem( SmallIconSet( Amarok::icon( "edit" ) ), (itemCount == 1
? i18n( "&Edit Tag '%1'" )
: i18n( "&Edit '%1' Tag for Selected Tracks" )).tqarg( tagName ), EDIT );
: i18n( "&Edit '%1' Tag for Selected Tracks" )).arg( tagName ), EDIT );
popup.insertItem( SmallIconSet( Amarok::icon( "info" ) )
, item->url().isLocalFile() ?
@ -4579,7 +4579,7 @@ Playlist::slotMouseButtonPressed( int button, TQListViewItem *after, const TQPoi
{
case Qt::MidButton:
{
const TQString path = TQApplication::tqclipboard()->text( TQClipboard::Selection );
const TQString path = TQApplication::clipboard()->text( TQClipboard::Selection );
const KURL url = KURL::fromPathOrURL( path );
if( url.isValid() )
@ -4646,7 +4646,7 @@ Playlist::slotMoodbarPrefs( bool show, bool moodier, int alter, bool withMusic )
{
// No need to call moodbar().load(), since that will happen
// automatically next time it's displayed. We do have to
// tqrepaint so that they get displayed though.
// repaint so that they get displayed though.
for( PlaylistIterator it( this, PlaylistIterator::All ) ; *it ; ++it )
{
@ -4700,7 +4700,7 @@ Playlist::slotEraseMarker() //SLOT
{
const TQRect spot = drawDropVisualizer( 0, 0, m_marker );
m_marker = 0;
viewport()->tqrepaint( spot, false );
viewport()->repaint( spot, false );
}
}
@ -4734,7 +4734,7 @@ Playlist::showTagDialog( TQPtrList<TQListViewItem> items )
TagDialog *dialog = new TagDialog( *item, item, instance() );
dialog->show();
}
else if ( checkFiletqStatus( item ) )
else if ( checkFileStatus( item ) )
{
TagDialog *dialog = new TagDialog( *item, item, instance() );
dialog->show();
@ -4790,7 +4790,7 @@ Playlist::showTagDialog( TQPtrList<TQListViewItem> items )
lineEdit2 = new TQLineEdit( this, "Command" );
groupBox1 = new TQGroupBox( 1, Qt::Vertical, i18n( "Examples" ), this );
groupBox1->tqlayout()->setMargin( 11 );
groupBox1->layout()->setMargin( 11 );
new KActiveLabel( i18n( "file --brief %f\n" "ls -sh %f\n" "basename %f\n" "dirname %f" ), groupBox1 );
// buddies
@ -4798,22 +4798,22 @@ Playlist::showTagDialog( TQPtrList<TQListViewItem> items )
textLabel3->setBuddy( lineEdit2 );
// layouts
TQHBoxLayout *tqlayout1 = new TQHBoxLayout( 0, 0, 6 );
tqlayout1->addItem( new TQSpacerItem( 181, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ) );
tqlayout1->addWidget( new KPushButton( KStdGuiItem::ok(), this, "OkButton" ) );
tqlayout1->addWidget( new KPushButton( KStdGuiItem::cancel(), this, "CancelButton" ) );
TQHBoxLayout *layout1 = new TQHBoxLayout( 0, 0, 6 );
layout1->addItem( new TQSpacerItem( 181, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ) );
layout1->addWidget( new KPushButton( KStdGuiItem::ok(), this, "OkButton" ) );
layout1->addWidget( new KPushButton( KStdGuiItem::cancel(), this, "CancelButton" ) );
TQGridLayout *tqlayout2 = new TQGridLayout( 0, 2, 2, 0, 6 );
tqlayout2->TQLayout::add( textLabel2 );
tqlayout2->TQLayout::add( lineEdit1 );
tqlayout2->TQLayout::add( textLabel3 );
tqlayout2->TQLayout::add( lineEdit2 );
TQGridLayout *layout2 = new TQGridLayout( 0, 2, 2, 0, 6 );
layout2->TQLayout::add( textLabel2 );
layout2->TQLayout::add( lineEdit1 );
layout2->TQLayout::add( textLabel3 );
layout2->TQLayout::add( lineEdit2 );
TQVBoxLayout *Form1Layout = new TQVBoxLayout( this, 11, 6, "Form1Layout");
Form1Layout->addWidget( textLabel1 );
Form1Layout->addWidget( groupBox1 );
Form1Layout->addLayout( tqlayout2 );
Form1Layout->addLayout( tqlayout1 );
Form1Layout->addLayout( layout2 );
Form1Layout->addLayout( layout1 );
Form1Layout->addItem( new TQSpacerItem( 20, 231, TQSizePolicy::Minimum, TQSizePolicy::Expanding ) );
// properties
@ -4960,7 +4960,7 @@ TagWriter::completeJob()
// we write a space for some reason I cannot recall
m_item->setExactText( m_tagType, m_oldTagString.isEmpty() ? " " : m_oldTagString );
Amarok::StatusBar::instance()->longMessage( i18n(
"Sorry, the tag for %1 could not be changed." ).tqarg( m_item->url().fileName() ), KDE::StatusBar::Sorry );
"Sorry, the tag for %1 could not be changed." ).arg( m_item->url().fileName() ), KDE::StatusBar::Sorry );
break;
case false:

@ -175,7 +175,7 @@ class Playlist : private KListView, public EngineObserver, public Amarok::ToolTi
void restoreLayout(KConfig *config, const TQString &group);
//AFT-related functions
bool checkFiletqStatus( PlaylistItem * item );
bool checkFileStatus( PlaylistItem * item );
void addToUniqueMap( const TQString uniqueid, PlaylistItem* item );
void removeFromUniqueMap( const TQString uniqueid, PlaylistItem* item );
@ -351,7 +351,7 @@ class Playlist : private KListView, public EngineObserver, public Amarok::ToolTi
typedef TQMap<AtomicString, PlaylistAlbum*> AlbumMap;
typedef TQMap<AtomicString, AlbumMap> ArtistAlbumMap;
ArtistAlbumMap m_albums;
uint m_startupTime_t; //TQDateTime::tqcurrentDateTime().toTime_t as of startup
uint m_startupTime_t; //TQDateTime::currentDateTime().toTime_t as of startup
uint m_oldestTime_t; //the createdate of the oldest song in the collection

@ -213,7 +213,7 @@ PlaylistBrowser::PlaylistBrowser( const char *name )
this, TQT_SLOT( currentItemChanged( TQListViewItem * ) ) );
connect( CollectionDB::instance(), TQT_SIGNAL( scanDone( bool ) ), TQT_SLOT( collectionScanDone() ) );
setMinimumWidth( m_toolbar->tqsizeHint().width() );
setMinimumWidth( m_toolbar->sizeHint().width() );
m_infoPane = new InfoPane( m_splitter );
@ -562,21 +562,21 @@ void PlaylistBrowser::loadLastfmStreams( const bool subscriber /*false*/ )
}
TQString user = AmarokConfig::scrobblerUsername();
KURL url( TQString("lastfm://user/%1/neighbours").tqarg( user ) );
KURL url( TQString("lastfm://user/%1/neighbours").arg( user ) );
last = new LastFmEntry( m_lastfmCategory, tagsFolder, url, i18n( "Neighbor Radio" ) );
last->setKept( false );
url = KURL::fromPathOrURL( TQString("lastfm://user/%1/recommended/100").tqarg( user ) );
url = KURL::fromPathOrURL( TQString("lastfm://user/%1/recommended/100").arg( user ) );
last = new LastFmEntry( m_lastfmCategory, last, url, i18n( "Recommended Radio" ) );
last->setKept( false );
if( subscriber )
{
url = KURL::fromPathOrURL( TQString("lastfm://user/%1/personal").tqarg( user ) );
url = KURL::fromPathOrURL( TQString("lastfm://user/%1/personal").arg( user ) );
last = new LastFmEntry( m_lastfmCategory, last, url, i18n( "Personal Radio" ) );
last->setKept( false );
url = KURL::fromPathOrURL( TQString("lastfm://user/%1/loved").tqarg( user ) );
url = KURL::fromPathOrURL( TQString("lastfm://user/%1/loved").arg( user ) );
last = new LastFmEntry( m_lastfmCategory, last, url, i18n( "Loved Radio" ) );
last->setKept( false );
}
@ -668,7 +668,7 @@ void PlaylistBrowser::addSmartPlaylist( TQListViewItem *parent ) //SLOT
if ( sp && sp->title() == dialog.name() ) {
if( KMessageBox::warningContinueCancel(
PlaylistWindow::self(),
i18n( "A Smart Playlist named \"%1\" already exists. Do you want to overwrite it?" ).tqarg( dialog.name() ),
i18n( "A Smart Playlist named \"%1\" already exists. Do you want to overwrite it?" ).arg( dialog.name() ),
i18n( "Overwrite Playlist?" ), i18n( "Overwrite" ) ) == KMessageBox::Continue )
{
delete item;
@ -773,7 +773,7 @@ void PlaylistBrowser::updateSmartPlaylistElement( TQDomElement& query )
sql.replace( selectFromSearch, "SELECT (*ListOfFields*) FROM" );
if ( limitSearch.search( sql ) != -1 )
sql.replace( limitSearch,
TQString( "LIMIT %1 OFFSET %2").tqarg( limitSearch.capturedTexts()[2].toInt() ).tqarg( limitSearch.capturedTexts()[1].toInt() ) );
TQString( "LIMIT %1 OFFSET %2").arg( limitSearch.capturedTexts()[2].toInt() ).arg( limitSearch.capturedTexts()[1].toInt() ) );
text.setData( sql );
break;
@ -817,7 +817,7 @@ void PlaylistBrowser::loadDefaultSmartPlaylists()
QueryBuilder qbTemp( qb );
qbTemp.addMatch( QueryBuilder::tabArtist, *it );
last = new SmartPlaylist( item, last, i18n( "By %1" ).tqarg( *it ), qbTemp.query() );
last = new SmartPlaylist( item, last, i18n( "By %1" ).arg( *it ), qbTemp.query() );
last->setKept( false );
}
@ -837,7 +837,7 @@ void PlaylistBrowser::loadDefaultSmartPlaylists()
QueryBuilder qbTemp( qb );
qbTemp.addMatch( QueryBuilder::tabArtist, *it );
last = new SmartPlaylist( item, last, i18n( "By %1" ).tqarg( *it ), qbTemp.query() );
last = new SmartPlaylist( item, last, i18n( "By %1" ).arg( *it ), qbTemp.query() );
last->setKept( false );
}
@ -857,7 +857,7 @@ void PlaylistBrowser::loadDefaultSmartPlaylists()
QueryBuilder qbTemp( qb );
qbTemp.addMatch( QueryBuilder::tabArtist, *it );
last = new SmartPlaylist( item, last, i18n( "By %1" ).tqarg( *it ), qbTemp.query( true ) );
last = new SmartPlaylist( item, last, i18n( "By %1" ).arg( *it ), qbTemp.query( true ) );
last->setKept( false );
}
@ -903,7 +903,7 @@ void PlaylistBrowser::loadDefaultSmartPlaylists()
QueryBuilder qbTemp( qb );
qbTemp.addMatch( QueryBuilder::tabGenre, *it );
last = new SmartPlaylist( item, last, i18n( "%1" ).tqarg( *it ), qbTemp.query( true ) );
last = new SmartPlaylist( item, last, i18n( "%1" ).arg( *it ), qbTemp.query( true ) );
last->setKept( false );
}
@ -1179,7 +1179,7 @@ DEBUG_BLOCK
channel = new PodcastChannel( parent, channel, *it );
bool hasNew = CollectionDB::instance()->query( TQString("SELECT COUNT(parent) FROM podcastepisodes WHERE ( parent='%1' AND isNew=%2 ) LIMIT 1" )
.tqarg( (*it).url().url(), CollectionDB::instance()->boolT() ) )
.arg( (*it).url().url(), CollectionDB::instance()->boolT() ) )
.first().toInt() > 0;
channel->setNew( hasNew );
@ -1241,7 +1241,7 @@ void PlaylistBrowser::savePodcastFolderStates( PlaylistCategory *folder )
if( folder != m_podcastCategory )
{
if( folder->id() < 0 ) // probably due to a 1.3->1.4 migration
{ // we add the folder to the db, set the id and then update all the tqchildren
{ // we add the folder to the db, set the id and then update all the children
int parentId = static_cast<PlaylistCategory*>(folder->parent())->id();
int newId = CollectionDB::instance()->addPodcastFolder( folder->text(0), parentId, folder->isOpen() );
folder->setId( newId );
@ -1314,7 +1314,7 @@ void PlaylistBrowser::configurePodcasts( TQListViewItem *parent )
}
}
if( !podcastChannelList.isEmpty() )
configurePodcasts( podcastChannelList, i18n( "Podcasts contained in %1", "All in %1").tqarg( parent->text( 0 ) ) );
configurePodcasts( podcastChannelList, i18n( "Podcasts contained in %1", "All in %1").arg( parent->text( 0 ) ) );
}
void PlaylistBrowser::configureSelectedPodcasts()
@ -1438,7 +1438,7 @@ void PlaylistBrowser::addPodcast( const KURL& origUrl, TQListViewItem *parent )
{
Amarok::StatusBar::instance()->longMessage(
i18n( "Already subscribed to feed %1 as %2" )
.tqarg( url.prettyURL(), channel->title() ),
.arg( url.prettyURL(), channel->title() ),
KDE::StatusBar::Sorry );
return;
}
@ -1540,7 +1540,7 @@ bool PlaylistBrowser::deletePodcasts( TQPtrList<PodcastChannel> items )
}
#undef ch
/// we don't need to delete from the database, because removing the channel from the database
/// automatically removes the tqchildren as well.
/// automatically removes the children as well.
m_podcastItemsToScan.remove( static_cast<PodcastChannel*>(*it) );
}
CollectionDB::instance()->removePodcastChannel( static_cast<PodcastChannel*>(*it)->url() );
@ -1789,7 +1789,7 @@ bool PlaylistBrowser::savePlaylist( const TQString &path, const TQValueList<KURL
if( !file.open( IO_WriteOnly ) )
{
KMessageBox::sorry( PlaylistWindow::self(), i18n( "Cannot write playlist (%1).").tqarg(path) );
KMessageBox::sorry( PlaylistWindow::self(), i18n( "Cannot write playlist (%1).").arg(path) );
return false;
}
@ -2108,7 +2108,7 @@ void PlaylistBrowser::removeSelectedItems() //SLOT
// it will be deleted from the parent
TQListViewItem *parent = it.current()->parent();
if( parent && parent->isSelected() ) //parent will remove tqchildren
if( parent && parent->isSelected() ) //parent will remove children
continue;
if (parent) {
@ -2278,7 +2278,7 @@ void PlaylistBrowser::removeSelectedItems() //SLOT
if( lastfmCount ) saveLastFm();
}
// remove podcast folders. we need to do this recursively to ensure all tqchildren are removed from the db
// remove podcast folders. we need to do this recursively to ensure all children are removed from the db
void PlaylistBrowser::removePodcastFolder( PlaylistCategory *item )
{
if( !item ) return;
@ -2744,7 +2744,7 @@ void PlaylistBrowserView::eraseMarker() //SLOT
spot = drawDropVisualizer( 0, 0, m_marker );
m_marker = 0;
viewport()->tqrepaint( spot, false );
viewport()->repaint( spot, false );
}
}
@ -2759,7 +2759,7 @@ void PlaylistBrowserView::viewportPaintEvent( TQPaintEvent *e )
drawItemHighlighter( &painter, m_marker );
else //when dragging on a track we draw a line marker
painter.fillRect( drawDropVisualizer( 0, 0, m_marker ),
TQBrush( tqcolorGroup().highlight(), TQBrush::Dense4Pattern ) );
TQBrush( colorGroup().highlight(), TQBrush::Dense4Pattern ) );
}
}
@ -2775,7 +2775,7 @@ void PlaylistBrowserView::mousePressed( int button, TQListViewItem *item, const
TQPoint p = mapFromGlobal( pnt );
p.setY( p.y() - header()->height() );
TQRect itemrect = tqitemRect( item );
TQRect itemrect = itemRect( item );
TQRect expandRect = TQRect( 4, itemrect.y() + (item->height()/2) - 5, 15, 15 );
if( expandRect.contains( p ) ) { //expand symbol clicked
@ -2876,7 +2876,7 @@ void PlaylistBrowserView::rename( TQListViewItem *item, int c )
{
KListView::rename( item, c );
TQRect rect( tqitemRect( item ) );
TQRect rect( itemRect( item ) );
int fieldX = rect.x() + treeStepSize() + 2;
int fieldW = rect.width() - treeStepSize() - 2;
@ -2888,18 +2888,36 @@ void PlaylistBrowserView::rename( TQListViewItem *item, int c )
void PlaylistBrowserView::keyPressEvent( TQKeyEvent *e )
{
switch( e->key() ) {
case Key_Space: //load
PlaylistBrowser::instance()->slotDoubleClicked( currentItem() );
break;
case SHIFT+Key_Delete: //delete
case Key_Delete: //remove
PlaylistBrowser::instance()->removeSelectedItems();
break;
case Key_F2: //rename
PlaylistBrowser::instance()->renameSelectedItem();
break;
case Key_Enter:
case Key_Return:
{
if (e->state() & TQt::ShiftButton) {
// load and play
PlaylistBrowser::instance()->slotDoubleClicked( currentItem() );
}
else {
// load
TQListViewItem *item = currentItem();
if (item) {
Playlist::instance()->clear();
Playlist::instance()->setPlaylistName( item->text(0), true );
PlaylistBrowser::instance()->addSelectedToPlaylist( Playlist::Append );
}
}
break;
}
case Key_Delete: // delete
if (e->state() & TQt::ShiftButton) {
PlaylistBrowser::instance()->removeSelectedItems();
break;
}
case Key_F2:
if (e->state() & TQt::ShiftButton) {
//rename
PlaylistBrowser::instance()->renameSelectedItem();
break;
}
default:
KListView::keyPressEvent( e );
@ -3006,7 +3024,7 @@ void PlaylistBrowserView::startDrag()
textdrag->setSubtype( "amarok-sql" );
drag->addDragObject( textdrag );
}
itemList += KURL::fromPathOrURL( TQString("smartplaylist://%1").tqarg( item->text(0) ) );
itemList += KURL::fromPathOrURL( TQString("smartplaylist://%1").arg( item->text(0) ) );
pixText = (*it)->text(0);
}
@ -3020,7 +3038,7 @@ void PlaylistBrowserView::startDrag()
TQTextDrag *textdrag = new TQTextDrag( str, 0 );
textdrag->setSubtype( "dynamic" );
drag->addDragObject( textdrag );
itemList += KURL::fromPathOrURL( TQString("dynamic://%1").tqarg( item->text(0) ) );
itemList += KURL::fromPathOrURL( TQString("dynamic://%1").arg( item->text(0) ) );
pixText = (*it)->text(0);
}
@ -3054,12 +3072,12 @@ TQString PlaylistDialog::getSaveFileName( const TQString &suggestion, bool propo
if( !suggestion.isEmpty() )
{
TQString path = Amarok::saveLocation("playlists/") + "%1" + ".m3u";
if( TQFileInfo( path.tqarg( suggestion ) ).exists() && !proposeOverwriting )
if( TQFileInfo( path.arg( suggestion ) ).exists() && !proposeOverwriting )
{
int n = 2;
while( TQFileInfo( path.tqarg( i18n( "%1 (%2)" ).tqarg( suggestion, TQString::number( n ) ) ) ).exists() )
while( TQFileInfo( path.arg( i18n( "%1 (%2)" ).arg( suggestion, TQString::number( n ) ) ) ).exists() )
n++;
dialog.edit->setText( i18n( "%1 (%2)" ).tqarg( suggestion, TQString::number( n ) ) );
dialog.edit->setText( i18n( "%1 (%2)" ).arg( suggestion, TQString::number( n ) ) );
}
else
dialog.edit->setText( suggestion );
@ -3099,7 +3117,7 @@ void PlaylistDialog::slotOk()
if( !TQFileInfo( result ).exists() ||
KMessageBox::warningContinueCancel(
PlaylistWindow::self(),
i18n( "A playlist named \"%1\" already exists. Do you want to overwrite it?" ).tqarg( edit->text() ),
i18n( "A playlist named \"%1\" already exists. Do you want to overwrite it?" ).arg( edit->text() ),
i18n( "Overwrite Playlist?" ), i18n( "Overwrite" ) ) == KMessageBox::Continue )
{
KDialogBase::slotOk();
@ -3151,7 +3169,7 @@ InfoPane::InfoPane( TQWidget *parent )
connect( m_pushButton, TQT_SIGNAL(toggled( bool )), TQT_SLOT(toggle( bool )) );
//Set the height to fixed. The button shouldn't be resized.
setFixedHeight( m_pushButton->tqsizeHint().height() );
setFixedHeight( m_pushButton->sizeHint().height() );
}
InfoPane::~InfoPane()
@ -3190,7 +3208,7 @@ InfoPane::toggle( bool toggled )
setStoredHeight( splitter->sizes().last() );
//Set the height to fixed. The button shouldn't be resized.
setFixedHeight( m_pushButton->tqsizeHint().height() );
setFixedHeight( m_pushButton->sizeHint().height() );
//Now the info pane is not shown, we can disable the button if necessary
m_pushButton->setEnabled( m_enable );
@ -3243,7 +3261,7 @@ InfoPane::setInfo( const TQString &title, const TQString &info )
"</td>"
"</tr>"
"</table>"
"</div>" ).tqarg( title, info_ ) :
"</div>" ).arg( title, info_ ) :
TQString() );
}

@ -514,7 +514,7 @@ PlaylistCategory::showContextMenu( const TQPoint &position )
break;
}
name = i18n("Folder");
if( c ) name = i18n("Folder %1").tqarg(c);
if( c ) name = i18n("Folder %1").arg(c);
if( tracker == firstChild() && !isCategory( tracker ) ) tracker = 0;
newFolder = new PlaylistCategory( this, tracker, name, true );
@ -642,7 +642,7 @@ void PlaylistEntry::load()
startAnimation();
connect( &m_animationTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAnimation()) );
//delete all tqchildren, so that we don't duplicate things
//delete all children, so that we don't duplicate things
while( firstChild() )
delete firstChild();
@ -791,7 +791,7 @@ void PlaylistEntry::customEvent( TQCustomEvent *e )
/**
* We destroy the tracks on collapsing the entry. However, if we are using dynamic mode, then we leave them
* because adding from a custom list is problematic if the entry has no tqchildren. Using load() is not effective
* because adding from a custom list is problematic if the entry has no children. Using load() is not effective
* since this is a threaded operation and would require pulling apart the entire class to make it work.
*/
@ -814,7 +814,7 @@ void PlaylistEntry::setOpen( bool open )
}
else if( !isDynamic() || !m_dynamic ) { //collapse
//delete all tqchildren
//delete all children
while( firstChild() )
delete firstChild();
@ -855,10 +855,10 @@ void PlaylistEntry::updateInfo()
TQString str = "<html><body><table width=\"100%\" border=\"0\">";
str += body.tqarg( i18n( "Playlist" ), text(0) );
str += body.tqarg( i18n( "Number of tracks" ), TQString::number(m_trackCount) );
str += body.tqarg( i18n( "Length" ), MetaBundle::prettyTime( m_length ) );
str += body.tqarg( i18n( "Location" ), m_url.prettyURL() );
str += body.arg( i18n( "Playlist" ), text(0) );
str += body.arg( i18n( "Number of tracks" ), TQString::number(m_trackCount) );
str += body.arg( i18n( "Length" ), MetaBundle::prettyTime( m_length ) );
str += body.arg( i18n( "Location" ), m_url.prettyURL() );
str += "</table></body></html>";
PlaylistBrowser::instance()->setInfo( text(0), str );
@ -875,11 +875,12 @@ void PlaylistEntry::showContextMenu( const TQPoint &position )
{
KPopupMenu menu( listView() );
enum Id { LOAD, APPEND, TQUEUE, RENAME, DELETE, MEDIADEVICE_COPY, MEDIADEVICE_SYNC };
enum Id { LOAD, PLAY, APPEND, QUEUE, RENAME, DELETE, MEDIADEVICE_COPY, MEDIADEVICE_SYNC };
menu.insertItem( SmallIconSet( Amarok::icon( "files" ) ), i18n( "&Load" ), LOAD );
menu.insertItem( SmallIconSet( Amarok::icon( "files" ) ), i18n( "Load and &Play" ), PLAY );
menu.insertItem( SmallIconSet( Amarok::icon( "add_playlist" ) ), i18n( "&Append to Playlist" ), APPEND );
menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), i18n( "&Queue Tracks" ), TQUEUE );
menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), i18n( "&Queue Tracks" ), QUEUE );
if( MediaBrowser::isAvailable() )
{
@ -893,12 +894,16 @@ void PlaylistEntry::showContextMenu( const TQPoint &position )
menu.insertSeparator();
menu.insertItem( SmallIconSet( Amarok::icon("edit") ), i18n( "&Rename" ), RENAME );
menu.insertItem( SmallIconSet( Amarok::icon("remove_from_playlist") ), i18n( "&Delete" ), DELETE );
menu.setAccel( Key_L, LOAD );
menu.setAccel( Key_F2, RENAME );
menu.setAccel( Key_Enter, LOAD );
menu.setAccel( SHIFT+Key_Enter, PLAY );
menu.setAccel( SHIFT+Key_F2, RENAME );
menu.setAccel( SHIFT+Key_Delete, DELETE );
switch( menu.exec( position ) )
{
case PLAY:
PlaylistEntry::slotDoubleClicked();
break;
case LOAD:
Playlist::instance()->clear();
Playlist::instance()->setPlaylistName( text(0), true );
@ -906,7 +911,7 @@ void PlaylistEntry::showContextMenu( const TQPoint &position )
case APPEND:
PlaylistBrowser::instance()->addSelectedToPlaylist( Playlist::Append );
break;
case TQUEUE:
case QUEUE:
PlaylistBrowser::instance()->addSelectedToPlaylist( Playlist::Queue );
break;
case RENAME:
@ -1065,7 +1070,7 @@ PlaylistTrackItem::PlaylistTrackItem( TQListViewItem *parent, TQListViewItem *af
if( p && p->text( 0 ).contains( info->artist() ) )
setText( 0, info->title() );
else
setText( 0, i18n("%1 - %2").tqarg( info->artist(), info->title() ) );
setText( 0, i18n("%1 - %2").arg( info->artist(), info->title() ) );
}
const KURL &PlaylistTrackItem::url()
@ -1082,11 +1087,11 @@ void PlaylistTrackItem::slotDoubleClicked()
void PlaylistTrackItem::showContextMenu( const TQPoint &position )
{
KPopupMenu menu( listView() );
enum Actions { LOAD, APPEND, TQUEUE, BURN, REMOVE, INFO };
enum Actions { LOAD, APPEND, QUEUE, BURN, REMOVE, INFO };
menu.insertItem( SmallIconSet( Amarok::icon( "files" ) ), i18n( "&Load" ), LOAD );
menu.insertItem( SmallIconSet( Amarok::icon( "add_playlist" ) ), i18n( "&Append to Playlist" ), APPEND );
menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), i18n( "&Queue Track" ), TQUEUE );
menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), i18n( "&Queue Track" ), QUEUE );
menu.insertSeparator();
@ -1105,7 +1110,7 @@ void PlaylistTrackItem::showContextMenu( const TQPoint &position )
case APPEND:
PlaylistBrowser::instance()->addSelectedToPlaylist( Playlist::Append );
break;
case TQUEUE:
case QUEUE:
PlaylistBrowser::instance()->addSelectedToPlaylist( Playlist::Queue );
break;
case BURN:
@ -1121,7 +1126,7 @@ void PlaylistTrackItem::showContextMenu( const TQPoint &position )
TagDialog* dialog = new TagDialog( url() );
dialog->show();
}
else KMessageBox::sorry( PlaylistBrowser::instance(), i18n( "This file does not exist: %1" ).tqarg( url().path() ) );
else KMessageBox::sorry( PlaylistBrowser::instance(), i18n( "This file does not exist: %1" ).arg( url().path() ) );
}
}
@ -1212,7 +1217,7 @@ void StreamEntry::updateInfo()
TQString str = "<html><body><table width=\"100%\" border=\"0\">";
str += body.tqarg( i18n( "URL" ), m_url.prettyURL() );
str += body.arg( i18n( "URL" ), m_url.prettyURL() );
str += "</table></body></html>";
PlaylistBrowser::instance()->setInfo( text(0), str );
@ -1291,11 +1296,11 @@ void
StreamEntry::showContextMenu( const TQPoint &position )
{
KPopupMenu menu( listView() );
enum Actions { LOAD, APPEND, TQUEUE, EDIT, REMOVE };
enum Actions { LOAD, APPEND, QUEUE, EDIT, REMOVE };
menu.insertItem( SmallIconSet( Amarok::icon( "files" ) ), i18n( "&Load" ), LOAD );
menu.insertItem( SmallIconSet( Amarok::icon( "add_playlist" ) ), i18n( "&Append to Playlist" ), APPEND );
menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), i18n( "&Queue Tracks" ), TQUEUE );
menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), i18n( "&Queue Tracks" ), QUEUE );
menu.insertSeparator();
// Forbid editing non removable items
@ -1316,7 +1321,7 @@ StreamEntry::showContextMenu( const TQPoint &position )
case APPEND:
PlaylistBrowser::instance()->addSelectedToPlaylist( Playlist::Append );
break;
case TQUEUE:
case QUEUE:
PlaylistBrowser::instance()->addSelectedToPlaylist( Playlist::Queue );
break;
case EDIT:
@ -2057,7 +2062,7 @@ PodcastChannel::episodeExists( const TQDomNode &xml, const int feedType )
if( !guid.isEmpty() )
{
command = TQString("SELECT id FROM podcastepisodes WHERE parent='%1' AND guid='%2';")
.tqarg( CollectionDB::instance()->escapeString( url().url() ),
.arg( CollectionDB::instance()->escapeString( url().url() ),
CollectionDB::instance()->escapeString( guid ) );
TQStringList values = CollectionDB::instance()->query( command );
return !values.isEmpty();
@ -2066,7 +2071,7 @@ PodcastChannel::episodeExists( const TQDomNode &xml, const int feedType )
TQString episodeTitle = xml.namedItem( "title" ).toElement().text();
KURL episodeURL = xml.namedItem( "enclosure" ).toElement().attribute( "url" );
command = TQString("SELECT id FROM podcastepisodes WHERE parent='%1' AND url='%2' AND title='%3';")
.tqarg( CollectionDB::instance()->escapeString( url().url() ),
.arg( CollectionDB::instance()->escapeString( url().url() ),
CollectionDB::instance()->escapeString( episodeURL.url() ),
CollectionDB::instance()->escapeString( episodeTitle ) );
TQStringList values = CollectionDB::instance()->query( command );
@ -2080,7 +2085,7 @@ PodcastChannel::episodeExists( const TQDomNode &xml, const int feedType )
if( !guid.isEmpty() )
{
command = TQString("SELECT id FROM podcastepisodes WHERE parent='%1' AND guid='%2';")
.tqarg( CollectionDB::instance()->escapeString( url().url() ),
.arg( CollectionDB::instance()->escapeString( url().url() ),
CollectionDB::instance()->escapeString( guid ) );
TQStringList values = CollectionDB::instance()->query( command );
return !values.isEmpty();
@ -2099,7 +2104,7 @@ PodcastChannel::episodeExists( const TQDomNode &xml, const int feedType )
}
command = TQString("SELECT id FROM podcastepisodes WHERE parent='%1' AND url='%2' AND title='%3';")
.tqarg( CollectionDB::instance()->escapeString( url().url() ),
.arg( CollectionDB::instance()->escapeString( url().url() ),
CollectionDB::instance()->escapeString( episodeURL ),
CollectionDB::instance()->escapeString( episodeTitle ) );
TQStringList values = CollectionDB::instance()->query( command );
@ -2136,15 +2141,15 @@ PodcastChannel::updateInfo()
TQString str = "<html><body><table width=\"100%\" border=\"0\">";
str += body.tqarg( i18n( "Description" ), description() );
str += body.tqarg( i18n( "Website" ), link().prettyURL() );
str += body.tqarg( i18n( "Copyright" ), copyright() );
str += body.tqarg( i18n( "URL" ), m_url.prettyURL() );
str += body.arg( i18n( "Description" ), description() );
str += body.arg( i18n( "Website" ), link().prettyURL() );
str += body.arg( i18n( "Copyright" ), copyright() );
str += body.arg( i18n( "URL" ), m_url.prettyURL() );
str += "</table>";
str += i18n( "<p>&nbsp;<b>Episodes</b></p><ul>" );
for( TQListViewItem *c = firstChild(); c; c = c->nextSibling() )
{
str += TQString("<li>%1</li>").tqarg( static_cast<PodcastEpisode*>(c)->title() );
str += TQString("<li>%1</li>").arg( static_cast<PodcastEpisode*>(c)->title() );
}
str += "</ul></body></html>";
@ -2299,11 +2304,11 @@ PodcastChannel::showContextMenu( const TQPoint &position )
{
KPopupMenu menu( listView() );
enum Actions { LOAD, APPEND, TQUEUE, DELETE, RESCAN, LISTENED, NEW, CONFIG };
enum Actions { LOAD, APPEND, QUEUE, DELETE, RESCAN, LISTENED, NEW, CONFIG };
menu.insertItem( SmallIconSet( Amarok::icon( "files" ) ), i18n( "&Load" ), LOAD );
menu.insertItem( SmallIconSet( Amarok::icon( "add_playlist" ) ), i18n( "&Append to Playlist" ), APPEND );
menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), i18n( "&Queue Tracks" ), TQUEUE );
menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), i18n( "&Queue Tracks" ), QUEUE );
menu.insertSeparator();
menu.insertItem( SmallIconSet( Amarok::icon( "remove" ) ), i18n( "&Delete" ), DELETE );
menu.insertItem( SmallIconSet( Amarok::icon( "refresh" ) ), i18n( "&Check for Updates" ), RESCAN );
@ -2323,7 +2328,7 @@ PodcastChannel::showContextMenu( const TQPoint &position )
PlaylistBrowser::instance()->addSelectedToPlaylist( Playlist::Append );
break;
case TQUEUE:
case QUEUE:
PlaylistBrowser::instance()->addSelectedToPlaylist( Playlist::Queue );
break;
@ -2352,7 +2357,7 @@ PodcastChannel::showContextMenu( const TQPoint &position )
/////////////////////////////////////////////////////////////////////////////
/// CLASS PodcastEpisode
/// @note we fucking hate itunes for taking over podcasts and inserting
/// @note we hate itunes for taking over podcasts and inserting
/// their own attributes.
////////////////////////////////////////////////////////////////////////////
PodcastEpisode::PodcastEpisode( TQListViewItem *parent, TQListViewItem *after,
@ -2565,7 +2570,7 @@ PodcastEpisode::downloadMedia()
Amarok::StatusBar::instance()->newProgressOperation( m_podcastEpisodeJob )
.setDescription( title().isEmpty()
? i18n( "Downloading Podcast Media" )
: i18n( "Downloading Podcast \"%1\"" ).tqarg( title() ) )
: i18n( "Downloading Podcast \"%1\"" ).arg( title() ) )
.setAbortSlot( this, TQT_SLOT( abortDownload()) )
.setProgressSignal( m_podcastEpisodeJob, TQT_SIGNAL( percent( KIO::Job *, unsigned long ) ) );
@ -2794,13 +2799,13 @@ PodcastEpisode::updateInfo()
TQString str = "<html><body><table width=\"100%\" border=\"0\">";
//str += body.tqarg( i18n( "Title" ), m_bundle.title() );
str += body.tqarg( i18n( "Description" ), m_bundle.description() );
str += body.tqarg( i18n( "Date" ), m_bundle.date() );
str += body.tqarg( i18n( "Author" ), m_bundle.author() );
str += body.tqarg( i18n( "Type" ), m_bundle.type() );
str += body.tqarg( i18n( "URL" ), m_bundle.url().prettyURL() );
str += body.tqarg( i18n( "Local URL" ), isOnDisk() ? localUrl().prettyURL() : i18n( "n/a" ) );
//str += body.arg( i18n( "Title" ), m_bundle.title() );
str += body.arg( i18n( "Description" ), m_bundle.description() );
str += body.arg( i18n( "Date" ), m_bundle.date() );
str += body.arg( i18n( "Author" ), m_bundle.author() );
str += body.arg( i18n( "Type" ), m_bundle.type() );
str += body.arg( i18n( "URL" ), m_bundle.url().prettyURL() );
str += body.arg( i18n( "Local URL" ), isOnDisk() ? localUrl().prettyURL() : i18n( "n/a" ) );
str += "</table></body></html>";
PlaylistBrowser::instance()->setInfo( text(0), str );
@ -2826,10 +2831,10 @@ PodcastEpisode::showContextMenu( const TQPoint &position )
{
KPopupMenu menu( listView() );
enum Actions { LOAD, APPEND, TQUEUE, GET, ASSOCIATE, DELETE, MEDIA_DEVICE, LISTENED, NEW, OPEN_WITH /* has to be last */ };
enum Actions { LOAD, APPEND, QUEUE, GET, ASSOCIATE, DELETE, MEDIA_DEVICE, LISTENED, NEW, OPEN_WITH /* has to be last */ };
menu.insertItem( SmallIconSet( Amarok::icon( "files" ) ), i18n( "&Load" ), LOAD );
menu.insertItem( SmallIconSet( Amarok::icon( "add_playlist" ) ), i18n( "&Append to Playlist" ), APPEND );
menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), i18n( "&Queue Track" ), TQUEUE );
menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), i18n( "&Queue Track" ), QUEUE );
int accuracy = 0;
KMimeType::Ptr mimetype;
@ -2891,7 +2896,7 @@ PodcastEpisode::showContextMenu( const TQPoint &position )
PlaylistBrowser::instance()->addSelectedToPlaylist( Playlist::Append );
break;
case TQUEUE:
case QUEUE:
PlaylistBrowser::instance()->addSelectedToPlaylist( Playlist::Queue );
break;
@ -2977,7 +2982,7 @@ class AssociatePodcastDialog : public KDialogBase
public:
AssociatePodcastDialog( PodcastEpisode *item )
: KDialogBase( Amarok::mainWindow(), "associatepodcastdialog", true, i18n("Select Local File for %1").tqarg(item->title()), Ok|Cancel, Ok, false )
: KDialogBase( Amarok::mainWindow(), "associatepodcastdialog", true, i18n("Select Local File for %1").arg(item->title()), Ok|Cancel, Ok, false )
{
TQVBox* vbox = makeVBoxMainWidget();
vbox->setSpacing( KDialog::spacingHint() );
@ -3069,7 +3074,7 @@ void SmartPlaylist::setXml( const TQDomElement &xml )
static TQStringList years;
static TQStringList labels;
//Delete all tqchildren before
//Delete all children before
while( firstChild() )
delete firstChild();
@ -3086,7 +3091,7 @@ void SmartPlaylist::setXml( const TQDomElement &xml )
genres = CollectionDB::instance()->genreList();
}
foreach( genres ) {
m_after = new SmartPlaylist( item, m_after, i18n( "%1" ).tqarg( *it ),
m_after = new SmartPlaylist( item, m_after, i18n( "%1" ).arg( *it ),
TQString(queryChildren).replace(
"(*ExpandString*)", *it) );
}
@ -3096,7 +3101,7 @@ void SmartPlaylist::setXml( const TQDomElement &xml )
artists = CollectionDB::instance()->artistList();
}
foreach( artists ) {
m_after = new SmartPlaylist( item, m_after, i18n( "By %1" ).tqarg( *it ),
m_after = new SmartPlaylist( item, m_after, i18n( "By %1" ).arg( *it ),
TQString(queryChildren).replace(
"(*ExpandString*)", *it) );
}
@ -3106,7 +3111,7 @@ void SmartPlaylist::setXml( const TQDomElement &xml )
composers = CollectionDB::instance()->composerList();
}
foreach( composers ) {
m_after = new SmartPlaylist( item, m_after, i18n( "By %1" ).tqarg( *it ),
m_after = new SmartPlaylist( item, m_after, i18n( "By %1" ).arg( *it ),
TQString(queryChildren).replace(
"(*ExpandString*)", *it) );
}
@ -3116,7 +3121,7 @@ void SmartPlaylist::setXml( const TQDomElement &xml )
albums = CollectionDB::instance()->albumList();
}
foreach( albums ) {
m_after = new SmartPlaylist( item, m_after, i18n( "%1" ).tqarg( *it ),
m_after = new SmartPlaylist( item, m_after, i18n( "%1" ).arg( *it ),
TQString(queryChildren).replace(
"(*ExpandString*)", *it) );
}
@ -3126,7 +3131,7 @@ void SmartPlaylist::setXml( const TQDomElement &xml )
years = CollectionDB::instance()->yearList();
}
foreach( years ) {
m_after = new SmartPlaylist( item, m_after, i18n( "%1" ).tqarg( *it ),
m_after = new SmartPlaylist( item, m_after, i18n( "%1" ).arg( *it ),
TQString(queryChildren).replace(
"(*ExpandString*)", *it) );
}
@ -3136,7 +3141,7 @@ void SmartPlaylist::setXml( const TQDomElement &xml )
labels = CollectionDB::instance()->labelList();
}
foreach( labels ) {
m_after = new SmartPlaylist( item, m_after, i18n( "%1" ).tqarg( *it ), TQString(queryChildren).replace("(*ExpandString*)", *it) );
m_after = new SmartPlaylist( item, m_after, i18n( "%1" ).arg( *it ), TQString(queryChildren).replace("(*ExpandString*)", *it) );
}
}
}
@ -3147,9 +3152,9 @@ TQString SmartPlaylist::query()
{
if ( m_sqlForTags.isEmpty() ) m_sqlForTags = xmlToQuery( m_xml );
// duplicate string, thread-safely (TQDeepCopy is not thread-safe)
return TQString( m_sqlForTags.tqunicode(), m_sqlForTags.length() )
return TQString( m_sqlForTags.unicode(), m_sqlForTags.length() )
.replace( "(*CurrentTimeT*)" ,
TQString::number(TQDateTime::tqcurrentDateTime().toTime_t()) )
TQString::number(TQDateTime::currentDateTime().toTime_t()) )
.replace( "(*ListOfFields*)" , QueryBuilder::dragSQLFields() )
.replace( "(*MountedDeviceSelection*)" ,
CollectionDB::instance()->deviceidSelection() );
@ -3328,8 +3333,8 @@ SmartPlaylist::xmlToQuery(const TQDomElement &xml, bool forExpand /* = false */)
// expand by, if needed
if ( forExpand ) {
// TODO: The most efficient way would be to pass the tqchildren the XML
// and what to expand by, then have the tqchildren compute the query as needed.
// TODO: The most efficient way would be to pass the children the XML
// and what to expand by, then have the children compute the query as needed.
// This could save a few megs of RAM for queries, but this patch is getting
// too big already, right now. Ovy
TQDomNodeList expandbyList = xml.elementsByTagName( "expandby" );
@ -3394,11 +3399,11 @@ void SmartPlaylist::showContextMenu( const TQPoint &position )
{
KPopupMenu menu( listView() );
enum Actions { LOAD, ADD, TQUEUE, EDIT, REMOVE, MEDIADEVICE_COPY, MEDIADEVICE_SYNC };
enum Actions { LOAD, ADD, QUEUE, EDIT, REMOVE, MEDIADEVICE_COPY, MEDIADEVICE_SYNC };
menu.insertItem( SmallIconSet( Amarok::icon( "files" ) ), i18n( "&Load" ), LOAD );
menu.insertItem( SmallIconSet( Amarok::icon( "add_playlist" ) ), i18n( "&Append to Playlist" ), ADD );
menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), i18n( "&Queue Tracks" ), TQUEUE );
menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), i18n( "&Queue Tracks" ), QUEUE );
if( MediaBrowser::isAvailable() )
{
menu.insertSeparator();
@ -3426,7 +3431,7 @@ void SmartPlaylist::showContextMenu( const TQPoint &position )
case ADD:
Playlist::instance()->insertMediaSql( query(), Playlist::Append );
break;
case TQUEUE:
case QUEUE:
Playlist::instance()->insertMediaSql( query(), Playlist::Queue );
break;
case EDIT:

@ -163,7 +163,7 @@ class PlaylistEntry : public PlaylistBrowserEntry
PlaylistEntry( TQListViewItem *parent, TQListViewItem *after, const TQDomElement &xmlDefinition );
~PlaylistEntry();
void sortChildItems ( int /*column*/, bool /*ascending*/ ) { /* Don't sort its tqchildren */ }; //reimplemented
void sortChildItems ( int /*column*/, bool /*ascending*/ ) { /* Don't sort its children */ }; //reimplemented
void load();
@ -361,13 +361,13 @@ class PodcastChannel : public PlaylistBrowserEntry
void setNew( const bool n = true );
bool hasNew() const { return m_new; }
// iterate over all tqchildren and explicitly check if there are any episodes which have not been listened
// iterate over all children and explicitly check if there are any episodes which have not been listened
// to. Mark the channel as new/listened after doing this.
void checkAndSetNew();
void setListened( const bool n = true ); // over rides each child so it has been listened
void setOpen( bool open ); // if !m_polished, load the tqchildren. Lazy loading to improve start times
void setOpen( bool open ); // if !m_polished, load the children. Lazy loading to improve start times
void load();
const bool isPolished() const { return m_polished; }
@ -555,7 +555,7 @@ class SmartPlaylist : public PlaylistBrowserEntry
bool m_dynamic;
// Build the query for a given xml object. If \p for expand is true,
// insert (*ExpandString*) as placeholders for tqchildrens' filters
// insert (*ExpandString*) as placeholders for childrens' filters
static TQString xmlToQuery( const TQDomElement &xml, bool forExpand = false );
};

@ -42,8 +42,10 @@
#include <kfilemetainfo.h>
#include <kglobal.h>
#include <kiconeffect.h>
#include <kimageeffect.h>
#include <kstandarddirs.h>
#include <kstringhandler.h>
#include <kapplication.h>
#include "playlistitem.h"
@ -384,7 +386,7 @@ void PlaylistItem::update() const
void PlaylistItem::updateColumn( int column ) const
{
const TQRect r = listView()->tqitemRect( this );
const TQRect r = listView()->itemRect( this );
if( !r.isValid() )
return;
@ -507,9 +509,9 @@ PlaylistItem::compare( TQListViewItem *i, int col, bool ascending ) const
return compare( i, Album, ascending );
else
{
if( a.tqstartsWith( "the ", false ) )
if( a.startsWith( "the ", false ) )
a = a.mid( 4 );
if( b.tqstartsWith( "the ", false ) )
if( b.startsWith( "the ", false ) )
b = b.mid( 4 );
}
break;
@ -575,7 +577,7 @@ void PlaylistItem::paintCell( TQPainter *painter, const TQColorGroup &cg, int co
s_pixmapChanged = false;
}
// Determine if we need to tqrepaint the pixmap, or paint from cache
// Determine if we need to repaint the pixmap, or paint from cache
if ( paintCache[column].map.find( colorKey ) == paintCache[column].map.end() )
{
// Update painting cache
@ -588,7 +590,7 @@ void PlaylistItem::paintCell( TQPainter *painter, const TQColorGroup &cg, int co
TQColor bg;
if( isSelected() )
bg = listView()->tqcolorGroup().highlight();
bg = listView()->colorGroup().highlight();
else
bg = isAlternate() ? listView()->alternateBackground() :
listView()->viewport()->backgroundColor();
@ -596,7 +598,7 @@ void PlaylistItem::paintCell( TQPainter *painter, const TQColorGroup &cg, int co
buf.fill( bg );
// Draw column divider line
p.setPen( listView()->viewport()->tqcolorGroup().mid() );
p.setPen( listView()->viewport()->colorGroup().mid() );
p.drawLine( width - 1, 0, width - 1, height() - 1 );
// Here we draw the background bar graphics for the current track:
@ -690,8 +692,8 @@ void PlaylistItem::paintCell( TQPainter *painter, const TQColorGroup &cg, int co
else
{
const TQColorGroup _cg = ( !exists() || !isEnabled() )
? listView()->tqpalette().disabled()
: listView()->tqpalette().active();
? listView()->palette().disabled()
: listView()->palette().active();
TQColor bg = isSelected() ? _cg.highlight()
: isAlternate() ? listView()->alternateBackground()
@ -724,7 +726,7 @@ void PlaylistItem::paintCell( TQPainter *painter, const TQColorGroup &cg, int co
// Draw column divider line
if( !isSelected() )
{
p.setPen( listView()->viewport()->tqcolorGroup().mid() );
p.setPen( listView()->viewport()->colorGroup().mid() );
p.drawLine( width - 1, 0, width - 1, height() - 1 );
}
@ -934,7 +936,7 @@ void PlaylistItem::moodbarJobEvent( int newState )
{
(void) newState; // want to redraw nomatter what the new state is
if( AmarokConfig::showMoodbar() )
tqrepaint();
repaint();
// Don't automatically resort because it's annoying
}
@ -986,6 +988,10 @@ void PlaylistItem::imageTransparency( TQImage& image, float factor ) //static
c = data[i]; // Memory access is slow, so do it only once
data[i] = tqRgba( tqRed( c ), tqGreen( c ), tqBlue( c ), table[tqAlpha( c )] );
}
if (kapp->isX11CompositionAvailable()) {
image = KImageEffect::convertToPremultipliedAlpha(image);
}
}
AtomicString PlaylistItem::artist_album() const

@ -94,7 +94,7 @@ UrlLoader::UrlLoader( const KURL::List &urls, TQListViewItem *after, int options
Amarok::StatusBar::instance()->newProgressOperation( this )
.setDescription( m_description )
.settqStatus( i18n("Preparing") )
.setStatus( i18n("Preparing") )
.setAbortSlot( this, TQT_SLOT(abort()) )
.setTotalSteps( 100 );
@ -324,9 +324,9 @@ UrlLoader::completeJob()
for ( uint it = 0; it < m_badURLs.count(); it++ )
{
if( it < 5 )
text += TQString("<br>%1").tqarg( m_badURLs[it].prettyURL() );
text += TQString("<br>%1").arg( m_badURLs[it].prettyURL() );
else if( it == 5 )
text += TQString("<br>Plus %1 more").tqarg( m_badURLs.count() - it );
text += TQString("<br>Plus %1 more").arg( m_badURLs.count() - it );
debug() << "\t" << m_badURLs[it] << endl;
}
@ -479,7 +479,7 @@ UrlLoader::loadXml( const KURL &url )
}
}
void UrlLoader::slotNewBundle( const MetaBundle &bundle, const XmlAttributeList &atts )
void UrlLoader::slotNewBundle( const MetaBundle& bundle, const XmlAttributeList& atts )
{
XMLData data;
data.bundle = TQDeepCopy<MetaBundle>( bundle );

@ -129,7 +129,7 @@ protected:
void loadXml( const KURL& );
private slots:
void slotNewBundle( const MetaBundle &bundle, const XmlAttributeList &attributes );
void slotNewBundle( const MetaBundle& bundle, const XmlAttributeList& attributes );
void slotPlaylistInfo( const TQString &product, const TQString &version, const TQString &dynamicMode );
private:
@ -199,7 +199,7 @@ private slots:
void abort() { delete this; }
};
// PRIVATE -- should be in the .cpp, but fucking tqmoc.
// PRIVATE -- should be in the .cpp, but moc.
class MyXmlLoader: public MetaBundle::XmlLoader
{

@ -82,7 +82,7 @@ namespace ConfigDynamic
NewDynamic* nd = new NewDynamic( dialog, "new dynamic");
//TQSizePolicy policy;
//policy.setHorData(TQSizePolicy::Maximum);
//dialog->tqsetSizePolicy(policy);
//dialog->setSizePolicy(policy);
dialog->setMainWidget( nd );
return dialog;
}
@ -123,7 +123,7 @@ namespace ConfigDynamic
else //if its a suggested song or a random mix...
{
nd->selectPlaylist->hide();
nd->tqlayout()->remove( nd->selectPlaylist );
nd->layout()->remove( nd->selectPlaylist );
// don't allow editing the name of the default random and suggested dynamics
nd->m_name->hide();
nd->m_playlistName_label->hide();
@ -138,7 +138,7 @@ namespace ConfigDynamic
}
nd->updateGeometry();
dialog->resize( nd->tqminimumSizeHint() );
dialog->resize( nd->minimumSizeHint() );
if( dialog->exec() == TQDialog::Accepted )
{

@ -23,9 +23,9 @@ class PlaylistSelection : public KListView
TQ_OBJECT
public:
PlaylistSelection(TQWidget* parent, const char* name);
virtual TQSize tqsizeHint() const
virtual TQSize sizeHint() const
{
return tqminimumSizeHint();
return minimumSizeHint();
}
private:

@ -227,7 +227,7 @@ PlaylistWindow::PlaylistWindow()
new Amarok::BurnMenuAction( ac );
if( AmarokConfig::playlistWindowSize().isValid() ) {
// if first ever run, use tqsizeHint(), and let
// if first ever run, use sizeHint(), and let
// KWin place us otherwise use the stored values
resize( AmarokConfig::playlistWindowSize() );
move( AmarokConfig::playlistWindowPos() );
@ -258,7 +258,7 @@ void PlaylistWindow::init()
m_browsers = new BrowserBar( this );
//<Dynamic Mode tqStatus Bar />
//<Dynamic Mode Status Bar />
DynamicBar *dynamicBar = new DynamicBar( m_browsers->container());
TQFrame *playlist;
@ -282,7 +282,7 @@ void PlaylistWindow::init()
filter_label->setBuddy( m_lineEdit );
bar->setStretchableWidget( m_lineEdit );
KPushButton *filterButton = new KPushButton("...", bar, "filter");
filterButton->tqsetSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed );
filterButton->setSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed );
m_lineEdit->setFrame( TQFrame::Sunken );
m_lineEdit->installEventFilter( this ); //we intercept keyEvents
@ -368,7 +368,7 @@ void PlaylistWindow::init()
m_toolsMenu->insertItem( SmallIconSet( Amarok::icon( "covermanager" ) ), i18n("&Cover Manager"), Amarok::Menu::ID_SHOW_COVER_MANAGER );
actionCollection()->action("queue_manager")->plug( m_toolsMenu );
m_toolsMenu->insertItem( SmallIconSet( Amarok::icon( "visualizations" ) ), i18n("&Visualizations"), Amarok::Menu::ID_SHOW_VIS_SELECTOR );
m_toolsMenu->insertItem( SmallIconSet( Amarok::icon( "equalizer") ), i18n("&Equalizer"), TQT_TQOBJECT(kapp), TQT_SLOT( slotConfigEqualizer() ), 0, Amarok::Menu::ID_CONFIGURE_ETQUALIZER );
m_toolsMenu->insertItem( SmallIconSet( Amarok::icon( "equalizer") ), i18n("&Equalizer"), TQT_TQOBJECT(kapp), TQT_SLOT( slotConfigEqualizer() ), 0, Amarok::Menu::ID_CONFIGURE_EQUALIZER );
actionCollection()->action("script_manager")->plug( m_toolsMenu );
actionCollection()->action("statistics")->plug( m_toolsMenu );
m_toolsMenu->insertSeparator();
@ -408,7 +408,7 @@ void PlaylistWindow::init()
connect( m_settingsMenu, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotMenuActivated(int) ) );
//END Settings menu
m_menubar->insertItem( i18n( "E&ngage" ), actionsMenu );
m_menubar->insertItem( i18n( "&File" ), actionsMenu );
m_menubar->insertItem( i18n( "&Playlist" ), playlistMenu );
m_menubar->insertItem( i18n( "&Mode" ), modeMenu );
m_menubar->insertItem( i18n( "&Tools" ), m_toolsMenu );
@ -419,7 +419,7 @@ void PlaylistWindow::init()
TQBoxLayout *layV = new TQVBoxLayout( this );
layV->addWidget( m_menubar );
layV->addWidget( m_browsers, 1 );
layV->addWidget( m_toolbar );
// layV->addWidget( m_toolbar );
layV->addSpacing( 2 );
layV->addWidget( statusbar );
@ -562,7 +562,7 @@ void PlaylistWindow::createGUI()
//TEXT ON RIGHT HACK
//KToolBarButtons have independent settings for their appearance.
//KToolBarButton::modeChange() causes that button to set its mode to that of its parent KToolBar
//KToolBar::setIconText() calls modeChange() for tqchildren, unless 2nd param is false
//KToolBar::setIconText() calls modeChange() for children, unless 2nd param is false
TQStringList list;
list << "toolbutton_playlist_add"
@ -641,7 +641,7 @@ bool PlaylistWindow::eventFilter( TQObject *o, TQEvent *e )
#define e TQT_TQKEYEVENT(e)
if( e->key() == Key_F2 )
if(( e->key() == Key_F2 ) && (e->state() == 0))
{
// currentItem is ALWAYS visible.
TQListViewItem *item = pl->currentItem();
@ -819,7 +819,7 @@ void PlaylistWindow::showEvent( TQShowEvent* )
}
#include <tqdesktopwidget.h>
TQSize PlaylistWindow::tqsizeHint() const
TQSize PlaylistWindow::sizeHint() const
{
return TQApplication::desktop()->screenGeometry( (TQWidget*)this ).size() / 1.5;
}
@ -856,7 +856,7 @@ void PlaylistWindow::savePlaylist() const //SLOT
}
if( useArtist && useAlbum )
title = i18n("%1 - %2").tqarg( artist, album );
title = i18n("%1 - %2").arg( artist, album );
else if( useArtist )
title = artist;
else if( useAlbum )
@ -922,7 +922,7 @@ void PlaylistWindow::playLastfmPersonal() //SLOT
if( !LastFm::Controller::checkCredentials() ) return;
const KURL url( TQString( "lastfm://user/%1/personal" )
.tqarg( AmarokConfig::scrobblerUsername() ) );
.arg( AmarokConfig::scrobblerUsername() ) );
Playlist::instance()->insertMedia( url, Playlist::Append|Playlist::DirectPlay );
}
@ -933,7 +933,7 @@ void PlaylistWindow::addLastfmPersonal() //SLOT
if( !LastFm::Controller::checkCredentials() ) return;
const KURL url( TQString( "lastfm://user/%1/personal" )
.tqarg( AmarokConfig::scrobblerUsername() ) );
.arg( AmarokConfig::scrobblerUsername() ) );
Playlist::instance()->insertMedia( url );
}
@ -944,7 +944,7 @@ void PlaylistWindow::playLastfmNeighbor() //SLOT
if( !LastFm::Controller::checkCredentials() ) return;
const KURL url( TQString( "lastfm://user/%1/neighbours" )
.tqarg( AmarokConfig::scrobblerUsername() ) );
.arg( AmarokConfig::scrobblerUsername() ) );
Playlist::instance()->insertMedia( url, Playlist::Append|Playlist::DirectPlay );
}
@ -955,7 +955,7 @@ void PlaylistWindow::addLastfmNeighbor() //SLOT
if( !LastFm::Controller::checkCredentials() ) return;
const KURL url( TQString( "lastfm://user/%1/neighbours" )
.tqarg( AmarokConfig::scrobblerUsername() ) );
.arg( AmarokConfig::scrobblerUsername() ) );
Playlist::instance()->insertMedia( url );
}
@ -1093,7 +1093,7 @@ void PlaylistWindow::actionsMenuAboutToShow() //SLOT
void PlaylistWindow::toolsMenuAboutToShow() //SLOT
{
m_toolsMenu->setItemEnabled( Amarok::Menu::ID_CONFIGURE_ETQUALIZER, EngineController::hasEngineProperty( "HasEqualizer" ) );
m_toolsMenu->setItemEnabled( Amarok::Menu::ID_CONFIGURE_EQUALIZER, EngineController::hasEngineProperty( "HasEqualizer" ) );
m_toolsMenu->setItemEnabled( Amarok::Menu::ID_RESCAN_COLLECTION, !ThreadManager::instance()->isJobPending( "CollectionScanner" ) );
}
@ -1248,10 +1248,10 @@ void DynamicTitle::setTitle(const TQString& newTitle)
void DynamicTitle::paintEvent(TQPaintEvent* /*e*/)
{
TQPainter p;
p.tqbegin( this, false );
TQPen pen( tqcolorGroup().highlightedText(), 0, TQt::NoPen );
p.begin( this, false );
TQPen pen( colorGroup().highlightedText(), 0, TQt::NoPen );
p.setPen( pen );
p.setBrush( tqcolorGroup().highlight() );
p.setBrush( colorGroup().highlight() );
p.setFont(m_font);
TQFontMetrics fm(m_font);
@ -1266,7 +1266,7 @@ void DynamicTitle::paintEvent(TQPaintEvent* /*e*/)
p.drawEllipse( 0, yStart, s_curveWidth * 2, textHeight);
p.drawEllipse( s_curveWidth + textWidth + s_imageSize, yStart, s_curveWidth*2, textHeight);
p.fillRect( s_curveWidth, yStart, textWidth + s_imageSize + s_curveWidth, textHeight
, TQBrush( tqcolorGroup().highlight()) );
, TQBrush( colorGroup().highlight()) );
p.drawPixmap( s_curveWidth, yStart + ((textHeight - s_imageSize) /2), SmallIcon("dynamic") );
//not sure why first arg of Rect shouldn't add @curveWidth
p.drawText( TQRect(s_imageSize, yStart, s_curveWidth + textWidth +s_imageSize, textHeight), TQt::AlignCenter, m_title);

@ -100,7 +100,7 @@ class PlaylistWindow : public TQWidget, public KXMLGUIClient
protected:
virtual void closeEvent( TQCloseEvent* );
virtual void showEvent( TQShowEvent* );
virtual TQSize tqsizeHint() const;
virtual TQSize sizeHint() const;
private:
enum MenuId { ID_SHOW_TOOLBAR = 2000, ID_SHOW_PLAYERWINDOW };

@ -95,8 +95,8 @@ PluginManager::createFromService( const KService::Ptr service )
if ( !lib ) {
KMessageBox::error( 0, i18n( "<p>KLibLoader could not load the plugin:<br/><i>%1</i></p>"
"<p>Error message:<br/><i>%2</i></p>" )
.tqarg( service->library() )
.tqarg( loader->lastErrorMessage() ) );
.arg( service->library() )
.arg( loader->lastErrorMessage() ) );
return 0;
}
//look up address of init function and cast it to pointer-to-function
@ -174,12 +174,12 @@ PluginManager::showAbout( const TQString &constraint )
TQString str = "<html><body><table width=\"100%\" border=\"1\">";
str += body.tqarg( i18n( "Name" ), s->name() );
str += body.tqarg( i18n( "Library" ), s->library() );
str += body.tqarg( i18n( "Authors" ), s->property( "X-KDE-Amarok-authors" ).toStringList().join( "\n" ) );
str += body.tqarg( i18n( "Email" ), s->property( "X-KDE-Amarok-email" ).toStringList().join( "\n" ) );
str += body.tqarg( i18n( "Version" ), s->property( "X-KDE-Amarok-version" ).toString() );
str += body.tqarg( i18n( "Framework Version" ), s->property( "X-KDE-Amarok-framework-version" ).toString() );
str += body.arg( i18n( "Name" ), s->name() );
str += body.arg( i18n( "Library" ), s->library() );
str += body.arg( i18n( "Authors" ), s->property( "X-KDE-Amarok-authors" ).toStringList().join( "\n" ) );
str += body.arg( i18n( "Email" ), s->property( "X-KDE-Amarok-email" ).toStringList().join( "\n" ) );
str += body.arg( i18n( "Version" ), s->property( "X-KDE-Amarok-version" ).toString() );
str += body.arg( i18n( "Framework Version" ), s->property( "X-KDE-Amarok-framework-version" ).toString() );
str += "</table></body></html>";

@ -63,7 +63,7 @@ PodcastSettings::PodcastSettings( const TQString &title, const TQString &save, c
}
PodcastSettingsDialog::PodcastSettingsDialog( PodcastSettings *settings, TQWidget* parent )
: KDialogBase( parent, 0, true, i18n("change options", "Configure %1").tqarg( settings->m_title )
: KDialogBase( parent, 0, true, i18n("change options", "Configure %1").arg( settings->m_title )
, KDialogBase::User1|KDialogBase::Ok|KDialogBase::Cancel
, KDialogBase::Ok, true
, KGuiItem(i18n("Reset"), "reset" ) )
@ -74,7 +74,7 @@ PodcastSettingsDialog::PodcastSettingsDialog( PodcastSettings *settings, TQWidge
}
PodcastSettingsDialog::PodcastSettingsDialog( const TQPtrList<PodcastSettings> &list, const TQString &caption, TQWidget* parent )
: KDialogBase( parent, 0, true, i18n("change options", "Configure %1").tqarg( caption )
: KDialogBase( parent, 0, true, i18n("change options", "Configure %1").arg( caption )
, KDialogBase::User1|KDialogBase::Ok|KDialogBase::Cancel
, KDialogBase::Ok, true
, KGuiItem(i18n("Reset"), "reset" ) )

@ -116,7 +116,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>111</width>
<height>21</height>
@ -185,7 +185,7 @@
<property name="sizeType">
<enum>MinimumExpanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>5</height>

@ -65,7 +65,7 @@ PrettyPopupMenu::generateSidePixmap()
TQRect
PrettyPopupMenu::sideImageRect() const
{
return TQStyle::tqvisualRect( TQRect( frameWidth(), frameWidth(), s_sidePixmap.width(),
return TQStyle::visualRect( TQRect( frameWidth(), frameWidth(), s_sidePixmap.width(),
height() - 2*frameWidth() ), this );
}
@ -74,9 +74,9 @@ PrettyPopupMenu::calcPixmapColor()
{
KConfig *config = KGlobal::config();
config->setGroup("WM");
TQColor color = TQApplication::tqpalette().active().highlight();
// TQColor activeTitle = TQApplication::tqpalette().active().background();
// TQColor inactiveTitle = TQApplication::tqpalette().inactive().background();
TQColor color = TQApplication::palette().active().highlight();
// TQColor activeTitle = TQApplication::palette().active().background();
// TQColor inactiveTitle = TQApplication::palette().inactive().background();
TQColor activeTitle = config->readColorEntry("activeBackground", &color);
TQColor inactiveTitle = config->readColorEntry("inactiveBackground", &color);
@ -84,7 +84,7 @@ PrettyPopupMenu::calcPixmapColor()
int h1, s1, v1, h2, s2, v2, h3, s3, v3;
activeTitle.hsv(&h1, &s1, &v1);
inactiveTitle.hsv(&h2, &s2, &v2);
TQApplication::tqpalette().active().background().hsv(&h3, &s3, &v3);
TQApplication::palette().active().background().hsv(&h3, &s3, &v3);
if ( (kAbs(h1-h3)+kAbs(s1-s3)+kAbs(v1-v3) < kAbs(h2-h3)+kAbs(s2-s3)+kAbs(v2-v3)) &&
((kAbs(h1-h3)+kAbs(s1-s3)+kAbs(v1-v3) < 32) || (s1 < 32)) && (s2 > s1))
@ -138,14 +138,14 @@ void PrettyPopupMenu::resizeEvent(TQResizeEvent * e)
{
KPopupMenu::resizeEvent( e );
setFrameRect( TQStyle::tqvisualRect( TQRect( s_sidePixmap.width(), 0,
setFrameRect( TQStyle::visualRect( TQRect( s_sidePixmap.width(), 0,
width() - s_sidePixmap.width(), height() ), this ) );
}
//Workaround TQt3.3.x sizing bug, by ensuring we're always wide enough.
void PrettyPopupMenu::resize( int width, int height )
{
width = kMax(width, tqmaximumSize().width());
width = kMax(width, maximumSize().width());
KPopupMenu::resize(width, height);
}
@ -174,9 +174,9 @@ PrettyPopupMenu::paintEvent( TQPaintEvent* e )
drawContents( &p );
tqstyle().tqdrawPrimitive( TQStyle::PE_PanelPopup, &p,
style().tqdrawPrimitive( TQStyle::PE_PanelPopup, &p,
TQRect( 0, 0, width(), height() ),
tqcolorGroup(), TQStyle::Style_Default,
colorGroup(), TQStyle::Style_Default,
TQStyleOption( frameWidth(), 0 ) );
}

@ -21,7 +21,7 @@ public:
QStringx( TQChar ch ) : TQString( ch ) {};
QStringx( const TQString& s ) : TQString( s ) {};
QStringx( const TQByteArray& ba ) : TQString( ba ) {};
QStringx( const TQChar* tqunicode, uint length ) : TQString( tqunicode, length ) {};
QStringx( const TQChar* unicode, uint length ) : TQString( unicode, length ) {};
QStringx( const char* str ) : TQString( str ) {};
virtual ~QStringx() {};

@ -105,9 +105,9 @@ QueueList::viewportPaintEvent( TQPaintEvent *e )
const uint x = (viewport()->width() - w - 30) / 2 ;
const uint y = (viewport()->height() - h - 30) / 2 ;
p.setBrush( tqcolorGroup().background() );
p.setBrush( colorGroup().background() );
p.drawRoundRect( x, y, w+30, h+30, (8*200)/w, (8*200)/h );
t.draw( &p, x+15, y+15, TQRect(), tqcolorGroup() );
t.draw( &p, x+15, y+15, TQRect(), colorGroup() );
}
}
@ -373,7 +373,7 @@ QueueManager::addItems( TQListViewItem *after )
if( current.find( item ) == current.end() ) //avoid duplication
{
TQString title = i18n("%1 - %2").tqarg( item->artist(), item->title() );
TQString title = i18n("%1 - %2").arg( item->artist(), item->title() );
after = new QueueItem( m_listview, after, title );
m_map[ after ] = item;
@ -416,7 +416,7 @@ QueueManager::addQueuedItem( PlaylistItem *item )
TQValueList<PlaylistItem*> current = m_map.values();
TQValueListIterator<PlaylistItem*> newItem = current.find( item );
TQString title = i18n("%1 - %2").tqarg( item->artist(), item->title() );
TQString title = i18n("%1 - %2").arg( item->artist(), item->title() );
if( newItem == current.end() ) //avoid duplication
{
@ -434,7 +434,7 @@ QueueManager::removeQueuedItem( PlaylistItem *item )
TQValueList<PlaylistItem*> current = m_map.values();
TQValueListIterator<PlaylistItem*> newItem = current.find( item );
TQString title = i18n("%1 - %2").tqarg( item->artist(), item->title() );
TQString title = i18n("%1 - %2").arg( item->artist(), item->title() );
TQListViewItem *removableItem = m_listview->findItem( title, 0 );
@ -478,7 +478,7 @@ QueueManager::insertItems()
for( PlaylistItem *item = list.first(); item; item = list.next() )
{
TQString title = i18n("%1 - %2").tqarg( item->artist(), item->title() );
TQString title = i18n("%1 - %2").arg( item->artist(), item->title() );
last = new QueueItem( m_listview, last, title );
m_map[ last ] = item;

@ -11,8 +11,8 @@
* *
***************************************************************************/
#ifndef AMAROK_TQUEUEMANAGER_H
#define AMAROK_TQUEUEMANAGER_H
#ifndef AMAROK_QUEUEMANAGER_H
#define AMAROK_QUEUEMANAGER_H
#include "playlistitem.h"
@ -105,4 +105,4 @@ class QueueManager : public KDialogBase
static QueueManager *s_instance;
};
#endif /* AMAROK_TQUEUEMANAGER_H */
#endif /* AMAROK_QUEUEMANAGER_H */

@ -52,9 +52,9 @@ RefreshImages::RefreshImages()
TQString url =
TQString("http://webservices.amazon.%1/onca/xml?Service=AWSECommerceService&SubscriptionId=%2&Operation=ItemLookup&ItemId=%3&ResponseGroup=Small,Images")
.tqarg(localeToTLD(locale))
.tqarg("0RTQSQ0B8CRY7VX2VF3G2") //Ian Monroe
.tqarg(asin);
.arg(localeToTLD(locale))
.arg("0RTQSQ0B8CRY7VX2VF3G2") //Ian Monroe
.arg(asin);
debug() << url << endl;

@ -189,7 +189,7 @@ ScanController::initIncremental()
const TQStringList values = CollectionDB::instance()->query(
TQString( "SELECT deviceid, dir, changedate FROM directories WHERE deviceid IN (%1);" )
.tqarg( deviceIds ) );
.arg( deviceIds ) );
foreach( values )
{

@ -88,7 +88,7 @@ namespace Amarok {
TQString proxy;
if ( KProtocolManager::proxyForURL( kurl ) !=
TQString::tqfromLatin1( "DIRECT" ) ) {
TQString::fromLatin1( "DIRECT" ) ) {
KProtocolManager::slaveProtocol ( kurl, proxy );
}
@ -199,9 +199,9 @@ ScriptManager::ScriptManager( TQWidget *parent, const char *name )
m_gui->configureButton->setIconSet( SmallIconSet( Amarok::icon( "configure" ) ) );
m_gui->aboutButton ->setIconSet( SmallIconSet( Amarok::icon( "info" ) ) );
TQSize sz = tqsizeHint();
TQSize sz = sizeHint();
setMinimumSize( kMax( 350, sz.width() ), kMax( 250, sz.height() ) );
resize( tqsizeHint() );
resize( sizeHint() );
connect( this, TQT_SIGNAL(lyricsScriptChanged()), ContextBrowser::instance(), TQT_SLOT( lyricsScriptChanged() ) );
@ -339,12 +339,12 @@ ScriptManager::requestNewScore( const TQString &url, double prevscore, int playc
m_scripts[script].process->writeStdin(
TQString( "requestNewScore %6 %1 %2 %3 %4 %5" )
.tqarg( prevscore )
.tqarg( playcount )
.tqarg( length )
.tqarg( percentage )
.tqarg( reason )
.tqarg( KURL::encode_string( url ) ) ); //last because it might have %s
.arg( prevscore )
.arg( playcount )
.arg( length )
.arg( percentage )
.arg( reason )
.arg( KURL::encode_string( url ) ) ); //last because it might have %s
}
////////////////////////////////////////////////////////////////////////////////
@ -435,7 +435,7 @@ ScriptManager::slotInstallScript( const TQString& path )
const TQString scriptFolder = destination + archiveDir->entries().first();
if( TQFile::exists( scriptFolder ) ) {
KMessageBox::error( 0, i18n( "A script with the name '%1' is already installed. "
"Please uninstall it first." ).tqarg( archiveDir->entries().first() ) );
"Please uninstall it first." ).arg( archiveDir->entries().first() ) );
return false;
}
@ -512,7 +512,7 @@ ScriptManager::slotUninstallScript()
{
const TQString name = m_gui->listView->currentItem()->text( 0 );
if( KMessageBox::warningContinueCancel( 0, i18n( "Are you sure you want to uninstall the script '%1'?" ).tqarg( name ), i18n("Uninstall Script"), i18n("Uninstall") ) == KMessageBox::Cancel )
if( KMessageBox::warningContinueCancel( 0, i18n( "Are you sure you want to uninstall the script '%1'?" ).arg( name ), i18n("Uninstall Script"), i18n("Uninstall") ) == KMessageBox::Cancel )
return;
if( m_scripts.find( name ) == m_scripts.end() )
@ -610,7 +610,7 @@ ScriptManager::slotRunScript( bool silent )
{
if( !silent )
KMessageBox::sorry( 0, i18n( "<p>Could not start the script <i>%1</i>.</p>"
"<p>Please make sure that the file has execute (+x) permissions.</p>" ).tqarg( name ) );
"<p>Please make sure that the file has execute (+x) permissions.</p>" ).arg( name ) );
delete script;
return false;
}
@ -674,11 +674,11 @@ ScriptManager::slotAboutScript()
TQString(),
KDialogBase::Ok, KDialogBase::Ok, this );
kapp->setTopWidget( about );
about->setCaption( kapp->makeStdCaption( i18n( "About %1" ).tqarg( name ) ) );
about->setCaption( kapp->makeStdCaption( i18n( "About %1" ).arg( name ) ) );
about->setProduct( "", "", "", "" );
// Get rid of the confusing KDE version text
TQLabel* product = static_cast<TQLabel*>( TQT_TQWIDGET(about->mainWidget()->child( "version" )) );
if( product ) product->setText( i18n( "%1 Amarok Script" ).tqarg( name ) );
if( product ) product->setText( i18n( "%1 Amarok Script" ).arg( name ) );
about->addTextPage( i18n( "About" ), readme.readAll(), true );
if( license.open( IO_ReadOnly ) )
@ -726,7 +726,7 @@ ScriptManager::slotShowContextMenu( TQListViewItem* item, const TQPoint& pos )
KTextEdit* editor = new KTextEdit( it.data().log );
kapp->setTopWidget( editor );
editor->setCaption( kapp->makeStdCaption( i18n( "Output Log for %1" ).tqarg( it.key() ) ) );
editor->setCaption( kapp->makeStdCaption( i18n( "Output Log for %1" ).arg( it.key() ) ) );
editor->setReadOnly( true );
TQFont font( "fixed" );
@ -746,7 +746,7 @@ ScriptManager::slotShowContextMenu( TQListViewItem* item, const TQPoint& pos )
void
ScriptManager::slotReceivedStdout( KProcess*, char* buf, int len )
{
debug() << TQString::tqfromLatin1( buf, len ) << endl;
debug() << TQString::fromLatin1( buf, len ) << endl;
}
@ -759,7 +759,7 @@ ScriptManager::slotReceivedStderr( KProcess* process, char* buf, int len )
for( it = m_scripts.begin(); it != end; ++it )
if( it.data().process == process ) break;
const TQString text = TQString::tqfromLatin1( buf, len );
const TQString text = TQString::fromLatin1( buf, len );
error() << it.key() << ":\n" << text << endl;
if( it.data().log.length() > 20000 )
@ -780,7 +780,7 @@ ScriptManager::scriptFinished( KProcess* process ) //SLOT
// Check if there was an error on exit
if( process->normalExit() && process->exitStatus() != 0 )
KMessageBox::detailedError( 0, i18n( "The script '%1' exited with error code: %2" )
.tqarg( it.key() ).tqarg( process->exitStatus() )
.arg( it.key() ).arg( process->exitStatus() )
,it.data().log );
// Destroy script process

@ -48,7 +48,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>30</height>

@ -135,11 +135,11 @@ cp -a $WORK/amarok.livecd/* $WORK/amarok.live/
umount $WORK/amarok.livecd/
rmdir $WORK/amarok.livecd
mkdir $WORK/amarok.live/home/amarok/.kde/share/apps/amarok/playlists
chown 500:500 $WORK/amarok.live/home/amarok/.kde/share/apps/amarok/playlists
find $WORK/amarok.live/home/amarok/.kde/share/apps/ -type d -print0 | xargs -0 chmod +x
mkdir $WORK/amarok.live/home/amarok/.trinity/share/apps/amarok/playlists
chown 500:500 $WORK/amarok.live/home/amarok/.trinity/share/apps/amarok/playlists
find $WORK/amarok.live/home/amarok/.trinity/share/apps/ -type d -print0 | xargs -0 chmod +x
chmod -R 777 $WORK/amarok.live/music/
chmod -R 777 $WORK/amarok.live/home/amarok/.kde/share/apps/amarok
chmod -R 777 $WORK/amarok.live/home/amarok/.trinity/share/apps/amarok
#chmod -R 777 $WORK/mklivecd/
dcop --all-users amarok playlist popupMessage "Copying done. To add music to the Amarok livecd, select the tracks you wish to add in the playlist, and select \"Add to livecd\" from the right click menu. Please do not add more than about 380 mb, as then the resulting ISO will be too large to fit on a CD-ROM. Once you are done, select Create Remastered CD. Enjoy!"

@ -268,7 +268,7 @@ class Remasterer( QApplication ):
self.dia = ConfigDialog()
path, iso = self.dia.readConfig()
os.system("rm -rf %s/amarok.live/music/* %s/amarok.live/playlist/* %s/amarok.live/home/amarok/.kde/share/apps/amarok/current.xml" % (path, path, path))
os.system("rm -rf %s/amarok.live/music/* %s/amarok.live/playlist/* %s/amarok.live/home/amarok/.trinity/share/apps/amarok/current.xml" % (path, path, path))
def onSignal( self, signum, stackframe ):
stop()
@ -326,7 +326,7 @@ class Remasterer( QApplication ):
import random
suffix = random.randint(0,10000)
# os.system("mkdir %s/amarok.live/home/amarok/.kde/share/apps/amarok/playlists/" % path)
# os.system("mkdir %s/amarok.live/home/amarok/.trinity/share/apps/amarok/playlists/" % path)
m3uOut = open("/tmp/amarok.live.%s.m3u" % suffix, 'w')
m3u = m3u.strip()

@ -56,7 +56,7 @@ case database
filename = getFilename( filename )
dest = destination + "/" + filename
puts dest
`cp ~/.kde/share/apps/amarok/collection.db #{dest}`
`cp ~/.trinity/share/apps/amarok/collection.db #{dest}`
when "1" # mysql
filename = "amarokdb.mysql"

@ -38,36 +38,36 @@ class DatabaseScriptChooser < Qt::Dialog
@Form1Layout = Qt::GridLayout.new(self, 1, 1, 2, 2, 'Form1Layout')
@tqlayout3 = Qt::VBoxLayout.new(nil, 0, 2, 'tqlayout3')
@layout3 = Qt::VBoxLayout.new(nil, 0, 2, 'layout3')
@m_optionCombo = Qt::ComboBox.new(false, self, "m_optionCombo")
@tqlayout3.addWidget(@m_optionCombo)
@layout3.addWidget(@m_optionCombo)
@tqlayout1 = Qt::HBoxLayout.new(nil, 0, 2, 'tqlayout1')
@layout1 = Qt::HBoxLayout.new(nil, 0, 2, 'layout1')
@m_saveText = Qt::Label.new(self, "m_saveText")
@tqlayout1.addWidget(@m_saveText)
@layout1.addWidget(@m_saveText)
@m_saveDir = KDE::URLRequester.new(self, "m_saveDir")
@m_saveDir.setMode( KDE::File::Directory | KDE::File::ExistingOnly );
@m_saveDir.setURL( ENV["HOME"] )
@tqlayout1.addWidget(@m_saveDir)
@tqlayout3.addLayout(@tqlayout1)
@layout1.addWidget(@m_saveDir)
@layout3.addLayout(@layout1)
@spacer1 = Qt::SpacerItem.new(20, 21, Qt::SizePolicy::Minimum, Qt::SizePolicy::Expanding)
@tqlayout3.addItem(@spacer1)
@layout3.addItem(@spacer1)
@tqlayout2 = Qt::HBoxLayout.new(nil, 0, 2, 'tqlayout2')
@layout2 = Qt::HBoxLayout.new(nil, 0, 2, 'layout2')
@m_cancelButton = Qt::PushButton.new(self, "@m_cancelButton")
@tqlayout2.addWidget(@m_cancelButton)
@layout2.addWidget(@m_cancelButton)
@spacer2 = Qt::SpacerItem.new(61, 20, Qt::SizePolicy::Expanding, Qt::SizePolicy::Minimum)
@tqlayout2.addItem(@spacer2)
@layout2.addItem(@spacer2)
@m_okayButton = Qt::PushButton.new(self, "m_okayButton")
@tqlayout2.addWidget(@m_okayButton)
@tqlayout3.addLayout(@tqlayout2)
@layout2.addWidget(@m_okayButton)
@layout3.addLayout(@layout2)
connect( @m_optionCombo, SIGNAL( "activated(int)" ), self, SLOT( "optionChanged(int)" ) );
connect( @m_okayButton, SIGNAL( "clicked()" ), self, SLOT( "accept()" ) )
@ -76,10 +76,10 @@ class DatabaseScriptChooser < Qt::Dialog
connect( @m_saveDir, SIGNAL( "textChanged(const QString &)" ),
self, SLOT( "textChanged(const QString &)" ) );
@Form1Layout.addLayout(@tqlayout3, 0, 0)
@Form1Layout.addLayout(@layout3, 0, 0)
languageChange()
resize( Qt::Size.new(356, 137).expandedTo(tqminimumSizeHint()) )
resize( Qt::Size.new(356, 137).expandedTo(minimumSizeHint()) )
clearWState( WState_Polished )
end

@ -74,7 +74,7 @@ loop do
end
md5sum = MD5.hexdigest( "#{artist.downcase()}#{album.downcase()}" )
imagefolder = "#{ENV['HOME']}/.kde/share/apps/amarok/albumcovers/large/"
imagefolder = "#{ENV['HOME']}/.trinity/share/apps/amarok/albumcovers/large/"
image = "#{imagefolder}#{md5sum}"
puts( "Imagepath: #{image}" )

@ -54,7 +54,7 @@
</widget>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout7</cstring>
<cstring>layout7</cstring>
</property>
<property name="geometry">
<rect>
@ -70,7 +70,7 @@
</property>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout3</cstring>
<cstring>layout3</cstring>
</property>
<vbox>
<property name="name">
@ -78,7 +78,7 @@
</property>
<widget class="TQLayoutWidget">
<property name="name">
<cstring>tqlayout2</cstring>
<cstring>layout2</cstring>
</property>
<hbox>
<property name="name">
@ -94,7 +94,7 @@
<property name="sizeType">
<enum>Maximum</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
@ -125,7 +125,7 @@
<property name="sizeType">
<enum>Maximum</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
@ -148,13 +148,13 @@
<property name="name">
<cstring>canvasView</cstring>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>404</width>
<height>200</height>
</size>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>404</width>
<height>200</height>

@ -4,8 +4,8 @@
*/
#ifndef _ETQUALIZERCANVASVIEW_H_
#define _ETQUALIZERCANVASVIEW_H_
#ifndef _EQUALIZERCANVASVIEW_H_
#define _EQUALIZERCANVASVIEW_H_
#ifdef HAVE_CONFIG_H
#include <config.h>
@ -81,4 +81,4 @@ private:
EqualizerCanvasView* m_canvasView;
};
#endif // _ETQUALIZERCANVASVIEW_H_
#endif // _EQUALIZERCANVASVIEW_H_

@ -17,8 +17,8 @@
* Free Software Foundation, Inc., *
* 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef ETQUALIZERDIALOG_H
#define ETQUALIZERDIALOG_H
#ifndef EQUALIZERDIALOG_H
#define EQUALIZERDIALOG_H
#include <tqdialog.h>

@ -75,7 +75,7 @@ end
def fetchLyricsByUrl( url )
# Note: Using telnet here cause the fucking site has a broken cgi script, delivering
# Note: Using telnet here because the site has a broken cgi script, delivering
# a broken header, which makes Net::HTTP::get() crap out
host = "display.lyrics.astraweb.com"

@ -6,7 +6,7 @@ from xml.dom import minidom
# the current.xml file
PLAYLISTFILE = "%s/.kde/share/apps/amarok/current.xml"%(user.home)
PLAYLISTFILE = "%s/.trinity/share/apps/amarok/current.xml"%(user.home)
# the fields to be shown via http
FIELDS = ("Artist", "Title", "Album", "Track", "Length", "Genre", "Score" )

@ -18,7 +18,7 @@ import string
import Globals
# the current.xml file
PLAYLISTFILE = "%s/.kde/share/apps/amarok/current.xml"%(user.home)
PLAYLISTFILE = "%s/.trinity/share/apps/amarok/current.xml"%(user.home)
# the fields to be shown via http
FIELDS = ("TrackNo", "Title", "Artist", "Album", "Length", "Rating")

@ -28,11 +28,11 @@ PLIST = None
REQ_IDS = {}
#
# Holding current AmaroktqStatus. A bunch of init_XXX functions in
# Holding current AmarokStatus. A bunch of init_XXX functions in
# order to begin dcop requests as early as possible to avoid too
# much latency
#
class AmaroktqStatus:
class AmarokStatus:
EngineEmpty = 1
EngineIdle = 2
@ -90,19 +90,19 @@ class RequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
our server."""
def _amarokPlay(self):
AmaroktqStatus.playState = AmaroktqStatus.EnginePlay
AmarokStatus.playState = AmarokStatus.EnginePlay
Globals._dcopCallPlayer("play")
def _amarokPause(self):
AmaroktqStatus.playState = AmaroktqStatus.EnginePause
AmarokStatus.playState = AmarokStatus.EnginePause
Globals._dcopCallPlayer("pause")
def _amarokNext(self):
Globals._dcopCallPlayer("next")
def _amarokGoto(self,index):
AmaroktqStatus.playState = AmaroktqStatus.EnginePlay
AmaroktqStatus.currentTrackIndex = int(index)
AmarokStatus.playState = AmarokStatus.EnginePlay
AmarokStatus.currentTrackIndex = int(index)
Globals._dcopCallPlaylistArg("playByIndex",index)
def _amarokPrev(self):
@ -110,7 +110,7 @@ class RequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def _amarokStop(self):
Globals._dcopCallPlayer("stop")
AmaroktqStatus.playState = AmaroktqStatus.EngineStop
AmarokStatus.playState = AmarokStatus.EngineStop
def _amarokSetVolume(self, val):
Globals._dcopCallPlayerArg("setVolume",val)
@ -165,8 +165,8 @@ class RequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
self._amarokSetVolume(qmap["value"])
return 1
def _amaroktqStatus(self):
status = AmaroktqStatus()
def _amarokStatus(self):
status = AmarokStatus()
return status
def _sendFile(self, path):
@ -219,7 +219,7 @@ class RequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
qmap = self._parseQueryVars()
session_id, last_req_id = self._getSessionInfo(qmap)
if AmaroktqStatus.allowControl and self._handleAction(qmap):
if AmarokStatus.allowControl and self._handleAction(qmap):
last_req_id = last_req_id + 1
REQ_IDS[session_id] = last_req_id
@ -242,7 +242,7 @@ class RequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
self.end_headers()
self._sendFile(self.path)
else:
status = self._amaroktqStatus()
status = self._amarokStatus()
status.dcop_volume.init()
status.dcop_trackcurrenttime.init()
status.dcop_tracktotaltime.init()

@ -60,8 +60,8 @@ class ConfigDialog( QDialog ):
self.config = ConfigParser.ConfigParser()
allowControl = RequestHandler.AmaroktqStatus.allowControl
publish = RequestHandler.AmaroktqStatus.publish
allowControl = RequestHandler.AmarokStatus.allowControl
publish = RequestHandler.AmarokStatus.publish
try:
config = ConfigParser.ConfigParser()
config.read( "webcontrolrc" )
@ -159,8 +159,8 @@ class WebControl( QApplication ):
config.read( "webcontrolrc" )
try:
RequestHandler.AmaroktqStatus.allowControl = string.find(config.get( "General", "allowcontrol" ), "True") >= 0
RequestHandler.AmaroktqStatus.publish = string.find(config.get( "General", "publish" ), "True") >= 0
RequestHandler.AmarokStatus.allowControl = string.find(config.get( "General", "allowcontrol" ), "True") >= 0
RequestHandler.AmarokStatus.publish = string.find(config.get( "General", "publish" ), "True") >= 0
except:
debug( "No config file found, using defaults." )
@ -170,7 +170,7 @@ class WebControl( QApplication ):
self.zeroconfPublishing()
def zeroconfPublishing( self ):
if RequestHandler.AmaroktqStatus.publish:
if RequestHandler.AmarokStatus.publish:
if not publisher.active:
threading.Thread(target = publisher.run).start()
else:
@ -234,32 +234,32 @@ class WebControl( QApplication ):
def engineStatePlay( self ):
""" Called when Engine state changes to Play """
RequestHandler.AmaroktqStatus.dcop_trackcurrenttime = Globals.PlayerDcop("trackCurrentTime")
RequestHandler.AmaroktqStatus.dcop_trackcurrenttime.result()
RequestHandler.AmaroktqStatus.dcop_tracktotaltime = Globals.PlayerDcop("trackTotalTime")
RequestHandler.AmaroktqStatus.dcop_tracktotaltime.result()
RequestHandler.AmaroktqStatus.playState = RequestHandler.AmaroktqStatus.EnginePlay
RequestHandler.AmarokStatus.dcop_trackcurrenttime = Globals.PlayerDcop("trackCurrentTime")
RequestHandler.AmarokStatus.dcop_trackcurrenttime.result()
RequestHandler.AmarokStatus.dcop_tracktotaltime = Globals.PlayerDcop("trackTotalTime")
RequestHandler.AmarokStatus.dcop_tracktotaltime.result()
RequestHandler.AmarokStatus.playState = RequestHandler.AmarokStatus.EnginePlay
def engineStateIdle( self ):
""" Called when Engine state changes to Idle """
RequestHandler.AmaroktqStatus.playState = RequestHandler.AmaroktqStatus.EngineIdle
RequestHandler.AmarokStatus.playState = RequestHandler.AmarokStatus.EngineIdle
def engineStatePause( self ):
""" Called when Engine state changes to Pause """
RequestHandler.AmaroktqStatus.playState = RequestHandler.AmaroktqStatus.EnginePause
RequestHandler.AmarokStatus.playState = RequestHandler.AmarokStatus.EnginePause
def engineStateEmpty( self ):
""" Called when Engine state changes to Empty """
RequestHandler.AmaroktqStatus.playState = RequestHandler.AmaroktqStatus.EngineEmpty
RequestHandler.AmarokStatus.playState = RequestHandler.AmarokStatus.EngineEmpty
def trackChange( self ):
""" Called when a new track starts """
RequestHandler.AmaroktqStatus.dcop_trackcurrentindex = Globals.PlaylistDcop("getActiveIndex")
RequestHandler.AmaroktqStatus.dcop_trackcurrentindex.result()
RequestHandler.AmaroktqStatus.dcop_trackcurrenttime = Globals.PlayerDcop("trackCurrentTime")
RequestHandler.AmaroktqStatus.dcop_trackcurrenttime.result()
RequestHandler.AmaroktqStatus.dcop_tracktotaltime = Globals.PlayerDcop("trackTotalTime")
RequestHandler.AmaroktqStatus.dcop_tracktotaltime.result()
RequestHandler.AmarokStatus.dcop_trackcurrentindex = Globals.PlaylistDcop("getActiveIndex")
RequestHandler.AmarokStatus.dcop_trackcurrentindex.result()
RequestHandler.AmarokStatus.dcop_trackcurrenttime = Globals.PlayerDcop("trackCurrentTime")
RequestHandler.AmarokStatus.dcop_trackcurrenttime.result()
RequestHandler.AmarokStatus.dcop_tracktotaltime = Globals.PlayerDcop("trackTotalTime")
RequestHandler.AmarokStatus.dcop_tracktotaltime.result()

@ -270,7 +270,7 @@ SubmitItem::SubmitItem(
m_album = album;
m_title = title;
m_length = length;
m_playStartTime = now ? TQDateTime::tqcurrentDateTime( Qt::UTC ).toTime_t() : 0;
m_playStartTime = now ? TQDateTime::currentDateTime( Qt::UTC ).toTime_t() : 0;
}
@ -422,7 +422,7 @@ ScrobblerSubmitter::~ScrobblerSubmitter()
void ScrobblerSubmitter::performHandshake()
{
TQString handshakeUrl = TQString();
uint currentTime = TQDateTime::tqcurrentDateTime( Qt::UTC ).toTime_t();
uint currentTime = TQDateTime::currentDateTime( Qt::UTC ).toTime_t();
if ( PROTOCOL_VERSION == "1.1" )
{
@ -439,10 +439,10 @@ void ScrobblerSubmitter::performHandshake()
"&c=%2"
"&v=%3"
"&u=%4" )
.tqarg( PROTOCOL_VERSION )
.tqarg( CLIENT_ID )
.tqarg( CLIENT_VERSION )
.tqarg( m_username );
.arg( PROTOCOL_VERSION )
.arg( CLIENT_ID )
.arg( CLIENT_VERSION )
.arg( m_username );
}
else if ( PROTOCOL_VERSION == "1.2" )
@ -464,12 +464,12 @@ void ScrobblerSubmitter::performHandshake()
"&u=%4"
"&t=%5"
"&a=%6" )
.tqarg( PROTOCOL_VERSION )
.tqarg( CLIENT_ID )
.tqarg( CLIENT_VERSION )
.tqarg( m_username )
.tqarg( currentTime )
.tqarg( KMD5( KMD5( m_password.utf8() ).hexDigest() +
.arg( PROTOCOL_VERSION )
.arg( CLIENT_ID )
.arg( CLIENT_VERSION )
.arg( m_username )
.arg( currentTime )
.arg( KMD5( KMD5( m_password.utf8() ).hexDigest() +
currentTime ).hexDigest().data() );
}
@ -665,7 +665,7 @@ void ScrobblerSubmitter::scheduledTimeReached()
*/
void ScrobblerSubmitter::audioScrobblerHandshakeResult( KIO::Job* job ) //SLOT
{
m_prevSubmitTime = TQDateTime::tqcurrentDateTime( Qt::UTC ).toTime_t();
m_prevSubmitTime = TQDateTime::currentDateTime( Qt::UTC ).toTime_t();
m_inProgress = false;
if ( job->error() ) {
@ -745,7 +745,7 @@ void ScrobblerSubmitter::audioScrobblerHandshakeResult( KIO::Job* job ) //SLOT
*/
void ScrobblerSubmitter::audioScrobblerSubmitResult( KIO::Job* job ) //SLOT
{
m_prevSubmitTime = TQDateTime::tqcurrentDateTime( Qt::UTC ).toTime_t();
m_prevSubmitTime = TQDateTime::currentDateTime( Qt::UTC ).toTime_t();
m_inProgress = false;
if ( job->error() ) {
@ -891,7 +891,7 @@ SubmitItem* ScrobblerSubmitter::dequeueItem()
SubmitItem* item = 0;
if( m_lastSubmissionFinishTime > 0 && !m_holdFakeQueue && m_fakeQueue.getFirst() )
{
uint limit = TQDateTime::tqcurrentDateTime( Qt::UTC ).toTime_t();
uint limit = TQDateTime::currentDateTime( Qt::UTC ).toTime_t();
if ( m_submitQueue.getFirst() )
if ( m_submitQueue.getFirst()->playStartTime() <= limit )
@ -1000,7 +1000,7 @@ void ScrobblerSubmitter::announceSubmit( SubmitItem *item, int tracks, bool succ
if ( success )
{
if ( tracks == 1 )
_short = i18n( "'%1' submitted to last.fm" ).tqarg( item->title() );
_short = i18n( "'%1' submitted to last.fm" ).arg( item->title() );
else
{
_short = i18n( "Several tracks submitted to last.fm" );
@ -1008,20 +1008,20 @@ void ScrobblerSubmitter::announceSubmit( SubmitItem *item, int tracks, bool succ
_long = "<p>";
_long = i18n( "'%1' and one other track submitted",
"'%1' and %n other tracks submitted", tracks-1 )
.tqarg( item->title() );
.arg( item->title() );
}
}
else
{
if ( tracks == 1 )
_short = i18n( "Failed to submit '%1' to last.fm" ).tqarg( item->title() );
_short = i18n( "Failed to submit '%1' to last.fm" ).arg( item->title() );
else
{
_short = i18n( "Failed to submit several tracks to last.fm" );
_long = "<p>";
_long = i18n( "Failed to submit '%1' and one other track",
"Failed to submit '%1' and %n other tracks", tracks-1 )
.tqarg( item->title() );
.arg( item->title() );
}
}
@ -1047,7 +1047,7 @@ void ScrobblerSubmitter::saveSubmitQueue()
}
if ( m_lastSubmissionFinishTime == 0 )
m_lastSubmissionFinishTime = TQDateTime::tqcurrentDateTime( Qt::UTC ).toTime_t();
m_lastSubmissionFinishTime = TQDateTime::currentDateTime( Qt::UTC ).toTime_t();
TQDomDocument newdoc;
TQDomElement submitQueue = newdoc.createElement( "submit" );
@ -1127,7 +1127,7 @@ bool ScrobblerSubmitter::schedule( bool failure )
if ( m_inProgress || !canSubmit() )
return false;
uint when, currentTime = TQDateTime::tqcurrentDateTime( Qt::UTC ).toTime_t();
uint when, currentTime = TQDateTime::currentDateTime( Qt::UTC ).toTime_t();
if ( currentTime - m_prevSubmitTime > m_interval )
when = 0;
else

@ -330,13 +330,13 @@ Amarok::PrettySlider::newBundle( const MetaBundle &bundle )
but they may become useful one day **/
TQSize
Amarok::PrettySlider::tqminimumSizeHint() const
Amarok::PrettySlider::minimumSizeHint() const
{
return tqsizeHint();
return sizeHint();
}
TQSize
Amarok::PrettySlider::tqsizeHint() const
Amarok::PrettySlider::sizeHint() const
{
constPolish();
@ -390,13 +390,13 @@ void
Amarok::VolumeSlider::generateGradient()
{
//TQImage temp( locate( "data","amarok/images/volumeslider-gradient.png" ) );
//KIconEffect::colorize( temp, tqcolorGroup().highlight(), 1.0 );
//KIconEffect::colorize( temp, colorGroup().highlight(), 1.0 );
const TQPixmap temp( locate( "data","amarok/images/volumeslider-gradient.png" ) );
const TQBitmap mask( temp.createHeuristicMask() );
m_pixmapGradient = TQPixmap( m_pixmapInset.size() );
KPixmapEffect::gradient( m_pixmapGradient, tqcolorGroup().background(), tqcolorGroup().highlight(),
KPixmapEffect::gradient( m_pixmapGradient, colorGroup().background(), colorGroup().highlight(),
KPixmapEffect::HorizontalGradient );
m_pixmapGradient.setMask( mask );
}
@ -406,12 +406,12 @@ Amarok::VolumeSlider::slotAnimTimer() //SLOT
{
if ( m_animEnter ) {
m_animCount++;
tqrepaint( false );
repaint( false );
if ( m_animCount == ANIM_MAX - 1 )
m_animTimer->stop();
} else {
m_animCount--;
tqrepaint( false );
repaint( false );
if ( m_animCount == 0 )
m_animTimer->stop();
}
@ -477,7 +477,7 @@ Amarok::VolumeSlider::paintEvent( TQPaintEvent * )
if( parentWidget()->backgroundPixmap() )
buf.fill( parentWidget(), pos() );
else {
buf.fill( tqcolorGroup().background() );
buf.fill( colorGroup().background() );
// TQPainter p( &buf );
// p.fillRect( rect(), tqApp->palette().brush( TQPalette::Active, TQColorGroup::Background ) );
}

@ -290,7 +290,7 @@ void SmartPlaylistEditor::removeCriteriaAny( CriteriaEditor *criteria )
{
m_criteriaEditorAnyList.remove( criteria );
criteria->deleteLater();
resize( size().width(), tqsizeHint().height() );
resize( size().width(), sizeHint().height() );
if( m_criteriaEditorAnyList.count() == 1 )
m_criteriaEditorAnyList.first()->enableRemove( false );
@ -300,7 +300,7 @@ void SmartPlaylistEditor::removeCriteriaAll( CriteriaEditor *criteria )
{
m_criteriaEditorAllList.remove( criteria );
criteria->deleteLater();
resize( size().width(), tqsizeHint().height() );
resize( size().width(), sizeHint().height() );
if( m_criteriaEditorAllList.count() == 1 )
m_criteriaEditorAllList.first()->enableRemove( false );
@ -322,7 +322,7 @@ void SmartPlaylistEditor::updateOrderTypes( int index )
}
if( currentOrderType < m_orderTypeCombo->count() )
m_orderTypeCombo->setCurrentItem( currentOrderType );
m_orderTypeCombo->setFont(m_orderTypeCombo->font()); // tqinvalidate size hint
m_orderTypeCombo->setFont(m_orderTypeCombo->font()); // invalidate size hint
m_orderTypeCombo->updateGeometry();
}
@ -641,7 +641,7 @@ TQString CriteriaEditor::getSearchCriteria()
else if( m_dateCombo->currentItem() == 1 ) //months
time=86400*30*n;
else time=86400*365*n; //years
value += "(*CurrentTimeT*)" + TQString(" - %1 AND ").tqarg(time) + "(*CurrentTimeT*)";
value += "(*CurrentTimeT*)" + TQString(" - %1 AND ").arg(time) + "(*CurrentTimeT*)";
}
else {
TQDateTime datetime1( m_dateEdit1->date() );
@ -896,7 +896,7 @@ void CriteriaEditor::loadEditWidgets()
m_intSpinBox1 = new KIntSpinBox( m_editBox );
int maxValue = 1000;
if( yearField ) {
maxValue = TQDate::tqcurrentDate().year();
maxValue = TQDate::currentDate().year();
m_intSpinBox1->setValue( maxValue );
}
m_intSpinBox1->setMaxValue( maxValue );
@ -905,11 +905,11 @@ void CriteriaEditor::loadEditWidgets()
if( m_criteriaCombo->currentText() == i18n("is between") ) {
m_rangeLabel = new TQLabel( i18n("and"), m_editBox );
m_rangeLabel->tqsetAlignment( AlignCenter );
m_rangeLabel->setAlignment( AlignCenter );
m_rangeLabel->show();
m_intSpinBox2 = new KIntSpinBox( m_editBox );
if( yearField ) {
maxValue = TQDate::tqcurrentDate().year();
maxValue = TQDate::currentDate().year();
m_intSpinBox2->setValue( maxValue );
}
m_intSpinBox2->setMaxValue( maxValue );
@ -927,7 +927,7 @@ void CriteriaEditor::loadEditWidgets()
if( m_criteriaCombo->currentText() == i18n("is between") ) {
m_rangeLabel = new TQLabel( i18n("and"), m_editBox );
m_rangeLabel->tqsetAlignment( AlignCenter );
m_rangeLabel->setAlignment( AlignCenter );
m_rangeLabel->show();
m_comboBox2 = new KComboBox( false, m_editBox );
m_comboBox2->insertStringList( list );
@ -950,14 +950,14 @@ void CriteriaEditor::loadEditWidgets()
m_dateCombo->show();
}
else {
m_dateEdit1 = new TQDateEdit( TQDate::tqcurrentDate(), m_editBox);
m_dateEdit1 = new TQDateEdit( TQDate::currentDate(), m_editBox);
m_dateEdit1->setFocus();
m_dateEdit1->show();
if( m_criteriaCombo->currentText() == i18n("is between") ) {
m_rangeLabel = new TQLabel( i18n("and"), m_editBox );
m_rangeLabel->tqsetAlignment( AlignCenter );
m_rangeLabel->setAlignment( AlignCenter );
m_rangeLabel->show();
m_dateEdit2 = new TQDateEdit( TQDate::tqcurrentDate(), m_editBox);
m_dateEdit2 = new TQDateEdit( TQDate::currentDate(), m_editBox);
m_dateEdit2->show();
}
}
@ -974,7 +974,7 @@ void CriteriaEditor::loadEditWidgets()
m_intSpinBox1->show();
if( m_criteriaCombo->currentText() == i18n("is between") ) {
m_rangeLabel = new TQLabel( i18n("and"), m_editBox );
m_rangeLabel->tqsetAlignment( AlignCenter );
m_rangeLabel->setAlignment( AlignCenter );
m_rangeLabel->show();
m_intSpinBox2 = new KIntSpinBox( m_editBox );
m_intSpinBox2->setMaxValue( maxValue );

@ -101,7 +101,7 @@ Vis::SocketServer::newConnection( int sockfd )
/// @class Vis::SocketNotifier
Vis::SocketNotifier::SocketNotifier( int sockfd )
: TQSocketNotifier( sockfd, QSocketNotifier::Read, TQT_TQOBJECT(this) )
: TQSocketNotifier( sockfd, TQSocketNotifier::Read, TQT_TQOBJECT(this) )
{
connect( this, TQT_SIGNAL(activated( int )), TQT_SLOT(request( int )) );
}
@ -187,7 +187,7 @@ Vis::Selector::Selector( TQWidget *parent )
for( TQStringList::ConstIterator it = entries.begin(); it != entries.end(); ++it )
new Item( this, "amarok_libvisual", *it, "libvisual" );
resize( tqsizeHint() + TQSize(20,0) );
resize( sizeHint() + TQSize(20,0) );
// Center the widget on screen
move( parentWidget()->width()/2 - width()/2, parentWidget()->height()/2 - height()/2 );
}
@ -204,7 +204,7 @@ Vis::Selector::processExited( KProcess *proc )
void
Vis::Selector::receivedStdout( KProcess */*proc*/, char* buffer, int length )
{
debug() << TQString::tqfromLatin1( buffer, length ) << endl;
debug() << TQString::fromLatin1( buffer, length ) << endl;
}
void

File diff suppressed because it is too large Load Diff

@ -1522,7 +1522,7 @@ int sqlite3_data_count(sqlite3_stmt *pStmt);
** </ul>
**
** Conversions between UTF-16be and UTF-16le are always done in place and do
** not tqinvalidate a prior pointer, though of course the content of the buffer
** not invalidate a prior pointer, though of course the content of the buffer
** that the prior pointer points to will have been modified. Other kinds
** of conversion are done in place when it is possible, but sometime it is
** not possible and in those cases prior pointers are invalidated.
@ -2016,7 +2016,7 @@ int sqlite3_sleep(int);
** file directory.
**
** Once [sqlite3_open()] has been called, changing this variable will
** tqinvalidate the current temporary database, if any. Generally speaking,
** invalidate the current temporary database, if any. Generally speaking,
** it is not safe to invoke this routine after [sqlite3_open()] has
** been called.
*/

@ -54,10 +54,12 @@ StarManager::~StarManager() {}
void
StarManager::reinitStars( int height, int margin )
{
if( height != -1 )
if( height != -1 ) {
m_height = height;
if( margin != -1 )
}
if( margin != -1 ) {
m_margin = margin;
}
int hval = m_height + m_margin * 2 - 4 + ( ( m_height % 2 ) ? 1 : 0 );
TQImage star = TQImage( locate( "data", "amarok/images/star.png" ) ).smoothScale( hval, hval, TQ_ScaleMin );
@ -73,8 +75,9 @@ StarManager::reinitStars( int height, int margin )
TQImage fullHalf = TQImage( locate( "data", "amarok/images/smallstar.png" ) );
m_halfStar = half.copy();
m_fullHalfStar = fullHalf.copy();
if( AmarokConfig::customRatingsColors() )
if( AmarokConfig::customRatingsColors() ) {
KIconEffect::colorize( m_halfStar, m_halfStarColor, 1.0 );
}
m_halfStarPix.convertFromImage( m_halfStar );
m_fullHalfStarPix.convertFromImage( m_fullHalfStar );
@ -101,7 +104,9 @@ StarManager::reinitStars( int height, int margin )
if( CollectionView::instance() &&
CollectionView::instance()->viewMode() == CollectionView::modeFlatView )
CollectionView::instance()->triggerUpdate();
emit ratingsColorsChanged();
// FIXME
// Not ideal but should work sufficiently for now
emit ratingsColorsChanged(TQString::null);
}
TQPixmap*

@ -41,7 +41,7 @@ class StarManager : public TQObject
void reinitStars( int height = -1, int margin = -1 );
signals:
void ratingsColorsChanged();
void ratingsColorsChanged( const TQString &url );
private:

@ -272,12 +272,12 @@ StatisticsList::renderView()
qb.addReturnFunctionValue( QueryBuilder::funcMin, QueryBuilder::tabStats, QueryBuilder::valCreateDate );
qb.setOptions( QueryBuilder::optRemoveDuplicates );
a = qb.run();
TQDateTime firstPlay = TQDateTime::tqcurrentDateTime();
TQDateTime firstPlay = TQDateTime::currentDateTime();
if ( a[0].toUInt() )
firstPlay.setTime_t( a[0].toUInt() );
m_newestItem = new StatisticsItem( i18n("Newest Items"), this, m_genreItem );
m_newestItem->setSubtext( i18n("First played %1").tqarg( Amarok::verboseTimeSince( firstPlay ) ) );
m_newestItem->setSubtext( i18n("First played %1").arg( Amarok::verboseTimeSince( firstPlay ) ) );
m_trackItem ->setIcon( Amarok::icon("track") );
m_mostplayedItem->setIcon( Amarok::icon("mostplayed") );
@ -344,7 +344,7 @@ StatisticsList::expandInformation( StatisticsItem *item, bool refresh )
for( uint i=0; i < fave.count(); i += qb.countReturnValues() )
{
TQString name = i18n("%1. %2 - %3").tqarg( TQString::number(c),
TQString name = i18n("%1. %2 - %3").arg( TQString::number(c),
fave[i].isEmpty() ? i18n( "Unknown" ) : fave[i],
fave[i+1].isEmpty() ? i18n( "Unknown" ) : fave[i+1]);
TQString score = locale->formatNumber( fave[i+3].toDouble(), 0 );
@ -378,11 +378,11 @@ StatisticsList::expandInformation( StatisticsItem *item, bool refresh )
for( uint i=0; i < fave.count(); i += qb.countReturnValues() )
{
TQString name = i18n("%1. %2 - %3").tqarg( TQString::number(c),
TQString name = i18n("%1. %2 - %3").arg( TQString::number(c),
fave[i].isEmpty() ? i18n( "Unknown" ) : fave[i],
fave[i+1].isEmpty() ? i18n( "Unknown" ) : fave[i+1]);
double plays = fave[i+3].toDouble();
TQString subtext = i18n("%1: %2").tqarg( i18n( "Playcount" ) ).tqarg( plays );
TQString subtext = i18n("%1: %2").arg( i18n( "Playcount" ) ).arg( plays );
m_last = new StatisticsDetailedItem( name, subtext, item, m_last );
m_last->setItemType( StatisticsDetailedItem::TRACK );
m_last->setUrl( fave[i+2] );
@ -413,13 +413,13 @@ StatisticsList::expandInformation( StatisticsItem *item, bool refresh )
for( uint i=0; i < fave.count(); i += qb.countReturnValues() )
{
TQString name = i18n("%1. %2").tqarg( TQString::number(c),
TQString name = i18n("%1. %2").arg( TQString::number(c),
fave[i].isEmpty() ? i18n( "Unknown" ) : fave[i] );
TQString score = locale->formatNumber( fave[i+1].toDouble(), 2 );
TQString rating = locale->formatNumber( fave[i+2].toDouble() / 2.0, 2 );
m_last = new StatisticsDetailedItem( name, subText( score, rating ), item, m_last );
m_last->setItemType( StatisticsDetailedItem::ARTIST );
TQString url = TQString("%1").tqarg( fave[i] );
TQString url = TQString("%1").arg( fave[i] );
m_last->setUrl( url );
c++;
}
@ -461,7 +461,7 @@ StatisticsList::expandInformation( StatisticsItem *item, bool refresh )
for( uint i=0; i < fave.count(); i += qb.countReturnValues() )
{
const bool isSampler = (fave[i+6] == trueValue);
TQString name = i18n("%1. %2 - %3").tqarg( TQString::number(c),
TQString name = i18n("%1. %2 - %3").arg( TQString::number(c),
fave[i].isEmpty() ? i18n( "Unknown" ) : fave[i],
isSampler ? i18n( "Various Artists" ) :
( fave[i+1].isEmpty() ? i18n( "Unknown" ) : fave[i+1] ) );
@ -470,7 +470,7 @@ StatisticsList::expandInformation( StatisticsItem *item, bool refresh )
m_last = new StatisticsDetailedItem( name, subText( score, rating ), item, m_last );
m_last->setItemType( StatisticsDetailedItem::ALBUM );
TQString url = TQString("%1 @@@ %2").tqarg( isSampler ? "0" : fave[i+2], fave[i+3] );
TQString url = TQString("%1 @@@ %2").arg( isSampler ? "0" : fave[i+2], fave[i+3] );
m_last->setUrl( url );
c++;
}
@ -500,14 +500,14 @@ StatisticsList::expandInformation( StatisticsItem *item, bool refresh )
for( uint i=0; i < fave.count(); i += qb.countReturnValues() )
{
TQString name = i18n("%1. %2").tqarg( TQString::number(c),
TQString name = i18n("%1. %2").arg( TQString::number(c),
fave[i].isEmpty() ? i18n( "Unknown" ) : fave[i] );
TQString score = locale->formatNumber( fave[i+1].toDouble(), 2 );
TQString rating = locale->formatNumber( fave[i+2].toDouble() / 2.0, 2 );
m_last = new StatisticsDetailedItem( name, subText( score, rating ), item, m_last );
m_last->setItemType( StatisticsDetailedItem::GENRE );
TQString url = TQString("%1").tqarg( fave[i] );
TQString url = TQString("%1").arg( fave[i] );
m_last->setUrl( url );
c++;
}
@ -541,33 +541,33 @@ StatisticsList::expandInformation( StatisticsItem *item, bool refresh )
for( uint i=0; i < newest.count(); i += qb.countReturnValues() )
{
TQString name = i18n("%1. %2 - %3").tqarg( TQString::number(c),
TQString name = i18n("%1. %2 - %3").arg( TQString::number(c),
newest[i].isEmpty() ? i18n( "Unknown" ) : newest[i],
newest[i+1].isEmpty() ? i18n( "Unknown" ) : newest[i+1] );
TQDateTime added = TQDateTime();
added.setTime_t( newest[i+4].toUInt() );
TQString subtext = i18n("Added: %1").tqarg( Amarok::verboseTimeSince( added ) );
TQString subtext = i18n("Added: %1").arg( Amarok::verboseTimeSince( added ) );
m_last = new StatisticsDetailedItem( name, subtext, item, m_last );
m_last->setItemType( StatisticsDetailedItem::HISTORY );
TQString url = TQString("%1 @@@ %2").tqarg( newest[i+2] ).tqarg( newest[i+3] );
TQString url = TQString("%1 @@@ %2").arg( newest[i+2] ).arg( newest[i+3] );
m_last->setUrl( url );
c++;
}
}
item->setExpanded( true );
repaintItem( item ); // Better than ::tqrepaint(), flickers less
repaintItem( item ); // Better than ::repaint(), flickers less
delete locale;
}
TQString StatisticsList::subText( const TQString &score, const TQString &rating ) //static
{
if( AmarokConfig::useScores() && AmarokConfig::useRatings() )
return i18n( "Score: %1 Rating: %2" ).tqarg( score ).tqarg( rating );
return i18n( "Score: %1 Rating: %2" ).arg( score ).arg( rating );
else if( AmarokConfig::useScores() )
return i18n( "Score: %1" ).tqarg( score );
return i18n( "Score: %1" ).arg( score );
else if( AmarokConfig::useRatings() )
return i18n( "Rating: %1" ).tqarg( rating );
return i18n( "Rating: %1" ).arg( rating );
else
return TQString();
}
@ -623,9 +623,9 @@ StatisticsList::viewportPaintEvent( TQPaintEvent *e )
const uint x = (viewport()->width() - w - 30) / 2 ;
const uint y = (viewport()->height() - h - 30) / 2 ;
p.setBrush( tqcolorGroup().background() );
p.setBrush( colorGroup().background() );
p.drawRoundRect( x, y, w+30, h+30, (8*200)/w, (8*200)/h );
t.draw( &p, x+15, y+15, TQRect(), tqcolorGroup() );
t.draw( &p, x+15, y+15, TQRect(), colorGroup() );
}
}
@ -639,10 +639,10 @@ StatisticsList::showContextMenu( TQListViewItem *item, const TQPoint &p, int )
bool hasSQL = !( item->itemType() == StatisticsDetailedItem::TRACK ); //track is url
KPopupMenu menu( this );
enum Actions { APPEND, TQUEUE, INFO };
enum Actions { APPEND, QUEUE, INFO };
menu.insertItem( SmallIconSet( Amarok::icon( "add_playlist" ) ), i18n( "&Append to Playlist" ), APPEND );
menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), i18n( "&Queue Track" ), TQUEUE );
menu.insertItem( SmallIconSet( Amarok::icon( "queue_track" ) ), i18n( "&Queue Track" ), QUEUE );
menu.insertSeparator();
@ -656,7 +656,7 @@ StatisticsList::showContextMenu( TQListViewItem *item, const TQPoint &p, int )
Playlist::instance()->insertMedia( KURL::fromPathOrURL( item->url() ) );
break;
case TQUEUE:
case QUEUE:
hasSQL ?
Playlist::instance()->insertMediaSql( item->getSQL(), Playlist::Queue ):
Playlist::instance()->insertMedia( KURL::fromPathOrURL( item->url() ), Playlist::Queue );
@ -701,7 +701,7 @@ void
StatisticsItem::setIcon( const TQString &icon )
{
TQString path = kapp->iconLoader()->iconPath( icon, -KIcon::SizeHuge );
path.replace( "32x32", "48x48" ); //HACK fucking KIconLoader only returns 32x32 max. Why?
path.replace( "32x32", "48x48" ); //HACK: KIconLoader only returns 32x32 max. Why?
// debug() << "ICONPATH: " << path << endl;
@ -735,7 +735,7 @@ StatisticsItem::slotAnimTimer()
if( m_animEnter )
{
m_animCount += 1;
listView()->repaintItem( this ); // Better than ::tqrepaint(), flickers less
listView()->repaintItem( this ); // Better than ::repaint(), flickers less
if( m_animCount >= ANIM_MAX )
m_animTimer->stop();
@ -930,7 +930,7 @@ StatisticsDetailedItem::paintCell( TQPainter *p, const TQColorGroup &cg, int col
if( showDetails )
{
const TQColorGroup _cg = listView()->tqpalette().disabled();
const TQColorGroup _cg = listView()->palette().disabled();
text_x = lv->treeStepSize() + 3;
font.setItalic( true );
pBuf.setPen( isSelected() ? _cg.highlightedText() : TQColor(_cg.text().dark()) );

@ -135,7 +135,7 @@ class StatisticsItem : public TQObject, public KListViewItem
TQString m_subText;
};
/// Listview items for the tqchildren of expanded items (the actual results)
/// Listview items for the children of expanded items (the actual results)
class StatisticsDetailedItem : public KListViewItem
{
public:

@ -49,10 +49,10 @@ OverlayWidget::reposition()
p.setY( -height() );
// Position in the toplevelwidget's coordinates
TQPoint pTopLevel = m_anchor->mapTo( tqtopLevelWidget(), p );
TQPoint pTopLevel = m_anchor->mapTo( topLevelWidget(), p );
// Position in the widget's parentWidget coordinates
TQPoint pParent = parentWidget() ->mapFrom( tqtopLevelWidget(), pTopLevel );
TQPoint pParent = parentWidget() ->mapFrom( topLevelWidget(), pTopLevel );
// keep it on the screen
if( pParent.x() < 0 )
pParent.rx() = 0;

@ -62,9 +62,9 @@ PopupMessage::PopupMessage( TQWidget *parent, TQWidget *anchor, int timeout, con
TQLabel *label;
KActiveLabel *alabel;
m_tqlayout = new TQVBoxLayout( this, 9 /*margin*/, 6 /*spacing*/ );
m_layout = new TQVBoxLayout( this, 9 /*margin*/, 6 /*spacing*/ );
hbox = new TQHBoxLayout( m_tqlayout, 12 );
hbox = new TQHBoxLayout( m_layout, 12 );
hbox->addWidget( m_countdownFrame = new TQFrame( this, "counterVisual" ) );
m_countdownFrame->setFixedWidth( fontMetrics().width( "X" ) );
@ -76,12 +76,12 @@ PopupMessage::PopupMessage( TQWidget *parent, TQWidget *anchor, int timeout, con
alabel = new KActiveLabel( this, "label" );
alabel->setTextFormat( TQt::RichText );
alabel->tqsetSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred );
alabel->setSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred );
alabel->setPalette( p );
hbox->add( alabel );
hbox = new TQHBoxLayout( m_tqlayout );
hbox = new TQHBoxLayout( m_layout );
hbox->addItem( new TQSpacerItem( 4, 4, TQSizePolicy::Expanding, TQSizePolicy::Preferred ) );
hbox->add( new KPushButton( KStdGuiItem::close(), this, "closeButton" ) );
@ -91,7 +91,7 @@ PopupMessage::PopupMessage( TQWidget *parent, TQWidget *anchor, int timeout, con
void PopupMessage::addWidget( TQWidget *widget )
{
m_tqlayout->add( widget );
m_layout->add( widget );
adjustSize();
}
@ -191,7 +191,7 @@ void PopupMessage::countDown()
TQFrame *&h = m_countdownFrame;
if( m_counter < h->height() - 3 )
TQPainter( h ).fillRect( 2, 2, h->width() - 4, m_counter, tqpalette().active().highlight() );
TQPainter( h ).fillRect( 2, 2, h->width() - 4, m_counter, palette().active().highlight() );
if( !hasMouse() )
m_counter++;
@ -213,7 +213,7 @@ void PopupMessage::dissolveMask()
{
if( m_stage == 1 )
{
tqrepaint( false );
repaint( false );
TQPainter maskPainter(&m_mask);
m_mask.fill(TQt::black);

@ -85,7 +85,7 @@ namespace KDE
void slideMask();
private:
TQVBoxLayout *m_tqlayout;
TQVBoxLayout *m_layout;
TQFrame *m_countdownFrame;
TQWidget *m_anchor;
TQWidget *m_parent;

@ -38,7 +38,7 @@ ProgressBar::ProgressBar( TQWidget *parent, TQLabel *label )
{
DEBUG_FUNC_INFO
m_label->tqsetSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum );
m_label->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum );
m_abort = new KPushButton( KStdGuiItem::cancel(), parent );
m_abort->hide();
m_abort->setText( i18n("Abort") );
@ -61,7 +61,7 @@ ProgressBar::setDescription( const TQString &text )
}
ProgressBar&
ProgressBar::settqStatus( const TQString &text )
ProgressBar::setStatus( const TQString &text )
{
TQString s = m_description;
s += " [";
@ -100,11 +100,11 @@ ProgressBar::setDone()
if( !m_done ) {
m_done = true;
m_abort->setEnabled( false );
settqStatus( i18n("Done") );
setStatus( i18n("Done") );
}
else
// then we we're aborted
settqStatus( i18n("Aborted") );
setStatus( i18n("Aborted") );
}
void
@ -114,7 +114,7 @@ ProgressBar::hide()
m_done = true;
m_abort->setEnabled( false );
settqStatus( i18n("Aborting...") );
setStatus( i18n("Aborting...") );
}
}

@ -44,7 +44,7 @@ namespace KDE
ProgressBar &setDescription( const TQString &text );
/** @param text eg. Scanning, Reading. The state of the operation */
ProgressBar &settqStatus( const TQString &text );
ProgressBar &setStatus( const TQString &text );
/** set the recipient slot for the abort button */
ProgressBar &setAbortSlot( TQObject *receiver, const char *slot );

@ -99,27 +99,27 @@ void QueueLabel::setNum( int num )
TQPixmap pix( w, h );
TQPainter p( &pix );
p.setBrush( tqcolorGroup().background() );
p.setPen( tqcolorGroup().background() );
p.setBrush( colorGroup().background() );
p.setPen( colorGroup().background() );
p.drawRect( pix.rect() );
p.setBrush( tqcolorGroup().highlight() );
p.setPen( tqcolorGroup().highlight().dark() );
p.setBrush( colorGroup().highlight() );
p.setPen( colorGroup().highlight().dark() );
if( w > h )
{
p.drawPie( 0, 0, h, h, 90*16, 180*16 );
p.drawPie( w-1 -h, 0, h, h, -90*16, 180*16 );
p.drawLine( h/2-1, 0, w-1 - h/2, 0 );
p.drawLine( h/2-1, h-1, w-1 - h/2, h-1 );
p.setPen( tqcolorGroup().highlight() );
p.setPen( colorGroup().highlight() );
p.drawRect( h/2-1, 1, w - h + 1, h-2 );
}
else
p.drawEllipse( pix.rect() );
p.setFont( f );
p.setPen( tqcolorGroup().highlightedText() );
p.setBrush( tqcolorGroup().highlight().dark() );
p.setPen( colorGroup().highlightedText() );
p.setBrush( colorGroup().highlight().dark() );
p.drawText( pix.rect(), TQt::AlignCenter | TQt::SingleLine, text );
p.end();
@ -175,7 +175,7 @@ void QueueLabel::mousePressEvent( TQMouseEvent* mouseEvent )
const uint count = queue.count();
if( length )
menu->insertTitle( i18n( "1 Queued Track (%1)", "%n Queued Tracks (%1)", count )
.tqarg( MetaBundle::prettyLength( length, true ) ) );
.arg( MetaBundle::prettyLength( length, true ) ) );
else
menu->insertTitle( i18n( "1 Queued Track", "%n Queued Tracks", count ) );
Amarok::actionCollection()->action( "queue_manager" )->plug( menu );
@ -191,7 +191,7 @@ void QueueLabel::mousePressEvent( TQMouseEvent* mouseEvent )
{
for( uint n = kMin( i + MAX_TO_SHOW - 1, count ); i <= n; ++i, ++it )
menu->insertItem(
KStringHandler::rsqueeze( i18n( "%1. %2" ).tqarg( i ).tqarg( veryNiceTitle( *it ) ), 50 ), i );
KStringHandler::rsqueeze( i18n( "%1. %2" ).arg( i ).arg( veryNiceTitle( *it ) ), 50 ), i );
if( i < count )
{
@ -205,8 +205,8 @@ void QueueLabel::mousePressEvent( TQMouseEvent* mouseEvent )
menu = menus.getFirst();
int mx, my;
const int mw = menu->tqsizeHint().width(),
mh = menu->tqsizeHint().height(),
const int mw = menu->sizeHint().width(),
mh = menu->sizeHint().height(),
sy = mapFrom( Amarok::StatusBar::instance(), TQPoint( 0, 0 ) ).y(),
sheight = Amarok::StatusBar::instance()->height();
const TQRect dr = TQApplication::desktop()->availableGeometry( this );
@ -264,11 +264,11 @@ void QueueLabel::showToolTip()
}
if( length )
text += TQString("<center>%1</center>")
.tqarg( i18n( "1 track (%1)", "%n tracks (%1)", count )
.tqarg( MetaBundle::prettyLength( length, true ) ) );
.arg( i18n( "1 track (%1)", "%n tracks (%1)", count )
.arg( MetaBundle::prettyLength( length, true ) ) );
}
text += i18n( "Next: %1" ).tqarg( veryNiceTitle( item, true /*bold*/ ) );
text += i18n( "Next: %1" ).arg( veryNiceTitle( item, true /*bold*/ ) );
m_tooltip = new KDE::PopupMessage( parentWidget()->parentWidget(), this, 0 );
m_tooltip->setShowCloseButton( false );
@ -296,9 +296,9 @@ TQString QueueLabel::veryNiceTitle( PlaylistItem* item, bool bold ) const
const TQString artist = item->artist()->stripWhiteSpace(),
title = item->title().stripWhiteSpace();
if( !artist.isEmpty() && !title.isEmpty() )
return ( bold ? i18n( "<b>%1</b> by <b>%2</b>" ) : i18n( "%1 by %2" ) ).tqarg( title ).tqarg( artist );
return ( bold ? i18n( "<b>%1</b> by <b>%2</b>" ) : i18n( "%1 by %2" ) ).arg( title ).arg( artist );
else
return TQString( "<b>%1</b>" ).tqarg( MetaBundle::prettyTitle( item->filename() ) );
return TQString( "<b>%1</b>" ).arg( MetaBundle::prettyTitle( item->filename() ) );
}

@ -17,8 +17,8 @@
* 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef AMAROK_TQUEUELABEL_H
#define AMAROK_TQUEUELABEL_H
#ifndef AMAROK_QUEUELABEL_H
#define AMAROK_QUEUELABEL_H
#include "playlistitem.h"
#include "popupMessage.h"

@ -126,8 +126,8 @@ class SelectLabel : public TQLabel
m_tooltipShowing = true;
TQString tip = i18n("%1: %2")
.tqarg( m_action->text().remove( '&' ) )
.tqarg( m_action->currentText().remove( '&' ) );
.arg( m_action->text().remove( '&' ) )
.arg( m_action->currentText().remove( '&' ) );
if( !isEnabled() )
tip += i18n("&nbsp;<br>&nbsp;<i>Disabled</i>");
@ -136,7 +136,7 @@ class SelectLabel : public TQLabel
{
KSelectAction *a = static_cast<KSelectAction*>( Amarok::actionCollection()->action( "favor_tracks" ) );
tip += TQString("<br><br>") + i18n("%1: %2")
.tqarg( a->text().remove( '&' ), a->currentText().remove( '&' ) );
.arg( a->text().remove( '&' ), a->currentText().remove( '&' ) );
}
tip += "&nbsp;";

@ -28,30 +28,30 @@ namespace KDE {
SqueezedTextLabel::SqueezedTextLabel( const TQString &text , TQWidget *parent, const char *name )
: TQLabel ( parent, name ) {
tqsetSizePolicy(TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
setSizePolicy(TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
fullText = text;
squeezeTextToLabel();
}
SqueezedTextLabel::SqueezedTextLabel( TQWidget *parent, const char *name )
: TQLabel ( parent, name ) {
tqsetSizePolicy(TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
setSizePolicy(TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
}
void SqueezedTextLabel::resizeEvent( TQResizeEvent * ) {
squeezeTextToLabel();
}
TQSize SqueezedTextLabel::tqminimumSizeHint() const
TQSize SqueezedTextLabel::minimumSizeHint() const
{
TQSize sh = TQLabel::tqminimumSizeHint();
TQSize sh = TQLabel::minimumSizeHint();
sh.setWidth(-1);
return sh;
}
TQSize SqueezedTextLabel::tqsizeHint() const
TQSize SqueezedTextLabel::sizeHint() const
{
return TQSize(contentsRect().width(), TQLabel::tqsizeHint().height());
return TQSize(contentsRect().width(), TQLabel::sizeHint().height());
}
void SqueezedTextLabel::setText( const TQString &text ) {
@ -127,11 +127,11 @@ void SqueezedTextLabel::squeezeTextToLabel()
}
}
void SqueezedTextLabel::tqsetAlignment( int tqalignment )
void SqueezedTextLabel::setAlignment( int alignment )
{
// save fullText and restore it
TQString tmpFull(fullText);
TQLabel::tqsetAlignment(tqalignment);
TQLabel::setAlignment(alignment);
fullText = tmpFull;
}

@ -18,8 +18,8 @@
* 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef STQUEEZEDTEXTLABEL_H
#define STQUEEZEDTEXTLABEL_H
#ifndef SQUEEZEDTEXTLABEL_H
#define SQUEEZEDTEXTLABEL_H
#include <tqlabel.h>
@ -35,9 +35,9 @@ public:
SqueezedTextLabel( TQWidget *parent, const char *name = 0 );
SqueezedTextLabel( const TQString &text, TQWidget *parent, const char *name = 0 );
virtual TQSize tqminimumSizeHint() const;
virtual TQSize tqsizeHint() const;
virtual void tqsetAlignment( int );
virtual TQSize minimumSizeHint() const;
virtual TQSize sizeHint() const;
virtual void setAlignment( int );
public slots:
void setText( const TQString & );

@ -86,10 +86,10 @@ StatusBar::StatusBar( TQWidget *parent, const char *name )
: TQWidget( parent, name )
, m_logCounter( -1 )
{
TQBoxLayout *maintqlayout = new TQHBoxLayout( this, 2, /*spacing*/5 );
TQBoxLayout *mainlayout = new TQHBoxLayout( this, 2, /*spacing*/5 );
//we need extra spacing due to the way we paint the surrounding boxes
TQBoxLayout *tqlayout = new TQHBoxLayout( maintqlayout, /*spacing*/5 );
TQBoxLayout *layout = new TQHBoxLayout( mainlayout, /*spacing*/5 );
TQHBox *statusBarTextBox = new TQHBox( this, "statusBarTextBox" );
m_mainTextLabel = new KDE::SqueezedTextLabel( statusBarTextBox, "mainTextLabel" );
@ -103,15 +103,15 @@ StatusBar::StatusBar( TQWidget *parent, const char *name )
mainProgressBarBox->setSpacing( 2 );
mainProgressBarBox->hide();
tqlayout->add( statusBarTextBox );
tqlayout->add( mainProgressBarBox );
tqlayout->setStretchFactor( statusBarTextBox, 3 );
tqlayout->setStretchFactor( mainProgressBarBox, 1 );
layout->add( statusBarTextBox );
layout->add( mainProgressBarBox );
layout->setStretchFactor( statusBarTextBox, 3 );
layout->setStretchFactor( mainProgressBarBox, 1 );
m_otherWidgetLayout = new TQHBoxLayout( maintqlayout, /*spacing*/5 );
m_otherWidgetLayout = new TQHBoxLayout( mainlayout, /*spacing*/5 );
maintqlayout->setStretchFactor( tqlayout, 6 );
maintqlayout->setStretchFactor( m_otherWidgetLayout, 4 );
mainlayout->setStretchFactor( layout, 6 );
mainlayout->setStretchFactor( m_otherWidgetLayout, 4 );
shortLongButton->setIconSet( SmallIconSet( "edit_add" ) );
TQToolTip::add( shortLongButton, i18n( "Show details" ) );
@ -129,7 +129,7 @@ StatusBar::StatusBar( TQWidget *parent, const char *name )
m_popupProgress->setMargin( 1 );
m_popupProgress->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
m_popupProgress->setFrameShape( TQFrame::StyledPanel );
m_popupProgress->tqsetSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum );
m_popupProgress->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum );
(new TQGridLayout( m_popupProgress, 1 /*rows*/, 3 /*cols*/, 6, 3 ))->setAutoAdd( true );
}
@ -151,7 +151,7 @@ StatusBar::polish()
TQObjectList *list = queryList( TQWIDGET_OBJECT_NAME_STRING, 0, false, false );
for( TQObject * o = list->first(); o; o = list->next() ) {
int _h = TQT_TQWIDGET( o ) ->tqminimumSizeHint().height();
int _h = TQT_TQWIDGET( o ) ->minimumSizeHint().height();
if ( _h > h )
h = _h;
@ -181,11 +181,11 @@ StatusBar::paintEvent( TQPaintEvent* )
if ( !w->isVisible() )
continue;
tqstyle().tqdrawPrimitive(
style().tqdrawPrimitive(
TQStyle::PE_StatusBarSection,
&p,
TQRect( w->x() - 1, w->y() - 1, w->width() + 2, w->height() + 2 ),
tqcolorGroup(),
colorGroup(),
TQStyle::Style_Default,
TQStyleOption( w ) );
}
@ -541,12 +541,12 @@ StatusBar::incrementProgressTotalSteps( const TQObject *owner, int inc )
}
void
StatusBar::setProgresstqStatus( const TQObject *owner, const TQString &text )
StatusBar::setProgressStatus( const TQObject *owner, const TQString &text )
{
if ( !m_progressMap.contains( owner ) )
return ;
m_progressMap[owner]->settqStatus( text );
m_progressMap[owner]->setStatus( text );
}
void StatusBar::incrementProgress()
@ -669,7 +669,7 @@ StatusBar::writeLogFile( const TQString &text )
TQTextStream stream( &file );
stream.setEncoding( TQTextStream::UnicodeUTF8 );
stream << "[" << KGlobal::locale()->formatDateTime( TQDateTime::tqcurrentDateTime() ) << "] " << text << endl;
stream << "[" << KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime() ) << "] " << text << endl;
}
} //namespace KDE

@ -52,7 +52,7 @@ namespace KDE
*
* statusbar->newProgressOperation( myObject )
* .setDescription( i18n("MyProgressOperation") )
* .settqStatus( i18n("Stage1") )
* .setStatus( i18n("Stage1") )
* .setAbortSlot( myObject, TQT_SLOT(abort()) )
* .setTotalSteps( 100 );
*
@ -93,7 +93,7 @@ namespace KDE
* @return the progressBar so you can configure its parameters
* @see setProgress( TQObject*, int )
* @see incrementProgress( TQObject* )
* @see setProgresstqStatus( const TQObject*, const TQString& )
* @see setProgressStatus( const TQObject*, const TQString& )
*/
ProgressBar &newProgressOperation( TQObject *owner );
@ -104,7 +104,7 @@ namespace KDE
void incrementProgressTotalSteps( const TQObject *owner, int inc = 1 );
void incrementProgress( const TQObject *owner );
void setProgresstqStatus( const TQObject *owner, const TQString &text );
void setProgressStatus( const TQObject *owner, const TQString &text );
public slots:
/**
@ -187,7 +187,7 @@ namespace KDE
/**
* You must parent the widget to the statusbar, we won't do that
* for you! The widget will be added to the right of the tqlayout.
* for you! The widget will be added to the right of the layout.
* Currently you must add widgets before the statusbar gets shown
* for the first time, because we are not currently very flexible.
*/

@ -65,8 +65,8 @@ StatusBar::StatusBar( TQWidget *parent, const char *name )
// total songs count
m_itemCountLabel = new TQLabel( this );
m_itemCountLabel->tqsetAlignment( TQt::AlignCenter );
m_itemCountLabel->tqsetSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Fixed );
m_itemCountLabel->setAlignment( TQt::AlignCenter );
m_itemCountLabel->setSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Fixed );
//positionBox
TQWidget *positionBox = new TQWidget( this, "positionBox" );
@ -85,12 +85,12 @@ StatusBar::StatusBar( TQWidget *parent, const char *name )
// TODO Both labels need tooltips (string freeze?)
TQWidget *hbox = new TQWidget( this );
TQBoxLayout *tqlayout = new TQHBoxLayout( hbox, 0, 2 );
tqlayout->addSpacing( 3 );
tqlayout->addWidget( m_queueLabel = new QueueLabel( hbox ) );
tqlayout->addWidget( new SelectLabel( static_cast<Amarok::SelectAction*>( Amarok::action( "repeat" ) ), hbox ) );
tqlayout->addWidget( new SelectLabel( static_cast<Amarok::SelectAction*>( Amarok::action( "random_mode" ) ), hbox ) );
tqlayout->addSpacing( 3 );
TQBoxLayout *layout = new TQHBoxLayout( hbox, 0, 2 );
layout->addSpacing( 3 );
layout->addWidget( m_queueLabel = new QueueLabel( hbox ) );
layout->addWidget( new SelectLabel( static_cast<Amarok::SelectAction*>( Amarok::action( "repeat" ) ), hbox ) );
layout->addWidget( new SelectLabel( static_cast<Amarok::SelectAction*>( Amarok::action( "random_mode" ) ), hbox ) );
layout->addSpacing( 3 );
//TODO reimplement insertChild() instead
addWidget( m_itemCountLabel );
@ -183,16 +183,16 @@ StatusBar::engineNewMetaData( const MetaBundle &bundle, bool /*trackChanged*/ )
// ugly because of translation requirements
if( !title.isEmpty() && !artist.isEmpty() && !album.isEmpty() )
title = i18n( "track by artist on album", "<b>%1</b> by <b>%2</b> on <b>%3</b>" )
.tqarg( title, artist, album );
.arg( title, artist, album );
else if( !title.isEmpty() && !artist.isEmpty() )
title = i18n( "track by artist", "<b>%1</b> by <b>%2</b>" )
.tqarg( title, artist );
.arg( title, artist );
else if( !album.isEmpty() )
// we try for pretty title as it may come out better
title = i18n( "track on album", "<b>%1</b> on <b>%2</b>" )
.tqarg( prettyTitle, album );
.arg( prettyTitle, album );
else
title = "<b>" + prettyTitle + "</b>";
@ -206,7 +206,7 @@ StatusBar::engineNewMetaData( const MetaBundle &bundle, bool /*trackChanged*/ )
title += ')';
}
setMainText( i18n( "Playing: %1" ).tqarg( title ) );
setMainText( i18n( "Playing: %1" ).arg( title ) );
m_slider->newBundle( bundle );
engineTrackLengthChanged( bundle.length() );
@ -220,10 +220,10 @@ StatusBar::slotItemCountChanged( int newCount, int newLength, //total
const bool hasSel = ( selCount > 1 ), hasVis = ( visCount != newCount );
TQString text = ( hasSel && hasVis ) ? i18n( "%1 selected of %2 visible tracks" )
.tqarg( selCount ).tqarg( visCount )
.arg( selCount ).arg( visCount )
: ( hasVis && newCount == 1 ) ? i18n( "0 visible of 1 track" )
: ( hasVis ) ? i18n( "%1 visible of %2 tracks" ).tqarg( visCount).tqarg( newCount )
: ( hasSel ) ? i18n( "%1 selected of %2 tracks" ).tqarg( selCount ).tqarg( newCount )
: ( hasVis ) ? i18n( "%1 visible of %2 tracks" ).arg( visCount).arg( newCount )
: ( hasSel ) ? i18n( "%1 selected of %2 tracks" ).arg( selCount ).arg( newCount )
: i18n( "1 track", "%n tracks", newCount );
int getValue = 0;
@ -238,11 +238,11 @@ StatusBar::slotItemCountChanged( int newCount, int newLength, //total
getValue = newLength;
if( getValue )
m_itemCountLabel->setText( i18n( "X visible/selected tracks (time) ", "%1 (%2)" ).tqarg( text, MetaBundle::fuzzyTime( getValue ) ) );
m_itemCountLabel->setText( i18n( "X visible/selected tracks (time) ", "%1 (%2)" ).arg( text, MetaBundle::fuzzyTime( getValue ) ) );
else
m_itemCountLabel->setText( text );
TQToolTip::add( m_itemCountLabel, i18n( "Play-time: %1" ).tqarg( MetaBundle::veryPrettyTime( getValue ) ) );
TQToolTip::add( m_itemCountLabel, i18n( "Play-time: %1" ).arg( MetaBundle::veryPrettyTime( getValue ) ) );
}
void

@ -28,7 +28,7 @@ public:
TimeLabel( TQWidget *parent ) : TQLabel( " 0:00:00 ", parent )
{
setFont( KGlobalSettings::fixedFont() );
tqsetSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Fixed );
setSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Fixed );
}
virtual void mousePressEvent( TQMouseEvent * )

@ -123,7 +123,7 @@ class ToggleLabel : public TQLabel
m_tooltip->setShowCloseButton( false );
m_tooltip->setShowCounter( false );
m_tooltip->setMaskEffect( KDE::PopupMessage::Plain );
m_tooltip->setText( tip.tqarg(m_action->text().remove('&') ) );
m_tooltip->setText( tip.arg(m_action->text().remove('&') ) );
m_tooltip->setImage( path );
m_tooltip->reposition();

@ -26,7 +26,7 @@ namespace Amarok
static TQPixmap
loadOverlay( const char *iconName, int iconWidth )
{
return TQImage( locate( "data", TQString( "amarok/images/b_%1.png" ).tqarg( iconName ) ), "PNG" ).smoothScale( ((iconWidth/2)-(iconWidth/20)), ((iconWidth/2)-(iconWidth/20)) );
return TQImage( locate( "data", TQString( "amarok/images/b_%1.png" ).arg( iconName ) ), "PNG" ).smoothScale( ((iconWidth/2)-(iconWidth/20)), ((iconWidth/2)-(iconWidth/20)) );
}
}
@ -105,7 +105,7 @@ Amarok::TrayIcon::event( TQEvent *e )
void Amarok::TrayIcon::resizeEvent ( TQResizeEvent * )
{
// Honor Free Desktop specifications that allow for arbitrary system tray icon sizes
baseIcon = KSystemTray::loadSizedIcon( "amarok", width() );
baseIcon = KSystemTray::loadSizedIcon( "amarok", width() );
if (overlay == &pauseOverlay) {
pauseOverlay = Amarok::loadOverlay( "pause", width() );
overlay = &pauseOverlay;
@ -146,12 +146,12 @@ Amarok::TrayIcon::engineStateChanged( Engine::State state, Engine::State /*oldSt
if( AmarokConfig::animateTrayIcon() )
blinkTimerID = startTimer( 1500 ); // start 'blink' timer
paintIcon( mergeLevel, true ); // tqrepaint the icon
paintIcon( mergeLevel, true ); // repaint the icon
break;
case Engine::Empty:
overlayVisible = false;
paintIcon( -1, true ); // tqrepaint the icon
paintIcon( -1, true ); // repaint the icon
// fall through to default:
default:
setLastFm( false );
@ -175,7 +175,7 @@ Amarok::TrayIcon::engineTrackPositionChanged( long position, bool /*userSeek*/ )
void
Amarok::TrayIcon::paletteChange( const TQPalette & op )
{
if ( tqpalette().active().highlight() == op.active().highlight() || alternateIcon.isNull() )
if ( palette().active().highlight() == op.active().highlight() || alternateIcon.isNull() )
return;
alternateIcon.resize( 0, 0 );
@ -187,12 +187,14 @@ Amarok::TrayIcon::paintIcon( int mergePixels, bool force )
{
// skip redrawing the same pixmap
static int mergePixelsCache = 0;
if ( mergePixels == mergePixelsCache && !force )
return;
if ( mergePixels == mergePixelsCache && !force ) {
return;
}
mergePixelsCache = mergePixels;
if ( mergePixels < 0 )
if ( mergePixels < 0 ) {
return blendOverlay( baseIcon );
}
// make up the grayed icon
if ( grayedIcon.isNull() )
@ -202,14 +204,14 @@ Amarok::TrayIcon::paintIcon( int mergePixels, bool force )
grayedIcon = tmpTrayIcon;
}
// make up the alternate icon (use hilight color but more saturated)
// make up the alternate icon (use highlight color but more saturated)
if ( alternateIcon.isNull() )
{
TQImage tmpTrayIcon = baseIcon.convertToImage();
// eros: this looks cool with dark red blue or green but sucks with
// other colors (such as kde default's pale pink..). maybe the effect
// or the blended color has to be changed..
TQColor saturatedColor = tqpalette().active().highlight();
TQColor saturatedColor = palette().active().highlight();
int hue, sat, value;
saturatedColor.getHsv( &hue, &sat, &value );
saturatedColor.setHsv( hue, sat > 200 ? 200 : sat, value < 100 ? 100 : value );
@ -217,10 +219,12 @@ Amarok::TrayIcon::paintIcon( int mergePixels, bool force )
alternateIcon = tmpTrayIcon;
}
if ( mergePixels >= alternateIcon.height() )
if ( mergePixels >= alternateIcon.height() ) {
return blendOverlay( grayedIcon );
if ( mergePixels == 0 )
}
if ( mergePixels == 0 ) {
return blendOverlay( alternateIcon );
}
// mix [ grayed <-> colored ] icons
TQPixmap tmpTrayPixmap = alternateIcon;
@ -232,8 +236,9 @@ Amarok::TrayIcon::paintIcon( int mergePixels, bool force )
void
Amarok::TrayIcon::blendOverlay( TQPixmap &sourcePixmap )
{
if ( !overlayVisible || !overlay || overlay->isNull() )
if ( !overlayVisible || !overlay || overlay->isNull() ) {
return setPixmap( sourcePixmap ); // @since 3.2
}
// here comes the tricky part.. no kdefx functions are helping here.. :-(
// we have to blend pixmaps with different sizes (blending will be done in
@ -248,9 +253,10 @@ Amarok::TrayIcon::blendOverlay( TQPixmap &sourcePixmap )
copyBlt( &sourceCropped, 0,0, &sourcePixmap, opX,opY, opW,opH );
//speculative fix for a bactrace we received
//crash was in covertToImage() somewhere in this function
if( sourceCropped.isNull() )
//crash was in convertToImage() somewhere in this function
if( sourceCropped.isNull() ) {
return setPixmap( sourcePixmap );
}
// blend the overlay image over the cropped rectangle
TQImage blendedImage = sourceCropped.convertToImage();

@ -38,7 +38,7 @@ private:
// repaints trayIcon showing progress (and overlay if present)
void paintIcon( int mergePixels = -1, bool force = false );
// blend an overlay icon over 'sourcePixmap' and tqrepaint trayIcon
// blend an overlay icon over 'sourcePixmap' and repaint trayIcon
void blendOverlay( TQPixmap &sourcePixmap );
long trackLength, mergeLevel;

@ -309,7 +309,7 @@ TagDialog::queryDone( KTRMResultList results, TQString error ) //SLOT
#if HAVE_TUNEPIMP
if ( !error.isEmpty() ) {
KMessageBox::sorry( this, i18n( "Tunepimp (MusicBrainz tagging library) returned the following error: \"%1\"." ).tqarg(error) );
KMessageBox::sorry( this, i18n( "Tunepimp (MusicBrainz tagging library) returned the following error: \"%1\"." ).arg(error) );
}
else {
if ( !results.isEmpty() )
@ -418,12 +418,12 @@ void TagDialog::init()
//m_labelCloud = new KHTMLPart( labels_favouriteLabelsFrame );
m_labelCloud = new HTMLView( labels_favouriteLabelsFrame );
m_labelCloud->view()->tqsetSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored, false );
m_labelCloud->view()->setSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored, false );
m_labelCloud->view()->setVScrollBarMode( TQScrollView::AlwaysOff );
m_labelCloud->view()->setHScrollBarMode( TQScrollView::AlwaysOff );
new TQVBoxLayout( labels_favouriteLabelsFrame );
labels_favouriteLabelsFrame->tqlayout()->add( m_labelCloud->view() );
labels_favouriteLabelsFrame->layout()->add( m_labelCloud->view() );
const TQStringList favoriteLabels = CollectionDB::instance()->favoriteLabels();
TQString html = generateHTML( favoriteLabels );
m_labelCloud->set( html );
@ -550,7 +550,7 @@ void TagDialog::init()
// make it as small as possible
resize( tqsizeHint().width(), tqminimumSize().height() );
resize( sizeHint().width(), minimumSize().height() );
}
@ -629,21 +629,21 @@ void TagDialog::readTags()
{
bool local = m_bundle.url().isLocalFile();
setCaption( kapp->makeStdCaption( i18n("Track Information: %1 by %2").tqarg( m_bundle.title(), m_bundle.artist() ) ) );
setCaption( kapp->makeStdCaption( i18n("Track Information: %1 by %2").arg( m_bundle.title(), m_bundle.artist() ) ) );
TQString niceTitle;
if ( m_bundle.album().isEmpty() ) {
if( !m_bundle.title().isEmpty() ) {
if( !m_bundle.artist().isEmpty() )
niceTitle = i18n( "<b>%1</b> by <b>%2</b>" ).tqarg( m_bundle.title(), m_bundle.artist() );
niceTitle = i18n( "<b>%1</b> by <b>%2</b>" ).arg( m_bundle.title(), m_bundle.artist() );
else
niceTitle = TQString( "<b>%1</b>" ).tqarg( m_bundle.title() );
niceTitle = TQString( "<b>%1</b>" ).arg( m_bundle.title() );
}
else niceTitle = m_bundle.prettyTitle();
}
else {
niceTitle = i18n( "<b>%1</b> by <b>%2</b> on <b>%3</b>" )
.tqarg( m_bundle.title(), m_bundle.artist(), m_bundle.album() );
.arg( m_bundle.title(), m_bundle.artist(), m_bundle.album() );
}
trackArtistAlbumLabel->setText( niceTitle );
trackArtistAlbumLabel2->setText( niceTitle );
@ -671,22 +671,22 @@ void TagDialog::readTags()
const TQString emptyLine = "<tr><td colspan=2></td></tr>";
summaryText = "<table width=100%><tr><td width=50%><table>";
summaryText += body2cols.tqarg( i18n("Length"), unknownSafe( m_bundle.prettyLength() ) );
summaryText += body2cols.tqarg( i18n("Bitrate"), unknownSafe( m_bundle.prettyBitrate() ) );
summaryText += body2cols.tqarg( i18n("Samplerate"), unknownSafe( m_bundle.prettySampleRate() ) );
summaryText += body2cols.tqarg( i18n("Size"), unknownSafe( m_bundle.prettyFilesize() ) );
summaryText += body2cols.tqarg( i18n("Format"), unknownSafe( m_bundle.type() ) );
summaryText += body2cols.arg( i18n("Length"), unknownSafe( m_bundle.prettyLength() ) );
summaryText += body2cols.arg( i18n("Bitrate"), unknownSafe( m_bundle.prettyBitrate() ) );
summaryText += body2cols.arg( i18n("Samplerate"), unknownSafe( m_bundle.prettySampleRate() ) );
summaryText += body2cols.arg( i18n("Size"), unknownSafe( m_bundle.prettyFilesize() ) );
summaryText += body2cols.arg( i18n("Format"), unknownSafe( m_bundle.type() ) );
summaryText += "</table></td><td width=50%><table>";
if( AmarokConfig::useScores() )
summaryText += body2cols.tqarg( i18n("Score"), TQString::number( static_cast<int>( m_bundle.score() ) ) );
summaryText += body2cols.arg( i18n("Score"), TQString::number( static_cast<int>( m_bundle.score() ) ) );
if( AmarokConfig::useRatings() )
summaryText += body2cols.tqarg( i18n("Rating"), m_bundle.prettyRating() );
summaryText += body2cols.arg( i18n("Rating"), m_bundle.prettyRating() );
summaryText += body2cols.tqarg( i18n("Playcount"), TQString::number( m_bundle.playCount() ) );
summaryText += body2cols.tqarg( i18n("First Played"),
summaryText += body2cols.arg( i18n("Playcount"), TQString::number( m_bundle.playCount() ) );
summaryText += body2cols.arg( i18n("First Played"),
m_bundle.playCount() ? KGlobal::locale()->formatDate( CollectionDB::instance()->getFirstPlay( m_bundle.url().path() ).date() , true ) : i18n("Never") );
summaryText += body2cols.tqarg( i18n("a single item (singular)", "Last Played"),
summaryText += body2cols.arg( i18n("a single item (singular)", "Last Played"),
m_bundle.playCount() ? KGlobal::locale()->formatDate( CollectionDB::instance()->getLastPlay( m_bundle.url().path() ).date() , true ) : i18n("Never") );
summaryText += "</table></td></tr></table>";
@ -696,7 +696,7 @@ void TagDialog::readTags()
TQStringList sData = statisticsData();
for ( uint i = 0; i<sData.count(); i+=2 ) {
statisticsText += body2cols.tqarg( sData[i], sData[i+1] );
statisticsText += body2cols.arg( sData[i], sData[i+1] );
}
statisticsText += "</table>";
@ -916,15 +916,15 @@ TagDialog::readMultipleTracks()
TQString statisticsText = "<table>";
if( AmarokConfig::useRatings() ) {
statisticsText += body.tqarg( i18n( "Rated Songs" ) , TQString::number( ratingCount ) );
statisticsText += body.arg( i18n( "Rated Songs" ) , TQString::number( ratingCount ) );
if ( ratingCount )
statisticsText += body.tqarg( i18n( "Average Rating" ) , TQString::number( (float)ratingSum / (float)ratingCount/2.0, 'f', 1 ) );
statisticsText += body.arg( i18n( "Average Rating" ) , TQString::number( (float)ratingSum / (float)ratingCount/2.0, 'f', 1 ) );
}
if( AmarokConfig::useRatings() ) {
statisticsText += body.tqarg( i18n( "Scored Songs" ) , TQString::number( scoreCount ) );
statisticsText += body.arg( i18n( "Scored Songs" ) , TQString::number( scoreCount ) );
if ( scoreCount )
statisticsText += body.tqarg( i18n( "Average Score" ) , TQString::number( scoreSum / scoreCount, 'f', 1 ) );
statisticsText += body.arg( i18n( "Average Score" ) , TQString::number( scoreSum / scoreCount, 'f', 1 ) );
}
@ -1388,7 +1388,7 @@ TagDialog::generateHTML( const TQStringList &labels )
if ( labelUse == 0 )
labelUse = 1;
html.append( TQString( "<span class='label size%1'><a href=\"label:%2\">%3</a></span> " )
.tqarg( TQString::number( labelUse ), mapping[key].first, mapping[key].first ) );
.arg( TQString::number( labelUse ), mapping[key].first, mapping[key].first ) );
}
html.append( "</html></body>" );
debug() << "Dumping HTML for label cloud: " << html << endl;
@ -1418,7 +1418,7 @@ TagDialog::writeTag( MetaBundle &mb, bool updateCB )
TQCString path = TQFile::encodeName( mb.url().path() );
if ( !TagLib::File::isWritable( path ) ) {
Amarok::StatusBar::instance()->longMessage( i18n(
"The file %1 is not writable." ).tqarg( mb.url().fileName() ), KDE::StatusBar::Error );
"The file %1 is not writable." ).arg( mb.url().fileName() ), KDE::StatusBar::Error );
return false;
}
@ -1458,7 +1458,7 @@ TagDialogWriter::doJob()
TQCString path = TQFile::encodeName( m_tags[i].url().path() );
if ( !TagLib::File::isWritable( path ) ) {
Amarok::StatusBar::instance()->longMessageThreadSafe( i18n(
"The file %1 is not writable." ).tqarg( m_tags[i].url().fileName() ), KDE::StatusBar::Error );
"The file %1 is not writable." ).arg( m_tags[i].url().fileName() ), KDE::StatusBar::Error );
m_failed += true;
continue;
}
@ -1491,7 +1491,7 @@ TagDialogWriter::completeJob()
CollectionView::instance()->databaseChanged();
if ( m_failCount )
Amarok::StatusBar::instance()->longMessage( i18n(
"Sorry, the tag for the following files could not be changed:\n" ).tqarg( m_failedURLs.join( ";\n" ) ), KDE::StatusBar::Error );
"Sorry, the tag for the following files could not be changed:\n" ).arg( m_failedURLs.join( ";\n" ) ), KDE::StatusBar::Error );
}

@ -21,7 +21,7 @@
</property>
<widget class="TQLayoutWidget" row="2" column="0">
<property name="name">
<cstring>tqlayout5_3</cstring>
<cstring>layout5_3</cstring>
</property>
<hbox>
<property name="name">
@ -61,7 +61,7 @@
<property name="sizeType">
<enum>MinimumExpanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>215</width>
<height>30</height>
@ -106,7 +106,7 @@
</widget>
<widget class="TQLayoutWidget" row="1" column="0">
<property name="name">
<cstring>tqlayout6</cstring>
<cstring>layout6</cstring>
</property>
<hbox>
<property name="name">
@ -169,13 +169,13 @@
<property name="name">
<cstring>pixmap_cover</cstring>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>100</width>
<height>100</height>
</size>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>85</width>
<height>85</height>
@ -189,7 +189,7 @@
<property name="text">
<string>Track by Artist on Album</string>
</property>
<property name="tqalignment">
<property name="alignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
@ -217,7 +217,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>21</width>
<height>20</height>
@ -231,7 +231,7 @@
<property name="text">
<string></string>
</property>
<property name="tqalignment">
<property name="alignment">
<set>WordBreak|AlignTop</set>
</property>
</widget>
@ -286,7 +286,7 @@
</widget>
<widget class="TQLayoutWidget" row="8" column="1">
<property name="name">
<cstring>tqlayout14</cstring>
<cstring>layout14</cstring>
</property>
<hbox>
<property name="name">
@ -372,7 +372,7 @@
</widget>
<widget class="TQLayoutWidget" row="5" column="1">
<property name="name">
<cstring>tqlayout5_2</cstring>
<cstring>layout5_2</cstring>
</property>
<hbox>
<property name="name">
@ -473,7 +473,7 @@
</widget>
<widget class="TQLayoutWidget" row="3" column="1">
<property name="name">
<cstring>tqlayout11</cstring>
<cstring>layout11</cstring>
</property>
<hbox>
<property name="name">
@ -521,13 +521,13 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>50</width>
<height>0</height>
</size>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>100</width>
<height>32767</height>
@ -627,7 +627,7 @@
<property name="text">
<string>Track by Artist on Album</string>
</property>
<property name="tqalignment">
<property name="alignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
@ -641,7 +641,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>200</height>
@ -655,7 +655,7 @@
<property name="text">
<string></string>
</property>
<property name="tqalignment">
<property name="alignment">
<set>WordBreak|AlignTop</set>
</property>
</widget>
@ -669,7 +669,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>431</width>
<height>20</height>
@ -747,7 +747,7 @@
<property name="name">
<cstring>labels_favouriteLabelsFrame</cstring>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>0</width>
<height>120</height>

@ -149,7 +149,7 @@ Note that the order in which the schemes appear in the list is relevant, since t
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>60</height>
@ -202,6 +202,9 @@ Note that the order in which the schemes appear in the list is relevant, since t
<slot specifier="non virtual">slotModifyClicked()</slot>
<slot specifier="non virtual">slotRemoveClicked()</slot>
</Q_SLOTS>
<forwards>
<forward>class TQListViewItem;</forward>
</forwards>
<functions>
<function access="private" specifier="non virtual">init()</function>
</functions>

@ -369,7 +369,7 @@ ThreadManager::Job::setProgress( uint steps )
}
void
ThreadManager::Job::settqStatus( const TQString &status )
ThreadManager::Job::setStatus( const TQString &status )
{
m_status = status;
@ -390,7 +390,7 @@ ThreadManager::Job::customEvent( TQCustomEvent *e )
switch( progress )
{
case -2:
StatusBar::instance()->setProgresstqStatus( this, m_status );
StatusBar::instance()->setProgressStatus( this, m_status );
break;
case -1:

@ -76,7 +76,7 @@
*/
/// This class is because tqmoc "is really good" (no nested Q_OBJECT classes)
/// This class is because moc "is really good" (no nested Q_OBJECT classes)
class JobBase : public TQObject {
Q_OBJECT
TQ_OBJECT
@ -287,7 +287,7 @@ public:
/**
* If you set progress information, you should set this too, changing it when appropriate
*/
void settqStatus( const TQString &status );
void setStatus( const TQString &status );
/**
* This shows the progressBar too, the user will be able to abort
@ -375,7 +375,7 @@ public:
*
* It is only safe to have one dependent, if you depend on multiple objects
* that might get deleted while you are running you should instead try to
* make the multiple objects tqchildren of one TQObject and depend on the
* make the multiple objects children of one TQObject and depend on the
* top-most parent or best of all would be to make copies of the data you
* need instead of being dependent.
*/

@ -151,9 +151,9 @@ void Amarok::ToolTip::maybeTip( const TQPoint &pos )
void Amarok::ToolTip::showTip()
{
m_timer.start( 15000, true );
if( !isVisible() || tqsizeHint() != size() )
if( !isVisible() || sizeHint() != size() )
{
resize( tqsizeHint() );
resize( sizeHint() );
position();
}
if( !isVisible() )
@ -176,9 +176,9 @@ void Amarok::ToolTip::drawContents( TQPainter *painter )
{
TQPixmap buf( width(), height() );
TQPainter p( &buf );
buf.fill( tqcolorGroup().background() );
buf.fill( colorGroup().background() );
p.setPen( tqcolorGroup().foreground() );
p.setPen( colorGroup().foreground() );
p.drawRect( buf.rect() );
TQSimpleRichText text( s_text, TQToolTip::parentWidget()->font() );
@ -188,12 +188,12 @@ void Amarok::ToolTip::drawContents( TQPainter *painter )
: s_hack == 1 ? TQPoint(4, -2)
: TQPoint(2, -2); //HACK positioning
p.setFont( TQToolTip::parentWidget()->font() );
text.draw( &p, pos.x(), pos.y(), rect(), tqcolorGroup() );
text.draw( &p, pos.x(), pos.y(), rect(), colorGroup() );
painter->drawPixmap( 0, 0, buf );
}
TQSize Amarok::ToolTip::tqsizeHint() const
TQSize Amarok::ToolTip::sizeHint() const
{
if( !s_rect.isNull() )
return s_rect.size();
@ -208,7 +208,7 @@ TQSize Amarok::ToolTip::tqsizeHint() const
void Amarok::ToolTip::position()
{
const TQRect drect = TQApplication::desktop()->availableGeometry( TQToolTip::parentWidget() );
const TQSize size = tqsizeHint();
const TQSize size = sizeHint();
const int width = size.width(), height = size.height();
TQPoint pos;
if( !s_rect.isNull() )

@ -65,7 +65,7 @@ private:
static Manager* s_manager;
public:
virtual TQSize tqsizeHint() const;
virtual TQSize sizeHint() const;
protected:
virtual void maybeTip( const TQPoint &pos );

@ -34,7 +34,7 @@
<property name="title">
<string>File Name</string>
</property>
<property name="tqalignment">
<property name="alignment">
<set>AlignTop</set>
</property>
<hbox>
@ -53,7 +53,7 @@
<property name="text">
<string></string>
</property>
<property name="tqalignment">
<property name="alignment">
<set>AlignVCenter|AlignLeft</set>
</property>
<property name="indent">
@ -79,7 +79,7 @@
<property name="title">
<string>Select Best Possible Match</string>
</property>
<property name="tqalignment">
<property name="alignment">
<set>AlignTop</set>
</property>
<vbox>

@ -114,14 +114,14 @@ void TrackToolTip::setTrack( const MetaBundle &tags, bool force )
TQString s;
for( int i = 0; i < rating / 2; ++i )
s += TQString( "<img src=\"%1\" height=\"%2\" width=\"%3\">" )
.tqarg( locate( "data", "amarok/images/star.png" ) )
.tqarg( TQFontMetrics( TQToolTip::font() ).height() )
.tqarg( TQFontMetrics( TQToolTip::font() ).height() );
.arg( locate( "data", "amarok/images/star.png" ) )
.arg( TQFontMetrics( TQToolTip::font() ).height() )
.arg( TQFontMetrics( TQToolTip::font() ).height() );
if( rating % 2 )
s += TQString( "<img src=\"%1\" height=\"%2\" width=\"%3\">" )
.tqarg( locate( "data", "amarok/images/smallstar.png" ) )
.tqarg( TQFontMetrics( TQToolTip::font() ).height() )
.tqarg( TQFontMetrics( TQToolTip::font() ).height() );
.arg( locate( "data", "amarok/images/smallstar.png" ) )
.arg( TQFontMetrics( TQToolTip::font() ).height() )
.arg( TQFontMetrics( TQToolTip::font() ).height() );
right << s;
left << playlist->columnText( column );
}
@ -163,7 +163,7 @@ void TrackToolTip::setTrack( const MetaBundle &tags, bool force )
}
right << TQString( "<img src=\"%1\" height=\"%2\" width=\"%3\">" )
.tqarg( filename ).tqarg( height ).tqarg( MOODBAR_WIDTH );
.arg( filename ).arg( height ).arg( MOODBAR_WIDTH );
}
break;
@ -237,10 +237,10 @@ void TrackToolTip::setTrack( const MetaBundle &tags, bool force )
if (tags.title().isEmpty() || tags.artist().isEmpty())
// no title or no artist, so we add prettyTitle
m_tooltip += TQString ("<tr><td align=center colspan='2'>%1</td></tr>")
.tqarg(tags.veryNiceTitle());
.arg(tags.veryNiceTitle());
for( uint x = 0; x < left.count(); ++x )
if ( !right[x].isEmpty() )
m_tooltip += tableRow.tqarg( left[x] ).tqarg( right[x] );
m_tooltip += tableRow.arg( left[x] ).arg( right[x] );
m_tooltip += "</table></td>";
m_tooltip += "</tr></table></center>";
@ -332,13 +332,13 @@ TQString TrackToolTip::tooltip() const
if( !m_tags.isEmpty() )
{
if( !m_cover.isEmpty() )
tip = tip.tqarg( TQString( "<td><table cellpadding='0' cellspacing='0'><tr><td>"
tip = tip.arg( TQString( "<td><table cellpadding='0' cellspacing='0'><tr><td>"
"<img src='%1'>"
"</td></tr></table></td>" ).tqarg( m_cover ) );
"</td></tr></table></td>" ).arg( m_cover ) );
else
tip = tip.tqarg("");
tip = tip.arg("");
if( m_haspos )
tip = tip.tqarg( MetaBundle::prettyLength( m_pos / 1000, true ) );
tip = tip.arg( MetaBundle::prettyLength( m_pos / 1000, true ) );
}
return tip;
}

@ -45,13 +45,13 @@ TransferDialog::TransferDialog( MediaDevice *mdev )
TQGroupBox *location = new TQGroupBox( 1, Qt::Vertical, i18n( "Music Location" ), vbox );
new TQLabel( i18n( "Your music will be transferred to:\n%1" )
.tqarg( transferDir ), location );
.arg( transferDir ), location );
TQVBox *vbox2 = new TQVBox( vbox );
TQSpacerItem *spacer = new TQSpacerItem( 0, 25 );
TQLayout *vtqlayout = vbox2->tqlayout();
if( vtqlayout )
vtqlayout->addItem( spacer );
TQLayout *vlayout = vbox2->layout();
if( vlayout )
vlayout->addItem( spacer );
new TQLabel( i18n( "You can have your music automatically grouped in\n"
"a variety of ways. Each grouping will create\n"
@ -94,9 +94,9 @@ TransferDialog::TransferDialog( MediaDevice *mdev )
TQVBox *vbox3 = new TQVBox( vbox );
TQSpacerItem *spacer2 = new TQSpacerItem( 0, 25 );
TQLayout *vtqlayout2 = vbox3->tqlayout();
if( vtqlayout2 )
vtqlayout2->addItem( spacer2 );
TQLayout *vlayout2 = vbox3->layout();
if( vlayout2 )
vlayout2->addItem( spacer2 );
TQGroupBox *options = new TQGroupBox( 6, Qt::Vertical, i18n( "Options" ), vbox );

@ -30,7 +30,7 @@ MetaBundle::XmlLoader::XmlLoader(): m_aborted( false ), m_target( 0 )
m_reader.setErrorHandler( this );
}
MetaBundle::XmlLoader::~XmlLoader() {}
MetaBundle::XmlLoader::~XmlLoader(){}
bool MetaBundle::XmlLoader::load( TQXmlInputSource *source, TQObject *target )
{
@ -213,7 +213,7 @@ bool MetaBundle::XmlLoader::fatalError( const TQXmlParseException &e )
bundleLoaded();
m_lastError = TQString( "Error loading XML: \"%1\", at line %2, column %3." )
.tqarg( e.message(), TQString::number( e.lineNumber() ), TQString::number( e.columnNumber() ) );
.arg( e.message(), TQString::number( e.lineNumber() ), TQString::number( e.columnNumber() ) );
errorEncountered( e.message(), e.lineNumber(), e.columnNumber() );
return false;

@ -136,7 +136,7 @@ class MetaBundle::XmlLoader: public TQObject, public TQXmlDefaultHandler
* @param bundle the loaded MetaBundle
* @param extraAttributes any extra attributes in the XML not recognized
*/
void newBundle( const MetaBundle &bundle, const XmlAttributeList &extraAttributes );
void newBundle( const MetaBundle& bundle, const XmlAttributeList& extraAttributes );
/** Emitted when an error occurs. */
void error( const TQString &errorMessage );
@ -172,7 +172,7 @@ class MetaBundle::XmlLoader: public TQObject, public TQXmlDefaultHandler
virtual bool endDocument();
virtual bool fatalError( const TQXmlParseException &exception );
public: //fucking tqmoc, these should be private
public: //these should be private
class ThreadedLoader;
class SimpleLoader;
};

@ -12,7 +12,10 @@
#cmakedefine HAVE_ITDB_MEDIATYPE 1
#cmakedefine HAVE_LIBGPOD_060 1
#cmakedefine HAVE_MP4V2 1
#cmakedefine HAVE_MP4V2_H 1
#cmakedefine HAVE_MP4_H 1
#cmakedefine HAVE_TUNEPIMP 1
#cmakedefine TAGLIB_15 1
#cmakedefine HAVE_QGLWIDGET 1
#cmakedefine HAVE_OLD_RUBY @HAVE_OLD_RUBY@

@ -1,5 +1,8 @@
/* config.h.in. Generated from configure.in by autoheader. */
/* Define if building universal (internal helper macro) */
#undef AC_APPLE_UNIVERSAL_BUILD
/* Amazon cover download support enabled */
#undef AMAZON_SUPPORT
@ -103,6 +106,9 @@
/* have mp4v2 */
#undef HAVE_MP4V2
/* Define to 1 if you have the <mp4v2/mp4v2.h> header file. */
#undef HAVE_MP4V2_H
/* Define to 1 if you have the <mp4.h> header file. */
#undef HAVE_MP4_H
@ -121,6 +127,9 @@
/* Define if you have the res_init prototype */
#undef HAVE_RES_INIT_PROTO
/* Defines if your system has Ruby 1.9.x */
#undef HAVE_RUBY_1_9
/* Define to 1 if you have the <ruby.h> header file. */
#undef HAVE_RUBY_H
@ -214,6 +223,10 @@
/* Suffix for lib directories */
#undef KDELIBSUFF
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Name of package */
#undef PACKAGE
@ -229,6 +242,9 @@
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
@ -283,6 +299,18 @@
/* Defined if compiling without arts */
#undef WITHOUT_ARTS
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
# undef WORDS_BIGENDIAN
# endif
#endif
/*
* jpeg.h needs HAVE_BOOLEAN, when the system uses boolean in system
* headers and I'm too lazy to write a configure test as long as only

File diff suppressed because it is too large Load Diff

@ -24,7 +24,7 @@ or by selecting <menuchoice><guimenu>Settings</guimenu> <guimenuitem>Configure &
<para><guilabel>Show player window (like XMMS)</guilabel>: Turns on the XMMS-like <link linkend="player-window">Player Window</link>. When un-checked, only the <link linkend="playlist-window">Playlist Window</link>, which resembles a display mode similar to the Juk interface, is shown.</para>
<para><guilabel>Use Moodbar</guilabel>: only visible when &amarok; is compiled with moodbar support. This turns on the experimental moodbar support.</para>
<para><guilabel>Make Moodier</guilabel>: only visible when &amarok; is compiled with moodbar support. It changes the color scheme used for the moodbar.</para>
<para><guilabel>Store Mood data files with music</guilabel>: only visible when &amarok; is compiled with moodbar support. When enabled, this option allows saving of <literal role="extension">.mood</literal> files in the same location as the corresponding audio file. When disabled, the <literal role="extension">.mood</literal> files are saved within the &amarok; settings directory; usually <filename class="directory">~/.kde/share/apps/amarok/moodbar/</filename>.</para>
<para><guilabel>Store Mood data files with music</guilabel>: only visible when &amarok; is compiled with moodbar support. When enabled, this option allows saving of <literal role="extension">.mood</literal> files in the same location as the corresponding audio file. When disabled, the <literal role="extension">.mood</literal> files are saved within the &amarok; settings directory; usually <filename class="directory">~/.trinity/share/apps/amarok/moodbar/</filename>.</para>
<para><guilabel>Default size of cover previews</guilabel>: allows adjusting the size of the album cover image in the Context Browser.</para>
<para><guilabel>External web browser:</guilabel> allows choosing what &amarok; uses to open external links via a drop-down menu listing the installed browsers.</para>
<para><guilabel>Use another browser:</guilabel> allows you to specify the location to a browser not listed in the above menu.</para>

@ -53,7 +53,7 @@
</question>
<answer>
<para>It's likely that one file in your Collection triggers a bug in the TagLib library, and makes &amarok; crash. You can identify this file by looking at ~/.kde/share/apps/amarok/collection_scan.log. You should report this crash to the TagLib bug database on <ulink url="http://bugs.kde.org/">bugs.kde.org</ulink> and attach the broken file. Afterward you can remove the file from your Collection and repeat the scanning.</para>
<para>It's likely that one file in your Collection triggers a bug in the TagLib library, and makes &amarok; crash. You can identify this file by looking at ~/.trinity/share/apps/amarok/collection_scan.log. You should report this crash to the TagLib bug database on <ulink url="http://bugs.kde.org/">bugs.kde.org</ulink> and attach the broken file. Afterward you can remove the file from your Collection and repeat the scanning.</para>
</answer>
</qandaentry>
@ -608,8 +608,8 @@ Tray icon is also a song position indicator.</para>
</question>
<answer>
<para>~/.kde/share/apps/amarok
~/.kde/share/config/amarokrc</para>
<para>~/.trinity/share/apps/amarok
~/.trinity/share/config/amarokrc</para>
</answer>
</qandaentry>
@ -653,7 +653,7 @@ Tray icon is also a song position indicator.</para>
</question>
<answer>
<para>The internal SQLite database which &amarok; uses by default does not work on NFS. You must either link your ~/.kde/share/apps/amarok directory to a local drive, or use the MySQL support.</para>
<para>The internal SQLite database which &amarok; uses by default does not work on NFS. You must either link your ~/.trinity/share/apps/amarok directory to a local drive, or use the MySQL support.</para>
</answer>
</qandaentry>

@ -80,7 +80,7 @@
>-filer på samme sted som tilsvarende lydfil. Når dette er deaktiveret, opbevares <literal role="extension"
>.mood</literal
>-filerne inde i &amarok;s indstillingsmappe, oftest <filename class="directory"
>~/.kde/share/apps/amarok/moodbar/</filename
>~/.trinity/share/apps/amarok/moodbar/</filename
>.</para>
<para
><guilabel

@ -70,7 +70,7 @@
<answer>
<para
>Det er sandsynligt at en fil i din samling udløser en fejl i biblioteket TagLib, og det får &amarok; til at bryde sammen. Du kan identificere filen ved at kigge i ~/.kde/share/apps/amarok/collection_scan.log. Du bør rapportere sammenbruddet til fejldatabasen for TagLib på <ulink url="http://bugs.kde.org/"
>Det er sandsynligt at en fil i din samling udløser en fejl i biblioteket TagLib, og det får &amarok; til at bryde sammen. Du kan identificere filen ved at kigge i ~/.trinity/share/apps/amarok/collection_scan.log. Du bør rapportere sammenbruddet til fejldatabasen for TagLib på <ulink url="http://bugs.kde.org/"
>bugs.kde.org</ulink
> og vedføje den fejlagtige fil. Derefter kan du fjerne filen fra din samling og gentage søgningen.</para>
</answer>
@ -813,7 +813,7 @@ print "Fejl ved skrivning af mærket til $ARGV[0]\n" unless $mp3->set_v2tag($v2t
<answer>
<para
>~/.kde/share/apps/amarok ~/.kde/share/config/amarokrc</para>
>~/.trinity/share/apps/amarok ~/.trinity/share/config/amarokrc</para>
</answer>
</qandaentry>
@ -866,7 +866,7 @@ print "Fejl ved skrivning af mærket til $ARGV[0]\n" unless $mp3->set_v2tag($v2t
<answer>
<para
>Den interne databasen SQLite som &amarok; normalt bruger fungerer ikke med NFS. Du skal enten lave et link til en lokal enhed for mappen ~/.kde/share/apps/amarok, eller bruge understøttelse for MySQL.</para>
>Den interne databasen SQLite som &amarok; normalt bruger fungerer ikke med NFS. Du skal enten lave et link til en lokal enhed for mappen ~/.trinity/share/apps/amarok, eller bruge understøttelse for MySQL.</para>
</answer>
</qandaentry>

@ -80,7 +80,7 @@
>-Dateien am Speicherort der entsprechenden Musikdateien abgelegt. Ansonsten werden die <literal role="extension"
>.mood</literal
>-Dateien im Einstellungen-Ordner von &amarok; gespeichert (normalerweise <filename class="directory"
>~/.kde/share/apps/amarok/moodbar/</filename
>~/.trinity/share/apps/amarok/moodbar/</filename
>).</para>
<para
><guilabel

@ -70,7 +70,7 @@
<answer>
<para
>Wahrscheinlich bringt eine Ihrer Dateien einen Fehler in der TagLib-Bibliothek zu Tage. Sie können die Datei ausfindig machen, indem Sie in ~/.kde/share/apps/amarok/collection_scan.log nachsehen. Bitte berichten Sie diesen Fehler an die TagLib-Entwickler unter <ulink url="http://bugs.kde.org/"
>Wahrscheinlich bringt eine Ihrer Dateien einen Fehler in der TagLib-Bibliothek zu Tage. Sie können die Datei ausfindig machen, indem Sie in ~/.trinity/share/apps/amarok/collection_scan.log nachsehen. Bitte berichten Sie diesen Fehler an die TagLib-Entwickler unter <ulink url="http://bugs.kde.org/"
>bugs.kde.org</ulink
> und hängen Sie auch die kaputte Datei an, die den Absturz verursacht hat. Danach können Sie die Datei löschen und die Sammlung erneut erstellen lassen.</para>
</answer>
@ -817,7 +817,7 @@ print "Fehler beim Schreiben der Tags von $ARGV[0]\n" unless $mp3->set_v2tag($v2
<answer>
<para
>~/.kde/share/apps/amarok ~/.kde/share/config/amarokrc</para>
>~/.trinity/share/apps/amarok ~/.trinity/share/config/amarokrc</para>
</answer>
</qandaentry>
@ -870,7 +870,7 @@ print "Fehler beim Schreiben der Tags von $ARGV[0]\n" unless $mp3->set_v2tag($v2
<answer>
<para
>Die interne SQLite-Datenbank von &amarok; funktioniert nicht mit NFS. Entweder müssen Sie ~/.kde/share/apps/amarok auf ein lokales Laufwerk verlinken, oder benutzen Sie amaroKs MySQL-Unterstützung.</para>
>Die interne SQLite-Datenbank von &amarok; funktioniert nicht mit NFS. Entweder müssen Sie ~/.trinity/share/apps/amarok auf ein lokales Laufwerk verlinken, oder benutzen Sie amaroKs MySQL-Unterstützung.</para>
</answer>
</qandaentry>

@ -80,7 +80,7 @@
> en la misma ubicación que el archivo de audio. Cuando está desactivada, los archivos <literal role="extension"
>.mood</literal
> se guardarán en el directorio de configuración de &amarok;, generalmente <filename class="directory"
>~/.kde/share/apps/amarok/moodbar/</filename
>~/.trinity/share/apps/amarok/moodbar/</filename
>.</para>
<para
><guilabel

@ -70,7 +70,7 @@
<answer>
<para
>Es probable que un archivo de su colección provoque un fallo en la biblioteca TagLib, y haga que &amarok; se cuelgue. Puede identificar este archivo echando un vistazo a ~/.kde/share/apps/amarok/collection_scan.log. Debería informar de este cuelgue como un fallo de la base de datos de TagLib en <ulink url="http://bugs.kde.org/"
>Es probable que un archivo de su colección provoque un fallo en la biblioteca TagLib, y haga que &amarok; se cuelgue. Puede identificar este archivo echando un vistazo a ~/.trinity/share/apps/amarok/collection_scan.log. Debería informar de este cuelgue como un fallo de la base de datos de TagLib en <ulink url="http://bugs.kde.org/"
>bugs.kde.org</ulink
> y asociar el archivo corrompido. Después puede eliminar el archivo de su colección y repetir la exploración.</para>
</answer>
@ -795,7 +795,7 @@ print "Error al escribir las etiquetas de $ARGV[0]\n" unless $mp3->set_v2tag($v2
<answer>
<para
>~/.kde/share/apps/amarok ~/.kde/share/config/amarokrc</para>
>~/.trinity/share/apps/amarok ~/.trinity/share/config/amarokrc</para>
</answer>
</qandaentry>
@ -848,7 +848,7 @@ print "Error al escribir las etiquetas de $ARGV[0]\n" unless $mp3->set_v2tag($v2
<answer>
<para
>La base de datos SQLite que utiliza &amarok; de forma predeterminada no funciona en NFS. Debe enlazar su directorio ~/.kde/share/apps/amarok en una unidad local, o utilizar el soporte MySQL.</para>
>La base de datos SQLite que utiliza &amarok; de forma predeterminada no funciona en NFS. Debe enlazar su directorio ~/.trinity/share/apps/amarok en una unidad local, o utilizar el soporte MySQL.</para>
</answer>
</qandaentry>

@ -80,7 +80,7 @@
> vastava helifailiga samasse asukohta. Kui see pole sisse lülitatud, salvestada <literal role="extension"
>.mood</literal
>-failid &amarok;i seadistustekataloogi, milleks tavaliselt on <filename class="directory"
>~/.kde/share/apps/amarok/moodbar/</filename
>~/.trinity/share/apps/amarok/moodbar/</filename
>.</para>
<para
><guilabel

@ -70,7 +70,7 @@
<answer>
<para
>Tõenäoliselt käivitab teatud muusikakogu fail mingi vea teegis TagLib, mis toobki kaasa &amarok;i krahhi. Selle faili saab üle leida logifaili ~/.kde/share/apps/amarok/collection_scan.log uurides. Krahhist tuleks teada anda TabLibi vigade andmebaasi aadressil <ulink url="http://bugs.kde.org/"
>Tõenäoliselt käivitab teatud muusikakogu fail mingi vea teegis TagLib, mis toobki kaasa &amarok;i krahhi. Selle faili saab üle leida logifaili ~/.trinity/share/apps/amarok/collection_scan.log uurides. Krahhist tuleks teada anda TabLibi vigade andmebaasi aadressil <ulink url="http://bugs.kde.org/"
>bugs.kde.org</ulink
> ning lisaks veateatele tuleks kaasa panna ka vea tekitanud fail. Seejärel võid proovida antud faili muusikakogust eemaldada ja kogu taas läbi uurida lasta.</para>
</answer>
@ -795,7 +795,7 @@ print "Error writing tags of $ARGV[0]\n" unless $mp3->set_v2tag($v2tag,&amp;UTF8
<answer>
<para
>~/.kde/share/apps/amarok ~/.kde/share/config/amarokrc</para>
>~/.trinity/share/apps/amarok ~/.trinity/share/config/amarokrc</para>
</answer>
</qandaentry>
@ -848,7 +848,7 @@ print "Error writing tags of $ARGV[0]\n" unless $mp3->set_v2tag($v2tag,&amp;UTF8
<answer>
<para
>Seesmine SQLite'i andmebaas, mida &amarok; vaikimisi kasutab, ei tööta NFS-i korral. Sul tuleb kas linkida oma kataloog ~/.kde/share/apps/amarok kohaliku kettaga või kasutada MySQL-i tuge.</para>
>Seesmine SQLite'i andmebaas, mida &amarok; vaikimisi kasutab, ei tööta NFS-i korral. Sul tuleb kas linkida oma kataloog ~/.trinity/share/apps/amarok kohaliku kettaga või kasutada MySQL-i tuge.</para>
</answer>
</qandaentry>

@ -706,7 +706,7 @@
<entry
>La fonction <quote
>saveCurrentPlaylist</quote
> enregistre la liste de lecture sous ~/.kde/share/apps/amarok/current.xml.</entry>
> enregistre la liste de lecture sous ~/.trinity/share/apps/amarok/current.xml.</entry>
</row>

@ -80,7 +80,7 @@
> au même endroit que les fichiers audios correspondants. Lorsqu'elle est désactivée, les fichiers <literal role="extension"
>.mood</literal
> sont enregistrés dans le dossier de configuration d'&amarok; ; habituellement <filename class="directory"
>~/.kde/share/apps/amarok/moodbar/</filename
>~/.trinity/share/apps/amarok/moodbar/</filename
>.</para>
<para
><guilabel

@ -70,7 +70,7 @@
<answer>
<para
>Il est probable qu'un des fichiers de votre collection déclenche un bogue dans la librairie TagLib, et fasse planter &amarok;. Vous pouvez identifier ce fichier en regardant dans ~/.kde/share/apps/amarok/collection_scan.log. Vous pouvez rapporter ce bogue à la librairie TagLib sur <ulink url="http://bugs.kde.org/"
>Il est probable qu'un des fichiers de votre collection déclenche un bogue dans la librairie TagLib, et fasse planter &amarok;. Vous pouvez identifier ce fichier en regardant dans ~/.trinity/share/apps/amarok/collection_scan.log. Vous pouvez rapporter ce bogue à la librairie TagLib sur <ulink url="http://bugs.kde.org/"
>bugs.kde.org</ulink
> et joindre le fichier qui cause l'erreur. Vous pouvez ensuite retirer le fichier de votre collection.</para>
</answer>
@ -853,7 +853,7 @@ print "Erreur a l'écriture des balises de $ARGV[0]\n" unless $mp3->set_v2tag($v
<answer>
<para
>~/.kde/share/apps/amarok ~/.kde/share/config/amarokrc</para>
>~/.trinity/share/apps/amarok ~/.trinity/share/config/amarokrc</para>
</answer>
</qandaentry>
@ -906,7 +906,7 @@ print "Erreur a l'écriture des balises de $ARGV[0]\n" unless $mp3->set_v2tag($v
<answer>
<para
>La base de données interne SQLite qu'&amarok; utilise par défaut ne fonctionne pas avec NFS. Vous devez soit créer un lien de ~/.kde/share/apps/amarok vers un disque local, soit utiliser MySQL.</para>
>La base de données interne SQLite qu'&amarok; utilise par défaut ne fonctionne pas avec NFS. Vous devez soit créer un lien de ~/.trinity/share/apps/amarok vers un disque local, soit utiliser MySQL.</para>
</answer>
</qandaentry>

@ -80,7 +80,7 @@
> nella stessa posizione del corrispondente file audio. Se disabilitata, i file <literal role="extension"
>.mood</literal
> sono salvati nella cartella delle impostazioni di &amarok;; di solito <filename class="directory"
>~/.kde/share/apps/amarok/moodbar/</filename
>~/.trinity/share/apps/amarok/moodbar/</filename
>.</para>
<para
><guilabel

@ -70,7 +70,7 @@
<answer>
<para
>È probabile che un file nella collezione causi un errore nella libreria TagLib e faccia arrestare &amarok;. Si può identificare questo file guardando ~/.kde/share/apps/amarok/collection_scan.log. Bisognerebbe segnalare questo crash al database di bug di TagLib su <ulink url="http://bugs.kde.org/"
>È probabile che un file nella collezione causi un errore nella libreria TagLib e faccia arrestare &amarok;. Si può identificare questo file guardando ~/.trinity/share/apps/amarok/collection_scan.log. Bisognerebbe segnalare questo crash al database di bug di TagLib su <ulink url="http://bugs.kde.org/"
>bugs.kde.org</ulink
> ed allegare il file in questione. In seguito si può rimuovere il file dalla collezione e ripetere la scansione.</para>
</answer>
@ -797,7 +797,7 @@ print "Error writing tags of $ARGV[0]\n" unless $mp3->set_v2tag($v2tag,&amp;UTF8
<answer>
<para
>~/.kde/share/apps/amarok ~/.kde/share/config/amarokrc</para>
>~/.trinity/share/apps/amarok ~/.trinity/share/config/amarokrc</para>
</answer>
</qandaentry>
@ -850,7 +850,7 @@ print "Error writing tags of $ARGV[0]\n" unless $mp3->set_v2tag($v2tag,&amp;UTF8
<answer>
<para
>Il database interno SQLite che &amarok; usa automaticamente non lavora in NFS. Bisogna collegare la cartella ~/.kde/share/apps/amarok ad un disco locale, oppure usare il supporto MySQL.</para>
>Il database interno SQLite che &amarok; usa automaticamente non lavora in NFS. Bisogna collegare la cartella ~/.trinity/share/apps/amarok ad un disco locale, oppure usare il supporto MySQL.</para>
</answer>
</qandaentry>

@ -80,7 +80,7 @@
> worden opgeslagen in de map van het overeenkomende audiobestand. Wanneer uitgeschakeld worden de <literal role="extension"
>.mood</literal
>-bestanden opgeslagen in de instellingenmap van &amarok;, dit is gebruikelijk de map <filename class="directory"
>~/.kde/share/apps/amarok/moodbar/</filename
>~/.trinity/share/apps/amarok/moodbar/</filename
>.</para>
<para
><guilabel

@ -70,7 +70,7 @@
<answer>
<para
>Het is zeer waarschijnlijk dat uw collectie een fout in de taglib-bibliotheek tegenkomt, waardoor &amarok; crasht. U kunt dit bestand achterhalen door te zoeken in het bestand ~/.kde/share/apps/amarok/collection_scan.log. Meldt deze crash aan de Taglib-bugdatabase op <ulink url="http://bugs.kde.org/"
>Het is zeer waarschijnlijk dat uw collectie een fout in de taglib-bibliotheek tegenkomt, waardoor &amarok; crasht. U kunt dit bestand achterhalen door te zoeken in het bestand ~/.trinity/share/apps/amarok/collection_scan.log. Meldt deze crash aan de Taglib-bugdatabase op <ulink url="http://bugs.kde.org/"
>bugs.kde.org</ulink
> en voeg het beschadigde bestand bij. Naderhand kunt u het bestand uit uw collectie verwijderen en het scannen herhalen.</para>
</answer>
@ -823,7 +823,7 @@ print "Error writing tags of $ARGV[0]\n" unless $mp3->set_v2tag($v2tag,&amp;UTF8
<answer>
<para
>~/.kde/share/apps/amarok ~/.kde/share/config/amarokrc</para>
>~/.trinity/share/apps/amarok ~/.trinity/share/config/amarokrc</para>
</answer>
</qandaentry>
@ -876,7 +876,7 @@ print "Error writing tags of $ARGV[0]\n" unless $mp3->set_v2tag($v2tag,&amp;UTF8
<answer>
<para
>De internet SQLite-database die &amarok; standaard gebruikt werkt niet over NFS. Maak een symbolische koppeling van de map ~/.kde/share/apps/amarok naar een lokaal station, of gebruik MySQL.</para>
>De internet SQLite-database die &amarok; standaard gebruikt werkt niet over NFS. Maak een symbolische koppeling van de map ~/.trinity/share/apps/amarok naar een lokaal station, of gebruik MySQL.</para>
</answer>
</qandaentry>

@ -80,7 +80,7 @@
> w lokalizacji odpowiadającego plikowi dźwiękowemu. Jeżeli jest wyłączone, pliki <literal role="extension"
>.mood</literal
> są zapisywane w katalogu ustawień &amarok-dopelniacz;; zazwyczaj <filename class="directory"
>~/.kde/share/apps/amarok/moodbar/</filename
>~/.trinity/share/apps/amarok/moodbar/</filename
>.</para>
<para
><guilabel

@ -70,7 +70,7 @@
<answer>
<para
>Prawdopodobnie jeden z Twoich plików muzycznych powoduje wystąpienie błędu w bibliotece TagLib, co znowu powoduje awarię &amarok-dopelniacz;. Możesz zidentyfikować feralny plik, zaglądając do ~/.kde/share/apps/amarok/collection_scan.log. Powinieneś zgłosić błąd w TagLib, można to zrobić na stronie <ulink url="http://bugs.kde.org/"
>Prawdopodobnie jeden z Twoich plików muzycznych powoduje wystąpienie błędu w bibliotece TagLib, co znowu powoduje awarię &amarok-dopelniacz;. Możesz zidentyfikować feralny plik, zaglądając do ~/.trinity/share/apps/amarok/collection_scan.log. Powinieneś zgłosić błąd w TagLib, można to zrobić na stronie <ulink url="http://bugs.kde.org/"
>bugs.kde.org</ulink
>. Nie zapomnij wysłać pliku muzycznego, który powoduje wystąpienie błędu. Zanim błąd zostanie naprawiony, przenieś ów plik w miejsce, które nie jest skanowane przy tworzeniu Kolekcji.</para>
</answer>
@ -795,7 +795,7 @@ print "Błąd podczas zapisywania znaczników do pliku $ARGV[0]\n" unless $mp3->
<answer>
<para
>~/.kde/share/apps/amarok ~/.kde/share/config/amarokrc</para>
>~/.trinity/share/apps/amarok ~/.trinity/share/config/amarokrc</para>
</answer>
</qandaentry>
@ -848,7 +848,7 @@ print "Błąd podczas zapisywania znaczników do pliku $ARGV[0]\n" unless $mp3->
<answer>
<para
>Zintegrowana baza danych SQLite, której domyślnie używa &amarok-mianownik;. nie działa na NFS. Musisz dowiązać katalog ~/.kde/share/apps/amarok do lokalnego dysku lub użyć MySQL.</para>
>Zintegrowana baza danych SQLite, której domyślnie używa &amarok-mianownik;. nie działa na NFS. Musisz dowiązać katalog ~/.trinity/share/apps/amarok do lokalnego dysku lub użyć MySQL.</para>
</answer>
</qandaentry>

@ -80,7 +80,7 @@
> no mesmo local que o ficheiro de áudio correspondente. Se estiver desactivada, os ficheiros <literal role="extension"
>.mood</literal
> serão gravados na pasta de configuração do &amarok;, normalmente a <filename class="directory"
>~/.kde/share/apps/amarok/moodbar/</filename
>~/.trinity/share/apps/amarok/moodbar/</filename
>.</para>
<para
><guilabel

@ -70,7 +70,7 @@
<answer>
<para
>É provável que um ficheiro da sua Colecção despolete um erro na biblioteca TagLib, fazendo com que o &amarok; estoire. Poderá identificar este ficheiro, se olhar para o ficheiro ~/.kde/share/apps/amarok/collection_scan.log. Deverá comunicar este estoiro à base de dados de erros da TagLib em <ulink url="http://bugs.kde.org/"
>É provável que um ficheiro da sua Colecção despolete um erro na biblioteca TagLib, fazendo com que o &amarok; estoire. Poderá identificar este ficheiro, se olhar para o ficheiro ~/.trinity/share/apps/amarok/collection_scan.log. Deverá comunicar este estoiro à base de dados de erros da TagLib em <ulink url="http://bugs.kde.org/"
>bugs.kde.org</ulink
> e anexar o ficheiro corrompido. Depois disso, poderá remover o ficheiro da sua Colecção e repetir a pesquisa.</para>
</answer>
@ -803,7 +803,7 @@ print "Erro ao escrever as marcas em $ARGV[0]\n" unless $mp3->set_v2tag($v2tag,&
<answer>
<para
>~/.kde/share/apps/amarok ~/.kde/share/config/amarokrc</para>
>~/.trinity/share/apps/amarok ~/.trinity/share/config/amarokrc</para>
</answer>
</qandaentry>
@ -856,7 +856,7 @@ print "Erro ao escrever as marcas em $ARGV[0]\n" unless $mp3->set_v2tag($v2tag,&
<answer>
<para
>A base de dados interna em SQLite, que o &amarok; usa por omissão, não funciona em NFS. Deverá associar a sua pasta ~/.kde/share/apps/amarok a uma unidade local ou então usar o suporte de MySQL.</para>
>A base de dados interna em SQLite, que o &amarok; usa por omissão, não funciona em NFS. Deverá associar a sua pasta ~/.trinity/share/apps/amarok a uma unidade local ou então usar o suporte de MySQL.</para>
</answer>
</qandaentry>

@ -706,7 +706,7 @@
<entry
>A função <quote
>saveCurrentPlaylist</quote
> salva a lista de reprodução atual como ~/.kde/share/apps/amarok/current.xml.</entry>
> salva a lista de reprodução atual como ~/.trinity/share/apps/amarok/current.xml.</entry>
</row>

@ -80,7 +80,7 @@
>-filer på samma plats som motsvarande ljudfil. När det är inaktiverat, lagras <literal role="extension"
>.mood</literal
>-filerna inne i &amarok;s inställningskatalog, oftast <filename class="directory"
>~/.kde/share/apps/amarok/moodbar/</filename
>~/.trinity/share/apps/amarok/moodbar/</filename
>.</para>
<para
><guilabel

@ -70,7 +70,7 @@
<answer>
<para
>Det är troligt att en fil i din samling utlöser ett fel i biblioteket TagLib, och det får &amarok; att krascha. Du kan identifiera filen genom att titta i ~/.kde/share/apps/amarok/collection_scan.log. Du bör rapportera kraschen till feldatabasen för TagLib på <ulink url="http://bugs.kde.org/"
>Det är troligt att en fil i din samling utlöser ett fel i biblioteket TagLib, och det får &amarok; att krascha. Du kan identifiera filen genom att titta i ~/.trinity/share/apps/amarok/collection_scan.log. Du bör rapportera kraschen till feldatabasen för TagLib på <ulink url="http://bugs.kde.org/"
>bugs.kde.org</ulink
> och bifoga den felaktiga filen. Därefter kan du ta bort filen från din samling och upprepa sökningen.</para>
</answer>
@ -813,7 +813,7 @@ print "Fel vid skrivning av taggen till $ARGV[0]\n" unless $mp3->set_v2tag($v2ta
<answer>
<para
>~/.kde/share/apps/amarok ~/.kde/share/config/amarokrc</para>
>~/.trinity/share/apps/amarok ~/.trinity/share/config/amarokrc</para>
</answer>
</qandaentry>
@ -866,7 +866,7 @@ print "Fel vid skrivning av taggen till $ARGV[0]\n" unless $mp3->set_v2tag($v2ta
<answer>
<para
>Den interna databasen SQLite som &amarok; normalt använder fungerar inte med NFS. Du måste antingen göra en länk till en lokal enhet för katalogen ~/.kde/share/apps/amarok, eller använda stödet för MySQL.</para>
>Den interna databasen SQLite som &amarok; normalt använder fungerar inte med NFS. Du måste antingen göra en länk till en lokal enhet för katalogen ~/.trinity/share/apps/amarok, eller använda stödet för MySQL.</para>
</answer>
</qandaentry>

Loading…
Cancel
Save