Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Compatibility options #518

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/tilda.ui
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,9 @@
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">Terminal's erase setting</col>
</row>
<row>
<col id="0" translatable="yes">ASCII DEL</col>
</row>
Expand All @@ -279,6 +282,9 @@
<row>
<col id="0" translatable="yes">Control-H</col>
</row>
<row>
<col id="0" translatable="yes">Auto</col>
</row>
</data>
</object>
<object class="GtkListStore" id="model9">
Expand All @@ -287,6 +293,9 @@
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">Terminal's erase setting</col>
</row>
<row>
<col id="0" translatable="yes">ASCII DEL</col>
</row>
Expand All @@ -296,6 +305,9 @@
<row>
<col id="0" translatable="yes">Control-H</col>
</row>
<row>
<col id="0" translatable="yes">Auto</col>
</row>
</data>
</object>
<object class="GtkListStore" id="monitor_list_store">
Expand Down
6 changes: 6 additions & 0 deletions src/tilda_terminal.c
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,9 @@ static gint tilda_term_config_defaults (tilda_term *tt)
/** Keys **/
switch (config_getint ("backspace_key"))
{
case TTY:
vte_terminal_set_backspace_binding (VTE_TERMINAL(tt->vte_term), VTE_ERASE_TTY);
break;
case ASCII_DELETE:
vte_terminal_set_backspace_binding (VTE_TERMINAL(tt->vte_term), VTE_ERASE_ASCII_DELETE);
break;
Expand All @@ -770,6 +773,9 @@ static gint tilda_term_config_defaults (tilda_term *tt)

switch (config_getint ("delete_key"))
{
case TTY:
vte_terminal_set_delete_binding (VTE_TERMINAL(tt->vte_term), VTE_ERASE_TTY);
break;
case ASCII_DELETE:
vte_terminal_set_delete_binding (VTE_TERMINAL(tt->vte_term), VTE_ERASE_ASCII_DELETE);
break;
Expand Down
3 changes: 1 addition & 2 deletions src/tilda_terminal.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct tilda_term_
};

enum tilda_term_scrollbar_positions { RIGHT, LEFT, DISABLED };
enum delete_keys { ASCII_DELETE, DELETE_SEQUENCE, ASCII_BACKSPACE, AUTO };
enum delete_keys { TTY, ASCII_DELETE, DELETE_SEQUENCE, ASCII_BACKSPACE, AUTO };

/**
* tilda_term_init ()
Expand Down Expand Up @@ -101,4 +101,3 @@ G_END_DECLS
/* vim: set ts=4 sts=4 sw=4 expandtab: */

#endif /* TILDA_TERMINALN_H */

8 changes: 5 additions & 3 deletions src/wizard.c
Original file line number Diff line number Diff line change
Expand Up @@ -1448,7 +1448,7 @@ static void colorbutton_back_color_set_cb (GtkWidget *w, tilda_window *tw)
tt = g_list_nth_data (tw->terms, i);
vte_terminal_set_color_background (VTE_TERMINAL(tt->vte_term),
&gdk_back_color);
vte_terminal_set_color_cursor_foreground (VTE_TERMINAL(tt->vte_term),
vte_terminal_set_color_cursor_foreground (VTE_TERMINAL(tt->vte_term),
&gdk_back_color);
}
}
Expand Down Expand Up @@ -1677,7 +1677,8 @@ static void check_scroll_on_keystroke_toggled_cb (GtkWidget *w, tilda_window *tw
static void combo_backspace_binding_changed_cb (GtkWidget *w, tilda_window *tw)
{
const gint status = gtk_combo_box_get_active (GTK_COMBO_BOX(w));
const gint keys[] = { VTE_ERASE_ASCII_DELETE,
const gint keys[] = { VTE_ERASE_TTY,
VTE_ERASE_ASCII_DELETE,
VTE_ERASE_DELETE_SEQUENCE,
VTE_ERASE_ASCII_BACKSPACE,
VTE_ERASE_AUTO };
Expand All @@ -1695,7 +1696,8 @@ static void combo_backspace_binding_changed_cb (GtkWidget *w, tilda_window *tw)
static void combo_delete_binding_changed_cb (GtkWidget *w, tilda_window *tw)
{
const gint status = gtk_combo_box_get_active (GTK_COMBO_BOX(w));
const gint keys[] = { VTE_ERASE_ASCII_DELETE,
const gint keys[] = { VTE_ERASE_TTY,
VTE_ERASE_ASCII_DELETE,
VTE_ERASE_DELETE_SEQUENCE,
VTE_ERASE_ASCII_BACKSPACE,
VTE_ERASE_AUTO };
Expand Down