[meld] bin/meld: Update to use GtkCssProvider instead of gtkrc
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] bin/meld: Update to use GtkCssProvider instead of gtkrc
- Date: Tue, 31 Dec 2013 02:28:22 +0000 (UTC)
commit ba157e056aee9522a9d13d1ba587e5f02649e69a
Author: Kai Willadsen <kai willadsen gmail com>
Date: Tue Dec 31 12:19:54 2013 +1000
bin/meld: Update to use GtkCssProvider instead of gtkrc
bin/meld | 9 +++++++--
data/gtkrc | 35 -----------------------------------
data/meld.css | 21 +++++++++++++++++++++
3 files changed, 28 insertions(+), 37 deletions(-)
---
diff --git a/bin/meld b/bin/meld
index c1dc9a3..d32838f 100755
--- a/bin/meld
+++ b/bin/meld
@@ -150,12 +150,17 @@ def check_requirements():
def setup_resources():
from gi.repository import GObject
from gi.repository import Gtk
+ from gi.repository import Gdk
GObject.threads_init()
icon_dir = os.path.join(meld.conf.DATADIR, "icons")
Gtk.IconTheme.get_default().append_search_path(icon_dir)
- rc_file = os.path.join(meld.conf.DATADIR, "gtkrc")
- Gtk.rc_parse(rc_file)
+ css_file = os.path.join(meld.conf.DATADIR, "meld.css")
+ provider = Gtk.CssProvider()
+ provider.load_from_path(css_file)
+ Gtk.StyleContext.add_provider_for_screen(
+ Gdk.Screen.get_default(), provider,
+ Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
def setup_settings():
diff --git a/data/meld.css b/data/meld.css
new file mode 100644
index 0000000..61ed386
--- /dev/null
+++ b/data/meld.css
@@ -0,0 +1,21 @@
+
+ define-color insert-bg #d0ffa3;
+ define-color insert-outline shade(@insert-bg, 0.8);
+ define-color insert-text #008800;
+ define-color delete-bg White;
+ define-color delete-outline shade(@delete-bg, 0.8);
+ define-color delete-text #880000;
+ define-color replace-bg #bdddff;
+ define-color replace-outline shade(@replace-bg, 0.8);
+ define-color replace-text #0044dd;
+ define-color conflict-bg #ffa5a3;
+ define-color conflict-outline shade(@conflict-bg, 0.8);
+ define-color conflict-text #ff0000;
+ define-color error-bg #fce94f;
+ define-color error-outline shade(@error-bg, 0.8);
+ define-color error-text #faad3d;
+ define-color inline-bg #8ac2ff;
+ define-color unknown-text #888888;
+ define-color current-line-highlight #ffff00;
+ define-color syncpoint-outline #555555;
+ define-color current-chunk-highlight #ffffff;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]