Commit Graph

15358 Commits

Author SHA1 Message Date
Benjamin Otte
a1fb2c863b treeview: Remove call to gtk_widget_get_pointer() 2011-11-08 21:14:06 +01:00
Benjamin Otte
28d0403f17 paned: Pass x/y position to update_drag()
This way we get the coordinates from the right device instead of using
any random device.
2011-11-08 21:14:06 +01:00
Benjamin Otte
80a23a2f2b paned: Remove MOTION_HINT_MASK
It's not needed anymore. GDK does culling of events for us.
2011-11-08 21:14:06 +01:00
Benjamin Otte
68bc011507 menuitem: WOrk around deprecation warnings 2011-11-08 21:14:06 +01:00
Benjamin Otte
a12e12a56d queryimmodules: Disable deprecaion warnings for deprecated header 2011-11-08 21:14:06 +01:00
Benjamin Otte
40db65a85b settings: Disable deprecaion warnings for deprecated header 2011-11-08 21:14:06 +01:00
Benjamin Otte
c9b1e00c30 layout: Work around deprecation warnings 2011-11-08 21:14:05 +01:00
Benjamin Otte
f9c664c69b immodule: Disable deprecations before including deprecated header 2011-11-08 21:14:05 +01:00
Benjamin Otte
e1f4bd6495 gtk: Empty gtkimmodule.h
Move the remaining struct definition into gtkimcontextinfo.h and include
that header in gtk.h. gtkimmodule.h is now an empty header. We should
probably deprecate it somehow.

This is also necessary so headers used in gtk .c files don't include
gtk.h which in turn includes all the deprecated headers which we want to
avoid so we can include them with deprecation warnings turned off.
2011-11-08 21:14:05 +01:00
Benjamin Otte
ba05093fe7 build: Don't append to an accidentally existing file 2011-11-08 21:14:05 +01:00
Benjamin Otte
c2da143aa6 immodule: Move private functions to a private header 2011-11-08 21:14:05 +01:00
Benjamin Otte
bd97127e6c immodule: Fix includes
Make includes not rely on gtkimmodule.h including gtk.h. This will be
important once we remove gtkimmodule from the include files.

That way, we can achieve not pulling deprecated headers automatically.
2011-11-08 21:14:05 +01:00
Benjamin Otte
1c22053baf window: Fix cast warnings 2011-11-08 21:14:05 +01:00
Benjamin Otte
1425ecbc52 treeview: Fix warnings from fixing warnings
Warnings introdcued by fixing deprecation warnings in
2ead4c6038
2011-11-08 21:14:05 +01:00
Benjamin Otte
adcd136f1e icontheme: Get rid of deprecation warnings
Before including deprecated headers, disable deprecation warnings.
2011-11-08 21:14:05 +01:00
Benjamin Otte
7cfe9051cc cellrendererspinner: Ignore deprecation warnings
The cell renderer relies on deprecated functionality, so we need to
disable deprecations for included deprecated headers.
2011-11-08 21:14:05 +01:00
Benjamin Otte
8f8269ad30 cellrendererspinner: Include correct header 2011-11-08 21:14:05 +01:00
Benjamin Otte
9aa7e9f050 button: Don't call deprecated functions 2011-11-08 21:14:05 +01:00
Benjamin Otte
a9134de5d3 assistant: Work around deprecation warnings 2011-11-08 21:14:05 +01:00
Rui Matos
70f87b8bd5 gtk: Add a GTK_STATE_FLAG_WINDOW_UNFOCUSED widget state flag
This allows themes to style widgets differently according to whether the
toplevel window they are in is presented as focused.

https://bugzilla.gnome.org/show_bug.cgi?id=661428
2011-11-08 19:33:22 +00:00
Cosimo Cecchi
f9d16f3923 themingengine: set the cairo extend to PAD when we're stretching bg
This avoids artifacts around the borders due to bilinear filtering cairo
applies to the surface pattern when stretching it.

