* 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/>.
*/
/**
* call to #GtkWidgetClass.get_preferred_height_for_width(). Returning
* a perfect height for width that is larger than the screen area is
* inconsequential since after the layouting receives an allocation
- * from a scrolled window it simply continues to drive the the scrollbar
+ * from a scrolled window it simply continues to drive the scrollbar
* values while more and more height is required for the row heights
* that are calculated in the background.
* </para>
GTK_TYPE_TREE_ITER,
G_TYPE_BOOLEAN,
G_TYPE_BOOLEAN);
+ g_signal_set_va_marshaller (cell_area_signals[SIGNAL_APPLY_ATTRIBUTES], G_TYPE_FROM_CLASS (class),
+ _gtk_marshal_VOID__OBJECT_BOXED_BOOLEAN_BOOLEANv);
/**
* GtkCellArea::add-editable:
{
GdkEventButton *button_event = (GdkEventButton *)event;
- if (button_event->button == 1)
+ if (button_event->button == GDK_BUTTON_PRIMARY)
{
GtkCellRenderer *renderer = NULL;
GtkCellRenderer *focus_renderer;
{
CellAttribute *attribute;
GSList *list;
- GValue value = { 0, };
+ GValue value = G_VALUE_INIT;
gboolean is_expander;
gboolean is_expanded;
*
* Retrieves a cell area's initial minimum and natural width.
*
- * @area will store some geometrical information in @context along the way,
- * when requesting sizes over an arbitrary number of rows, its not important
+ * @area will store some geometrical information in @context along the way;
+ * when requesting sizes over an arbitrary number of rows, it's not important
* to check the @minimum_width and @natural_width of this call but rather to
* consult gtk_cell_area_context_get_preferred_width() after a series of
* requests.
*
* Retrieves a cell area's initial minimum and natural height.
*
- * @area will store some geometrical information in @context along the way,
- * when requesting sizes over an arbitrary number of rows, its not important
+ * @area will store some geometrical information in @context along the way;
+ * when requesting sizes over an arbitrary number of rows, it's not important
* to check the @minimum_height and @natural_height of this call but rather to
* consult gtk_cell_area_context_get_preferred_height() after a series of
* requests.
}
/**
- * gtk_cell_area_apply_attributes
+ * gtk_cell_area_apply_attributes:
* @area: a #GtkCellArea
* @tree_model: the #GtkTreeModel to pull values from
* @iter: the #GtkTreeIter in @tree_model to apply values for
* @area: a #GtkCellArea
* @renderer: a #GtkCellRenderer to be placed inside @area
* @first_prop_name: the name of the first cell property to set
- * @Varargs: a %NULL-terminated list of property names and values, starting
- * with @first_prop_name
+ * @...: a %NULL-terminated list of property names and values, starting
+ * with @first_prop_name
*
* Adds @renderer to @area, setting cell properties at the same time.
* See gtk_cell_area_add() and gtk_cell_area_cell_set() for more details.
* @area: a #GtkCellArea
* @renderer: a #GtkCellRenderer which is a cell inside @area
* @first_prop_name: the name of the first cell property to set
- * @Varargs: a %NULL-terminated list of property names and values, starting
+ * @...: a %NULL-terminated list of property names and values, starting
* with @first_prop_name
*
* Sets one or more cell properties for @cell in @area.
* @area: a #GtkCellArea
* @renderer: a #GtkCellRenderer which is inside @area
* @first_prop_name: the name of the first cell property to get
- * @Varargs: return location for the first cell property, followed
+ * @...: return location for the first cell property, followed
* optionally by more name/return location pairs, followed by %NULL
*
* Gets the values of one or more cell properties for @renderer in @area.
GParamSpec *pspec,
const GValue *value)
{
- GValue tmp_value = { 0, };
+ GValue tmp_value = G_VALUE_INIT;
GtkCellAreaClass *class = g_type_class_peek (pspec->owner_type);
/* provide a copy to work from, convert (if necessary) and validate */
name = first_property_name;
while (name)
{
- GValue value = { 0, };
+ GValue value = G_VALUE_INIT;
gchar *error = NULL;
GParamSpec *pspec =
g_param_spec_pool_lookup (cell_property_pool, name,
name = first_property_name;
while (name)
{
- GValue value = { 0, };
+ GValue value = G_VALUE_INIT;
GParamSpec *pspec;
gchar *error;
G_STRLOC, pspec->name, G_OBJECT_TYPE_NAME (area));
else
{
- GValue *prop_value, tmp_value = { 0, };
+ GValue *prop_value, tmp_value = G_VALUE_INIT;
/* auto-conversion of the callers value type
*/
* @area: a #GtkCellArea
* @canceled: whether editing was canceled.
*
- * Explicitly stops the editing of the currently
- * edited cell (see gtk_cell_area_get_edited_cell()).
+ * Explicitly stops the editing of the currently edited cell.
+ *
+ * If @canceled is %TRUE, the currently edited cell renderer
+ * will emit the ::editing-canceled signal, otherwise the
+ * the ::editing-done signal will be emitted on the current
+ * edit widget.
*
- * If @canceled is %TRUE, the cell renderer will emit
- * the ::editing-canceled signal.
+ * See gtk_cell_area_get_edited_cell() and gtk_cell_area_get_edit_widget().
*
* Since: 3.0
*/
/* Stop editing of the cell renderer */
gtk_cell_renderer_stop_editing (priv->edited_cell, canceled);
+ /* When editing is explicitly halted either
+ * the "editing-canceled" signal is emitted on the cell
+ * renderer or the "editing-done" signal on the GtkCellEditable widget
+ */
+ if (!canceled)
+ gtk_cell_editable_editing_done (edit_widget);
+
/* Remove any references to the editable widget */
gtk_cell_area_set_edited_cell (area, NULL);
gtk_cell_area_set_edit_widget (area, NULL);