Skip to content

Commit

Permalink
Bug fixes and ga updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
abalijepalli committed Sep 21, 2016
1 parent 5163d6a commit d52f0d8
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
2 changes: 1 addition & 1 deletion mosaic/apps/SingleChannelAnalysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

__all__ = ["SingleChannelAnalysis", "run_eventpartition"]

@registerRun
# @registerRun
def run_eventpartition( dataPath, trajDataHnd, dataFilterHnd, eventPartHnd, eventProcHnd):
# Read and parse the settings file
settingsdict=settings.settings( dataPath )
Expand Down
3 changes: 3 additions & 0 deletions mosaic/utilities/ga.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ def _getGASettings(ga_cache):
except:
logger.debug(_d("An error occured when trying to cache GA settings."))

ga_cache=resource_path("mosaic/utilities/.ga")
_getGASettings(ga_cache)

@registerRun
def foo():
print "foo"
Expand Down
25 changes: 14 additions & 11 deletions mosaicgui/settingsview.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

from PyQt4 import QtCore, QtGui, uic
from mosaic.utilities.resource_path import resource_path, format_path
import mosaic.utilities.ga as ga
import mosaicgui.EBSStateFileDict
import mosaicgui.trajview.trajview
import mosaicgui.advancedsettings.advancedsettings
Expand Down Expand Up @@ -260,20 +261,22 @@ def _updateControls(self):
[control.hide() for control in [self.RfbLabel, self.qdfRfbLineEdit, self.RfbUnitsLabel, self.CfbLabel, self.qdfCfbLineEdit, self.CfbUnitsLabel]]

# Set ga toggle.
with open(resource_path("mosaic/utilities/.ga"), "r") as garead:
gac = json.load(garead)
try:
with open(resource_path("mosaic/utilities/.ga"), "r") as garead:
gac = json.load(garead)

if eval(gac["gauimode"]):
self.actionAggregate_Usage.setVisible(True)
else:
self.actionAggregate_Usage.setVisible(False)

if eval(gac["gauimode"]):
self.actionAggregate_Usage.setVisible(True)
else:
if eval(gac["gaenable"]):
self.actionAggregate_Usage.setChecked(True)
else:
self.actionAggregate_Usage.setChecked(False)
except:
self.actionAggregate_Usage.setVisible(False)

if eval(gac["gaenable"]):
self.actionAggregate_Usage.setChecked(True)
else:
self.actionAggregate_Usage.setChecked(False)


self.updateDialogs=True

def _loadEBSState(self):
Expand Down
2 changes: 1 addition & 1 deletion mosaicgui/ui/SettingsWindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,7 @@
<bool>true</bool>
</property>
<property name="text">
<string>Aggregate Usage</string>
<string>Anonymous Usage Information</string>
</property>
</action>
</widget>
Expand Down
2 changes: 1 addition & 1 deletion runMOSAIC
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import multiprocessing

from mosaicgui.mplwidget import update_rcParams

@registerRun
# @registerRun
def startMOSAIC():
update_rcParams()

Expand Down

0 comments on commit d52f0d8

Please sign in to comment.