https://bugzilla.gnome.org/show_bug.cgi?id=663522
2011-11-08 12:41:28 -05:00
Marc-André Lureau
3b436eec6d css: start background-repeat
By default, a background image is stretched. Instead, it is worth to
have a tiled background.

This patch allows background surfaces to be repeated or not, and should
be compatible with future extensions and CSS.

https://bugzilla.gnome.org/show_bug.cgi?id=663522
2011-11-08 11:10:44 -05:00
Marc-André Lureau
ee7ac4fa44 Rename s/GtkCssRepeatStyle/GtkCssBorderRepeatStyle/g
https://bugzilla.gnome.org/show_bug.cgi?id=663522
2011-11-08 11:10:41 -05:00
John Ralls
085b98f470 [Quartz Bug 663182] NSImage throws an exception from _gtk_quartz_create_image_from_pixbuf()"
If a zero-sized NSImage calls lockfocus it throws an exception. Make sure that the image isn't zero-sized before calling lockfocus, and log a warning and return NULL if it is zero-sized.

Have the quartz version of gtk_drag_begin_idle return FALSE if the returned image is NULL.
2011-11-07 14:25:08 -08:00
John Ralls
42656dde57 Revert "[Quartz Bug 663182] NSImage throws an exception from _gtk_quartz_create_image_from_pixbuf()". Utterly screwed up. Sorry.
This reverts commit 8216324e4b.
and          commit 3243e6955c.
2011-11-07 13:57:10 -08:00
John Ralls
3243e6955c Fix accidental paste error in 8216324 2011-11-07 13:18:14 -08:00
John Ralls
8216324e4b [Quartz Bug 663182] NSImage throws an exception from _gtk_quartz_create_image_from_pixbuf()
If _gtk_quartz_create_image_from_pixbuf is given a pixbuf with size 0, 0
or which produces an NSImage with size 0.0, 0.0, it throws an exception
which Gtk doesn't handle.

your changes. Lines starting
2011-11-07 13:11:18 -08:00
Morten Welinder
d80953666e Print preview: make cancel work
This makes cancels of a print preview work in the same way it
works for non-previews, i.e., the operation stops at the next
page boundary.

https://bugzilla.gnome.org/show_bug.cgi?id=662160
2011-11-07 13:10:24 -05:00
Torsten Schönfeld
4ef61e2311 gtk: add annotations for some GtkRadio* constructors
Since constructors like gtk_radio_button_new_from_widget take an
instance of their type as the first argument, the gi scanner interprets
them as methods.

https://bugzilla.gnome.org/show_bug.cgi?id=661858
2011-11-06 16:50:57 +01:00
Florian Müllner
79803d0edc menuitem: Always treat submenus as popup
Submenus are not actually attached to a menubar, but styling them
as if they were imposes some problems (at least with Adwaita).
Just using GDK_WINDOW_TYPE_HINT_POPUP_MENU for submenus instead
fixes the issue.

https://bugzilla.gnome.org/show_bug.cgi?id=662691
2011-11-05 01:49:50 -04:00
Akira TAGOH
4d7e47ddd0 Allow fallback for input method modules
Accept a :-separated list of module names in GTK_IM_MODULE and
the corresponding setting, to deal a bit better with broken
situations.

https://bugzilla.gnome.org/show_bug.cgi?id=603559
2011-11-05 01:48:59 -04:00
Torsten Schönfeld
a72a3160a8 gtk: add annotations for some GtkSymbolicColor constructors
https://bugzilla.gnome.org/show_bug.cgi?id=661859
2011-11-05 01:38:40 -04:00
Benjamin Moody
8318515cd8 Mark gtk_dialog_new_with_buttons as NULL-terminated
https://bugzilla.gnome.org/show_bug.cgi?id=663073
2011-11-05 01:27:25 -04:00
Matthias Clasen
41d4229155 Pop up context menus at the right device
When multiple pointers are in play, we need to be careful
not to loose track of the device between receiving a button
press and popping up a menu.

