summaryrefslogtreecommitdiff
path: root/grc/src/platforms/gui
diff options
context:
space:
mode:
Diffstat (limited to 'grc/src/platforms/gui')
-rw-r--r--grc/src/platforms/gui/Block.py2
-rw-r--r--grc/src/platforms/gui/FlowGraph.py3
-rw-r--r--grc/src/platforms/gui/Port.py2
3 files changed, 3 insertions, 4 deletions
diff --git a/grc/src/platforms/gui/Block.py b/grc/src/platforms/gui/Block.py
index 4aa35bf03..b574892d3 100644
--- a/grc/src/platforms/gui/Block.py
+++ b/grc/src/platforms/gui/Block.py
@@ -146,7 +146,7 @@ class Block(Element):
width = self.label_width
height = self.label_height
#setup the pixmap
- pixmap = gtk.gdk.Pixmap(self.get_parent().get_window(), width, height, -1)
+ pixmap = self.get_parent().new_pixmap(width, height)
gc = pixmap.new_gc()
gc.foreground = self.bg_color
pixmap.draw_rectangle(gc, True, 0, 0, width, height)
diff --git a/grc/src/platforms/gui/FlowGraph.py b/grc/src/platforms/gui/FlowGraph.py
index 82b45dc03..7e2330669 100644
--- a/grc/src/platforms/gui/FlowGraph.py
+++ b/grc/src/platforms/gui/FlowGraph.py
@@ -63,10 +63,9 @@ class FlowGraph(Element):
def queue_draw(self): self.get_drawing_area().queue_draw()
def get_size(self): return self.get_drawing_area().get_size_request()
def set_size(self, *args): self.get_drawing_area().set_size_request(*args)
- def get_window(self): return self.get_drawing_area().window
- def get_pixmap(self): return self.get_drawing_area().pixmap
def get_scroll_pane(self): return self.drawing_area.get_parent()
def get_ctrl_mask(self): return self.drawing_area.ctrl_mask
+ def new_pixmap(self, *args): return self.get_drawing_area().new_pixmap(*args)
def add_new_block(self, key, coor=None):
"""
diff --git a/grc/src/platforms/gui/Port.py b/grc/src/platforms/gui/Port.py
index 3aec6e4a7..a763e406d 100644
--- a/grc/src/platforms/gui/Port.py
+++ b/grc/src/platforms/gui/Port.py
@@ -91,7 +91,7 @@ class Port(Element):
self.w, self.h = layout.get_pixel_size()
self.W, self.H = 2*PORT_LABEL_PADDING+self.w, 2*PORT_LABEL_PADDING+self.h
#create the pixmap
- pixmap = gtk.gdk.Pixmap(self.get_parent().get_parent().get_window(), self.w, self.h, -1)
+ pixmap = self.get_parent().get_parent().new_pixmap(self.w, self.h)
gc = pixmap.new_gc()
gc.foreground = self.BG_color
pixmap.draw_rectangle(gc, True, 0, 0, self.w, self.h)