Merge lp:~ivaldi/midori/tabby-restore-count into lp:midori

Proposed by André Stösel
Status: Merged
Approved by: Cris Dywan
Approved revision: 6404
Merged at revision: 6440
Proposed branch: lp:~ivaldi/midori/tabby-restore-count
Merge into: lp:midori
Diff against target: 45 lines (+12/-2)
1 file modified
extensions/tabby.vala (+12/-2)
To merge this branch: bzr merge lp:~ivaldi/midori/tabby-restore-count
Reviewer Review Type Date Requested Status
Cris Dywan Approve
André Stösel Approve
Paweł Forysiuk Approve
Review via email: mp+186007@code.launchpad.net

Commit message

option to modify the number of tabs which will be restored in each idle callback

To post a comment you must log in.
Revision history for this message
Cris Dywan (kalikiana) wrote :

To be blunt I'm not keen on telling users to tweak this kind of thing. Feedback from many users had to do with under-using session capabilities because they're confused by the settings and this probably is even harder to make good use of.
I would like to hear another opinion on this. Personally I'd prefer just slightly raising the number but without making it configurable.

review: Needs Information
6401. By André Stösel

merge lp:midori

6402. By André Stösel

set IdleRestoreCount to 12

Revision history for this message
Paweł Forysiuk (tuxator) wrote :

I am fine with this being a hidden setting (i think there is no user facing gui for this).
Could be handy for tweaking and testing purposes and code is not that intrusive imho.

review: Approve
Revision history for this message
André Stösel (ivaldi) wrote :

The idea is that someone who has a problem with the default setting (low end arm system) can change it. There is no UI for this -> the user won't be bothered with this setting until he reads the FAQ (some sort of tuning or problem solving section)

Revision history for this message
Cris Dywan (kalikiana) wrote :

So how about an environment variable? For testing I find that much easier than looking for a file to edit.

review: Needs Fixing
6403. By André Stösel

merge lp:midori

6404. By André Stösel

use env to change the restore count instead of an extension property

Revision history for this message
André Stösel (ivaldi) :
review: Needs Resubmitting
Revision history for this message
André Stösel (ivaldi) wrote :

Oops, I thought resubmit would trigger a new review message but it doesn't.
("review resubmit - tell the developer to rework the change")

review: Approve
Revision history for this message
Cris Dywan (kalikiana) wrote :

I think it's intended the other way around - a broad hint from the reviewer to the developer.

Looks good! Was thinking a bit about the =0 case but doesn't really matter much, it's aimed at testing anyway.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'extensions/tabby.vala'
2--- extensions/tabby.vala 2013-10-15 18:12:34 +0000
3+++ extensions/tabby.vala 2013-10-17 21:52:37 +0000
4@@ -10,6 +10,8 @@
5 */
6
7 namespace Tabby {
8+ int IDLE_RESTORE_COUNT = 13;
9+
10 /* function called from Manager object */
11 public interface IStorage : GLib.Object {
12 public abstract Katze.Array get_sessions ();
13@@ -144,7 +146,7 @@
14 /* Note: we need to use `items` for something to maintain a valid reference */
15 GLib.PtrArray new_tabs = new GLib.PtrArray ();
16 if (items.length () > 0) {
17- for (int i = 0; i < 3; i++) {
18+ for (int i = 0; i < IDLE_RESTORE_COUNT; i++) {
19 if (u_items == null) {
20 this.helper_reorder_tabs (new_tabs);
21 this.state = SessionState.OPEN;
22@@ -641,6 +643,14 @@
23 }
24
25 private void activated (Midori.App app) {
26+ unowned string? restore_count = GLib.Environment.get_variable ("TABBY_RESTORE_COUNT");
27+ if (restore_count != null) {
28+ int count = int.parse (restore_count);
29+ if (count >= 1) {
30+ IDLE_RESTORE_COUNT = count;
31+ }
32+ }
33+
34 /* FixMe: provide an option to replace Local.Storage with IStorage based Objects */
35 this.storage = new Local.Storage (this.get_app ()) as Base.Storage;
36
37@@ -657,7 +667,7 @@
38 version: "0.1",
39 authors: "André Stösel <andre@stoesel.de>");
40
41- activate.connect (this.activated);
42+ this.activate.connect (this.activated);
43 }
44 }
45 }

Subscribers

People subscribed via source and target branches

to all changes: