forked from AuroraMiddleware/gtk
Undo bogus commit.
This commit is contained in:
parent
cbd7e2aab9
commit
1830558a3e
@ -33,8 +33,7 @@ typedef enum
|
||||
GTK_CELL_RENDERER_INSENSITIVE = 1 << 2,
|
||||
/* this flag means the cell is in the sort column/row */
|
||||
GTK_CELL_RENDERER_SORTED = 1 << 3,
|
||||
GTK_CELL_RENDERER_FOCUSED = 1 << 4,
|
||||
GTK_CELL_RENDERER_USE_FG = 1 << 5
|
||||
GTK_CELL_RENDERER_FOCUSED = 1 << 4
|
||||
} GtkCellRendererState;
|
||||
|
||||
typedef enum
|
||||
|
@ -1624,7 +1624,6 @@ gtk_cell_renderer_text_render (GtkCellRenderer *cell,
|
||||
gint x_offset;
|
||||
gint y_offset;
|
||||
GtkCellRendererTextPrivate *priv;
|
||||
gboolean use_text;
|
||||
|
||||
priv = GTK_CELL_RENDERER_TEXT_GET_PRIVATE (cell);
|
||||
|
||||
@ -1676,8 +1675,6 @@ gtk_cell_renderer_text_render (GtkCellRenderer *cell,
|
||||
cairo_destroy (cr);
|
||||
}
|
||||
|
||||
use_text = !(flags & GTK_CELL_RENDERER_USE_FG);
|
||||
|
||||
if (priv->ellipsize_set && priv->ellipsize != PANGO_ELLIPSIZE_NONE)
|
||||
pango_layout_set_width (layout,
|
||||
(cell_area->width - x_offset - 2 * cell->xpad) * PANGO_SCALE);
|
||||
@ -1687,7 +1684,7 @@ gtk_cell_renderer_text_render (GtkCellRenderer *cell,
|
||||
gtk_paint_layout (widget->style,
|
||||
window,
|
||||
state,
|
||||
use_text,
|
||||
TRUE,
|
||||
expose_area,
|
||||
widget,
|
||||
"cellrenderertext",
|
||||
|
@ -54,8 +54,6 @@ struct _GtkCellViewPrivate
|
||||
|
||||
GdkColor background;
|
||||
gboolean background_set;
|
||||
|
||||
gboolean use_fg;
|
||||
};
|
||||
|
||||
|
||||
@ -115,8 +113,7 @@ enum
|
||||
PROP_BACKGROUND,
|
||||
PROP_BACKGROUND_GDK,
|
||||
PROP_BACKGROUND_SET,
|
||||
PROP_MODEL,
|
||||
PROP_USE_FG
|
||||
PROP_MODEL
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GtkCellView, gtk_cell_view, GTK_TYPE_WIDGET,
|
||||
@ -168,21 +165,6 @@ gtk_cell_view_class_init (GtkCellViewClass *klass)
|
||||
GTK_TYPE_TREE_MODEL,
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
/**
|
||||
* GtkCellView:use-fg
|
||||
*
|
||||
* If set to %TRUE hint the cell renderer to use foreground colors for text drawing.
|
||||
*
|
||||
* since 2.12
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_USE_FG,
|
||||
g_param_spec_boolean ("use-fg",
|
||||
P_("Use foreground color when rendering text"),
|
||||
P_("If set the cell view will get a hint to use the foreground color when rendering text."),
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
#define ADD_SET_PROP(propname, propval, nick, blurb) g_object_class_install_property (gobject_class, propval, g_param_spec_boolean (propname, nick, blurb, FALSE, GTK_PARAM_READWRITE))
|
||||
|
||||
ADD_SET_PROP ("background-set", PROP_BACKGROUND_SET,
|
||||
@ -226,9 +208,6 @@ gtk_cell_view_get_property (GObject *object,
|
||||
case PROP_BACKGROUND_SET:
|
||||
g_value_set_boolean (value, view->priv->background_set);
|
||||
break;
|
||||
case PROP_USE_FG:
|
||||
g_value_set_boolean (value, view->priv->use_fg);
|
||||
break;
|
||||
case PROP_MODEL:
|
||||
g_value_set_object (value, view->priv->model);
|
||||
break;
|
||||
@ -268,9 +247,6 @@ gtk_cell_view_set_property (GObject *object,
|
||||
case PROP_BACKGROUND_SET:
|
||||
view->priv->background_set = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_USE_FG:
|
||||
gtk_cell_view_set_use_fg (view, g_value_get_boolean (value));
|
||||
break;
|
||||
case PROP_MODEL:
|
||||
gtk_cell_view_set_model (view, g_value_get_object (value));
|
||||
break;
|
||||
@ -452,10 +428,7 @@ gtk_cell_view_expose (GtkWidget *widget,
|
||||
state = GTK_CELL_RENDERER_PRELIT;
|
||||
else
|
||||
state = 0;
|
||||
|
||||
if (cellview->priv->use_fg)
|
||||
state |= GTK_CELL_RENDERER_USE_FG;
|
||||
|
||||
|
||||
/* PACK_START */
|
||||
for (i = cellview->priv->cell_list; i; i = i->next)
|
||||
{
|
||||
@ -1056,52 +1029,6 @@ gtk_cell_view_set_background_color (GtkCellView *cell_view,
|
||||
gtk_widget_queue_draw (GTK_WIDGET (cell_view));
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_cell_view_set_use_fg
|
||||
* @cell_view: a #GtkCellView
|
||||
* @use_fg: %TRUE if foreground colors should be used for text
|
||||
*
|
||||
* Sets whether to hint the cell renderer that foreground colors should be used when rendering text.
|
||||
*
|
||||
* Since: 2.12
|
||||
*/
|
||||
void
|
||||
gtk_cell_view_set_use_fg (GtkCellView *cell_view,
|
||||
gboolean use_fg)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_CELL_VIEW (cell_view));
|
||||
|
||||
use_fg = (use_fg != FALSE);
|
||||
|
||||
if (use_fg != cell_view->priv->use_fg)
|
||||
{
|
||||
cell_view->priv->use_fg = use_fg;
|
||||
|
||||
gtk_widget_queue_draw (GTK_WIDGET (cell_view));
|
||||
|
||||
g_object_notify (G_OBJECT (cell_view), "use-fg");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_cell_view_get_use_fg
|
||||
* @cell_view: a #GtkCellView
|
||||
*
|
||||
* Get whether the #GtkCellView hints the cell renderer that foreground colors
|
||||
* should be used when rendering text. See gtk_cell_view_set_use_fg().
|
||||
*
|
||||
* Returns: The value of the "use-fg" property
|
||||
*
|
||||
* Since: 2.12
|
||||
*/
|
||||
gboolean
|
||||
gtk_cell_view_get_use_fg (GtkCellView *cell_view)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_CELL_VIEW (cell_view), FALSE);
|
||||
|
||||
return cell_view->priv->use_fg;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_cell_view_get_cell_renderers:
|
||||
* @cell_view: a #GtkCellView
|
||||
|
@ -67,9 +67,6 @@ gboolean gtk_cell_view_get_size_of_row (GtkCellView *cell_v
|
||||
|
||||
void gtk_cell_view_set_background_color (GtkCellView *cell_view,
|
||||
const GdkColor *color);
|
||||
void gtk_cell_view_set_use_fg (GtkCellView *cell_view,
|
||||
gboolean use_fg);
|
||||
gboolean gtk_cell_view_get_use_fg (GtkCellView *cell_view);
|
||||
GList *gtk_cell_view_get_cell_renderers (GtkCellView *cell_view);
|
||||
|
||||
G_END_DECLS
|
||||
|
@ -2569,8 +2569,6 @@ gtk_combo_box_menu_setup (GtkComboBox *combo_box,
|
||||
|
||||
if (combo_box->priv->cell_view)
|
||||
{
|
||||
gtk_cell_view_set_use_fg (GTK_CELL_VIEW (combo_box->priv->cell_view), TRUE);
|
||||
|
||||
combo_box->priv->button = gtk_toggle_button_new ();
|
||||
gtk_button_set_focus_on_click (GTK_BUTTON (combo_box->priv->button),
|
||||
combo_box->priv->focus_on_click);
|
||||
@ -2674,7 +2672,6 @@ gtk_cell_view_menu_item_new (GtkComboBox *combo_box,
|
||||
GtkRequisition req;
|
||||
|
||||
cell_view = gtk_cell_view_new ();
|
||||
gtk_cell_view_set_use_fg (GTK_CELL_VIEW (cell_view), TRUE);
|
||||
item = gtk_menu_item_new ();
|
||||
gtk_container_add (GTK_CONTAINER (item), cell_view);
|
||||
|
||||
@ -3380,7 +3377,6 @@ gtk_combo_box_list_setup (GtkComboBox *combo_box)
|
||||
|
||||
if (combo_box->priv->cell_view)
|
||||
{
|
||||
gtk_cell_view_set_use_fg (GTK_CELL_VIEW (combo_box->priv->cell_view), FALSE);
|
||||
gtk_cell_view_set_background_color (GTK_CELL_VIEW (combo_box->priv->cell_view),
|
||||
>K_WIDGET (combo_box)->style->base[GTK_WIDGET_STATE (combo_box)]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user