[gedit] tab: more precise return type for _gedit_tab_new()
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] tab: more precise return type for _gedit_tab_new()
- Date: Wed, 24 Jun 2015 12:11:39 +0000 (UTC)
commit 24934566a3a55fb4f96922cc002ef2b20fd61c6c
Author: Sébastien Wilmet <swilmet gnome org>
Date: Wed Jun 24 14:09:41 2015 +0200
tab: more precise return type for _gedit_tab_new()
To simplify a bit the code. A more precise type is also
self-documentation (even if here it's obvious).
gedit/gedit-multi-notebook.c | 2 +-
gedit/gedit-tab-private.h | 2 +-
gedit/gedit-tab.c | 2 +-
gedit/gedit-window.c | 6 +++---
4 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gedit/gedit-multi-notebook.c b/gedit/gedit-multi-notebook.c
index 4bc53e2..f5a4a63 100644
--- a/gedit/gedit-multi-notebook.c
+++ b/gedit/gedit-multi-notebook.c
@@ -977,7 +977,7 @@ gedit_multi_notebook_add_new_notebook (GeditMultiNotebook *mnb)
notebook = gedit_notebook_new ();
add_notebook (mnb, notebook, FALSE);
- tab = GEDIT_TAB (_gedit_tab_new ());
+ tab = _gedit_tab_new ();
gtk_widget_show (GTK_WIDGET (tab));
/* When gtk_notebook_insert_page is called the focus is set in
diff --git a/gedit/gedit-tab-private.h b/gedit/gedit-tab-private.h
index c2a4b01..9ea2636 100644
--- a/gedit/gedit-tab-private.h
+++ b/gedit/gedit-tab-private.h
@@ -26,7 +26,7 @@
G_BEGIN_DECLS
-GtkWidget *_gedit_tab_new (void);
+GeditTab *_gedit_tab_new (void);
gchar *_gedit_tab_get_name (GeditTab *tab);
diff --git a/gedit/gedit-tab.c b/gedit/gedit-tab.c
index fa27fad..eacd521 100644
--- a/gedit/gedit-tab.c
+++ b/gedit/gedit-tab.c
@@ -1436,7 +1436,7 @@ gedit_tab_init (GeditTab *tab)
tab);
}
-GtkWidget *
+GeditTab *
_gedit_tab_new (void)
{
return g_object_new (GEDIT_TYPE_TAB, NULL);
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index 84778e2..ab579fa 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -3084,7 +3084,7 @@ gedit_window_create_tab (GeditWindow *window,
gedit_debug (DEBUG_WINDOW);
notebook = _gedit_window_get_notebook (window);
- tab = GEDIT_TAB (_gedit_tab_new ());
+ tab = _gedit_tab_new ();
gtk_widget_show (GTK_WIDGET (tab));
return process_create_tab (window, notebook, tab, jump_to);
@@ -3124,7 +3124,7 @@ gedit_window_create_tab_from_location (GeditWindow *window,
gedit_debug (DEBUG_WINDOW);
- tab = GEDIT_TAB (_gedit_tab_new ());
+ tab = _gedit_tab_new ();
_gedit_tab_load (tab,
location,
@@ -3165,7 +3165,7 @@ gedit_window_create_tab_from_stream (GeditWindow *window,
g_return_val_if_fail (GEDIT_IS_WINDOW (window), NULL);
g_return_val_if_fail (G_IS_INPUT_STREAM (stream), NULL);
- tab = GEDIT_TAB (_gedit_tab_new ());
+ tab = _gedit_tab_new ();
_gedit_tab_load_stream (tab,
stream,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]