Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKshitij <Kshitij@Kshitijs-MacBook-Pro.local>2012-12-15 07:11:16 (GMT)
committer Kshitij <Kshitij@Kshitijs-MacBook-Pro.local>2012-12-15 07:11:16 (GMT)
commitc7a4008febaf8f588666c560914aa9604684f749 (patch)
tree0fd08cc65671d7cbab6e7fcd32220645ecdfc878
parent400129c195bae015ad53699c957bdf5b729f8a59 (diff)
fixed gdk
-rw-r--r--drawwaveform.py34
-rw-r--r--measure.py8
-rw-r--r--toolbar_side.py2
3 files changed, 22 insertions, 22 deletions
diff --git a/drawwaveform.py b/drawwaveform.py
index c9be8fb..9679ad5 100644
--- a/drawwaveform.py
+++ b/drawwaveform.py
@@ -48,8 +48,8 @@ class DrawWaveform(Gtk.DrawingArea):
""" Initialize drawing area and scope parameter """
Gtk.DrawingArea.__init__(self)
- self.add_events(Gtk.gdk.BUTTON_PRESS_MASK | \
- Gtk.gdk.PROPERTY_CHANGE_MASK)
+ self.add_events(Gdk.BUTTON_PRESS_MASK | \
+ Gdk.PROPERTY_CHANGE_MASK)
self.activity = activity
self._input_freq = input_frequency
@@ -63,7 +63,7 @@ class DrawWaveform(Gtk.DrawingArea):
self.bias = [] # vertical position fine-tuning from slider
self.active = False
- self._redraw_atom = Gtk.gdk.atom_intern('MeasureRedraw')
+ self._redraw_atom = Gdk.atom_intern('MeasureRedraw')
self.buffers = array([])
self.main_buffers = array([])
@@ -234,7 +234,7 @@ class DrawWaveform(Gtk.DrawingArea):
if self.window is None:
return
self.window.property_change(self._redraw_atom, self._redraw_atom,
- 32, Gtk.gdk.PROP_MODE_REPLACE, [])
+ 32, Gdk.PROP_MODE_REPLACE, [])
return
def do_property_notify_event(self, event):
@@ -260,16 +260,16 @@ class DrawWaveform(Gtk.DrawingArea):
clr = colormap.alloc_color(self.color[graph_id])
self._line_gc.append(self.window.new_gc(foreground=clr))
self._line_gc[graph_id].set_line_attributes(
- self._FOREGROUND_LINE_THICKNESS, Gtk.gdk.LINE_SOLID,
- Gtk.gdk.CAP_ROUND, Gtk.gdk.JOIN_BEVEL)
+ self._FOREGROUND_LINE_THICKNESS, Gdk.LINE_SOLID,
+ Gdk.CAP_ROUND, Gdk.JOIN_BEVEL)
self._line_gc[graph_id].set_foreground(clr)
# Trigger marks
clr = colormap.alloc_color(self.color[0])
self._trigger_line_gc = self.window.new_gc(foreground=clr)
self._trigger_line_gc.set_line_attributes(
- self._TRIGGER_LINE_THICKNESS, Gtk.gdk.LINE_SOLID,
- Gtk.gdk.CAP_ROUND, Gtk.gdk.JOIN_BEVEL)
+ self._TRIGGER_LINE_THICKNESS, Gdk.LINE_SOLID,
+ Gdk.CAP_ROUND, Gdk.JOIN_BEVEL)
self._trigger_line_gc.set_foreground(clr)
# Instrument tuning lines
@@ -280,11 +280,11 @@ class DrawWaveform(Gtk.DrawingArea):
self._instrument_gc.append(self.window.new_gc(foreground=clr))
self._instrument_h_gc.append(self.window.new_gc(foreground=clr))
self._instrument_gc[-1].set_line_attributes(
- self._TUNING_LINE_THICKNESS, Gtk.gdk.LINE_SOLID,
- Gtk.gdk.CAP_ROUND, Gtk.gdk.JOIN_BEVEL)
+ self._TUNING_LINE_THICKNESS, Gdk.LINE_SOLID,
+ Gdk.CAP_ROUND, Gdk.JOIN_BEVEL)
self._instrument_h_gc[-1].set_line_attributes(
- self._HARMONIC_LINE_THICKNESS, Gtk.gdk.LINE_SOLID,
- Gtk.gdk.CAP_ROUND, Gtk.gdk.JOIN_BEVEL)
+ self._HARMONIC_LINE_THICKNESS, Gdk.LINE_SOLID,
+ Gdk.CAP_ROUND, Gdk.JOIN_BEVEL)
self._instrument_gc[-1].set_foreground(clr)
self._instrument_h_gc[-1].set_foreground(clr)
@@ -292,15 +292,15 @@ class DrawWaveform(Gtk.DrawingArea):
clr = colormap.alloc_color(self.color[1])
self._tuning_line_gc = self.window.new_gc(foreground=clr)
self._tuning_line_gc.set_line_attributes(
- self._TUNING_LINE_THICKNESS, Gtk.gdk.LINE_SOLID,
- Gtk.gdk.CAP_ROUND, Gtk.gdk.JOIN_BEVEL)
+ self._TUNING_LINE_THICKNESS, Gdk.LINE_SOLID,
+ Gdk.CAP_ROUND, Gdk.JOIN_BEVEL)
self._tuning_line_gc.set_foreground(clr)
clr = colormap.alloc_color(self.color[0])
self._harmonic_gc = self.window.new_gc(foreground=clr)
self._harmonic_gc.set_line_attributes(
- self._HARMONIC_LINE_THICKNESS, Gtk.gdk.LINE_SOLID,
- Gtk.gdk.CAP_ROUND, Gtk.gdk.JOIN_BEVEL)
+ self._HARMONIC_LINE_THICKNESS, Gdk.LINE_SOLID,
+ Gdk.CAP_ROUND, Gdk.JOIN_BEVEL)
self._harmonic_gc.set_foreground(clr)
self._create_background_pixmap()
@@ -309,7 +309,7 @@ class DrawWaveform(Gtk.DrawingArea):
def _create_background_pixmap(self):
""" Draw the gridlines for the plot """
- back_surf = Gtk.gdk.Pixmap(self.window, self._tick_size,
+ back_surf = Gdk.Pixmap(self.window, self._tick_size,
self._tick_size)
cr = back_surf.cairo_create()
cr.set_source_rgb(0, 0, 0)
diff --git a/measure.py b/measure.py
index 0f99806..ba73f5a 100644
--- a/measure.py
+++ b/measure.py
@@ -118,11 +118,11 @@ class MeasureActivity(activity.Activity):
activity.Activity.__init__(self, handle)
self.mode_images = {}
- self.mode_images['sound'] = Gtk.gdk.pixbuf_new_from_file_at_size(
+ self.mode_images['sound'] = Gdk.pixbuf_new_from_file_at_size(
os.path.join(ICONS_DIR, 'media-audio.svg'), 45, 45)
- self.mode_images['resistance'] = Gtk.gdk.pixbuf_new_from_file_at_size(
+ self.mode_images['resistance'] = Gdk.pixbuf_new_from_file_at_size(
os.path.join(ICONS_DIR, 'resistance.svg'), 45, 45)
- self.mode_images['voltage'] = Gtk.gdk.pixbuf_new_from_file_at_size(
+ self.mode_images['voltage'] = Gdk.pixbuf_new_from_file_at_size(
os.path.join(ICONS_DIR, 'voltage.svg'), 45, 45)
self._using_gconf = _using_gconf
@@ -475,4 +475,4 @@ class MeasureActivity(activity.Activity):
else:
return profile.get_nick_name()
-Gtk.gdk.threads_init()
+Gdk.threads_init()
diff --git a/toolbar_side.py b/toolbar_side.py
index 06770af..bf061ef 100644
--- a/toolbar_side.py
+++ b/toolbar_side.py
@@ -188,7 +188,7 @@ fill="none" stroke="%s" stroke-linecap="round" stroke-width="3.5"/>\n\
def svg_str_to_pixbuf(svg_string):
''' Load pixbuf from SVG string '''
- pl = Gtk.gdk.PixbufLoader('svg')
+ pl = Gdk.PixbufLoader('svg')
pl.write(svg_string)
pl.close()
pixbuf = pl.get_pixbuf()