class: Tools::ChangeSetBrowser2
authorClaus Gittinger <cg@exept.de>
Sun, 08 Feb 2015 10:51:57 +0100
changeset 15237 cdedab13e885
parent 15236 92e7ef5d694e
child 15238 9bd14234e90e
class: Tools::ChangeSetBrowser2 added: #hasSingleChangeSelectedAndCanBrowseClass: comment/format in: #hasSingleChangeSelectedAndCanBrowse: changed:5 methods
Tools__ChangeSetBrowser2.st
--- a/Tools__ChangeSetBrowser2.st	Sun Feb 08 10:40:44 2015 +0100
+++ b/Tools__ChangeSetBrowser2.st	Sun Feb 08 10:51:57 2015 +0100
@@ -406,39 +406,26 @@
 !
 
 applyFromLastSnapshotIcon2
-    <resource: #image>
     "This resource specification was automatically generated
      by the ImageEditor of ST/X."
+
     "Do not manually edit this!! If it is corrupted,
      the ImageEditor may not be able to read the specification."
+
     "
-     self applyFromLastSnapshotIcon1 inspect
-     ImageEditor openOnClass:self andSelector:#applyFromLastSnapshotIcon1
-     Icon flushCachedIcons"
-    
-    ^ Icon 
-        constantNamed:#'NewChangesBrowser class applyFromLastSnapshotIcon1'
-        ifAbsentPut:[
-            (Depth4Image new)
-                width:22;
-                height:22;
-                photometric:(#palette);
-                bitsPerSample:(#( 4 ));
-                samplesPerPixel:(1);
-                bits:(ByteArray 
-                            fromPackedString:'
+     self applyFromLastSnapshotIcon2 inspect
+     ImageEditor openOnClass:self andSelector:#applyFromLastSnapshotIcon2
+     Icon flushCachedIcons
+    "
+
+    <resource: #image>
+
+    ^Icon
+        constantNamed:'Tools::ChangeSetBrowser2 applyFromLastSnapshotIcon2'
+        ifAbsentPut:[(Depth4Image new) width:22; height:22; bits:(ByteArray fromPackedString:'
 @@@BH@@@@@@QDQ<@@BH @@@@@AH"H@@@H"@@@@@@D"H H H"@@@@@@@RH"@"H"@@@@@@@AH"H@H"H@@@@@@@<@@@@BH@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-@@;.;.; @@@@@@@@C.;.;.@@@@@@@@@@@@@@8@@N@@@@C?????C @@@N@@@O????<@@@8@@@@@@@@@C0@@@@8@@O????<O@@C @@@@?????0@@@@C @@@@@@
-@O@@@N@@@@DQDQDP<@C @@@@@_??DQ@@@@@@@@@A????D@@@@@@@@@DQDQDP@@@@C @@@@@@@@@@@@@@@@@b');
-                colorMapFromArray:#[ 0 0 0 255 255 255 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127 170 170 170 ];
-                mask:((ImageMask new)
-                            width:22;
-                            height:22;
-                            bits:(ByteArray 
-                                        fromPackedString:'A@C<C@C<C@C<&@C<<@C<\@C<H@@@@?<@@?<@@?<LC?<\C?<\C?<8O?08O?10O?10??C ??[@??_@?<^@?<_@?<_@');
-                            yourself);
-                yourself
-        ]
+@@H"H"H @@@@@@@@@"H"H"@@@@@@@@@@@@@@H@@N@@@@C?????@ @@@N@@@O????<@@@8@@@@@@@@@C0@@@@8@@O????<O@@C @@@@?????0@@@@C @@@@@@
+@O@@@N@@@@DQDQDP<@C @@@@@_??DQ@@@@@@@@@A????D@@@@@@@@@DQDQDP@@@@C @@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 255 0 0 0 255 0 0 0 255 0 255 255 255 255 0 255 0 255 127 0 0 0 127 0 0 0 127 0 127 127 127 127 0 127 0 127 127 127 127 170 170 170]; mask:((ImageMask new) width:22; height:22; bits:(ByteArray fromPackedString:'A@C<C@C<C@C<&@C<<@C<\@C<H@@@@?<@@?<@@?<LC?<\C?<\C?<8O?08O?10O?10??C ??[@??_@?<^@?<_@?<_@') ; yourself); yourself]
 !
 
 applyIcon
@@ -1566,6 +1553,14 @@
             itemValue: changeMenuInspect:
           )
          (MenuItem
+            label: '-'
+          )
+         (MenuItem
+            enabled: hasSingleChangeSelectedAndCanBrowseClass:
+            label: 'Browse Class(es)'
+            itemValue: changeMenuBrowseClass:
+          )
+         (MenuItem
             enabled: hasSingleChangeSelectedAndCanBrowse:
             label: 'Browse Method(s)'
             itemValue: changeMenuBrowse:
@@ -1577,7 +1572,7 @@
 !
 
 changeMenu1
-    <resource: #menu>
+    <resource: #programMenu>
 
     ^self changeMenu
 
@@ -1585,7 +1580,7 @@
 !
 
 changeMenu2
-    <resource: #menu>
+    <resource: #programMenu>
 
     ^self changeMenu
 
@@ -3321,7 +3316,7 @@
     changes do:addThemChanges.
 
     UserPreferences systemBrowserClass 
-        browseClasses:classes title:'selected monticello classes'.
+        browseClasses:classes label:'selected monticello classes'.
 
     "Created: / 04-08-2011 / 17:27:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Created: / 05-09-2011 / 16:08:35 / cg"
@@ -3903,13 +3898,21 @@
 !
 
 hasSingleChangeSelectedAndCanBrowse: changeList
-
     | sel |
+
     sel := changeList selection.
     sel isEmptyOrNil ifTrue:[^false].
     ^true
 
     "Created: / 04-08-2011 / 18:25:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+hasSingleChangeSelectedAndCanBrowseClass: changeList
+    | sel |
+
+    sel := changeList selection.
+    sel isEmptyOrNil ifTrue:[^false].
+    ^ sel contains:[:entry | entry change isOrContainsClassDefinitionChange ]. 
 ! !
 
 !ChangeSetBrowser2 methodsFor:'testing'!
@@ -4217,11 +4220,11 @@
 !ChangeSetBrowser2 class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__ChangeSetBrowser2.st,v 1.64 2015-02-07 18:05:53 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__ChangeSetBrowser2.st,v 1.65 2015-02-08 09:51:57 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__ChangeSetBrowser2.st,v 1.64 2015-02-07 18:05:53 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__ChangeSetBrowser2.st,v 1.65 2015-02-08 09:51:57 cg Exp $'
 !
 
 version_HG
@@ -4230,6 +4233,6 @@
 !
 
 version_SVN
-    ^ '$Id: Tools__ChangeSetBrowser2.st,v 1.64 2015-02-07 18:05:53 cg Exp $'
+    ^ '$Id: Tools__ChangeSetBrowser2.st,v 1.65 2015-02-08 09:51:57 cg Exp $'
 ! !