Accepting request 69149 from GNOME:Apps

Pushing G:A changes related to GNOME 3 (either needed by GNOME 3, or needed to build with GNOME 3)

OBS-URL: https://build.opensuse.org/request/show/69149
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/tracker?expand=0&rev=25
This commit is contained in:
Sascha Peilicke 2011-05-02 13:45:08 +00:00 committed by Git OBS Bridge
parent b1f73ae187
commit cf91498bb1
6 changed files with 240 additions and 860 deletions

3
tracker-0.10.10.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6e8b9e297743634369ca8d770debd72962051b52713edebb5d2fba7a3089f84c
size 7855321

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e6ef4066b633c9024e5ceec1a485a891da0d666077a2f3defd35f08aa61f4a74
size 8018567

View File

@ -0,0 +1,21 @@
From f322e4764733014f5f6d9f2a6243183767a03c97 Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Thu, 14 Apr 2011 12:53:04 +0000
Subject: nautilus: Update extension to compile with GTK+3
---
diff --git a/configure.ac b/configure.ac
index 10a493f..8ee9739 100644
--- a/configure.ac
+++ b/configure.ac
@@ -459,7 +459,7 @@ PKG_CHECK_MODULES(TRACKER_SEARCH_BAR, [$TRACKER_SEARCH_BAR_REQUIRED],
TRACKER_NAUTILUS_EXTENSION_REQUIRED="glib-2.0 >= $GLIB_REQUIRED
gio-unix-2.0 >= $GLIB_REQUIRED
gthread-2.0 >= $GLIB_REQUIRED
- gtk+-2.0 >= $GTK_REQUIRED
+ gtk+-3.0 >= $GTK_REQUIRED
libnautilus-extension"
PKG_CHECK_MODULES(TRACKER_NAUTILUS_EXTENSION, [$TRACKER_NAUTILUS_EXTENSION_REQUIRED],
--
cgit v0.9

View File

@ -1,841 +0,0 @@
From 4a21243313fe7db7bb8093f2c7a7f53454fac9d3 Mon Sep 17 00:00:00 2001
From: Martyn Russell <martyn@lanedo.com>
Date: Wed, 16 Feb 2011 10:11:30 +0000
Subject: tracker-needle: Use fixed height for detailed view
---
diff --git a/src/tracker-needle/tracker-cell-renderer-text.vala b/src/tracker-needle/tracker-cell-renderer-text.vala
index a3dbf9c..d4a6562 100644
--- a/src/tracker-needle/tracker-cell-renderer-text.vala
+++ b/src/tracker-needle/tracker-cell-renderer-text.vala
@@ -23,8 +23,10 @@ class Tracker.CellRendererText : Gtk.CellRendererText {
public string subtext { get; set; }
public bool show_row_hint { get; set; }
public bool show_subtext { get; set; }
+ public bool show_fixed_height { get; set; }
private bool is_selected;
private bool is_valid;
+ private int fixed_height = -1;
public override void get_size (Gtk.Widget widget,
Gdk.Rectangle? cell_area,
@@ -32,6 +34,19 @@ class Tracker.CellRendererText : Gtk.CellRendererText {
out int y_offset,
out int width,
out int height) {
+ // First time only, get the minimum fixed height we can use
+ if (fixed_height == -1) {
+ Pango.Context c = widget.get_pango_context ();
+ Pango.Layout layout = new Pango.Layout (c);
+
+ var style = widget.get_style ();
+ Pango.FontDescription fd = style.font_desc;
+
+ layout.set_text ("Foo\nBar", -1);
+ layout.set_font_description (fd);
+ layout.get_pixel_size (null, out fixed_height);
+ }
+
update_text (widget, is_selected);
base.get_size (widget, cell_area, out x_offset, out y_offset, out width, out height);
@@ -88,6 +103,12 @@ class Tracker.CellRendererText : Gtk.CellRendererText {
str = "%s\n%s".printf (text, subtext);
}
+ // Force all renderers to be the same height so subtext doesn't make some
+ // rows look inconsistent with others height wise.
+ if (show_fixed_height) {
+ this.height = fixed_height;
+ }
+
this.visible = true;
this.weight = Pango.Weight.NORMAL;
this.text = str;
diff --git a/src/tracker-needle/tracker-needle.vala b/src/tracker-needle/tracker-needle.vala
index 6280ba8..a3301b0 100644
--- a/src/tracker-needle/tracker-needle.vala
+++ b/src/tracker-needle/tracker-needle.vala
@@ -252,6 +252,10 @@ public class Tracker.Needle {
col.add_attribute (renderer2, "subtext", 5);
renderer2.ellipsize = Pango.EllipsizeMode.MIDDLE;
+ // FIXME: We should only set this when we have the list view not the
+ // category view and the list view as it is now.
+ renderer2.show_fixed_height = true;
+
col.set_title (_("File"));
col.set_resizable (true);
col.set_expand (true);
@@ -276,6 +280,7 @@ public class Tracker.Needle {
col.set_cell_data_func (renderer4, cell_renderer_func);
treeview.append_column (col);
+ // Setup signals
treeview.row_activated.connect (view_row_selected);
// Setup iconview
--
cgit v0.8.3.1
From b621fdb71a7aead9c1cf7e6ba88a56d3e5150a02 Mon Sep 17 00:00:00 2001
From: Martyn Russell <martyn@lanedo.com>
Date: Wed, 16 Feb 2011 12:18:28 +0000
Subject: tracker-needle: Use a separate store for each view
Fixes the case where moving between views exposes some brokenness.
Fixes GB#639547 - Duplicated result
---
diff --git a/src/tracker-needle/tracker-cell-renderer-text.vala b/src/tracker-needle/tracker-cell-renderer-text.vala
index d4a6562..3b477c5 100644
--- a/src/tracker-needle/tracker-cell-renderer-text.vala
+++ b/src/tracker-needle/tracker-cell-renderer-text.vala
@@ -107,6 +107,8 @@ class Tracker.CellRendererText : Gtk.CellRendererText {
// rows look inconsistent with others height wise.
if (show_fixed_height) {
this.height = fixed_height;
+ } else {
+ this.height = -1;
}
this.visible = true;
diff --git a/src/tracker-needle/tracker-needle.ui b/src/tracker-needle/tracker-needle.ui
index 08fd4b6..456a02f 100644
--- a/src/tracker-needle/tracker-needle.ui
+++ b/src/tracker-needle/tracker-needle.ui
@@ -13,7 +13,7 @@
<object class="GtkToolbar" id="toolbar_main">
<property name="visible">True</property>
<child>
- <object class="GtkRadioToolButton" id="toolbutton_view_details">
+ <object class="GtkRadioToolButton" id="toolbutton_view_categories">
<property name="visible">True</property>
<property name="tooltip_text" translatable="yes">Display results by category, for example, Music, Videos, Applications, etc.</property>
<property name="is_important">True</property>
@@ -28,7 +28,7 @@
</packing>
</child>
<child>
- <object class="GtkRadioToolButton" id="toolbutton_view_list">
+ <object class="GtkRadioToolButton" id="toolbutton_view_filelist">
<property name="visible">True</property>
<property name="tooltip_text" translatable="yes">Display results by files found in a list</property>
<property name="is_important">True</property>
@@ -134,8 +134,8 @@
<property name="has_focus">True</property>
<property name="model">liststore_search</property>
<property name="text_column">0</property>
- <accelerator key="s" signal="grab-focus" modifiers="GDK_CONTROL_MASK"/>
<accelerator key="f" signal="grab-focus" modifiers="GDK_CONTROL_MASK"/>
+ <accelerator key="s" signal="grab-focus" modifiers="GDK_CONTROL_MASK"/>
</object>
</child>
</object>
diff --git a/src/tracker-needle/tracker-needle.vala b/src/tracker-needle/tracker-needle.vala
index a3301b0..0f8f54f 100644
--- a/src/tracker-needle/tracker-needle.vala
+++ b/src/tracker-needle/tracker-needle.vala
@@ -29,9 +29,9 @@ public class Tracker.Needle {
private const string UI_FILE = "tracker-needle.ui";
private History history;
private Window window;
- private ToggleToolButton view_list;
+ private ToggleToolButton view_categories;
+ private ToggleToolButton view_filelist;
private ToggleToolButton view_icons;
- private ToggleToolButton view_details;
private SeparatorToolItem separator_secondary;
private ToggleToolButton find_in_contents;
private ToggleToolButton find_in_titles;
@@ -43,13 +43,11 @@ public class Tracker.Needle {
private ToolButton show_stats;
private HBox view;
private Tracker.View sw_noresults;
- private Tracker.View sw_treeview;
- private TreeView treeview;
- private Tracker.View sw_iconview;
- private IconView iconview;
+ private Tracker.View sw_categories;
+ private Tracker.View sw_filelist;
+ private Tracker.View sw_icons;
private Tracker.TagList taglist;
private uint last_search_id = 0;
- private ListStore store;
private int size_small = 0;
private int size_medium = 0;
private int size_big = 0;
@@ -112,14 +110,14 @@ public class Tracker.Needle {
window.destroy.connect (Gtk.main_quit);
window.key_press_event.connect (window_key_press_event);
- view_list = builder.get_object ("toolbutton_view_list") as ToggleToolButton;
- view_list.toggled.connect (view_toggled);
+ view_filelist = builder.get_object ("toolbutton_view_filelist") as ToggleToolButton;
+ view_filelist.toggled.connect (view_toggled);
view_icons = builder.get_object ("toolbutton_view_icons") as ToggleToolButton;
view_icons.toggled.connect (view_toggled);
- view_details = builder.get_object ("toolbutton_view_details") as ToggleToolButton;
- view_details.toggled.connect (view_toggled);
+ view_categories = builder.get_object ("toolbutton_view_categories") as ToggleToolButton;
+ view_categories.toggled.connect (view_toggled);
separator_secondary = builder.get_object ("separator_secondary") as SeparatorToolItem;
@@ -147,26 +145,33 @@ public class Tracker.Needle {
view = builder.get_object ("hbox_view") as HBox;
// Set up views
- sw_noresults = new Tracker.View (Tracker.View.Display.NO_RESULTS);
+ TreeView treeview;
+ IconView iconview;
+
+ sw_noresults = new Tracker.View (Tracker.View.Display.NO_RESULTS, null);
view.pack_start (sw_noresults, true, true, 0);
- sw_treeview = new Tracker.View (Tracker.View.Display.CATEGORIES);
- treeview = (TreeView) sw_treeview.get_child ();
- view.pack_start (sw_treeview, true, true, 0);
+ sw_categories = new Tracker.View (Tracker.View.Display.CATEGORIES, null);
+ treeview = (TreeView) sw_categories.get_child ();
+ treeview.row_activated.connect (view_row_selected);
+ view.pack_start (sw_categories, true, true, 0);
+
+ sw_filelist = new Tracker.View (Tracker.View.Display.FILE_LIST, null);
+ treeview = (TreeView) sw_filelist.get_child ();
+ treeview.row_activated.connect (view_row_selected);
+ view.pack_start (sw_filelist, true, true, 0);
- sw_iconview = new Tracker.View (Tracker.View.Display.FILE_ICONS);
- iconview = (IconView) sw_iconview.get_child ();
- view.pack_start (sw_iconview, true, true, 0);
+ sw_icons = new Tracker.View (Tracker.View.Display.FILE_ICONS, null);
+ iconview = (IconView) sw_icons.get_child ();
+ iconview.item_activated.connect (icon_item_selected);
+ view.pack_start (sw_icons, true, true, 0);
- // Set up view models
- setup_ui_results (treeview, iconview);
-
// Set up taglist
taglist = new Tracker.TagList ();
taglist.hide ();
view.pack_end (taglist, false, true, 0);
- view_details.set_active (true);
+ view_categories.set_active (true);
}
private bool window_key_press_event (Gtk.Widget widget,
@@ -179,117 +184,17 @@ public class Tracker.Needle {
return false;
}
- private void cell_renderer_func (Gtk.CellLayout cell_layout,
- Gtk.CellRenderer cell,
- Gtk.TreeModel tree_model,
- Gtk.TreeIter iter) {
- Gdk.Color color;
- Gtk.Style style;
- bool show_row_hint;
-
- tree_model.get (iter, 9, out show_row_hint, -1);
-
- style = ((Widget) treeview).get_style ();
-
- color = style.base[Gtk.StateType.SELECTED];
- int sum_normal = color.red + color.green + color.blue;
- color = style.base[Gtk.StateType.NORMAL];
- int sum_selected = color.red + color.green + color.blue;
- color = style.text_aa[Gtk.StateType.INSENSITIVE];
-
- if (sum_normal < sum_selected) {
- /* Found a light theme */
- color.red = (color.red + (style.white).red) / 2;
- color.green = (color.green + (style.white).green) / 2;
- color.blue = (color.blue + (style.white).blue) / 2;
- } else {
- /* Found a dark theme */
- color.red = (color.red + (style.black).red) / 2;
- color.green = (color.green + (style.black).green) / 2;
- color.blue = (color.blue + (style.black).blue) / 2;
+ private ListStore? get_store_for_active_view () {
+ if (view_icons.active) {
+ return sw_icons.store;
+ } else if (view_filelist.active) {
+ return sw_filelist.store;
+ } else if (view_categories.active) {
+ return sw_categories.store;
}
- // Set odd/even colours
- if (show_row_hint) {
-// ((Widget) treeview).style_get ("odd-row-color", out color, null);
- cell.set ("cell-background-gdk", &color);
- } else {
-// ((Widget) treeview).style_get ("even-row-color", out color, null);
- cell.set ("cell-background-gdk", null);
- }
- }
-
- private void setup_ui_results (TreeView treeview, IconView iconview) {
- // Setup treeview
- store = new ListStore (10,
- typeof (Gdk.Pixbuf), // Icon small
- typeof (Gdk.Pixbuf), // Icon big
- typeof (string), // URN
- typeof (string), // URL
- typeof (string), // Title
- typeof (string), // Subtitle
- typeof (string), // Column 2
- typeof (string), // Column 3
- typeof (string), // Tooltip
- typeof (bool)); // Category hint
- treeview.set_model (store);
- treeview.set_tooltip_column (8);
- treeview.set_rules_hint (false);
-
- Gtk.TreeViewColumn col;
-
- var renderer1 = new CellRendererPixbuf ();
- var renderer2 = new Tracker.CellRendererText ();
-
- col = new Gtk.TreeViewColumn ();
- col.pack_start (renderer1, false);
- col.add_attribute (renderer1, "pixbuf", 0);
- renderer1.xpad = 5;
- renderer1.ypad = 5;
-
- col.pack_start (renderer2, true);
- col.add_attribute (renderer2, "text", 4);
- col.add_attribute (renderer2, "subtext", 5);
- renderer2.ellipsize = Pango.EllipsizeMode.MIDDLE;
-
- // FIXME: We should only set this when we have the list view not the
- // category view and the list view as it is now.
- renderer2.show_fixed_height = true;
-
- col.set_title (_("File"));
- col.set_resizable (true);
- col.set_expand (true);
- col.set_sizing (Gtk.TreeViewColumnSizing.AUTOSIZE);
- col.set_cell_data_func (renderer1, cell_renderer_func);
- col.set_cell_data_func (renderer2, cell_renderer_func);
- treeview.append_column (col);
-
- var renderer3 = new Tracker.CellRendererText ();
- col = new Gtk.TreeViewColumn ();
- col.pack_start (renderer3, true);
- col.add_attribute (renderer3, "text", 6);
- col.set_title (_("Last Changed"));
- col.set_cell_data_func (renderer3, cell_renderer_func);
- treeview.append_column (col);
-
- var renderer4 = new Tracker.CellRendererText ();
- col = new Gtk.TreeViewColumn ();
- col.pack_start (renderer4, true);
- col.add_attribute (renderer4, "text", 7);
- col.set_title (_("Size"));
- col.set_cell_data_func (renderer4, cell_renderer_func);
- treeview.append_column (col);
-
- // Setup signals
- treeview.row_activated.connect (view_row_selected);
-
- // Setup iconview
- iconview.set_model (store);
- iconview.set_item_width (96);
- iconview.set_selection_mode (Gtk.SelectionMode.SINGLE);
- iconview.set_pixbuf_column (1);
- iconview.set_text_column (4);
- iconview.item_activated.connect (icon_item_selected);
+ debug ("No views active to get store?!?!");
+ return null;
}
private void search_changed (Editable editable) {
@@ -300,13 +205,15 @@ public class Tracker.Needle {
last_search_id = Timeout.add_seconds (1, search_run);
}
- private async void search_simple () {
+ private async void search_simple (ListStore store) requires (store != null) {
Tracker.Query query = new Tracker.Query ();
Tracker.Sparql.Cursor cursor = null;
query.limit = 1000;
query.criteria = search.get_text ();
+ debug ("Doing simple search using store:%p", store);
+
try {
if (find_in_contents.active) {
cursor = yield query.perform_async (query.Type.ALL);
@@ -315,7 +222,7 @@ public class Tracker.Needle {
}
if (cursor == null) {
- search_finished ();
+ search_finished (store);
return;
}
@@ -352,9 +259,9 @@ public class Tracker.Needle {
// Insert into model
TreeIter iter;
- store.append (out iter);
// FIXME: should optimise this a bit more, inserting 2 images into a list eek
+ store.append (out iter);
store.set (iter,
0, pixbuf_small, // Small Image
1, pixbuf_big, // Large Image
@@ -369,14 +276,14 @@ public class Tracker.Needle {
}
} catch (GLib.Error e) {
warning ("Could not iterate query results: %s", e.message);
- search_finished ();
+ search_finished (store);
return;
}
- search_finished ();
+ search_finished (store);
}
- private async void search_detailed () {
+ private async void search_detailed (ListStore store) requires (store != null) {
Tracker.Query.Type[] categories = {
Tracker.Query.Type.APPLICATIONS,
Tracker.Query.Type.MUSIC,
@@ -390,6 +297,8 @@ public class Tracker.Needle {
store.clear ();
+ debug ("Doing detailed search using store:%p", store);
+
var screen = window.get_screen ();
var theme = IconTheme.get_for_screen (screen);
bool odd = false;
@@ -406,7 +315,7 @@ public class Tracker.Needle {
cursor = yield query.perform_async (type);
if (cursor == null) {
- search_finished ();
+ search_finished (store);
return;
}
@@ -490,9 +399,9 @@ public class Tracker.Needle {
// Insert into model
TreeIter iter;
- store.append (out iter);
// FIXME: should optimise this a bit more, inserting 2 images into a list eek
+ store.append (out iter);
store.set (iter,
0, pixbuf_small, // Small Image
1, null, // Large Image
@@ -510,7 +419,7 @@ public class Tracker.Needle {
}
} catch (GLib.Error e) {
warning ("Could not iterate query results: %s", e.message);
- search_finished ();
+ search_finished (store);
return;
}
@@ -519,19 +428,22 @@ public class Tracker.Needle {
}
}
- search_finished ();
+ search_finished (store);
}
- private void search_finished () {
+ private void search_finished (ListStore? store) {
// Hide spinner
spinner.stop ();
spinner_shell.hide ();
+ TreeModel model = (TreeModel) store;
+
// Check if we have any results, if we don't change the view
- if (store.iter_n_children (null) < 1) {
+ if (model == null || model.iter_n_children (null) < 1) {
sw_noresults.show ();
- sw_iconview.hide ();
- sw_treeview.hide ();
+ sw_icons.hide ();
+ sw_categories.hide ();
+ sw_filelist.hide ();
}
}
@@ -585,11 +497,14 @@ public class Tracker.Needle {
string str = search.get_text ();
string criteria = str.strip ();
+ ListStore store = get_store_for_active_view ();
if (criteria.length < 1) {
- store.clear ();
+ if (store != null) {
+ store.clear ();
+ }
- search_finished ();
+ search_finished (store);
return false;
}
@@ -597,69 +512,55 @@ public class Tracker.Needle {
search_history_find_or_insert (criteria, true);
// Show correct window
- bool rows = view_list.active || view_details.active;
-
- if (rows) {
- sw_noresults.hide ();
- sw_iconview.hide ();
- sw_treeview.show ();
+ sw_noresults.hide ();
+
+ if (view_icons.active) {
+ sw_icons.show ();
+ } else {
+ sw_icons.hide ();
+ }
+
+ if (view_categories.active) {
+ sw_categories.show ();
+ } else {
+ sw_categories.hide ();
+ }
+
+ if (view_filelist.active) {
+ sw_filelist.show ();
} else {
- sw_noresults.hide ();
- sw_iconview.show ();
- sw_treeview.hide ();
+ sw_filelist.hide ();
}
// Show spinner
spinner_shell.show_all ();
spinner.start ();
- if (view_details.active) {
- search_detailed ();
+ if (view_categories.active) {
+ search_detailed (store);
} else {
- search_simple ();
+ search_simple (store);
}
return false;
}
private void view_toggled () {
- bool rows;
bool show_find_in;
- rows = view_list.active || view_details.active;
-
- if (current_view == rows) {
- return;
+ if (!view_icons.active &&
+ !view_filelist.active &&
+ !view_categories.active) {
+ return;
}
- if (rows) {
- // FIXME: if list/details changes, re-run query
-
- // Was: sw_treeview.show_all ();
-
- debug ("View toggled to 'list' or 'details'");
-
- if (view_details.active) {
- treeview.set_grid_lines (Gtk.TreeViewGridLines.NONE);
- treeview.get_column (2).visible = false;
- treeview.set_headers_visible (false);
- show_find_in = false;
- } else {
- treeview.set_grid_lines (Gtk.TreeViewGridLines.VERTICAL);
- treeview.get_column (2).visible = true;
- treeview.set_headers_visible (true);
- show_find_in = true;
- }
- } else {
- // Was: sw_iconview.show_all ();
- show_find_in = true;
- debug ("View toggled to 'icons'");
- }
+ show_find_in = view_filelist.active || view_icons.active;
// Show no results Window when switching
sw_noresults.show ();
- sw_iconview.hide ();
- sw_treeview.hide ();
+ sw_icons.hide ();
+ sw_filelist.hide ();
+ sw_categories.hide ();
// Show/Hide secondary widgets
separator_secondary.visible = show_find_in;
@@ -667,7 +568,7 @@ public class Tracker.Needle {
find_in_titles.visible = show_find_in;
search_run ();
- current_view = rows;
+ //current_view = rows;
}
private void find_in_toggled () {
diff --git a/src/tracker-needle/tracker-view.vala b/src/tracker-needle/tracker-view.vala
index 30f3e3c..814285d 100644
--- a/src/tracker-needle/tracker-view.vala
+++ b/src/tracker-needle/tracker-view.vala
@@ -32,13 +32,37 @@ public class Tracker.View : ScrolledWindow {
private set;
}
- public View (Display? _display = Display.NO_RESULTS) {
- Widget results = null;
-
+ public ListStore store {
+ get;
+ private set;
+ }
+
+ private Widget view = null;
+
+ public View (Display? _display = Display.NO_RESULTS, ListStore? _store) {
set_policy (PolicyType.NEVER, PolicyType.AUTOMATIC);
display = _display;
+ if (_store != null) {
+ store = _store;
+ debug ("using store:%p", store);
+ } else {
+ // Setup treeview
+ store = new ListStore (10,
+ typeof (Gdk.Pixbuf), // Icon small
+ typeof (Gdk.Pixbuf), // Icon big
+ typeof (string), // URN
+ typeof (string), // URL
+ typeof (string), // Title
+ typeof (string), // Subtitle
+ typeof (string), // Column 2
+ typeof (string), // Column 3
+ typeof (string), // Tooltip
+ typeof (bool)); // Category hint
+ debug ("Creating store:%p", store);
+ }
+
switch (display) {
case Display.NO_RESULTS:
Label l;
@@ -51,26 +75,186 @@ public class Tracker.View : ScrolledWindow {
l.set_use_markup (true);
l.set_markup (markup);
- results = l;
+ view = l;
break;
case Display.CATEGORIES:
case Display.FILE_LIST:
- results = new TreeView ();
+ view = new TreeView ();
break;
case Display.FILE_ICONS:
- results = new IconView ();
+ view = new IconView ();
break;
}
if (display == Display.NO_RESULTS) {
- add_with_viewport (results);
+ add_with_viewport (view);
} else {
- add (results);
+ add (view);
+ setup_model ();
}
base.show_all ();
}
+
+ private void setup_model () {
+ switch (display) {
+ case Display.FILE_ICONS: {
+ IconView iv = (IconView) view;
+
+ iv.set_model (store);
+ iv.set_item_width (96);
+ iv.set_selection_mode (SelectionMode.SINGLE);
+ iv.set_pixbuf_column (1);
+ iv.set_text_column (4);
+
+ break;
+ }
+
+ case Display.FILE_LIST: {
+ TreeViewColumn col;
+ TreeView tv = (TreeView) view;
+
+ tv.set_model (store);
+ tv.set_tooltip_column (8);
+ tv.set_rules_hint (false);
+ tv.set_grid_lines (TreeViewGridLines.VERTICAL);
+ tv.set_headers_visible (true);
+
+ var renderer1 = new CellRendererPixbuf ();
+ var renderer2 = new Tracker.CellRendererText ();
+
+ col = new TreeViewColumn ();
+ col.pack_start (renderer1, false);
+ col.add_attribute (renderer1, "pixbuf", 0);
+ renderer1.xpad = 5;
+ renderer1.ypad = 5;
+
+ col.pack_start (renderer2, true);
+ col.add_attribute (renderer2, "text", 4);
+ renderer2.ellipsize = Pango.EllipsizeMode.MIDDLE;
+ renderer2.show_fixed_height = false;
+
+ col.set_title (_("File"));
+ col.set_resizable (true);
+ col.set_expand (true);
+ col.set_sizing (TreeViewColumnSizing.AUTOSIZE);
+ col.set_cell_data_func (renderer1, cell_renderer_func);
+ col.set_cell_data_func (renderer2, cell_renderer_func);
+ tv.append_column (col);
+
+ var renderer3 = new Tracker.CellRendererText ();
+ col = new TreeViewColumn ();
+ col.pack_start (renderer3, true);
+ col.add_attribute (renderer3, "text", 6);
+ col.set_title (_("Last Changed"));
+ col.set_cell_data_func (renderer3, cell_renderer_func);
+ tv.append_column (col);
+
+ var renderer4 = new Tracker.CellRendererText ();
+ col = new TreeViewColumn ();
+ col.pack_start (renderer4, true);
+ col.add_attribute (renderer4, "text", 7);
+ col.set_title (_("Size"));
+ col.set_cell_data_func (renderer4, cell_renderer_func);
+ tv.append_column (col);
+
+ break;
+ }
+
+ case Display.CATEGORIES: {
+ TreeViewColumn col;
+ TreeView tv = (TreeView) view;
+
+ tv.set_model (store);
+ tv.set_tooltip_column (8);
+ tv.set_rules_hint (false);
+ tv.set_grid_lines (TreeViewGridLines.NONE);
+ tv.set_headers_visible (false);
+
+ var renderer1 = new CellRendererPixbuf ();
+ var renderer2 = new Tracker.CellRendererText ();
+
+ col = new TreeViewColumn ();
+ col.pack_start (renderer1, false);
+ col.add_attribute (renderer1, "pixbuf", 0);
+ renderer1.xpad = 5;
+ renderer1.ypad = 5;
+
+ col.pack_start (renderer2, true);
+ col.add_attribute (renderer2, "text", 4);
+ col.add_attribute (renderer2, "subtext", 5);
+ renderer2.ellipsize = Pango.EllipsizeMode.MIDDLE;
+ renderer2.show_fixed_height = true;
+
+ col.set_title (_("Item"));
+ col.set_resizable (true);
+ col.set_expand (true);
+ col.set_sizing (TreeViewColumnSizing.AUTOSIZE);
+ col.set_cell_data_func (renderer1, cell_renderer_func);
+ col.set_cell_data_func (renderer2, cell_renderer_func);
+ tv.append_column (col);
+
+// var renderer3 = new Tracker.CellRendererText ();
+// col = new TreeViewColumn ();
+// col.pack_start (renderer3, true);
+// col.add_attribute (renderer3, "text", 6);
+// col.set_title (_("Item Detail"));
+// col.set_cell_data_func (renderer3, cell_renderer_func);
+// tv.append_column (col);
+
+ var renderer4 = new Tracker.CellRendererText ();
+ col = new TreeViewColumn ();
+ col.pack_start (renderer4, true);
+ col.add_attribute (renderer4, "text", 7);
+ col.set_title (_("Size"));
+ col.set_cell_data_func (renderer4, cell_renderer_func);
+ tv.append_column (col);
+
+ break;
+ }
+ }
+ }
+
+ private void cell_renderer_func (CellLayout cell_layout,
+ CellRenderer cell,
+ TreeModel tree_model,
+ TreeIter iter) {
+ Gdk.Color color;
+ Style style;
+ bool show_row_hint;
+
+ tree_model.get (iter, 9, out show_row_hint, -1);
+
+ style = view.get_style ();
+
+ color = style.base[StateType.SELECTED];
+ int sum_normal = color.red + color.green + color.blue;
+ color = style.base[StateType.NORMAL];
+ int sum_selected = color.red + color.green + color.blue;
+ color = style.text_aa[StateType.INSENSITIVE];
+
+ if (sum_normal < sum_selected) {
+ /* Found a light theme */
+ color.red = (color.red + (style.white).red) / 2;
+ color.green = (color.green + (style.white).green) / 2;
+ color.blue = (color.blue + (style.white).blue) / 2;
+ } else {
+ /* Found a dark theme */
+ color.red = (color.red + (style.black).red) / 2;
+ color.green = (color.green + (style.black).green) / 2;
+ color.blue = (color.blue + (style.black).blue) / 2;
+ }
+
+ // Set odd/even colours
+ if (show_row_hint) {
+// ((Widget) treeview).style_get ("odd-row-color", out color, null);
+ cell.set ("cell-background-gdk", &color);
+ } else {
+// ((Widget) treeview).style_get ("even-row-color", out color, null);
+ cell.set ("cell-background-gdk", null);
+ }
+ }
}
--
cgit v0.8.3.1

View File

@ -1,3 +1,199 @@
-------------------------------------------------------------------
Thu Apr 28 02:03:38 UTC 2011 - glin@novell.com
- Add tracker-nautilus-extension-compile-gtk3.patch to compile
nautilus extension with gtk3 (bnc#689447, bgo#645954). Add call
to autoreconf needed by the patch.
-------------------------------------------------------------------
Wed Apr 27 09:37:37 CEST 2011 - vuntz@opensuse.org
- Update to version 0.10.10:
+ libtracker-data: Support ontology changing regarding
nrl:InverseFunctionalProperty
+ libtracker-miner:
- Limit extractions to 10 at any given time
- Limit the number of statements sent to the store per request
+ tracker-extract:
- Complete relicensing from GPL to LGPL for C++ files missed
- Fixed critical about locale when run from command line
- Fixed critical when finalizing the controller object
- Fixed crash with new QApplication() and passed argv parameter
+ tracker-needle: Fixed email query which was using
tracker:coalesce() with 1 argument
+ Ontology updates.
+ Bugs fixed: nokia#249028, nokia#244787, nokia#248059.
+ Updated translations.
- Changes from version 0.10.9:
+ Now tracker-info --turtle allows exporting resources in Turtle
RDF
+ libtracker-common:
- Re-instate setrlimit() and clamp between 256Mb and 50% memory
capacity for RLIMIT_{AS|DATA}
- Don't apply setrlimit() constraints to spawned processes
(inherited anyway)
+ libtracker-data: Error when OFFSET, LIMIT, GROUP or ORDER are
used with ASK queries
+ libtracker-sparql: Fixed libtracker_sparql_LDFLAGS missing "\",
causing export of all symbols
+ libtracker-extract: Added new unit test for IPTC records are
read correctly
+ tracker-extract:
- Added a controller thread to be able to shutdown quickly on
pre-unmount signals
- Cleaned up debugging considerably and print summary on start
up
+ Ontology updates.
+ Bugs fixed: bgo#646834, bgo#647548, nokia#238770, nokia#245998,
nokia#244267, nokia#241302, nokia#245589, nokia#245373,
nokia#213419, nokia#240681.
+ Updated translations.
- Drop update-rest.patch: fixed upstream.
- Drop call to autoreconf.
-------------------------------------------------------------------
Mon Apr 11 08:01:53 UTC 2011 - fcrozat@novell.com
- Update to version 0.10.8:
+ libtracker-data: Protect tracker_db_cursor_get_* with mutex
+ libtracker-bus: There is no BatchUpdateArray, UpdateArray is
always considered a batch operation.
+ libtracker-sparql: Fix build from tarball
+ tracker-store: Increase maximum signal size from 1000 to 50000
triples.
+ tracker-store: Fix UpdateArray to use low priority request
+ Bugs fixed: bgo#642883, nokia#244556.
- Changes from version 0.10.7:
+ Introspection support for libtracker-{sparql|miner|extract}.
+ libtracker-sparql: Fixed test case on cancellation error check.
+ tracker-extract: oasis: Avoid invalid frees on non-NULL
pointers.
+ tracker-needle:
- Cancel previous operations when switching views.
- Improve "icons" or "images" category to allow filtering by
all or title.
+ Bugs fixed: bgo#644997, bgo#646365, bgo#646374, bgo#644455,
nokia#244536, nokia#242253, nokia#229461, nokia#237582,
nokia#240272, nokia#241659.
+ Updated translations.
- Update BuildRequires to use vala-devel (instead of
vala-unstable-devel) and add gobject-introspection-devel to build
introspection support.
-------------------------------------------------------------------
Mon Apr 4 10:08:17 UTC 2011 - fcrozat@novell.com
- Update to version 0.10.6:
+ New Feature: Added INSERT OR REPLACE SPARQL, using UPDATE gives
us ca. 25% speed improvement in some cases.
+ libtracker-common: Only use encoding guessing when confidence
is > 30%.
+ libtracker-data: Added new functions tracker:case-fold() and
tracker:lower-case().
+ libtracker-sparql: Handle GSpawnError thrown by GDBus
+ tracker-needle:
- Model reworked showin no delay loading thousands of items.
- Improve error handling.
+ Bugs fixed: bgo#645380, bgo#645934, bgo#645963, bgo#645675,
nokia#241833, nokia#235445, nokia#241206, nokia#240168,
nokia#240582.
- Drop fix-evolution-build.patch: fixed upstream.
- Remove configure --enable-tracker-search-tool option, no longer
present upstream.
-------------------------------------------------------------------
Mon Mar 28 11:53:18 UTC 2011 - fcrozat@novell.com
- Update to version 0.10.5:
+ libtracker-common: Fix localtime handling with historic UTC
offsets.
+ libtracker-data: Fix graph check for anonymous blank nodes.
+ libtracker-sparql:
- Mark tracker_sparql_builder_drop_graph() as deprecated.
- Don't export symbols which are internal.
+ libtracker-miner: Added tracker_miner_manager_new_full() to
disable starting miners when querying status.
+ tracker-store: Don't start if not running when querying status.
+ tracker-miner-fs: Add --no-daemon command line to exit when
indexing done.
+ tracker-extract: Add parameter to QApplication to allow running
without X11.
+ tracker-needle: Set proper application icon.
+ evolution: Fix use of GRAPH with the nie:DataSource, now
indexes properly again.
+ Ontology updates.
+ Bugs fixed: bgo#642012, bgo#645000, bgo#645052, bgo#645375,
bgo#644998.
- Add update-rest.patch: Fix build with rest 0.7.x.
- Add fix-evolution-build.patch: Fix build with evolution 2.91.x
(bgo#645934)
- Change old-style buildRequires to new pkgconfig() ones:
libgee-devel, librest-devel, gnome-panel-devel, nautilus-devel to
gee-1.0, rest-0.7, libpanelapplet-4.0, libnautilus-extension.
- Remove now non-existing --enable-tracker-search-tool configure
option.
-------------------------------------------------------------------
Sun Mar 20 17:46:14 CET 2011 - dimstar@opensuse.org
- Update to version 0.10.4:
+ libtracker-miner:
- Don't assume g_dbus_info_new_for_xml() never fails
- Added missing documentation functions to sections file
+ libtracker-extract: Don't assume g_dbus_info_new_for_xml()
never fails.
+ Bugs fixed: nokia#237582, nokia#237150, nokia#236387,
nokia#233828.
- Changes from version 0.10.3:
+ Bugs fixed: bgo#644484, bgo#642868.
- Changes from version 0.10.2:
+ Ontology: Added nfo:Note for applications like Tomboy
+ functional-tests: Force English locale for tests
+ libtracker-miner: Improve bulk operation speed like deleting
+ tracker-preferences: Enable gettext translations
+ tracker-search-bar: Fixed build error since API change in
libpanel-applet
+ Bugs fixed: nokia#232574, nokia#235118, nokia#229713.
- Changes from version 0.10.1:
+ Bugs fixed: nokia#232981, nokia#231631, nokia#230255,
nokia#228760, bgo#642774, bgo#643739, bgo#636375, bgo#643140,
bgo#642581, bgo#643090.
- Changes from version 0.10.0:
+ Recap of new Features:
- Added GDBus support
- Added direct access library libtracker-sparql for fast
read-only queries
- Added LRU (Least Recently Used) for database statement cache
(huge memory footprint difference)
- Added a GUPnP DLNA extractor
- Added domain specific indexes, adding a column to DB tables
to avoid full table scans/joins with larger tables for
performance.
- Added metadata guarantee support when key data is missing
- Added tracker-sql (in utils/) to run SQL on the databases
directly (for developers)
- Added unicode compliance for FTS (Full Text Search)
- Don't do mtime checks on start up (dramatically reduces start
time for miner-fs)
- Replaced tracker-search-tool with tracker-needle
- New API methods in libtracker-sparql which allow multiple
inserts per DBus call (and yet get multiple errors back).
- New journal format to separate ontology from data for
improved data integrity
- New journal compression and rotation using 50Mb chunk sizes
- Task pool in libtracker-miner for store updates/metadata
extractions, 10-20% speed increase indexing
- Monitor event black listing and events are condensed
- Return types in TrackerSparqlCursor API
- Collation support
- Refactored and much more efficient signal notification API
- Use libtracker-sparql: Client library for direct/dbus access
- SPARQL, Add support for EXISTS and NOT EXISTS
- SPARQL, Add support for IN
- SPARQL, Add support for INSERT SILENT and DELETE SILENT
- Drop tracker-no-duplicated-results.patch: fixed upstream.
- Replace gtk2-devel BuildRequires with gtk3-devel.
-------------------------------------------------------------------
Thu Feb 17 10:24:23 CET 2011 - vuntz@opensuse.org

View File

@ -19,8 +19,8 @@
Name: tracker
Version: 0.9.38
Release: 5
Version: 0.10.10
Release: 1
# FIXME: 2010-03-24 building gtk-doc fails because of a bug in graphviz
License: GPLv2+
Summary: Powerful object database, tag/metadata database, search tool and indexer
@ -29,10 +29,10 @@ Group: Productivity/Other
Source0: %{name}-%{version}.tar.bz2
Source1: README.SUSE.flickr
Source2: README.SUSE.rss
# PATCH-FIX-UPSTREAM tracker-no-duplicated-results.patch bgo#639547 vuntz@opensuse.org -- Don't get duplicated results in search results
Patch0: tracker-no-duplicated-results.patch
# PATCH-FIX-OPENSUSE tracker-removeable-media-off.patch bgo622288 badshah400@gmail.com -- Disable indexing on removable media by default. See bgo#622288 for how it should be done properly.
Patch1: tracker-removeable-media-off.patch
# PATCH-FIX-UPSTREAM tracker-nautilus-extension-compile-gtk3.patch bnc689447 bgo645954 glin@gmail.com -- Compile nautilus extension with gtk3
Patch2: tracker-nautilus-extension-compile-gtk3.patch
BuildRequires: NetworkManager-devel
BuildRequires: dbus-1-glib-devel
BuildRequires: enca-devel
@ -43,15 +43,14 @@ BuildRequires: flac-devel
BuildRequires: gcc-c++
BuildRequires: giflib-devel
BuildRequires: glib2-devel
BuildRequires: gnome-panel-devel
BuildRequires: gobject-introspection-devel
BuildRequires: graphviz
BuildRequires: gstreamer-0_10-plugins-base-devel
BuildRequires: gtk-doc
BuildRequires: gtk2-devel
BuildRequires: gtk3-devel
BuildRequires: intltool
BuildRequires: libexempi-devel
BuildRequires: libexif-devel
BuildRequires: libgee-devel
%if 0%{?suse_version} >= 1130
BuildRequires: libgnome-keyring-devel
%else
@ -66,21 +65,22 @@ BuildRequires: libicu-devel
BuildRequires: libiptcdata-devel
BuildRequires: libpng-devel
BuildRequires: libpoppler-glib-devel
BuildRequires: librest-devel
BuildRequires: libtiff-devel
BuildRequires: libupower-glib-devel
BuildRequires: libuuid-devel
BuildRequires: libvorbis-devel
BuildRequires: libxml2-devel
BuildRequires: nautilus-devel
BuildRequires: sqlite3-devel
BuildRequires: taglib-devel
BuildRequires: totem-pl-parser-devel
BuildRequires: translation-update-upstream
BuildRequires: update-desktop-files
# We require vala 0.11.2 at least, which is vala-unstable in 11.4 cycle.
BuildRequires: vala-unstable-devel
BuildRequires: vala-devel >= 0.12.0
BuildRequires: zlib-devel
BuildRequires: pkgconfig(gee-1.0)
BuildRequires: pkgconfig(libnautilus-extension)
BuildRequires: pkgconfig(libpanelapplet-4.0)
BuildRequires: pkgconfig(rest-0.7)
Recommends: %{name}-lang
# We want to index files by default, if possible
Recommends: %{name}-miner-files
@ -327,22 +327,22 @@ This package contains an nautilus plugin to tag files with Tracker.
%prep
%setup -q
translation-update-upstream
%patch0 -p1
%patch1 -p1
%patch2 -p1
cp %{S:1} src/miners/flickr/README.SUSE
cp %{S:2} src/miners/rss/README.SUSE
%build
autoreconf
%configure \
--enable-libvorbis \
--enable-libflac \
--enable-tracker-explorer \
--enable-tracker-search-bar \
--enable-tracker-search-tool \
--enable-tracker-preferences \
--disable-functional-tests
# --enable-gtk-doc
%__make %{?_smp_mflags}
%__make %{?_smp_mflags} V=1
%install
%makeinstall
@ -491,14 +491,17 @@ rm -rf %{buildroot}
%files -n libtracker-client-0_10-0
%defattr(-,root,root)
%{_libdir}/libtracker-client*.so.*
%{_libdir}/girepository-1.0/Tracker-0.10.typelib
%files -n libtracker-extract-0_10-0
%defattr(-,root,root)
%{_libdir}/libtracker-extract*.so.*
%{_libdir}/girepository-1.0/TrackerExtract-0.10.typelib
%files -n libtracker-miner-0_10-0
%defattr(-,root,root)
%{_libdir}/libtracker-miner*.so.*
%{_libdir}/girepository-1.0/TrackerMiner-0.10.typelib
%files -n libtracker-sparql-0_10-0
%defattr(-, root, root)
@ -518,19 +521,20 @@ rm -rf %{buildroot}
%dir %{_datadir}/vala/vapi
%{_datadir}/vala/vapi/*.deps
%{_datadir}/vala/vapi/*.vapi
%{_datadir}/gir-1.0/*.gir
%files -n gnome-panel-applet-tracker
%defattr(-,root,root)
%{_datadir}/%{name}/tracker-search-bar.ui
%{_datadir}/%{name}/tracker-search-bar-menu.xml
%{_datadir}/dbus-1/services/org.gnome.panel.applet.SearchBarFactory.service
%{_datadir}/gnome-panel/applets/org.gnome.panel.SearchBar.panel-applet
%{_datadir}/gnome-panel/4.0/applets/org.gnome.panel.SearchBar.panel-applet
%{_libexecdir}/tracker-search-bar
%{_mandir}/man1/tracker-search-bar.1*
%files -n nautilus-extension-tracker-tags
%defattr(-,root,root)
%{_libdir}/nautilus/extensions-2.0/libnautilus-tracker-tags*
%{_libdir}/nautilus/extensions-3.0/libnautilus-tracker-tags*
%files lang -f %{name}.lang