r43704 - in /desktop/unstable/gnome-panel/debian: changelog patches/add_css_file.patch patches/series

mitya57-guest at users.alioth.debian.org mitya57-guest at users.alioth.debian.org
Mon Oct 20 14:12:11 UTC 2014


Author: mitya57-guest
Date: Mon Oct 20 14:12:11 2014
New Revision: 43704

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=43704
Log:
Add a CSS file for Adwaita and HighContrast themes (closes: #765835).

Added:
    desktop/unstable/gnome-panel/debian/patches/add_css_file.patch
Modified:
    desktop/unstable/gnome-panel/debian/changelog
    desktop/unstable/gnome-panel/debian/patches/series

Modified: desktop/unstable/gnome-panel/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-panel/debian/changelog?rev=43704&op=diff
==============================================================================
--- desktop/unstable/gnome-panel/debian/changelog	[utf-8] (original)
+++ desktop/unstable/gnome-panel/debian/changelog	[utf-8] Mon Oct 20 14:12:11 2014
@@ -1,6 +1,7 @@
 gnome-panel (3.8.1-5) UNRELEASED; urgency=medium
 
   * Update Homepage URL.
+  * Add a CSS file for Adwaita and HighContrast themes (closes: #765835).
 
  -- Dmitry Shachnev <mitya57 at debian.org>  Fri, 17 Oct 2014 10:07:10 +0400
 

Added: desktop/unstable/gnome-panel/debian/patches/add_css_file.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-panel/debian/patches/add_css_file.patch?rev=43704&op=file
==============================================================================
--- desktop/unstable/gnome-panel/debian/patches/add_css_file.patch	(added)
+++ desktop/unstable/gnome-panel/debian/patches/add_css_file.patch	[utf-8] Mon Oct 20 14:12:11 2014
@@ -0,0 +1,133 @@
+Description: add a CSS file to gnome-panel
+Origin: based on upstream wip/gnome-3.10+ branch
+Last-Update: 2014-10-20
+
+--- a/gnome-panel/Makefile.am
++++ b/gnome-panel/Makefile.am
+@@ -273,6 +273,7 @@
+ EXTRA_DIST =					\
+ 	$(ui_FILES)				\
+ 	panel.gresource.xml			\
++	gnome-panel.css				\
+ 	$(uitest_FILES)				\
+ 	panel-test-applets.gresource.xml	\
+ 	nothing.cP				\
+--- a/gnome-panel/main.c
++++ b/gnome-panel/main.c
+@@ -36,18 +36,52 @@
+ GSList *panel_list = NULL;
+ 
+ static gboolean  replace = FALSE;
++static GtkCssProvider *provider = NULL;
+ 
+ static const GOptionEntry options[] = {
+   { "replace", 0, 0, G_OPTION_ARG_NONE, &replace, N_("Replace a currently running panel"), NULL },
+   { NULL }
+ };
+ 
++static void
++theme_changed (GtkSettings *settings)
++{
++	GdkScreen *screen;
++	gchar     *theme;
++
++	screen = gdk_screen_get_default ();
++	g_object_get (settings, "gtk-theme-name", &theme, NULL);
++
++	if (g_str_equal (theme, "Adwaita") || g_str_equal (theme, "HighContrast")) {
++		if (provider == NULL) {
++			GFile *file;
++
++			file = g_file_new_for_uri ("resource:///org/gnome/panel/gnome-panel.css");
++			provider = gtk_css_provider_new ();
++
++			gtk_css_provider_load_from_file (provider, file, NULL);
++
++			g_object_unref (file);
++		}
++
++		gtk_style_context_add_provider_for_screen (screen, GTK_STYLE_PROVIDER (provider),
++		                                           GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
++	} else if (provider != NULL) {
++		gtk_style_context_remove_provider_for_screen (screen, GTK_STYLE_PROVIDER (provider));
++		g_object_unref (provider);
++		provider = NULL;
++	}
++
++	g_free (theme);
++}
++
+ int
+ main (int argc, char **argv)
+ {
+ 	char           *desktopfile;
+ 	GOptionContext *context;
+ 	GError         *error;
++	GtkSettings    *settings;
+ 
+ 	bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
+ 	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+@@ -112,6 +146,10 @@
+ 	 * connecting to the session manager */
+ 	panel_session_init ();
+ 
++	settings = gtk_settings_get_default ();
++	g_signal_connect (settings, "notify::gtk-theme-name", G_CALLBACK (theme_changed), NULL);
++	theme_changed (settings);
++
+ 	gtk_main ();
+ 
+ 	panel_cleanup_do ();
+--- a/gnome-panel/panel.gresource.xml
++++ b/gnome-panel/panel.gresource.xml
+@@ -4,5 +4,6 @@
+     <file compressed="true">panel-properties-dialog.ui</file>
+     <file compressed="true">panel-run-dialog.ui</file>
+     <file alias="anim/wanda.png">../applets/fish/wanda.png</file>
++    <file>gnome-panel.css</file>
+   </gresource>
+ </gresources>
+--- /dev/null
++++ b/gnome-panel/gnome-panel.css
+@@ -0,0 +1,41 @@
++.gnome-panel-menu-bar,
++PanelApplet > GtkMenuBar.menubar,
++PanelWidget {
++	background-color: @theme_unfocused_bg_color;
++}
++
++.gnome-panel-menu-bar,
++PanelApplet > GtkMenuBar.menubar,
++ClockBox {
++	font: bold;
++	color: @theme_unfocused_fg_color;
++}
++
++.gnome-panel-menu-bar .menu,
++PanelApplet > GtkMenuBar.menubar .menu {
++	font: regular;
++}
++
++.gnome-panel-menu-bar .menuitem:hover,
++PanelApplet > GtkMenuBar.menubar .menuitem:hover {
++	background-color: @theme_selected_bg_color;
++	color: @theme_selected_fg_color;
++}
++
++PanelApplet GtkButton#tasklist-button,
++PanelApplet GtkButton#clock-applet-button,
++PanelApplet GtkButton#showdesktop-button {
++	padding: 0px 4px;
++	color: @theme_unfocused_fg_color;
++	border: 0;
++	border-radius: 0;
++}
++
++WnckPager:selected {
++	background-color: @theme_selected_bg_color;
++}
++
++NaTrayApplet {
++	-NaTrayApplet-icon-padding: 2;
++	-NaTrayApplet-icon-size: 16;
++}

Modified: desktop/unstable/gnome-panel/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-panel/debian/patches/series?rev=43704&op=diff
==============================================================================
--- desktop/unstable/gnome-panel/debian/patches/series	[utf-8] (original)
+++ desktop/unstable/gnome-panel/debian/patches/series	[utf-8] Mon Oct 20 14:12:11 2014
@@ -3,3 +3,4 @@
 fix_crash_on_adding.patch
 fix_huge_icons.patch
 end_session_async.patch
+add_css_file.patch




More information about the pkg-gnome-commits mailing list