[tepl] TabGroup: fix GObject Introspection issue
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tepl] TabGroup: fix GObject Introspection issue
- Date: Mon, 24 Jul 2017 18:07:47 +0000 (UTC)
commit 2e28bc18ea7339a7e0728d7778dc586acbba1de5
Author: Sébastien Wilmet <sebastien wilmet uclouvain be>
Date: Sun Jul 23 16:14:01 2017 +0200
TabGroup: fix GObject Introspection issue
When compiling LaTeXila (the Vala code) I had the following warning:
Tepl-3.gir:2765.7-2765.27: warning: Virtual method
`Tepl.TabGroup.append_tab' conflicts with method of the same name
When generating the GIR in Tepl there are no warnings.
tepl/tepl-application-window.c | 6 +++---
tepl/tepl-notebook.c | 6 +++---
tepl/tepl-tab-group.c | 8 ++++----
tepl/tepl-tab-group.h | 9 ++++-----
4 files changed, 14 insertions(+), 15 deletions(-)
---
diff --git a/tepl/tepl-application-window.c b/tepl/tepl-application-window.c
index 175223c..20da54c 100644
--- a/tepl/tepl-application-window.c
+++ b/tepl/tepl-application-window.c
@@ -365,8 +365,8 @@ tepl_application_window_set_active_tab (TeplTabGroup *tab_group,
}
static void
-tepl_application_window_append_tab (TeplTabGroup *tab_group,
- TeplTab *tab)
+tepl_application_window_append_tab_vfunc (TeplTabGroup *tab_group,
+ TeplTab *tab)
{
TeplApplicationWindow *tepl_window = TEPL_APPLICATION_WINDOW (tab_group);
@@ -385,7 +385,7 @@ tepl_tab_group_interface_init (gpointer g_iface,
interface->get_tabs = tepl_application_window_get_tabs;
interface->get_active_tab = tepl_application_window_get_active_tab;
interface->set_active_tab = tepl_application_window_set_active_tab;
- interface->append_tab = tepl_application_window_append_tab;
+ interface->append_tab_vfunc = tepl_application_window_append_tab_vfunc;
}
static void
diff --git a/tepl/tepl-notebook.c b/tepl/tepl-notebook.c
index 66e5300..15fbf5a 100644
--- a/tepl/tepl-notebook.c
+++ b/tepl/tepl-notebook.c
@@ -272,8 +272,8 @@ tepl_notebook_set_active_tab (TeplTabGroup *tab_group,
}
static void
-tepl_notebook_append_tab (TeplTabGroup *tab_group,
- TeplTab *tab)
+tepl_notebook_append_tab_vfunc (TeplTabGroup *tab_group,
+ TeplTab *tab)
{
GtkNotebook *notebook = GTK_NOTEBOOK (tab_group);
@@ -290,7 +290,7 @@ tepl_tab_group_interface_init (gpointer g_iface,
interface->get_tabs = tepl_notebook_get_tabs;
interface->get_active_tab = tepl_notebook_get_active_tab;
interface->set_active_tab = tepl_notebook_set_active_tab;
- interface->append_tab = tepl_notebook_append_tab;
+ interface->append_tab_vfunc = tepl_notebook_append_tab_vfunc;
}
static void
diff --git a/tepl/tepl-tab-group.c b/tepl/tepl-tab-group.c
index 1d22bc4..16876f4 100644
--- a/tepl/tepl-tab-group.c
+++ b/tepl/tepl-tab-group.c
@@ -56,8 +56,8 @@ tepl_tab_group_set_active_tab_default (TeplTabGroup *tab_group,
}
static void
-tepl_tab_group_append_tab_default (TeplTabGroup *tab_group,
- TeplTab *tab)
+tepl_tab_group_append_tab_vfunc_default (TeplTabGroup *tab_group,
+ TeplTab *tab)
{
g_warning ("Appending a TeplTab to this TeplTabGroup is not supported. "
"Use for example TeplNotebook.");
@@ -69,7 +69,7 @@ tepl_tab_group_default_init (TeplTabGroupInterface *interface)
interface->get_tabs = tepl_tab_group_get_tabs_default;
interface->get_active_tab = tepl_tab_group_get_active_tab_default;
interface->set_active_tab = tepl_tab_group_set_active_tab_default;
- interface->append_tab = tepl_tab_group_append_tab_default;
+ interface->append_tab_vfunc = tepl_tab_group_append_tab_vfunc_default;
/**
* TeplTabGroup:active-tab:
@@ -309,7 +309,7 @@ tepl_tab_group_append_tab (TeplTabGroup *tab_group,
g_return_if_fail (TEPL_IS_TAB_GROUP (tab_group));
g_return_if_fail (TEPL_IS_TAB (tab));
- TEPL_TAB_GROUP_GET_INTERFACE (tab_group)->append_tab (tab_group, tab);
+ TEPL_TAB_GROUP_GET_INTERFACE (tab_group)->append_tab_vfunc (tab_group, tab);
if (jump_to)
{
diff --git a/tepl/tepl-tab-group.h b/tepl/tepl-tab-group.h
index e91f690..ea0afb2 100644
--- a/tepl/tepl-tab-group.h
+++ b/tepl/tepl-tab-group.h
@@ -48,10 +48,9 @@ typedef struct _TeplTabGroupInterface TeplTabGroupInterface;
* By default, %NULL is returned.
* @set_active_tab: Virtual function pointer for
* tepl_tab_group_set_active_tab(). Does nothing by default.
- * @append_tab: Virtual function pointer for tepl_tab_group_append_tab(). The
- * default implementation prints a warning about the operation not being
- * supported. The @jump_to parameter is already implemented with
- * tepl_tab_group_set_active_tab().
+ * @append_tab_vfunc: Virtual function pointer for tepl_tab_group_append_tab(),
+ * without the @jump_to parameter. The default implementation prints a warning
+ * about the operation not being supported.
*
* The virtual function table for #TeplTabGroup. When implementing one of the
* vfunc, you can assume that the pre-conditions are already checked (the
@@ -70,7 +69,7 @@ struct _TeplTabGroupInterface
void (*set_active_tab) (TeplTabGroup *tab_group,
TeplTab *tab);
- void (*append_tab) (TeplTabGroup *tab_group,
+ void (*append_tab_vfunc) (TeplTabGroup *tab_group,
TeplTab *tab);
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]