Changeset 2135
- Timestamp:
- Mar 14, 2011, 11:00:49 AM (13 years ago)
- Location:
- trunk/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/diffview.tcl
r2117 r2135 14 14 # ====================================================================== 15 15 namespace eval Rappture { # forward declaration } 16 17 # ---------------------------------------------------------------------- 18 # Code for "usual" itk options 19 # ---------------------------------------------------------------------- 20 if {[catch {package require Itk}] == 0} { 21 itk::usual Diffview { 22 keep -background -foreground -cursor 23 keep -addedbackground -addedforeground 24 keep -deletedbackground -deletedforeground -overstrike 25 keep -changedbackground -changedforeground 26 keep -highlightcolor -highlightthickness 27 rename -highlightbackground -background background Background 28 } 29 } 30 16 31 17 32 # ---------------------------------------------------------------------- -
trunk/gui/scripts/tool.tcl
r2079 r2135 29 29 public method abort {} 30 30 public method reset {} 31 public method xml {args} 31 32 32 33 protected method _mkdir {dir} … … 337 338 if {[$_xmlobj element -as type $path.default] ne ""} { 338 339 set defval [$_xmlobj get $path.default] 339 $_xmlobj put $path $defval 340 } 341 } 342 } 343 340 $_xmlobj put $path.current $defval 341 } 342 } 343 } 344 345 # ---------------------------------------------------------------------- 346 # USAGE: xml ?<option> <arg> <arg>...? 347 # 348 # Used to access the XML specification for this tool. With no extra 349 # args, it returns the Rappture XML object. Otherwise, it applies 350 # the option/args to the object and returns the result. The <option> 351 # might be something like "children" or "element" or any other 352 # operation supported by a Rappture::library object. 353 # ---------------------------------------------------------------------- 354 itcl::body Rappture::Tool::xml {args} { 355 if {[llength $args] == 0} { 356 return $_xmlobj 357 } 358 return [eval $_xmlobj $args] 359 } 344 360 345 361 # ---------------------------------------------------------------------- -
trunk/gui/src/RpDiffview.c
r2132 r2135 1583 1583 - dvPtr->yOffset; 1584 1584 x = dvPtr->inset - dvPtr->xOffset; 1585 width = Tk_Width(tkwin); 1585 1586 if (Tk_Width(tkwin) > dvPtr->maxWidth) { 1587 width = Tk_Width(tkwin)+10; 1588 } else { 1589 width = dvPtr->maxWidth+10; 1590 } 1586 1591 1587 1592 for (i=dvPtr->topLine; … … 2346 2351 DiffviewLines *lineLimitsPtr; /* data structure being freed */ 2347 2352 { 2348 if (lineLimitsPtr->startPtr) { 2349 ckfree((char*)lineLimitsPtr->startPtr); 2350 } 2351 if (lineLimitsPtr->lenPtr) { 2352 ckfree((char*)lineLimitsPtr->lenPtr); 2353 } 2354 ckfree((char*)lineLimitsPtr); 2353 if (lineLimitsPtr) { 2354 if (lineLimitsPtr->startPtr) { 2355 ckfree((char*)lineLimitsPtr->startPtr); 2356 } 2357 if (lineLimitsPtr->lenPtr) { 2358 ckfree((char*)lineLimitsPtr->lenPtr); 2359 } 2360 ckfree((char*)lineLimitsPtr); 2361 } 2355 2362 } 2356 2363 … … 2594 2601 i++; j++; 2595 2602 } 2603 2604 /* lines left over? mark as many "changed" as possible */ 2605 if (limsPtr1->numLines-i > 0 && limsPtr2->numLines-j > 0) { 2606 del = (limsPtr1->numLines-i < limsPtr2->numLines-j) 2607 ? limsPtr1->numLines-i : limsPtr2->numLines-j; 2608 DiffviewDiffsAppend(diffPtr, 'c', i, i+del-1, j, j+del-1); 2609 i += del; 2610 j += del; 2611 } 2612 2613 /* still have lines left over? then mark them added or deleted */ 2596 2614 if (i < limsPtr1->numLines) { 2597 2615 del = limsPtr1->numLines - i;
Note: See TracChangeset
for help on using the changeset viewer.