[gedit-plugins] Use RGBA colors and finally use fork_command_full.
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-plugins] Use RGBA colors and finally use fork_command_full.
- Date: Thu, 17 Feb 2011 09:30:54 +0000 (UTC)
commit 9bded09c25c1f4b4b1b95a2963fc9a580e8f0425
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Thu Feb 17 10:30:03 2011 +0100
Use RGBA colors and finally use fork_command_full.
plugins/terminal/terminal.py | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
---
diff --git a/plugins/terminal/terminal.py b/plugins/terminal/terminal.py
index 8574993..5578f63 100644
--- a/plugins/terminal/terminal.py
+++ b/plugins/terminal/terminal.py
@@ -20,7 +20,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA
-from gi.repository import GObject, Gio, Pango, Gdk, Gtk, Gedit, Vte
+from gi.repository import GObject, GLib, Gio, Pango, Gdk, Gtk, Gedit, Vte
import os
import gettext
from gpdefs import *
@@ -87,12 +87,10 @@ class GeditTerminal(Gtk.Box):
if accel == None:
Gtk.AccelMap.add_entry(path, self._accels[name][0], self._accels[name][1])
- #FIXME
- #self._vte.fork_command_full(Vte.PtyFlags.DEFAULT, None, [], None, glib.SpawnFlags.CHILD_INHERITS_STDIN | glib.SpawnFlags.SEARCH_PATH, None, None)
+ self._vte.fork_command_full(Vte.PtyFlags.DEFAULT, None, [Vte.get_user_shell()], None, GLib.SpawnFlags.SEARCH_PATH, None, None)
def on_child_exited(self):
- return None
- #self._vte.fork_command_full(Vte.PtyFlags.DEFAULT, None, [], None, glib.SpawnFlags.CHILD_INHERITS_STDIN | glib.SpawnFlags.SEARCH_PATH, None, None)
+ self._vte.fork_command_full(Vte.PtyFlags.DEFAULT, None, [Vte.get_user_shell()], None, GLib.SpawnFlags.SEARCH_PATH, None, None)
def do_grab_focus(self):
self._vte.grab_focus()
@@ -128,23 +126,24 @@ class GeditTerminal(Gtk.Box):
if not self.profile_settings.get_boolean("use-theme-colors"):
fg_color = self.profile_settings.get_string("foreground-color")
if fg_color != "":
- fg = Gdk.color_parse (fg_color)
+ parsed, fg = Gdk.RGBA().parse (fg_color)
bg_color = self.profile_settings.get_string("background-color")
if (bg_color != ""):
- bg = Gdk.color_parse (bg_color)
+ parsed, bg = Gdk.RGBA().parse (bg_color)
str_colors = self.profile_settings.get_string("palette")
if (str_colors != ""):
for str_color in str_colors.split(':'):
try:
- palette.append(Gdk.color_parse(str_color))
+ rgba = Gdk.RGBA()
+ rgba.parse(str_color)
+ palette.append(rgba)
except:
palette = []
break
if (len(palette) not in (0, 8, 16, 24)):
palette = []
- # FIXME: we need the version of this method in rgba
- #self._vte.set_colors(fg, bg, palette)
+ self._vte.set_colors_rgba(fg, bg, palette)
self._vte.set_cursor_blink_mode(self.profile_settings.get_enum("cursor-blink-mode"))
self._vte.set_cursor_shape(self.profile_settings.get_enum("cursor-shape"))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]