Commit Graph

15187 Commits

Author SHA1 Message Date
Michael Natterer
7f80ee3a38 gtkrc.key.mac: add Command-cursor text navigation
and some emacs-ish Control bindings that work in native widgets.
Patch from Michael Hutchinson.
(cherry picked from commit ccf12f7b40)
2011-10-25 22:26:26 +02:00
Michael Natterer
f6d78bf879 gtkrc.key.mac: remove half the file, it was an accidential double paste
(cherry picked from commit 79a92f99a9)
2011-10-25 17:04:37 +02:00
Matthias Clasen
df1e2cd128 Fix more test breakage 2011-10-25 07:38:36 -04:00
Benjamin Otte
b195c7dbb2 a11y: Hack around infinite loops in parent setting
This is kind of a hack to get rid of infinite loops that occur when
child accessibles try to set their parent upon creation but the parent
accessible creates its children in the initialize vfunc. Because in that
case, the parent will not have an accessible set when the child tries to
access it, because it is still initializing itself. Which will cause a
new accessible to be created.

https://bugzilla.gnome.org/show_bug.cgi?id=660687
2011-10-25 07:38:36 -04:00
Cosimo Cecchi
99266c4ceb printunixdialog: fix a GtkTable->GtkGrid typo
Code was treating the GtkScrolledWindow as a grid, not the grid itself.
2011-10-24 16:33:00 -04:00
Matthias Clasen
cd91ab9761 Fix handling of GtkCellRendererProgress::inverted
We were setting the wrong field.
https://bugzilla.redhat.com/show_bug.cgi?id=747761
2011-10-24 13:50:00 -04:00
Cosimo Cecchi
ccdc3c1802 notebook: update tab area allocation when switching page
When the active page is switched, it's important
gtk_notebook_pages_allocate() is called after the bulk of
gtk_notebook_real_switch_page() is run, as the former allocates a
different space according to the currently active tab, which is set by
the latter.
gtk_notebook_pages_allocate() already calls gtk_notebook_redraw_tabs()
when the allocation changes, so just move its call down to
gtk_notebook_real_switch_page() to fix the bug.

https://bugzilla.gnome.org/show_bug.cgi?id=662629
2011-10-24 13:19:39 -04:00
Dieter Verfaillie
16343bc9a9 win32: fix unterminated #ifdef error
By removing all ifdefs as gtk/gtkwin32.c is only built
on win32 anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=662481
2011-10-23 21:46:19 +02:00
Rui Matos
d56484f6ed tooltip: only update shape if the window is realized
If we get a composited-changed signal before the tooltip is ever realized we
have nothing to do.

This actually prevents a segfault in maybe_update_shape() because calling
gtk_widget_get_window() on a non-realized widget returns NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=662467
2011-10-23 16:26:18 +01:00
Michael Natterer
5c4f2ef0c1 gtk: move _gtk_modules_has_mixed_deps() to gtkmodlesprivate.h
and remove gtkmainprivate.h completely.
2011-10-23 13:57:07 +02:00
Michael Natterer
2688ccdbc4 gtk: clean up the private horror
- add gtkmodulesprivate.h and move stuff there from gtkprivate.h
- add gtkprivate.c and move stuff there from gtkmain.c
- add gtkwin32.c and move stuff there from gtkmain.c
- don't redefine GTK_DATADIR and friends in gtkprivate.h
- have _gtk_get_datadir() and friends on all platforms
- remove the horrid hacks where gtkprivate.h can't be included,
  or must be included later due to redefinition of the compile-time
  directories
2011-10-22 23:53:55 +02:00
Michael Natterer
88ad614c73 gtkquartz: don't free the string returned by get_bundle_path()
It's statically allocated.
(cherry picked from commit c040b03c2e)
2011-10-22 23:24:41 +02:00
Cosimo Cecchi
18a638a7d3 GtkRange: use the right widget for coordinate translation
GtkRange needs to check if its allocation intersects with the resize
grip allocation (trimming its own allocation if it does).
In order to do that, it needs to translate its allocation into window
coordinates, and before that, find the window to whose the allocation
is relative; code goes all the way finding the right parent widget, but
then doesn't actually use it when translating the coordinates, leading
to using the wrong rectangles for the intersection check.

https://bugzilla.gnome.org/show_bug.cgi?id=662308
2011-10-21 16:30:34 -04:00
Matthias Clasen
bb1d9aba86 Fix natural/min widht calculations for empty grids
https://bugzilla.gnome.org/show_bug.cgi?id=660139
2011-10-21 16:24:55 -04:00
Matthias Clasen
633918158b DND: Work better with XI2
It turns out that simply using XIGrabKeycode instead of XGrabKey
makes the DND keyboard support mostly work (there seem to be some
minor issues with modifiers). This means we no longer grab the
keyboard actively during DND, which in turn makes Alt-Tab and
other window manager shortcuts work again during DND.

At the same time, bring the DND key handling code into the
multi-backend work, by checking for X11 and XI2 at runtime,
in addition to compile time.
2011-10-20 20:59:50 -04:00
Cosimo Cecchi
0c135cbf2c treemodel: document gtk_tree_path_free() as allow-none
https://bugzilla.gnome.org/show_bug.cgi?id=662230
2011-10-20 09:27:17 -04:00
Stef Walter
385b7a3031 gtk: GtkToolbar returns invalid paths when adding tool items
* Calculate siblings_path on demand, so that it's always correct
   and doesn't get out of sync with the toolbar state.

https://bugzilla.gnome.org/show_bug.cgi?id=662177
2011-10-20 14:11:28 +02:00
Cosimo Cecchi
febc29852b tooltip: add support for opacity and rounded corners for tooltips
Rounded corners now will always work, using XShape in case we're not
running a composite manager.
Also, setting an RGBA visual (if available) on the tooltip toplevel
enables them to be transparent if the theme specifies so.

https://bugzilla.gnome.org/show_bug.cgi?id=599617
2011-10-19 15:15:00 -04:00
Antoine Jacoutot
d987a01d80 GMountOperation on OpenBSD: remove the need for kvm(3)
kvm(3) is considered a deprecated interface, so make
GMountOperation::show-processes use the recommended sysctl(3) interface
instead. This also removes the need to link with libkvm.

https://bugzilla.gnome.org/show_bug.cgi?id=661835
2011-10-17 19:06:41 +02:00
John Ralls
1db5b34b97 Bug 658772: Directory paths for resource directories are hard coded.
Corrected formatting to match coding standards; introduced local statics
to prevent leaking returned strings.
2011-10-15 12:41:53 -07:00
Torsten Schönfeld
a95c4c1bb4 gtk: fix syntax of an annotation 2011-10-15 19:37:43 +02:00
Javier Jardón
0853ce3077 Use G_VALUE_INIT
Instead of an explicit { 0, } when declaring the variable.
2011-10-15 16:45:16 +01:00
Sebastian Pölsterl
133a7a4f58 Fixed referenced images for GTK_STOCK_INDENT
https://bugzilla.gnome.org/show_bug.cgi?id=661780
2011-10-15 00:30:46 +02:00
Matthias Clasen
7cfb3eda1b Add deprecation annotations for GtkHandleBox and GtkTable 2011-10-14 00:54:01 -04:00
Chun-wei Fan
5a13e08fa7 Bug 660730: Win32: Only use _fstat32 if available
_fstat32 is only introduced with msvcrt80.dll (i.e. Visual C++ 2005), in
which using this function will break compilation with MinGW, which links
against msvcrt.dll.  The msvcrt.lib in the Windows DDK which links to
a later incarnation of the msvcrt.dll in later Windows systems may have
this symbol defined, but that needs to be checked upon to be sure.

Thanks to Dieter Verfaillie for pointing out this problem.
2011-10-12 11:39:06 +08:00
Matthias Clasen
9e0efc5022 Add deprecation annotations for deprecated functions
We define our own GDK_DEPRECATED[_FOR] macros for this
and allow it to be turned off by defining the
GDK_DISABLE_DEPRECATION_WARNINGS macro.
2011-10-11 15:03:46 -04:00
Matthias Clasen
8f078992fd Include gdk.h in gail.c
This is needed so that we pick up deprecation macros here in the
future.
2011-10-11 15:01:41 -04:00
Matthias Clasen
1ecd9fb3bd Add a new symbol
gtk_widget_get_modifier_mask was added recently.
2011-10-11 13:49:22 -04:00
Brian Cameron
0940974f5a Fix void function n gtkfontbutton.c so it does not try to return a value.
Fixes bug #661089.
2011-10-10 14:13:35 -05:00
John Ralls
6906ab88bc Bug 658767 - Drag and Drop NSEvent capture is racy
Create a synthetic NSMouseLeftDown to store in the GtkQuartzDragSourceInfo
rather than relying on the NSWindow's latest event being the right one (or the
right kind).
2011-10-09 11:24:41 -07:00
Kristian Rietveld
8ad3d2b296 Bug 657770 - Write to released memory in gtkdnd-quartz.c
Clear the Drag paste board just before the info->context is released.
This way the GtkDragSourceOwner is released just before the drag context
is and thus can pasteboard:provideDataForType: not accidentally access
an already released drag context
2011-10-09 10:37:21 -07:00
John Ralls
6dc34c1f5e Bug 658772: Directory paths for resource directories are hard coded.
Provide dynamic path discovery functions as are provided for win32.
2011-10-08 15:02:38 -07:00
Michael Natterer
5327034c31 gtk: remove the private GTK_DEFAULT_ACCEL_MOD_MASK define
and finish the port to using the new modifier abstraction API.
This commit has some evilness, it uses the default display for
the lack of a widget context, and the change to gtkstock.c
is very ugly, but I can't think of anything better given
GtkStockItem needs an accel mask instead of a proper accel
string.
2011-10-07 20:58:58 +02:00
Michael Natterer
87cc0dc79f gtk: use the new modifier API instead of GTK_DEFAULT_ACCEL_MOD_MASK
in gtkimcontextsimple and gtktreeview, which are the easy places,
but also true bugfixes, because on OSX we can't use the virtual META
here, we needs MOD2 as delivered in key events.
2011-10-07 09:33:07 +02:00
Tristan Van Berkom
2677a7d5b9 GtkComboBox: Add the format-entry-text signal.
This provides more control over how the selected item is shown in
the entry.
Bug #631167
2011-10-06 11:14:38 +02:00
Kjell Ahlstedt
f920ded541 GtkTreeViewColumn: dispose: Remove from the treeview
This handles the case (with gtkmm) that the GtkTreeViewColumn is
destroyed before the GtkTreeView is destroyed.
Bug #659672
2011-10-06 11:02:02 +02:00
John Ralls
37f71d71cd Bug 628936: Minimal change to pass introspection.
gobject_introspection's G-ir-scanner doesn't like the -xobjective-c
option needed to compile ObjectiveC features in quartz implementations
of certain gtk functions. This rearranges the compiler flag environment
variables in Makefile so that G-ir-scanner doesn't see them.
2011-10-04 16:45:54 -07:00
Tristan Van Berkom
00d79fdb61 Fixed gtk_cell_area_stop_editing() to properly notify when editing is not canceled
This fixes bug 653289, in gtk+-2 gtk_tree_view_stop_editing() was previously
responsible for notifying with gtk_cell_editable_editing_done(), this detail
was missed when porting the cell renderer management to GtkCellArea.
2011-10-04 14:15:21 -04:00
Cosimo Cecchi
1f2cfb5619 all: add an 'only-child' pseudo-class selector
Add an :only-child pseudo-class selector, which selects single children
of a parent container.

