From: Duncan C. <dun...@us...> - 2005-05-21 02:11:40
|
Update of /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/MenuComboToolbar In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20749/gtk/Graphics/UI/Gtk/MenuComboToolbar Modified Files: ComboBox.chs.pp Log Message: Various minor API changes: Bin.chs: make binGetChild return Maybe. Paned.chs.pp: make panedGetChild(1|2) return Maybe. ComboBox.chs.pp: make comboBoxSetModel accept the model argument in a Maybe type so it is possible to unset the model. TextBuffer.chs.pp: make textBufferGetIterAtLine folow the normal argument order convention. Frame.chs: make frameGetLabelAlign and frameSetLabelAlign get and set the yalign as well as just the xalign. TreeView.chs.pp: make treeViewExpandRow folow the normal argument order convention and change the docs a bit. APICHANGES: record these api changes. Index: ComboBox.chs.pp =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs.pp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- ComboBox.chs.pp 7 May 2005 20:57:26 -0000 1.9 +++ ComboBox.chs.pp 21 May 2005 02:11:30 -0000 1.10 @@ -262,17 +262,18 @@ (toComboBox self) -- | Sets the model used by @comboBox@ to be @model@. Will unset a previously --- set model (if applicable). +-- set model (if applicable). If model is @Nothing@, then it will unset the +-- model. -- -- Note that this function does not clear the cell renderers, you have to -- call 'comboBoxCellLayoutClear' yourself if you need to set up different cell -- renderers for the new model. -- -comboBoxSetModel :: (ComboBoxClass self, TreeModelClass model) => self -> model -> IO () +comboBoxSetModel :: (ComboBoxClass self, TreeModelClass model) => self -> Maybe model -> IO () comboBoxSetModel self model = {# call gtk_combo_box_set_model #} (toComboBox self) - (toTreeModel model) + (maybe (TreeModel nullForeignPtr) toTreeModel model) -- | Appends the given string to the list of strings stored in the combo box. -- Note that you can only use this function with combo boxes constructed with @@ -443,7 +444,7 @@ #if GTK_CHECK_VERSION(2,6,0) -- | The model from which the combo box takes the values shown in the list. -- -comboBoxModel :: (ComboBoxClass self, TreeModelClass model) => ReadWriteAttr self (Maybe TreeModel) model +comboBoxModel :: (ComboBoxClass self, TreeModelClass model) => ReadWriteAttr self (Maybe TreeModel) (Maybe model) comboBoxModel = newAttr comboBoxGetModel comboBoxSetModel |