[Pkg-privacy-commits] [onioncircuits] 01/02: Add patches.

Sascha Steinbiss sascha at steinbiss.name
Sun May 15 16:40:53 UTC 2016


This is an automated email from the git hooks/post-receive script.

sascha-guest pushed a commit to annotated tag tails/0.3-0tails2
in repository onioncircuits.

commit 85d7fe7af9962311e997896d300d3c0124e042db
Author: anonym <anonym at riseup.net>
Date:   Fri Apr 22 16:25:36 2016 +0200

    Add patches.
---
 ...w-placeholder-when-circuits-list-is-empty.patch | 44 ++++++++++++++
 ...-Make-both-panes-of-the-window-scrollable.patch | 70 ++++++++++++++++++++++
 debian/patches/series                              |  2 +
 3 files changed, 116 insertions(+)

diff --git a/debian/patches/0001-Don-t-show-placeholder-when-circuits-list-is-empty.patch b/debian/patches/0001-Don-t-show-placeholder-when-circuits-list-is-empty.patch
new file mode 100644
index 0000000..b54ccc4
--- /dev/null
+++ b/debian/patches/0001-Don-t-show-placeholder-when-circuits-list-is-empty.patch
@@ -0,0 +1,44 @@
+From e21c421afa9c13592a8b80e0fa1ad5f0696c5805 Mon Sep 17 00:00:00 2001
+From: Alan <alan at boum.org>
+Date: Fri, 1 Apr 2016 22:39:51 +0200
+Subject: [PATCH 1/2] Don't show placeholder when circuits list is empty
+
+---
+ onioncircuits | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/onioncircuits b/onioncircuits
+index 2974749..f62f8c8 100755
+--- a/onioncircuits
++++ b/onioncircuits
+@@ -138,9 +138,8 @@ class OnionCircuitsWindow(Gtk.ApplicationWindow):
+         # Circuit details
+         self._path = Gtk.ListBox()
+         self._path.set_selection_mode(Gtk.SelectionMode.NONE)
+-        placeholder = Gtk.Label(_("Click on a path to get details"))
+-        placeholder.show()
+-        self._path.set_placeholder(placeholder)
++        self._placeholder = Gtk.Label(_("Click on a path to get details"))
++        self._path.set_placeholder(self._placeholder)
+         self._path.set_property('margin', 6)
+         self._path.set_property('expand', True)
+         self._path.set_property('halign', Gtk.Align.FILL)
+@@ -217,6 +216,7 @@ class OnionCircuitsWindow(Gtk.ApplicationWindow):
+         self._infobar.set_message_type(Gtk.MessageType.ERROR)
+         self._infobar.show()
+         self._treestore.clear()
++        self._placeholder.set_visible(False)
+         return False
+ 
+     def connection_init_cb(self):
+@@ -321,6 +321,7 @@ class OnionCircuitsWindow(Gtk.ApplicationWindow):
+ 
+         :returns: the :class:`Gtk.TreeIter` corresponding to the circuit
+         """
++        self._placeholder.set_visible(True)
+         circ_iter = self._treestore.append(None,
+                         [self.TYPE_CIRC,
+                         circuit.id,
+-- 
+2.8.1
+
diff --git a/debian/patches/0002-Make-both-panes-of-the-window-scrollable.patch b/debian/patches/0002-Make-both-panes-of-the-window-scrollable.patch
new file mode 100644
index 0000000..827edb2
--- /dev/null
+++ b/debian/patches/0002-Make-both-panes-of-the-window-scrollable.patch
@@ -0,0 +1,70 @@
+From 8d42e84c7b1536a5544d9649a75c42e85398df07 Mon Sep 17 00:00:00 2001
+From: Alan <alan at boum.org>
+Date: Fri, 1 Apr 2016 22:56:22 +0200
+Subject: [PATCH 2/2] Make both panes of the window scrollable
+
+This should make the window resizeable to any size.
+
+Will-fix: #11192
+---
+ onioncircuits | 23 ++++++++++++++++-------
+ 1 file changed, 16 insertions(+), 7 deletions(-)
+
+diff --git a/onioncircuits b/onioncircuits
+index f62f8c8..845aae7 100755
+--- a/onioncircuits
++++ b/onioncircuits
+@@ -86,7 +86,9 @@ class OnionCircuitsWindow(Gtk.ApplicationWindow):
+     def _create_ui(self):
+         """Creates the user interface
+         """
+-        self.set_default_size(600, 400)
++        self.set_default_size(
++                width=min(900, self.get_screen().get_width()),
++                height=min(500, self.get_screen().get_height()))
+         self.set_icon_name('onioncircuits')
+         self.connect('delete-event', self.delete_event_cb)
+ 
+@@ -97,6 +99,7 @@ class OnionCircuitsWindow(Gtk.ApplicationWindow):
+         self.set_titlebar(headerbar)
+ 
+         grid = Gtk.Grid()
++        grid.set_column_homogeneous(True)
+         self.add(grid)
+ 
+         self._infobar = Gtk.InfoBar()
+@@ -131,7 +134,7 @@ class OnionCircuitsWindow(Gtk.ApplicationWindow):
+         scrolledwindow_circuits.set_property('halign', Gtk.Align.FILL)
+         scrolledwindow_circuits.set_property('valign', Gtk.Align.FILL)
+         scrolledwindow_circuits.set_policy(
+-                hscrollbar_policy=Gtk.PolicyType.NEVER,
++                hscrollbar_policy=Gtk.PolicyType.AUTOMATIC,
+                 vscrollbar_policy=Gtk.PolicyType.AUTOMATIC)
+         grid.attach(scrolledwindow_circuits, 0, 1, 1, 1)
+ 
+@@ -140,11 +143,17 @@ class OnionCircuitsWindow(Gtk.ApplicationWindow):
+         self._path.set_selection_mode(Gtk.SelectionMode.NONE)
+         self._placeholder = Gtk.Label(_("Click on a path to get details"))
+         self._path.set_placeholder(self._placeholder)
+-        self._path.set_property('margin', 6)
+-        self._path.set_property('expand', True)
+-        self._path.set_property('halign', Gtk.Align.FILL)
+-        self._path.set_property('valign', Gtk.Align.FILL)
+-        grid.attach(self._path, 1, 1, 1, 1)
++
++        scrolledwindow_path = Gtk.ScrolledWindow()
++        scrolledwindow_path.add(self._path)
++        scrolledwindow_path.set_property('margin', 6)
++        scrolledwindow_path.set_property('expand', True)
++        scrolledwindow_path.set_property('halign', Gtk.Align.FILL)
++        scrolledwindow_path.set_property('valign', Gtk.Align.FILL)
++        scrolledwindow_path.set_policy(
++                hscrollbar_policy=Gtk.PolicyType.AUTOMATIC,
++                vscrollbar_policy=Gtk.PolicyType.AUTOMATIC)
++        grid.attach(scrolledwindow_path, 1, 1, 1, 1)
+ 
+         self.show_all()
+ 
+-- 
+2.8.1
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..b4be5f8
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+0001-Don-t-show-placeholder-when-circuits-list-is-empty.patch
+0002-Make-both-panes-of-the-window-scrollable.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onioncircuits.git



More information about the Pkg-privacy-commits mailing list