[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [oxygen-gtk/1.0] src
From: Hugo Pereira Da Costa <hugo () oxygen-icons ! org>
Date: 2011-01-21 20:16:56
Message-ID: 20110121201656.B1153A60B0 () git ! kde ! org
[Download RAW message or body]
Git commit a5835793e4dafe9a7258141aad9ee7128d6713fb by Hugo Pereira Da Costa
Pushed by hpereiradacosta into branch 1.0
added isLastVisibleColumn method.
CCBUG: 263144
M +21 -0 src/oxygengtkcellinfo.cpp
M +3 -0 src/oxygengtkcellinfo.h
http://commits.kde.org/d1a86b4e/a5835793e4dafe9a7258141aad9ee7128d6713fb
diff --git a/src/oxygengtkcellinfo.cpp b/src/oxygengtkcellinfo.cpp
index 4411c7d..2a6967b 100644
--- a/src/oxygengtkcellinfo.cpp
+++ b/src/oxygengtkcellinfo.cpp
@@ -51,6 +51,27 @@ namespace Oxygen
}
//____________________________________________________________________________
+ bool Gtk::CellInfo::isLastVisibleColumn( GtkTreeView* treeView ) const
+ {
+ bool isLast( false );
+ GList* columns( gtk_tree_view_get_columns( treeView ) );
+ for( GList *child = g_list_last( columns ); child; child = g_list_previous( child ) )
+ {
+ if( !GTK_IS_TREE_VIEW_COLUMN( child->data ) ) continue;
+ GtkTreeViewColumn* column( GTK_TREE_VIEW_COLUMN( child->data ) );
+ if( gtk_tree_view_column_get_visible( column ) )
+ {
+ isLast = (_column == column );
+ break;
+ }
+
+ }
+
+ if( columns ) g_list_free( columns );
+ return isLast;
+ }
+
+ //____________________________________________________________________________
bool Gtk::CellInfo::isLeftOfExpanderColumn( GtkTreeView* treeView ) const
{
// check expander column
diff --git a/src/oxygengtkcellinfo.h b/src/oxygengtkcellinfo.h
index 0d10a57..29deabe 100644
--- a/src/oxygengtkcellinfo.h
+++ b/src/oxygengtkcellinfo.h
@@ -102,6 +102,9 @@ namespace Oxygen
bool isFirstColumn( GtkTreeView* tree_view ) const
{ return _column && _column == gtk_tree_view_get_column( tree_view, 0 ); }
+ //! returns true if column is the last one
+ bool isLastVisibleColumn( GtkTreeView* ) const;
+
//! returns true if column is the one that contains expander
bool isExpanderColumn( GtkTreeView* treeView ) const
{ return _column == gtk_tree_view_get_expander_column( treeView ); }
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic