diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-05-24 18:19:12 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-05-24 18:31:01 +0800 |
commit | b428a3009df0ea065b26991e87eb5759499c85a0 (patch) | |
tree | 27cb2444665f071bccb15d04c17d5f786b531574 | |
parent | bf821168dfb8c2e835cdf57a1c313841ee0dd763 (diff) | |
download | gsoc2013-empathy-b428a3009df0ea065b26991e87eb5759499c85a0.tar gsoc2013-empathy-b428a3009df0ea065b26991e87eb5759499c85a0.tar.gz gsoc2013-empathy-b428a3009df0ea065b26991e87eb5759499c85a0.tar.bz2 gsoc2013-empathy-b428a3009df0ea065b26991e87eb5759499c85a0.tar.lz gsoc2013-empathy-b428a3009df0ea065b26991e87eb5759499c85a0.tar.xz gsoc2013-empathy-b428a3009df0ea065b26991e87eb5759499c85a0.tar.zst gsoc2013-empathy-b428a3009df0ea065b26991e87eb5759499c85a0.zip |
gedit-close-button: move CSS bits to empathy.css
https://bugzilla.gnome.org/show_bug.cgi?id=669473
-rw-r--r-- | data/empathy.css | 8 | ||||
-rw-r--r-- | src/empathy-auth-client.c | 2 | ||||
-rw-r--r-- | src/empathy-call-window.c | 2 | ||||
-rw-r--r-- | src/empathy-chat-window.c | 2 | ||||
-rw-r--r-- | src/empathy-debug-window.c | 2 | ||||
-rw-r--r-- | src/empathy-roster-window.c | 2 | ||||
-rw-r--r-- | src/gedit-close-button.c | 21 |
7 files changed, 14 insertions, 25 deletions
diff --git a/data/empathy.css b/data/empathy.css index e69de29bb..d0c13684d 100644 --- a/data/empathy.css +++ b/data/empathy.css @@ -0,0 +1,8 @@ +#empathy-tab-close-button { + -GtkButton-default-border : 0; + -GtkButton-default-outside-border : 0; + -GtkButton-inner-border: 0; + -GtkWidget-focus-line-width : 0; + -GtkWidget-focus-padding : 0; + padding: 0; +} diff --git a/src/empathy-auth-client.c b/src/empathy-auth-client.c index 837988e2b..8de7b5c52 100644 --- a/src/empathy-auth-client.c +++ b/src/empathy-auth-client.c @@ -310,7 +310,7 @@ main (int argc, textdomain (GETTEXT_PACKAGE); /* There is no 'main' UI window so just use the default GdkScreen */ - empathy_set_rss_provider (NULL); + empathy_set_css_provider (NULL); #ifdef ENABLE_DEBUG /* Set up debug sender */ diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index 73768f9c5..437c8f544 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -1615,7 +1615,7 @@ empathy_call_window_init (EmpathyCallWindow *self) "menupreviewswap", "activate", empathy_call_window_swap_camera_cb, NULL); - empathy_set_rss_provider (GTK_WIDGET (self)); + empathy_set_css_provider (GTK_WIDGET (self)); /* FIXME: we should use a stock "OSD" style class for the toolbar, * once it's available in GTK+/Adwaita. diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c index 2ca19dad2..10210915e 100644 --- a/src/empathy-chat-window.c +++ b/src/empathy-chat-window.c @@ -2307,7 +2307,7 @@ empathy_chat_window_init (EmpathyChatWindow *window) g_object_ref (priv->ui_manager); g_object_unref (gui); - empathy_set_rss_provider (GTK_WIDGET (priv->dialog)); + empathy_set_css_provider (GTK_WIDGET (priv->dialog)); priv->gsettings_chat = g_settings_new (EMPATHY_PREFS_CHAT_SCHEMA); priv->gsettings_notif = g_settings_new (EMPATHY_PREFS_NOTIFICATIONS_SCHEMA); diff --git a/src/empathy-debug-window.c b/src/empathy-debug-window.c index eeb7692a8..b2e229da2 100644 --- a/src/empathy-debug-window.c +++ b/src/empathy-debug-window.c @@ -1855,7 +1855,7 @@ am_prepared_cb (GObject *am, g_clear_error (&error); } - empathy_set_rss_provider (GTK_WIDGET (object)); + empathy_set_css_provider (GTK_WIDGET (object)); gtk_window_set_title (GTK_WINDOW (object), _("Debug Window")); gtk_window_set_default_size (GTK_WINDOW (object), 800, 400); diff --git a/src/empathy-roster-window.c b/src/empathy-roster-window.c index 5b9842dcc..efc5533e9 100644 --- a/src/empathy-roster-window.c +++ b/src/empathy-roster-window.c @@ -2144,7 +2144,7 @@ empathy_roster_window_init (EmpathyRosterWindow *self) self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, EMPATHY_TYPE_ROSTER_WINDOW, EmpathyRosterWindowPriv); - empathy_set_rss_provider (GTK_WIDGET (self)); + empathy_set_css_provider (GTK_WIDGET (self)); self->priv->gsettings_ui = g_settings_new (EMPATHY_PREFS_UI_SCHEMA); self->priv->gsettings_contacts = g_settings_new (EMPATHY_PREFS_CONTACTS_SCHEMA); diff --git a/src/gedit-close-button.c b/src/gedit-close-button.c index 6a9021aeb..5418643d8 100644 --- a/src/gedit-close-button.c +++ b/src/gedit-close-button.c @@ -33,26 +33,11 @@ G_DEFINE_TYPE_WITH_CODE (GeditCloseButton, gedit_close_button, GTK_TYPE_BUTTON, static void gedit_close_button_class_init (GeditCloseButtonClass *klass) { - static const gchar button_style[] = - "* {\n" - "-GtkButton-default-border : 0;\n" - "-GtkButton-default-outside-border : 0;\n" - "-GtkButton-inner-border: 0;\n" - "-GtkWidget-focus-line-width : 0;\n" - "-GtkWidget-focus-padding : 0;\n" - "padding: 0;\n" - "}"; - - klass->priv = G_TYPE_CLASS_GET_PRIVATE (klass, GEDIT_TYPE_CLOSE_BUTTON, GeditCloseButtonClassPrivate); - - klass->priv->css = gtk_css_provider_new (); - gtk_css_provider_load_from_data (klass->priv->css, button_style, -1, NULL); } static void gedit_close_button_init (GeditCloseButton *button) { - GtkStyleContext *context; GtkWidget *image; image = gtk_image_new_from_stock (GTK_STOCK_CLOSE, @@ -61,11 +46,7 @@ gedit_close_button_init (GeditCloseButton *button) gtk_container_add (GTK_CONTAINER (button), image); - /* make it small */ - context = gtk_widget_get_style_context (GTK_WIDGET (button)); - gtk_style_context_add_provider (context, - GTK_STYLE_PROVIDER (GEDIT_CLOSE_BUTTON_GET_CLASS (button)->priv->css), - GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); + gtk_widget_set_name (GTK_WIDGET (button), "empathy-tab-close-button"); } GtkWidget * |