Commit Graph

9209 Commits

Author SHA1 Message Date
Kristian Rietveld
6f2aff35f7 Add unit test for bug 540201 2009-09-05 17:15:41 +02:00
Kristian Rietveld
81bc45ee69 Add a helper for inserting paths in the test tree store 2009-09-05 17:15:41 +02:00
Kristian Rietveld
923a6a8083 Start a testsuite for GtkTreeModelFilter 2009-09-05 17:15:41 +02:00
Matthias Clasen
d6f3af0777 Make gtk_combo_box_entry_set_text_column more forgiving
The assertions in there were unnecessarily restrictive. This has
been reported in bug 564160.
2009-09-04 22:20:28 -04:00
Matthias Clasen
6b7fef09ca Don't forget to set the client window on the slave 2009-09-04 20:34:09 -04:00
Matthias Clasen
1c0ecc0380 Rework the way IM contexts are set
Add a function to obtain the effective context id, and reset the slave
only when the effective context id is different from the current context
id, when setting a client window and on focus in. This might fix
bug 593868 and bug 567124.
2009-09-04 18:09:44 -04:00
Alexander Larsson
812b3c451d Deprecate GDK_WINDOW_OBJECT and GdkWindowObject 2009-09-04 17:59:18 +02:00
Kristian Rietveld
a47aadb05e Protect gtk_text_view_scroll_mark_onscreen() from using invalid marks
Suggested by Paolo Borelli.
2009-09-04 17:40:12 +02:00
Kristian Rietveld
5ec80eb5ba Recalculate heights when a (new) separator func is set on GtkTreeView 2009-09-04 17:08:29 +02:00
Kristian Rietveld
dcc87f7a67 Move mark check to gtk_text_view_scroll_to_mark()
Also use a different means to check that the given mark is in the text
view's buffer.  This will also play nice with anonymous and NULL marks.
Suggested by Paolo Borelli.
2009-09-04 17:08:29 +02:00
Michael Natterer
6ee228a363 gtk_widget_set_property(): use accessors instead of setting flags
Use the newly added accessors to set the "can-focus", "can-default"
and "receives-default" properties.
2009-09-04 15:18:24 +02:00
Michael Natterer
026bea2293 gtk_widget_set_property(): use gtk_widget_set_visible()
Use the new API instead of show() and hide().
2009-09-04 14:54:13 +02:00
Michael Natterer
b81079d898 Bug 69872 - GTK_WIDGET_SET_FLAGS should be deprecated
Add gtk_widget_set_receives_default() and
gtk_widget_get_receives_default() as accessors for
GTK_RECEIVES_DEFAULT.
2009-09-04 14:50:35 +02:00
Kristian Rietveld
dc3fb714a0 Improve unsetting old buffer in gtk_text_view_set_buffer()
When unsetting the old buffer always set the buffer on the layout to
NULL.  More importantly, clear the pending scroll.  (The scroll is
handled in an idle, when not cleared an idle handler might touch the
layout later on, possibly corrupting the BTree).  Unref the buffer after
removing the selection from the clipboard, not before.  Patch merged
from maemo-gtk.
2009-09-04 14:06:59 +02:00
Kristian Rietveld
7a3d98324d Fail to scroll if the given mark is not in text view's current buffer
In gtk_text_view_queue_scroll() we need to verify if the given mark
exists in the text view's current buffer.  When not done, this can
result in corruption of the BTree data structure.  Patch merged from
maemo-gtk.
2009-09-04 14:06:58 +02:00
Kristian Rietveld
3a917a2a67 Update IM spot location before running _validate_onscreen()
Updating the IM spot location in gtk_text_view_value_changed() might
invalidate the layout, so we need to make sure that we update it before
validating the layout again.  Otherwise, the layout will be invalidated
right after validating it (possibly resulting in a failed
onscreen_validated assertion).  Patch merged from maemo-gtk.
2009-09-04 14:06:58 +02:00
Kristian Rietveld
4f219692ed Make toggle cell renderer follow insensitive state of widget
Likewise to other cell renderers, GtkCellRendererToggle now properly
follows the insensitive state of the widget requesting rendering.  It
does this by checking the state of the widget pointer, not by using
GtkCellRendererFlags (there exists an insensitive flags).  Later on, I
think we should move to using GtkCellRendererFlags and not the state of
the widget requesting rendering.  Patch merged from maemo-gtk.
2009-09-04 14:06:58 +02:00
Kristian Rietveld
6f20cf691e Propagate insensitive state to cell renderers in GtkCellView
If the cell view is insensitive, it needs to properly propagate this
insensitive state to the cell renderers using cell renderer flags.
Merged from maemo-gtk.
2009-09-04 14:06:58 +02:00
Kristian Rietveld
3f306a4042 Have tree view process exposes after adjustments have been updated
This was removed long ago by the patch in bug 101235.  On a hindsight,
all other scrollable widgets are processing exposes at this point, which
completely makes sense to me, so I am putting it back.
2009-09-04 14:06:58 +02:00
Christian Dywan
6b9a3c9057 Bug 584638 - Build of gtkupdateiconcache without NLS breaks
Wrap textdomain calls in updateiconcache.c in NLS conditionals.
2009-09-03 11:30:12 +02:00
Matthias Clasen
05d39e4085 Add a missing include
This was reported in bug 593606.
2009-09-02 22:14:47 -04:00
Paolo Borelli
f97a33ad9c Move timer removal in dispose
Move removal of timer function in dispose to prevent potentially running
them on a diposed-but-not-finalized tooltip
2009-09-01 15:50:42 +02:00
Paolo Borelli
582b281761 Make sure the paper dialog is destroyed with the parent 2009-08-31 21:56:14 +02:00
Paolo Borelli
0bb51bca9b Remove unneeded call of begin/end user action
delete_interactive already uses them so no need to wrap the call.
2009-08-31 21:47:49 +02:00
Matthias Clasen
13147323d7 Forgotten part of the lpi change 2009-08-30 11:11:46 -04:00
Paolo Borelli
2d8b8e054a buffer_backspace should delete \r\n in one go
Special case \r\n in gtk_text_buffer_backspace since \r should not be
reinserted even if we are deleting one char at a time. Also add
corresponding unit test. Fixes bug #544724.
2009-08-29 21:29:57 -04:00
Marek Kasik
f7cfe2bfea Emit "update-custom-widget" when the page setup changes
Previously, the signal was only emitted when the user selected
another printer. Bug 593001.
2009-08-29 21:19:44 -04:00
Christian Persch
2105d946cf Plug a mem leak
GtkWindow was leaking the startup_id, reported in bug 593317.
2009-08-29 21:19:44 -04:00
Davyd Madeley
44adf811ea [GtkSizeGroup] don't recurse into yourself 2009-08-30 10:47:52 +10:00
Christian Persch
a2420c7db5 Plug a mem leak
The filechooser was leaking tooltips. Reported in bug bug 593080.
2009-08-29 20:40:50 -04:00
Carlos Garcia Campos
c51830f453 Do not emit action-activated signal when there are not actions selected
This was causing problems for epiphanys location entry, reported
in bug 593481.
2009-08-29 20:36:28 -04:00
Pascal Terjan
047a91322c Show the icon window back after changing pixbuf
Otherwise, there is no way to get icons to show again after calling
_clear() once. Reported in bug 593135.
2009-08-29 20:27:23 -04:00
Michael Natterer
cc8927a589 Add gtk_widget_set_window()
New function as replacement for setting widget->window directly.
Should only be used in GtkWidget::realize().
2009-08-28 16:51:48 +02:00
Michael Natterer
0e52286d53 Bug 69872 - GTK_WIDGET_SET_FLAGS should be deprecated
Add gtk_widget_is_toplevel() for GTK_WIDGET_TOPLEVEL()
and gtk_widget_is_drawable() for GTK_WIDGET_DRAWABLE()
2009-08-28 16:27:26 +02:00
Kristian Rietveld
44469e4684 Make gtk_tree_view_real_set_cursor() handle non-existing paths
Such paths (eg. a child node that is collapsed) should be ignored.  This
is fixed by checking the return value of _gtk_tree_view_find_node(),
which returns a partial return value (the parent node) when it returns
TRUE.  Also added a unit test.
2009-08-28 11:04:54 +02:00
Michael Natterer
591b37d7ce Add accessors for sealed member "flippable"
One step closer to makes GtkRange properly subclassable, but still
quite some accessors missing.
2009-08-27 21:14:21 +02:00
Michael Natterer
d30c31d6e1 marks_start_element(): initialize "value" to get rid of a compiler warning 2009-08-27 21:14:21 +02:00
Michael Natterer
6a278af6d2 Fix casts in calls to g_utf8_validate()
The "end" parameter is (const gchar **), not (const gchar *).
2009-08-27 21:14:21 +02:00
Kristian Rietveld
ec7187e039 Bug 543310 - set_enable_tree_lines doesn't work when a cellrenderer...
Reorder drawing in gtk_tree_view_bin_expose() so that the tree lines are
drawn after the cells have been drawn.  This is because cell-background
is handled in the cell renderer, so the tree lines need to be drawn
after this.
2009-08-27 18:12:54 +02:00
Kristian Rietveld
786b3914cd Bug 588199 - GtkTreeView rendering glitch while using a default ...
Contrary to what was believed before, do_validate_rows() does need to
queue a normal resize (including a redraw) when it has to.  The redraw
is required because of the size of the tree has changed because new
row(s) have been validated.
2009-08-27 18:12:54 +02:00
Kristian Rietveld
de1c79c721 Bug 592883 - Spin cell rendererer problem with double click
Block 2BUTTON and 3BUTTON press events using a button press event
handler in GtkCellRendererSpin, so that they won't be eaten and
processed by tree view.
2009-08-27 18:12:54 +02:00
Dan Winship
05b246accc fix gtk-doc syntax on GtkWidget:double-buffered, so Since gets picked up 2009-08-27 10:49:16 -04:00
Benjamin Otte
51f140bfdc Document ownership for return value of gtk_file_chooser_get_file() 2009-08-27 11:53:24 +02:00
Benjamin Otte
4a0f78b72f Bug 592606 - Activate the default button in a respose-request callback
Previously the rightmost button with a proper response id was activated,
this is now only done if there is no default button set.

