Plot-ho-matic 0.9.0.2 → 0.9.0.3
raw patch · 3 files changed
+28/−22 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +5/−0
- Plot-ho-matic.cabal +1/−1
- src/SetHo/LookupTree.hs +22/−21
CHANGELOG.md view
@@ -1,3 +1,8 @@+0.9.0.3+---+* initial settings selector box is big enough to see some fields+* combo box and text entry now share "staged" column+ 0.9.0.2 --- * Add autocommit toggle
Plot-ho-matic.cabal view
@@ -1,5 +1,5 @@ name: Plot-ho-matic-version: 0.9.0.2+version: 0.9.0.3 synopsis: Real-time line plotter for generic data license: BSD3 license-file: LICENSE
src/SetHo/LookupTree.hs view
@@ -161,37 +161,33 @@ colType <- Gtk.treeViewColumnNew colUpstreamValue <- Gtk.treeViewColumnNew colStagedValue <- Gtk.treeViewColumnNew- colCombo <- Gtk.treeViewColumnNew--- colSpin <- Gtk.treeViewColumnNew Gtk.treeViewColumnSetTitle colName "name" Gtk.treeViewColumnSetTitle colType "type" Gtk.treeViewColumnSetTitle colUpstreamValue "upstream" Gtk.treeViewColumnSetTitle colStagedValue "staged"- Gtk.treeViewColumnSetTitle colCombo "combo"--- Gtk.treeViewColumnSetTitle colSpin "enum" rendererName <- Gtk.cellRendererTextNew rendererType <- Gtk.cellRendererTextNew rendererStagedValue <- Gtk.cellRendererTextNew rendererUpstreamValue <- Gtk.cellRendererTextNew rendererCombo <- Gtk.cellRendererComboNew--- rendererSpin <- Gtk.cellRendererSpinNew - Gtk.cellLayoutPackStart colName rendererName True- Gtk.cellLayoutPackStart colType rendererType True- Gtk.cellLayoutPackStart colUpstreamValue rendererUpstreamValue True- Gtk.cellLayoutPackStart colStagedValue rendererStagedValue True- Gtk.cellLayoutPackStart colCombo rendererCombo True--- Gtk.cellLayoutPackStart colSpin rendererSpin True+ Gtk.treeViewColumnPackStart colName rendererName True+ Gtk.treeViewColumnPackStart colType rendererType True+ Gtk.treeViewColumnPackStart colUpstreamValue rendererUpstreamValue True+ Gtk.treeViewColumnPackStart colStagedValue rendererStagedValue True+ Gtk.treeViewColumnPackStart colStagedValue rendererCombo True _ <- Gtk.treeViewAppendColumn treeview colName _ <- Gtk.treeViewAppendColumn treeview colType _ <- Gtk.treeViewAppendColumn treeview colUpstreamValue _ <- Gtk.treeViewAppendColumn treeview colStagedValue- _ <- Gtk.treeViewAppendColumn treeview colCombo--- _ <- Gtk.treeViewAppendColumn treeview colSpin + -- add an extra dummy column at the end so that the staged value doesn't+ -- expand to the right+ _ <- Gtk.treeViewColumnNew >>= Gtk.treeViewAppendColumn treeview+ ----------------------------- showing values ------------------------ -- data name let showName :: ListViewElement -> String@@ -226,6 +222,7 @@ Left msg -> msg Right r -> r + -- upstream Gtk.cellLayoutSetAttributes colUpstreamValue rendererUpstreamValue treeStore $ \lve -> case lve of LveField fe -> [ Gtk.cellText := showField (feUpstreamField fe)@@ -242,29 +239,30 @@ Gtk.cellLayoutSetAttributes colStagedValue rendererStagedValue treeStore $ \lve -> case lve of LveField fe ->- [ Gtk.cellText := showField (feStagedField fe)+ [ Gtk.cellVisible := True+ , Gtk.cellText := showField (feStagedField fe) , Gtk.cellTextEditable := True ]- LveSum se ->- [ Gtk.cellText := showSum (seStagedSum se)- , Gtk.cellTextEditable := False+ LveSum _ ->+ [ Gtk.cellVisible := False ] LveConstructor _ ->- [ Gtk.cellText := ""+ [ Gtk.cellVisible := False , Gtk.cellTextEditable := False ] -- combo box- Gtk.cellLayoutSetAttributes colCombo rendererCombo treeStore $ \lve ->+ Gtk.cellLayoutSetAttributes colStagedValue rendererCombo treeStore $ \lve -> case lve of LveSum (SumElem {seStagedSum = denum, seListStore = listStore}) ->- [ Gtk.cellComboHasEntry := False+ [ Gtk.cellVisible := True+ , Gtk.cellComboHasEntry := False , Gtk.cellTextEditable := True , Gtk.cellComboTextModel := (listStore, Gtk.makeColumnIdString 0 :: Gtk.ColumnId String String) , Gtk.cellText := denumToStringOrMsg denum ] _ -> [ Gtk.cellMode := Gtk.CellRendererModeInert- , Gtk.cellText := ""+ , Gtk.cellVisible := False ] -- workaround to make sure combo box is displaying correctly, see -- http://stackoverflow.com/questions/35147473/cant-get-gtk2-cellrenderercombo-to-display-anything@@ -471,6 +469,9 @@ Gtk.set scroll [ Gtk.scrolledWindowHscrollbarPolicy := Gtk.PolicyNever , Gtk.scrolledWindowVscrollbarPolicy := Gtk.PolicyAutomatic ]+ -- 20 pixels width: other stuff is certainly larger than that so it'll never get that small+ -- 110 pixels height: enough for the user to see the selector window and a child or two.+ _ <- Gtk.widgetSetSizeRequest scroll 20 110 return (scroll, getLatestStaged, receiveNewUpstream, takeLatestUpstream, loadDTree)