Skip to content

Commit

Permalink
NOW!! WE NO LONGER SEND PEOPLE ON A WILD GOOSE CHASE! getting a defau…
Browse files Browse the repository at this point in the history
…lt view is *super* simple! (vivisect#643)
  • Loading branch information
atlas0fd00m authored Apr 6, 2024
1 parent 4136cee commit 4d71454
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion vivisect/qt/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def __init__(self, vw):
self.vqAddMenuField('&View.&Layouts.&Set Default', self._menuViewLayoutsSetDefault)
self.vqAddMenuField('&View.&Layouts.&Save', self._menuViewLayoutsSave)
self.vqAddMenuField('&View.&Layouts.&Load', self._menuViewLayoutsLoad)
self.vqAddMenuField('&View.&Layouts.Load &Base Default', self._menuViewLayoutsLoadBase)

self.vqAddMenuField('&Share.Share Workspace', self._menuShareWorkspace)
self.vqAddMenuField('&Share.Connect to Shared Workspace', self._menuShareConnect)
Expand All @@ -101,7 +102,7 @@ def __init__(self, vw):
self.vw.vprint('\n')
#self.vw.vprint('
')
self.vw.vprint('Looks like you have an empty layout!')
self.vw.vprint('Use View->Layouts->Load and select vivisect/qt/default.lyt')
self.vw.vprint('Use View->Layouts->Load Base Default')

fname = os.path.basename(self.vw.getMeta('StorageName', 'Unknown'))
self.setWindowTitle('Vivisect: %s' % fname)
Expand Down Expand Up @@ -577,6 +578,12 @@ def _menuFileSaveAs(self):
def _menuFileSaveServer(self):
viv_q_remote.saveToServer(self.vw, parent=self)

def _menuViewLayoutsLoadBase(self):
dirname = os.path.dirname(viv_q_views.__file__)
fname = os.sep.join([dirname, "default.lyt"])
settings = QtCore.QSettings(fname, QtCore.QSettings.IniFormat)
self.vqRestoreGuiSettings(settings)

def _menuViewLayoutsLoad(self):
fname = getOpenFileName(self, 'Load Layout')
if fname is None:
Expand Down

0 comments on commit 4d71454

Please sign in to comment.