[Zeitgeist] [Merge] lp:~zormit/zeitgeist/fix-932989 into lp:zeitgeist

2012-03-29 Thread noreply
The proposal to merge lp:~zormit/zeitgeist/fix-932989 into lp:zeitgeist has 
been updated.

Status: Needs review = Merged

For more details, see:
https://code.launchpad.net/~zormit/zeitgeist/fix-932989/+merge/98760
-- 
https://code.launchpad.net/~zormit/zeitgeist/fix-932989/+merge/98760
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


Re: [Zeitgeist] [Merge] lp:~zormit/zeitgeist/fix-932989 into lp:zeitgeist

2012-03-26 Thread Moritz Neeb
Review: Resubmit

 Thanks a lot, overall it's looking very nice, I have a couple of comments
 though:
 
 15  +if test x$enable_fts = x ; then
 16  +enable_fts=yes
 17  +fi
 
 Looks very odd, please use the optional parameters of AC_ARG_ENABLE instead.

I had problems with this optional parameter before, but it works now.

 
 62  +if (siin != null) return;
 
 Not needed.
 
 64  +org.gnome.zeitgeist.SimpleIndexer,
 
 Let's use INDEXER_NAME here as well.
 
 90  +siin_connection_failed = true; //TODO: Is this
 needed?
 
 Yes, it should be there.

ok these small changes are also done.
-- 
https://code.launchpad.net/~zormit/zeitgeist/fix-932989/+merge/98760
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


Re: [Zeitgeist] [Merge] lp:~zormit/zeitgeist/fix-932989 into lp:zeitgeist

2012-03-25 Thread Michal Hruby
Review: Needs Fixing

Thanks a lot, overall it's looking very nice, I have a couple of comments 
though:

15  +if test x$enable_fts = x ; then
16  +enable_fts=yes
17  +fi

Looks very odd, please use the optional parameters of AC_ARG_ENABLE instead.

62  +if (siin != null) return;

Not needed.

64  +org.gnome.zeitgeist.SimpleIndexer,

Let's use INDEXER_NAME here as well.

90  +siin_connection_failed = true; //TODO: Is this 
needed?

Yes, it should be there.
-- 
https://code.launchpad.net/~zormit/zeitgeist/fix-932989/+merge/98760
Your team Zeitgeist Framework Team is subscribed to branch lp:zeitgeist.

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp


[Zeitgeist] [Merge] lp:~zormit/zeitgeist/fix-932989 into lp:zeitgeist

2012-03-21 Thread Moritz Neeb
Moritz Neeb has proposed merging lp:~zormit/zeitgeist/fix-932989 into 
lp:zeitgeist.

Requested reviews:
  Zeitgeist Framework Team (zeitgeist)
Related bugs:
  Bug #932989 in Zeitgeist Framework: Make FTS++ optional
  https://bugs.launchpad.net/zeitgeist/+bug/932989

For more details, see:
https://code.launchpad.net/~zormit/zeitgeist/fix-932989/+merge/98760

Added an option for autogen.sh / configure : --disable-fts to compile without 
FTS++.
If zeitgeist-fts (aka SimpleIndexer at DBus) is not present, fts.vala 
unregisters a special monitor which was set up to wait for FTS and the 
extension itself.
-- 
https://code.launchpad.net/~zormit/zeitgeist/fix-932989/+merge/98760
Your team Zeitgeist Framework Team is requested to review the proposed merge of 
lp:~zormit/zeitgeist/fix-932989 into lp:zeitgeist.
=== modified file 'configure.ac'
--- configure.ac	2012-03-20 12:29:29 +
+++ configure.ac	2012-03-21 23:38:18 +
@@ -80,6 +80,18 @@
 DBUS_SERVICES_DIR=$services_dir
 AC_SUBST(DBUS_SERVICES_DIR)
 
+
+#
+# Configure options: --disable-fts.
+#
+AC_ARG_ENABLE([fts],
+AS_HELP_STRING([--disable-fts], [Build without FTS++ extension]))
+
+if test x$enable_fts = x ; then
+enable_fts=yes
+fi
+AM_CONDITIONAL(HAVE_FTS, test x$enable_fts != xno)
+
 AC_CONFIG_FILES([
 	Makefile
 	src/Makefile
@@ -131,6 +143,7 @@
 Install Prefix: ${prefix}
 
   Optional dependencies
+fts++:  ${enable_fts}
 dee-icu:${with_dee_icu}
 
 EOF

=== modified file 'extensions/Makefile.am'
--- extensions/Makefile.am	2012-02-15 18:27:21 +
+++ extensions/Makefile.am	2012-03-21 23:38:18 +
@@ -1,4 +1,6 @@
+if HAVE_FTS
 SUBDIRS = fts++
+endif
 
 NULL =
 

=== modified file 'extensions/fts.vala'
--- extensions/fts.vala	2012-02-10 17:03:50 +
+++ extensions/fts.vala	2012-03-21 23:38:18 +
@@ -95,24 +95,23 @@
 
 // FIXME: shouldn't we delay this to next idle callback?
 // Get SimpleIndexer
-Bus.watch_name_on_connection (connection,
-INDEXER_NAME,
-BusNameWatcherFlags.AUTO_START,
-(conn) =
-{
-if (siin != null) return;
-conn.get_proxy.beginRemoteSimpleIndexer (
-org.gnome.zeitgeist.SimpleIndexer,
-/org/gnome/zeitgeist/index/activity,
-0, null, this.proxy_acquired);
-},
-() = {});
+if (siin != null) return;
+connection.get_proxy.beginRemoteSimpleIndexer (
+org.gnome.zeitgeist.SimpleIndexer,
+/org/gnome/zeitgeist/index/activity,
+0, null, this.proxy_acquired);
 }
 catch (Error err)
 {
 warning (%s, err.message);
 }
 }
+
+private void proxy_not_present()
+{
+notifier.remove_monitor (new BusName (INDEXER_NAME),/org/gnome/zeitgeist/monitor/special);
+this.unload();
+}
 
 private void proxy_acquired (Object? obj, AsyncResult res)
 {
@@ -120,7 +119,15 @@
 try
 {
 siin = conn.get_proxy.endRemoteSimpleIndexer (res);
-siin_connection_failed = false;
+if((siin as DBusProxy).g_name_owner == null)
+{
+this.proxy_not_present();
+siin_connection_failed = true; //TODO: Is this needed?
+}
+else
+{
+siin_connection_failed = false;
+}
 }
 catch (IOError err)
 {
@@ -147,6 +154,25 @@
 Not connected to SimpleIndexer);
 }
 }
+
+public override void unload ()
+{
+try
+{
+var connection = Bus.get_sync (BusType.SESSION, null);
+if (registration_id != 0)
+{
+connection.unregister_object (registration_id);
+registration_id = 0;
+}
+}
+catch (Error err)
+{
+warning (%s, err.message);
+}
+
+debug (%s, this.ref_count = %u, Log.METHOD, this.ref_count);
+}
 
 public async void search (string query_string, Variant time_range,
 Variant filter_templates, uint offset, uint count, uint result_type,

___
Mailing list: https://launchpad.net/~zeitgeist
Post to : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp