Changeset 1248
- Timestamp:
- 08/04/07 16:48:16 (6 years ago)
- Location:
- branch/ggpolo/umitInventory
- Files:
-
- 3 modified
-
TLChangesTree.py (modified) (1 diff)
-
TLGraph.py (modified) (6 diffs)
-
Viewer.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branch/ggpolo/umitInventory/TLChangesTree.py
r1246 r1248 120 120 self.datagrabber.use_dict_cursor() 121 121 for key in categories.keys(): 122 if not range_start or not range_end: 123 data[key] = { } 124 continue 125 122 126 chgs = self.datagrabber.timerange_changes_data_generic(range_start, 123 127 range_end, key, -
branch/ggpolo/umitInventory/TLGraph.py
r1231 r1248 148 148 149 149 gtk.Widget.__init__(self) 150 151 self.dontdraw = False 150 152 151 153 # connector … … 493 495 self.connector.emit('selection-changed', self.selection) 494 496 495 497 498 def get_cairo_context(self): 499 """ 500 Try to return a cairo context. 501 """ 502 try: 503 cr = self.window.cairo_create() 504 return cr 505 506 except cairo.Error: 507 # widget is being destroyed (probably) 508 self.dontdraw = True 509 510 496 511 def _calculate_border_reserved(self): 497 512 """ 498 513 Calculate space needed to write labels. 499 514 """ 500 cr = self.window.cairo_create() 515 #cr = self.window.cairo_create() 516 cr = self.get_cairo_context() 517 518 if not cr: 519 return 520 501 521 if self.graph_label or self.descr_label: 502 522 t = True and self.graph_label or self.descr_label … … 915 935 This method handles graph animation effect. 916 936 """ 937 if self.dontdraw: 938 # entered here but it was configured to not draw anything, 939 # stop timer then 940 return False 941 917 942 # check if we completed a line segment 918 943 if self.painting_piece == self.divisors: … … 930 955 self.cur_point_indx = 0 931 956 932 cr = self.window.cairo_create() 957 cr = self.get_cairo_context() 958 if not cr: 959 # stop timer, widget is being destroyed (probably) 960 return False 933 961 934 962 ret = self._draw_by_piece(cr) … … 936 964 # check if we are done 937 965 if not ret: 938 #print 'Animation completed.'939 966 self.startup_animation = False 940 967 return False … … 1400 1427 Draws graph. 1401 1428 """ 1402 cr = self.window.cairo_create() 1429 if self.dontdraw: 1430 return 1431 1432 cr = self.get_cairo_context() 1403 1433 cr.rectangle(*event.area) 1404 1434 cr.clip() -
branch/ggpolo/umitInventory/Viewer.py
r1246 r1248 740 740 Do necessary cleanup before destroying window. 741 741 """ 742 if self.timeline.graph.startup_animation: # drawing is going on743 # stop timer744 gobject.source_remove(self.timeline.graph.anim_timer)745 746 742 # remove tip timer if still running 747 743 if self.tip_timer != -1:
