-
-
Notifications
You must be signed in to change notification settings - Fork 50
Split every tab in two panes #206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 3 commits
180472a
7080542
51816b8
e03bda2
240f1d8
e5226ed
43d04e7
e582ec2
5a6afe6
b8aa4b0
484ed1d
1cb1bc9
c1d0834
4088f70
a0618c0
9c06b97
bbcd3fa
6dd0c15
9568b68
8913213
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,8 @@ import GI.Gtk | |
| , notebookGetNthPage | ||
| , notebookGetNPages | ||
| ) | ||
| import qualified GI.Gtk as Gtk | ||
| import Data.GI.Base.GObject | ||
| import GI.Pango (FontDescription) | ||
| import GI.Vte (Terminal, CursorBlinkMode(..)) | ||
| import Text.Pretty.Simple (pPrint) | ||
|
|
@@ -66,7 +68,7 @@ data TMNotebookTab = TMNotebookTab | |
| { tmNotebookTabTermContainer :: !ScrolledWindow | ||
| -- ^ The 'ScrolledWindow' holding the VTE 'Terminal'. | ||
| , tmNotebookTabTerm :: !TMTerm | ||
| -- ^ The 'Terminal' insidie the 'ScrolledWindow'. | ||
| -- ^ The 'Terminal' inside the 'ScrolledWindow'. | ||
| , tmNotebookTabLabel :: !Label | ||
| -- ^ The 'Label' holding the title of the 'Terminal' in the 'Notebook' tab. | ||
| } | ||
|
|
@@ -530,6 +532,23 @@ data TMStateInvariantErr | |
| | TabsDoNotMatch TabsDoNotMatch | ||
| deriving Show | ||
|
|
||
| printWidgetTree :: Gtk.IsWidget a => a -> IO () | ||
| printWidgetTree widget_ = do | ||
| widget <- Gtk.toWidget widget_ | ||
| go "" widget | ||
| where | ||
| go :: Text -> Gtk.Widget -> IO () | ||
| go indent w = do | ||
| type_ <- gtypeFromInstance w | ||
| name <- Gtk.gtypeName type_ | ||
| let ptr = Gtk.managedForeignPtr . Gtk.toManagedPtr $ w | ||
| putStrLn $ indent <> pack name <> " " <> pack (show ptr) | ||
| maybeContainer <- Gtk.castTo Gtk.Container w | ||
| for_ maybeContainer $ \container -> do | ||
| children <- Gtk.containerGetChildren container | ||
| for_ children $ \child -> do | ||
| go (" " <> indent) child | ||
|
||
|
|
||
| -- | Gather up the invariants for 'TMState' and return them as a list. | ||
| -- | ||
| -- If no invariants have been violated, then this function should return an | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops! this doesn't belong to this draft PR...