https://bugzilla.gnome.org/show_bug.cgi?id=663396
2011-11-05 01:24:17 -04:00
Matthias Clasen
7644ef1e3a GtkWindow: Use new begin_resize_drag api
We have an event, so the correct thing to do is to pass
the device into the function that we are calling. GDK
just grew a variant that takes a device, for this purpose.

https://bugzilla.gnome.org/show_bug.cgi?id=663444
2011-11-05 01:14:30 -04:00
Bastien Nocera
ba397a3431 tests: Disable accel test until fixed 2011-11-04 16:40:23 +00:00
Bastien Nocera
780a92b559 gtk: Add test program for keycode parsing
https://bugzilla.gnome.org/show_bug.cgi?id=662755
2011-11-04 16:40:22 +00:00
Bastien Nocera
06b55b2149 gtk: Add accel with keycode parsing functions
Which handle accelerators with keycodes as well as keyvals,
so we can use it in applications that use GtkCellRendererAccel's
"Other" mode of operations (namely gnome-control-center and
gnome-settings-daemon).

https://bugzilla.gnome.org/show_bug.cgi?id=662755
2011-11-04 16:40:22 +00:00
Matthias Clasen
0f167e8b43 Fix make check 2011-11-03 23:58:46 -04:00
Colin Walters
6cf1385e8f introspection: Include deprecated headers for scanner too
https://bugzilla.gnome.org/show_bug.cgi?id=663345
2011-11-03 15:27:56 -04:00
Alexander Larsson
c002c83ec5 Make sure we only show icons in the file selector bookmarks toolbar
This looked really bad in non-gnome settings where default is to
show text too.
2011-11-02 14:46:53 +01:00
Matthias Clasen
20008c33cb Revert a change to the plug/socket headers
I was trying to avoid including gtk.h here, but this breaks
some of our tests, and there's a good chance that 3rd party
code also relies on this include.
2011-11-02 08:28:34 -04:00
Matthias Clasen
2ead4c6038 Remove some more uses of gdk_window_get_pointer 2011-11-02 08:10:42 -04:00
Matthias Clasen
cafef131d6 Remove one instance of gdk_window_get_pointer 2011-11-02 08:10:42 -04:00
Matthias Clasen
adc731fad9 Remove various internal uses of deprecated api 2011-11-02 08:10:42 -04:00
Matthias Clasen
8ad3fd28b8 Don't warn about deprecations in deprecated/ 2011-11-02 08:10:42 -04:00
Matthias Clasen
2de4405c32 Move deprecated gtkwidget style api to gtkstyle 2011-11-02 08:10:42 -04:00
Matthias Clasen
1f827d6214 Don't warn about deprecations in deprecated/
We know we are deprecated here, no need to warn.
2011-11-02 01:21:49 -04:00
Matthias Clasen
feece3c0bb Move gtkstyle and gtkrc to deprecated/
This required a somewhat more substantial include reshuffling.
Some typedefs have been moved to gtkiconfactory.h and to
gtksettings.h.
2011-11-02 01:15:21 -04:00
Matthias Clasen
068e1f0390 Move wholly deprecated files to a subdirectory
Also install their headers to a subdirectory.
2011-11-01 23:51:18 -04:00
Matthias Clasen
98db3dd5dd Move gtk_draw_insertion_cursor out of gtkstyle.[hc]
This function does not use GtkStyle at all and is not deprecated.
2011-11-01 23:51:18 -04:00
Matthias Clasen
8370052180 Don't use *DISABLE_DEPRECATED guards
Instead define GDK_DISABLE_DEPRECATION_WARNINGS where appropriate.
2011-11-01 22:35:57 -04:00
Matthias Clasen
2a9932cf02 Don't use deprecated GValue api 2011-11-01 22:05:29 -04:00
Benjamin Otte
98d215635e tooltip: Don't use deprecated API 2011-11-02 02:32:54 +01:00
Benjamin Otte
5ada0fc382 tooltip: Remove unused variables 2011-11-02 02:32:54 +01:00
Benjamin Otte
54d6ef115b iconview: Keep the device for dnd autoscroll
This is necessary to query the device's coordinates when doing the
scrolling.
2011-11-02 02:32:54 +01:00
Benjamin Otte
e739757bab table: Define GDK_DISABLE_DEPRECATION_WARNINGS 2011-11-02 02:32:54 +01:00
Benjamin Otte
6132f52fa3 handlebox: Define GDK_DISABLE_DEPRECATION_WARNINGS 2011-11-02 02:32:53 +01:00
Benjamin Otte
c10cbf1715 fontsel: Define GDK_DISABLE_DEPRECATION_WARNINGS 2011-11-02 02:32:53 +01:00
Benjamin Otte
e7e3413e2e tests: Remove unused variables 2011-11-02 02:31:54 +01:00
Benjamin Otte
4f9fc252da box: Fix includes so hbox/vbox compile warning-free
And make sure most of the code is included before undeffing deprecated
code.
2011-11-02 02:31:54 +01:00
Matthias Clasen
8669eb49f5 Don't use deprecated Pango api 2011-11-01 21:22:14 -04:00
Matthias Clasen
4460cac3ed Don't use g_value_set_char 2011-11-01 21:18:27 -04:00
Matthias Clasen
4ac4a1bee3 GtkSearchEngineSimple: adapt the GLib thread api changes 2011-11-01 21:06:09 -04:00
Cosimo Cecchi
d808daccc1 iconview: layout items immediately when setting a GtkTreeModel
As the draw handler expects the items to be laid out already, we cannot
queue a layout here to avoid a race condition with the resize that is
queued immediately after, which in turn would lead to a segfault later
in the paint_item() implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=663138
2011-11-01 11:15:50 -04:00
Emmanuele Bassi
a77162ebaf radiotoolbutton: Fix the introspection annotations
Everything that deals with a group has to be fixed.

