[meld: 166/180] dirdiff: Remove style handling, as diffmap does this itself now
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld: 166/180] dirdiff: Remove style handling, as diffmap does this itself now
- Date: Thu, 23 Jul 2015 21:45:19 +0000 (UTC)
commit e3e8cb38ab80af5f5c88a39347f8f300ce0ef065
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun Jan 11 05:58:41 2015 +1000
dirdiff: Remove style handling, as diffmap does this itself now
Unfortunately, this means that we're going to be using a sourceview
theme for directory highlighting as well, which... doesn't feel like it
makes a whole lot of sense. However, since we need both themes to be
coordinated, I can't see a sane way around this.
meld/dirdiff.py | 27 +--------------------------
1 files changed, 1 insertions(+), 26 deletions(-)
---
diff --git a/meld/dirdiff.py b/meld/dirdiff.py
index 68c98a9..ccbe450 100644
--- a/meld/dirdiff.py
+++ b/meld/dirdiff.py
@@ -343,8 +343,6 @@ class DirDiff(melddoc.MeldDoc, gnomeglade.Component):
"file_toolbar"])
self.widget.ensure_style()
- self.on_style_updated(self.widget)
- self.widget.connect("style-updated", self.on_style_updated)
self.custom_labels = []
self.set_num_panes(num_panes)
@@ -445,29 +443,6 @@ class DirDiff(melddoc.MeldDoc, gnomeglade.Component):
self._scan_in_progress = 0
- def on_style_updated(self, widget):
- style = widget.get_style_context()
-
- def lookup(name, default):
- found, colour = style.lookup_color(name)
- if not found:
- colour = Gdk.RGBA()
- colour.parse(default)
- return colour
-
- self.fill_colors = {"insert" : lookup("insert-bg", "DarkSeaGreen1"),
- "delete" : lookup("delete-bg", "White"),
- "replace" : lookup("replace-bg", "#ddeeff"),
- "error" : lookup("error-bg", "#fce94f")}
- self.line_colors = {"insert" : lookup("insert-outline", "#77f077"),
- "delete" : lookup("delete-outline", "Grey"),
- "replace" : lookup("replace-outline", "#8bbff3"),
- "error" : lookup("error-outline", "#edd400")}
-
- for diffmap in self.diffmap:
- diffmap.set_color_scheme([self.fill_colors, self.line_colors])
- self.queue_draw()
-
def queue_draw(self):
for treeview in self.treeview:
treeview.queue_draw()
@@ -1485,7 +1460,7 @@ class DirDiff(melddoc.MeldDoc, gnomeglade.Component):
for (w, i) in zip(self.diffmap, (0, n - 1)):
scroll = self.scrolledwindow[i].get_vscrollbar()
idx = 1 if i else 0
- w.setup(scroll, self.get_state_traversal(idx), [self.fill_colors, self.line_colors])
+ w.setup(scroll, self.get_state_traversal(idx))
for w in self.linkmap:
w.associate(self)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]