[109205] users/mojca/ports/science/gate

mojca at macports.org mojca at macports.org
Sat Aug 10 03:31:32 PDT 2013


Revision: 109205
          https://trac.macports.org/changeset/109205
Author:   mojca at macports.org
Date:     2013-08-10 03:31:32 -0700 (Sat, 10 Aug 2013)
Log Message:
-----------
mojca/gate: add icon toolbar

Modified Paths:
--------------
    users/mojca/ports/science/gate/Portfile
    users/mojca/ports/science/gate/files/gui.mac

Added Paths:
-----------
    users/mojca/ports/science/gate/files/icons.mac
    users/mojca/ports/science/gate/files/patch-addmenu.diff

Modified: users/mojca/ports/science/gate/Portfile
===================================================================
--- users/mojca/ports/science/gate/Portfile	2013-08-10 07:16:01 UTC (rev 109204)
+++ users/mojca/ports/science/gate/Portfile	2013-08-10 10:31:32 UTC (rev 109205)
@@ -80,6 +80,11 @@
 
 depends_lib         port:qt4-mac
 
+# Geant4.9.5 probably doesn't support icon bars
+if {![variant_isset geant495]} {
+    patchfiles      patch-addmenu.diff
+}
+
 post-patch {
     # patch examples if needed
     if {[variant_isset examples]} {
@@ -110,8 +115,9 @@
     xinstall -m 755 -d ${destsharedir}
     copy ${worksrcpath}/GateMaterials.db ${destsharedir}
     copy ${worksrcpath}/GateMaterialsGPU.db ${destsharedir}
-    # copy the initial macro file with basic setup
-    copy ${filespath}/gui.mac ${destsharedir}
+    # copy the initial macro files with basic setup
+    copy ${filespath}/gui.mac   ${destsharedir}
+    copy ${filespath}/icons.mac ${destsharedir}
 }
 
 post-destroot {

Modified: users/mojca/ports/science/gate/files/gui.mac
===================================================================
--- users/mojca/ports/science/gate/files/gui.mac	2013-08-10 07:16:01 UTC (rev 109204)
+++ users/mojca/ports/science/gate/files/gui.mac	2013-08-10 10:31:32 UTC (rev 109205)
@@ -3,35 +3,39 @@
 # the menu bar of the G4UIXm, G4UIQt, G4UIWin32 sessions.
 # It has no effect with G4UIterminal.
 #
-# draws the window with the box
-/vis/open OGL 600x600-0+0
-# draws the scene tree
-/vis/drawVolume
-#
 # Run menu :
-/gui/addMenu run Run
-/gui/addButton run "beamOn 1" "/run/beamOn 1"
-/gui/addButton run "beamOn 10" "/run/beamOn 10"
-/gui/addButton run "beamOn 100" "/run/beamOn 100"
-/gui/addButton run "beamOn 1000" "/run/beamOn 1000"
-/gui/addButton run "Application Start" "/gate/application/start"
+/gui/addMenu   run Run
+/gui/addButton run "Run 1 event"           "/run/beamOn 1"
+/gui/addButton run "Run 10 events"         "/run/beamOn 10"
+/gui/addButton run "Run 100 events"        "/run/beamOn 100"
+/gui/addButton run "Run 1000 events"       "/run/beamOn 1000"
+/gui/addButton run "Application Start"     "/gate/application/start"
 /gui/addButton run "Application Start DAQ" "/gate/application/startDAQ"
 #
 # Viewer menu :
-/gui/addMenu viewer Viewer
-/gui/addButton viewer "Set style surface" "/vis/viewer/set/style surface"
+/gui/addMenu   viewer Viewer
+/gui/addButton viewer "Set style surface"   "/vis/viewer/set/style surface"
 /gui/addButton viewer "Set style wireframe" "/vis/viewer/set/style wire"
-/gui/addButton viewer "Refresh viewer" "/vis/viewer/refresh"
+/gui/addButton viewer "Refresh viewer"      "/vis/viewer/refresh"
 /gui/addButton viewer "Update viewer (interaction or end-of-file)" "/vis/viewer/update"
 /gui/addButton viewer "Flush viewer (= refresh + update)" "/vis/viewer/flush"
-/gui/addButton viewer "Update scene" "/vis/scene/notifyHandlers"
+/gui/addButton viewer "Update scene"        "/vis/scene/notifyHandlers"
 #
-/gui/addMenu zoom Zoom
-/gui/addButton zoom "10%" "/vis/viewer/zoomTo 0.1"
-/gui/addButton zoom "50%" "/vis/viewer/zoomTo 0.5"
+# Zoom menu :
+/gui/addMenu   zoom Zoom
+/gui/addButton zoom  "10%" "/vis/viewer/zoomTo 0.1"
+/gui/addButton zoom  "50%" "/vis/viewer/zoomTo 0.5"
 /gui/addButton zoom "100%" "/vis/viewer/zoomTo 1.0"
 /gui/addButton zoom "150%" "/vis/viewer/zoomTo 1.5"
 /gui/addButton zoom "200%" "/vis/viewer/zoomTo 2.0"
 /gui/addButton zoom "500%" "/vis/viewer/zoomTo 5.0"
 #
+# Add an icon toolbar
+/gate/control/execute icons.mac
+#
+# draws the window with the box
+/vis/open OGL
+# draws the scene tree
+/vis/drawVolume
+#
 /gate/geometry/setMaterialDatabase GateMaterials.db

Added: users/mojca/ports/science/gate/files/icons.mac
===================================================================
--- users/mojca/ports/science/gate/files/icons.mac	                        (rev 0)
+++ users/mojca/ports/science/gate/files/icons.mac	2013-08-10 10:31:32 UTC (rev 109205)
@@ -0,0 +1,25 @@
+#
+# This file permits to customize, with commands,
+# the icon menu bar of the G4UIQt sessions not yet implemented other UI drivers (geant4-09-05-ref-09)
+# It has no effect with G4UIterminal.
+
+# Open/Save icons
+/gui/addIcon "Open macro file" open /control/execute
+/gui/addIcon "Save viewer state" save /vis/viewer/save
+
+# Cursors style icons
+/gui/addIcon "Move" move
+/gui/addIcon "Pick" pick
+/gui/addIcon "Zoom out" zoom_out
+/gui/addIcon "Zoom in" zoom_in
+/gui/addIcon "Rotate" rotate
+
+# Surface Style icons
+/gui/addIcon "Wireframe" wireframe
+/gui/addIcon "Wireframe with hidden line removal" hidden_line_removal
+/gui/addIcon "Surfaces" solid
+/gui/addIcon "Hidden line and hidden surface removal" hidden_line_and_surface_removal
+
+# Perspective/Ortho icons
+/gui/addIcon "Perspective" perspective
+/gui/addIcon "Orthographic" ortho

Added: users/mojca/ports/science/gate/files/patch-addmenu.diff
===================================================================
--- users/mojca/ports/science/gate/files/patch-addmenu.diff	                        (rev 0)
+++ users/mojca/ports/science/gate/files/patch-addmenu.diff	2013-08-10 10:31:32 UTC (rev 109205)
@@ -0,0 +1,10 @@
+--- Gate.cc
++++ Gate.cc
+@@ -370,6 +370,7 @@ int main( int argc, char* argv[] )
+     }
+   else if( ui ) // Launching interactive mode // Qt
+     {
++      UImanager->ApplyCommand("/gate/control/execute gui.mac");
+       ui->SessionStart();
+       delete ui;
+     }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130810/f3c19993/attachment.html>


More information about the macports-changes mailing list