hipo r172 - in trunk: . data src
- From: bgarret svn gnome org
- To: svn-commits-list gnome org
- Subject: hipo r172 - in trunk: . data src
- Date: Fri, 14 Mar 2008 22:10:07 +0000 (GMT)
Author: bgarret
Date: Fri Mar 14 22:10:07 2008
New Revision: 172
URL: http://svn.gnome.org/viewvc/hipo?rev=172&view=rev
Log:
2008-03-14 Benoit Garret <benoit garret_gnome gadz org>
* configure.ac:
* data/Makefile.am:
* data/hipo.schemas.in:
* src/HipoMainWindow.cs:
* src/Makefile.am:
* src/Settings.cs:
* src/Tools.cs: logging fixes
* src/TracksSource.cs: logging fixes
More logging.
Add gconf support and remember the last path
opened in the filechooser.
Added:
trunk/data/hipo.schemas.in
- copied unchanged from r151, /branches/bgarret/data/hipo.schemas.in
trunk/src/Settings.cs
- copied unchanged from r151, /branches/bgarret/src/Settings.cs
Modified:
trunk/ChangeLog
trunk/configure.ac
trunk/data/Makefile.am
trunk/src/HipoMainWindow.cs
trunk/src/Makefile.am
trunk/src/Tools.cs
trunk/src/TracksSource.cs
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Fri Mar 14 22:10:07 2008
@@ -23,6 +23,7 @@
glade-sharp-2.0 >= $GTK_SHARP_REQUIRED \
ipod-sharp >= $IPOD_SHARP_REQUIRED \
ipod-sharp-ui >= $IPOD_SHARP_REQUIRED \
+ gconf-sharp-2.0 \
ndesk-dbus-glib-1.0 >= $NDESK_DBUS_GLIB_REQUIRED \
taglib-sharp >= $TAGLIB_SHARP_REQUIRED)
@@ -31,6 +32,17 @@
IPOD_SHARP_FILES=`pkg-config --variable=Libraries ipod-sharp ipod-sharp-ui`
AC_SUBST(IPOD_SHARP_FILES)
+# gconf routines taken from gnome-phone-manager
+
+AC_PATH_PROG(GCONFTOOL, gconftool-2)
+AM_GCONF_SOURCE_2
+
+AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
+
+if test x"$GCONFTOOL" = xno; then
+ AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
+fi
+
dnl Check for Mono
AC_PATH_PROG(MCS, gmcs)
AC_PATH_PROG(MONO, mono)
Modified: trunk/data/Makefile.am
==============================================================================
--- trunk/data/Makefile.am (original)
+++ trunk/data/Makefile.am Fri Mar 14 22:10:07 2008
@@ -1,5 +1,10 @@
hicolordir = $(datadir)/icons/hicolor
+schema_in_files = hipo.schemas.in
+schemadir = $(GCONF_SCHEMA_FILE_DIR)
+schema_DATA = $(schema_in_files:.schemas.in=.schemas)
+ INTLTOOL_SCHEMAS_RULE@
+
tango_icons = \
multimedia-player-ipod-mini-blue.png \
multimedia-player-ipod-mini-silver.png \
@@ -16,7 +21,7 @@
multimedia-player-ipod-video-black.png \
multimedia-player-ipod-video-white.png
-install-data-local:
+install-data-local: $(schema_DATA)
@-$(mkinstalldirs) $(DESTDIR)$(hicolordir)/16x16/apps
$(INSTALL_DATA) $(srcdir)/multimedia-player-ipod-mini-blue.png $(DESTDIR)$(hicolordir)/16x16/apps/multimedia-player-ipod-mini-blue.png
$(INSTALL_DATA) $(srcdir)/multimedia-player-ipod-mini-silver.png $(DESTDIR)$(hicolordir)/16x16/apps/multimedia-player-ipod-mini-silver.png
@@ -33,6 +38,14 @@
$(INSTALL_DATA) $(srcdir)/multimedia-player-ipod-video-black.png $(DESTDIR)$(hicolordir)/16x16/apps/multimedia-player-ipod-video-black.png
$(INSTALL_DATA) $(srcdir)/multimedia-player-ipod-video-white.png $(DESTDIR)$(hicolordir)/16x16/apps/multimedia-player-ipod-video-white.png
+if GCONF_SCHEMAS_INSTALL
+ if test -z "$(DESTDIR)" ; then \
+ for p in $^ ; do \
+ GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $$p 2>&1 > /dev/null; \
+ done \
+ fi
+endif
+
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
install-data-hook:
@@ -60,4 +73,4 @@
rm -f $(DESTDIR)$(hicolordir)/16x16/apps/multimedia-player-ipod-video-black.png
rm -f $(DESTDIR)$(hicolordir)/16x16/apps/multimedia-player-ipod-video-white.png
-EXTRA_DIST = $(tango_icons) hipo-logo.png ipod.gif
+EXTRA_DIST = $(tango_icons) hipo-logo.png ipod.gif $(schema_in_files)
Modified: trunk/src/HipoMainWindow.cs
==============================================================================
--- trunk/src/HipoMainWindow.cs (original)
+++ trunk/src/HipoMainWindow.cs Fri Mar 14 22:10:07 2008
@@ -278,7 +278,8 @@
fileChooser.SelectMultiple = true;
fileChooser.LocalOnly = true;
-
+ fileChooser.SetCurrentFolder (Settings.LastPath);
+
filter.Name = "audio files";
filter.AddMimeType ("audio/mpeg");
filter.AddMimeType ("audio/x-m4a");
@@ -286,6 +287,7 @@
ResponseType res = (ResponseType)fileChooser.Run ();
uris = fileChooser.Uris;
+ Settings.LastPath = fileChooser.CurrentFolder;
fileChooser.Destroy ();
@@ -306,9 +308,12 @@
Stock.Add, ResponseType.Accept);
fileChooser.LocalOnly = true;
+ fileChooser.SetCurrentFolder (Settings.LastPath);
ResponseType res = (ResponseType) fileChooser.Run ();
uris = fileChooser.Uris;
+ Settings.LastPath = fileChooser.CurrentFolder;
+
fileChooser.Destroy ();
if (res == ResponseType.Accept)
Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Fri Mar 14 22:10:07 2008
@@ -10,6 +10,7 @@
HIPO_GENERATED_FILES = Defines.cs
HIPO_SOURCES = \
+ $(srcdir)/Settings.cs \
$(srcdir)/Saviour.cs \
$(srcdir)/Tools.cs \
$(srcdir)/Source.cs \
@@ -34,7 +35,7 @@
$(top_srcdir)/data/hipo-logo.png \
$(top_srcdir)/data/ipod.gif
-HIPO_ASSEMBLIES = -r:Mono.Posix -pkg:gtk-sharp-2.0,gnome-sharp-2.0,glade-sharp-2.0,ipod-sharp,ipod-sharp-ui,ndesk-dbus-glib-1.0,taglib-sharp
+HIPO_ASSEMBLIES = -r:Mono.Posix -pkg:gtk-sharp-2.0,gnome-sharp-2.0,gconf-sharp-2.0,glade-sharp-2.0,ipod-sharp,ipod-sharp-ui,ndesk-dbus-glib-1.0,taglib-sharp
ASSEMBLY = hipo.exe
Modified: trunk/src/Tools.cs
==============================================================================
--- trunk/src/Tools.cs (original)
+++ trunk/src/Tools.cs Fri Mar 14 22:10:07 2008
@@ -46,11 +46,6 @@
Log (o, level, String.Format (format, args));
}
- private static void Log (string header, int level, string format, params object[] args)
- {
- Log (header, level, String.Format (format, args));
- }
-
private static void Log (string header, int level, string message)
{
if (logLevel > 0)
Modified: trunk/src/TracksSource.cs
==============================================================================
--- trunk/src/TracksSource.cs (original)
+++ trunk/src/TracksSource.cs Fri Mar 14 22:10:07 2008
@@ -137,7 +137,8 @@
{
TagLib.File file = TagLib.File.Create (path);
- track = tracksDb.CreateTrack ();
+ lock (tracksDb)
+ track = tracksDb.CreateTrack ();
if ((file.Tag.FirstArtist == null) || (file.Tag.FirstArtist == String.Empty))
track.Artist = "Unknown";
@@ -164,6 +165,8 @@
track.TrackNumber = (int) file.Tag.Track;
store.AppendValues (track);
+
+ Tools.Log (this, 3, "Added {0}:{1}", track.Id, track.Title);
}
if (save && (track != null))
@@ -238,6 +241,7 @@
if (track.Id == t.Id)
{
store.Remove (ref iter);
+ Tools.Log (this, 3, "Removing track {0} from the database", track.Id);
return true;
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]