Plus, we have NULL checks without allowing NULL arguments; since NULL
arguments are perfectly fine, we can relax the argument checks.

https://bugzilla.gnome.org/show_bug.cgi?id=662870
2011-10-28 17:10:46 +01:00
Emmanuele Bassi
931a40844b radiotoolbutton: Fix the annotation for get_group()
Use the same annotation used by gtk_radio_button_get_group().

https://bugzilla.gnome.org/show_bug.cgi?id=662870
2011-10-28 17:10:46 +01:00
Bastien Nocera
0888e6f485 gtk: Fix XIGrabKeycode usage
A modifier of "0" is still a modifier and must be submitted normally.
A num_modifiers of 0 is essentially a noop in the server.

As mentioned by Peter Hutterer <peter.hutterer@who-t.net>

https://bugzilla.gnome.org/show_bug.cgi?id=662839
2011-10-28 12:03:22 +01:00
Matthias Clasen
701c00e8cf Print dialog: small keynav improvement
Mark the page range entry and the copies spin button as
activates-default.

https://bugzilla.gnome.org/show_bug.cgi?id=662670
2011-10-26 22:11:17 -04:00
Matthias Clasen
0f17a846a0 Update grid tests to match
The previous fix changed some test results here.
2011-10-25 23:21:13 -04:00
Matthias Clasen
362ff7bedf Fix gtk_grid_attach_next_to
The function did not behave as intended when @sibling is NULL.
Also add an example to the docs to clarify the intended behaviour.
2011-10-25 23:21:13 -04:00
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
Antoine Jacoutot
f44b8465f1 __SIZEOF_INT__ and __SIZEOF_POINTER__ may not be defined.
Protect __SIZEOF_INT__ and __SIZEOF_POINTER__ with an ifdef to prevent
warnings about them not being defined when including gtktextattributes.h.

