2000-10-05 01:04:57 +00:00
|
|
|
|
/* gtkcellrenderertext.c
|
|
|
|
|
* Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford <jrb@redhat.com>
|
|
|
|
|
*
|
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This library 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
|
|
|
|
|
* Library General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
2012-02-27 13:01:10 +00:00
|
|
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
2000-10-05 01:04:57 +00:00
|
|
|
|
*/
|
|
|
|
|
|
2008-06-22 14:28:52 +00:00
|
|
|
|
#include "config.h"
|
2010-09-14 01:33:06 +00:00
|
|
|
|
|
2000-10-05 01:04:57 +00:00
|
|
|
|
#include "gtkcellrenderertext.h"
|
2010-09-14 01:33:06 +00:00
|
|
|
|
|
2020-01-27 23:27:36 +00:00
|
|
|
|
#include "gtkcssnumbervalueprivate.h"
|
2001-09-25 16:44:39 +00:00
|
|
|
|
#include "gtkeditable.h"
|
|
|
|
|
#include "gtkentry.h"
|
2019-12-24 08:13:58 +00:00
|
|
|
|
#include "gtkentryprivate.h"
|
Adapt to GtkTreeSelection changes
2001-01-01 Havoc Pennington <hp@redhat.com>
* gtk/gtktreeview.c: Adapt to GtkTreeSelection changes
* gtk/gtktreeselection.c (_gtk_tree_selection_set_tree_view):
don't fill in tree_view->priv->selection, kind of an unexpected
side effect
* gtk/gtkcellrenderertext.c: Remove definition of _ and include
gtkintl.h
* gtk/gtkcellrenderer.c: Remove definition of _ and include
gtkintl.h
(gtk_cell_renderer_get_property): remove calls to g_value_init
* gtk/gtkcellrendererpixbuf.c: Remove definition of _ and include
gtkintl.h
* gtk/gtkcellrenderertextpixbuf.c: Remove definition of _ macro
and include gtkintl.h
(gtk_cell_renderer_text_pixbuf_class_init): remove spaces from
property names
* gtk/gtktreeselection.c (_gtk_tree_selection_new): rename, return
GtkTreeSelection
(_gtk_tree_selection_new_from_with_view): rename, return
GtkTreeSelection
(_gtk_tree_selection_set_tree_view): rename with uscore
(gtk_tree_selection_get_selected): fill in the "model" out param
first, so it gets filled in even if we return at the top of the
function
(gtk_tree_selection_real_select_all): add a comment and an else{}
to clarify this a bit
(gtk_tree_selection_real_unselect_all): add the same else{}
* gtk/gtktreeselection.h: Rename new, new_with_tree_view, and
set_tree_view to have underscore prefixes, move them to the
private header, fix return type of new_with_tree_view
(struct _GtkTreeSelection): mark struct
fields private
* gtk/gtktreemodel.c (gtk_tree_model_get_flags): return
GtkTreeModelFlags, not a guint
(gtk_tree_path_prev): return gboolean not gint
(gtk_tree_path_up): return gboolean not gint
* gtk/gtktreemodel.h (struct _GtkTreeModelIface): make get_flags
return GtkTreeModelFlags, not a guint
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_finalize): check
that child model is non-null before unrefing it
(g_value_int_compare_func): make this a qsort compare func, not
a boolean predicate
* gtk/gtktreemodelsort.h: rename gtk_tree_model_set_sort_column,
(add -umn to the end), and mark it unimplemented
(gtk_tree_model_sort_resort): remove, this wasn't implemented, and
I don't see what it's for - doesn't the model always sort itself?
(gtk_tree_model_sort_set_compare): this had the wrong signature
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_attributes):
Fix the docs to say that it destructively replaces existing
attributes (previously said that it added attributes).
(gtk_tree_view_column_set_visible): canonicalize bool before
equality testing. Also, check for realization before
hiding/showing the tree_column->window; if this window could exist
before realization, then it's busted and needs fixing, we can't
create GDK resources pre-realization. Also, remove
superfluous queue_resize(), since set_size() does that for us.
(gtk_tree_view_column_set_col_type): check realization before
using tree_column->window
* gtk/gtktreedatalist.c: fix filename in copyright notice
2001-01-01 19:01:54 +00:00
|
|
|
|
#include "gtkintl.h"
|
2018-02-08 22:39:17 +00:00
|
|
|
|
#include "gtkmarshalers.h"
|
2005-03-22 02:14:55 +00:00
|
|
|
|
#include "gtkprivate.h"
|
2018-02-08 22:39:17 +00:00
|
|
|
|
#include "gtksizerequest.h"
|
|
|
|
|
#include "gtksnapshot.h"
|
2020-01-27 23:27:36 +00:00
|
|
|
|
#include "gtkstylecontextprivate.h"
|
add a gtk_list_store_sort_iter_changed line for some special case ...
Tue Nov 26 22:26:04 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtk{tree,list}store.c (gtk_{tree,list}_store_real_set_value):
add a gtk_list_store_sort_iter_changed line for some special
case ... (#96647 (issue 1), testcases from Soeren Sandmann and
Daniel Elstner).
Tue Nov 26 22:18:06 2002 Kristian Rietveld <kris@gtk.org>
Inconsistent state for toggle renderers, requested by Paolo Bacchilega
in #88130.
* gtk/gtktreeprivate.h: move GtkCellRendererInfo here.
* gtk/gtkcellrenderer.c: moved GtkCellRendererInfo away,
fix some indentation issues.
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_class_init),
(gtk_cell_renderer_toggle_set_property),
(gtk_cell_renderer_toggle_get_property),
(gtk_cell_renderer_toggle_render): add an inconsistent property.
* gtk/gtkstyle.c (gtk_default_draw_check),
(gtk_default_draw_option): support drawing inconsistent
options/checks for cells.
Tue Nov 26 22:14:14 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_editing_done),
(gtk_cell_renderer_text_start_editing): add a focus_out_id to avoid
calling _editing_done twice (which has nasty side-effects). (#96647,
(issue 2) testcase from Soeren Sandmann).
Tue Nov 26 22:12:21 2002 Kristian Rietveld <kris@gtk.org>
#82739, patch from Padraig O'Briain.
* gtk/gtktreeviewcolumn.[ch]: add
gtk_tree_view_column_cell_get_position()
Tue Nov 26 22:06:29 2002 Kristian Rietveld <kris@gtk.org>
Yes, this chunk breaks ABI compatibility. Owen knows about it and
agreed with it. It doesn't break ABI that bad though, things will
still work. Please keep it silent :P.
This patch fixes some keynav issues reported by Narayana Pattipati
in #81633. (Also mentioned in #92037 (Sun tracking bug)).
* gtk/gtkmarshalers.list: add two silly marshalers
* gtk/gtktreeview.[ch] (gtk_tree_view_real_select_all),
(gtk_tree_view_real_unselect_all),
(gtk_tree_view_real_select_cursor_row),
(gtk_tree_view_real_toggle_cursor_row),
(gtk_tree_view_real_expand_collapse_cursor_row),
(gtk_tree_view_real_start_interactive_search): change the return
type from void to gboolean, update prototypes, functions, signals and
entries in GtkTreeViewClass,
(gtk_tree_view_class_init): add select_cursor_row binding for
enter key,
(gtk_tree_view_key_press): only navigate the header button if the
header is also visible ...
Tue Nov 26 22:05:48 2002 Kristian Rietveld <kris@gtk.org>
API bit of #75745, reported by Richard Hult.
* gtk/gtkcellrenderer.h (GtkCellRendererState): add
GTK_CELL_RENDERER_FOCUSED, rest of this bug fix will follow later.
2002-11-26 21:28:01 +00:00
|
|
|
|
#include "gtktreeprivate.h"
|
2018-02-08 22:39:17 +00:00
|
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
2000-10-05 01:04:57 +00:00
|
|
|
|
|
2010-11-06 17:02:11 +00:00
|
|
|
|
/**
|
2021-03-02 03:39:06 +00:00
|
|
|
|
* GtkCellRendererText:
|
|
|
|
|
*
|
|
|
|
|
* Renders text in a cell
|
2010-11-06 17:02:11 +00:00
|
|
|
|
*
|
|
|
|
|
* A #GtkCellRendererText renders a given text in its cell, using the font, color and
|
|
|
|
|
* style information provided by its properties. The text will be ellipsized if it is
|
|
|
|
|
* too long and the #GtkCellRendererText:ellipsize property allows it.
|
|
|
|
|
*
|
|
|
|
|
* If the #GtkCellRenderer:mode is %GTK_CELL_RENDERER_MODE_EDITABLE,
|
|
|
|
|
* the #GtkCellRendererText allows to edit its text using an entry.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
static void gtk_cell_renderer_text_finalize (GObject *object);
|
2000-10-05 01:04:57 +00:00
|
|
|
|
|
2000-12-12 07:32:32 +00:00
|
|
|
|
static void gtk_cell_renderer_text_get_property (GObject *object,
|
|
|
|
|
guint param_id,
|
|
|
|
|
GValue *value,
|
2001-03-07 14:49:21 +00:00
|
|
|
|
GParamSpec *pspec);
|
2000-12-12 07:32:32 +00:00
|
|
|
|
static void gtk_cell_renderer_text_set_property (GObject *object,
|
|
|
|
|
guint param_id,
|
|
|
|
|
const GValue *value,
|
2001-03-07 14:49:21 +00:00
|
|
|
|
GParamSpec *pspec);
|
2016-12-23 08:23:07 +00:00
|
|
|
|
static void gtk_cell_renderer_text_snapshot (GtkCellRenderer *cell,
|
|
|
|
|
GtkSnapshot *snapshot,
|
2000-10-05 01:04:57 +00:00
|
|
|
|
GtkWidget *widget,
|
2010-08-21 11:18:14 +00:00
|
|
|
|
const GdkRectangle *background_area,
|
|
|
|
|
const GdkRectangle *cell_area,
|
Behaviour change, apply changes if the entry of the editable gets a focus
Tue Oct 15 00:53:14 2002 Kristian Rietveld <kris@gtk.org>
Behaviour change, apply changes if the entry of the editable gets
a focus out event (#82405).
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_focus_out_event):
new function,
(gtk_cell_renderer_text_start_editing): stop editing and apply
changes on focus-out.
Tue Oct 15 00:47:35 2002 Kristian Rietveld <kris@gtk.org>
Fixes an *evil* GtkTreeModelSort bug, #93629.
* gtk/gtktreemodel.c (release_row_references): return if the
refs->list is NULL.
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_changed): if we
are swapping two rows (re-insertion on row_changed), also *emit*
a rows_reordered signal. oops.
Tue Oct 15 00:45:03 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtkliststore.c (gtk_list_store_remove_silently): free
the actual link after the node has been removed (#92014).
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_column_finalize):
free the cell_list and the child if the exists (#92014).
Tue Oct 15 00:40:25 2002 Kristian Rietveld <kris@gtk.org>
Don't accept drops if the model has been sorted, #93758)
* gtk/gtkliststore.c (gtk_list_store_row_drop_possible): return
FALSE if the list has been sorted.
* gtk/gtktreestore.c (gtk_tree_store_row_drop_possible): check
if drag_dest is a TreeStore, return FALSE if the tree has been
sorted.
Tue Oct 15 00:33:59 2002 Kristian Rietveld <kris@gtk.org>
Compiler warning fixage, (#85858, #85859, #85860, #85872)
* gtk/gtkcellrendererpixbuf (gtk_cell_renderer_pixbuf_render):
s/guint/GtkCellRendererState/.
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_render):
ditto.
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_render),
(gtk_cell_renderer_toggle_activate): ditto.
* gtk/gtkliststore.c (gtk_list_store_get_flags): a
s/guint/GtkTreeModelFlags/ on the return type.
2002-10-14 22:50:18 +00:00
|
|
|
|
GtkCellRendererState flags);
|
2000-10-05 01:04:57 +00:00
|
|
|
|
|
2001-09-25 16:44:39 +00:00
|
|
|
|
static GtkCellEditable *gtk_cell_renderer_text_start_editing (GtkCellRenderer *cell,
|
|
|
|
|
GdkEvent *event,
|
|
|
|
|
GtkWidget *widget,
|
2020-07-24 18:40:36 +00:00
|
|
|
|
const char *path,
|
2010-10-04 14:22:09 +00:00
|
|
|
|
const GdkRectangle *background_area,
|
|
|
|
|
const GdkRectangle *cell_area,
|
2001-09-25 16:44:39 +00:00
|
|
|
|
GtkCellRendererState flags);
|
2000-10-05 01:04:57 +00:00
|
|
|
|
|
2010-09-21 14:52:59 +00:00
|
|
|
|
static void gtk_cell_renderer_text_get_preferred_width (GtkCellRenderer *cell,
|
|
|
|
|
GtkWidget *widget,
|
2020-07-24 13:54:49 +00:00
|
|
|
|
int *minimal_size,
|
|
|
|
|
int *natural_size);
|
2010-09-21 14:52:59 +00:00
|
|
|
|
static void gtk_cell_renderer_text_get_preferred_height (GtkCellRenderer *cell,
|
|
|
|
|
GtkWidget *widget,
|
2020-07-24 13:54:49 +00:00
|
|
|
|
int *minimal_size,
|
|
|
|
|
int *natural_size);
|
2010-09-21 14:52:59 +00:00
|
|
|
|
static void gtk_cell_renderer_text_get_preferred_height_for_width (GtkCellRenderer *cell,
|
|
|
|
|
GtkWidget *widget,
|
2020-07-24 13:54:49 +00:00
|
|
|
|
int width,
|
|
|
|
|
int *minimum_height,
|
|
|
|
|
int *natural_height);
|
2010-11-25 08:41:26 +00:00
|
|
|
|
static void gtk_cell_renderer_text_get_aligned_area (GtkCellRenderer *cell,
|
|
|
|
|
GtkWidget *widget,
|
|
|
|
|
GtkCellRendererState flags,
|
|
|
|
|
const GdkRectangle *cell_area,
|
|
|
|
|
GdkRectangle *aligned_area);
|
|
|
|
|
|
|
|
|
|
|
2010-08-18 23:36:51 +00:00
|
|
|
|
|
2001-09-25 16:44:39 +00:00
|
|
|
|
enum {
|
|
|
|
|
EDITED,
|
|
|
|
|
LAST_SIGNAL
|
|
|
|
|
};
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2000-10-05 01:04:57 +00:00
|
|
|
|
enum {
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
PROP_0,
|
|
|
|
|
|
2000-10-05 01:04:57 +00:00
|
|
|
|
PROP_TEXT,
|
2001-02-20 16:16:22 +00:00
|
|
|
|
PROP_MARKUP,
|
2001-07-27 15:34:42 +00:00
|
|
|
|
PROP_ATTRIBUTES,
|
2003-12-17 23:30:36 +00:00
|
|
|
|
PROP_SINGLE_PARAGRAPH_MODE,
|
2004-12-13 16:12:39 +00:00
|
|
|
|
PROP_WIDTH_CHARS,
|
2010-08-20 23:23:00 +00:00
|
|
|
|
PROP_MAX_WIDTH_CHARS,
|
2005-01-20 18:47:58 +00:00
|
|
|
|
PROP_WRAP_WIDTH,
|
2006-03-14 19:44:59 +00:00
|
|
|
|
PROP_ALIGN,
|
2012-05-04 03:25:08 +00:00
|
|
|
|
PROP_PLACEHOLDER_TEXT,
|
|
|
|
|
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
/* Style args */
|
2000-10-05 01:04:57 +00:00
|
|
|
|
PROP_BACKGROUND,
|
|
|
|
|
PROP_FOREGROUND,
|
2010-10-22 16:33:07 +00:00
|
|
|
|
PROP_BACKGROUND_RGBA,
|
|
|
|
|
PROP_FOREGROUND_RGBA,
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
PROP_FONT,
|
|
|
|
|
PROP_FONT_DESC,
|
|
|
|
|
PROP_FAMILY,
|
|
|
|
|
PROP_STYLE,
|
|
|
|
|
PROP_VARIANT,
|
|
|
|
|
PROP_WEIGHT,
|
|
|
|
|
PROP_STRETCH,
|
|
|
|
|
PROP_SIZE,
|
|
|
|
|
PROP_SIZE_POINTS,
|
2001-05-07 15:58:47 +00:00
|
|
|
|
PROP_SCALE,
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
PROP_EDITABLE,
|
2000-10-05 01:04:57 +00:00
|
|
|
|
PROP_STRIKETHROUGH,
|
|
|
|
|
PROP_UNDERLINE,
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
PROP_RISE,
|
2003-12-18 00:44:37 +00:00
|
|
|
|
PROP_LANGUAGE,
|
2004-07-22 05:45:19 +00:00
|
|
|
|
PROP_ELLIPSIZE,
|
2005-01-20 18:47:58 +00:00
|
|
|
|
PROP_WRAP_MODE,
|
2015-09-06 19:31:37 +00:00
|
|
|
|
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
/* Whether-a-style-arg-is-set args */
|
|
|
|
|
PROP_BACKGROUND_SET,
|
|
|
|
|
PROP_FOREGROUND_SET,
|
|
|
|
|
PROP_FAMILY_SET,
|
|
|
|
|
PROP_STYLE_SET,
|
|
|
|
|
PROP_VARIANT_SET,
|
|
|
|
|
PROP_WEIGHT_SET,
|
|
|
|
|
PROP_STRETCH_SET,
|
|
|
|
|
PROP_SIZE_SET,
|
2001-05-07 15:58:47 +00:00
|
|
|
|
PROP_SCALE_SET,
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
PROP_EDITABLE_SET,
|
|
|
|
|
PROP_STRIKETHROUGH_SET,
|
|
|
|
|
PROP_UNDERLINE_SET,
|
2003-12-18 00:44:37 +00:00
|
|
|
|
PROP_RISE_SET,
|
2004-07-22 05:45:19 +00:00
|
|
|
|
PROP_LANGUAGE_SET,
|
2006-09-24 17:12:00 +00:00
|
|
|
|
PROP_ELLIPSIZE_SET,
|
2015-09-06 19:31:37 +00:00
|
|
|
|
PROP_ALIGN_SET,
|
|
|
|
|
|
|
|
|
|
LAST_PROP
|
2000-10-05 01:04:57 +00:00
|
|
|
|
};
|
|
|
|
|
|
2001-09-25 16:44:39 +00:00
|
|
|
|
static guint text_cell_renderer_signals [LAST_SIGNAL];
|
2015-09-06 19:31:37 +00:00
|
|
|
|
static GParamSpec *text_cell_renderer_props [LAST_PROP];
|
2001-09-25 16:44:39 +00:00
|
|
|
|
|
|
|
|
|
#define GTK_CELL_RENDERER_TEXT_PATH "gtk-cell-renderer-text-path"
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2019-05-27 00:27:36 +00:00
|
|
|
|
typedef struct _GtkCellRendererTextPrivate GtkCellRendererTextPrivate;
|
|
|
|
|
|
2010-08-26 17:15:37 +00:00
|
|
|
|
struct _GtkCellRendererTextPrivate
|
2003-12-17 23:30:36 +00:00
|
|
|
|
{
|
2010-06-01 18:45:11 +00:00
|
|
|
|
GtkWidget *entry;
|
|
|
|
|
|
|
|
|
|
PangoAttrList *extra_attrs;
|
2010-10-22 16:33:07 +00:00
|
|
|
|
GdkRGBA foreground;
|
|
|
|
|
GdkRGBA background;
|
2011-04-12 16:31:28 +00:00
|
|
|
|
PangoAlignment align;
|
2010-06-01 18:45:11 +00:00
|
|
|
|
PangoEllipsizeMode ellipsize;
|
|
|
|
|
PangoFontDescription *font;
|
|
|
|
|
PangoLanguage *language;
|
|
|
|
|
PangoUnderline underline_style;
|
|
|
|
|
PangoWrapMode wrap_mode;
|
|
|
|
|
|
2020-07-24 18:40:36 +00:00
|
|
|
|
char *text;
|
|
|
|
|
char *placeholder_text;
|
2010-06-01 18:45:11 +00:00
|
|
|
|
|
2020-07-24 20:32:16 +00:00
|
|
|
|
double font_scale;
|
2010-06-01 18:45:11 +00:00
|
|
|
|
|
2020-07-24 13:54:49 +00:00
|
|
|
|
int rise;
|
|
|
|
|
int fixed_height_rows;
|
|
|
|
|
int width_chars;
|
|
|
|
|
int max_width_chars;
|
|
|
|
|
int wrap_width;
|
2010-06-01 18:45:11 +00:00
|
|
|
|
|
2011-04-12 16:31:28 +00:00
|
|
|
|
guint in_entry_menu : 1;
|
2010-06-01 18:45:11 +00:00
|
|
|
|
guint strikethrough : 1;
|
|
|
|
|
guint editable : 1;
|
|
|
|
|
guint scale_set : 1;
|
|
|
|
|
guint foreground_set : 1;
|
|
|
|
|
guint background_set : 1;
|
|
|
|
|
guint underline_set : 1;
|
|
|
|
|
guint rise_set : 1;
|
|
|
|
|
guint strikethrough_set : 1;
|
|
|
|
|
guint editable_set : 1;
|
|
|
|
|
guint calc_fixed_height : 1;
|
|
|
|
|
guint single_paragraph : 1;
|
|
|
|
|
guint language_set : 1;
|
|
|
|
|
guint markup_set : 1;
|
|
|
|
|
guint ellipsize_set : 1;
|
|
|
|
|
guint align_set : 1;
|
|
|
|
|
|
|
|
|
|
gulong focus_out_id;
|
|
|
|
|
gulong entry_menu_popdown_timeout;
|
2003-12-17 23:30:36 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-06-27 19:02:52 +00:00
|
|
|
|
G_DEFINE_TYPE_WITH_PRIVATE (GtkCellRendererText, gtk_cell_renderer_text, GTK_TYPE_CELL_RENDERER)
|
2000-10-05 01:04:57 +00:00
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
gtk_cell_renderer_text_init (GtkCellRendererText *celltext)
|
|
|
|
|
{
|
2019-05-27 00:27:36 +00:00
|
|
|
|
GtkCellRendererTextPrivate *priv = gtk_cell_renderer_text_get_instance_private (celltext);
|
2010-05-30 20:38:33 +00:00
|
|
|
|
GtkCellRenderer *cell = GTK_CELL_RENDERER (celltext);
|
2004-12-13 16:12:39 +00:00
|
|
|
|
|
2010-05-30 20:38:33 +00:00
|
|
|
|
gtk_cell_renderer_set_alignment (cell, 0.0, 0.5);
|
|
|
|
|
gtk_cell_renderer_set_padding (cell, 2, 2);
|
2010-06-01 18:45:11 +00:00
|
|
|
|
priv->font_scale = 1.0;
|
|
|
|
|
priv->fixed_height_rows = -1;
|
|
|
|
|
priv->font = pango_font_description_new ();
|
2004-12-13 16:12:39 +00:00
|
|
|
|
|
|
|
|
|
priv->width_chars = -1;
|
2010-08-20 23:23:00 +00:00
|
|
|
|
priv->max_width_chars = -1;
|
2005-01-20 18:47:58 +00:00
|
|
|
|
priv->wrap_width = -1;
|
2007-12-28 05:32:55 +00:00
|
|
|
|
priv->wrap_mode = PANGO_WRAP_CHAR;
|
2006-03-14 19:44:59 +00:00
|
|
|
|
priv->align = PANGO_ALIGN_LEFT;
|
2006-07-19 16:27:10 +00:00
|
|
|
|
priv->align_set = FALSE;
|
2000-10-05 01:04:57 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
|
|
|
|
|
{
|
|
|
|
|
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
|
|
|
|
GtkCellRendererClass *cell_class = GTK_CELL_RENDERER_CLASS (class);
|
|
|
|
|
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
object_class->finalize = gtk_cell_renderer_text_finalize;
|
|
|
|
|
|
2000-12-12 07:32:32 +00:00
|
|
|
|
object_class->get_property = gtk_cell_renderer_text_get_property;
|
|
|
|
|
object_class->set_property = gtk_cell_renderer_text_set_property;
|
2000-10-05 01:04:57 +00:00
|
|
|
|
|
2016-12-23 08:23:07 +00:00
|
|
|
|
cell_class->snapshot = gtk_cell_renderer_text_snapshot;
|
2001-09-25 16:44:39 +00:00
|
|
|
|
cell_class->start_editing = gtk_cell_renderer_text_start_editing;
|
2010-09-21 14:52:59 +00:00
|
|
|
|
cell_class->get_preferred_width = gtk_cell_renderer_text_get_preferred_width;
|
|
|
|
|
cell_class->get_preferred_height = gtk_cell_renderer_text_get_preferred_height;
|
|
|
|
|
cell_class->get_preferred_height_for_width = gtk_cell_renderer_text_get_preferred_height_for_width;
|
2010-11-25 08:41:26 +00:00
|
|
|
|
cell_class->get_aligned_area = gtk_cell_renderer_text_get_aligned_area;
|
2005-03-22 02:14:55 +00:00
|
|
|
|
|
2015-09-06 19:31:37 +00:00
|
|
|
|
text_cell_renderer_props[PROP_TEXT] =
|
|
|
|
|
g_param_spec_string ("text",
|
|
|
|
|
P_("Text"),
|
|
|
|
|
P_("Text to render"),
|
|
|
|
|
NULL,
|
|
|
|
|
GTK_PARAM_READWRITE);
|
|
|
|
|
|
|
|
|
|
text_cell_renderer_props[PROP_MARKUP] =
|
|
|
|
|
g_param_spec_string ("markup",
|
|
|
|
|
P_("Markup"),
|
|
|
|
|
P_("Marked up text to render"),
|
|
|
|
|
NULL,
|
|
|
|
|
GTK_PARAM_WRITABLE);
|
|
|
|
|
|
|
|
|
|
text_cell_renderer_props[PROP_ATTRIBUTES] =
|
|
|
|
|
g_param_spec_boxed ("attributes",
|
|
|
|
|
P_("Attributes"),
|
|
|
|
|
P_("A list of style attributes to apply to the text of the renderer"),
|
|
|
|
|
PANGO_TYPE_ATTR_LIST,
|
|
|
|
|
GTK_PARAM_READWRITE);
|
|
|
|
|
|
|
|
|
|
text_cell_renderer_props[PROP_SINGLE_PARAGRAPH_MODE] =
|
|
|
|
|
g_param_spec_boolean ("single-paragraph-mode",
|
|
|
|
|
P_("Single Paragraph Mode"),
|
|
|
|
|
P_("Whether to keep all text in a single paragraph"),
|
|
|
|
|
FALSE,
|
|
|
|
|
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
|
|
|
|
|
|
|
|
|
text_cell_renderer_props[PROP_BACKGROUND] =
|
|
|
|
|
g_param_spec_string ("background",
|
|
|
|
|
P_("Background color name"),
|
|
|
|
|
P_("Background color as a string"),
|
|
|
|
|
NULL,
|
|
|
|
|
GTK_PARAM_WRITABLE);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2010-10-22 16:33:07 +00:00
|
|
|
|
/**
|
|
|
|
|
* GtkCellRendererText:background-rgba:
|
|
|
|
|
*
|
|
|
|
|
* Background color as a #GdkRGBA
|
|
|
|
|
*/
|
2015-09-06 19:31:37 +00:00
|
|
|
|
text_cell_renderer_props[PROP_BACKGROUND_RGBA] =
|
|
|
|
|
g_param_spec_boxed ("background-rgba",
|
|
|
|
|
P_("Background color as RGBA"),
|
|
|
|
|
P_("Background color as a GdkRGBA"),
|
|
|
|
|
GDK_TYPE_RGBA,
|
|
|
|
|
GTK_PARAM_READWRITE);
|
|
|
|
|
text_cell_renderer_props[PROP_FOREGROUND] =
|
|
|
|
|
g_param_spec_string ("foreground",
|
|
|
|
|
P_("Foreground color name"),
|
|
|
|
|
P_("Foreground color as a string"),
|
|
|
|
|
NULL,
|
|
|
|
|
GTK_PARAM_WRITABLE);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2010-10-22 16:33:07 +00:00
|
|
|
|
/**
|
|
|
|
|
* GtkCellRendererText:foreground-rgba:
|
|
|
|
|
*
|
|
|
|
|
* Foreground color as a #GdkRGBA
|
|
|
|
|
*/
|
2015-09-06 19:31:37 +00:00
|
|
|
|
text_cell_renderer_props[PROP_FOREGROUND_RGBA] =
|
|
|
|
|
g_param_spec_boxed ("foreground-rgba",
|
|
|
|
|
P_("Foreground color as RGBA"),
|
|
|
|
|
P_("Foreground color as a GdkRGBA"),
|
|
|
|
|
GDK_TYPE_RGBA,
|
|
|
|
|
GTK_PARAM_READWRITE);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
text_cell_renderer_props[PROP_EDITABLE] =
|
|
|
|
|
g_param_spec_boolean ("editable",
|
|
|
|
|
P_("Editable"),
|
|
|
|
|
P_("Whether the text can be modified by the user"),
|
|
|
|
|
FALSE,
|
|
|
|
|
GTK_PARAM_READWRITE);
|
|
|
|
|
|
|
|
|
|
text_cell_renderer_props[PROP_FONT] =
|
|
|
|
|
g_param_spec_string ("font",
|
|
|
|
|
P_("Font"),
|
2016-10-03 16:20:03 +00:00
|
|
|
|
P_("Font description as a string, e.g. “Sans Italic 12”"),
|
2015-09-06 19:31:37 +00:00
|
|
|
|
NULL,
|
|
|
|
|
GTK_PARAM_READWRITE);
|
|
|
|
|
|
|
|
|
|
text_cell_renderer_props[PROP_FONT_DESC] =
|
|
|
|
|
g_param_spec_boxed ("font-desc",
|
|
|
|
|
P_("Font"),
|
|
|
|
|
P_("Font description as a PangoFontDescription struct"),
|
|
|
|
|
PANGO_TYPE_FONT_DESCRIPTION,
|
|
|
|
|
GTK_PARAM_READWRITE);
|
|
|
|
|
|
|
|
|
|
text_cell_renderer_props[PROP_FAMILY] =
|
|
|
|
|
g_param_spec_string ("family",
|
|
|
|
|
P_("Font family"),
|
|
|
|
|
P_("Name of the font family, e.g. Sans, Helvetica, Times, Monospace"),
|
|
|
|
|
NULL,
|
|
|
|
|
GTK_PARAM_READWRITE);
|
|
|
|
|
|
|
|
|
|
text_cell_renderer_props[PROP_STYLE] =
|
|
|
|
|
g_param_spec_enum ("style",
|
|
|
|
|
P_("Font style"),
|
|
|
|
|
P_("Font style"),
|
|
|
|
|
PANGO_TYPE_STYLE,
|
|
|
|
|
PANGO_STYLE_NORMAL,
|
|
|
|
|
GTK_PARAM_READWRITE);
|
|
|
|
|
|
|
|
|
|
text_cell_renderer_props[PROP_VARIANT] =
|
|
|
|
|
g_param_spec_enum ("variant",
|
|
|
|
|
P_("Font variant"),
|
|
|
|
|
P_("Font variant"),
|
|
|
|
|
PANGO_TYPE_VARIANT,
|
|
|
|
|
PANGO_VARIANT_NORMAL,
|
|
|
|
|
GTK_PARAM_READWRITE);
|
|
|
|
|
|
|
|
|
|
text_cell_renderer_props[PROP_WEIGHT] =
|
|
|
|
|
g_param_spec_int ("weight",
|
|
|
|
|
P_("Font weight"),
|
|
|
|
|
P_("Font weight"),
|
|
|
|
|
0, G_MAXINT,
|
|
|
|
|
PANGO_WEIGHT_NORMAL,
|
|
|
|
|
GTK_PARAM_READWRITE);
|
|
|
|
|
|
|
|
|
|
text_cell_renderer_props[PROP_STRETCH] =
|
|
|
|
|
g_param_spec_enum ("stretch",
|
|
|
|
|
P_("Font stretch"),
|
|
|
|
|
P_("Font stretch"),
|
|
|
|
|
PANGO_TYPE_STRETCH,
|
|
|
|
|
PANGO_STRETCH_NORMAL,
|
|
|
|
|
GTK_PARAM_READWRITE);
|
|
|
|
|
|
|
|
|
|
text_cell_renderer_props[PROP_SIZE] =
|
|
|
|
|
g_param_spec_int ("size",
|
|
|
|
|
P_("Font size"),
|
|
|
|
|
P_("Font size"),
|
|
|
|
|
0, G_MAXINT,
|
|
|
|
|
0,
|
|
|
|
|
GTK_PARAM_READWRITE);
|
|
|
|
|
|
|
|
|
|
text_cell_renderer_props[PROP_SIZE_POINTS] =
|
|
|
|
|
g_param_spec_double ("size-points",
|
|
|
|
|
P_("Font points"),
|
|
|
|
|
P_("Font size in points"),
|
|
|
|
|
0.0, G_MAXDOUBLE,
|
|
|
|
|
0.0,
|
|
|
|
|
GTK_PARAM_READWRITE);
|
|
|
|
|
|
|
|
|
|
text_cell_renderer_props[PROP_SCALE] =
|
|
|
|
|
g_param_spec_double ("scale",
|
|
|
|
|
P_("Font scale"),
|
|
|
|
|
P_("Font scaling factor"),
|
|
|
|
|
0.0, G_MAXDOUBLE,
|
|
|
|
|
1.0,
|
|
|
|
|
GTK_PARAM_READWRITE);
|
|
|
|
|
|
|
|
|
|
text_cell_renderer_props[PROP_RISE] =
|
|
|
|
|
g_param_spec_int ("rise",
|
|
|
|
|
P_("Rise"),
|
|
|
|
|
P_("Offset of text above the baseline (below the baseline if rise is negative)"),
|
|
|
|
|
-G_MAXINT, G_MAXINT,
|
|
|
|
|
0,
|
|
|
|
|
GTK_PARAM_READWRITE);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
text_cell_renderer_props[PROP_STRIKETHROUGH] =
|
|
|
|
|
g_param_spec_boolean ("strikethrough",
|
|
|
|
|
P_("Strikethrough"),
|
|
|
|
|
P_("Whether to strike through the text"),
|
|
|
|
|
FALSE,
|
|
|
|
|
GTK_PARAM_READWRITE);
|
|
|
|
|
|
|
|
|
|
text_cell_renderer_props[PROP_UNDERLINE] =
|
|
|
|
|
g_param_spec_enum ("underline",
|
|
|
|
|
P_("Underline"),
|
|
|
|
|
P_("Style of underline for this text"),
|
|
|
|
|
PANGO_TYPE_UNDERLINE,
|
|
|
|
|
PANGO_UNDERLINE_NONE,
|
|
|
|
|
GTK_PARAM_READWRITE);
|
|
|
|
|
|
|
|
|
|
text_cell_renderer_props[PROP_LANGUAGE] =
|
|
|
|
|
g_param_spec_string ("language",
|
|
|
|
|
P_("Language"),
|
|
|
|
|
P_("The language this text is in, as an ISO code. "
|
|
|
|
|
"Pango can use this as a hint when rendering the text. "
|
2016-10-03 16:20:03 +00:00
|
|
|
|
"If you don’t understand this parameter, you probably don’t need it"),
|
2015-09-06 19:31:37 +00:00
|
|
|
|
NULL,
|
|
|
|
|
GTK_PARAM_READWRITE);
|
2003-12-18 00:44:37 +00:00
|
|
|
|
|
2005-01-20 18:47:58 +00:00
|
|
|
|
/**
|
|
|
|
|
* GtkCellRendererText:ellipsize:
|
|
|
|
|
*
|
2015-09-06 19:31:37 +00:00
|
|
|
|
* Specifies the preferred place to ellipsize the string, if the cell renderer
|
|
|
|
|
* does not have enough room to display the entire string. Setting it to
|
2005-01-20 18:47:58 +00:00
|
|
|
|
* %PANGO_ELLIPSIZE_NONE turns off ellipsizing. See the wrap-width property
|
|
|
|
|
* for another way of making the text fit into a given width.
|
|
|
|
|
*/
|
2015-09-06 19:31:37 +00:00
|
|
|
|
text_cell_renderer_props[PROP_ELLIPSIZE] =
|
|
|
|
|
g_param_spec_enum ("ellipsize",
|
|
|
|
|
P_("Ellipsize"),
|
|
|
|
|
P_("The preferred place to ellipsize the string, "
|
|
|
|
|
"if the cell renderer does not have enough room "
|
|
|
|
|
"to display the entire string"),
|
|
|
|
|
PANGO_TYPE_ELLIPSIZE_MODE,
|
|
|
|
|
PANGO_ELLIPSIZE_NONE,
|
|
|
|
|
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
2004-12-13 16:12:39 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* GtkCellRendererText:width-chars:
|
2015-09-06 19:31:37 +00:00
|
|
|
|
*
|
2004-12-13 16:12:39 +00:00
|
|
|
|
* The desired width of the cell, in characters. If this property is set to
|
|
|
|
|
* -1, the width will be calculated automatically, otherwise the cell will
|
|
|
|
|
* request either 3 characters or the property value, whichever is greater.
|
|
|
|
|
**/
|
2015-09-06 19:31:37 +00:00
|
|
|
|
text_cell_renderer_props[PROP_WIDTH_CHARS] =
|
|
|
|
|
g_param_spec_int ("width-chars",
|
|
|
|
|
P_("Width In Characters"),
|
|
|
|
|
P_("The desired width of the label, in characters"),
|
|
|
|
|
-1, G_MAXINT,
|
|
|
|
|
-1,
|
|
|
|
|
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
2010-08-20 23:23:00 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* GtkCellRendererText:max-width-chars:
|
2015-09-06 19:31:37 +00:00
|
|
|
|
*
|
|
|
|
|
* The desired maximum width of the cell, in characters. If this property
|
2010-08-20 23:23:00 +00:00
|
|
|
|
* is set to -1, the width will be calculated automatically.
|
|
|
|
|
*
|
|
|
|
|
* For cell renderers that ellipsize or wrap text; this property
|
|
|
|
|
* controls the maximum reported width of the cell. The
|
|
|
|
|
* cell should not receive any greater allocation unless it is
|
|
|
|
|
* set to expand in its #GtkCellLayout and all of the cell's siblings
|
|
|
|
|
* have received their natural width.
|
|
|
|
|
**/
|
2015-09-06 19:31:37 +00:00
|
|
|
|
text_cell_renderer_props[PROP_MAX_WIDTH_CHARS] =
|
|
|
|
|
g_param_spec_int ("max-width-chars",
|
|
|
|
|
P_("Maximum Width In Characters"),
|
|
|
|
|
P_("The maximum width of the cell, in characters"),
|
|
|
|
|
-1, G_MAXINT,
|
|
|
|
|
-1,
|
|
|
|
|
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
|
|
|
|
|
2005-01-20 18:47:58 +00:00
|
|
|
|
/**
|
|
|
|
|
* GtkCellRendererText:wrap-mode:
|
|
|
|
|
*
|
2015-09-06 19:31:37 +00:00
|
|
|
|
* Specifies how to break the string into multiple lines, if the cell
|
|
|
|
|
* renderer does not have enough room to display the entire string.
|
2005-03-22 02:14:55 +00:00
|
|
|
|
* This property has no effect unless the wrap-width property is set.
|
2005-01-20 18:47:58 +00:00
|
|
|
|
*/
|
2015-09-06 19:31:37 +00:00
|
|
|
|
text_cell_renderer_props[PROP_WRAP_MODE] =
|
|
|
|
|
g_param_spec_enum ("wrap-mode",
|
|
|
|
|
P_("Wrap mode"),
|
|
|
|
|
P_("How to break the string into multiple lines, "
|
|
|
|
|
"if the cell renderer does not have enough room "
|
|
|
|
|
"to display the entire string"),
|
|
|
|
|
PANGO_TYPE_WRAP_MODE,
|
|
|
|
|
PANGO_WRAP_CHAR,
|
|
|
|
|
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
2005-01-20 18:47:58 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* GtkCellRendererText:wrap-width:
|
|
|
|
|
*
|
2015-09-06 19:31:37 +00:00
|
|
|
|
* Specifies the minimum width at which the text is wrapped. The wrap-mode property can
|
2005-01-20 18:47:58 +00:00
|
|
|
|
* be used to influence at what character positions the line breaks can be placed.
|
|
|
|
|
* Setting wrap-width to -1 turns wrapping off.
|
|
|
|
|
*/
|
2015-09-06 19:31:37 +00:00
|
|
|
|
text_cell_renderer_props[PROP_WRAP_WIDTH] =
|
|
|
|
|
g_param_spec_int ("wrap-width",
|
|
|
|
|
P_("Wrap width"),
|
|
|
|
|
P_("The width at which the text is wrapped"),
|
|
|
|
|
-1, G_MAXINT,
|
|
|
|
|
-1,
|
|
|
|
|
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
2005-01-20 18:47:58 +00:00
|
|
|
|
|
2006-03-14 19:44:59 +00:00
|
|
|
|
/**
|
|
|
|
|
* GtkCellRendererText:alignment:
|
|
|
|
|
*
|
2015-09-06 19:31:37 +00:00
|
|
|
|
* Specifies how to align the lines of text with respect to each other.
|
2007-02-02 03:50:46 +00:00
|
|
|
|
*
|
2015-09-06 19:31:37 +00:00
|
|
|
|
* Note that this property describes how to align the lines of text in
|
|
|
|
|
* case there are several of them. The "xalign" property of #GtkCellRenderer,
|
2007-02-02 03:50:46 +00:00
|
|
|
|
* on the other hand, sets the horizontal alignment of the whole text.
|
2006-03-14 19:44:59 +00:00
|
|
|
|
*/
|
2015-09-06 19:31:37 +00:00
|
|
|
|
text_cell_renderer_props[PROP_ALIGN] =
|
|
|
|
|
g_param_spec_enum ("alignment",
|
|
|
|
|
P_("Alignment"),
|
|
|
|
|
P_("How to align the lines"),
|
|
|
|
|
PANGO_TYPE_ALIGNMENT,
|
|
|
|
|
PANGO_ALIGN_LEFT,
|
|
|
|
|
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
|
2012-05-04 03:25:08 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* GtkCellRendererText:placeholder-text:
|
|
|
|
|
*
|
|
|
|
|
* The text that will be displayed in the #GtkCellRenderer if
|
|
|
|
|
* #GtkCellRendererText:editable is %TRUE and the cell is empty.
|
|
|
|
|
*/
|
2015-09-06 19:31:37 +00:00
|
|
|
|
text_cell_renderer_props[PROP_PLACEHOLDER_TEXT] =
|
|
|
|
|
g_param_spec_string ("placeholder-text",
|
|
|
|
|
P_("Placeholder text"),
|
|
|
|
|
P_("Text rendered when an editable cell is empty"),
|
|
|
|
|
NULL,
|
|
|
|
|
GTK_PARAM_READWRITE);
|
2010-08-20 23:23:00 +00:00
|
|
|
|
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
/* Style props are set or not */
|
|
|
|
|
|
2015-09-06 19:31:37 +00:00
|
|
|
|
#define ADD_SET_PROP(propname, propval, nick, blurb) text_cell_renderer_props[propval] = g_param_spec_boolean (propname, nick, blurb, FALSE, GTK_PARAM_READWRITE)
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2005-03-09 04:04:40 +00:00
|
|
|
|
ADD_SET_PROP ("background-set", PROP_BACKGROUND_SET,
|
2004-01-16 23:10:05 +00:00
|
|
|
|
P_("Background set"),
|
|
|
|
|
P_("Whether this tag affects the background color"));
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2005-03-09 04:04:40 +00:00
|
|
|
|
ADD_SET_PROP ("foreground-set", PROP_FOREGROUND_SET,
|
2004-01-16 23:10:05 +00:00
|
|
|
|
P_("Foreground set"),
|
|
|
|
|
P_("Whether this tag affects the foreground color"));
|
2015-09-06 19:31:37 +00:00
|
|
|
|
|
2005-03-09 04:04:40 +00:00
|
|
|
|
ADD_SET_PROP ("editable-set", PROP_EDITABLE_SET,
|
2004-01-16 23:10:05 +00:00
|
|
|
|
P_("Editability set"),
|
|
|
|
|
P_("Whether this tag affects text editability"));
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2005-03-09 04:04:40 +00:00
|
|
|
|
ADD_SET_PROP ("family-set", PROP_FAMILY_SET,
|
2004-01-16 23:10:05 +00:00
|
|
|
|
P_("Font family set"),
|
2015-09-06 19:31:37 +00:00
|
|
|
|
P_("Whether this tag affects the font family"));
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2005-03-09 04:04:40 +00:00
|
|
|
|
ADD_SET_PROP ("style-set", PROP_STYLE_SET,
|
2004-01-16 23:10:05 +00:00
|
|
|
|
P_("Font style set"),
|
|
|
|
|
P_("Whether this tag affects the font style"));
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2005-03-09 04:04:40 +00:00
|
|
|
|
ADD_SET_PROP ("variant-set", PROP_VARIANT_SET,
|
2004-01-16 23:10:05 +00:00
|
|
|
|
P_("Font variant set"),
|
|
|
|
|
P_("Whether this tag affects the font variant"));
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2005-03-09 04:04:40 +00:00
|
|
|
|
ADD_SET_PROP ("weight-set", PROP_WEIGHT_SET,
|
2004-01-16 23:10:05 +00:00
|
|
|
|
P_("Font weight set"),
|
|
|
|
|
P_("Whether this tag affects the font weight"));
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2005-03-09 04:04:40 +00:00
|
|
|
|
ADD_SET_PROP ("stretch-set", PROP_STRETCH_SET,
|
2004-01-16 23:10:05 +00:00
|
|
|
|
P_("Font stretch set"),
|
|
|
|
|
P_("Whether this tag affects the font stretch"));
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2005-03-09 04:04:40 +00:00
|
|
|
|
ADD_SET_PROP ("size-set", PROP_SIZE_SET,
|
2004-01-16 23:10:05 +00:00
|
|
|
|
P_("Font size set"),
|
|
|
|
|
P_("Whether this tag affects the font size"));
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2005-03-09 04:04:40 +00:00
|
|
|
|
ADD_SET_PROP ("scale-set", PROP_SCALE_SET,
|
2004-01-16 23:10:05 +00:00
|
|
|
|
P_("Font scale set"),
|
|
|
|
|
P_("Whether this tag scales the font size by a factor"));
|
2015-09-06 19:31:37 +00:00
|
|
|
|
|
2005-03-09 04:04:40 +00:00
|
|
|
|
ADD_SET_PROP ("rise-set", PROP_RISE_SET,
|
2004-01-16 23:10:05 +00:00
|
|
|
|
P_("Rise set"),
|
|
|
|
|
P_("Whether this tag affects the rise"));
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2005-03-09 04:04:40 +00:00
|
|
|
|
ADD_SET_PROP ("strikethrough-set", PROP_STRIKETHROUGH_SET,
|
2004-01-16 23:10:05 +00:00
|
|
|
|
P_("Strikethrough set"),
|
|
|
|
|
P_("Whether this tag affects strikethrough"));
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2005-03-09 04:04:40 +00:00
|
|
|
|
ADD_SET_PROP ("underline-set", PROP_UNDERLINE_SET,
|
2004-01-16 23:10:05 +00:00
|
|
|
|
P_("Underline set"),
|
|
|
|
|
P_("Whether this tag affects underlining"));
|
2001-09-25 16:44:39 +00:00
|
|
|
|
|
2005-03-09 04:04:40 +00:00
|
|
|
|
ADD_SET_PROP ("language-set", PROP_LANGUAGE_SET,
|
2004-01-16 23:10:05 +00:00
|
|
|
|
P_("Language set"),
|
|
|
|
|
P_("Whether this tag affects the language the text is rendered as"));
|
2003-12-18 00:44:37 +00:00
|
|
|
|
|
2005-03-09 04:04:40 +00:00
|
|
|
|
ADD_SET_PROP ("ellipsize-set", PROP_ELLIPSIZE_SET,
|
2004-10-20 05:15:44 +00:00
|
|
|
|
P_("Ellipsize set"),
|
2004-07-22 05:45:19 +00:00
|
|
|
|
P_("Whether this tag affects the ellipsize mode"));
|
2005-01-20 18:47:58 +00:00
|
|
|
|
|
2006-09-24 17:12:00 +00:00
|
|
|
|
ADD_SET_PROP ("align-set", PROP_ALIGN_SET,
|
|
|
|
|
P_("Align set"),
|
|
|
|
|
P_("Whether this tag affects the alignment mode"));
|
|
|
|
|
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_class_install_properties (object_class, LAST_PROP, text_cell_renderer_props);
|
|
|
|
|
|
2006-11-16 21:35:52 +00:00
|
|
|
|
/**
|
2012-04-13 00:07:28 +00:00
|
|
|
|
* GtkCellRendererText::edited:
|
2007-07-12 01:55:15 +00:00
|
|
|
|
* @renderer: the object which received the signal
|
|
|
|
|
* @path: the path identifying the edited cell
|
|
|
|
|
* @new_text: the new text
|
2006-11-16 21:35:52 +00:00
|
|
|
|
*
|
|
|
|
|
* This signal is emitted after @renderer has been edited.
|
2007-07-12 01:55:15 +00:00
|
|
|
|
*
|
|
|
|
|
* It is the responsibility of the application to update the model
|
|
|
|
|
* and store @new_text at the position indicated by @path.
|
2006-11-16 21:35:52 +00:00
|
|
|
|
*/
|
2001-09-25 16:44:39 +00:00
|
|
|
|
text_cell_renderer_signals [EDITED] =
|
2005-09-01 05:11:46 +00:00
|
|
|
|
g_signal_new (I_("edited"),
|
2002-10-07 01:38:40 +00:00
|
|
|
|
G_OBJECT_CLASS_TYPE (object_class),
|
|
|
|
|
G_SIGNAL_RUN_LAST,
|
|
|
|
|
G_STRUCT_OFFSET (GtkCellRendererTextClass, edited),
|
|
|
|
|
NULL, NULL,
|
|
|
|
|
_gtk_marshal_VOID__STRING_STRING,
|
|
|
|
|
G_TYPE_NONE, 2,
|
|
|
|
|
G_TYPE_STRING,
|
|
|
|
|
G_TYPE_STRING);
|
2019-06-06 22:27:54 +00:00
|
|
|
|
g_signal_set_va_marshaller (text_cell_renderer_signals [EDITED],
|
|
|
|
|
G_OBJECT_CLASS_TYPE (object_class),
|
|
|
|
|
_gtk_marshal_VOID__STRING_STRINGv);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
gtk_cell_renderer_text_finalize (GObject *object)
|
|
|
|
|
{
|
|
|
|
|
GtkCellRendererText *celltext = GTK_CELL_RENDERER_TEXT (object);
|
2019-05-27 00:27:36 +00:00
|
|
|
|
GtkCellRendererTextPrivate *priv = gtk_cell_renderer_text_get_instance_private (celltext);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2010-06-01 18:45:11 +00:00
|
|
|
|
pango_font_description_free (priv->font);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2010-06-01 18:45:11 +00:00
|
|
|
|
g_free (priv->text);
|
2012-05-04 03:25:08 +00:00
|
|
|
|
g_free (priv->placeholder_text);
|
2001-02-20 16:16:22 +00:00
|
|
|
|
|
2010-06-01 18:45:11 +00:00
|
|
|
|
if (priv->extra_attrs)
|
|
|
|
|
pango_attr_list_unref (priv->extra_attrs);
|
2001-02-20 16:16:22 +00:00
|
|
|
|
|
2003-12-18 00:44:37 +00:00
|
|
|
|
if (priv->language)
|
|
|
|
|
g_object_unref (priv->language);
|
|
|
|
|
|
2013-02-08 07:03:52 +00:00
|
|
|
|
g_clear_object (&priv->entry);
|
|
|
|
|
|
2008-08-12 09:51:16 +00:00
|
|
|
|
G_OBJECT_CLASS (gtk_cell_renderer_text_parent_class)->finalize (object);
|
2000-10-05 01:04:57 +00:00
|
|
|
|
}
|
|
|
|
|
|
2001-09-18 20:06:48 +00:00
|
|
|
|
static PangoFontMask
|
|
|
|
|
get_property_font_set_mask (guint prop_id)
|
|
|
|
|
{
|
|
|
|
|
switch (prop_id)
|
|
|
|
|
{
|
|
|
|
|
case PROP_FAMILY_SET:
|
|
|
|
|
return PANGO_FONT_MASK_FAMILY;
|
|
|
|
|
case PROP_STYLE_SET:
|
|
|
|
|
return PANGO_FONT_MASK_STYLE;
|
|
|
|
|
case PROP_VARIANT_SET:
|
|
|
|
|
return PANGO_FONT_MASK_VARIANT;
|
|
|
|
|
case PROP_WEIGHT_SET:
|
|
|
|
|
return PANGO_FONT_MASK_WEIGHT;
|
|
|
|
|
case PROP_STRETCH_SET:
|
|
|
|
|
return PANGO_FONT_MASK_STRETCH;
|
|
|
|
|
case PROP_SIZE_SET:
|
|
|
|
|
return PANGO_FONT_MASK_SIZE;
|
2017-10-06 19:19:42 +00:00
|
|
|
|
default:
|
|
|
|
|
return 0;
|
2001-09-18 20:06:48 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2000-10-05 01:04:57 +00:00
|
|
|
|
static void
|
2000-12-12 07:32:32 +00:00
|
|
|
|
gtk_cell_renderer_text_get_property (GObject *object,
|
|
|
|
|
guint param_id,
|
|
|
|
|
GValue *value,
|
2001-03-07 14:49:21 +00:00
|
|
|
|
GParamSpec *pspec)
|
2000-10-05 01:04:57 +00:00
|
|
|
|
{
|
|
|
|
|
GtkCellRendererText *celltext = GTK_CELL_RENDERER_TEXT (object);
|
2019-05-27 00:27:36 +00:00
|
|
|
|
GtkCellRendererTextPrivate *priv = gtk_cell_renderer_text_get_instance_private (celltext);
|
2000-10-05 01:04:57 +00:00
|
|
|
|
|
|
|
|
|
switch (param_id)
|
|
|
|
|
{
|
|
|
|
|
case PROP_TEXT:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
g_value_set_string (value, priv->text);
|
2000-10-05 01:04:57 +00:00
|
|
|
|
break;
|
2001-07-27 15:34:42 +00:00
|
|
|
|
|
|
|
|
|
case PROP_ATTRIBUTES:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
g_value_set_boxed (value, priv->extra_attrs);
|
2001-07-27 15:34:42 +00:00
|
|
|
|
break;
|
|
|
|
|
|
2003-12-17 23:30:36 +00:00
|
|
|
|
case PROP_SINGLE_PARAGRAPH_MODE:
|
|
|
|
|
g_value_set_boolean (value, priv->single_paragraph);
|
|
|
|
|
break;
|
|
|
|
|
|
2010-10-22 16:33:07 +00:00
|
|
|
|
case PROP_BACKGROUND_RGBA:
|
|
|
|
|
g_value_set_boxed (value, &priv->background);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PROP_FOREGROUND_RGBA:
|
|
|
|
|
g_value_set_boxed (value, &priv->foreground);
|
|
|
|
|
break;
|
|
|
|
|
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
case PROP_FONT:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
g_value_take_string (value, pango_font_description_to_string (priv->font));
|
2000-10-05 01:04:57 +00:00
|
|
|
|
break;
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
|
|
|
|
case PROP_FONT_DESC:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
g_value_set_boxed (value, priv->font);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PROP_FAMILY:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
g_value_set_string (value, pango_font_description_get_family (priv->font));
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PROP_STYLE:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
g_value_set_enum (value, pango_font_description_get_style (priv->font));
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PROP_VARIANT:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
g_value_set_enum (value, pango_font_description_get_variant (priv->font));
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PROP_WEIGHT:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
g_value_set_int (value, pango_font_description_get_weight (priv->font));
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PROP_STRETCH:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
g_value_set_enum (value, pango_font_description_get_stretch (priv->font));
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PROP_SIZE:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
g_value_set_int (value, pango_font_description_get_size (priv->font));
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PROP_SIZE_POINTS:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
g_value_set_double (value, ((double)pango_font_description_get_size (priv->font)) / (double)PANGO_SCALE);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
break;
|
|
|
|
|
|
2001-05-07 15:58:47 +00:00
|
|
|
|
case PROP_SCALE:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
g_value_set_double (value, priv->font_scale);
|
2001-05-07 15:58:47 +00:00
|
|
|
|
break;
|
|
|
|
|
|
2000-10-05 01:04:57 +00:00
|
|
|
|
case PROP_EDITABLE:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
g_value_set_boolean (value, priv->editable);
|
2000-10-05 01:04:57 +00:00
|
|
|
|
break;
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
|
|
|
|
case PROP_STRIKETHROUGH:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
g_value_set_boolean (value, priv->strikethrough);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PROP_UNDERLINE:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
g_value_set_enum (value, priv->underline_style);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PROP_RISE:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
g_value_set_int (value, priv->rise);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
break;
|
|
|
|
|
|
2003-12-18 00:44:37 +00:00
|
|
|
|
case PROP_LANGUAGE:
|
2007-03-12 04:46:58 +00:00
|
|
|
|
g_value_set_static_string (value, pango_language_to_string (priv->language));
|
2003-12-18 00:44:37 +00:00
|
|
|
|
break;
|
|
|
|
|
|
2004-07-22 05:45:19 +00:00
|
|
|
|
case PROP_ELLIPSIZE:
|
|
|
|
|
g_value_set_enum (value, priv->ellipsize);
|
|
|
|
|
break;
|
|
|
|
|
|
2005-01-20 18:47:58 +00:00
|
|
|
|
case PROP_WRAP_MODE:
|
|
|
|
|
g_value_set_enum (value, priv->wrap_mode);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PROP_WRAP_WIDTH:
|
|
|
|
|
g_value_set_int (value, priv->wrap_width);
|
|
|
|
|
break;
|
|
|
|
|
|
2006-03-14 19:44:59 +00:00
|
|
|
|
case PROP_ALIGN:
|
|
|
|
|
g_value_set_enum (value, priv->align);
|
|
|
|
|
break;
|
|
|
|
|
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
case PROP_BACKGROUND_SET:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
g_value_set_boolean (value, priv->background_set);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PROP_FOREGROUND_SET:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
g_value_set_boolean (value, priv->foreground_set);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PROP_FAMILY_SET:
|
|
|
|
|
case PROP_STYLE_SET:
|
|
|
|
|
case PROP_VARIANT_SET:
|
|
|
|
|
case PROP_WEIGHT_SET:
|
|
|
|
|
case PROP_STRETCH_SET:
|
|
|
|
|
case PROP_SIZE_SET:
|
2001-09-18 20:06:48 +00:00
|
|
|
|
{
|
|
|
|
|
PangoFontMask mask = get_property_font_set_mask (param_id);
|
2010-06-01 18:45:11 +00:00
|
|
|
|
g_value_set_boolean (value, (pango_font_description_get_set_fields (priv->font) & mask) != 0);
|
2001-09-19 00:58:09 +00:00
|
|
|
|
|
|
|
|
|
break;
|
2001-09-18 20:06:48 +00:00
|
|
|
|
}
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2001-05-07 15:58:47 +00:00
|
|
|
|
case PROP_SCALE_SET:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
g_value_set_boolean (value, priv->scale_set);
|
2001-05-07 15:58:47 +00:00
|
|
|
|
break;
|
|
|
|
|
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
case PROP_EDITABLE_SET:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
g_value_set_boolean (value, priv->editable_set);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PROP_STRIKETHROUGH_SET:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
g_value_set_boolean (value, priv->strikethrough_set);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PROP_UNDERLINE_SET:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
g_value_set_boolean (value, priv->underline_set);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PROP_RISE_SET:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
g_value_set_boolean (value, priv->rise_set);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
break;
|
2003-12-18 00:44:37 +00:00
|
|
|
|
|
|
|
|
|
case PROP_LANGUAGE_SET:
|
|
|
|
|
g_value_set_boolean (value, priv->language_set);
|
|
|
|
|
break;
|
2004-07-22 05:45:19 +00:00
|
|
|
|
|
|
|
|
|
case PROP_ELLIPSIZE_SET:
|
|
|
|
|
g_value_set_boolean (value, priv->ellipsize_set);
|
|
|
|
|
break;
|
2006-09-24 17:12:00 +00:00
|
|
|
|
|
|
|
|
|
case PROP_ALIGN_SET:
|
|
|
|
|
g_value_set_boolean (value, priv->align_set);
|
|
|
|
|
break;
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2004-12-13 16:12:39 +00:00
|
|
|
|
case PROP_WIDTH_CHARS:
|
|
|
|
|
g_value_set_int (value, priv->width_chars);
|
|
|
|
|
break;
|
|
|
|
|
|
2010-08-20 23:23:00 +00:00
|
|
|
|
case PROP_MAX_WIDTH_CHARS:
|
|
|
|
|
g_value_set_int (value, priv->max_width_chars);
|
|
|
|
|
break;
|
|
|
|
|
|
2012-05-04 03:25:08 +00:00
|
|
|
|
case PROP_PLACEHOLDER_TEXT:
|
|
|
|
|
g_value_set_string (value, priv->placeholder_text);
|
|
|
|
|
break;
|
|
|
|
|
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
case PROP_BACKGROUND:
|
|
|
|
|
case PROP_FOREGROUND:
|
2001-02-20 16:16:22 +00:00
|
|
|
|
case PROP_MARKUP:
|
2000-10-05 01:04:57 +00:00
|
|
|
|
default:
|
2000-12-12 07:32:32 +00:00
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
|
2000-10-05 01:04:57 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
static void
|
|
|
|
|
set_bg_color (GtkCellRendererText *celltext,
|
2010-10-22 16:33:07 +00:00
|
|
|
|
GdkRGBA *rgba)
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
{
|
2019-05-27 00:27:36 +00:00
|
|
|
|
GtkCellRendererTextPrivate *priv = gtk_cell_renderer_text_get_instance_private (celltext);
|
2010-06-01 18:45:11 +00:00
|
|
|
|
|
2010-10-22 16:33:07 +00:00
|
|
|
|
if (rgba)
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
{
|
2010-06-01 18:45:11 +00:00
|
|
|
|
if (!priv->background_set)
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
{
|
2010-06-01 18:45:11 +00:00
|
|
|
|
priv->background_set = TRUE;
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (G_OBJECT (celltext), text_cell_renderer_props[PROP_BACKGROUND_SET]);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
}
|
2010-10-22 16:33:07 +00:00
|
|
|
|
|
|
|
|
|
priv->background = *rgba;
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2010-06-01 18:45:11 +00:00
|
|
|
|
if (priv->background_set)
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
{
|
2010-06-01 18:45:11 +00:00
|
|
|
|
priv->background_set = FALSE;
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (G_OBJECT (celltext), text_cell_renderer_props[PROP_BACKGROUND_SET]);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
set_fg_color (GtkCellRendererText *celltext,
|
2010-10-22 16:33:07 +00:00
|
|
|
|
GdkRGBA *rgba)
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
{
|
2019-05-27 00:27:36 +00:00
|
|
|
|
GtkCellRendererTextPrivate *priv = gtk_cell_renderer_text_get_instance_private (celltext);
|
2010-06-01 18:45:11 +00:00
|
|
|
|
|
2010-10-22 16:33:07 +00:00
|
|
|
|
if (rgba)
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
{
|
2010-06-01 18:45:11 +00:00
|
|
|
|
if (!priv->foreground_set)
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
{
|
2010-06-01 18:45:11 +00:00
|
|
|
|
priv->foreground_set = TRUE;
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (G_OBJECT (celltext), text_cell_renderer_props[PROP_FOREGROUND_SET]);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
}
|
2010-10-22 16:33:07 +00:00
|
|
|
|
|
|
|
|
|
priv->foreground = *rgba;
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2010-06-01 18:45:11 +00:00
|
|
|
|
if (priv->foreground_set)
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
{
|
2010-06-01 18:45:11 +00:00
|
|
|
|
priv->foreground_set = FALSE;
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (G_OBJECT (celltext), text_cell_renderer_props[PROP_FOREGROUND_SET]);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2001-09-25 20:40:20 +00:00
|
|
|
|
static PangoFontMask
|
|
|
|
|
set_font_desc_fields (PangoFontDescription *desc,
|
|
|
|
|
PangoFontMask to_set)
|
|
|
|
|
{
|
|
|
|
|
PangoFontMask changed_mask = 0;
|
|
|
|
|
|
|
|
|
|
if (to_set & PANGO_FONT_MASK_FAMILY)
|
|
|
|
|
{
|
|
|
|
|
const char *family = pango_font_description_get_family (desc);
|
|
|
|
|
if (!family)
|
|
|
|
|
{
|
|
|
|
|
family = "sans";
|
|
|
|
|
changed_mask |= PANGO_FONT_MASK_FAMILY;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pango_font_description_set_family (desc, family);
|
|
|
|
|
}
|
|
|
|
|
if (to_set & PANGO_FONT_MASK_STYLE)
|
|
|
|
|
pango_font_description_set_style (desc, pango_font_description_get_style (desc));
|
|
|
|
|
if (to_set & PANGO_FONT_MASK_VARIANT)
|
|
|
|
|
pango_font_description_set_variant (desc, pango_font_description_get_variant (desc));
|
|
|
|
|
if (to_set & PANGO_FONT_MASK_WEIGHT)
|
|
|
|
|
pango_font_description_set_weight (desc, pango_font_description_get_weight (desc));
|
|
|
|
|
if (to_set & PANGO_FONT_MASK_STRETCH)
|
|
|
|
|
pango_font_description_set_stretch (desc, pango_font_description_get_stretch (desc));
|
|
|
|
|
if (to_set & PANGO_FONT_MASK_SIZE)
|
|
|
|
|
{
|
2020-07-24 13:54:49 +00:00
|
|
|
|
int size = pango_font_description_get_size (desc);
|
2001-09-25 20:40:20 +00:00
|
|
|
|
if (size <= 0)
|
|
|
|
|
{
|
|
|
|
|
size = 10 * PANGO_SCALE;
|
|
|
|
|
changed_mask |= PANGO_FONT_MASK_SIZE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pango_font_description_set_size (desc, size);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return changed_mask;
|
|
|
|
|
}
|
|
|
|
|
|
2001-09-18 20:06:48 +00:00
|
|
|
|
static void
|
|
|
|
|
notify_set_changed (GObject *object,
|
|
|
|
|
PangoFontMask changed_mask)
|
|
|
|
|
{
|
|
|
|
|
if (changed_mask & PANGO_FONT_MASK_FAMILY)
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (object, text_cell_renderer_props[PROP_FAMILY_SET]);
|
2001-09-18 20:06:48 +00:00
|
|
|
|
if (changed_mask & PANGO_FONT_MASK_STYLE)
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (object, text_cell_renderer_props[PROP_STYLE_SET]);
|
2001-09-18 20:06:48 +00:00
|
|
|
|
if (changed_mask & PANGO_FONT_MASK_VARIANT)
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (object, text_cell_renderer_props[PROP_VARIANT_SET]);
|
2001-09-18 20:06:48 +00:00
|
|
|
|
if (changed_mask & PANGO_FONT_MASK_WEIGHT)
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (object, text_cell_renderer_props[PROP_WEIGHT_SET]);
|
2001-09-18 20:06:48 +00:00
|
|
|
|
if (changed_mask & PANGO_FONT_MASK_STRETCH)
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (object, text_cell_renderer_props[PROP_STRETCH_SET]);
|
2001-09-18 20:06:48 +00:00
|
|
|
|
if (changed_mask & PANGO_FONT_MASK_SIZE)
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (object, text_cell_renderer_props[PROP_SIZE_SET]);
|
2001-09-18 20:06:48 +00:00
|
|
|
|
}
|
|
|
|
|
|
2001-09-25 20:40:20 +00:00
|
|
|
|
static void
|
|
|
|
|
notify_fields_changed (GObject *object,
|
|
|
|
|
PangoFontMask changed_mask)
|
|
|
|
|
{
|
|
|
|
|
if (changed_mask & PANGO_FONT_MASK_FAMILY)
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (object, text_cell_renderer_props[PROP_FAMILY]);
|
2001-09-25 20:40:20 +00:00
|
|
|
|
if (changed_mask & PANGO_FONT_MASK_STYLE)
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (object, text_cell_renderer_props[PROP_STYLE]);
|
2001-09-25 20:40:20 +00:00
|
|
|
|
if (changed_mask & PANGO_FONT_MASK_VARIANT)
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (object, text_cell_renderer_props[PROP_VARIANT]);
|
2001-09-25 20:40:20 +00:00
|
|
|
|
if (changed_mask & PANGO_FONT_MASK_WEIGHT)
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (object, text_cell_renderer_props[PROP_WEIGHT]);
|
2001-09-25 20:40:20 +00:00
|
|
|
|
if (changed_mask & PANGO_FONT_MASK_STRETCH)
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (object, text_cell_renderer_props[PROP_STRETCH]);
|
2001-09-25 20:40:20 +00:00
|
|
|
|
if (changed_mask & PANGO_FONT_MASK_SIZE)
|
2015-09-06 19:31:37 +00:00
|
|
|
|
{
|
|
|
|
|
g_object_notify_by_pspec (object, text_cell_renderer_props[PROP_SIZE]);
|
|
|
|
|
g_object_notify_by_pspec (object, text_cell_renderer_props[PROP_SIZE_POINTS]);
|
|
|
|
|
}
|
2001-09-25 20:40:20 +00:00
|
|
|
|
}
|
|
|
|
|
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
static void
|
|
|
|
|
set_font_description (GtkCellRendererText *celltext,
|
|
|
|
|
PangoFontDescription *font_desc)
|
|
|
|
|
{
|
2019-05-27 00:27:36 +00:00
|
|
|
|
GtkCellRendererTextPrivate *priv = gtk_cell_renderer_text_get_instance_private (celltext);
|
2001-09-18 20:06:48 +00:00
|
|
|
|
GObject *object = G_OBJECT (celltext);
|
|
|
|
|
PangoFontDescription *new_font_desc;
|
|
|
|
|
PangoFontMask old_mask, new_mask, changed_mask, set_changed_mask;
|
2015-09-06 19:31:37 +00:00
|
|
|
|
|
2001-09-18 20:06:48 +00:00
|
|
|
|
if (font_desc)
|
|
|
|
|
new_font_desc = pango_font_description_copy (font_desc);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
else
|
2001-09-18 20:06:48 +00:00
|
|
|
|
new_font_desc = pango_font_description_new ();
|
|
|
|
|
|
2010-06-01 18:45:11 +00:00
|
|
|
|
old_mask = pango_font_description_get_set_fields (priv->font);
|
2001-09-18 20:06:48 +00:00
|
|
|
|
new_mask = pango_font_description_get_set_fields (new_font_desc);
|
|
|
|
|
|
|
|
|
|
changed_mask = old_mask | new_mask;
|
|
|
|
|
set_changed_mask = old_mask ^ new_mask;
|
|
|
|
|
|
2010-06-01 18:45:11 +00:00
|
|
|
|
pango_font_description_free (priv->font);
|
|
|
|
|
priv->font = new_font_desc;
|
2015-09-06 19:31:37 +00:00
|
|
|
|
|
2001-09-18 20:06:48 +00:00
|
|
|
|
g_object_freeze_notify (object);
|
|
|
|
|
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (object, text_cell_renderer_props[PROP_FONT_DESC]);
|
|
|
|
|
g_object_notify_by_pspec (object, text_cell_renderer_props[PROP_FONT]);
|
2001-09-18 20:06:48 +00:00
|
|
|
|
|
2015-09-06 19:31:37 +00:00
|
|
|
|
notify_fields_changed (object, changed_mask);
|
2001-09-18 20:06:48 +00:00
|
|
|
|
notify_set_changed (object, set_changed_mask);
|
2015-09-06 19:31:37 +00:00
|
|
|
|
|
2001-09-18 20:06:48 +00:00
|
|
|
|
g_object_thaw_notify (object);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
}
|
|
|
|
|
|
2000-10-05 01:04:57 +00:00
|
|
|
|
static void
|
2000-12-12 07:32:32 +00:00
|
|
|
|
gtk_cell_renderer_text_set_property (GObject *object,
|
|
|
|
|
guint param_id,
|
|
|
|
|
const GValue *value,
|
2001-03-07 14:49:21 +00:00
|
|
|
|
GParamSpec *pspec)
|
2000-10-05 01:04:57 +00:00
|
|
|
|
{
|
|
|
|
|
GtkCellRendererText *celltext = GTK_CELL_RENDERER_TEXT (object);
|
2019-05-27 00:27:36 +00:00
|
|
|
|
GtkCellRendererTextPrivate *priv = gtk_cell_renderer_text_get_instance_private (celltext);
|
2000-10-05 01:04:57 +00:00
|
|
|
|
|
|
|
|
|
switch (param_id)
|
|
|
|
|
{
|
|
|
|
|
case PROP_TEXT:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
g_free (priv->text);
|
2003-12-18 16:55:58 +00:00
|
|
|
|
|
|
|
|
|
if (priv->markup_set)
|
|
|
|
|
{
|
2010-06-01 18:45:11 +00:00
|
|
|
|
if (priv->extra_attrs)
|
|
|
|
|
pango_attr_list_unref (priv->extra_attrs);
|
|
|
|
|
priv->extra_attrs = NULL;
|
2003-12-18 16:55:58 +00:00
|
|
|
|
priv->markup_set = FALSE;
|
|
|
|
|
}
|
|
|
|
|
|
2010-06-01 18:45:11 +00:00
|
|
|
|
priv->text = g_value_dup_string (value);
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (object, pspec);
|
2000-10-05 01:04:57 +00:00
|
|
|
|
break;
|
2001-07-27 15:34:42 +00:00
|
|
|
|
|
|
|
|
|
case PROP_ATTRIBUTES:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
if (priv->extra_attrs)
|
|
|
|
|
pango_attr_list_unref (priv->extra_attrs);
|
2001-07-27 15:34:42 +00:00
|
|
|
|
|
2010-06-01 18:45:11 +00:00
|
|
|
|
priv->extra_attrs = g_value_get_boxed (value);
|
|
|
|
|
if (priv->extra_attrs)
|
|
|
|
|
pango_attr_list_ref (priv->extra_attrs);
|
2001-07-27 15:34:42 +00:00
|
|
|
|
break;
|
2001-02-20 16:16:22 +00:00
|
|
|
|
case PROP_MARKUP:
|
|
|
|
|
{
|
2020-07-24 18:40:36 +00:00
|
|
|
|
const char *str;
|
|
|
|
|
char *text = NULL;
|
2001-02-20 16:16:22 +00:00
|
|
|
|
GError *error = NULL;
|
|
|
|
|
PangoAttrList *attrs = NULL;
|
|
|
|
|
|
|
|
|
|
str = g_value_get_string (value);
|
2015-09-06 19:31:37 +00:00
|
|
|
|
if (str && !pango_parse_markup (str, -1, 0, &attrs, &text, NULL, &error))
|
2001-02-20 16:16:22 +00:00
|
|
|
|
{
|
2006-07-06 05:14:03 +00:00
|
|
|
|
g_warning ("Failed to set text from markup due to error parsing markup: %s",
|
2001-02-20 16:16:22 +00:00
|
|
|
|
error->message);
|
|
|
|
|
g_error_free (error);
|
|
|
|
|
return;
|
|
|
|
|
}
|
2003-07-12 14:04:42 +00:00
|
|
|
|
|
2010-06-01 18:45:11 +00:00
|
|
|
|
g_free (priv->text);
|
2003-07-12 14:04:42 +00:00
|
|
|
|
|
2010-06-01 18:45:11 +00:00
|
|
|
|
if (priv->extra_attrs)
|
|
|
|
|
pango_attr_list_unref (priv->extra_attrs);
|
2003-07-12 14:04:42 +00:00
|
|
|
|
|
2010-06-01 18:45:11 +00:00
|
|
|
|
priv->text = text;
|
|
|
|
|
priv->extra_attrs = attrs;
|
2003-12-18 16:55:58 +00:00
|
|
|
|
priv->markup_set = TRUE;
|
2001-02-20 16:16:22 +00:00
|
|
|
|
}
|
|
|
|
|
break;
|
2003-12-17 23:30:36 +00:00
|
|
|
|
|
|
|
|
|
case PROP_SINGLE_PARAGRAPH_MODE:
|
2014-06-08 15:28:12 +00:00
|
|
|
|
if (priv->single_paragraph != g_value_get_boolean (value))
|
|
|
|
|
{
|
|
|
|
|
priv->single_paragraph = g_value_get_boolean (value);
|
|
|
|
|
g_object_notify_by_pspec (object, pspec);
|
|
|
|
|
}
|
2003-12-17 23:30:36 +00:00
|
|
|
|
break;
|
2015-09-06 19:31:37 +00:00
|
|
|
|
|
2000-10-05 01:04:57 +00:00
|
|
|
|
case PROP_BACKGROUND:
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
{
|
2010-10-22 16:33:07 +00:00
|
|
|
|
GdkRGBA rgba;
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2001-02-28 00:35:25 +00:00
|
|
|
|
if (!g_value_get_string (value))
|
2007-12-28 05:32:55 +00:00
|
|
|
|
set_bg_color (celltext, NULL); /* reset to background_set to FALSE */
|
2010-11-28 18:49:47 +00:00
|
|
|
|
else if (gdk_rgba_parse (&rgba, g_value_get_string (value)))
|
2010-10-22 16:33:07 +00:00
|
|
|
|
set_bg_color (celltext, &rgba);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
else
|
2015-09-20 06:32:48 +00:00
|
|
|
|
g_warning ("Don't know color '%s'", g_value_get_string (value));
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
}
|
2000-10-05 01:04:57 +00:00
|
|
|
|
break;
|
2015-09-06 19:31:37 +00:00
|
|
|
|
|
2000-10-05 01:04:57 +00:00
|
|
|
|
case PROP_FOREGROUND:
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
{
|
2010-10-22 16:33:07 +00:00
|
|
|
|
GdkRGBA rgba;
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2001-02-28 00:35:25 +00:00
|
|
|
|
if (!g_value_get_string (value))
|
|
|
|
|
set_fg_color (celltext, NULL); /* reset to foreground_set to FALSE */
|
2010-11-28 18:49:47 +00:00
|
|
|
|
else if (gdk_rgba_parse (&rgba, g_value_get_string (value)))
|
2010-10-22 16:33:07 +00:00
|
|
|
|
set_fg_color (celltext, &rgba);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
else
|
2015-09-20 06:32:48 +00:00
|
|
|
|
g_warning ("Don't know color '%s'", g_value_get_string (value));
|
2010-10-22 16:33:07 +00:00
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PROP_BACKGROUND_RGBA:
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
set_bg_color (celltext, g_value_get_boxed (value));
|
2000-10-05 01:04:57 +00:00
|
|
|
|
break;
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2010-10-22 16:33:07 +00:00
|
|
|
|
case PROP_FOREGROUND_RGBA:
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
set_fg_color (celltext, g_value_get_boxed (value));
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PROP_FONT:
|
|
|
|
|
{
|
|
|
|
|
PangoFontDescription *font_desc = NULL;
|
2020-07-24 18:40:36 +00:00
|
|
|
|
const char *name;
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
|
|
|
|
name = g_value_get_string (value);
|
|
|
|
|
|
|
|
|
|
if (name)
|
|
|
|
|
font_desc = pango_font_description_from_string (name);
|
|
|
|
|
|
|
|
|
|
set_font_description (celltext, font_desc);
|
2004-03-15 18:53:37 +00:00
|
|
|
|
|
|
|
|
|
pango_font_description_free (font_desc);
|
2015-09-06 19:31:37 +00:00
|
|
|
|
|
2010-06-01 18:45:11 +00:00
|
|
|
|
if (priv->fixed_height_rows != -1)
|
|
|
|
|
priv->calc_fixed_height = TRUE;
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PROP_FONT_DESC:
|
|
|
|
|
set_font_description (celltext, g_value_get_boxed (value));
|
2015-09-06 19:31:37 +00:00
|
|
|
|
|
2010-06-01 18:45:11 +00:00
|
|
|
|
if (priv->fixed_height_rows != -1)
|
|
|
|
|
priv->calc_fixed_height = TRUE;
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PROP_FAMILY:
|
|
|
|
|
case PROP_STYLE:
|
|
|
|
|
case PROP_VARIANT:
|
|
|
|
|
case PROP_WEIGHT:
|
|
|
|
|
case PROP_STRETCH:
|
|
|
|
|
case PROP_SIZE:
|
2001-09-18 20:06:48 +00:00
|
|
|
|
case PROP_SIZE_POINTS:
|
|
|
|
|
{
|
2010-06-01 18:45:11 +00:00
|
|
|
|
PangoFontMask old_set_mask = pango_font_description_get_set_fields (priv->font);
|
2015-09-06 19:31:37 +00:00
|
|
|
|
|
2001-09-18 20:06:48 +00:00
|
|
|
|
switch (param_id)
|
|
|
|
|
{
|
|
|
|
|
case PROP_FAMILY:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
pango_font_description_set_family (priv->font,
|
2001-09-18 20:06:48 +00:00
|
|
|
|
g_value_get_string (value));
|
|
|
|
|
break;
|
|
|
|
|
case PROP_STYLE:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
pango_font_description_set_style (priv->font,
|
2001-09-18 20:06:48 +00:00
|
|
|
|
g_value_get_enum (value));
|
|
|
|
|
break;
|
|
|
|
|
case PROP_VARIANT:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
pango_font_description_set_variant (priv->font,
|
2001-09-18 20:06:48 +00:00
|
|
|
|
g_value_get_enum (value));
|
|
|
|
|
break;
|
|
|
|
|
case PROP_WEIGHT:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
pango_font_description_set_weight (priv->font,
|
2001-09-30 05:11:09 +00:00
|
|
|
|
g_value_get_int (value));
|
2001-09-18 20:06:48 +00:00
|
|
|
|
break;
|
|
|
|
|
case PROP_STRETCH:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
pango_font_description_set_stretch (priv->font,
|
2001-09-18 20:06:48 +00:00
|
|
|
|
g_value_get_enum (value));
|
|
|
|
|
break;
|
|
|
|
|
case PROP_SIZE:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
pango_font_description_set_size (priv->font,
|
2001-09-18 20:06:48 +00:00
|
|
|
|
g_value_get_int (value));
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (object, pspec);
|
2001-09-18 20:06:48 +00:00
|
|
|
|
break;
|
|
|
|
|
case PROP_SIZE_POINTS:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
pango_font_description_set_size (priv->font,
|
2001-09-18 20:06:48 +00:00
|
|
|
|
g_value_get_double (value) * PANGO_SCALE);
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (object, pspec);
|
2001-09-18 20:06:48 +00:00
|
|
|
|
break;
|
2017-10-06 19:19:42 +00:00
|
|
|
|
default:
|
|
|
|
|
break;
|
2001-09-18 20:06:48 +00:00
|
|
|
|
}
|
2015-09-06 19:31:37 +00:00
|
|
|
|
|
2010-06-01 18:45:11 +00:00
|
|
|
|
if (priv->fixed_height_rows != -1)
|
|
|
|
|
priv->calc_fixed_height = TRUE;
|
2015-09-06 19:31:37 +00:00
|
|
|
|
|
2010-06-01 18:45:11 +00:00
|
|
|
|
notify_set_changed (object, old_set_mask & pango_font_description_get_set_fields (priv->font));
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (object, text_cell_renderer_props[PROP_FONT_DESC]);
|
|
|
|
|
g_object_notify_by_pspec (object, text_cell_renderer_props[PROP_FONT]);
|
2001-09-19 00:58:09 +00:00
|
|
|
|
|
|
|
|
|
break;
|
2001-09-18 20:06:48 +00:00
|
|
|
|
}
|
2015-09-06 19:31:37 +00:00
|
|
|
|
|
2001-05-07 15:58:47 +00:00
|
|
|
|
case PROP_SCALE:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
priv->font_scale = g_value_get_double (value);
|
|
|
|
|
priv->scale_set = TRUE;
|
|
|
|
|
if (priv->fixed_height_rows != -1)
|
|
|
|
|
priv->calc_fixed_height = TRUE;
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (object, text_cell_renderer_props[PROP_SCALE_SET]);
|
2001-05-07 15:58:47 +00:00
|
|
|
|
break;
|
2015-09-06 19:31:37 +00:00
|
|
|
|
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
case PROP_EDITABLE:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
priv->editable = g_value_get_boolean (value);
|
|
|
|
|
priv->editable_set = TRUE;
|
|
|
|
|
if (priv->editable)
|
2010-05-30 20:38:33 +00:00
|
|
|
|
g_object_set (celltext, "mode", GTK_CELL_RENDERER_MODE_EDITABLE, NULL);
|
2002-04-13 20:48:31 +00:00
|
|
|
|
else
|
2010-05-30 20:38:33 +00:00
|
|
|
|
g_object_set (celltext, "mode", GTK_CELL_RENDERER_MODE_INERT, NULL);
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (object, text_cell_renderer_props[PROP_EDITABLE_SET]);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
break;
|
|
|
|
|
|
2000-10-05 01:04:57 +00:00
|
|
|
|
case PROP_STRIKETHROUGH:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
priv->strikethrough = g_value_get_boolean (value);
|
|
|
|
|
priv->strikethrough_set = TRUE;
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (object, text_cell_renderer_props[PROP_STRIKETHROUGH_SET]);
|
2000-10-05 01:04:57 +00:00
|
|
|
|
break;
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2000-10-05 01:04:57 +00:00
|
|
|
|
case PROP_UNDERLINE:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
priv->underline_style = g_value_get_enum (value);
|
|
|
|
|
priv->underline_set = TRUE;
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (object, text_cell_renderer_props[PROP_UNDERLINE_SET]);
|
|
|
|
|
|
2000-10-05 01:04:57 +00:00
|
|
|
|
break;
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
|
|
|
|
case PROP_RISE:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
priv->rise = g_value_get_int (value);
|
|
|
|
|
priv->rise_set = TRUE;
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (object, text_cell_renderer_props[PROP_RISE_SET]);
|
2010-06-01 18:45:11 +00:00
|
|
|
|
if (priv->fixed_height_rows != -1)
|
|
|
|
|
priv->calc_fixed_height = TRUE;
|
2015-09-06 19:31:37 +00:00
|
|
|
|
break;
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2003-12-18 00:44:37 +00:00
|
|
|
|
case PROP_LANGUAGE:
|
|
|
|
|
priv->language_set = TRUE;
|
|
|
|
|
if (priv->language)
|
|
|
|
|
g_object_unref (priv->language);
|
|
|
|
|
priv->language = pango_language_from_string (g_value_get_string (value));
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (object, text_cell_renderer_props[PROP_LANGUAGE_SET]);
|
2003-12-18 00:44:37 +00:00
|
|
|
|
break;
|
|
|
|
|
|
2004-07-22 05:45:19 +00:00
|
|
|
|
case PROP_ELLIPSIZE:
|
|
|
|
|
priv->ellipsize = g_value_get_enum (value);
|
|
|
|
|
priv->ellipsize_set = TRUE;
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (object, text_cell_renderer_props[PROP_ELLIPSIZE_SET]);
|
2004-07-22 05:45:19 +00:00
|
|
|
|
break;
|
2015-09-06 19:31:37 +00:00
|
|
|
|
|
2005-01-20 18:47:58 +00:00
|
|
|
|
case PROP_WRAP_MODE:
|
2014-06-08 15:28:12 +00:00
|
|
|
|
if (priv->wrap_mode != g_value_get_enum (value))
|
|
|
|
|
{
|
|
|
|
|
priv->wrap_mode = g_value_get_enum (value);
|
|
|
|
|
g_object_notify_by_pspec (object, pspec);
|
|
|
|
|
}
|
2005-01-20 18:47:58 +00:00
|
|
|
|
break;
|
2015-09-06 19:31:37 +00:00
|
|
|
|
|
2005-01-20 18:47:58 +00:00
|
|
|
|
case PROP_WRAP_WIDTH:
|
2014-06-08 15:28:12 +00:00
|
|
|
|
if (priv->wrap_width != g_value_get_int (value))
|
|
|
|
|
{
|
|
|
|
|
priv->wrap_width = g_value_get_int (value);
|
|
|
|
|
g_object_notify_by_pspec (object, pspec);
|
|
|
|
|
}
|
2005-01-20 18:47:58 +00:00
|
|
|
|
break;
|
2015-09-06 19:31:37 +00:00
|
|
|
|
|
2004-12-13 16:12:39 +00:00
|
|
|
|
case PROP_WIDTH_CHARS:
|
2014-06-08 15:28:12 +00:00
|
|
|
|
if (priv->width_chars != g_value_get_int (value))
|
|
|
|
|
{
|
|
|
|
|
priv->width_chars = g_value_get_int (value);
|
|
|
|
|
g_object_notify_by_pspec (object, pspec);
|
|
|
|
|
}
|
2015-09-06 19:31:37 +00:00
|
|
|
|
break;
|
2005-01-20 18:47:58 +00:00
|
|
|
|
|
2010-08-20 23:23:00 +00:00
|
|
|
|
case PROP_MAX_WIDTH_CHARS:
|
2014-06-08 15:28:12 +00:00
|
|
|
|
if (priv->max_width_chars != g_value_get_int (value))
|
|
|
|
|
{
|
|
|
|
|
priv->max_width_chars = g_value_get_int (value);
|
|
|
|
|
g_object_notify_by_pspec (object, pspec);
|
|
|
|
|
}
|
2015-09-06 19:31:37 +00:00
|
|
|
|
break;
|
2010-08-20 23:23:00 +00:00
|
|
|
|
|
2006-03-14 19:44:59 +00:00
|
|
|
|
case PROP_ALIGN:
|
2014-06-07 18:07:55 +00:00
|
|
|
|
if (priv->align != g_value_get_enum (value))
|
|
|
|
|
{
|
|
|
|
|
priv->align = g_value_get_enum (value);
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (object, pspec);
|
2014-06-07 18:07:55 +00:00
|
|
|
|
}
|
2006-07-19 16:27:10 +00:00
|
|
|
|
priv->align_set = TRUE;
|
2015-09-06 19:31:37 +00:00
|
|
|
|
g_object_notify_by_pspec (object, text_cell_renderer_props[PROP_ALIGN_SET]);
|
2006-03-14 19:44:59 +00:00
|
|
|
|
break;
|
|
|
|
|
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
case PROP_BACKGROUND_SET:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
priv->background_set = g_value_get_boolean (value);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PROP_FOREGROUND_SET:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
priv->foreground_set = g_value_get_boolean (value);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PROP_FAMILY_SET:
|
|
|
|
|
case PROP_STYLE_SET:
|
|
|
|
|
case PROP_VARIANT_SET:
|
|
|
|
|
case PROP_WEIGHT_SET:
|
|
|
|
|
case PROP_STRETCH_SET:
|
|
|
|
|
case PROP_SIZE_SET:
|
2001-09-18 20:06:48 +00:00
|
|
|
|
if (!g_value_get_boolean (value))
|
2001-09-25 20:40:20 +00:00
|
|
|
|
{
|
2010-06-01 18:45:11 +00:00
|
|
|
|
pango_font_description_unset_fields (priv->font,
|
2001-09-25 20:40:20 +00:00
|
|
|
|
get_property_font_set_mask (param_id));
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
PangoFontMask changed_mask;
|
2015-09-06 19:31:37 +00:00
|
|
|
|
|
2010-06-01 18:45:11 +00:00
|
|
|
|
changed_mask = set_font_desc_fields (priv->font,
|
2001-09-25 20:40:20 +00:00
|
|
|
|
get_property_font_set_mask (param_id));
|
|
|
|
|
notify_fields_changed (G_OBJECT (celltext), changed_mask);
|
|
|
|
|
}
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
break;
|
|
|
|
|
|
2001-05-07 15:58:47 +00:00
|
|
|
|
case PROP_SCALE_SET:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
priv->scale_set = g_value_get_boolean (value);
|
2001-05-07 15:58:47 +00:00
|
|
|
|
break;
|
2015-09-06 19:31:37 +00:00
|
|
|
|
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
case PROP_EDITABLE_SET:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
priv->editable_set = g_value_get_boolean (value);
|
2000-10-05 01:04:57 +00:00
|
|
|
|
break;
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
|
|
|
|
case PROP_STRIKETHROUGH_SET:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
priv->strikethrough_set = g_value_get_boolean (value);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PROP_UNDERLINE_SET:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
priv->underline_set = g_value_get_boolean (value);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
break;
|
|
|
|
|
|
2001-03-05 19:55:30 +00:00
|
|
|
|
case PROP_RISE_SET:
|
2010-06-01 18:45:11 +00:00
|
|
|
|
priv->rise_set = g_value_get_boolean (value);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
break;
|
|
|
|
|
|
2003-12-18 00:44:37 +00:00
|
|
|
|
case PROP_LANGUAGE_SET:
|
|
|
|
|
priv->language_set = g_value_get_boolean (value);
|
|
|
|
|
break;
|
|
|
|
|
|
2004-07-22 05:45:19 +00:00
|
|
|
|
case PROP_ELLIPSIZE_SET:
|
2004-12-30 05:11:03 +00:00
|
|
|
|
priv->ellipsize_set = g_value_get_boolean (value);
|
2004-07-22 05:45:19 +00:00
|
|
|
|
break;
|
2006-09-24 17:12:00 +00:00
|
|
|
|
|
|
|
|
|
case PROP_ALIGN_SET:
|
|
|
|
|
priv->align_set = g_value_get_boolean (value);
|
|
|
|
|
break;
|
2012-05-04 03:25:08 +00:00
|
|
|
|
|
|
|
|
|
case PROP_PLACEHOLDER_TEXT:
|
|
|
|
|
g_free (priv->placeholder_text);
|
|
|
|
|
priv->placeholder_text = g_value_dup_string (value);
|
|
|
|
|
break;
|
|
|
|
|
|
2000-10-05 01:04:57 +00:00
|
|
|
|
default:
|
2000-12-12 07:32:32 +00:00
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
|
2000-10-05 01:04:57 +00:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2001-02-03 01:09:41 +00:00
|
|
|
|
/**
|
|
|
|
|
* gtk_cell_renderer_text_new:
|
|
|
|
|
*
|
|
|
|
|
* Creates a new #GtkCellRendererText. Adjust how text is drawn using
|
|
|
|
|
* object properties. Object properties can be
|
|
|
|
|
* set globally (with g_object_set()). Also, with #GtkTreeViewColumn,
|
|
|
|
|
* you can bind a property to a value in a #GtkTreeModel. For example,
|
2014-02-05 18:07:34 +00:00
|
|
|
|
* you can bind the “text” property on the cell renderer to a string
|
2001-02-03 01:09:41 +00:00
|
|
|
|
* value in the model, thus rendering a different string in each row
|
|
|
|
|
* of the #GtkTreeView
|
|
|
|
|
*
|
2014-02-19 23:49:43 +00:00
|
|
|
|
* Returns: the new cell renderer
|
2001-02-03 01:09:41 +00:00
|
|
|
|
**/
|
2000-10-05 01:04:57 +00:00
|
|
|
|
GtkCellRenderer *
|
|
|
|
|
gtk_cell_renderer_text_new (void)
|
|
|
|
|
{
|
2002-10-07 01:38:40 +00:00
|
|
|
|
return g_object_new (GTK_TYPE_CELL_RENDERER_TEXT, NULL);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
}
|
|
|
|
|
|
2012-05-04 03:25:08 +00:00
|
|
|
|
static inline gboolean
|
|
|
|
|
show_placeholder_text (GtkCellRendererText *celltext)
|
|
|
|
|
{
|
2019-05-27 00:27:36 +00:00
|
|
|
|
GtkCellRendererTextPrivate *priv = gtk_cell_renderer_text_get_instance_private (celltext);
|
2012-05-04 03:25:08 +00:00
|
|
|
|
|
|
|
|
|
return priv->editable && priv->placeholder_text &&
|
|
|
|
|
(!priv->text || !priv->text[0]);
|
|
|
|
|
}
|
|
|
|
|
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
static void
|
|
|
|
|
add_attr (PangoAttrList *attr_list,
|
|
|
|
|
PangoAttribute *attr)
|
|
|
|
|
{
|
|
|
|
|
attr->start_index = 0;
|
|
|
|
|
attr->end_index = G_MAXINT;
|
|
|
|
|
|
|
|
|
|
pango_attr_list_insert (attr_list, attr);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static PangoLayout*
|
|
|
|
|
get_layout (GtkCellRendererText *celltext,
|
|
|
|
|
GtkWidget *widget,
|
2010-08-21 11:18:14 +00:00
|
|
|
|
const GdkRectangle *cell_area,
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
GtkCellRendererState flags)
|
|
|
|
|
{
|
2019-05-27 00:27:36 +00:00
|
|
|
|
GtkCellRendererTextPrivate *priv = gtk_cell_renderer_text_get_instance_private (celltext);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
PangoAttrList *attr_list;
|
|
|
|
|
PangoLayout *layout;
|
|
|
|
|
PangoUnderline uline;
|
2020-07-24 13:54:49 +00:00
|
|
|
|
int xpad;
|
2012-05-04 03:25:08 +00:00
|
|
|
|
gboolean placeholder_layout = show_placeholder_text (celltext);
|
2003-12-17 23:30:36 +00:00
|
|
|
|
|
2012-05-04 03:25:08 +00:00
|
|
|
|
layout = gtk_widget_create_pango_layout (widget, placeholder_layout ?
|
|
|
|
|
priv->placeholder_text : priv->text);
|
2001-02-20 16:16:22 +00:00
|
|
|
|
|
2010-08-18 23:36:51 +00:00
|
|
|
|
gtk_cell_renderer_get_padding (GTK_CELL_RENDERER (celltext), &xpad, NULL);
|
|
|
|
|
|
2010-06-01 18:45:11 +00:00
|
|
|
|
if (priv->extra_attrs)
|
|
|
|
|
attr_list = pango_attr_list_copy (priv->extra_attrs);
|
2001-02-20 16:16:22 +00:00
|
|
|
|
else
|
|
|
|
|
attr_list = pango_attr_list_new ();
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2003-12-17 23:30:36 +00:00
|
|
|
|
pango_layout_set_single_paragraph_mode (layout, priv->single_paragraph);
|
|
|
|
|
|
2012-05-04 03:25:08 +00:00
|
|
|
|
if (!placeholder_layout && cell_area)
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
{
|
|
|
|
|
/* Add options that affect appearance but not size */
|
|
|
|
|
|
|
|
|
|
/* note that background doesn't go here, since it affects
|
|
|
|
|
* background_area not the PangoLayout area
|
|
|
|
|
*/
|
|
|
|
|
|
2010-06-01 18:45:11 +00:00
|
|
|
|
if (priv->foreground_set
|
2004-11-16 05:19:21 +00:00
|
|
|
|
&& (flags & GTK_CELL_RENDERER_SELECTED) == 0)
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
{
|
|
|
|
|
PangoColor color;
|
2015-08-15 15:07:54 +00:00
|
|
|
|
guint16 alpha;
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2015-08-15 15:07:54 +00:00
|
|
|
|
color.red = CLAMP (priv->foreground.red * 65535. + 0.5, 0, 65535);
|
|
|
|
|
color.green = CLAMP (priv->foreground.green * 65535. + 0.5, 0, 65535);
|
|
|
|
|
color.blue = CLAMP (priv->foreground.blue * 65535. + 0.5, 0, 65535);
|
|
|
|
|
alpha = CLAMP (priv->foreground.alpha * 65535. + 0.5, 0, 65535);
|
2010-10-22 16:33:07 +00:00
|
|
|
|
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
add_attr (attr_list,
|
|
|
|
|
pango_attr_foreground_new (color.red, color.green, color.blue));
|
2015-08-15 15:07:54 +00:00
|
|
|
|
|
|
|
|
|
add_attr (attr_list, pango_attr_foreground_alpha_new (alpha));
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
}
|
|
|
|
|
|
2010-06-01 18:45:11 +00:00
|
|
|
|
if (priv->strikethrough_set)
|
2015-08-15 15:07:54 +00:00
|
|
|
|
add_attr (attr_list, pango_attr_strikethrough_new (priv->strikethrough));
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
}
|
2012-05-04 03:25:08 +00:00
|
|
|
|
else if (placeholder_layout)
|
|
|
|
|
{
|
|
|
|
|
PangoColor color;
|
2015-08-15 15:07:54 +00:00
|
|
|
|
guint16 alpha;
|
2012-05-04 03:25:08 +00:00
|
|
|
|
GtkStyleContext *context;
|
2015-08-15 15:07:54 +00:00
|
|
|
|
GdkRGBA fg = { 0.5, 0.5, 0.5, 1.0 };
|
2012-05-04 03:25:08 +00:00
|
|
|
|
|
|
|
|
|
context = gtk_widget_get_style_context (widget);
|
|
|
|
|
gtk_style_context_lookup_color (context, "placeholder_text_color", &fg);
|
|
|
|
|
|
|
|
|
|
color.red = CLAMP (fg.red * 65535. + 0.5, 0, 65535);
|
|
|
|
|
color.green = CLAMP (fg.green * 65535. + 0.5, 0, 65535);
|
|
|
|
|
color.blue = CLAMP (fg.blue * 65535. + 0.5, 0, 65535);
|
2015-08-15 15:07:54 +00:00
|
|
|
|
alpha = CLAMP (fg.alpha * 65535. + 0.5, 0, 65535);
|
2012-05-04 03:25:08 +00:00
|
|
|
|
|
|
|
|
|
add_attr (attr_list,
|
|
|
|
|
pango_attr_foreground_new (color.red, color.green, color.blue));
|
2015-08-15 15:07:54 +00:00
|
|
|
|
|
|
|
|
|
add_attr (attr_list, pango_attr_foreground_alpha_new (alpha));
|
2012-05-04 03:25:08 +00:00
|
|
|
|
}
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2010-06-01 18:45:11 +00:00
|
|
|
|
add_attr (attr_list, pango_attr_font_desc_new (priv->font));
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2010-06-01 18:45:11 +00:00
|
|
|
|
if (priv->scale_set &&
|
|
|
|
|
priv->font_scale != 1.0)
|
|
|
|
|
add_attr (attr_list, pango_attr_scale_new (priv->font_scale));
|
2015-08-15 15:07:54 +00:00
|
|
|
|
|
2010-06-01 18:45:11 +00:00
|
|
|
|
if (priv->underline_set)
|
|
|
|
|
uline = priv->underline_style;
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
else
|
|
|
|
|
uline = PANGO_UNDERLINE_NONE;
|
2003-12-18 00:44:37 +00:00
|
|
|
|
|
|
|
|
|
if (priv->language_set)
|
|
|
|
|
add_attr (attr_list, pango_attr_language_new (priv->language));
|
2015-08-15 15:07:54 +00:00
|
|
|
|
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
if ((flags & GTK_CELL_RENDERER_PRELIT) == GTK_CELL_RENDERER_PRELIT)
|
|
|
|
|
{
|
|
|
|
|
switch (uline)
|
|
|
|
|
{
|
|
|
|
|
case PANGO_UNDERLINE_NONE:
|
|
|
|
|
uline = PANGO_UNDERLINE_SINGLE;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PANGO_UNDERLINE_SINGLE:
|
|
|
|
|
uline = PANGO_UNDERLINE_DOUBLE;
|
|
|
|
|
break;
|
|
|
|
|
|
2019-11-04 23:14:44 +00:00
|
|
|
|
case PANGO_UNDERLINE_SINGLE_LINE:
|
|
|
|
|
uline = PANGO_UNDERLINE_DOUBLE_LINE;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case PANGO_UNDERLINE_DOUBLE_LINE:
|
|
|
|
|
case PANGO_UNDERLINE_ERROR_LINE:
|
|
|
|
|
break;
|
|
|
|
|
|
2017-10-06 19:19:42 +00:00
|
|
|
|
case PANGO_UNDERLINE_DOUBLE:
|
|
|
|
|
case PANGO_UNDERLINE_LOW:
|
|
|
|
|
case PANGO_UNDERLINE_ERROR:
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (uline != PANGO_UNDERLINE_NONE)
|
2010-06-01 18:45:11 +00:00
|
|
|
|
add_attr (attr_list, pango_attr_underline_new (priv->underline_style));
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2010-06-01 18:45:11 +00:00
|
|
|
|
if (priv->rise_set)
|
|
|
|
|
add_attr (attr_list, pango_attr_rise_new (priv->rise));
|
2004-07-22 05:45:19 +00:00
|
|
|
|
|
2010-08-18 23:36:51 +00:00
|
|
|
|
/* Now apply the attributes as they will effect the outcome
|
|
|
|
|
* of pango_layout_get_extents() */
|
|
|
|
|
pango_layout_set_attributes (layout, attr_list);
|
|
|
|
|
pango_attr_list_unref (attr_list);
|
|
|
|
|
|
2004-07-22 05:45:19 +00:00
|
|
|
|
if (priv->ellipsize_set)
|
|
|
|
|
pango_layout_set_ellipsize (layout, priv->ellipsize);
|
|
|
|
|
else
|
|
|
|
|
pango_layout_set_ellipsize (layout, PANGO_ELLIPSIZE_NONE);
|
2005-01-20 18:47:58 +00:00
|
|
|
|
|
|
|
|
|
if (priv->wrap_width != -1)
|
|
|
|
|
{
|
2010-08-18 23:36:51 +00:00
|
|
|
|
PangoRectangle rect;
|
2020-07-24 13:54:49 +00:00
|
|
|
|
int width, text_width;
|
2010-08-18 23:36:51 +00:00
|
|
|
|
|
|
|
|
|
pango_layout_get_extents (layout, NULL, &rect);
|
|
|
|
|
text_width = rect.width;
|
|
|
|
|
|
|
|
|
|
if (cell_area)
|
|
|
|
|
width = (cell_area->width - xpad * 2) * PANGO_SCALE;
|
|
|
|
|
else
|
|
|
|
|
width = priv->wrap_width * PANGO_SCALE;
|
|
|
|
|
|
|
|
|
|
width = MIN (width, text_width);
|
|
|
|
|
|
|
|
|
|
pango_layout_set_width (layout, width);
|
2005-01-20 18:47:58 +00:00
|
|
|
|
pango_layout_set_wrap (layout, priv->wrap_mode);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
pango_layout_set_width (layout, -1);
|
|
|
|
|
pango_layout_set_wrap (layout, PANGO_WRAP_CHAR);
|
|
|
|
|
}
|
|
|
|
|
|
2006-07-19 16:27:10 +00:00
|
|
|
|
if (priv->align_set)
|
|
|
|
|
pango_layout_set_alignment (layout, priv->align);
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
PangoAlignment align;
|
|
|
|
|
|
|
|
|
|
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
|
|
|
|
|
align = PANGO_ALIGN_RIGHT;
|
|
|
|
|
else
|
|
|
|
|
align = PANGO_ALIGN_LEFT;
|
|
|
|
|
|
|
|
|
|
pango_layout_set_alignment (layout, align);
|
|
|
|
|
}
|
2001-02-13 05:44:47 +00:00
|
|
|
|
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
return layout;
|
2000-10-05 01:04:57 +00:00
|
|
|
|
}
|
|
|
|
|
|
2010-08-18 23:36:51 +00:00
|
|
|
|
|
2000-10-05 01:04:57 +00:00
|
|
|
|
static void
|
2010-10-04 14:22:09 +00:00
|
|
|
|
get_size (GtkCellRenderer *cell,
|
|
|
|
|
GtkWidget *widget,
|
|
|
|
|
const GdkRectangle *cell_area,
|
|
|
|
|
PangoLayout *layout,
|
2020-07-24 13:54:49 +00:00
|
|
|
|
int *x_offset,
|
|
|
|
|
int *y_offset,
|
|
|
|
|
int *width,
|
|
|
|
|
int *height)
|
2000-10-05 01:04:57 +00:00
|
|
|
|
{
|
2010-06-01 18:45:11 +00:00
|
|
|
|
GtkCellRendererText *celltext = GTK_CELL_RENDERER_TEXT (cell);
|
2019-05-27 00:27:36 +00:00
|
|
|
|
GtkCellRendererTextPrivate *priv = gtk_cell_renderer_text_get_instance_private (celltext);
|
2000-10-05 01:04:57 +00:00
|
|
|
|
PangoRectangle rect;
|
2019-07-21 08:26:00 +00:00
|
|
|
|
int xpad, ypad;
|
|
|
|
|
int cell_width, cell_height;
|
|
|
|
|
float xalign, yalign;
|
2004-07-22 05:45:19 +00:00
|
|
|
|
|
2010-05-30 20:38:33 +00:00
|
|
|
|
gtk_cell_renderer_get_padding (cell, &xpad, &ypad);
|
|
|
|
|
|
2010-06-01 18:45:11 +00:00
|
|
|
|
if (priv->calc_fixed_height)
|
2001-05-22 19:18:47 +00:00
|
|
|
|
{
|
2011-01-12 20:26:52 +00:00
|
|
|
|
GtkStyleContext *style_context;
|
2001-06-30 02:38:17 +00:00
|
|
|
|
PangoContext *context;
|
2001-09-18 20:06:48 +00:00
|
|
|
|
PangoFontMetrics *metrics;
|
|
|
|
|
PangoFontDescription *font_desc;
|
2020-07-24 13:54:49 +00:00
|
|
|
|
int row_height;
|
2001-06-30 02:38:17 +00:00
|
|
|
|
|
2011-01-12 20:26:52 +00:00
|
|
|
|
style_context = gtk_widget_get_style_context (widget);
|
|
|
|
|
|
2020-01-27 23:27:36 +00:00
|
|
|
|
font_desc = gtk_css_style_get_pango_font (gtk_style_context_lookup_style (style_context));
|
2010-06-01 18:45:11 +00:00
|
|
|
|
pango_font_description_merge_static (font_desc, priv->font, TRUE);
|
2001-06-30 02:38:17 +00:00
|
|
|
|
|
2010-06-01 18:45:11 +00:00
|
|
|
|
if (priv->scale_set)
|
2001-09-18 20:06:48 +00:00
|
|
|
|
pango_font_description_set_size (font_desc,
|
2010-06-01 18:45:11 +00:00
|
|
|
|
priv->font_scale * pango_font_description_get_size (font_desc));
|
2001-06-30 02:38:17 +00:00
|
|
|
|
|
|
|
|
|
context = gtk_widget_get_pango_context (widget);
|
2001-09-18 20:06:48 +00:00
|
|
|
|
|
|
|
|
|
metrics = pango_context_get_metrics (context,
|
|
|
|
|
font_desc,
|
|
|
|
|
pango_context_get_language (context));
|
|
|
|
|
row_height = (pango_font_metrics_get_ascent (metrics) +
|
|
|
|
|
pango_font_metrics_get_descent (metrics));
|
|
|
|
|
pango_font_metrics_unref (metrics);
|
2004-01-29 18:10:29 +00:00
|
|
|
|
|
|
|
|
|
pango_font_description_free (font_desc);
|
|
|
|
|
|
2010-05-30 20:38:33 +00:00
|
|
|
|
gtk_cell_renderer_get_fixed_size (cell, &cell_width, &cell_height);
|
|
|
|
|
|
2001-06-30 02:38:17 +00:00
|
|
|
|
gtk_cell_renderer_set_fixed_size (cell,
|
2010-05-30 20:38:33 +00:00
|
|
|
|
cell_width, 2 * ypad +
|
2010-06-01 18:45:11 +00:00
|
|
|
|
priv->fixed_height_rows * PANGO_PIXELS (row_height));
|
2001-09-18 20:06:48 +00:00
|
|
|
|
|
2001-06-30 02:38:17 +00:00
|
|
|
|
if (height)
|
|
|
|
|
{
|
2010-05-30 20:38:33 +00:00
|
|
|
|
*height = cell_height;
|
2001-06-30 02:38:17 +00:00
|
|
|
|
height = NULL;
|
|
|
|
|
}
|
2010-06-01 18:45:11 +00:00
|
|
|
|
priv->calc_fixed_height = FALSE;
|
2001-06-30 02:38:17 +00:00
|
|
|
|
if (width == NULL)
|
|
|
|
|
return;
|
2001-05-22 19:18:47 +00:00
|
|
|
|
}
|
2000-10-05 01:04:57 +00:00
|
|
|
|
|
2008-05-26 04:33:25 +00:00
|
|
|
|
pango_layout_get_pixel_extents (layout, NULL, &rect);
|
2005-01-20 18:47:58 +00:00
|
|
|
|
|
2019-07-21 08:26:00 +00:00
|
|
|
|
gtk_cell_renderer_get_alignment (cell, &xalign, &yalign);
|
2010-05-30 20:38:33 +00:00
|
|
|
|
|
2019-07-21 08:26:00 +00:00
|
|
|
|
rect.height = MIN (rect.height, cell_area->height - 2 * ypad);
|
|
|
|
|
rect.width = MIN (rect.width, cell_area->width - 2 * xpad);
|
2010-05-30 20:38:33 +00:00
|
|
|
|
|
2019-07-21 08:26:00 +00:00
|
|
|
|
if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL)
|
|
|
|
|
*x_offset = (1.0 - xalign) * (cell_area->width - (rect.width + (2 * xpad)));
|
|
|
|
|
else
|
|
|
|
|
*x_offset = xalign * (cell_area->width - (rect.width + (2 * xpad)));
|
2011-01-05 17:29:18 +00:00
|
|
|
|
|
2019-07-21 08:26:00 +00:00
|
|
|
|
if ((priv->ellipsize_set && priv->ellipsize != PANGO_ELLIPSIZE_NONE) || priv->wrap_width != -1)
|
|
|
|
|
*x_offset = MAX(*x_offset, 0);
|
2004-10-01 21:39:01 +00:00
|
|
|
|
|
2019-07-21 08:26:00 +00:00
|
|
|
|
*y_offset = yalign * (cell_area->height - (rect.height + (2 * ypad)));
|
|
|
|
|
*y_offset = MAX (*y_offset, 0);
|
2001-03-15 23:21:39 +00:00
|
|
|
|
|
2011-01-05 17:29:18 +00:00
|
|
|
|
if (height)
|
|
|
|
|
*height = ypad * 2 + rect.height;
|
|
|
|
|
|
|
|
|
|
if (width)
|
2011-01-23 04:23:46 +00:00
|
|
|
|
*width = xpad * 2 + rect.width;
|
2000-10-05 01:04:57 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
2016-12-23 08:23:07 +00:00
|
|
|
|
gtk_cell_renderer_text_snapshot (GtkCellRenderer *cell,
|
|
|
|
|
GtkSnapshot *snapshot,
|
|
|
|
|
GtkWidget *widget,
|
|
|
|
|
const GdkRectangle *background_area,
|
|
|
|
|
const GdkRectangle *cell_area,
|
|
|
|
|
GtkCellRendererState flags)
|
2000-10-05 01:04:57 +00:00
|
|
|
|
|
|
|
|
|
{
|
2010-06-01 18:45:11 +00:00
|
|
|
|
GtkCellRendererText *celltext = GTK_CELL_RENDERER_TEXT (cell);
|
2019-05-27 00:27:36 +00:00
|
|
|
|
GtkCellRendererTextPrivate *priv = gtk_cell_renderer_text_get_instance_private (celltext);
|
2011-01-12 20:26:52 +00:00
|
|
|
|
GtkStyleContext *context;
|
2000-10-05 01:04:57 +00:00
|
|
|
|
PangoLayout *layout;
|
2020-07-24 13:54:49 +00:00
|
|
|
|
int x_offset = 0;
|
|
|
|
|
int y_offset = 0;
|
|
|
|
|
int xpad, ypad;
|
2011-01-23 04:23:46 +00:00
|
|
|
|
PangoRectangle rect;
|
2000-10-05 01:04:57 +00:00
|
|
|
|
|
2010-08-18 23:36:51 +00:00
|
|
|
|
layout = get_layout (celltext, widget, cell_area, flags);
|
2010-10-04 14:22:09 +00:00
|
|
|
|
get_size (cell, widget, cell_area, layout, &x_offset, &y_offset, NULL, NULL);
|
2011-01-12 20:26:52 +00:00
|
|
|
|
context = gtk_widget_get_style_context (widget);
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
|
2011-01-23 04:23:46 +00:00
|
|
|
|
if (priv->background_set && (flags & GTK_CELL_RENDERER_SELECTED) == 0)
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
{
|
2017-01-13 03:46:09 +00:00
|
|
|
|
gtk_snapshot_append_color (snapshot,
|
|
|
|
|
&priv->background,
|
|
|
|
|
&GRAPHENE_RECT_INIT(
|
|
|
|
|
background_area->x, background_area->y,
|
|
|
|
|
background_area->width, background_area->height
|
2018-04-24 01:17:23 +00:00
|
|
|
|
));
|
remove validation idle
2001-02-08 Havoc Pennington <hp@redhat.com>
* gtk/gtktextview.c (gtk_text_view_destroy_layout): remove
validation idle
* demos/gtk-demo/main.c (create_tree): adjust to changes in text
cell renderer
* demos/pixbuf-demo.c (timeout): remove deprecated
gtk_widget_draw
* demos/testpixbuf-save.c (main): remove deprecated
gtk_drawing_area_size
* gtk/gtktreeview.c (gtk_tree_view_size_allocate): allocate
buttons even if the model isn't setup. gtk_tree_view_check_dirty()
at the start of the allocation.
(gtk_tree_view_check_dirty): handle column->button == NULL, handle
unsetup or NULL model.
* gtk/gtkstyle.c (gtk_default_draw_flat_box): drawing for the
even/odd/sorted cells in the tree view.
* gtk/gtktreeselection.c (gtk_tree_selection_real_unselect_all):
bugfixes
* gtk/gtktreeview.c: assorted bugfixy stuff. Draw the row
backgrounds with draw_flat_box using different detail for even/odd
rows.
* gtk/gtkrbtree.c, gtkrbtree.h: Keep track of the parity of each
row, so we can draw the alternating colors thing
* gtk/gtktexttag.c (gtk_text_tag_set_property): if we change a
property from a synonym property, notify for the synonym.
Also, nuke the background_gdk_set and foreground_gdk_set synonyms
(gtk_text_tag_get_property): Always return the font, even if
all its fields aren't set
* gtk/gtkcellrenderertext.h (struct _GtkCellRendererText): don't
store the attr list; it leaves us with no way to change attributes
in _render according to the render flags, and no way to implement
get_property. Instead store all the specific text attributes.
Separate whether an attribute is enabled from its value. Sync all
properties with GtkTextTag, make them all consistent, etc.
* gtk/gtkcellrenderer.h: Add a flag GTK_CELL_RENDERER_SORTED so
renderers can highlight the sort row/column
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_get_property): use
accessor functions to get values; this has the side effect of
showing up which accessor functions were missing. Added those.
* gtk/gtktreeviewcolumn.h: Replace set_justification with
set_alignment, to be consistent with GtkLabel, GtkMisc
* gtk/gtktreeviewcolumn.c: Added code to display sort indicator
arrow.
* gtk/Makefile.am (gtk_public_h_sources): add gtktreesortable.h
* gtk/gtktreesortable.h: updates in here
2001-02-08 23:36:53 +00:00
|
|
|
|
}
|
2001-09-25 16:44:39 +00:00
|
|
|
|
|
2010-05-30 20:38:33 +00:00
|
|
|
|
gtk_cell_renderer_get_padding (cell, &xpad, &ypad);
|
|
|
|
|
|
2006-03-14 19:44:59 +00:00
|
|
|
|
if (priv->ellipsize_set && priv->ellipsize != PANGO_ELLIPSIZE_NONE)
|
2011-01-23 04:23:46 +00:00
|
|
|
|
pango_layout_set_width (layout,
|
2010-05-30 20:38:33 +00:00
|
|
|
|
(cell_area->width - x_offset - 2 * xpad) * PANGO_SCALE);
|
2005-02-01 18:13:06 +00:00
|
|
|
|
else if (priv->wrap_width == -1)
|
2004-07-22 05:45:19 +00:00
|
|
|
|
pango_layout_set_width (layout, -1);
|
2005-02-01 18:13:06 +00:00
|
|
|
|
|
2011-01-23 04:23:46 +00:00
|
|
|
|
pango_layout_get_pixel_extents (layout, NULL, &rect);
|
|
|
|
|
x_offset = x_offset - rect.x;
|
|
|
|
|
|
2016-12-23 08:23:07 +00:00
|
|
|
|
gtk_snapshot_push_clip (snapshot,
|
|
|
|
|
&GRAPHENE_RECT_INIT(
|
|
|
|
|
cell_area->x, cell_area->y,
|
|
|
|
|
cell_area->width, cell_area->height
|
2018-04-24 01:17:23 +00:00
|
|
|
|
));
|
2010-12-15 23:07:08 +00:00
|
|
|
|
|
2016-12-23 08:23:07 +00:00
|
|
|
|
gtk_snapshot_render_layout (snapshot, context,
|
|
|
|
|
cell_area->x + x_offset + xpad,
|
|
|
|
|
cell_area->y + y_offset + ypad,
|
|
|
|
|
layout);
|
2010-12-15 23:07:08 +00:00
|
|
|
|
|
2017-01-12 23:39:59 +00:00
|
|
|
|
gtk_snapshot_pop (snapshot);
|
2010-12-15 23:07:08 +00:00
|
|
|
|
|
2002-10-07 01:38:40 +00:00
|
|
|
|
g_object_unref (layout);
|
2000-10-05 01:04:57 +00:00
|
|
|
|
}
|
Behaviour change, apply changes if the entry of the editable gets a focus
Tue Oct 15 00:53:14 2002 Kristian Rietveld <kris@gtk.org>
Behaviour change, apply changes if the entry of the editable gets
a focus out event (#82405).
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_focus_out_event):
new function,
(gtk_cell_renderer_text_start_editing): stop editing and apply
changes on focus-out.
Tue Oct 15 00:47:35 2002 Kristian Rietveld <kris@gtk.org>
Fixes an *evil* GtkTreeModelSort bug, #93629.
* gtk/gtktreemodel.c (release_row_references): return if the
refs->list is NULL.
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_changed): if we
are swapping two rows (re-insertion on row_changed), also *emit*
a rows_reordered signal. oops.
Tue Oct 15 00:45:03 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtkliststore.c (gtk_list_store_remove_silently): free
the actual link after the node has been removed (#92014).
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_column_finalize):
free the cell_list and the child if the exists (#92014).
Tue Oct 15 00:40:25 2002 Kristian Rietveld <kris@gtk.org>
Don't accept drops if the model has been sorted, #93758)
* gtk/gtkliststore.c (gtk_list_store_row_drop_possible): return
FALSE if the list has been sorted.
* gtk/gtktreestore.c (gtk_tree_store_row_drop_possible): check
if drag_dest is a TreeStore, return FALSE if the tree has been
sorted.
Tue Oct 15 00:33:59 2002 Kristian Rietveld <kris@gtk.org>
Compiler warning fixage, (#85858, #85859, #85860, #85872)
* gtk/gtkcellrendererpixbuf (gtk_cell_renderer_pixbuf_render):
s/guint/GtkCellRendererState/.
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_render):
ditto.
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_render),
(gtk_cell_renderer_toggle_activate): ditto.
* gtk/gtkliststore.c (gtk_list_store_get_flags): a
s/guint/GtkTreeModelFlags/ on the return type.
2002-10-14 22:50:18 +00:00
|
|
|
|
|
2001-09-25 16:44:39 +00:00
|
|
|
|
static void
|
|
|
|
|
gtk_cell_renderer_text_editing_done (GtkCellEditable *entry,
|
|
|
|
|
gpointer data)
|
|
|
|
|
{
|
2019-05-27 00:27:36 +00:00
|
|
|
|
GtkCellRendererText *celltext = GTK_CELL_RENDERER_TEXT (data);
|
|
|
|
|
GtkCellRendererTextPrivate *priv = gtk_cell_renderer_text_get_instance_private (celltext);
|
2020-07-24 18:40:36 +00:00
|
|
|
|
const char *path;
|
|
|
|
|
const char *new_text;
|
2009-12-04 01:15:00 +00:00
|
|
|
|
gboolean canceled;
|
add a gtk_list_store_sort_iter_changed line for some special case ...
Tue Nov 26 22:26:04 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtk{tree,list}store.c (gtk_{tree,list}_store_real_set_value):
add a gtk_list_store_sort_iter_changed line for some special
case ... (#96647 (issue 1), testcases from Soeren Sandmann and
Daniel Elstner).
Tue Nov 26 22:18:06 2002 Kristian Rietveld <kris@gtk.org>
Inconsistent state for toggle renderers, requested by Paolo Bacchilega
in #88130.
* gtk/gtktreeprivate.h: move GtkCellRendererInfo here.
* gtk/gtkcellrenderer.c: moved GtkCellRendererInfo away,
fix some indentation issues.
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_class_init),
(gtk_cell_renderer_toggle_set_property),
(gtk_cell_renderer_toggle_get_property),
(gtk_cell_renderer_toggle_render): add an inconsistent property.
* gtk/gtkstyle.c (gtk_default_draw_check),
(gtk_default_draw_option): support drawing inconsistent
options/checks for cells.
Tue Nov 26 22:14:14 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_editing_done),
(gtk_cell_renderer_text_start_editing): add a focus_out_id to avoid
calling _editing_done twice (which has nasty side-effects). (#96647,
(issue 2) testcase from Soeren Sandmann).
Tue Nov 26 22:12:21 2002 Kristian Rietveld <kris@gtk.org>
#82739, patch from Padraig O'Briain.
* gtk/gtktreeviewcolumn.[ch]: add
gtk_tree_view_column_cell_get_position()
Tue Nov 26 22:06:29 2002 Kristian Rietveld <kris@gtk.org>
Yes, this chunk breaks ABI compatibility. Owen knows about it and
agreed with it. It doesn't break ABI that bad though, things will
still work. Please keep it silent :P.
This patch fixes some keynav issues reported by Narayana Pattipati
in #81633. (Also mentioned in #92037 (Sun tracking bug)).
* gtk/gtkmarshalers.list: add two silly marshalers
* gtk/gtktreeview.[ch] (gtk_tree_view_real_select_all),
(gtk_tree_view_real_unselect_all),
(gtk_tree_view_real_select_cursor_row),
(gtk_tree_view_real_toggle_cursor_row),
(gtk_tree_view_real_expand_collapse_cursor_row),
(gtk_tree_view_real_start_interactive_search): change the return
type from void to gboolean, update prototypes, functions, signals and
entries in GtkTreeViewClass,
(gtk_tree_view_class_init): add select_cursor_row binding for
enter key,
(gtk_tree_view_key_press): only navigate the header button if the
header is also visible ...
Tue Nov 26 22:05:48 2002 Kristian Rietveld <kris@gtk.org>
API bit of #75745, reported by Richard Hult.
* gtk/gtkcellrenderer.h (GtkCellRendererState): add
GTK_CELL_RENDERER_FOCUSED, rest of this bug fix will follow later.
2002-11-26 21:28:01 +00:00
|
|
|
|
|
2013-02-08 07:03:52 +00:00
|
|
|
|
g_clear_object (&priv->entry);
|
2004-06-07 04:04:27 +00:00
|
|
|
|
|
Migrating all cell renderers to use the new instance private data
Thu Dec 18 00:57:18 2003 Kristian Rietveld <kris@gtk.org>
Migrating all cell renderers to use the new instance private data
construction.
* gtk/gtktreeprivate.h: remove GtkCellRendererInfo, as it is no
longer being used.
* gtk/gtkcellrenderer.c (gtk_cell_renderer_init),
(gtk_cell_renderer_class_init), (gtk_cell_renderer_get_property),
(set_cell_bg_color), (gtk_cell_renderer_render): remove old
GtkCellRendererInfo handling, migrate to instance private data.
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_editing_done),
(gtk_cell_renderer_text_start_editing): moved focus_out_id
from GtkCellRendererInfo to text renderer private data.
* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_init),
(gtk_cell_renderer_pixbuf_class_init),
(gtk_cell_renderer_pixbuf_finalize),
(gtk_cell_renderer_pixbuf_get_property),
(gtk_cell_renderer_pixbuf_set_property),
(gtk_cell_renderer_pixbuf_create_stock_pixbuf),
(gtk_cell_renderer_pixbuf_get_size), (gtk_cell_renderer_pixbuf_render):
migrate to instance private data.
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_class_init),
(gtk_cell_renderer_toggle_get_property),
(gtk_cell_renderer_toggle_set_property),
(gtk_cell_renderer_toggle_render): migrate to instance private data.
2003-12-18 00:06:43 +00:00
|
|
|
|
if (priv->focus_out_id > 0)
|
add a gtk_list_store_sort_iter_changed line for some special case ...
Tue Nov 26 22:26:04 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtk{tree,list}store.c (gtk_{tree,list}_store_real_set_value):
add a gtk_list_store_sort_iter_changed line for some special
case ... (#96647 (issue 1), testcases from Soeren Sandmann and
Daniel Elstner).
Tue Nov 26 22:18:06 2002 Kristian Rietveld <kris@gtk.org>
Inconsistent state for toggle renderers, requested by Paolo Bacchilega
in #88130.
* gtk/gtktreeprivate.h: move GtkCellRendererInfo here.
* gtk/gtkcellrenderer.c: moved GtkCellRendererInfo away,
fix some indentation issues.
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_class_init),
(gtk_cell_renderer_toggle_set_property),
(gtk_cell_renderer_toggle_get_property),
(gtk_cell_renderer_toggle_render): add an inconsistent property.
* gtk/gtkstyle.c (gtk_default_draw_check),
(gtk_default_draw_option): support drawing inconsistent
options/checks for cells.
Tue Nov 26 22:14:14 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_editing_done),
(gtk_cell_renderer_text_start_editing): add a focus_out_id to avoid
calling _editing_done twice (which has nasty side-effects). (#96647,
(issue 2) testcase from Soeren Sandmann).
Tue Nov 26 22:12:21 2002 Kristian Rietveld <kris@gtk.org>
#82739, patch from Padraig O'Briain.
* gtk/gtktreeviewcolumn.[ch]: add
gtk_tree_view_column_cell_get_position()
Tue Nov 26 22:06:29 2002 Kristian Rietveld <kris@gtk.org>
Yes, this chunk breaks ABI compatibility. Owen knows about it and
agreed with it. It doesn't break ABI that bad though, things will
still work. Please keep it silent :P.
This patch fixes some keynav issues reported by Narayana Pattipati
in #81633. (Also mentioned in #92037 (Sun tracking bug)).
* gtk/gtkmarshalers.list: add two silly marshalers
* gtk/gtktreeview.[ch] (gtk_tree_view_real_select_all),
(gtk_tree_view_real_unselect_all),
(gtk_tree_view_real_select_cursor_row),
(gtk_tree_view_real_toggle_cursor_row),
(gtk_tree_view_real_expand_collapse_cursor_row),
(gtk_tree_view_real_start_interactive_search): change the return
type from void to gboolean, update prototypes, functions, signals and
entries in GtkTreeViewClass,
(gtk_tree_view_class_init): add select_cursor_row binding for
enter key,
(gtk_tree_view_key_press): only navigate the header button if the
header is also visible ...
Tue Nov 26 22:05:48 2002 Kristian Rietveld <kris@gtk.org>
API bit of #75745, reported by Richard Hult.
* gtk/gtkcellrenderer.h (GtkCellRendererState): add
GTK_CELL_RENDERER_FOCUSED, rest of this bug fix will follow later.
2002-11-26 21:28:01 +00:00
|
|
|
|
{
|
Migrating all cell renderers to use the new instance private data
Thu Dec 18 00:57:18 2003 Kristian Rietveld <kris@gtk.org>
Migrating all cell renderers to use the new instance private data
construction.
* gtk/gtktreeprivate.h: remove GtkCellRendererInfo, as it is no
longer being used.
* gtk/gtkcellrenderer.c (gtk_cell_renderer_init),
(gtk_cell_renderer_class_init), (gtk_cell_renderer_get_property),
(set_cell_bg_color), (gtk_cell_renderer_render): remove old
GtkCellRendererInfo handling, migrate to instance private data.
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_editing_done),
(gtk_cell_renderer_text_start_editing): moved focus_out_id
from GtkCellRendererInfo to text renderer private data.
* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_init),
(gtk_cell_renderer_pixbuf_class_init),
(gtk_cell_renderer_pixbuf_finalize),
(gtk_cell_renderer_pixbuf_get_property),
(gtk_cell_renderer_pixbuf_set_property),
(gtk_cell_renderer_pixbuf_create_stock_pixbuf),
(gtk_cell_renderer_pixbuf_get_size), (gtk_cell_renderer_pixbuf_render):
migrate to instance private data.
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_class_init),
(gtk_cell_renderer_toggle_get_property),
(gtk_cell_renderer_toggle_set_property),
(gtk_cell_renderer_toggle_render): migrate to instance private data.
2003-12-18 00:06:43 +00:00
|
|
|
|
g_signal_handler_disconnect (entry, priv->focus_out_id);
|
|
|
|
|
priv->focus_out_id = 0;
|
add a gtk_list_store_sort_iter_changed line for some special case ...
Tue Nov 26 22:26:04 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtk{tree,list}store.c (gtk_{tree,list}_store_real_set_value):
add a gtk_list_store_sort_iter_changed line for some special
case ... (#96647 (issue 1), testcases from Soeren Sandmann and
Daniel Elstner).
Tue Nov 26 22:18:06 2002 Kristian Rietveld <kris@gtk.org>
Inconsistent state for toggle renderers, requested by Paolo Bacchilega
in #88130.
* gtk/gtktreeprivate.h: move GtkCellRendererInfo here.
* gtk/gtkcellrenderer.c: moved GtkCellRendererInfo away,
fix some indentation issues.
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_class_init),
(gtk_cell_renderer_toggle_set_property),
(gtk_cell_renderer_toggle_get_property),
(gtk_cell_renderer_toggle_render): add an inconsistent property.
* gtk/gtkstyle.c (gtk_default_draw_check),
(gtk_default_draw_option): support drawing inconsistent
options/checks for cells.
Tue Nov 26 22:14:14 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_editing_done),
(gtk_cell_renderer_text_start_editing): add a focus_out_id to avoid
calling _editing_done twice (which has nasty side-effects). (#96647,
(issue 2) testcase from Soeren Sandmann).
Tue Nov 26 22:12:21 2002 Kristian Rietveld <kris@gtk.org>
#82739, patch from Padraig O'Briain.
* gtk/gtktreeviewcolumn.[ch]: add
gtk_tree_view_column_cell_get_position()
Tue Nov 26 22:06:29 2002 Kristian Rietveld <kris@gtk.org>
Yes, this chunk breaks ABI compatibility. Owen knows about it and
agreed with it. It doesn't break ABI that bad though, things will
still work. Please keep it silent :P.
This patch fixes some keynav issues reported by Narayana Pattipati
in #81633. (Also mentioned in #92037 (Sun tracking bug)).
* gtk/gtkmarshalers.list: add two silly marshalers
* gtk/gtktreeview.[ch] (gtk_tree_view_real_select_all),
(gtk_tree_view_real_unselect_all),
(gtk_tree_view_real_select_cursor_row),
(gtk_tree_view_real_toggle_cursor_row),
(gtk_tree_view_real_expand_collapse_cursor_row),
(gtk_tree_view_real_start_interactive_search): change the return
type from void to gboolean, update prototypes, functions, signals and
entries in GtkTreeViewClass,
(gtk_tree_view_class_init): add select_cursor_row binding for
enter key,
(gtk_tree_view_key_press): only navigate the header button if the
header is also visible ...
Tue Nov 26 22:05:48 2002 Kristian Rietveld <kris@gtk.org>
API bit of #75745, reported by Richard Hult.
* gtk/gtkcellrenderer.h (GtkCellRendererState): add
GTK_CELL_RENDERER_FOCUSED, rest of this bug fix will follow later.
2002-11-26 21:28:01 +00:00
|
|
|
|
}
|
2001-09-25 16:44:39 +00:00
|
|
|
|
|
2004-06-07 04:04:27 +00:00
|
|
|
|
if (priv->entry_menu_popdown_timeout)
|
|
|
|
|
{
|
|
|
|
|
g_source_remove (priv->entry_menu_popdown_timeout);
|
|
|
|
|
priv->entry_menu_popdown_timeout = 0;
|
|
|
|
|
}
|
|
|
|
|
|
2009-12-04 01:15:00 +00:00
|
|
|
|
g_object_get (entry,
|
|
|
|
|
"editing-canceled", &canceled,
|
|
|
|
|
NULL);
|
|
|
|
|
gtk_cell_renderer_stop_editing (GTK_CELL_RENDERER (data), canceled);
|
|
|
|
|
|
|
|
|
|
if (canceled)
|
2004-12-09 17:55:58 +00:00
|
|
|
|
return;
|
2001-11-14 22:52:43 +00:00
|
|
|
|
|
2001-09-25 16:44:39 +00:00
|
|
|
|
path = g_object_get_data (G_OBJECT (entry), GTK_CELL_RENDERER_TEXT_PATH);
|
2019-02-28 19:31:36 +00:00
|
|
|
|
new_text = gtk_editable_get_text (GTK_EDITABLE (entry));
|
2002-10-07 01:38:40 +00:00
|
|
|
|
g_signal_emit (data, text_cell_renderer_signals[EDITED], 0, path, new_text);
|
2001-09-25 16:44:39 +00:00
|
|
|
|
}
|
|
|
|
|
|
2018-01-06 20:12:04 +00:00
|
|
|
|
static void
|
|
|
|
|
gtk_cell_renderer_text_focus_changed (GtkWidget *entry,
|
|
|
|
|
GParamSpec *pspec,
|
|
|
|
|
gpointer data)
|
Behaviour change, apply changes if the entry of the editable gets a focus
Tue Oct 15 00:53:14 2002 Kristian Rietveld <kris@gtk.org>
Behaviour change, apply changes if the entry of the editable gets
a focus out event (#82405).
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_focus_out_event):
new function,
(gtk_cell_renderer_text_start_editing): stop editing and apply
changes on focus-out.
Tue Oct 15 00:47:35 2002 Kristian Rietveld <kris@gtk.org>
Fixes an *evil* GtkTreeModelSort bug, #93629.
* gtk/gtktreemodel.c (release_row_references): return if the
refs->list is NULL.
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_changed): if we
are swapping two rows (re-insertion on row_changed), also *emit*
a rows_reordered signal. oops.
Tue Oct 15 00:45:03 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtkliststore.c (gtk_list_store_remove_silently): free
the actual link after the node has been removed (#92014).
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_column_finalize):
free the cell_list and the child if the exists (#92014).
Tue Oct 15 00:40:25 2002 Kristian Rietveld <kris@gtk.org>
Don't accept drops if the model has been sorted, #93758)
* gtk/gtkliststore.c (gtk_list_store_row_drop_possible): return
FALSE if the list has been sorted.
* gtk/gtktreestore.c (gtk_tree_store_row_drop_possible): check
if drag_dest is a TreeStore, return FALSE if the tree has been
sorted.
Tue Oct 15 00:33:59 2002 Kristian Rietveld <kris@gtk.org>
Compiler warning fixage, (#85858, #85859, #85860, #85872)
* gtk/gtkcellrendererpixbuf (gtk_cell_renderer_pixbuf_render):
s/guint/GtkCellRendererState/.
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_render):
ditto.
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_render),
(gtk_cell_renderer_toggle_activate): ditto.
* gtk/gtkliststore.c (gtk_list_store_get_flags): a
s/guint/GtkTreeModelFlags/ on the return type.
2002-10-14 22:50:18 +00:00
|
|
|
|
{
|
2019-12-24 08:13:58 +00:00
|
|
|
|
if (gtk_widget_has_focus (entry) ||
|
|
|
|
|
gtk_widget_has_focus (GTK_WIDGET (gtk_entry_get_text_widget (GTK_ENTRY (entry)))))
|
2018-01-06 20:12:04 +00:00
|
|
|
|
return;
|
|
|
|
|
|
2009-12-04 01:15:00 +00:00
|
|
|
|
g_object_set (entry,
|
|
|
|
|
"editing-canceled", TRUE,
|
|
|
|
|
NULL);
|
2006-12-10 20:52:05 +00:00
|
|
|
|
gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (entry));
|
|
|
|
|
gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE (entry));
|
Behaviour change, apply changes if the entry of the editable gets a focus
Tue Oct 15 00:53:14 2002 Kristian Rietveld <kris@gtk.org>
Behaviour change, apply changes if the entry of the editable gets
a focus out event (#82405).
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_focus_out_event):
new function,
(gtk_cell_renderer_text_start_editing): stop editing and apply
changes on focus-out.
Tue Oct 15 00:47:35 2002 Kristian Rietveld <kris@gtk.org>
Fixes an *evil* GtkTreeModelSort bug, #93629.
* gtk/gtktreemodel.c (release_row_references): return if the
refs->list is NULL.
* gtk/gtktreemodelsort.c (gtk_tree_model_sort_row_changed): if we
are swapping two rows (re-insertion on row_changed), also *emit*
a rows_reordered signal. oops.
Tue Oct 15 00:45:03 2002 Kristian Rietveld <kris@gtk.org>
* gtk/gtkliststore.c (gtk_list_store_remove_silently): free
the actual link after the node has been removed (#92014).
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_column_finalize):
free the cell_list and the child if the exists (#92014).
Tue Oct 15 00:40:25 2002 Kristian Rietveld <kris@gtk.org>
Don't accept drops if the model has been sorted, #93758)
* gtk/gtkliststore.c (gtk_list_store_row_drop_possible): return
FALSE if the list has been sorted.
* gtk/gtktreestore.c (gtk_tree_store_row_drop_possible): check
if drag_dest is a TreeStore, return FALSE if the tree has been
sorted.
Tue Oct 15 00:33:59 2002 Kristian Rietveld <kris@gtk.org>
Compiler warning fixage, (#85858, #85859, #85860, #85872)
* gtk/gtkcellrendererpixbuf (gtk_cell_renderer_pixbuf_render):
s/guint/GtkCellRendererState/.
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_render):
ditto.
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_render),
(gtk_cell_renderer_toggle_activate): ditto.
* gtk/gtkliststore.c (gtk_list_store_get_flags): a
s/guint/GtkTreeModelFlags/ on the return type.
2002-10-14 22:50:18 +00:00
|
|
|
|
}
|
|
|
|
|
|
2001-09-25 16:44:39 +00:00
|
|
|
|
static GtkCellEditable *
|
|
|
|
|
gtk_cell_renderer_text_start_editing (GtkCellRenderer *cell,
|
|
|
|
|
GdkEvent *event,
|
|
|
|
|
GtkWidget *widget,
|
2020-07-24 18:40:36 +00:00
|
|
|
|
const char *path,
|
2010-10-04 14:22:09 +00:00
|
|
|
|
const GdkRectangle *background_area,
|
|
|
|
|
const GdkRectangle *cell_area,
|
2001-09-25 16:44:39 +00:00
|
|
|
|
GtkCellRendererState flags)
|
|
|
|
|
{
|
2019-05-27 00:27:36 +00:00
|
|
|
|
GtkCellRendererText *celltext = GTK_CELL_RENDERER_TEXT (cell);
|
|
|
|
|
GtkCellRendererTextPrivate *priv = gtk_cell_renderer_text_get_instance_private (celltext);
|
2020-07-24 20:25:56 +00:00
|
|
|
|
float xalign, yalign;
|
Migrating all cell renderers to use the new instance private data
Thu Dec 18 00:57:18 2003 Kristian Rietveld <kris@gtk.org>
Migrating all cell renderers to use the new instance private data
construction.
* gtk/gtktreeprivate.h: remove GtkCellRendererInfo, as it is no
longer being used.
* gtk/gtkcellrenderer.c (gtk_cell_renderer_init),
(gtk_cell_renderer_class_init), (gtk_cell_renderer_get_property),
(set_cell_bg_color), (gtk_cell_renderer_render): remove old
GtkCellRendererInfo handling, migrate to instance private data.
* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_editing_done),
(gtk_cell_renderer_text_start_editing): moved focus_out_id
from GtkCellRendererInfo to text renderer private data.
* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_init),
(gtk_cell_renderer_pixbuf_class_init),
(gtk_cell_renderer_pixbuf_finalize),
(gtk_cell_renderer_pixbuf_get_property),
(gtk_cell_renderer_pixbuf_set_property),
(gtk_cell_renderer_pixbuf_create_stock_pixbuf),
(gtk_cell_renderer_pixbuf_get_size), (gtk_cell_renderer_pixbuf_render):
migrate to instance private data.
* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_class_init),
(gtk_cell_renderer_toggle_get_property),
(gtk_cell_renderer_toggle_set_property),
(gtk_cell_renderer_toggle_render): migrate to instance private data.
2003-12-18 00:06:43 +00:00
|
|
|
|
|
2001-09-25 16:44:39 +00:00
|
|
|
|
/* If the cell isn't editable we return NULL. */
|
2019-12-24 08:13:58 +00:00
|
|
|
|
if (!priv->editable)
|
2001-09-25 16:44:39 +00:00
|
|
|
|
return NULL;
|
|
|
|
|
|
2010-05-30 20:38:33 +00:00
|
|
|
|
gtk_cell_renderer_get_alignment (cell, &xalign, &yalign);
|
|
|
|
|
|
|
|
|
|
priv->entry = gtk_entry_new ();
|
2013-02-08 07:03:52 +00:00
|
|
|
|
g_object_ref_sink (G_OBJECT (priv->entry));
|
|
|
|
|
|
2010-05-30 20:38:33 +00:00
|
|
|
|
gtk_entry_set_has_frame (GTK_ENTRY (priv->entry), FALSE);
|
|
|
|
|
gtk_entry_set_alignment (GTK_ENTRY (priv->entry), xalign);
|
2019-02-28 19:31:36 +00:00
|
|
|
|
gtk_editable_set_width_chars (GTK_EDITABLE (priv->entry), 5);
|
2001-09-25 16:44:39 +00:00
|
|
|
|
|
2010-06-01 18:45:11 +00:00
|
|
|
|
if (priv->text)
|
2019-02-28 19:31:36 +00:00
|
|
|
|
gtk_editable_set_text (GTK_EDITABLE (priv->entry), priv->text);
|
2005-09-01 05:11:46 +00:00
|
|
|
|
g_object_set_data_full (G_OBJECT (priv->entry), I_(GTK_CELL_RENDERER_TEXT_PATH), g_strdup (path), g_free);
|
2001-09-25 16:44:39 +00:00
|
|
|
|
|
2004-06-07 04:04:27 +00:00
|
|
|
|
gtk_editable_select_region (GTK_EDITABLE (priv->entry), 0, -1);
|
2010-09-14 01:33:06 +00:00
|
|
|
|
|
2004-06-07 04:04:27 +00:00
|
|
|
|
priv->in_entry_menu = FALSE;
|
|
|
|
|
if (priv->entry_menu_popdown_timeout)
|
|
|
|
|
{
|
|
|
|
|
g_source_remove (priv->entry_menu_popdown_timeout);
|
|
|
|
|
priv->entry_menu_popdown_timeout = 0;
|
|
|
|
|
}
|
|
|
|
|
|
2019-12-24 08:13:58 +00:00
|
|
|
|
g_signal_connect (priv->entry, "editing-done",
|
|
|
|
|
G_CALLBACK (gtk_cell_renderer_text_editing_done), celltext);
|
2018-01-06 20:12:04 +00:00
|
|
|
|
priv->focus_out_id = g_signal_connect_after (priv->entry, "notify::has-focus",
|
|
|
|
|
G_CALLBACK (gtk_cell_renderer_text_focus_changed),
|
2005-09-09 18:38:52 +00:00
|
|
|
|
celltext);
|
2004-06-07 04:04:27 +00:00
|
|
|
|
|
|
|
|
|
return GTK_CELL_EDITABLE (priv->entry);
|
2001-09-25 16:44:39 +00:00
|
|
|
|
}
|
2001-05-22 19:18:47 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2001-06-30 02:38:17 +00:00
|
|
|
|
* gtk_cell_renderer_text_set_fixed_height_from_font:
|
2001-05-22 19:18:47 +00:00
|
|
|
|
* @renderer: A #GtkCellRendererText
|
2001-06-30 02:38:17 +00:00
|
|
|
|
* @number_of_rows: Number of rows of text each cell renderer is allocated, or -1
|
2001-05-22 19:18:47 +00:00
|
|
|
|
*
|
2014-02-05 18:07:34 +00:00
|
|
|
|
* Sets the height of a renderer to explicitly be determined by the “font” and
|
|
|
|
|
* “y_pad” property set on it. Further changes in these properties do not
|
2001-06-30 02:38:17 +00:00
|
|
|
|
* affect the height, so they must be accompanied by a subsequent call to this
|
2020-08-21 12:41:13 +00:00
|
|
|
|
* function. Using this function is inflexible, and should really only be used
|
2001-09-25 16:44:39 +00:00
|
|
|
|
* if calculating the size of a cell is too slow (ie, a massive number of cells
|
|
|
|
|
* displayed). If @number_of_rows is -1, then the fixed height is unset, and
|
|
|
|
|
* the height is determined by the properties again.
|
2001-05-22 19:18:47 +00:00
|
|
|
|
**/
|
|
|
|
|
void
|
2001-06-30 02:38:17 +00:00
|
|
|
|
gtk_cell_renderer_text_set_fixed_height_from_font (GtkCellRendererText *renderer,
|
2020-07-24 13:54:49 +00:00
|
|
|
|
int number_of_rows)
|
2001-05-22 19:18:47 +00:00
|
|
|
|
{
|
2019-05-27 00:27:36 +00:00
|
|
|
|
GtkCellRendererTextPrivate *priv = gtk_cell_renderer_text_get_instance_private (renderer);
|
|
|
|
|
GtkCellRenderer *cell = GTK_CELL_RENDERER (renderer);
|
2010-05-30 20:38:33 +00:00
|
|
|
|
|
2001-05-22 19:18:47 +00:00
|
|
|
|
g_return_if_fail (GTK_IS_CELL_RENDERER_TEXT (renderer));
|
2001-06-30 02:38:17 +00:00
|
|
|
|
g_return_if_fail (number_of_rows == -1 || number_of_rows > 0);
|
2001-05-22 19:18:47 +00:00
|
|
|
|
|
2001-06-30 02:38:17 +00:00
|
|
|
|
if (number_of_rows == -1)
|
|
|
|
|
{
|
2020-07-24 13:54:49 +00:00
|
|
|
|
int width, height;
|
2010-05-30 20:38:33 +00:00
|
|
|
|
|
|
|
|
|
gtk_cell_renderer_get_fixed_size (cell, &width, &height);
|
|
|
|
|
gtk_cell_renderer_set_fixed_size (cell, width, -1);
|
2001-06-30 02:38:17 +00:00
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2010-06-01 18:45:11 +00:00
|
|
|
|
priv->fixed_height_rows = number_of_rows;
|
|
|
|
|
priv->calc_fixed_height = TRUE;
|
2001-06-30 02:38:17 +00:00
|
|
|
|
}
|
2001-05-22 19:18:47 +00:00
|
|
|
|
}
|
2010-08-18 23:36:51 +00:00
|
|
|
|
|
|
|
|
|
static void
|
2010-09-21 14:52:59 +00:00
|
|
|
|
gtk_cell_renderer_text_get_preferred_width (GtkCellRenderer *cell,
|
|
|
|
|
GtkWidget *widget,
|
2020-07-24 13:54:49 +00:00
|
|
|
|
int *minimum_size,
|
|
|
|
|
int *natural_size)
|
2010-08-18 23:36:51 +00:00
|
|
|
|
{
|
2019-05-27 00:27:36 +00:00
|
|
|
|
GtkCellRendererText *celltext = GTK_CELL_RENDERER_TEXT (cell);
|
|
|
|
|
GtkCellRendererTextPrivate *priv = gtk_cell_renderer_text_get_instance_private (celltext);
|
2010-08-18 23:36:51 +00:00
|
|
|
|
PangoLayout *layout;
|
|
|
|
|
PangoContext *context;
|
|
|
|
|
PangoFontMetrics *metrics;
|
|
|
|
|
PangoRectangle rect;
|
2020-07-24 13:54:49 +00:00
|
|
|
|
int char_width, text_width, ellipsize_chars, xpad;
|
|
|
|
|
int min_width, nat_width;
|
2010-08-18 23:36:51 +00:00
|
|
|
|
|
|
|
|
|
/* "width-chars" Hard-coded minimum width:
|
|
|
|
|
* - minimum size should be MAX (width-chars, strlen ("..."));
|
|
|
|
|
* - natural size should be MAX (width-chars, strlen (label->text));
|
|
|
|
|
*
|
|
|
|
|
* "wrap-width" User specified natural wrap width
|
|
|
|
|
* - minimum size should be MAX (width-chars, 0)
|
|
|
|
|
* - natural size should be MIN (wrap-width, strlen (label->text))
|
|
|
|
|
*/
|
2010-09-21 14:52:59 +00:00
|
|
|
|
gtk_cell_renderer_get_padding (cell, &xpad, NULL);
|
2010-08-18 23:36:51 +00:00
|
|
|
|
|
|
|
|
|
layout = get_layout (celltext, widget, NULL, 0);
|
|
|
|
|
|
|
|
|
|
/* Fetch the length of the complete unwrapped text */
|
|
|
|
|
pango_layout_set_width (layout, -1);
|
|
|
|
|
pango_layout_get_extents (layout, NULL, &rect);
|
|
|
|
|
text_width = rect.width;
|
|
|
|
|
|
2020-05-28 08:00:03 +00:00
|
|
|
|
/* Fetch the average size of a character */
|
2010-08-18 23:36:51 +00:00
|
|
|
|
context = pango_layout_get_context (layout);
|
2012-12-06 01:47:24 +00:00
|
|
|
|
metrics = pango_context_get_metrics (context,
|
|
|
|
|
pango_context_get_font_description (context),
|
2011-01-24 02:50:39 +00:00
|
|
|
|
pango_context_get_language (context));
|
|
|
|
|
|
2010-08-18 23:36:51 +00:00
|
|
|
|
char_width = pango_font_metrics_get_approximate_char_width (metrics);
|
|
|
|
|
|
|
|
|
|
pango_font_metrics_unref (metrics);
|
|
|
|
|
g_object_unref (layout);
|
|
|
|
|
|
|
|
|
|
/* enforce minimum width for ellipsized labels at ~3 chars */
|
|
|
|
|
if (priv->ellipsize_set && priv->ellipsize != PANGO_ELLIPSIZE_NONE)
|
|
|
|
|
ellipsize_chars = 3;
|
|
|
|
|
else
|
|
|
|
|
ellipsize_chars = 0;
|
2011-01-24 02:50:39 +00:00
|
|
|
|
|
2010-08-18 23:36:51 +00:00
|
|
|
|
if ((priv->ellipsize_set && priv->ellipsize != PANGO_ELLIPSIZE_NONE) || priv->width_chars > 0)
|
2011-01-24 02:50:39 +00:00
|
|
|
|
min_width = xpad * 2 +
|
|
|
|
|
MIN (PANGO_PIXELS_CEIL (text_width),
|
|
|
|
|
(PANGO_PIXELS (char_width) * MAX (priv->width_chars, ellipsize_chars)));
|
2010-08-18 23:36:51 +00:00
|
|
|
|
/* If no width-chars set, minimum for wrapping text will be the wrap-width */
|
|
|
|
|
else if (priv->wrap_width > -1)
|
2010-12-23 17:41:23 +00:00
|
|
|
|
min_width = xpad * 2 + rect.x + MIN (PANGO_PIXELS_CEIL (text_width), priv->wrap_width);
|
2010-08-18 23:36:51 +00:00
|
|
|
|
else
|
2010-12-23 17:41:23 +00:00
|
|
|
|
min_width = xpad * 2 + rect.x + PANGO_PIXELS_CEIL (text_width);
|
2010-08-18 23:36:51 +00:00
|
|
|
|
|
2010-08-20 23:23:00 +00:00
|
|
|
|
if (priv->width_chars > 0)
|
2011-01-24 02:50:39 +00:00
|
|
|
|
nat_width = xpad * 2 +
|
2010-12-23 17:41:23 +00:00
|
|
|
|
MAX ((PANGO_PIXELS (char_width) * priv->width_chars), PANGO_PIXELS_CEIL (text_width));
|
2010-08-20 23:23:00 +00:00
|
|
|
|
else
|
2010-12-23 17:41:23 +00:00
|
|
|
|
nat_width = xpad * 2 + PANGO_PIXELS_CEIL (text_width);
|
2010-08-20 23:23:00 +00:00
|
|
|
|
|
|
|
|
|
nat_width = MAX (nat_width, min_width);
|
2011-01-24 02:50:39 +00:00
|
|
|
|
|
2010-08-20 23:23:00 +00:00
|
|
|
|
if (priv->max_width_chars > 0)
|
|
|
|
|
{
|
2020-07-24 13:54:49 +00:00
|
|
|
|
int max_width = xpad * 2 + PANGO_PIXELS (char_width) * priv->max_width_chars;
|
2010-08-20 23:23:00 +00:00
|
|
|
|
|
|
|
|
|
min_width = MIN (min_width, max_width);
|
|
|
|
|
nat_width = MIN (nat_width, max_width);
|
|
|
|
|
}
|
|
|
|
|
|
2010-08-18 23:36:51 +00:00
|
|
|
|
if (minimum_size)
|
|
|
|
|
*minimum_size = min_width;
|
|
|
|
|
|
|
|
|
|
if (natural_size)
|
2010-08-20 23:23:00 +00:00
|
|
|
|
*natural_size = nat_width;
|
2010-08-18 23:36:51 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
2010-09-21 14:52:59 +00:00
|
|
|
|
gtk_cell_renderer_text_get_preferred_height_for_width (GtkCellRenderer *cell,
|
|
|
|
|
GtkWidget *widget,
|
2020-07-24 13:54:49 +00:00
|
|
|
|
int width,
|
|
|
|
|
int *minimum_height,
|
|
|
|
|
int *natural_height)
|
2010-08-18 23:36:51 +00:00
|
|
|
|
{
|
2019-05-27 00:27:36 +00:00
|
|
|
|
GtkCellRendererText *celltext = GTK_CELL_RENDERER_TEXT (cell);
|
2011-01-24 02:50:39 +00:00
|
|
|
|
PangoLayout *layout;
|
2020-07-24 13:54:49 +00:00
|
|
|
|
int text_height, xpad, ypad;
|
2010-08-18 23:36:51 +00:00
|
|
|
|
|
2010-09-21 14:52:59 +00:00
|
|
|
|
gtk_cell_renderer_get_padding (cell, &xpad, &ypad);
|
2010-08-18 23:36:51 +00:00
|
|
|
|
|
2010-08-21 11:18:14 +00:00
|
|
|
|
layout = get_layout (celltext, widget, NULL, 0);
|
2010-08-18 23:36:51 +00:00
|
|
|
|
|
|
|
|
|
pango_layout_set_width (layout, (width - xpad * 2) * PANGO_SCALE);
|
|
|
|
|
pango_layout_get_pixel_size (layout, NULL, &text_height);
|
|
|
|
|
|
|
|
|
|
if (minimum_height)
|
|
|
|
|
*minimum_height = text_height + ypad * 2;
|
|
|
|
|
|
|
|
|
|
if (natural_height)
|
|
|
|
|
*natural_height = text_height + ypad * 2;
|
|
|
|
|
|
|
|
|
|
g_object_unref (layout);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
2010-09-21 14:52:59 +00:00
|
|
|
|
gtk_cell_renderer_text_get_preferred_height (GtkCellRenderer *cell,
|
|
|
|
|
GtkWidget *widget,
|
2020-07-24 13:54:49 +00:00
|
|
|
|
int *minimum_size,
|
|
|
|
|
int *natural_size)
|
2010-08-18 23:36:51 +00:00
|
|
|
|
{
|
2020-07-24 13:54:49 +00:00
|
|
|
|
int min_width;
|
2010-08-18 23:36:51 +00:00
|
|
|
|
|
|
|
|
|
/* Thankfully cell renderers dont rotate, so they only have to do
|
|
|
|
|
* height-for-width and not the opposite. Here we have only to return
|
|
|
|
|
* the height for the base minimum width of the renderer.
|
|
|
|
|
*
|
2020-08-21 12:41:13 +00:00
|
|
|
|
* Note this code path won't be followed by GtkTreeView which is
|
2010-08-18 23:36:51 +00:00
|
|
|
|
* height-for-width specifically.
|
|
|
|
|
*/
|
2010-09-21 14:52:59 +00:00
|
|
|
|
gtk_cell_renderer_get_preferred_width (cell, widget, &min_width, NULL);
|
|
|
|
|
gtk_cell_renderer_text_get_preferred_height_for_width (cell, widget, min_width,
|
|
|
|
|
minimum_size, natural_size);
|
2010-08-18 23:36:51 +00:00
|
|
|
|
}
|
|
|
|
|
|
2010-11-25 08:41:26 +00:00
|
|
|
|
static void
|
|
|
|
|
gtk_cell_renderer_text_get_aligned_area (GtkCellRenderer *cell,
|
|
|
|
|
GtkWidget *widget,
|
|
|
|
|
GtkCellRendererState flags,
|
|
|
|
|
const GdkRectangle *cell_area,
|
|
|
|
|
GdkRectangle *aligned_area)
|
|
|
|
|
{
|
|
|
|
|
GtkCellRendererText *celltext = GTK_CELL_RENDERER_TEXT (cell);
|
|
|
|
|
PangoLayout *layout;
|
2020-07-24 13:54:49 +00:00
|
|
|
|
int x_offset = 0;
|
|
|
|
|
int y_offset = 0;
|
2010-11-25 08:41:26 +00:00
|
|
|
|
|
|
|
|
|
layout = get_layout (celltext, widget, cell_area, flags);
|
|
|
|
|
get_size (cell, widget, cell_area, layout, &x_offset, &y_offset,
|
|
|
|
|
&aligned_area->width, &aligned_area->height);
|
|
|
|
|
|
|
|
|
|
aligned_area->x = cell_area->x + x_offset;
|
|
|
|
|
aligned_area->y = cell_area->y + y_offset;
|
|
|
|
|
|
|
|
|
|
g_object_unref (layout);
|
|
|
|
|
}
|