Merge lp:~larsu/nautilus/remove-titlebar-css-patch into lp:~ubuntu-desktop/nautilus/ubuntu

Proposed by Lars Karlitski
Status: Merged
Approved by: Sebastien Bacher
Approved revision: 433
Merged at revision: 436
Proposed branch: lp:~larsu/nautilus/remove-titlebar-css-patch
Merge into: lp:~ubuntu-desktop/nautilus/ubuntu
Diff against target: 124 lines (+7/-94)
3 files modified
debian/changelog (+7/-0)
debian/patches/series (+0/-1)
debian/patches/ubuntu_titlebar_css.patch (+0/-93)
To merge this branch: bzr merge lp:~larsu/nautilus/remove-titlebar-css-patch
Reviewer Review Type Date Requested Status
Sebastien Bacher Approve
Review via email: mp+226317@code.launchpad.net

Commit message

Remove ubuntu_titlebar_css.patch

The relevant rules have been added to the themes.

Description of the change

Remove ubuntu_titlebar_css.patch

The relevant rules have been added to the themes.

Soft-depends on lp:~larsu/ubuntu-themes/three-twelve (it will work without, but nautilus' toolbar is styled wrong).

To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks! The themes changes are in a landing, let's wait for that to be in the archive before uploading nautilus

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2014-05-13 11:48:27 +0000
+++ debian/changelog 2014-07-10 15:12:03 +0000
@@ -1,3 +1,10 @@
1nautilus (1:3.10.1-0ubuntu12) UNRELEASED; urgency=medium
2
3 * debian/patches/ubuntu_titlebar_css.patch:
4 - Remove; the css fixes have been added to the theme
5
6 -- Lars Uebernickel <lars.uebernickel@ubuntu.com> Thu, 10 Jul 2014 17:08:31 +0200
7
1nautilus (1:3.10.1-0ubuntu11) utopic; urgency=medium8nautilus (1:3.10.1-0ubuntu11) utopic; urgency=medium
29
3 * debian/patches/git_revert_symlink_logic_change.patch:10 * debian/patches/git_revert_symlink_logic_change.patch:
411
=== modified file 'debian/patches/series'
--- debian/patches/series 2014-05-13 11:48:11 +0000
+++ debian/patches/series 2014-07-10 15:12:03 +0000
@@ -23,7 +23,6 @@
23ubuntu_show_titlebar.patch23ubuntu_show_titlebar.patch
24restore-traditional-menu-bar.patch24restore-traditional-menu-bar.patch
2516_unity_new_documents.patch2516_unity_new_documents.patch
26ubuntu_titlebar_css.patch
27ubuntu_backspace_behaviour.patch26ubuntu_backspace_behaviour.patch
28git_valid_location_widget.patch27git_valid_location_widget.patch
29ubuntu_infobars_color.patch28ubuntu_infobars_color.patch
3029
=== removed file 'debian/patches/ubuntu_titlebar_css.patch'
--- debian/patches/ubuntu_titlebar_css.patch 2014-01-25 01:49:27 +0000
+++ debian/patches/ubuntu_titlebar_css.patch 1970-01-01 00:00:00 +0000
@@ -1,93 +0,0 @@
1From: Tim Lunn <tim@feathertop.org>
2Date: Fri, 24 Jan 2014 08:24:31 +1100
3Subject: [PATCH] Override some css theming for nautilus topbar
4Description: This patch overrides a few css properties for the nautilus header bar,
5done from here rather than in the themes since nautilus uses a non-standard header
6bar implementation.
7
8---
9 src/nautilus-toolbar.c | 40 +++++++++++++++++++++++++++++++++++++++-
10 1 file changed, 39 insertions(+), 1 deletion(-)
11
12--- a/src/nautilus-toolbar.c
13+++ b/src/nautilus-toolbar.c
14@@ -81,6 +81,43 @@
15 !show_location_entry);
16 }
17
18+static void
19+toolbar_override_css (GtkWidget *widget,
20+ const gchar *name,
21+ const gchar *css_string)
22+{
23+ GtkCssProvider *css;
24+ GtkSettings* settings;
25+ GError *error = NULL;
26+ gchar *theme_name;
27+
28+ settings = gtk_settings_get_default();
29+ g_object_get(settings, "gtk-theme-name", &theme_name, NULL);
30+
31+ if (g_strcmp0(theme_name, "Ambiance") == 0 || g_strcmp0(theme_name, "Radiance") == 0)
32+ {
33+ gtk_widget_set_name (widget, name);
34+ css = gtk_css_provider_new ();
35+ if (gtk_css_provider_load_from_data (css,
36+ css_string,
37+ -1, &error))
38+ {
39+ GtkStyleContext *context = gtk_widget_get_style_context (widget);
40+ gtk_style_context_add_provider (context, (GtkStyleProvider *) css,
41+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
42+ }
43+ else
44+ {
45+ g_warning ("Error processing CSS theme override: %s", error->message);
46+ g_clear_error (&error);
47+ }
48+ g_object_unref (css);
49+ }
50+ g_free (theme_name);
51+}
52+
53+
54+
55 static GtkWidget *
56 toolbar_create_toolbutton (NautilusToolbar *self,
57 gboolean create_menu,
58@@ -91,6 +128,7 @@
59 GtkWidget *button, *image;
60 GtkActionGroup *action_group;
61 GtkAction *action;
62+ const gchar *css_string;
63
64 action_group = nautilus_window_get_main_action_group (self->priv->window);
65
66@@ -117,6 +155,9 @@
67 gtk_widget_set_tooltip_text (button, gtk_action_get_tooltip (action));
68 }
69
70+ css_string = "GtkButton#toolbar-button {padding: 9px;}";
71+ toolbar_override_css (button, "toolbar-button", css_string);
72+
73 return button;
74 }
75
76@@ -399,6 +440,7 @@
77 GtkWidget *separator;
78 GtkUIManager *ui_manager;
79 gboolean rtl;
80+ const gchar *css_string;
81
82 G_OBJECT_CLASS (nautilus_toolbar_parent_class)->constructed (obj);
83
84@@ -408,6 +450,9 @@
85 self->priv->toolbar = toolbar = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
86 gtk_container_add (GTK_CONTAINER (self), toolbar);
87
88+ css_string = ".header-bar { border-radius: 0; padding: 1px;}";
89+ toolbar_override_css (GTK_WIDGET (self), "toolbar", css_string);
90+
91 rtl = gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL;
92
93 ui_manager = nautilus_window_get_ui_manager (self->priv->window);

Subscribers

People subscribed via source and target branches

to all changes: