[tracker/miner-web: 5/33] tracker-preferences: Remove the dbus_{name, path} columns in the miners model, and change the AuthSch
- From: Adrien Bustany <abustany src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker/miner-web: 5/33] tracker-preferences: Remove the dbus_{name, path} columns in the miners model, and change the AuthSch
- Date: Sat, 30 Jan 2010 22:35:30 +0000 (UTC)
commit a62b0bdd2508b207d1679b178d05d29a06e631c3
Author: Adrien Bustany <madcat mymadcat com>
Date: Fri Nov 6 10:37:37 2009 -0300
tracker-preferences: Remove the dbus_{name,path} columns in the miners model, and change the AuthScheme key name in miners desktop files
These columns can be computed from the name.
The key in the desktop file describing the association method is now called
AuthScheme, dropping the "X-Tracker-Bridge" which didn't make sense.
src/tracker-preferences/tracker-preferences.ui | 4 ----
src/tracker-preferences/tracker-preferences.vala | 19 ++++++++++---------
2 files changed, 10 insertions(+), 13 deletions(-)
---
diff --git a/src/tracker-preferences/tracker-preferences.ui b/src/tracker-preferences/tracker-preferences.ui
index b670ef9..46bc986 100644
--- a/src/tracker-preferences/tracker-preferences.ui
+++ b/src/tracker-preferences/tracker-preferences.ui
@@ -36,10 +36,6 @@
<columns>
<!-- column-name name -->
<column type="gchararray"/>
- <!-- column-name dbus_name -->
- <column type="gchararray"/>
- <!-- column-name dbus_path -->
- <column type="gchararray"/>
<!-- column-name association_type -->
<column type="gchararray"/>
</columns>
diff --git a/src/tracker-preferences/tracker-preferences.vala b/src/tracker-preferences/tracker-preferences.vala
index 6816a21..e00080a 100644
--- a/src/tracker-preferences/tracker-preferences.vala
+++ b/src/tracker-preferences/tracker-preferences.vala
@@ -350,14 +350,13 @@ fill_in_miners_model ()
KeyFile desktop_file = new KeyFile ();
try {
desktop_file.load_from_file (desktop_path, KeyFileFlags.NONE);
- if (!desktop_file.has_key (DESKTOP_GROUP, "X-Tracker-Bridge-AuthScheme")) {
+ if (!desktop_file.has_key (DESKTOP_GROUP, "AuthScheme")) {
// Only web miners should have this key defined
continue;
}
liststore_miners.insert_with_values (null, position++,
0 /* Name */, desktop_file.get_string (DESKTOP_GROUP, "Name"),
- 1 /* DBus name */, desktop_file.get_string (DESKTOP_GROUP, "DBusName"),
- 2 /* DBus path */, desktop_file.get_string (DESKTOP_GROUP, "DBusPath"));
+ 1 /* Association type */, desktop_file.get_string (DESKTOP_GROUP, "AuthScheme"));
} catch (Error e) {
warning ("Couldn't load miner %s : %s", current_filename, e.message);
}
@@ -368,8 +367,11 @@ fill_in_miners_model ()
}
static void
-update_miner_status_panel (string dbus_name, string dbus_path, string association_type)
+update_miner_status_panel (string name, string association_type)
{
+ string dbus_name = "org.freedesktop.Tracker1.Miner.%s".printf (name);
+ string dbus_path = "/org/freedesktop/Tracker1/Miner/Web/%s".printf (name);
+
dynamic DBus.Object miner = dbus_conn.get_object (dbus_name, dbus_path, MINER_WEB_DBUS_INTERFACE);
try {
@@ -420,11 +422,10 @@ treeview_miners_selection_changed ()
TreeIter iter = TreeIter ();
if (treeview_miners.get_selection ().get_selected (null, out iter)) {
- Value dbus_name, dbus_path, association_type;
- liststore_miners.get_value (iter, 1, out dbus_name);
- liststore_miners.get_value (iter, 2, out dbus_path);
- liststore_miners.get_value (iter, 3, out association_type);
- update_miner_status_panel (dbus_name.get_string (), dbus_path.get_string (), association_type.get_string ());
+ Value name, association_type;
+ liststore_miners.get_value (iter, 0, out name);
+ liststore_miners.get_value (iter, 1, out association_type);
+ update_miner_status_panel (name.get_string (), association_type.get_string ());
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]