gnome-commander r2267 - in trunk: . src
- From: epiotr svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-commander r2267 - in trunk: . src
- Date: Tue, 4 Nov 2008 20:53:26 +0000 (UTC)
Author: epiotr
Date: Tue Nov 4 20:53:25 2008
New Revision: 2267
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=2267&view=rev
Log:
treeview: added gnome_cmd_treeview_create_new_toggle_column()
Modified:
trunk/ChangeLog
trunk/src/gnome-cmd-treeview.cc
trunk/src/gnome-cmd-treeview.h
Modified: trunk/src/gnome-cmd-treeview.cc
==============================================================================
--- trunk/src/gnome-cmd-treeview.cc (original)
+++ trunk/src/gnome-cmd-treeview.cc Tue Nov 4 20:53:25 2008
@@ -65,3 +65,23 @@
return col;
}
+
+
+GtkTreeViewColumn *gnome_cmd_treeview_create_new_toggle_column (GtkTreeView *view, GtkCellRenderer *&renderer, gint COL_ID, const gchar *title)
+{
+ renderer = gtk_cell_renderer_toggle_new ();
+
+ GtkTreeViewColumn *col = gtk_tree_view_column_new_with_attributes (title,
+ renderer,
+ "active", COL_ID,
+ NULL);
+
+ g_object_set (col,
+ "clickable", TRUE,
+ NULL);
+
+ // pack tree view column into tree view
+ gtk_tree_view_append_column (GTK_TREE_VIEW (view), col);
+
+ return col;
+}
Modified: trunk/src/gnome-cmd-treeview.h
==============================================================================
--- trunk/src/gnome-cmd-treeview.h (original)
+++ trunk/src/gnome-cmd-treeview.h Tue Nov 4 20:53:25 2008
@@ -23,6 +23,7 @@
GtkTreeViewColumn *gnome_cmd_treeview_create_new_text_column (GtkTreeView *view, GtkCellRenderer *&renderer, gint COL_ID, const gchar *title=NULL);
GtkTreeViewColumn *gnome_cmd_treeview_create_new_pixbuf_column (GtkTreeView *view, GtkCellRenderer *&renderer, gint COL_ID, const gchar *title=NULL);
+GtkTreeViewColumn *gnome_cmd_treeview_create_new_toggle_column (GtkTreeView *view, GtkCellRenderer *&renderer, gint COL_ID, const gchar *title=NULL);
inline GtkTreeViewColumn *gnome_cmd_treeview_create_new_text_column (GtkTreeView *view, gint COL_ID, const gchar *title=NULL)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]