gnome-terminal r3172 - trunk/src
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-terminal r3172 - trunk/src
- Date: Tue, 14 Oct 2008 23:03:21 +0000 (UTC)
Author: chpe
Date: Tue Oct 14 23:03:20 2008
New Revision: 3172
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=3172&view=rev
Log:
Bug 549835 â Feature Request: Configurable cursor appearance
Modified:
trunk/src/gnome-terminal.schemas.in
trunk/src/profile-editor.c
trunk/src/profile-preferences.glade
trunk/src/terminal-profile.c
trunk/src/terminal-profile.h
trunk/src/terminal-screen.c
Modified: trunk/src/gnome-terminal.schemas.in
==============================================================================
--- trunk/src/gnome-terminal.schemas.in (original)
+++ trunk/src/gnome-terminal.schemas.in Tue Oct 14 23:03:20 2008
@@ -401,6 +401,21 @@
</schema>
<schema>
+ <key>/schemas/apps/gnome-terminal/profiles/Default/cursor_shape</key>
+ <applyto>/apps/gnome-terminal/profiles/Default/cursor_shape</applyto>
+ <owner>gnome-terminal</owner>
+ <type>string</type>
+ <default>block</default>
+ <locale name="C">
+ <short>The cursor appearance</short>
+ <long>
+ The possible values are "block" to use a block cursor, "ibeam" to
+ use a vertical line cursor, or "underline" to use an underline cursor.
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
<key>/schemas/apps/gnome-terminal/profiles/Default/custom_command</key>
<applyto>/apps/gnome-terminal/profiles/Default/custom_command</applyto>
<owner>gnome-terminal</owner>
Modified: trunk/src/profile-editor.c
==============================================================================
--- trunk/src/profile-editor.c (original)
+++ trunk/src/profile-editor.c Tue Oct 14 23:03:20 2008
@@ -799,6 +799,7 @@
CONNECT ("background-colorpicker", TERMINAL_PROFILE_BACKGROUND_COLOR);
CONNECT ("background-image-filechooser", TERMINAL_PROFILE_BACKGROUND_IMAGE_FILE);
CONNECT ("backspace-binding-combobox", TERMINAL_PROFILE_BACKSPACE_BINDING);
+ CONNECT ("cursor-shape-combobox", TERMINAL_PROFILE_CURSOR_SHAPE);
CONNECT ("custom-command-entry", TERMINAL_PROFILE_CUSTOM_COMMAND);
CONNECT ("darken-background-scale", TERMINAL_PROFILE_BACKGROUND_DARKNESS);
CONNECT ("delete-binding-combobox", TERMINAL_PROFILE_DELETE_BINDING);
Modified: trunk/src/profile-preferences.glade
==============================================================================
--- trunk/src/profile-preferences.glade (original)
+++ trunk/src/profile-preferences.glade Tue Oct 14 23:03:20 2008
@@ -291,6 +291,61 @@
</child>
<child>
+ <widget class="GtkHBox" id="hbox140">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">12</property>
+
+ <child>
+ <widget class="GtkLabel" id="label480">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Cursor _shape:</property>
+ <property name="use_underline">True</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="mnemonic_widget">cursor-shape-combobox</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkComboBox" id="cursor-shape-combobox">
+ <property name="visible">True</property>
+ <property name="items" translatable="yes">Block
+I-Beam
+Underline</property>
+ <property name="add_tearoffs">False</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
<widget class="GtkHBox" id="hbox136">
<property name="visible">True</property>
<property name="homogeneous">False</property>
Modified: trunk/src/terminal-profile.c
==============================================================================
--- trunk/src/terminal-profile.c (original)
+++ trunk/src/terminal-profile.c Tue Oct 14 23:03:20 2008
@@ -60,6 +60,7 @@
PROP_BACKGROUND_TYPE,
PROP_BACKSPACE_BINDING,
PROP_CURSOR_BLINK_MODE,
+ PROP_CURSOR_SHAPE,
PROP_CUSTOM_COMMAND,
PROP_DEFAULT_SHOW_MENUBAR,
PROP_DELETE_BINDING,
@@ -95,6 +96,7 @@
#define KEY_BACKGROUND_TYPE "background_type"
#define KEY_BACKSPACE_BINDING "backspace_binding"
#define KEY_CURSOR_BLINK_MODE "cursor_blink_mode"
+#define KEY_CURSOR_SHAPE "cursor_shape"
#define KEY_CUSTOM_COMMAND "custom_command"
#define KEY_DEFAULT_SHOW_MENUBAR "default_show_menubar"
#define KEY_DELETE_BINDING "delete_binding"
@@ -129,6 +131,7 @@
#define DEFAULT_BACKGROUND_TYPE (TERMINAL_BACKGROUND_SOLID)
#define DEFAULT_BACKSPACE_BINDING (VTE_ERASE_ASCII_DELETE)
#define DEFAULT_CURSOR_BLINK_MODE (VTE_CURSOR_BLINK_SYSTEM)
+#define DEFAULT_CURSOR_SHAPE (VTE_CURSOR_SHAPE_BLOCK)
#define DEFAULT_CUSTOM_COMMAND ("")
#define DEFAULT_DEFAULT_SHOW_MENUBAR (TRUE)
#define DEFAULT_DELETE_BINDING (VTE_ERASE_DELETE_SEQUENCE)
@@ -1281,6 +1284,7 @@
TERMINAL_PROFILE_PROPERTY_ENUM (BACKGROUND_TYPE, TERMINAL_TYPE_BACKGROUND_TYPE, DEFAULT_BACKGROUND_TYPE, KEY_BACKGROUND_TYPE);
TERMINAL_PROFILE_PROPERTY_ENUM (BACKSPACE_BINDING, vte_terminal_erase_binding_get_type (), DEFAULT_BACKSPACE_BINDING, KEY_BACKSPACE_BINDING);
TERMINAL_PROFILE_PROPERTY_ENUM (CURSOR_BLINK_MODE, VTE_TYPE_TERMINAL_CURSOR_BLINK_MODE, DEFAULT_CURSOR_BLINK_MODE, KEY_CURSOR_BLINK_MODE);
+ TERMINAL_PROFILE_PROPERTY_ENUM (CURSOR_SHAPE, VTE_TYPE_TERMINAL_CURSOR_SHAPE, DEFAULT_CURSOR_SHAPE, KEY_CURSOR_SHAPE);
TERMINAL_PROFILE_PROPERTY_ENUM (DELETE_BINDING, vte_terminal_erase_binding_get_type (), DEFAULT_DELETE_BINDING, KEY_DELETE_BINDING);
TERMINAL_PROFILE_PROPERTY_ENUM (EXIT_ACTION, TERMINAL_TYPE_EXIT_ACTION, DEFAULT_EXIT_ACTION, KEY_EXIT_ACTION);
TERMINAL_PROFILE_PROPERTY_ENUM (SCROLLBAR_POSITION, TERMINAL_TYPE_SCROLLBAR_POSITION, DEFAULT_SCROLLBAR_POSITION, KEY_SCROLLBAR_POSITION);
Modified: trunk/src/terminal-profile.h
==============================================================================
--- trunk/src/terminal-profile.h (original)
+++ trunk/src/terminal-profile.h Tue Oct 14 23:03:20 2008
@@ -73,6 +73,7 @@
#define TERMINAL_PROFILE_BACKGROUND_TYPE "background-type"
#define TERMINAL_PROFILE_BACKSPACE_BINDING "backspace-binding"
#define TERMINAL_PROFILE_CURSOR_BLINK_MODE "cursor-blink-mode"
+#define TERMINAL_PROFILE_CURSOR_SHAPE "cursor-shape"
#define TERMINAL_PROFILE_CUSTOM_COMMAND "custom-command"
#define TERMINAL_PROFILE_DEFAULT_SHOW_MENUBAR "default-show-menubar"
#define TERMINAL_PROFILE_DELETE_BINDING "delete-binding"
Modified: trunk/src/terminal-screen.c
==============================================================================
--- trunk/src/terminal-screen.c (original)
+++ trunk/src/terminal-screen.c Tue Oct 14 23:03:20 2008
@@ -834,6 +834,10 @@
vte_terminal_set_cursor_blink_mode (vte_terminal,
terminal_profile_get_property_enum (priv->profile, TERMINAL_PROFILE_CURSOR_BLINK_MODE));
+ if (!prop_name || prop_name == I_(TERMINAL_PROFILE_CURSOR_SHAPE))
+ vte_terminal_set_cursor_shape (vte_terminal,
+ terminal_profile_get_property_enum (priv->profile, TERMINAL_PROFILE_CURSOR_SHAPE));
+
g_object_thaw_notify (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]