Unknown
2014-07-27 21:23:25 UTC
Hello,
first of all, thank you so much for making Gtk2Hs work with GTK 3.
There is a problem with ComboBox and GTK 3: the combo boxes don't
display their popup. ComboBoxText works right, though.
Here is an example. If I compile it against the gtk package, everything
works well. But if I compile it against the gtk3 package, only the
ComboBoxText displays its popup.
module Main where
import Graphics.UI.Gtk
list = [
stockOk,
stockCancel,
stockEdit,
stockDialogInfo,
stockDialogQuestion,
stockDialogWarning,
stockDialogError
]
main = do
initGUI
w <- windowNew
on w objectDestroy mainQuit
set w [windowDefaultWidth := 100]
b <- vBoxNew True 4
l <- listStoreNew list
c1 <- comboBoxNew
s1 <- cellRendererPixbufNew
cellLayoutPackStart c1 s1 True
cellLayoutSetAttributes c1 s1 l $ \r -> [cellPixbufStockId := r]
comboBoxSetModel c1 $ Just l
c2 <- comboBoxNew
s2 <- cellRendererTextNew
cellLayoutPackStart c2 s2 True
cellLayoutSetAttributes c2 s2 l $ \r -> [cellText := r]
comboBoxSetModel c2 $ Just l
t <- comboBoxNewText
mapM_ (comboBoxAppendText t) list
boxPackStart b c1 PackNatural 0
boxPackStart b c2 PackNatural 0
boxPackStart b t PackNatural 0
containerAdd w b
widgetShowAll w
mainGUI
After reading the documentation for both packages I could not find any
implementation changes, so I think there might be a bug in the gtk3
package.
Best regards,
Alfonso Villén
first of all, thank you so much for making Gtk2Hs work with GTK 3.
There is a problem with ComboBox and GTK 3: the combo boxes don't
display their popup. ComboBoxText works right, though.
Here is an example. If I compile it against the gtk package, everything
works well. But if I compile it against the gtk3 package, only the
ComboBoxText displays its popup.
module Main where
import Graphics.UI.Gtk
list = [
stockOk,
stockCancel,
stockEdit,
stockDialogInfo,
stockDialogQuestion,
stockDialogWarning,
stockDialogError
]
main = do
initGUI
w <- windowNew
on w objectDestroy mainQuit
set w [windowDefaultWidth := 100]
b <- vBoxNew True 4
l <- listStoreNew list
c1 <- comboBoxNew
s1 <- cellRendererPixbufNew
cellLayoutPackStart c1 s1 True
cellLayoutSetAttributes c1 s1 l $ \r -> [cellPixbufStockId := r]
comboBoxSetModel c1 $ Just l
c2 <- comboBoxNew
s2 <- cellRendererTextNew
cellLayoutPackStart c2 s2 True
cellLayoutSetAttributes c2 s2 l $ \r -> [cellText := r]
comboBoxSetModel c2 $ Just l
t <- comboBoxNewText
mapM_ (comboBoxAppendText t) list
boxPackStart b c1 PackNatural 0
boxPackStart b c2 PackNatural 0
boxPackStart b t PackNatural 0
containerAdd w b
widgetShowAll w
mainGUI
After reading the documentation for both packages I could not find any
implementation changes, so I think there might be a bug in the gtk3
package.
Best regards,
Alfonso Villén