With this patch the right widget gets activated when there are multiple
widgets wth response ids conforming to is_stock_accept_response_id() as
the selected widget is made the new default widget before showing the
overwrite confirmation dialog.
2009-08-27 11:51:43 +02:00
Matthias Clasen
9bad2f70a4 Documentation fixes 2009-08-24 18:17:54 -04:00
Christian Persch
e8dcf330cc Preserve errno, and always use g_strerror()
Bug #592461.
2009-08-24 15:30:00 +02:00
Kristian Rietveld
4449acbb82 Remove broken logic in backwards walks in validate_visible_area()
In validate_visible_area() it was assumed that gtk_tree_path_prev()
would always return the correct path of the preceding node.  This is
obviously not true.  The if-clause has been removed so that we now
always use _gtk_tree_view_find_path() to get the path from the tree,
node.
2009-08-23 22:06:16 +02:00
Kristian Rietveld
7b4f09a589 Add a scrolling test case involving creating new rows in tree stores
Based on a bug report from Miroslav Rajcic, details are in the tree view
scrolling suite source code.
2009-08-23 22:06:16 +02:00
Kristian Rietveld
105e0be70e Rework naming of tests to make better use of path matching feature 2009-08-23 22:06:16 +02:00
Kristian Rietveld
a4a5d3da0e Change prefix of tree view scrolling tests into TreeView 2009-08-23 22:06:16 +02:00