pacho 15/01/14 13:21:19
Added: synapse-0.2.10-libgee-0.8.patch
synapse-0.2.10-gnome-3.10.patch
synapse-0.2.10-fix-border-painting.patch
synapse-0.2.10-fix-check-desktop.patch
synapse-0.2.10-check-null-exec.patch
synapse-0.2.10-zeitgeist.patch
Log:
Apply opensuse and Arch patches to fix support for current gnome, newer vala
and newer libgee (#527854)
(Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key
A188FBD4)
Revision Changes Path
1.1 gnome-extra/synapse/files/synapse-0.2.10-libgee-0.8.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/synapse/files/synapse-0.2.10-libgee-0.8.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/synapse/files/synapse-0.2.10-libgee-0.8.patch?rev=1.1&content-type=text/plain
Index: synapse-0.2.10-libgee-0.8.patch
===================================================================
diff -Naur synapse-0.2.10.orig/configure.ac synapse-0.2.10/configure.ac
--- synapse-0.2.10.orig/configure.ac 2012-03-18 20:11:39.000000000 +0100
+++ synapse-0.2.10/configure.ac 2014-08-12 02:52:44.447243355 +0200
@@ -59,7 +59,7 @@
gtk+-2.0 >= $MIN_GTK_VERSION \
gtkhotkey-1.0 \
gobject-2.0 \
- gee-1.0 >= $MIN_GEE_VERSION \
+ gee-0.8 >= $MIN_GEE_VERSION \
gio-unix-2.0 \
json-glib-1.0 >= $MIN_JSON_VERSION \
libnotify \
diff -Naur synapse-0.2.10.orig/src/core/Makefile.am
synapse-0.2.10/src/core/Makefile.am
--- synapse-0.2.10.orig/src/core/Makefile.am 2012-03-18 20:02:58.000000000
+0100
+++ synapse-0.2.10/src/core/Makefile.am 2014-08-12 02:53:07.964488996 +0200
@@ -7,7 +7,7 @@
libsynapsecore_la_VALAFLAGS = \
--pkg gtk+-2.0 \
- --pkg gee-1.0 \
+ --pkg gee-0.8 \
--pkg json-glib-1.0 \
--pkg dbus-glib-1 \
--pkg gio-unix-2.0 \
diff -Naur synapse-0.2.10.orig/src/core/result-set.vala
synapse-0.2.10/src/core/result-set.vala
--- synapse-0.2.10.orig/src/core/result-set.vala 2012-03-18
20:02:41.000000000 +0100
+++ synapse-0.2.10/src/core/result-set.vala 2014-08-12 02:52:44.447243355
+0200
@@ -20,7 +20,7 @@
namespace Synapse
{
- public class ResultSet : Object, Gee.Iterable <Gee.Map.Entry <Match, int>>
+ public class ResultSet : Object, Gee.Traversable<Match>, Gee.Iterable
<Gee.Map.Entry <Match, int>>
{
protected Gee.Map<Match, int> matches;
protected Gee.Set<unowned string> uris;
@@ -88,6 +88,11 @@
return uri in uris;
}
+ public bool foreach (Gee.ForallFunc<Match> func)
+ {
+ return matches.keys.foreach (func);
+ }
+
public Gee.List<Match> get_sorted_list ()
{
var l = new Gee.ArrayList<Gee.Map.Entry<Match, int>> ();
diff -Naur synapse-0.2.10.orig/src/plugins/Makefile.am
synapse-0.2.10/src/plugins/Makefile.am
--- synapse-0.2.10.orig/src/plugins/Makefile.am 2012-03-18 20:04:17.000000000
+0100
+++ synapse-0.2.10/src/plugins/Makefile.am 2014-08-12 02:53:26.878288046
+0200
@@ -8,7 +8,7 @@
libplugins_la_VALAFLAGS = \
--pkg gtk+-2.0 \
- --pkg gee-1.0 \
+ --pkg gee-0.8 \
--pkg json-glib-1.0 \
--pkg dbus-glib-1 \
--pkg gio-unix-2.0 \
diff -Naur synapse-0.2.10.orig/src/ui/keybindings.vala
synapse-0.2.10/src/ui/keybindings.vala
--- synapse-0.2.10.orig/src/ui/keybindings.vala 2012-03-18 20:02:41.000000000
+0100
+++ synapse-0.2.10/src/ui/keybindings.vala 2014-08-12 02:52:44.463910433
+0200
@@ -82,9 +82,9 @@
this.cmd = cmd;
this.mods = mods;
}
- public static int compare (void* a, void* b)
+ public static int compare (ModCmd a, ModCmd b)
{
- return (int)(((ModCmd)a).mods) - (int)(((ModCmd)b).mods);
+ return (int)(a.mods) - (int)(b.mods);
}
}
diff -Naur synapse-0.2.10.orig/src/ui/Makefile.am
synapse-0.2.10/src/ui/Makefile.am
--- synapse-0.2.10.orig/src/ui/Makefile.am 2012-03-18 20:05:19.000000000
+0100
+++ synapse-0.2.10/src/ui/Makefile.am 2014-08-12 02:53:46.262098738 +0200
@@ -12,7 +12,7 @@
--pkg gio-2.0 \
--pkg gio-unix-2.0 \
--pkg zeitgeist-1.0 \
- --pkg gee-1.0 \
+ --pkg gee-0.8 \
--pkg json-glib-1.0 \
--pkg unique-1.0 \
--pkg libnotify \
1.1 gnome-extra/synapse/files/synapse-0.2.10-gnome-3.10.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/synapse/files/synapse-0.2.10-gnome-3.10.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/synapse/files/synapse-0.2.10-gnome-3.10.patch?rev=1.1&content-type=text/plain
Index: synapse-0.2.10-gnome-3.10.patch
===================================================================
Index: synapse-0.2.10/src/ui/inspector.vala
===================================================================
--- synapse-0.2.10.orig/src/ui/inspector.vala
+++ synapse-0.2.10/src/ui/inspector.vala
@@ -28,7 +28,7 @@ namespace UI
public Inspector ()
{
- timer_id = Timeout.add (500, this.check_window_at_pointer);
+ timer_id = Gtk.Timeout.add (500, this.check_window_at_pointer);
}
~Inspector ()
Index: synapse-0.2.10/src/ui/widgets-matchlistview.vala
===================================================================
--- synapse-0.2.10.orig/src/ui/widgets-matchlistview.vala
+++ synapse-0.2.10/src/ui/widgets-matchlistview.vala
@@ -551,7 +551,7 @@ namespace Synapse.Gui
}
if (needs_animation)
{
- if (tid == 0) tid = Timeout.add (ANIM_TIMEOUT,
this.update_current_offsets);
+ if (tid == 0) tid = Gtk.Timeout.add (ANIM_TIMEOUT,
this.update_current_offsets);
this.queue_draw ();
return true;
}
@@ -734,7 +734,7 @@ namespace Synapse.Gui
this.inhibit_move = true;
this.set_indexes (this.dragdrop_target_item,
this.dragdrop_target_item);
this.selected_index_changed (this.select_index);
- Timeout.add (Gtk.Settings.get_default ().gtk_double_click_time ,()=>{
+ Gtk.Timeout.add (Gtk.Settings.get_default ().gtk_double_click_time
,()=>{
if (inhibit_move)
{
inhibit_move = false;
Index: synapse-0.2.10/src/ui/widgets.vala
===================================================================
--- synapse-0.2.10.orig/src/ui/widgets.vala
+++ synapse-0.2.10/src/ui/widgets.vala
@@ -185,7 +185,7 @@ namespace Synapse.Gui
{
if (tid != 0) return;
- tid = Timeout.add (40, ()=>{
+ tid = Gtk.Timeout.add (40, ()=>{
offset = (offset - 1) % (_anim_width);
queue_draw ();
return true;
@@ -245,7 +245,7 @@ namespace Synapse.Gui
{
if (tid == 0)
{
- tid = Timeout.add (INITIAL_TIMEOUT, ()=>{
+ tid = Gtk.Timeout.add (INITIAL_TIMEOUT, ()=>{
tid = 0;
start_animation ();
return false;
@@ -1085,7 +1085,7 @@ namespace Synapse.Gui
}
if (tid == 0)
{
- tid = Timeout.add (30, ()=>{
+ tid = Gtk.Timeout.add (30, ()=>{
return update_current_offset ();
});
}
@@ -1121,7 +1121,7 @@ namespace Synapse.Gui
});
this.size_allocate.connect (()=>{
if (tid == 0)
- tid = Timeout.add (30, ()=>{
+ tid = Gtk.Timeout.add (30, ()=>{
return update_current_offset ();
});
});
1.1
gnome-extra/synapse/files/synapse-0.2.10-fix-border-painting.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/synapse/files/synapse-0.2.10-fix-border-painting.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/synapse/files/synapse-0.2.10-fix-border-painting.patch?rev=1.1&content-type=text/plain
Index: synapse-0.2.10-fix-border-painting.patch
===================================================================
Index: synapse-0.2.10/src/ui/widgets.vala
===================================================================
--- synapse-0.2.10.orig/src/ui/widgets.vala
+++ synapse-0.2.10/src/ui/widgets.vala
@@ -232,7 +232,7 @@ namespace Synapse.Gui
real_size = real_size - 1;
a.value = this.size_to_scale[real_size];
layout.context_changed ();
- requistion_for_size (out req, null, real_size, true);
+ requisition_for_size (out req, null, real_size, true);
if (allocation.width >= req.width)
{
@@ -306,10 +306,9 @@ namespace Synapse.Gui
return true;
}
- protected void requistion_for_size (out Requisition req, out int
char_width, Size s, bool return_only_width = false)
+ protected void requisition_for_size (out Requisition req, out int
char_width, Size s, bool return_only_width = false)
{
- req.width = this.xpad * 2;
- req.height = this.ypad * 2;
+ req = { this.xpad * 2, this.ypad * 2 };
Pango.Rectangle logical_rect;
layout.set_width (-1);
@@ -334,7 +333,7 @@ namespace Synapse.Gui
{
layout.set_markup ("<span size=\"%s\">%s</span>".printf
(size_to_string[_size], this.text), -1);
int char_width;
- this.requistion_for_size (out req, out char_width, this._size);
+ this.requisition_for_size (out req, out char_width, this._size);
last_req.width = req.width;
last_req.height = req.height;
if (!this.natural_requisition && (this.ellipsize !=
Pango.EllipsizeMode.NONE || animate))
@@ -755,6 +754,10 @@ namespace Synapse.Gui
ctx.set_operator (Cairo.Operator.OVER);
ctx.set_line_width (1.25);
+ Gdk.cairo_rectangle (ctx, event.area);
+ ctx.clip ();
+ ctx.save ();
+
double x = this.allocation.x + this.left_padding,
y = this.allocation.y + this.top_padding,
w = this.allocation.width - this.left_padding -
this.right_padding - 3.0,
@@ -764,16 +767,13 @@ namespace Synapse.Gui
ch.set_source_rgba (ctx, input_alpha, ch.StyleType.BG,
StateType.NORMAL, ch.Mod.DARKER);
else
ch.set_source_rgba (ctx, input_alpha, ch.StyleType.FG,
StateType.NORMAL, ch.Mod.INVERTED);
- Cairo.Path path = ctx.copy_path ();
- ctx.save ();
- ctx.clip ();
- ctx.paint ();
+ ctx.fill_preserve ();
var pat = new Cairo.Pattern.linear (0, y, 0, y + shadow_height);
ch.add_color_stop_rgba (pat, 0, 0.6 * input_alpha, ch.StyleType.FG,
StateType.NORMAL);
ch.add_color_stop_rgba (pat, 0.3, 0.25 * input_alpha, ch.StyleType.FG,
StateType.NORMAL);
ch.add_color_stop_rgba (pat, 1.0, 0, ch.StyleType.FG,
StateType.NORMAL);
ctx.set_source (pat);
- ctx.paint ();
+ ctx.fill ();
if (_focus_widget != null)
{
/*
@@ -818,7 +818,7 @@ namespace Synapse.Gui
ctx.paint ();
}
ctx.restore ();
- ctx.append_path (path);
+ Utils.cairo_rounded_rect (ctx, x, y, w, h, border_radius);
ch.set_source_rgba (ctx, 0.6 * input_alpha, ch.StyleType.FG,
StateType.NORMAL);
ctx.stroke ();
}
1.1
gnome-extra/synapse/files/synapse-0.2.10-fix-check-desktop.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/synapse/files/synapse-0.2.10-fix-check-desktop.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/synapse/files/synapse-0.2.10-fix-check-desktop.patch?rev=1.1&content-type=text/plain
Index: synapse-0.2.10-fix-check-desktop.patch
===================================================================
diff -Naur synapse-0.2.10.orig/src/core/desktop-file-service.vala
synapse-0.2.10/src/core/desktop-file-service.vala
--- synapse-0.2.10.orig/src/core/desktop-file-service.vala 2012-03-18
20:02:41.000000000 +0100
+++ synapse-0.2.10/src/core/desktop-file-service.vala 2012-03-19
12:06:43.080443401 +0100
@@ -248,13 +248,23 @@
private void get_environment_type ()
{
- unowned string? session_var = Environment.get_variable
("DESKTOP_SESSION");
-
+ unowned string? session_var;
+ session_var = Environment.get_variable ("XDG_CURRENT_DESKTOP");
+ if (session_var == null)
+ {
+ session_var = Environment.get_variable ("DESKTOP_SESSION");
+ }
+
if (session_var == null) return;
string session = session_var.down ();
- if (session.has_prefix ("kde"))
+ if (session.has_prefix ("unity"))
+ {
+ session_type = DesktopFileInfo.EnvironmentType.UNITY;
+ session_type_str = "Unity";
+ }
+ else if (session.has_prefix ("kde"))
{
session_type = DesktopFileInfo.EnvironmentType.KDE;
session_type_str = "KDE";
1.1
gnome-extra/synapse/files/synapse-0.2.10-check-null-exec.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/synapse/files/synapse-0.2.10-check-null-exec.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/synapse/files/synapse-0.2.10-check-null-exec.patch?rev=1.1&content-type=text/plain
Index: synapse-0.2.10-check-null-exec.patch
===================================================================
diff -Naur synapse-0.2.10.orig/src/core/desktop-file-service.vala
synapse-0.2.10/src/core/desktop-file-service.vala
--- synapse-0.2.10.orig/src/core/desktop-file-service.vala 2012-03-18
20:02:41.000000000 +0100
+++ synapse-0.2.10/src/core/desktop-file-service.vala 2012-12-26
18:07:55.962276823 +0100
@@ -125,7 +125,11 @@
}
name = app_info.get_name ();
- exec = app_info.get_executable ();
+ exec = app_info.get_commandline ();
+ if (exec == null)
+ {
+ throw new DesktopFileError.UNINTERESTING_ENTRY ("Unable to get exec
for %s".printf (name));
+ }
// check for hidden desktop files
if (keyfile.has_key (GROUP, "Hidden") &&
1.1 gnome-extra/synapse/files/synapse-0.2.10-zeitgeist.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/synapse/files/synapse-0.2.10-zeitgeist.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/gnome-extra/synapse/files/synapse-0.2.10-zeitgeist.patch?rev=1.1&content-type=text/plain
Index: synapse-0.2.10-zeitgeist.patch
===================================================================
=== modified file 'src/ui/Makefile.am'
--- src/ui/Makefile.am 2012-03-18 19:11:23 +0000
+++ src/ui/Makefile.am 2012-03-18 19:55:48 +0000
@@ -11,7 +11,6 @@
--pkg gdk-x11-2.0 \
--pkg gio-2.0 \
--pkg gio-unix-2.0 \
- --pkg zeitgeist-1.0 \
--pkg gee-0.8 \
--pkg json-glib-1.0 \
--pkg unique-1.0 \