From 7ceb087fa78196c9a6ec27d0a4d41a322dabbf28 Mon Sep 17 00:00:00 2001 From: Marc Culler Date: Wed, 14 Jun 2023 09:28:19 -0500 Subject: [PATCH] Remember notebook type. --- main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index c58d5c4..324ca51 100755 --- a/main.py +++ b/main.py @@ -8,7 +8,6 @@ import time import plistlib import tkinter -#### from configparser import ConfigParser from tkinter import ttk from tkinter.font import Font from tkinter.simpledialog import Dialog, askstring @@ -203,9 +202,13 @@ def __init__(self, root): self.terminals.append('iTerm.app') self.terminal_var = tkinter.Variable(self, self.terminals[0]) self.terminal_option = PopupMenu(checks, self.terminal_var, self.terminals) - self.notebook_types = ['Classic Jupyter', 'Jupyter Lab'] self.use_jupyter = ttk.Radiobutton(checks, text="Notebook", variable=radio_var, value='nb', command=self.update_radio_buttons) + self.notebook_types = ['Classic Jupyter'] + if self.settings['state']['notebook_type'] == 'Jupyter Lab': + self.notebook_types.insert(0, 'Jupyter Lab') + else: + self.notebook_types.append('Jupyter Lab') self.nb_var = tkinter.Variable(self, self.notebook_types[0]) self.notebook_option = PopupMenu(checks, self.nb_var, self.notebook_types) notebook_dir_frame = ttk.Frame(checks)