Merge lp:~davidgomes/pantheon-terminal/fix-1029460 into lp:~elementary-apps/pantheon-terminal/trunk

Proposed by David Gomes
Status: Merged
Merged at revision: 311
Proposed branch: lp:~davidgomes/pantheon-terminal/fix-1029460
Merge into: lp:~elementary-apps/pantheon-terminal/trunk
Diff against target: 84 lines (+16/-7)
5 files modified
org.elementary.pantheon-terminal.gschema.xml (+1/-1)
src/PantheonTerminal.vala (+6/-2)
src/PantheonTerminalWindow.vala (+8/-2)
src/Settings.vala (+1/-1)
src/TerminalWidget.vala (+0/-1)
To merge this branch: bzr merge lp:~davidgomes/pantheon-terminal/fix-1029460
Reviewer Review Type Date Requested Status
Tom Beckmann (community) Approve
Review via email: mp+120580@code.launchpad.net

Description of the change

There's a property in dconf-editor called "follow-last-tab" (default is True). If it is true, then when a new tab is open, it will open on the same directory as the last currently active tab, fixing bug #1029460.

To post a comment you must log in.
Revision history for this message
Tom Beckmann (tombeckmann) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'org.elementary.pantheon-terminal.gschema.xml'
2--- org.elementary.pantheon-terminal.gschema.xml 2012-08-17 22:53:36 +0000
3+++ org.elementary.pantheon-terminal.gschema.xml 2012-08-21 14:20:25 +0000
4@@ -35,7 +35,7 @@
5 <summary>Number of scrollback lines</summary>
6 <description>The number of scrollback lines of the terminal.</description>
7 </key>
8- <key name="follow-last-tabs" type="b">
9+ <key name="follow-last-tab" type="b">
10 <default>true</default>
11 <summary>Open last active tab path on new tab.</summary>
12 <description>Defines whether a new tab should have the path of the last active tab.</description>
13
14=== modified file 'src/PantheonTerminal.vala'
15--- src/PantheonTerminal.vala 2012-07-31 09:52:59 +0000
16+++ src/PantheonTerminal.vala 2012-08-21 14:20:25 +0000
17@@ -70,8 +70,12 @@
18
19 protected override void activate () {
20 if (app_shell_name != null) {
21- GLib.Process.spawn_command_line_async ("gksu chsh -s " + app_shell_name);
22- return;
23+ try {
24+ GLib.Process.spawn_command_line_async ("gksu chsh -s " + app_shell_name);
25+ return;
26+ } catch (Error e) {
27+ warning (e.message);
28+ }
29 }
30
31 new_window ();
32
33=== modified file 'src/PantheonTerminalWindow.vala'
34--- src/PantheonTerminalWindow.vala 2012-08-15 13:20:50 +0000
35+++ src/PantheonTerminalWindow.vala 2012-08-21 14:20:25 +0000
36@@ -101,7 +101,10 @@
37 error ("Couldn't load the UI: %s", e.message);
38 }
39
40- Gtk.AccelGroup accel_group = ui.get_accel_group();
41+ Notify.init ("pantheon-terminal");
42+ //new Notify.Notification ("Bye Process", "apt-get moo finished", "utilities-terminal").show ();
43+
44+ Gtk.AccelGroup accel_group = ui.get_accel_group ();
45 add_accel_group (accel_group);
46
47 ui.insert_action_group (main_actions, 0);
48@@ -422,7 +425,10 @@
49 }
50
51 void action_new_tab () {
52- new_tab ();
53+ if (settings.follow_last_tab)
54+ new_tab (current_terminal.get_shell_location ());
55+ else
56+ new_tab ();
57 }
58
59 void action_about () {
60
61=== modified file 'src/Settings.vala'
62--- src/Settings.vala 2012-08-15 19:59:12 +0000
63+++ src/Settings.vala 2012-08-21 14:20:25 +0000
64@@ -44,7 +44,7 @@
65 public class Settings : Granite.Services.Settings {
66
67 public int scrollback_lines { get; set; }
68- public bool follow_last_tabs { get; set; }
69+ public bool follow_last_tab { get; set; }
70
71 public int opacity {get; set; }
72 public string foreground { get; set; }
73
74=== modified file 'src/TerminalWidget.vala'
75--- src/TerminalWidget.vala 2012-08-15 19:35:31 +0000
76+++ src/TerminalWidget.vala 2012-08-21 14:20:25 +0000
77@@ -116,7 +116,6 @@
78
79 /*Make Links Clickable */
80 this.clickable("""(https?|ftps?)://\S+""");
81-
82 }
83
84 void on_child_exited () { }

Subscribers

People subscribed via source and target branches