[vte] widget: Add vte_get_default_emulation
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] widget: Add vte_get_default_emulation
- Date: Mon, 24 Mar 2014 21:11:01 +0000 (UTC)
commit 34101e0d477d1aa1d091e28368e6fee7ba42f93d
Author: Christian Persch <chpe gnome org>
Date: Mon May 2 23:06:33 2011 +0200
widget: Add vte_get_default_emulation
... renamed from vte_terminal_get_default_emulation.
Conflicts:
doc/reference/vte-docs.xml
src/vte.c
doc/reference/vte-sections.txt | 2 +-
src/pty.c | 2 +-
src/vte.c | 22 ++++++++++------------
src/vte.h | 3 ++-
4 files changed, 14 insertions(+), 15 deletions(-)
---
diff --git a/doc/reference/vte-sections.txt b/doc/reference/vte-sections.txt
index 7d77322..864d89e 100644
--- a/doc/reference/vte-sections.txt
+++ b/doc/reference/vte-sections.txt
@@ -75,7 +75,6 @@ vte_terminal_match_set_cursor_type
vte_terminal_match_set_cursor_name
vte_terminal_set_emulation
vte_terminal_get_emulation
-vte_terminal_get_default_emulation
vte_terminal_set_encoding
vte_terminal_get_encoding
vte_terminal_get_status_line
@@ -88,6 +87,7 @@ vte_terminal_search_set_gregex
vte_terminal_search_set_wrap_around
<SUBSECTION>
+vte_get_default_emulation
vte_get_user_shell
<SUBSECTION>
diff --git a/src/pty.c b/src/pty.c
index 168dcfe..9294210 100644
--- a/src/pty.c
+++ b/src/pty.c
@@ -1529,7 +1529,7 @@ vte_pty_init (VtePty *pty)
priv->foreign = FALSE;
priv->using_helper = FALSE;
priv->helper_tag = NULL;
- priv->term = vte_terminal_get_default_emulation(NULL /* that's ok, this function is just retarded
*/); /* already interned */
+ priv->term = vte_get_default_emulation(); /* already interned */
}
static void
diff --git a/src/vte.c b/src/vte.c
index edf55db..d6d9cf8 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -5065,7 +5065,7 @@ vte_terminal_key_press(GtkWidget *widget, GdkEventKey *event)
terminal->pvt->keypad_mode == VTE_KEYMODE_APPLICATION,
terminal->pvt->termcap,
terminal->pvt->emulation ?
- terminal->pvt->emulation :
vte_terminal_get_default_emulation(terminal),
+ terminal->pvt->emulation : vte_get_default_emulation(),
&normal,
&normal_length,
&special);
@@ -7852,7 +7852,7 @@ vte_terminal_set_emulation(VteTerminal *terminal, const char *emulation)
/* Set the emulation type, for reference. */
if (emulation == NULL) {
- emulation = vte_terminal_get_default_emulation(terminal);
+ emulation = vte_get_default_emulation();
}
terminal->pvt->emulation = g_intern_string(emulation);
_vte_debug_print(VTE_DEBUG_MISC,
@@ -7908,21 +7908,19 @@ vte_terminal_set_emulation(VteTerminal *terminal, const char *emulation)
g_object_thaw_notify(object);
}
-/* FIXMEchpe deprecate this function, it's wrong */
/**
- * vte_terminal_get_default_emulation:
- * @terminal: a #VteTerminal
+ * vte_get_default_emulation:
*
- * Queries the terminal for its default emulation, which is attempted if the
+ * Returns the default emulation, which is used in #VteTerminal if the
* terminal type passed to vte_terminal_set_emulation() is %NULL.
*
- * Returns: (transfer none) (type utf8): an interned string containing the name of the default terminal
- * type the widget attempts to emulate
+ * Returns: (transfer none) (type utf8): an interned string containing the name
+ * of the default terminal type the widget attempts to emulate
*
- * Since: 0.11.11
+ * Since: 0.30
*/
const char *
-vte_terminal_get_default_emulation(VteTerminal *terminal)
+vte_get_default_emulation(void)
{
return g_intern_static_string(VTE_DEFAULT_EMULATION);
}
@@ -7970,7 +7968,7 @@ vte_terminal_set_termcap(VteTerminal *terminal)
g_object_freeze_notify(object);
emulation = terminal->pvt->emulation ? terminal->pvt->emulation
- : vte_terminal_get_default_emulation(terminal);
+ : vte_get_default_emulation();
_vte_debug_print(VTE_DEBUG_MISC, "Loading termcap `%s'...",
emulation);
@@ -10656,7 +10654,7 @@ vte_terminal_scroll(GtkWidget *widget, GdkEventScroll *event)
terminal->pvt->keypad_mode == VTE_KEYMODE_APPLICATION,
terminal->pvt->termcap,
terminal->pvt->emulation ?
- terminal->pvt->emulation : vte_terminal_get_default_emulation(terminal),
+ terminal->pvt->emulation : vte_get_default_emulation(),
&normal,
&normal_length,
&special);
diff --git a/src/vte.h b/src/vte.h
index e9b0ee1..612929f 100644
--- a/src/vte.h
+++ b/src/vte.h
@@ -382,7 +382,8 @@ gboolean vte_terminal_search_find_next (VteTerminal *terminal);
/* Set the emulation type. Most of the time you won't need this. */
void vte_terminal_set_emulation(VteTerminal *terminal, const char *emulation);
const char *vte_terminal_get_emulation(VteTerminal *terminal);
-const char *vte_terminal_get_default_emulation(VteTerminal *terminal);
+
+const char *vte_get_default_emulation(void);
/* Set the character encoding. Most of the time you won't need this. */
void vte_terminal_set_encoding(VteTerminal *terminal, const char *codeset);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]