[gimp/gtk3-port: 241/249] app: port the text tool editor's preedit popup to GtkStyleContext
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 241/249] app: port the text tool editor's preedit popup to GtkStyleContext
- Date: Mon, 21 Mar 2011 20:57:31 +0000 (UTC)
commit 015b755a97ba1c239664fda00d508f3078893a1e
Author: Michael Natterer <mitch gimp org>
Date: Sun Feb 27 15:15:37 2011 +0100
app: port the text tool editor's preedit popup to GtkStyleContext
app/tools/gimptexttool-editor.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/app/tools/gimptexttool-editor.c b/app/tools/gimptexttool-editor.c
index 9f0aef6..ab029fc 100644
--- a/app/tools/gimptexttool-editor.c
+++ b/app/tools/gimptexttool-editor.c
@@ -1262,7 +1262,6 @@ gimp_text_tool_im_preedit_start (GtkIMContext *context,
{
GimpTool *tool = GIMP_TOOL (text_tool);
GimpDisplayShell *shell = gimp_display_get_shell (tool->display);
- GtkStyle *style = gtk_widget_get_style (shell->canvas);
GtkWidget *frame;
GtkWidget *ebox;
PangoRectangle cursor_rect = { 0, };
@@ -1293,14 +1292,14 @@ gimp_text_tool_im_preedit_start (GtkIMContext *context,
gtk_widget_show (frame);
ebox = gtk_event_box_new ();
- gtk_widget_modify_bg (ebox, GTK_STATE_NORMAL,
- &style->base[GTK_STATE_NORMAL]);
+ gtk_style_context_add_class (gtk_widget_get_style_context (ebox),
+ GTK_STYLE_CLASS_ENTRY);
gtk_container_add (GTK_CONTAINER (frame), ebox);
gtk_widget_show (ebox);
text_tool->preedit_label = gtk_label_new (NULL);
- gtk_widget_modify_bg (text_tool->preedit_label, GTK_STATE_NORMAL,
- &style->text[GTK_STATE_NORMAL]);
+ gtk_style_context_add_class (gtk_widget_get_style_context (text_tool->preedit_label),
+ GTK_STYLE_CLASS_ENTRY);
gtk_misc_set_padding (GTK_MISC (text_tool->preedit_label), 2, 2);
gtk_container_add (GTK_CONTAINER (ebox), text_tool->preedit_label);
gtk_widget_show (text_tool->preedit_label);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]