Merge lp:~stevenvandenbrandenstift/pantheon-terminal/fix-1375346 into lp:~elementary-apps/pantheon-terminal/trunk

Proposed by Steven Vanden Branden
Status: Superseded
Proposed branch: lp:~stevenvandenbrandenstift/pantheon-terminal/fix-1375346
Merge into: lp:~elementary-apps/pantheon-terminal/trunk
Diff against target: 130 lines (+18/-23)
3 files modified
CMakeLists.txt (+3/-3)
src/Settings.vala (+1/-1)
src/TerminalWidget.vala (+14/-19)
To merge this branch: bzr merge lp:~stevenvandenbrandenstift/pantheon-terminal/fix-1375346
Reviewer Review Type Date Requested Status
elementary Apps team Pending
Review via email: mp+236574@code.launchpad.net

This proposal has been superseded by a proposal from 2014-10-01.

Commit message

Update for Vte 2.91

Description of the change

updates the (to be) deprecated Gdk.Color to Gdk.RGBA
Update for Vte 2.91

To post a comment you must log in.
Revision history for this message
Cody Garver (codygarver) wrote :

Remove commented out code and fix code style violations, function() should be function ()

642. By Steven Vanden Branden

fix coding style

643. By Steven Vanden Branden

remove new for structs

Revision history for this message
Steven Vanden Branden (stevenvandenbrandenstift) wrote :

> Remove commented out code and fix code style violations, function() should be
> function ()

should all be fixed now, thanks

Revision history for this message
Rico Tzschichholz (ricotz) wrote :

I can't speak for the maintainer of pantheon-terminal, but this should not be done like that.

Imo the support for vte2.91 *must* be conditional and vte2.90 support needs to be preserved. Also keeping in mind that Freya won't receive vte2.91.

Revision history for this message
Steven Vanden Branden (stevenvandenbrandenstift) wrote :

owk i forget to adjust that. i will adjust it so it uses vte version 2.90 or higher

644. By Steven Vanden Branden

fix backwards compability

Unmerged revisions

644. By Steven Vanden Branden

fix backwards compability

643. By Steven Vanden Branden

remove new for structs

642. By Steven Vanden Branden

fix coding style

641. By Steven Vanden Branden

fix for vte 2.91

640. By Steven Vanden Branden

fix background and foreground colors

639. By Steven Vanden Branden

change deprecated fork_all with spawn_async

638. By Steven Vanden Branden

change Color to RGBA + remove obsolete background setting

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2014-07-31 21:13:28 +0000
3+++ CMakeLists.txt 2014-09-30 18:33:49 +0000
4@@ -42,7 +42,7 @@
5 gthread-2.0
6 gtk+-3.0>=3.9.10
7 granite>=0.3.0
8- vte-2.90
9+ vte-2.91
10 libnotify
11 gdk-3.0)
12
13@@ -70,7 +70,7 @@
14 src/ForegroundProcessDialog.vala
15 src/Constants.vala
16 PACKAGES
17- vte-2.90
18+ vte-2.91
19 granite
20 gtk+-3.0
21 libnotify
22@@ -96,4 +96,4 @@
23 install (TARGETS pantheon-terminal RUNTIME DESTINATION bin)
24 install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/pantheon-terminal.desktop DESTINATION share/applications)
25 install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/open-pantheon-terminal-here.desktop DESTINATION share/applications)
26-install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/enable-zsh-completion-notifications DESTINATION share/pantheon-terminal)
27+install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/enable-zsh-completion-notifications DESTINATION share/pantheon-terminal)
28\ No newline at end of file
29
30=== modified file 'src/Settings.vala'
31--- src/Settings.vala 2014-08-05 23:31:01 +0000
32+++ src/Settings.vala 2014-09-30 18:33:49 +0000
33@@ -63,7 +63,7 @@
34 public string foreground { get; set; }
35 public string background { get; set; }
36 public string cursor_color { get; set; }
37- public Vte.TerminalCursorShape cursor_shape { get; set; }
38+ public Vte.CursorShape cursor_shape { get; set; }
39 public string palette { get; set; }
40
41 public string shell { get; set; }
42
43=== modified file 'src/TerminalWidget.vala'
44--- src/TerminalWidget.vala 2014-08-08 07:11:29 +0000
45+++ src/TerminalWidget.vala 2014-09-30 18:33:49 +0000
46@@ -100,9 +100,6 @@
47
48 terminal_id = "%i".printf (terminal_id_counter++);
49
50- /* Sets characters that define word for double click selection */
51- set_word_chars ("-A-Za-z0-9/.,_~#%?:=+@");
52-
53 restore_settings ();
54 settings.changed.connect (restore_settings);
55
56@@ -175,14 +172,13 @@
57 public void restore_settings () {
58 /* Load configuration */
59 int opacity = settings.opacity * 65535;
60- set_background_image (null);
61 set_opacity ((uint16) (opacity / 100));
62
63- Gdk.Color background_color;
64- Gdk.Color.parse (settings.background, out background_color);
65+ Gdk.RGBA background_color = Gdk.RGBA ();
66+ Gdk.RGBA foreground_color = Gdk.RGBA ();
67
68- Gdk.Color foreground_color;
69- Gdk.Color.parse (settings.foreground, out foreground_color);
70+ background_color.parse (settings.background);
71+ foreground_color.parse (settings.foreground);
72
73 string[] hex_palette = {"#000000", "#FF6C60", "#A8FF60", "#FFFFCC", "#96CBFE",
74 "#FF73FE", "#C6C5FE", "#EEEEEE", "#000000", "#FF6C60",
75@@ -201,19 +197,18 @@
76 }
77 }
78
79- Gdk.Color[] palette = new Gdk.Color[16];
80+ Gdk.RGBA[] palette = new Gdk.RGBA[16];
81
82 for (int i = 0; i < hex_palette.length; i++) {
83- Gdk.Color new_color;
84- Gdk.Color.parse (hex_palette[i], out new_color);
85-
86+ Gdk.RGBA new_color= Gdk.RGBA();
87+ new_color.parse (hex_palette[i]);
88 palette[i] = new_color;
89 }
90
91 set_colors (foreground_color, background_color, palette);
92
93- Gdk.Color cursor_color;
94- Gdk.Color.parse (settings.cursor_color, out cursor_color);
95+ Gdk.RGBA cursor_color = Gdk.RGBA ();
96+ cursor_color.parse (settings.cursor_color);
97 set_color_cursor (cursor_color);
98
99 /* Bold font */
100@@ -271,8 +266,8 @@
101 };
102
103 try {
104- this.fork_command_full (Vte.PtyFlags.DEFAULT, dir, { shell },
105- envv, SpawnFlags.SEARCH_PATH, null, out this.child_pid);
106+ this.spawn_sync (Vte.PtyFlags.DEFAULT, dir, { shell },
107+ envv, SpawnFlags.SEARCH_PATH, null, out this.child_pid, null);
108 } catch (Error e) {
109 warning (e.message);
110 }
111@@ -283,8 +278,8 @@
112 string[]? program_with_args = null;
113 Shell.parse_argv (program_string, out program_with_args);
114
115- this.fork_command_full (Vte.PtyFlags.DEFAULT, null, program_with_args,
116- null, SpawnFlags.SEARCH_PATH, null, out this.child_pid);
117+ this.spawn_sync (Vte.PtyFlags.DEFAULT, null, program_with_args,
118+ null, SpawnFlags.SEARCH_PATH, null, out this.child_pid, null);
119 } catch (Error e) {
120 warning (e.message);
121 }
122@@ -296,7 +291,7 @@
123 return false;
124 }
125
126- int pty = this.pty_object.fd;
127+ int pty = get_pty().fd;
128 int fgpid = Posix.tcgetpgrp (pty);
129
130 if (fgpid != this.child_pid && fgpid != -1) {

Subscribers

People subscribed via source and target branches