Author image Kevin Ryde
and 1 contributors


Glib::Ex::ConnectProperties::Element::model_rows -- emptiness of a TreeModel


 Glib::Ex::ConnectProperties->new([$model,   'model-rows#empty'],
                                  [$another, 'something']);


This element class implements ConnectProperties access to the following attributes of a Gtk2::TreeModel, meaning any Glib::Object which implements the Gtk2::TreeModel interface.

    model-rows#empty            boolean, read-only
    model-rows#not-empty        boolean, read-only

These are read-only but can be used for instance to make a control widget sensitive only when a model has some rows for the control to act on.

      ([$model,  'model-rows#not-empty'],
       [$button, 'sensitive']);

Emptiness is detected simply by get_iter_first(). The row-deleted and row-inserted signals are used to listen for the model becoming empty or not empty due to inserts or deletes.


Glib::Ex::ConnectProperties, Glib::Ex::ConnectProperties::Element::tree_selection, Glib::Ex::ConnectProperties::Element::textbuffer, Gtk2::TreeModel



Copyright 2010, 2011, 2012, 2013, 2014 Kevin Ryde

Glib-Ex-ConnectProperties is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

Glib-Ex-ConnectProperties is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Glib-Ex-ConnectProperties. If not, see