[tepl] Minor code refactoring to have smaller lines



commit 17c041cb794117ac1f04aa4ac73b5777b35ee98b
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Jul 22 21:15:37 2017 +0200

    Minor code refactoring to have smaller lines

 tepl/tepl-application-window.c |    7 ++++---
 tepl/tepl-tab.c                |    7 ++++---
 2 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/tepl/tepl-application-window.c b/tepl/tepl-application-window.c
index 76c7927..5646bae 100644
--- a/tepl/tepl-application-window.c
+++ b/tepl/tepl-application-window.c
@@ -90,6 +90,7 @@ tepl_application_window_get_property (GObject    *object,
                                      GParamSpec *pspec)
 {
        TeplApplicationWindow *tepl_window = TEPL_APPLICATION_WINDOW (object);
+       TeplTabGroup *tab_group = TEPL_TAB_GROUP (object);
 
        switch (prop_id)
        {
@@ -98,15 +99,15 @@ tepl_application_window_get_property (GObject    *object,
                        break;
 
                case PROP_ACTIVE_TAB:
-                       g_value_set_object (value, tepl_tab_group_get_active_tab (TEPL_TAB_GROUP 
(tepl_window)));
+                       g_value_set_object (value, tepl_tab_group_get_active_tab (tab_group));
                        break;
 
                case PROP_ACTIVE_VIEW:
-                       g_value_set_object (value, tepl_tab_group_get_active_view (TEPL_TAB_GROUP 
(tepl_window)));
+                       g_value_set_object (value, tepl_tab_group_get_active_view (tab_group));
                        break;
 
                case PROP_ACTIVE_BUFFER:
-                       g_value_set_object (value, tepl_tab_group_get_active_buffer (TEPL_TAB_GROUP 
(tepl_window)));
+                       g_value_set_object (value, tepl_tab_group_get_active_buffer (tab_group));
                        break;
 
                default:
diff --git a/tepl/tepl-tab.c b/tepl/tepl-tab.c
index 7b005cb..7ba757d 100644
--- a/tepl/tepl-tab.c
+++ b/tepl/tepl-tab.c
@@ -188,6 +188,7 @@ tepl_tab_get_property (GObject    *object,
                        GParamSpec *pspec)
 {
        TeplTab *tab = TEPL_TAB (object);
+       TeplTabGroup *tab_group = TEPL_TAB_GROUP (object);
 
        switch (prop_id)
        {
@@ -196,15 +197,15 @@ tepl_tab_get_property (GObject    *object,
                        break;
 
                case PROP_ACTIVE_TAB:
-                       g_value_set_object (value, tepl_tab_group_get_active_tab (TEPL_TAB_GROUP (tab)));
+                       g_value_set_object (value, tepl_tab_group_get_active_tab (tab_group));
                        break;
 
                case PROP_ACTIVE_VIEW:
-                       g_value_set_object (value, tepl_tab_group_get_active_view (TEPL_TAB_GROUP (tab)));
+                       g_value_set_object (value, tepl_tab_group_get_active_view (tab_group));
                        break;
 
                case PROP_ACTIVE_BUFFER:
-                       g_value_set_object (value, tepl_tab_group_get_active_buffer (TEPL_TAB_GROUP (tab)));
+                       g_value_set_object (value, tepl_tab_group_get_active_buffer (tab_group));
                        break;
 
                default:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]