Commit Graph

25466 Commits

Author SHA1 Message Date
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
e1ecd34ce1 Added "fit-model" and "draw-sensitive" properties to GtkCellView
- "fit-model" decides that the cellview should request space for
   the entire treemodel, this ensures the cell view displayed on
   a combo box will not spuriously change size when the selected
   item changes.

 - "draw-sensitive" forces cell area to render cells sensitive
   even if they are insensitive in the model.
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
e628345394 Fixed GtkCellView to call cell_view_set_model() and disconnect signals at dispose time. 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
b6b810ba51 Reduced code in GtkCellView by just implementing the GtkCellLayout->get_area method. 2011-01-04 23:37:06 +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
88ec6a62ef GtkCellView now watches the "row-changed" signal.
When the "row-changed" signal on the model is trapped, if the row which
changed is the displayed row then the context is flushed and sizes are
recalculated for every area in the same context.
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
6d8dfd5546 Fixed GtkCellView to not clear the layout when disposing
The layout belongs the underlying area which may be shared across
views and treemenus, let the cells be destroyed when the area is finally
destroyed.
2011-01-04 23:37:06 +09:00
Tristan Van Berkom
53bdca9dae Adding more "small" submenus to testtreemenu 2011-01-04 23:37:06 +09:00
Tristan Van Berkom
1cacae9cc4 Fixed trailing ';' on if statement in gtkmenuitem.c 2011-01-04 23:37:06 +09:00
Tristan Van Berkom
aef55bb629 Added submenus to tests/testtreemenu 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
c690402446 Fixed GtkMenuItem to reserve the actual arrow size and spacing
GtkMenuItem was reserving arrow size based on it's requested height,
now base the submenu arrow size on the actual arrow size and spacing.
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
Tristan Van Berkom
f15a589651 Added gtk_menu_item_set/get_reserve_indicator.
This is needed by GtkTreeMenu to ensure that child menu items
reserve space for the submenu indicator even if they dont have
submenus... in this way we ensure the same size of all cell
areas in the menu items at allocation/request time.
2011-01-04 23:37:06 +09:00
Tristan Van Berkom
5e8e4429c7 Fixing GtkCellView PROP_CELL_AREA_CONTEXT property id
... and renaming some internal variables.
2011-01-04 23:37:06 +09:00
Tristan Van Berkom
988200800c Added gtk_cell_view_new_with_context(). 2011-01-04 23:37:06 +09:00
Tristan Van Berkom
b70589b6a4 Reimplemented GtkCellView using an internal GtkCellArea.
Added construct GtkCellArea and GtkCellAreaContext properties,
the context property allows putting multiple cellviews into the
same size request context.
2011-01-04 23:37:05 +09:00
Tristan Van Berkom
58cdd6d38e Removed GtkMenuItem->show_submenu_indicator flag
The show_submenu_indicator flag was explicitly set in various
places from GtkMenu/GtkMenuBar at request times, since the
GtkMenuItem already checks the parent type for GTK_IS_MENU_BAR()
in various places, removed this flag in favor of just checking
the parent type (only in the interest of better readable code).
2011-01-04 23:37:05 +09:00
Matthias Clasen
7352a166b6 Formatting fixes and whitespace cleanups 2011-01-04 02:21:38 -05:00
Matthias Clasen
32bfc980c1 Remove pack property altogether 2011-01-04 02:06:03 -05:00
Matthias Clasen
723fedef8b Remove pack consideration from tab drawing 2011-01-04 02:03:03 -05:00
Matthias Clasen
4ea886aea1 Don't consider pack when allocating tabs 2011-01-04 01:57:22 -05:00
Matthias Clasen
f9d6bc6cca Drop pack consideration from gtk_notebook_search_page 2011-01-04 01:39:18 -05:00
Matthias Clasen
a7bb193377 Drop internal function to find page position 2011-01-04 01:36:09 -05:00
Matthias Clasen
f838ecf9f0 Remove pack consideration from tab dnd 2011-01-04 01:35:52 -05:00
Matthias Clasen
88501d527d Remove pack consideration from tab reordering 2011-01-04 01:23:05 -05:00
Matthias Clasen
03b37a2e54 Remove pack arguments from some internal functions
This removes pack from gtk_notebook_{set,query}_tab_label_packing.
2011-01-04 01:11:28 -05:00
Matthias Clasen
08a99e9ab3 Remove the deprecated GtkNotebook:tab-pack child property 2011-01-04 00:57:34 -05:00
Matthias Clasen
98b140e7b5 Don't use GtkNotebook:tab-pack in testnotebookdnd 2011-01-04 00:55:50 -05:00
Matthias Clasen
c874bba0e1 GtkNotebook: fix reference to no-longer-exiting function in docs 2011-01-03 22:55:38 -05:00
Matthias Clasen
72b69ae2ed Don't use page_size in GtkSpinButton
It ought to be 0 anyway, but don't use it.

This puts bug 307963 to rest.
2011-01-03 21:51:58 -05:00
Matthias Clasen
a975d62071 Rename gtk-update-icon-cache and gtk-builder-convert back
In bug 635207, it was pointed out that it is a bad idea to
rename these tools purely in the name of parallel-installability,
since it forces dependencies to make a choice between running
gtk-update-icon-cache and gtk-update-icon-cache-3.0 (or both ?!).

So, we rename these utilities back to their un-suffixed names
and rely on distributors to resolve the conflict between GTK+ 2.x
and GTK+ 3.0 packages, which can be done e.g. by dropping the
utilities from the gtk3 packages and add a gtk3 -> gtk2 dependency.
2011-01-03 21:35:23 -05:00
Carlos Garnacho
7266d0f11f Make GtkPathBar use ::style-updated 2011-01-04 03:06:27 +01:00
Carlos Garnacho
c3b5b3531c GtkPaned: Remove unneeded call 2011-01-04 03:06:26 +01:00
Carlos Garnacho
f9a5c14ac0 Make GtkOffscreenWindow use GtkStyleContext 2011-01-04 03:06:26 +01:00
Carlos Garnacho
7e2dea1dff GtkNotebook: remove unneeded call 2011-01-04 03:06:25 +01:00
Carlos Garnacho
61691117dc GtkMisc: Remove unneeded calls 2011-01-04 03:06:24 +01:00
Carlos Garnacho
905604550a Make GtkMessageDialog use GtkStyleContext 2011-01-04 03:06:24 +01:00
Carlos Garnacho
166b709c7f Make GtkLinkButton use ::style-updated 2011-01-04 03:06:23 +01:00
Carlos Garnacho
80e115331c GtkInvisible: Avoid chaining up in ::style-updated 2011-01-04 03:06:22 +01:00
Carlos Garnacho
7b3de2d552 Make GtkHandleBox size request code use GtkStyleContext for padding 2011-01-04 03:06:22 +01:00
Carlos Garnacho
b062a583d3 Make GtkFixed use GtkStyleContext 2011-01-04 03:06:21 +01:00
Carlos Garnacho
14a5c0b9ff Make GtkFileChooser use GtkStyleContext 2011-01-04 03:06:21 +01:00
Carlos Garnacho
8e18c2cfd2 Make GtkFileChooserButton use ::style-updated 2011-01-04 03:06:21 +01:00
Carlos Garnacho
96d8f85dcc Make DnD code use GtkStyleContext for the highlight rectangle. 2011-01-04 03:06:20 +01:00