Commit 4f89cf63 authored by Morten Welinder's avatar Morten Welinder

GUI: dead kittens.

parent cfd82752
2016-04-29 Morten Welinder <terra@gnome.org>
* src/gui-util.c (gnm_style_context_get_color): Fix function
wrapping gtk_style_context_get_color which changed API.
2016-04-24 Morten Welinder <terra@gnome.org>
* src/value-sheet.c (value_area_get_x_y): Use
......
......@@ -9,6 +9,7 @@ Morten:
* Test suite improvements.
* Fix value-area problem. [#765438]
* Make xlsx shared strings parsing more robust. [#765544]
* Dead kittens.
--------------------------------------------------------------------------
Gnumeric 1.12.28
......
......@@ -267,7 +267,7 @@ text_item_renderer (AboutRenderer *r, AboutState *state)
y -= height / 2;
cr = r->cr;
gtk_style_context_get_color (ctxt, GTK_STATE_FLAG_NORMAL, &color);
gnm_style_context_get_color (ctxt, GTK_STATE_FLAG_NORMAL, &color);
color.alpha = alpha;
gdk_cairo_set_source_rgba (cr, &color);
cairo_move_to (cr, x / (double)PANGO_SCALE, y / (double)PANGO_SCALE);
......
......@@ -571,7 +571,7 @@ cb_treeview_draw (GtkWidget *widget,
context = gtk_widget_get_style_context (GTK_WIDGET (pagedata->dialog));
gtk_style_context_save (context);
gtk_style_context_add_region (context, "fixed-format-ruler", 0);
gtk_style_context_get_color (context, GTK_STATE_FLAG_NORMAL,
gnm_style_context_get_color (context, GTK_STATE_FLAG_NORMAL,
&ruler_color);
gtk_style_context_restore (context);
......
......@@ -2111,7 +2111,7 @@ gnm_pane_size_guide_start (GnmPane *pane,
gtk_style_context_add_class (context, colrow_class);
if (is_colrow_resize)
gtk_style_context_add_class (context, "end");
gtk_style_context_get_color (context, GTK_STATE_FLAG_SELECTED, &rgba);
gnm_style_context_get_color (context, GTK_STATE_FLAG_SELECTED, &rgba);
go_color_from_gdk_rgba (&rgba, &style->line.color);
if (is_colrow_resize) {
......@@ -2125,7 +2125,7 @@ gnm_pane_size_guide_start (GnmPane *pane,
gtk_style_context_add_class (context, guide_class);
gtk_style_context_add_class (context, colrow_class);
gtk_style_context_add_class (context, "start");
gtk_style_context_get_color (context, GTK_STATE_FLAG_SELECTED, &rgba);
gnm_style_context_get_color (context, GTK_STATE_FLAG_SELECTED, &rgba);
go_color_from_gdk_rgba (&rgba, &style->line.color);
style->line.width = width;
}
......@@ -2961,7 +2961,7 @@ set_acetate_coords (GnmPane *pane, SheetObject *so, GocItem **ctrl_pts,
style->line.width = 0.;
style->line.auto_color = FALSE;
style->line.color = 0;
gtk_style_context_get_color (context, GTK_STATE_FLAG_NORMAL, &rgba);
gnm_style_context_get_color (context, GTK_STATE_FLAG_NORMAL, &rgba);
go_color_from_gdk_rgba (&rgba, &style->line.fore);
go_styled_object_set_style (GO_STYLED_OBJECT (item),
style);
......
......@@ -1338,3 +1338,18 @@ gnm_action_group_add_action (GtkActionGroup *group, GtkAction *act)
*/
gtk_action_group_add_action_with_accel (group, act, NULL);
}
void
gnm_style_context_get_color (GtkStyleContext *context,
GtkStateFlags state,
GdkRGBA *color)
{
// As-of gtk+ 3.20 we have to set the context state to the state
// we are querying for. This ought to work before gtk+ 3.20 too.
gtk_style_context_save (context);
gtk_style_context_set_state (context, state);
gtk_style_context_get_color (context,
gtk_style_context_get_state (context),
color);
gtk_style_context_restore (context);
}
......@@ -183,6 +183,9 @@ void gnm_action_group_add_actions (GtkActionGroup *group,
gpointer user);
void gnm_action_group_add_action (GtkActionGroup *group, GtkAction *act);
void gnm_style_context_get_color (GtkStyleContext *context,
GtkStateFlags state,
GdkRGBA *color);
G_END_DECLS
......
......@@ -113,16 +113,17 @@ ib_reload_color_style (GnmItemBar *ib)
GtkStyleContext *context = goc_item_get_style_context (item);
unsigned ui;
gtk_style_context_get_color (context, GTK_STATE_FLAG_NORMAL,
gnm_style_context_get_color (context, GTK_STATE_FLAG_NORMAL,
&ib->grouping_color);
for (ui = 0; ui < G_N_ELEMENTS (selection_type_flags); ui++) {
GtkStateFlags state = selection_type_flags[ui];
gtk_style_context_get_color
gnm_style_context_get_color
(context, state, &ib->selection_colors[ui]);
}
}
static void
ib_reload_sizing_style (GnmItemBar *ib)
{
......@@ -353,7 +354,7 @@ ib_draw_cell (GnmItemBar const * const ib, cairo_t *cr,
if (1) {
GdkRGBA c;
gtk_style_context_get_color (ctxt, selection_type_flags[type], &c);
gnm_style_context_get_color (ctxt, selection_type_flags[type], &c);
gdk_cairo_set_source_rgba (cr, &c);
} else {
gdk_cairo_set_source_rgba (cr, &ib->selection_colors[type]);
......
......@@ -160,7 +160,7 @@ item_edit_draw (GocItem const *item, cairo_t *cr)
}
/* set the default color */
gtk_style_context_get_color (context, GTK_STATE_FLAG_NORMAL, &fcolor);
gnm_style_context_get_color (context, GTK_STATE_FLAG_NORMAL, &fcolor);
gdk_cairo_set_source_rgba (cr, &fcolor);
color = go_color_from_gdk_rgba (&fcolor, NULL);
......
......@@ -109,7 +109,7 @@ ig_reload_style (GnmItemGrid *ig)
gtk_style_context_save (context);
gtk_style_context_add_region (context, "function-marker", 0);
gtk_style_context_get_color (context, GTK_STATE_FLAG_NORMAL,
gnm_style_context_get_color (context, GTK_STATE_FLAG_NORMAL,
&ig->function_marker_color);
gtk_style_context_get_border_color (context, state,
&ig->function_marker_border_color);
......@@ -117,7 +117,7 @@ ig_reload_style (GnmItemGrid *ig)
gtk_style_context_save (context);
gtk_style_context_add_region (context, "pane-divider", 0);
gtk_style_context_get_color (context, GTK_STATE_FLAG_NORMAL,
gnm_style_context_get_color (context, GTK_STATE_FLAG_NORMAL,
&ig->pane_divider_color);
gtk_style_context_get_border (context, GTK_STATE_FLAG_NORMAL, &border);
ig->pane_divider_width = border.top; /* Hack? */
......
......@@ -70,7 +70,7 @@ comment_view_reload_style (CommentView *cv)
GtkStyleContext *context;
context = goc_item_get_style_context (item);
gtk_style_context_get_color (context, GTK_STATE_FLAG_NORMAL,
gnm_style_context_get_color (context, GTK_STATE_FLAG_NORMAL,
&cv->comment_indicator_color);
context = gtk_widget_get_style_context (GTK_WIDGET (pane));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment