From 09f7007e64b1af7df3bf3063c0cc3df3b1a88792 Mon Sep 17 00:00:00 2001 From: "(cdep)illabout" Date: Mon, 23 Oct 2023 13:16:07 +0900 Subject: [PATCH] imports --- src/Termonad/App.hs | 73 +++++-------------------------------- src/Termonad/Preferences.hs | 5 +-- 2 files changed, 12 insertions(+), 66 deletions(-) diff --git a/src/Termonad/App.hs b/src/Termonad/App.hs index 2b99a1c..1f8ba91 100644 --- a/src/Termonad/App.hs +++ b/src/Termonad/App.hs @@ -8,7 +8,6 @@ import Config.Dyre (wrapMain, newParams) import Control.Lens ((^.), (^..), over, set, view, ix) import Data.FileEmbed (embedFile) import Data.FocusList (focusList, moveFromToFL, updateFocusFL) -import qualified Data.List as List import Data.Sequence (findIndexR) import qualified Data.Text as Text import Data.Text.Encoding (encodeUtf8) @@ -28,20 +27,11 @@ import GI.Gtk ( Application , ApplicationWindow(ApplicationWindow) , Box(Box) - , CheckButton(CheckButton) - , ComboBoxText(ComboBoxText) - , Dialog(Dialog) - , Entry(Entry) - , FontButton(FontButton) - , Label(Label) - , PolicyType(PolicyTypeAutomatic) , PositionType(PositionTypeRight) - , ResponseType(ResponseTypeAccept, ResponseTypeNo, ResponseTypeYes) + , ResponseType(ResponseTypeNo, ResponseTypeYes) , ScrolledWindow(ScrolledWindow) - , SpinButton(SpinButton) , pattern STYLE_PROVIDER_PRIORITY_APPLICATION , aboutDialogNew - , adjustmentNew , applicationAddWindow , applicationGetActiveWindow , applicationSetAccelsForAction @@ -50,9 +40,6 @@ import GI.Gtk , boxPackStart , builderNewFromString , builderSetApplication - , comboBoxGetActiveId - , comboBoxSetActiveId - , comboBoxTextAppend , containerAdd , cssProviderLoadFromData , cssProviderNew @@ -61,13 +48,8 @@ import GI.Gtk , dialogNew , dialogResponse , dialogRun - , entryBufferGetText - , entryBufferSetText , entryGetText , entryNew - , fontChooserSetFontDesc - , fontChooserGetFontDesc - , getEntryBuffer , gridAttachNextTo , gridNew , labelNew @@ -79,18 +61,11 @@ import GI.Gtk , onNotebookPageReordered , onNotebookSwitchPage , onWidgetDeleteEvent - , scrolledWindowSetPolicy , setWidgetMargin - , spinButtonGetValueAsInt - , spinButtonSetAdjustment - , spinButtonSetValue , styleContextAddProviderForScreen - , toggleButtonGetActive - , toggleButtonSetActive , widgetDestroy , widgetGrabFocus , widgetSetCanFocus - , widgetSetVisible , widgetShow , widgetShowAll , windowPresent @@ -102,17 +77,13 @@ import qualified GI.Gtk as Gtk import GI.Pango ( FontDescription , pattern SCALE - , fontDescriptionGetFamily - , fontDescriptionGetSize - , fontDescriptionGetSizeIsAbsolute , fontDescriptionNew , fontDescriptionSetFamily , fontDescriptionSetSize , fontDescriptionSetAbsoluteSize ) import GI.Vte - ( CursorBlinkMode(..) - , catchRegexError + ( catchRegexError , regexNewForSearch , terminalCopyClipboard , terminalPasteClipboard @@ -120,40 +91,26 @@ import GI.Vte , terminalSearchFindPrevious , terminalSearchSetRegex , terminalSearchSetWrapAround - , terminalSetBoldIsBright - , terminalSetCursorBlinkMode , terminalSetFont - , terminalSetScrollbackLines - , terminalSetWordCharExceptions - , terminalSetAllowBold ) -import System.Environment (getExecutablePath) -import System.FilePath (takeFileName) import System.IO.Error (doesNotExistErrorType, ioeGetErrorType, ioeGetFileName, tryIOError) -import Termonad.Gtk (appNew, imgToPixbuf, objFromBuildUnsafe, terminalSetEnableSixelIfExists) +import Termonad.Cli (parseCliArgs, applyCliArgs) +import Termonad.Gtk (appNew, imgToPixbuf, objFromBuildUnsafe) import Termonad.Keys (handleKeyPress) import Termonad.Lenses - ( lensBoldIsBright - , lensEnableSixel - , lensAllowBold - , lensConfirmExit - , lensCursorBlinkMode + ( lensConfirmExit , lensFontConfig , lensOptions , lensShowMenu - , lensShowScrollbar - , lensShowTabBar - , lensScrollbackLen - , lensTMNotebookTabTermContainer , lensTMNotebookTabs , lensTMNotebookTabTerm , lensTMStateApp , lensTMStateConfig , lensTMStateFontDesc , lensTerm - , lensWordCharExceptions, lensTMStateWindows, lensTMWindowNotebook + , lensTMStateWindows, lensTMWindowNotebook ) -import Termonad.Preferences (saveToPreferencesFile, showPreferencesDialog) +import Termonad.Preferences (showPreferencesDialog) import Termonad.Term ( createTerm , relabelTabs @@ -161,36 +118,26 @@ import Termonad.Term , termPrevPage , termExitFocused , setShowTabs - , showScrollbarToPolicy ) import Termonad.Types - ( ConfigOptions(..) - , FontConfig(..) + ( FontConfig(..) , FontSize(FontSizePoints, FontSizeUnits) - , ShowScrollbar(..) - , ShowTabBar(..) , TMConfig , TMNotebookTab , TMState , TMState' , TMWindowId + , fontSizeFromFontDescription , getFocusedTermFromState , getTMNotebookFromTMState , getTMNotebookFromTMState' - , getTMWindowFromTMState' , modFontSize , newEmptyTMState - , tmNotebook , tmNotebookTabTermContainer , tmNotebookTabs , tmStateApp - , tmStateWindows - , tmWindowAppWin - , tmWindowNotebook, fontSizeFromFontDescription ) -import Termonad.XML (interfaceText, menuText, preferencesText) -import Termonad.Cli (parseCliArgs, applyCliArgs) -import Termonad.IdMap (keysIdMap) +import Termonad.XML (interfaceText, menuText) setupScreenStyle :: IO () setupScreenStyle = do diff --git a/src/Termonad/Preferences.hs b/src/Termonad/Preferences.hs index 70bb76b..f7a113b 100644 --- a/src/Termonad/Preferences.hs +++ b/src/Termonad/Preferences.hs @@ -87,14 +87,13 @@ import Termonad.Types , TMNotebookTab , TMState , TMWindowId + , fontConfigFromFontDescription , getTMWindowFromTMState' , tmNotebook - , tmNotebookTabTermContainer , tmNotebookTabs - , tmStateApp , tmStateWindows , tmWindowAppWin - , tmWindowNotebook, fontConfigFromFontDescription + , tmWindowNotebook ) import Termonad.XML (preferencesText) import Termonad.IdMap (keysIdMap)