Commit Graph

25 Commits

Author SHA1 Message Date
Murray Cumming
f91c04e284 Minor documentation improvements
Mostly correcting it's to its and changing some , to .
2011-02-23 10:26:21 +01:00
Tristan Van Berkom
e6a51e4afb More accurate fix for GtkTreeMenu regression.
The previous fix rebuilds the root menu unconditionally,
this one only rebuilds the root menu if the root path
has indeed changed.

https://bugzilla.gnome.org/show_bug.cgi?id=639792
2011-01-19 00:43:08 +09:00
Matthias Clasen
64c79c15a6 Fix a combo refactor regression
https://bugzilla.gnome.org/show_bug.cgi?id=639792
2011-01-17 21:56:34 -05:00
Matthias Clasen
f35c3fd5f7 Undoccommentize gtktreemenu.c 2011-01-06 09:00:53 -05:00
Tristan Van Berkom
68aa336f5f Removed TABs and trailing whitespace from GtkComboBox and GtkTreeMenu 2011-01-05 00:14:25 +09:00
Tristan Van Berkom
185744d402 Mentioned that GtkTreeMenu is based on some GtkComboBox code in the copyright header. 2011-01-04 23:37:14 +09:00
Tristan Van Berkom
4ff893979b Fixed conflicts after rebasing master into combo-refactor branch. 2011-01-04 23:37:14 +09:00
Tristan Van Berkom
7b2d6e5cdf Make GtkTreeMenu a private class:
- Removed GtkTreeMenu from gtk-docs.sgml
  - Removed GtkTreeMenu from gtk3-sections.txt
  - Removed GtkTreeMenu from gtk.symbols
  - Make GtkTreeMenu apis prefixed with '_' (including _get_type()).
  - Updated GtkComboBox sources to use the private apis
  - Updated GtkCellView to not mention #GtkTreeMenu in gtk-doc statements
  - Updated tests/testtreemenu to not use a GtkTreeMenu but still
    show a very fancy GtkComboBox
  - Moved gtktreemenu.h to private headers section in the makefile.
  - Removed include of gtktreemenu.h from gtk.h
2011-01-04 23:37:13 +09:00
Tristan Van Berkom
467fb0d7dc Fixed gtk_tree_menu_path_in_menu function which has been malfunctioning.
Now sensitivity is properly handled in the "apply-attributes" callback.
2011-01-04 23:37:12 +09:00
Tristan Van Berkom
613545f821 Fixed a broken gtk-doc statement in gtktreemenu.c 2011-01-04 23:37:11 +09:00
Tristan Van Berkom
7a673b2ed1 Added all documentation for new GtkTreeMenu 2011-01-04 23:37:10 +09:00
Tristan Van Berkom
15ac4be60f Fixed combo-refactor branch for recent switch to gtk_cell_area_context_reset() api. 2011-01-04 23:37:10 +09:00
Tristan Van Berkom
1193c30e15 Revert "Added gtk_tree_menu_get_area()."
This reverts commit d32d7c8f9c4d2bcd7c5c206c09273ce67ed20df4.
2011-01-04 23:37:10 +09:00
Tristan Van Berkom
f101bf4a2d Added gtk_tree_menu_get_area(). 2011-01-04 23:37:09 +09:00
Tristan Van Berkom
caf1d57fd3 Fixed inserting and deleting rows for submenus of GtkTreeMenu 2011-01-04 23:37:08 +09:00
Tristan Van Berkom
4a5be7c74e Getting closer to updating the treemenu view properly from the model signals 2011-01-04 23:37:08 +09:00
Tristan Van Berkom
83c69f4cf3 Implementing GtkComboBox using GtkTreeMenu !
First iteration at implementing combo box using a delegate
treemenu, almost everything is working. Still need to finalize
sensitivity issues in GtkTreeMenu (and should go ahead and pass
through GtkComboBox code with a fine comb...).
2011-01-04 23:37:08 +09:00
Tristan Van Berkom
d48690c32c Make GtkTreeMenu update menu item sensitivity when "apply-attributes" signal is fired for a row in the menu. 2011-01-04 23:37:08 +09:00
Tristan Van Berkom
84a726c3ce Support grid mode in GtkTreeMenu
Added properties "wrap-width", "row-span-column" and "column-span-column"
to allow grid style menus from treemodels. Handling row data changes
appropriately.
2011-01-04 23:37:07 +09:00
Tristan Van Berkom
de59f05ccd Added gtk_tree_menu_set/get_tearoff to allow the root menu to have a tearoff item
Combo boxes expose an "add-tearoffs" feature to add a tearoff item to the root of the combo menu, added this feature to GtkTreeMenu to achieve this (and updated the testcase).
2011-01-04 23:37:07 +09:00
Tristan Van Berkom
3a56f8814f Reduced code size in GtkTreeMenu by only implementing GtkCellLayout->get_area method for the GtkCellLayout iface. 2011-01-04 23:37:07 +09:00
Tristan Van Berkom
438b0f7c9b Connected to GtkTreeModel signals in GtkTreeMenu
Now the GtkTreeMenu properly updates its hierarchy when the underlying
model data changes (row inserted/deleted or reordered). Also some unneeded
hackery was removed, all size calculations are delegated to the cellviews.
2011-01-04 23:37:06 +09:00
Tristan Van Berkom
9ffaae5022 Added GtkTreeMenuHeaderFunc to decide if a submenu gets a leaf header.
GtkComboBox needs treemenus to allow selection of all leafs including
rows which may have children, this allows the combobox or combobox user
to decide which row that has children can also be selectable as a header
leaf of the submenu. Test case testtreemenu updated to reflect this.
2011-01-04 23:37:06 +09:00
Tristan Van Berkom
963db86d23 Fixed GtkTreeMenu to not infinitely recurse when building submenus.
GtkTreeMenu needs to only populate it's submenus when set_root()
is called, we were populating it when the model is set which cause
the tree to be infinitely populated as the root is NULL by default.

Also call gtk_menu_set_reserve_toggle_thingy (FALSE) to not reserve
space for the toggle size.
2011-01-04 23:37:06 +09:00
Tristan Van Berkom
26c3f1a26d Adding GtkTreeMenu class.
Added GtkTreeMenu class to automatically render
a GtkTreeModel into a GtkMenu hierarchy (will be
used by GtkComboBox for its dropdown menus). Included
an accompanying testcase tests/testtreemenu
2011-01-04 23:37:06 +09:00