[vte/vte-next: 40/114] Add vte_get_default_emulation



commit 68670389206614d0fe48197348c46609ab6febcb
Author: Christian Persch <chpe gnome org>
Date:   Mon May 2 23:06:33 2011 +0200

    Add vte_get_default_emulation
    
    ... renamed from vte_terminal_get_default_emulation.

 doc/reference/vte-docs.xml     |    6 ++++++
 doc/reference/vte-sections.txt |    2 +-
 src/pty.c                      |    2 +-
 src/vte.c                      |   22 ++++++++++------------
 src/vte.h                      |    3 ++-
 5 files changed, 20 insertions(+), 15 deletions(-)
---
diff --git a/doc/reference/vte-docs.xml b/doc/reference/vte-docs.xml
index 066bbcb..4fa056b 100644
--- a/doc/reference/vte-docs.xml
+++ b/doc/reference/vte-docs.xml
@@ -92,6 +92,12 @@
     <title>Index of new symbols in 0.28</title>
     <xi:include href="xml/api-index-0.28.xml"><xi:fallback /></xi:include>
   </index>
+  <index id="api-index-0-30" role="0.30">
+    <title>Index of new symbols in 0.30</title>
+    <xi:include href="xml/api-index-0.30.xml">
+      <xi:fallback />
+    </xi:include>
+  </index>
  
   <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
 
diff --git a/doc/reference/vte-sections.txt b/doc/reference/vte-sections.txt
index a60d4fd..d6c5123 100644
--- a/doc/reference/vte-sections.txt
+++ b/doc/reference/vte-sections.txt
@@ -79,7 +79,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
@@ -92,6 +91,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 1f77a35..33e6087 100644
--- a/src/pty.c
+++ b/src/pty.c
@@ -1445,7 +1445,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 01ab8d9..946677d 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -4959,7 +4959,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);
@@ -7539,7 +7539,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,
@@ -7595,21 +7595,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);
 }
@@ -7660,7 +7658,7 @@ vte_terminal_set_termcap(VteTerminal *terminal, const char *path,
 		wpath = g_build_filename(TERMCAPDIR,
 					 terminal->pvt->emulation ?
 					 terminal->pvt->emulation :
-					 vte_terminal_get_default_emulation(terminal),
+					 vte_get_default_emulation(),
 					 NULL);
 		if (g_stat(wpath, &st) != 0) {
 			g_free(wpath);
@@ -10707,7 +10705,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 ed7db62..601bedb 100644
--- a/src/vte.h
+++ b/src/vte.h
@@ -393,7 +393,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]