https://bugzilla.gnome.org/show_bug.cgi?id=660833
2011-10-04 11:47:47 -04:00
Cosimo Cecchi
3a6996ea83 appchooser: make the "Find applications online" follow search state
Set the button as insensitive while searching, so that it can't be
accidentally clicked twice.

https://bugzilla.gnome.org/show_bug.cgi?id=651818
2011-10-04 11:34:10 -04:00
Cosimo Cecchi
569b5ffd5b appchooser: add a GCancellable to the search operation
So that we can cancel it when the dialog is destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=651818
2011-10-04 11:34:10 -04:00
Kristian Rietveld
0e3a4b73ca Fix commit 61d6c73f18
Where the commit suggested "somebody should review it [the test]",
it would have been useful to test this particular commit instead...
2011-10-03 22:59:40 +02:00
Kristian Rietveld
bbc1e883a8 Bug 659022 - gtk_tree_model_filter_clear_cache_helper: assertion failed
This bug is resolved by fixing two things in
gtk_tree_model_filter_row_deleted():

  (1) It is possible for an elt to have elt->visible_siter == NULL, when
  it is deleted.  Only call g_sequence_remove() if this pointer is
  non-NULL.

  (2) For the case len (level->seq) > 1, free the elt->children level
  if non-NULL.  Failing to do this means the level will stick around.
  If this child level was not referenced, it will still have a zero
  ref count on its parent which cannot be removed!

For both bugs unit tests have been added in the preceding commit.
2011-10-03 22:59:40 +02:00
Kristian Rietveld
e8323e2abc Add two more unit tests for bug 659022
Both pointing out problems in gtk_tree_model_filter_row_deleted().
2011-10-03 22:59:40 +02:00
Kristian Rietveld
f646ed6f76 Fix first part of bug 659022
Push creation of path into if clause, the path cannot be created anyway
(and would be meaningless otherwise) if the parent is not visible.
2011-10-03 22:59:40 +02:00
Kristian Rietveld
6fdf882eb4 Add unit test for part 1 of bug 659022
This tests a case where gtk_tree_model_filter_row_changed() is run
for a node with visible_siter != NULL, however its parent has
visible_iter == NULL. For this case, no valid paths can be generated
as the node cannot be accessed (because the parent is invisible).
2011-10-03 22:59:40 +02:00
Cosimo Cecchi
e1f79e8275 box: add some missing includes 2011-10-03 16:54:09 -04:00
Benjamin Otte
78ddecab0c iconcache: Fix gcc warning 2011-10-03 18:29:53 +02:00
Benjamin Otte
e97b05acbd filesystemmodel: Add a missing check
Paths with depth > 1 should return FALSE instead of pretending the depth
is 1.
2011-10-03 18:29:21 +02:00
Chun-wei Fan
eb8c2dfae2 Bug 660730: Use GStatBuf for portability
Thanks to Kean Johnston for pointing this out.

There are a few places in GTK that use "struct stat",
and then g_stat(), rather than using GStatBuf.This breaks things on
Windows. Since the size of struct stat can vary depending on other
flags specified, this has the potential to cause overwrites and is
trivial to fix.

Based on patch submitted by Kean Johnston
2011-10-03 23:25:33 +08:00