]> Pileus Git - ~andy/gtk/blobdiff - tests/testtreeview.c
stylecontext: Do invalidation on first resize container
[~andy/gtk] / tests / testtreeview.c
index d9d80ceb8ba16193e01ffa1ede3ed177af5f488b..9816540de424cf93134023149ab4b023f25b4c07 100644 (file)
@@ -13,9 +13,7 @@
  * Library General Public License for more details.
  *
  * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
 #include <string.h>
@@ -681,6 +679,14 @@ columns_selected (GtkComboBox *combo_box, gpointer data)
     }
 }
 
+void
+on_row_activated (GtkTreeView       *tree_view,
+                  GtkTreePath       *path,
+                  GtkTreeViewColumn *column,
+                  gpointer           user_data)
+{
+  g_print ("Row activated\n");
+}
 
 enum
 {
@@ -741,7 +747,8 @@ main (int    argc,
   gtk_container_add (GTK_CONTAINER (window), box);
 
   tv = gtk_tree_view_new_with_model (models[0]);
-  
+  g_signal_connect (tv, "row-activated", G_CALLBACK (on_row_activated), NULL);
+
   gtk_tree_view_enable_model_drag_source (GTK_TREE_VIEW (tv),
                                          GDK_BUTTON1_MASK,
                                          row_targets,