[tepl] Buffer: rename title -> full-title
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tepl] Buffer: rename title -> full-title
- Date: Sat, 5 Aug 2017 15:30:43 +0000 (UTC)
commit eb88e1301e9cd5cf2cc6bc4e5e44051290f0a8ff
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sat Aug 5 16:25:45 2017 +0200
Buffer: rename title -> full-title
There will be also short-title.
docs/reference/api-breaks.xml | 8 ++++++++
docs/reference/tepl-3.0-sections.txt | 2 +-
tepl/tepl-buffer.c | 32 ++++++++++++++++----------------
tepl/tepl-buffer.h | 4 ++--
4 files changed, 27 insertions(+), 19 deletions(-)
---
diff --git a/docs/reference/api-breaks.xml b/docs/reference/api-breaks.xml
index 44b29f3..3b5a964 100644
--- a/docs/reference/api-breaks.xml
+++ b/docs/reference/api-breaks.xml
@@ -53,6 +53,14 @@
instead.
</para>
</listitem>
+ <listitem>
+ <para>
+ The <code>TeplBuffer:tepl-title</code> property has been renamed to
+ <link linkend="TeplBuffer--tepl-full-title">TeplBuffer:tepl-full-title</link>,
+ and <code>tepl_buffer_get_title()</code> has been renamed to
+ <link linkend="tepl-buffer-get-full-title">tepl_buffer_get_full_title()</link>.
+ </para>
+ </listitem>
</itemizedlist>
</chapter>
diff --git a/docs/reference/tepl-3.0-sections.txt b/docs/reference/tepl-3.0-sections.txt
index 93a9375..c112e14 100644
--- a/docs/reference/tepl-3.0-sections.txt
+++ b/docs/reference/tepl-3.0-sections.txt
@@ -239,7 +239,7 @@ TeplSelectionType
tepl_buffer_new
tepl_buffer_get_file
tepl_buffer_is_untouched
-tepl_buffer_get_title
+tepl_buffer_get_full_title
tepl_buffer_get_style_scheme_id
tepl_buffer_set_style_scheme_id
tepl_buffer_get_selection_type
diff --git a/tepl/tepl-buffer.c b/tepl/tepl-buffer.c
index a577fff..560f980 100644
--- a/tepl/tepl-buffer.c
+++ b/tepl/tepl-buffer.c
@@ -1,7 +1,7 @@
/*
* This file is part of Tepl, a text editor library.
*
- * Copyright 2016 - Sébastien Wilmet <swilmet gnome org>
+ * Copyright 2016, 2017 - Sébastien Wilmet <swilmet gnome org>
*
* Tepl is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
@@ -52,7 +52,7 @@ struct _TeplBufferPrivate
enum
{
PROP_0,
- PROP_TEPL_TITLE,
+ PROP_TEPL_FULL_TITLE,
PROP_TEPL_STYLE_SCHEME_ID,
N_PROPERTIES
};
@@ -102,8 +102,8 @@ tepl_buffer_get_property (GObject *object,
switch (prop_id)
{
- case PROP_TEPL_TITLE:
- g_value_take_string (value, tepl_buffer_get_title (buffer));
+ case PROP_TEPL_FULL_TITLE:
+ g_value_take_string (value, tepl_buffer_get_full_title (buffer));
break;
case PROP_TEPL_STYLE_SCHEME_ID:
@@ -259,7 +259,7 @@ tepl_buffer_modified_changed (GtkTextBuffer *buffer)
GTK_TEXT_BUFFER_CLASS (tepl_buffer_parent_class)->modified_changed (buffer);
}
- g_object_notify_by_pspec (G_OBJECT (buffer), properties[PROP_TEPL_TITLE]);
+ g_object_notify_by_pspec (G_OBJECT (buffer), properties[PROP_TEPL_FULL_TITLE]);
}
static void
@@ -279,15 +279,15 @@ tepl_buffer_class_init (TeplBufferClass *klass)
text_buffer_class->modified_changed = tepl_buffer_modified_changed;
/**
- * TeplBuffer:tepl-title:
+ * TeplBuffer:tepl-full-title:
*
- * The buffer title. See tepl_buffer_get_title().
+ * The full title. See tepl_buffer_get_full_title().
*
- * Since: 2.0
+ * Since: 3.0
*/
- properties[PROP_TEPL_TITLE] =
- g_param_spec_string ("tepl-title",
- "Tepl Title",
+ properties[PROP_TEPL_FULL_TITLE] =
+ g_param_spec_string ("tepl-full-title",
+ "tepl-full-title",
"",
NULL,
G_PARAM_READABLE |
@@ -340,7 +340,7 @@ short_name_notify_cb (TeplFile *file,
GParamSpec *pspec,
TeplBuffer *buffer)
{
- g_object_notify_by_pspec (G_OBJECT (buffer), properties[PROP_TEPL_TITLE]);
+ g_object_notify_by_pspec (G_OBJECT (buffer), properties[PROP_TEPL_FULL_TITLE]);
}
static void
@@ -440,7 +440,7 @@ tepl_buffer_is_untouched (TeplBuffer *buffer)
}
/**
- * tepl_buffer_get_title:
+ * tepl_buffer_get_full_title:
* @buffer: a #TeplBuffer.
*
* Returns a title suitable for a #GtkWindow title. It contains (in that order):
@@ -449,12 +449,12 @@ tepl_buffer_is_untouched (TeplBuffer *buffer)
* - the directory path in parenthesis if the #TeplFile:location isn't
* %NULL.
*
- * Returns: the @buffer title. Free the return value with g_free() when no
+ * Returns: the @buffer full title. Free the return value with g_free() when no
* longer needed.
- * Since: 1.0
+ * Since: 3.0
*/
gchar *
-tepl_buffer_get_title (TeplBuffer *buffer)
+tepl_buffer_get_full_title (TeplBuffer *buffer)
{
TeplBufferPrivate *priv;
GFile *location;
diff --git a/tepl/tepl-buffer.h b/tepl/tepl-buffer.h
index 714f1f3..f5d11af 100644
--- a/tepl/tepl-buffer.h
+++ b/tepl/tepl-buffer.h
@@ -1,7 +1,7 @@
/*
* This file is part of Tepl, a text editor library.
*
- * Copyright 2016 - Sébastien Wilmet <swilmet gnome org>
+ * Copyright 2016, 2017 - Sébastien Wilmet <swilmet gnome org>
*
* Tepl is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
@@ -66,7 +66,7 @@ TeplFile * tepl_buffer_get_file (TeplBuffer *buffer);
gboolean tepl_buffer_is_untouched (TeplBuffer *buffer);
-gchar * tepl_buffer_get_title (TeplBuffer *buffer);
+gchar * tepl_buffer_get_full_title (TeplBuffer *buffer);
gchar * tepl_buffer_get_style_scheme_id (TeplBuffer *buffer);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]