https://bugzilla.gnome.org/show_bug.cgi?id=660619
2011-10-03 09:11:50 +02:00
Javier Jardón
8985ce3b72 gtkbox: Move private functions to private header 2011-10-02 21:30:42 +01:00
Benjamin Otte
fcd4d8a208 uimanager: Deprecate add-tearoffs property
Don't use it. Please.
2011-10-01 05:59:04 +02:00
Benjamin Otte
b13544171a menu: Deprecate GtkTearoffMenuItem 2011-10-01 05:59:04 +02:00
Rui Matos
2720574ab9 gtkwindow: Clean up gtk_window_map()
Remove unneeded variable and delete trailing whitespace.
2011-10-01 01:28:30 +01:00
Benjamin Otte
85b79fbd26 handlebox: Deprecate 2011-09-30 23:23:36 +02:00
Benjamin Otte
a36b05fed7 a11y: Don't include gtkx when not needed 2011-09-30 23:23:36 +02:00
Benjamin Otte
4a43034761 a11y: Remove useless check 2011-09-30 23:23:36 +02:00
Benjamin Otte
61d6c73f18 tests: Fix a bunch of set-but-unused warnings in the filtermodel test
The whole test doesn't seem to unref any memoery, somebody should review
it.
2011-09-30 00:26:22 +02:00
Benjamin Otte
58d9c7e53e docs: Fix typo in treeview docs 2011-09-30 00:26:22 +02:00
Javier Jardón
28bffa4f27 gtktable: Fix gtk-doc notation 2011-09-29 12:42:38 +01:00
Javier Jardón
b0a7db76fb Replace some references to the GtkTable, use GtkGrid instead 2011-09-29 12:38:49 +01:00
Cosimo Cecchi
bdfa05bc81 notebook: don't forget to prepare the tab style context before drawing
The previous commit a9affcdd3f
accidentally removed the call to notebook_tab_prepare_style_context()
2011-09-29 01:49:55 -04:00
Benjamin Otte
a9affcdd3f notebook: Remove unused variables 2011-09-29 04:24:02 +02:00
Benjamin Otte
11e17601b3 combobox: Remove unused define 2011-09-29 04:24:02 +02:00
Cosimo Cecchi
fb488d49b2 GtkTreeViewColumn: initialize a variable
Shut up valgrind complaining about uninitialized values

==5330== Conditional jump or move depends on uninitialised value(s)
==5330==    at 0x624FF4C: gdk_window_move_resize_internal
(gdkwindow.c:6037)
==5330==    by 0x62502C3: gdk_window_move_resize (gdkwindow.c:6274)
==5330==    by 0x5E4FBB5: _gtk_tree_view_column_allocate
(gtktreeviewcolumn.c:2169)
==5330==    by 0x5E3846B: gtk_tree_view_size_allocate_columns
(gtktreeview.c:2631)
==5330==    by 0x5E43D76: gtk_tree_view_size_allocate
(gtktreeview.c:2686)
==5330==    by 0x7F03959: g_closure_invoke (gclosure.c:774)
==5330==    by 0x7F16446: signal_emit_unlocked_R (gsignal.c:3202)
==5330==    by 0x7F20256: g_signal_emit_valist (gsignal.c:3003)
==5330==    by 0x7F20421: g_signal_emit (gsignal.c:3060)
==5330==    by 0x5E6DFBE: gtk_widget_size_allocate (gtkwidget.c:4886)
==5330==    by 0x5D94ADD: gtk_scrolled_window_allocate_child
(gtkscrolledwindow.c:1506)
==5330==    by 0x5D95299: gtk_scrolled_window_size_allocate
(gtkscrolledwindow.c:1704)
==5330==    by 0x7F03959: g_closure_invoke (gclosure.c:774)
==5330==    by 0x7F16446: signal_emit_unlocked_R (gsignal.c:3202)
==5330==    by 0x7F20256: g_signal_emit_valist (gsignal.c:3003)
==5330==    by 0x7F20421: g_signal_emit (gsignal.c:3060)
==5330==    by 0x5E6DFBE: gtk_widget_size_allocate (gtkwidget.c:4886)
==5330==    by 0x5C62708: gtk_box_size_allocate (gtkbox.c:658)
==5330==    by 0x7F03959: g_closure_invoke (gclosure.c:774)
==5330==    by 0x7F16446: signal_emit_unlocked_R (gsignal.c:3202)
==5330==  Uninitialised value was created by a stack allocation
==5330==    at 0x5E4FA8D: _gtk_tree_view_column_allocate
(gtktreeviewcolumn.c:2139)
2011-09-28 20:20:20 -04:00
Benjamin Otte
08d578dfcb table: Deprecate GtkTable for GtkGrid 2011-09-29 01:51:46 +02:00
Benjamin Otte
80462c7cfd docs: Make infobar code example use GtkGrid instead of GtkTable 2011-09-29 01:51:46 +02:00
Benjamin Otte
88a7942198 print: Convert custom paper dialog from GtkTable to GtkGrid 2011-09-28 05:29:50 +02:00
Cosimo Cecchi
5cf0450c69 toolbutton: don't force the icon widget to be a GtkMisc
There's really no reason the icon widget must be a GtkMisc. You might
want to use e.g. a GtkSpinner.
2011-09-27 17:31:11 -04:00
Cosimo Cecchi
63124e81b6 notebook: vborder/hborder deprecations are Since: 3.4, not 3.2 2011-09-27 13:46:01 -04:00
Cosimo Cecchi
c2f5d3d8b0 notebook: add top/bottom/left/right style classes to the tab region
When we use the style context to get information for the tab region,
also add a style class to indicate its position, so that the relevant
information is pulled off from the theme.

