Matthias Clasen
21275a1636
Correct the documentation of gtk_render_arrow() x,y arguments
...
As pointed out in bug 655631, these are the origin, not
the center of the area.
2011-09-04 23:09:57 -04:00
Matthias Clasen
f601994eff
GtkFontChooser: escape markup where required
...
Since we use markup in the list, we need to escape the font name
and preview text pieces that we embed there.
2011-09-04 17:17:07 -04:00
Matthias Clasen
41dbd20d56
GtkAssistant: Fix label alignment
...
Make page titles left-aligned again. Changing from misc alignment
to GtkWidget::halign here was a mistake. We can't do that for labels
in a size group, as long as labels still pay attention to misc
alignment.
https://bugzilla.gnome.org/show_bug.cgi?id=658008
2011-09-04 00:42:31 -04:00
Matthias Clasen
dc898e3f84
GtkLabel: make patterns work a little better
...
When a pattern has been set, we must not throw away
the attributes that contain it.
https://bugzilla.gnome.org/show_bug.cgi?id=658111
2011-09-04 00:01:37 -04:00
Matthias Clasen
be152f9b61
GtkPlug: preserve map/unmap invariants
2011-09-02 21:40:42 -04:00
Matthias Clasen
ef4690d511
GtkGrid: make attaching more flexible
...
Allow to attach children at either end of row/column 0.
Proposed by Alex Larsson.
https://bugzilla.gnome.org/show_bug.cgi?id=657793
2011-09-02 20:07:19 -04:00
Cosimo Cecchi
f5e758bd60
themingengine: remove xthickness FIXME from gtk_render_line() code
...
The gtk_render_line() code has a FIXME (coming from the 2.x migration I
suppose) about using xthickness, and it actually hardcodes two lines of
different color instead of drawing a single one.
Since we don't support xthickness anymore, make gtk_render_line() do
what it says, i.e. just draw an 1px line colored with the current
color.
https://bugzilla.gnome.org/show_bug.cgi?id=657963
2011-09-02 15:11:53 -04:00
Cosimo Cecchi
640f06928f
treeview: add GTK_STYLE_CLASS_SEPARATOR for tree view separators
...
https://bugzilla.gnome.org/show_bug.cgi?id=657985
2011-09-02 15:11:15 -04:00
Eitan Isaacson
6eb777a8af
Change gtk_css_provider_propagate_error's signature.
...
Update to new parsing-error signal.
https://bugzilla.gnome.org/show_bug.cgi?id=657882
2011-09-02 09:19:18 -07:00
Matthias Clasen
22d046d7fe
Add a note about placeholder text use
...
Explain how this is really not such a great feature...
2011-09-02 00:35:38 -04:00
Javier Jardón
d780dde9e1
gtk/Makefile.am: Remove duplicate AM_CPPFLAGS
2011-08-30 22:47:33 +01:00
Matthias Clasen
3ff5a82e46
Clean up stock-icons
...
We copy them all in srcdir != builddir builds, so just
nuke the entire directory in that case.
2011-08-30 11:28:53 -04:00
Matthias Clasen
a233022934
Disable underallocation warnings in non-debug builds
...
It doesn't look like we have much traction of actually fixing
these, and there is very real cost to not being able to distcheck.
2011-08-30 11:28:52 -04:00
Murray Cumming
342c64c2f2
GtkToolShell: Move vfunc default results to default implementations.
...
Otherwise the default values are only used if no vfunc is set,
making that default unavailable to vfunc implementations as a fallback,
and unavailable to language bindings (such as gtkmm) that always
have a vfunc implementation, even if that often only tries to call
the base vfunc implemntation.
This was making gtkmm's ToolPalette's (and probably ToolBar's)
items look like buttons instead of being flat.
https://bugzilla.gnome.org/show_bug.cgi?id=656223
2011-08-30 15:28:06 +02:00
Matthias Clasen
9379a48e22
Add headers to treemodel test sources
...
...otherwise they don't make it into the release tarballs.
https://bugzilla.gnome.org/show_bug.cgi?id=657653
2011-08-29 20:34:46 -04:00
Matthias Clasen
925ed7c70f
Don't unref floating menuitems
...
With recent fixes, GTK+ no longer sinks menu items automatically,
so we have to do it explicitly here.
2011-08-29 11:57:39 -04:00
Alejandro Piñeiro
4244349600
a11y: Don't manage window events as a exception
...
https://bugzilla.gnome.org/show_bug.cgi?id=657260
2011-08-29 10:57:21 -04:00
Alejandro Piñeiro
08bf2e0463
a11y: Use AtkWindow on GtkWindowAccessible
...
GtkWindowAccessible doesn't require to define window related
signals. They are included on AtkWindow
2011-08-29 10:57:14 -04:00
Matthias Clasen
1090eba9a8
a11y: don't return random numbers
...
Return 0 for the image size if we don't have a pixbuf to measure.
2011-08-29 10:50:01 -04:00
Matthias Clasen
84504014aa
Fix exported symbols
2011-08-29 10:24:17 -04:00
Matthias Clasen
18dba17f0b
GtkAppChooserDialog: handle sensitivity of 'Select' better
...
When the dialog comes up without a selected item, make 'Select'
insensitive. Also, don't allow to unselect an item without
selecting a different one.
2011-08-28 23:49:41 -04:00
Matthias Clasen
6d797d5356
GtkAppChooser: Deal with 'no app found' gracefully
...
Several functions inside GtkAppChooserDialog were not handling
the situation that app_info might be NULL after the user clicked
'Select'.
https://bugzilla.gnome.org/show_bug.cgi?id=651827
2011-08-28 22:46:46 -04:00
Matthias Clasen
676316bbd3
Avoid warnings when widgets are not created yet
...
This widget is created on-demand, so we can not unconditionally
set its sensitivity in some other place.
2011-08-28 22:30:24 -04:00
Matthias Clasen
f64647077f
Add an accessor for grid children
...
This addresses concerns in bug 634136.
2011-08-28 21:20:53 -04:00
Matthias Clasen
b2188f5dc1
Trivial: include cleanups
2011-08-28 20:46:11 -04:00
Diego Celix
372a907e97
gtkappchooserdialog: gtk_misc_set_alignment
...
Replacing the function gtk_misc_set_alignment () with
gtk_widget_set_halign () and gtk_widget_set_valign () in
gtk/gtkappchooserdialog.c
https://bugzilla.gnome.org/show_bug.cgi?id=650762
2011-08-28 20:16:56 -04:00
Diego Celix
9dfff27c42
gtkaboutdialog: gtk_misc_set_alignment replacing
...
Replacing the function gtk_misc_set_alignment () with
gtk_widget_set_halign () and gtk_widget_set_valign () in
gtk/gtkaboutdialog.c
https://bugzilla.gnome.org/show_bug.cgi?id=650762
2011-08-28 20:16:54 -04:00
Matthias Clasen
5cc1318279
GtkTrayIconX11: Some more refactoring
...
I like my refactoring better...
2011-08-28 14:54:14 -04:00
Benjamin Otte
dca3ea896e
trayicon-x11: Refactor code a bit
...
Should make it more obvious what the code actually does.
2011-08-28 20:20:35 +02:00
Vincent Bernat
6754614ac1
trayicon-x11: Fix warnings when visual is not available.
...
This fixes a regression introduced in commit
b1a1685a33eca16979e63d79915395af0b36. gdk_visual_get_*_pixel_details()
should not be called with a NULL visual.
https://bugzilla.gnome.org/show_bug.cgi?id=649588
2011-08-28 20:20:35 +02:00
Matthias Clasen
6f39855c08
More include cleanups
2011-08-28 01:54:55 -04:00
Matthias Clasen
fd92e7150d
More include cleanups
2011-08-28 01:42:10 -04:00
Matthias Clasen
383127cd0b
Clean up unneeded includes
2011-08-28 01:40:10 -04:00
Matthias Clasen
227fafb93f
GtkPrintUnixDialog: Replace GtkTable by GtkGrid
2011-08-28 01:34:17 -04:00
Matthias Clasen
5b97a58230
GtkFileChooserDefault: Replace GtkTable by GtkGrid
2011-08-28 00:47:24 -04:00
Matthias Clasen
b043a0a610
GtkMountOperation: Replace GtkTable by GtkGrid
2011-08-28 00:39:44 -04:00
Matthias Clasen
280f34ec61
GtkPageSetupUnixDialog: replace GtkTable by GtkGrid
2011-08-28 00:35:51 -04:00
Matthias Clasen
1ca773c2d7
GtkColorSel: replace GtkTable by GtkGrid
2011-08-28 00:20:21 -04:00
Matthias Clasen
4b394fc847
Fix the build
2011-08-27 17:22:37 -04:00
Matthias Clasen
0039418001
GtkToolbar: partial fix for toolbar editing
...
When using an editable toolbar in evince, we can end up
in gtk_toolbar_get_visible() position with item being the
highlight_tool_item, but not one of the regular children.
So, handle that.
2011-08-27 11:45:01 -04:00
Matthias Clasen
c8e8cdaaf4
Make gtk_status_icon_set_name() work reliably
2011-08-27 01:26:48 -04:00
Matthias Clasen
8f3e43326b
Silence a compiler warning
2011-08-27 01:25:39 -04:00
Matthias Clasen
f7dbdba267
Revert "GtkColorButton: Don't forget to close a cairo context"
...
This reverts commit 144e4af8bc
.
2011-08-27 01:01:21 -04:00
Benjamin Otte
e11e51c252
notebook: Fix child property setters causing underallocations
...
Don't randomly allocate around, queue resizes instead.
2011-08-27 02:47:51 +02:00
Federico Mena Quintero
52711beba5
Merge branch 'bgo593793-filechooser-recent-folders-master'
2011-08-26 12:44:40 -05:00
Federico Mena Quintero
a265fb763b
bgo#657186 - Sort the recent-files list in newest-to-oldest order
...
Otherwise it's not very useful... :)
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-08-26 12:44:24 -05:00
Federico Mena Quintero
3bd037b7d9
Load and populate the recent-items in a single pass
...
There's no real asynchronicity going on, anyway, so let's do both within
a single iteration of the idle handler.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-08-26 12:44:22 -05:00
Federico Mena Quintero
e9c0faba42
Don't sort the recent-items by hand
...
The mtime from GtkRecentManager may not the same as the file's actual
mtime, so the final result could appear unsorted to the user. Instead,
we will let the view do the sorting.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-08-26 12:44:21 -05:00
Tristan Van Berkom
d7696bd25f
Avoid dereferencing NULL pointer in gtk_label_drag_data_get()
...
It's possible the GtkLabel receives drag'n'drop related signals
if it was setup to receive them by a container or other external
code, just avoid dereferencing priv->select_info in this case.
2011-08-26 19:02:36 +02:00
Benjamin Otte
71c3f7e93d
styleproperty: Improve error message
...
We do dsupport that feature still and don't want to scare people into
thinking everything broke.
2011-08-26 16:26:28 +02:00
Benjamin Otte
26e9d07718
API: cssprovider: Change parsing-error signal
...
Instead of path, line and position, emit the section the error happened
in. This has a lot more information to consume.
2011-08-26 16:26:28 +02:00
Benjamin Otte
8d6b560ff3
cssparser: Fix cases where we could overrun the terminating 0
2011-08-26 16:26:28 +02:00
Benjamin Otte
62d231aeff
cssparser: Make lines and positions 0-indexed
2011-08-26 16:26:28 +02:00
Benjamin Otte
0d1b73f857
cssprovider: Store sections with parsed values
...
Also create a separate section for values to associate the values with.
Finally, use this section information when delayed-parsing a widget
style property.
2011-08-26 16:26:27 +02:00
Benjamin Otte
ebf0b6ee4d
cssprovider: Handle non-NULL-terminated data
...
Do a dumb copy if that happens.
2011-08-26 16:26:27 +02:00
Benjamin Otte
d985b95ef9
cssprovider: Keep only the curent section while parsing
...
We don't need a list of sections, the section can give us the parent
when we need it (d'oh).
2011-08-26 16:26:27 +02:00
Benjamin Otte
19c44967cb
cssprovider: Remove dead code
...
The code isn't used anymore since the introduction of rulesets.
2011-08-26 16:26:27 +02:00
Benjamin Otte
00d14e3515
API: css: Add GtkCssSection
...
This struct keeps track of an area of text in a CSS file and uses it
when specifying information. Also, the cssprovider keeps track of
sections when parsing a file.
2011-08-26 16:26:27 +02:00
Colin Walters
c8fdd5e847
Squash two compilation warnings about possibly-uninitialzed
2011-08-25 14:47:21 -04:00
Ryan Lortie
05aeaeef9e
Signalify (already existing) GtkMenuShell.insert()
...
gtk_menu_shell_insert() is a virtual function that was being directly
invoked from the class vtable.
Turn it into a proper signal and emit it in the usual way.
https://bugzilla.gnome.org/show_bug.cgi?id=656565
2011-08-25 09:48:12 -04:00
Chun-wei Fan
7cf479135d
Update gtk/Makefile.am
...
Distribute fallback implementation source file for rint()/round()
2011-08-24 23:55:44 +08:00
Matthias Clasen
4a857ac023
Use a weak ref in GtkAccelLabel
...
GtkAccelLabel was holding a strong reference on its parent,
which could, depending on the circumstances, lead to leaks.
https://bugzilla.gnome.org/show_bug.cgi?id=344858
2011-08-24 08:16:03 -04:00
Matthias Clasen
144e4af8bc
GtkColorButton: Don't forget to close a cairo context
...
Patch by Jerome Lambourg, bug 655392.
2011-08-24 07:46:35 -04:00
Matthias Clasen
5c09061e0f
GtkFontChooserDialog: Select when a list item is activated
...
This is the expected behavior.
2011-08-24 00:49:59 -04:00
Matthias Clasen
f7bf35052e
GtkFontChooser: Add a ::font-activated signal
...
This signal gets emitted when a font in the list is activated.
2011-08-24 00:49:16 -04:00
Matthias Clasen
ca0c7c1649
GtkAppChooserDialog: remove an unused variable
2011-08-24 00:32:20 -04:00
Matthias Clasen
80b94156ed
GtkAppChooserDialog: Simplify the construction
...
We do the same in other places.
2011-08-24 00:11:32 -04:00
Matthias Clasen
14dc863da5
GtkAppChooserButton: Make activating rows work as expected
...
When a row is activated in the 'Other...' dialog, we have
to make sure the dialog goes away.
2011-08-24 00:10:34 -04:00
Matthias Clasen
c83db6cdf0
GtkSwitch: Return FALSE from the button press handler
...
This makes the behavior identical to other widgets which
handle button presses, and it avoids problems when placing
switches into a windows main toolbar.
https://bugzilla.gnome.org/show_bug.cgi?id=656986
2011-08-23 23:29:19 -04:00
Arx Cruz
c9023cadbf
[filechooser] bgo#349502: Context menu option to copy selected files to the clipboard
2011-08-23 17:10:03 -05:00
Matthias Clasen
3825a098c8
Change 'Ok' to 'Select' in the color chooser dialog
...
We have meaningful labels for the Ok buttons in all other choosers,
so just use the same string we use in the app chooser and the
font chooser.
Also move the mnemonic from s to a in 'Saturation', to avoid a
mnemonic conflict. String change !
https://bugzilla.gnome.org/show_bug.cgi?id=657006
2011-08-23 10:16:34 -04:00
Matthias Clasen
5c5cdf23a8
Add a mnemonic to the 'Select' button
...
This makes the string the same as in the app chooser dialog.
2011-08-23 10:08:33 -04:00
Kristian Rietveld
a91868496a
Fix typo in doc comment
2011-08-22 21:30:35 +02:00
Kristian Rietveld
b50375abf4
Add forgotten calls to signal_monitor_assert_is_empty()
2011-08-22 21:30:35 +02:00
Kristian Rietveld
d63015e627
Fix some memory leaks in treemodel unit tests
2011-08-22 21:30:35 +02:00
Kristian Rietveld
b31c3f1c1f
treemodelsort: eliminate unread variable assigments
...
Courtesy of scan-build/clang.
2011-08-22 21:30:35 +02:00
Kristian Rietveld
584ff7c29a
treemodelfilter: eliminate unread variable assigments
...
Courtesy of scan-build/clang.
2011-08-22 21:30:35 +02:00
Kristian Rietveld
36f712f272
Add some notes on how filter model testing can be made (even) more thorough
2011-08-22 21:30:34 +02:00
Kristian Rietveld
04885f1c29
Update filtermodel ref count unit tests to new cache depth
2011-08-22 21:30:34 +02:00
Kristian Rietveld
089edcf765
Fix bad typo in gtk_tree_model_filter_build_level() ...
2011-08-22 21:30:34 +02:00
Kristian Rietveld
6cd134d39e
gtktreemodelfilter: only maintain cache at 1 level depth instead of 2
2011-08-22 21:30:34 +02:00
Kristian Rietveld
aa9151a6ee
Extend public and internal documentation about GtkTreeModelFilter
2011-08-22 21:30:34 +02:00
Kristian Rietveld
52faf1f984
Extend documentation about GtkTreeModelSort internals
2011-08-22 21:30:34 +02:00
Kristian Rietveld
85d4a5abc7
GtkTreeModel: add more detailed documentation on reference counting
2011-08-22 21:30:34 +02:00
Kristian Rietveld
60d031e311
Replace GArray with GSequence in GtkTreeModelSort
...
This is done in the same way as GArray was replaced with GSequence in
GtkTreeModelFilter, in a patch done by Xavier Claessens.
All sorting code has been reworked to use the GSequence sorting
and insert sort functions, instead of doing a lot on our own.
2011-08-22 21:30:34 +02:00
Kristian Rietveld
ad0f54b87b
Add more unit tests for GtkTreeModelSort
...
To test ref counting during rows-reordered and the new_order arrays supplied
with rows-reordered signals.
2011-08-22 21:30:34 +02:00
Kristian Rietveld
9ef07cb0f3
Move SignalMonitor to treemodel.[ch] so it can be used by other tests
2011-08-22 21:30:34 +02:00
Kristian Rietveld
97b1f34868
Revert usage of parent_elt_index back to parent_elt pointers
...
Based on earlier patch for GtkTreeModelFilter by Xavier Claessens.
2011-08-22 21:30:33 +02:00
Xavier Claessens
bee3d5f143
Replace GArray with GSequence in GtkTreeModelFilter
...
Significantly improves performance when e.g. removing (filtering) a lot
of rows from the filter model. Fixes bug 616871.
This commit includes changes by Kristian Rietveld to make the patch apply
on top of the treemodel-fix branch and pass all newly written unit tests.
2011-08-22 21:30:33 +02:00
Xavier Claessens
eb594da2f2
Revert usage of parent_elt_index back to parent_elt pointers
...
This was introduced in commit a59c39f370
.
The revert is part of bug 616871. Adaption to recent GtkTreeModelFilter
changes by Kristian Rietveld.
2011-08-22 21:30:33 +02:00
Kristian Rietveld
510d84f682
Do not emit rows-reordered for levels with no visible rows
2011-08-22 21:30:33 +02:00
Kristian Rietveld
21d7eca12a
Remove left-over dump call
2011-08-22 21:30:33 +02:00
Kristian Rietveld
3b7aed050d
Correct ref transfer in GtkTreeModelFilter rows-reordered handling
2011-08-22 21:30:33 +02:00
Kristian Rietveld
30340e521e
Test GtkTreeModelFilter's reference transfers
2011-08-22 21:30:33 +02:00
Kristian Rietveld
e321034074
Unit test GtkTreeModelFilter's rows-reordered emissions
2011-08-22 21:30:33 +02:00
Kristian Rietveld
bcc1fd7efd
Unit test rows reordered ref count handling in GtkTreeView
2011-08-22 21:30:32 +02:00
Kristian Rietveld
0ee6141cf6
Should validate TreeModelRefCount before the sort and filter model
2011-08-22 21:30:32 +02:00
Kristian Rietveld
9e2fbca594
Add reference counting unit tests for GtkTreeModelFilter
2011-08-22 21:30:32 +02:00
Kristian Rietveld
f42de9e52a
Add more "has child" unit tests
...
This allows for more thorough testing of "has child" filter functions.
We also test a has child filter function with a sort model as
child model, to verify that we receive enough signals to function
properly.
2011-08-22 21:30:32 +02:00
Kristian Rietveld
504d6715c1
Add cleaned up and easier version of unit test for bug 311955
2011-08-22 21:30:32 +02:00
Kristian Rietveld
35e09df282
Check level length in unit test for bug 311955
2011-08-22 21:30:32 +02:00
Kristian Rietveld
59efa6acdd
Remove checks for superfluous signals which are not longer emitted
2011-08-22 21:30:32 +02:00
Kristian Rietveld
b161328682
Correct/expand base tests to check emitted signals
...
The filter model is now more strict about the signals which are emitted,
so the base tests have been expanded to test with both the root level
nodes collapsed and expanded.
2011-08-22 21:30:32 +02:00
Kristian Rietveld
1158ed5795
treemodelrefcount: check_iter(): check if iter is valid
2011-08-22 21:30:32 +02:00
Kristian Rietveld
07d99d26b2
treemodelrefcount: make it possible to assert within check functions
2011-08-22 21:30:32 +02:00
Kristian Rietveld
88dd6372b0
treemodelfilter: rework reference counting
...
- Before we kept a reference on all nodes in non-root levels. This has
been changed, now we keep a reference on the first node of each level.
If, due to changes in the model, another node becomes the first node in
the level, the reference is transferred to this new first node.
- All non-root levels keep a reference on their parent.
- By making use of the external ref count, the filter model now emits less
unnecessary signals.
- GtkTreeModelFilter does support filter functions which decide visibility
of a given node based on the number of or visibility of children.
To accomplish this, a child level of a node is cached when its
parent has an external ref count > 0, because changes to the node might
affect this parent.
- An optimization for not building the root level in case the inserted
node is not visible in gtk_tree_model_filter_row_inserted() has been
removed. In this case, we still need to build the root level and
possibly a child level to monitor for signals which might make
this row visible.
2011-08-22 21:30:32 +02:00
Kristian Rietveld
2984e22ef0
treemodelfilter: handle another case in check_ancestors
...
In gtk_tree_model_filter_check_ancestors(), also handle the case when
a node is already in the cache, but invisible, in the root level.
With the upcoming changes to GtkTreeModelFilter's ref counting this
case can occur.
2011-08-22 21:30:32 +02:00
Kristian Rietveld
52de413d43
treemodelfilter: guard for building already existing levels
2011-08-22 21:30:32 +02:00
Kristian Rietveld
dc15124c6f
treemodelfilter: Introduce notion of external ref count
...
We need to distinguish between the ref count objects have on us versus
the ref count we have on our child model. To keep track of the former,
we introduce the "external ref count" in this commit. The zero_ref_count
needs to be determined from the external ref count, because objects that
have a ref count on us have say in which levels must be cached and which
can be released.
Before the caching in GtkTreeModelFilter was essentially broken and
levels were never released. This was caused because the zero_ref_count
was connected to the ref count the filter model had on its child model.
Now that this depends on the external ref count, this is working fine and
as to be expected.
2011-08-22 21:30:32 +02:00
Kristian Rietveld
058a9090c2
treemodelfilter: Move more missions of row-deleted down
...
The row-deleted signal should be emitted after the internal data
structures have been updated. In gtk_tree_model_filter_remove_elt_from_level
and gtk_tree_model_filter_virtual_root_deleted the signal was still being
emitted before the updates were carried out.
2011-08-22 21:30:32 +02:00
Kristian Rietveld
cac5d60633
Unit test reference counting in GtkTreeModelSort
2011-08-22 21:30:31 +02:00
Kristian Rietveld
dec7a34047
Avoid unreferencing deleted nodes
...
Now that we call unref_node in free_level, we have to take care that
free_level may only unref (parent) nodes when these still exist in the
child model. After row-deleted has been received for a node, its
children may no longer unref this node.
2011-08-22 21:30:31 +02:00
Kristian Rietveld
7677e2d4e3
Bug 611922 - gtk_tree_model_sort_ref_node() is too slow
...
Referencing a parent node for each referenced node is overdone. Instead,
we now reference the parent from build_level and unreference in free_level.
Each level keeps a single reference on its immediate parent. This both
alleviates the performence problems and should perfectly serve the purpose.
2011-08-22 21:30:31 +02:00
Kristian Rietveld
d241323b08
Move asserts to gtktreemodelrefcount.h for other unit tests to use
2011-08-22 21:30:31 +02:00
Kristian Rietveld
bda09159c3
Add generic GtkTreeModel reference counting unit tests
2011-08-22 21:30:31 +02:00
Kristian Rietveld
1cb14a16b7
Add GtkTreeModelRefCount, only to be used in unit tests
2011-08-22 21:30:31 +02:00
Kristian Rietveld
b8752210ba
treemodelsort: Remove unnecessary comment
...
(I am no longer 17 years old and have grown up by now).
2011-08-22 21:30:31 +02:00
Kristian Rietveld
a485334c37
Add some comments to gtk_tree_model_filter_remove_elt_from_level
2011-08-22 21:30:31 +02:00
Kristian Rietveld
e89782742d
Fix a couple of memleaks in the filter model tests
...
(Not all of them yet, need to do the remainder on Linux since valgrind
on Mac OS X is a bit too noisy).
2011-08-22 21:30:31 +02:00
Kristian Rietveld
76cfd8bfac
Bug 621076 - GtkTreeModelFilter does not emit all signals in some ...
...
The bulk of the fix is to walk the chain of ancestors, starting at the
root level, and check if the visibility of any of the ancestors has
changed. If yes, the necessary signals are emitted so that this change
is propagated properly. This walk is done after a node has been
inserted, changed or deleted, see function
gtk_tree_model_filter_check_ancestors().
Bug reported, and initial debugging and analysis, by Xavier Claessens.
2011-08-22 21:30:31 +02:00
Kristian Rietveld
c8783d3339
Decrease code duplication in _remove_elt_from_level take two
2011-08-22 21:30:31 +02:00
Kristian Rietveld
df754517dd
Decrease amount of code duplication in _remove_elt_from_level
2011-08-22 21:30:31 +02:00
Kristian Rietveld
a9fd6b7f85
Rename gtk_tree_model_filter_remove_node for internal consistency
2011-08-22 21:30:31 +02:00
Kristian Rietveld
7a82045ca8
Change signature of gtk_tree_model_filter_remove_node
2011-08-22 21:30:31 +02:00
Xavier Claessens
22adfc67e5
Add thorough unit test for bug #621076
...
Minor edits and additions by Kristian Rietveld.
2011-08-22 21:30:30 +02:00
Kristian Rietveld
a172697d47
Corrections to has-child filter tests
2011-08-22 21:30:30 +02:00
Kristian Rietveld
74764f28bc
Improve specific_has_child_filter() test to also verify signals
2011-08-22 21:30:30 +02:00
Kristian Rietveld
ebb12d5f06
Improve specific_root_has_child_filter test to also verify signals
2011-08-22 21:30:30 +02:00
Kristian Rietveld
5bd3c52c0f
Have a separate category for tests of gtk_tree_model_filter_row_deleted
2011-08-22 21:30:30 +02:00
Kristian Rietveld
3452b0493d
Add two unit tests for gtk_tree_model_filter_row_inserted
2011-08-22 21:30:30 +02:00
Kristian Rietveld
4f33f10511
Use g_assert_cmpint instead of g_assert in check_level_length()
2011-08-22 21:30:30 +02:00
Kristian Rietveld
7b3c2751ee
Refactor emitting row-inserted for new nodes to a common code path
...
Suggested by Xavier Claessens / bug 621076.
2011-08-22 21:30:30 +02:00
Kristian Rietveld
bcb00d9a43
Fix comment
2011-08-22 21:30:30 +02:00
Kristian Rietveld
f064d07bda
Factor out find_elt_with_offset
...
Suggested by Xavier Claessens / bug 621076.
2011-08-22 21:30:30 +02:00
Kristian Rietveld
60f3f92e95
Refactor to a common code path for inserts of nodes in levels
...
Suggested by Xavier Claessens / bug 621076.
(Additional obseration: this should speed up the filter model's
handling of row-inserted as a binary search is now used instead
of a linear scan).
2011-08-22 21:30:30 +02:00
Xavier Claessens
dc12c373dc
Improve error messages of signal monitor
2011-08-22 21:30:30 +02:00
Kristian Rietveld
e0f12ce020
Factor out another part of gtk_tree_model_filter_row_deleted
2011-08-22 21:30:30 +02:00
Kristian Rietveld
1686e515d6
Three more TreeModelFilter remove ancestor tests
2011-08-22 21:30:30 +02:00
Kristian Rietveld
df0fcfb940
In sort model also emit row-deleted after updating the data structures
2011-08-22 21:30:30 +02:00
Kristian Rietveld
e9c960929b
Correct GtkTreeModelFilter to never unref an already deleted child node
2011-08-22 21:30:30 +02:00
Kristian Rietveld
b27a6568b7
Improve filter model remove node unit tests
2011-08-22 21:30:29 +02:00
Kristian Rietveld
f0da89fa20
Print failed assertions for failed child iterator conversions
2011-08-22 21:30:29 +02:00
Kristian Rietveld
2f5fbcd10a
Make _get_iter invalidate iterators when FALSE is returned
2011-08-22 21:30:29 +02:00
Kristian Rietveld
431987a2fa
Add more unit tests for gtk_tree_model_filter_row_deleted()
2011-08-22 21:30:29 +02:00
Kristian Rietveld
56f83ad197
Further reduce variable shadowing by factoring code out into functions
2011-08-22 21:30:29 +02:00
Kristian Rietveld
cb8c608e49
Add unit test for bug 77977 for reference
2011-08-22 21:30:29 +02:00
Kristian Rietveld
ed603fa790
Add bug base and bug numbers to tree model unit tests
2011-08-22 21:30:29 +02:00
Kristian Rietveld
f1d791355a
Move TreeModelSort specific tests to a new sortmodel.c file
2011-08-22 21:30:29 +02:00
Kristian Rietveld
b227aa06eb
Make naming of tree model unit tests consistent
...
All test paths now start with the name of the class which is being
tested.
2011-08-22 21:30:29 +02:00
Kristian Rietveld
2cb9f03a66
Put all GtkTreeModel unit tests in a single binary
...
This to reduce linking time and have all tests in a single binary.
2011-08-22 21:30:29 +02:00
Chun-wei Fan
ad73ed298d
Include C89 fallback code
...
gtk/gtkborderimage.c, gtk/gtklabel.c and gtk/gtkstyleproperty.c call
round() and/or rint(), which was only available in C99 compilers.
This adds the inclusion of the fallback implementation (gtk/fallback-c89.c)
to define these functions if they are not initially made available by the
compiler.
Also remove the rint() implementation in gtk/gtklabel.c as it is now in
the fallback implmentation.
2011-08-20 11:17:44 +08:00
Chun-wei Fan
db3fecc5b9
Add fallback implemetation for rint()/round()
...
Add an implementation for rint() and round() for compilers that do not
define one or both of them. Note that this file should be included
after config.h was included.
2011-08-20 11:17:43 +08:00
David Zeuthen
c68eeaa966
Bug 656851 – Allow use of GVariant in GtkListStore
...
Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-08-18 17:49:40 -04:00
Matthias Clasen
915d32f59c
Fix up symbol lists for recent api additions
2011-08-15 21:25:58 -04:00
Matthias Clasen
8cf52c8e6c
Fix a typo
2011-08-15 19:24:59 -04:00
Matthias Clasen
6877893ed5
Make setting fontname work, independent of a screen
2011-08-15 18:57:58 -04:00
Matthias Clasen
1207757924
Keep the currently selected font over theme changes
...
When repopulating the list of fonts, don't loose the current
selection, unless the font is no longer in the list.
2011-08-15 18:57:57 -04:00
Matthias Clasen
9c85d4f6df
Deprecate GtkFontSelection and GtkFontSelectionDialog
2011-08-15 18:57:57 -04:00
Matthias Clasen
930715665e
Trivial formatting fix
2011-08-15 18:57:57 -04:00
Matthias Clasen
0ee89f1360
Add new symbols
2011-08-15 18:57:57 -04:00
Matthias Clasen
a09ee203ec
Add filtering to the font chooser
2011-08-15 18:57:57 -04:00
Matthias Clasen
ba564088c3
Add 'no matches' functionality
...
Initial cut at showing a 'no matches' message if the font list
is empty.
2011-08-15 18:57:57 -04:00
Matthias Clasen
6fb69845b0
Make the fontchooser dialog come up in a reasonable size
...
This is not a perfect solution; we really just want to set
a nice default size, but GTK+ does not make that easy.
2011-08-15 18:57:57 -04:00
Matthias Clasen
7c4ad1f400
Just use a single grid
...
The subgrid didn't really add anything.
2011-08-15 18:57:57 -04:00
Matthias Clasen
43d62c08e3
Clean up error handling
2011-08-15 18:57:57 -04:00
Matthias Clasen
5b9857d9b9
Rename some statics
...
gtk_font_chooser_ref_{family,face} -> gtk_font_chooser_set_{family,face}
2011-08-15 18:57:57 -04:00
Matthias Clasen
8dbdfa7e73
Avoid extraneous signals at destroy time
...
We need to disconnect the cursor-changed handler before the
treeview gets destroyed, to avoid unwanted emissions.
2011-08-15 18:57:57 -04:00
Matthias Clasen
97d26ac9c0
Simplify a few things
...
Adwaita seems to misrender focus on entries with margins, so
use spacing instead. Also, don't use entry buffer unnecessarily.
2011-08-15 18:57:57 -04:00
Matthias Clasen
a18fab88a1
Trivial formatting fixes
...
Just committing these is easier than writing them up.
2011-08-15 18:57:57 -04:00
Alberto Ruiz
a58a2dc0d3
GtkFontChooserDialog: GtkFontButton now uses GtkFontChooserDialog instead of GtkFontSelectionDialog
2011-08-15 18:57:57 -04:00
Alberto Ruiz
e79842ce94
GtkFontChooser: get_font_name did not return the font size
2011-08-15 18:57:56 -04:00
Alberto Ruiz
d33088a805
GtkFontChooser: Stub code to handle empty list by search.
2011-08-15 18:57:56 -04:00
Alberto Ruiz
66a7add23f
GtkFontChooser: font-name property notification wasn't properly propagated during size change from the spinbutton
2011-08-15 18:57:56 -04:00
Alberto Ruiz
52177f5e0d
GtkFontChooser: Missing G_END_DECLS in fontchooser header
2011-08-15 18:57:56 -04:00
Alberto Ruiz
5795d3d616
GtkFontChooser: Using G_N_ELEMENTS instead of a define
2011-08-15 18:57:56 -04:00
Alberto Ruiz
9245a66e6f
GtkFontChooser: Using the widget instead of the private struct as signal data in all conects
2011-08-15 18:57:56 -04:00
Alberto Ruiz
bf8ad994d4
GtkFontChooser: Fixed coding style wrt spacing around operators
2011-08-15 18:57:56 -04:00
Alberto Ruiz
26fb5c90b1
GtkFontChooser: Using explicit comparisons for g_strcmp0
2011-08-15 18:57:56 -04:00
Alberto Ruiz
ab1ebb072e
GtkFontChooser: Added missing breaks in switch statements
2011-08-15 18:57:56 -04:00
Alberto Ruiz
c36d291acc
GtkFontChooser: Setting all ought to be static functions as static
2011-08-15 18:57:56 -04:00
Alberto Ruiz
bf457d129e
GtkFontChooserDialog: Add parent window as a parameter in the constructor
2011-08-15 18:57:56 -04:00
Alberto Ruiz
523190f69a
GtkFontChooserDialog: Fix get_font_chooser public function name
2011-08-15 18:57:56 -04:00
Alberto Ruiz
23b15254bb
GtkFontChooser: Set correct margin values between UI elements
2011-08-15 18:57:56 -04:00
Alberto Ruiz
a55d2f67b0
GtkFontChooserDialog: Use g_object_new to set initial values in the dialog constructor
2011-08-15 18:57:56 -04:00
Alberto Ruiz
01f279338f
GtkFontChooser: Remove outdated Copyright information
2011-08-15 18:57:56 -04:00
Alberto Ruiz
1dda502bcb
GtkFontChooser: Fix size synchronization between slider and spin button
2011-08-15 18:57:56 -04:00
Alberto Ruiz
cabfcbd18d
GtkFontChooser: Cleanup comments and fix indentation alignments
2011-08-15 18:57:56 -04:00
Alberto Ruiz
e3f70857af
GtkFontChooser: Remove default geometry defines
2011-08-15 18:57:55 -04:00
Alberto Ruiz
55d50b3cca
GtkFontChooser: Fix scroll callback connected to treeview instead of preview
2011-08-15 18:57:55 -04:00
Alberto Ruiz
9dee34ad27
GtkFontChooser: Remove the themed color for the font title
2011-08-15 18:57:55 -04:00
Alberto Ruiz
f5a00f0c77
GtkFontChooser: Use a nested grid to achieve the right layout in the size controls
2011-08-15 18:57:55 -04:00
Alberto Ruiz
1075b7ac38
GtkFontChooser: Fix expand and fill properties for the grid layout
2011-08-15 18:57:55 -04:00
Alberto Ruiz
d9187472f5
GtkFontChooser: Use GtkBox instead of GtkVBox as base class.
2011-08-15 18:57:55 -04:00
Alberto Ruiz
b37863a5ba
GtkFontChooser: Use const instead of G_CONST_RETURN
2011-08-15 18:57:55 -04:00
Alberto Ruiz
03ab18fa7a
GtkFontChooser: Add preview entry to the grid
2011-08-15 18:57:55 -04:00
Alberto Ruiz
f60d0dc35a
GtkFontChooser: Initial work to use GtkGrid
2011-08-15 18:57:55 -04:00
Alberto Ruiz
4163fa5d29
GtkFontChooser: GtkFontChooserDialog: Update documenation to reflect Since: 3.2
2011-08-15 18:57:55 -04:00
Alberto Ruiz
4add47946b
GtkFontChooserDialog: Split the dialog out of gtkfontchooser.[ch] to gtkfontchooserdialog.[ch]
2011-08-15 18:57:55 -04:00
Alberto Ruiz
8e621f593e
GtkFontChooser: Use symbolic icons in the filter entry
2011-08-15 18:57:55 -04:00
Alberto Ruiz
5ccc66d855
GtkFontChooser: Now shearch filters each individual term rather than the whole string at once
2011-08-15 18:57:55 -04:00
Alberto Ruiz
db2ef8ce51
GtkFontChooser: Restore automatic alignment on scroll to selection
2011-08-15 18:57:55 -04:00
Alberto Ruiz
7067d36adb
GtkFontChooser: Removed support for deprecated functionality from GtkFontSelector
2011-08-15 18:57:55 -04:00
Alberto Ruiz
4bf22639d1
GtkFontChooser: Expose the new widget in gtk.h and add test cases
2011-08-15 18:57:55 -04:00
Alberto Ruiz
334ee81901
GtkFontChooser: Renaming the class names and fixing the tests
2011-08-15 18:57:55 -04:00
Alberto Ruiz
f2376ad401
GtkFontChooser: Remove wrong usage of GTK_DISABLE_DEPRECATED
2011-08-15 18:57:55 -04:00
Alberto Ruiz
bbe8d13c6e
GtkFontChooser: Check if the deprecated widgets are present before updating the size list
2011-08-15 18:57:54 -04:00
Alberto Ruiz
1b00a3eb76
GtkFontChooser: Update fontlist on style change
2011-08-15 18:57:54 -04:00
Alberto Ruiz
6dec212d1d
GtkFontChooser: Add a property to control whether the preview entry is shown or not
2011-08-15 18:57:54 -04:00
Alberto Ruiz
5eb614a25b
GtkFontChooser: Add gtk_font_selection_dialog_get_select_button and use GTK_DISABLE_DEPRECATED in gtkfontsel.h
2011-08-15 18:57:54 -04:00
Alberto Ruiz
1ce5a04406
GtkFontChooser: Changed dialog label from OK to Select, deprecated get_ok_button and internal apply button.
2011-08-15 18:57:54 -04:00
Alberto Ruiz
31776e2a25
GtkFontChooser: implement gtk_font_selection_set/get_preview_text
2011-08-15 18:57:54 -04:00
Alberto Ruiz
14fbbf1420
GtkFontChooser: check if font name is NULL in gtk_font_selection_set_font_name
2011-08-15 18:57:54 -04:00
Alberto Ruiz
ea4603e5d1
GtkFontChooser: gtk_font_selection_set_font_name implementation
2011-08-15 18:57:54 -04:00
Alberto Ruiz
3f2b09422d
GtkFontChooser: Setting the font-name property. Test updates. Remove warnings.
2011-08-15 18:57:54 -04:00
Alberto Ruiz
0aae453d77
GtkFontChooser: Improve bootstrapping of the deprecated lists
2011-08-15 18:57:54 -04:00
Alberto Ruiz
2ef00d23e3
GtkFontChooser: Update selection on deprecated size list selection
2011-08-15 18:57:54 -04:00
Alberto Ruiz
dc1a47ad70
GtkFontChooser: Update selection on deprecated face or font list selection
2011-08-15 18:57:54 -04:00
Alberto Ruiz
0ef0359566
GtkFontChooser: Update size when selecting an item of the deprecated size list
2011-08-15 18:57:54 -04:00
Alberto Ruiz
72a971b0e0
GtkFontChooser: Blocking the cursor change callbacks from happening on the deprecated widgets when selecting the font from the fontselector
2011-08-15 18:57:53 -04:00
Alberto Ruiz
c28b1e32e3
GtkFontChooser: Update deprecated font list on slection
2011-08-15 18:57:53 -04:00
Alberto Ruiz
1821eac1c1
GtkFontChooser: Refactoring the default font size, face and family assignment for clarity
2011-08-15 18:57:53 -04:00
Alberto Ruiz
aa10abacbc
GtkFontChooser: Use the theme font as the default font
2011-08-15 18:57:53 -04:00
Alberto Ruiz
4b92872a97
GtkFontChooser: Add callbacks and improve test to take deprecated widgets into account
2011-08-15 18:57:53 -04:00
Alberto Ruiz
e80053c659
GtkFontChooser: Use GTK_DISABLE_DEPRECATED to encapsulate the deprecated functionality
2011-08-15 18:57:53 -04:00
Alberto Ruiz
3c0b6914e0
GtkFontChooser: Unref deprecated widgets on finalize
2011-08-15 18:57:53 -04:00
Alberto Ruiz
bb008411e0
GtkFontChooser: Use scrolled windows for the deprecated widgets
2011-08-15 18:57:53 -04:00
Alberto Ruiz
706167bbbd
GtkFontChooser: Populate face names in the deprecated face list
2011-08-15 18:57:53 -04:00
Alberto Ruiz
0d112810f9
GtkFontChooser: Populate font family names in the deprecated family list
2011-08-15 18:57:53 -04:00
Alberto Ruiz
8826a10bc8
GtkFontChooser: Add tree view columns for the deprecated widgets
2011-08-15 18:57:53 -04:00
Alberto Ruiz
915b442dc1
GtkFontChooser: Fix segmentation fault in deprecated size list population
2011-08-15 18:57:53 -04:00
Alberto Ruiz
29a0685ee8
GtkFontChooser: Add deprecated calls to the test
2011-08-15 18:57:53 -04:00
Alberto Ruiz
1a2ef4db60
GtkFontChooser: update the size model for the deprecated size list
2011-08-15 18:57:53 -04:00
Alberto Ruiz
e08006f691
GtkFontChooser: initialization and destruction of deprecated widgets and data models
2011-08-15 18:57:53 -04:00
Alberto Ruiz
abc92d5030
GtkFontChooser: Initial support for deprecated functions
2011-08-15 18:57:53 -04:00
Alberto Ruiz
c96698e95f
GtkFontChooser: Filter also by font face
2011-08-15 18:57:53 -04:00
Alberto Ruiz
58b2204651
GtkFontChooser: Layout improvements, spacing between elements and default widget size.
2011-08-15 18:57:53 -04:00
Alberto Ruiz
36156a6c49
GtkFontChooser: Layout improvements. Adding shadow to scrolled windows. Font+Face text is now bold.
2011-08-15 18:57:52 -04:00
Alberto Ruiz
f75e4d314a
GtkFontChooser: Improvements on the size setting signals between the preview, scale and spinbutton. Adding more string fields to the model to allow for backwards compatibility.
2011-08-15 18:57:52 -04:00
Alberto Ruiz
1688512252
GtkFontChooser: Fixing mouse scroll zooming behaviour for the preview and the size controls
2011-08-15 18:57:52 -04:00
Alberto Ruiz
858e13cad6
GtkFontChooser: Setting a minimum width andfix the markup for the rows
2011-08-15 18:57:52 -04:00
Alberto Ruiz
af14106a63
GtkFontChooser: Ellipsize cell renderer and set a better size list
2011-08-15 18:57:52 -04:00
Alberto Ruiz
0db1b63b1f
GtkFontChooser: Keep reference to the face and the family objects
2011-08-15 18:57:52 -04:00
Alberto Ruiz
88ab6f14d3
GtkFontChooser: Better cursor selection and model leak fixes
2011-08-15 18:57:52 -04:00
Alberto Ruiz
f3e9bb312e
GtkFontChooser: Enable font selection
2011-08-15 18:57:52 -04:00
Alberto Ruiz
c9150374d9
GtkFontChooser: Setting a default vertical size
2011-08-15 18:57:52 -04:00
Alberto Ruiz
7f125d95e8
GtkFontChooser: Layout enhancements, using a scrolled window for the preview entry.
2011-08-15 18:57:52 -04:00
Alberto Ruiz
cbaca3e4bf
GtkFontChooser: Fixed size updating in the preview
2011-08-15 18:57:52 -04:00
Alberto Ruiz
272f11069f
GtkFontChooser: Improvements on the spin/slider interaction
2011-08-15 18:57:52 -04:00
Alberto Ruiz
c303d0b18c
GtkFontChooser: The spinner now updates the slider size if it is within the range
2011-08-15 18:57:52 -04:00
Alberto Ruiz
1fa2c503a7
GtkFontChooser: Getting the refiltering right for the clear icon. Filter function speedups.
2011-08-15 18:57:52 -04:00