]> git.0d.be Git - empathy.git/commitdiff
Define a style class for the tab close button
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 25 May 2012 07:32:32 +0000 (09:32 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 25 May 2012 07:32:32 +0000 (09:32 +0200)
Seems that's the proper way to do it.

data/empathy.css
src/empathy-chat-window.c

index d0c13684dc175ca5237b913b299c9da19327fdbb..628800234055f6caf922aaad205f60e89a311c24 100644 (file)
@@ -1,4 +1,4 @@
-#empathy-tab-close-button {
+.empathy-tab-close-button {
   -GtkButton-default-border : 0;
   -GtkButton-default-outside-border : 0;
   -GtkButton-inner-border: 0;
index 990640ede40326db36a395d5fcc1034d3d12e443..f9c1d20970db3c70ef57fe77984d338d0557e63a 100644 (file)
@@ -415,10 +415,12 @@ static GtkWidget *
 create_close_button (void)
 {
        GtkWidget *button, *image;
+       GtkStyleContext *context;
 
        button = gtk_button_new ();
 
-       gtk_widget_set_name (button, "empathy-tab-close-button");
+       context = gtk_widget_get_style_context (button);
+       gtk_style_context_add_class (context, "empathy-tab-close-button");
 
        gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE);
        gtk_button_set_focus_on_click (GTK_BUTTON (button), FALSE);