https://bugzilla.gnome.org/show_bug.cgi?id=659777
2011-09-27 13:43:21 -04:00
Cosimo Cecchi
8d3f7e3a4a stylecontext: add style classes for top/bottom/right/left areas
This is useful to e.g. theme notebook tabs differently according to
their position directly from the CSS sheet.

GtkNotebook support in a separate commit.

https://bugzilla.gnome.org/show_bug.cgi?id=659777
2011-09-27 13:43:21 -04:00
Cosimo Cecchi
d6a58e5bd3 notebook: unconditionally apply padding to the tab content
Not only when on left or top, otherwise the other position look
off-centered.

https://bugzilla.gnome.org/show_bug.cgi?id=659777
2011-09-27 13:43:21 -04:00
Cosimo Cecchi
34ee6d08bb notebook: really deprecate tab_vborder and tab_hborder
The setter for this was deprecated in 2.x and removed in 3.0.
I don't see any reason why we should hardcode 2px for this value;
instead, deprecated the getter and make it always return zero, and stop
using the variables internally.

https://bugzilla.gnome.org/show_bug.cgi?id=659777
2011-09-27 13:43:21 -04:00
Cosimo Cecchi
2500a95fad notebook: allow using different padding values for the active tab state
The code before was basically adding and removing the same padding value
in two different places during the allocation cycle.
Instead, what we want to do is to offset the inactive tab allocation by
the difference with the active tab padding, to ensure the tab content is
always drawn centered and in the right position.

https://bugzilla.gnome.org/show_bug.cgi?id=659777
2011-09-27 13:43:21 -04:00
Cosimo Cecchi
d4f83cdfb6 notebook: use the current state to get the padding values
We want to enable the use of different padding values between active and
inactive tabs, so that the two are completely separated (but limited by
the active tab size).
This way themes can decide how bigger the active tab is drawn compared
to the normal one just specifying a different padding value from the
CSS, like this:

.notebook tab {
  padding: 2;
}

.notebook tab:active {
  padding: 4;
}

As a first step, fetch the padding values with the right state flags
from GtkStyleContext.

https://bugzilla.gnome.org/show_bug.cgi?id=659777
2011-09-27 13:43:21 -04:00
Cosimo Cecchi
82710adc24 mountoperation: fix the build
2d3db3421f has a typo which broke the
build on master.
2011-09-27 12:51:54 -04:00
Michael Natterer
2d3db3421f Bug 659406 - Abstract what triggers a context menu
Add gdk_event_triggers_context_menu(), using the new modifier
abstraction API. Remove _gtk_button_event_triggers_context_menu()
and port all callers.
2011-09-27 15:45:18 +02:00