Compare commits

...

437 Commits

Author SHA1 Message Date
Mingye Wang bbe06c2305 Update zh_CN translation 2018-03-24 00:09:10 +08:00
Ignacio Casal Quinteiro 7c420b0354 gtkselectionprivate: minor style fix
This seems to make some issue with the gtk# scanner.
2016-05-19 17:00:13 +02:00
Pedro Albuquerque ad946025f5 Updated Portuguese translation 2015-11-18 09:13:30 +00:00
Pedro Albuquerque 809885f30c Updated Portuguese translation 2015-11-18 08:32:42 +00:00
Pedro Albuquerque 271f171678 Updated Portuguese translation 2015-11-01 09:28:18 +00:00
Pedro Albuquerque 2e6903cee8 Updated Portuguese translation 2015-11-01 09:24:29 +00:00
Felipe Braga 60f4256bba Updated Brazilian Portuguese translation 2015-09-19 21:22:51 +00:00
Felipe Braga f1708c17ea Updated Brazilian Portuguese translation 2015-09-19 12:26:54 +00:00
Arash Mousavi 434ea2747b Revert "Update Persian translation"
This reverts commit 12031d9f85.
2015-09-15 21:08:10 +04:30
Arash Mousavi 12031d9f85 Update Persian translation 2015-09-15 21:07:20 +04:30
Carlos Soriano 2db7e3eaa8 gtkplacessidebar: protect for checking a null event
We are using the current gtk event position to check if
the user clicked in the eject button of a row.
However, we are calling this in row-activated signal, which
can happens when the gtk+ mainloop already removed the "current"
event, and therefore we were trying to access a null event position
which crashes the sidebar.

To fix it check if we have as current event, and if not,
we will not check for the position. But it's better than crashing,
and shouldn't happen too much.

https://bugzilla.gnome.org/show_bug.cgi?id=754995
2015-09-14 15:20:15 +02:00
Anders Jonsson deba22dbb7 Updated Swedish translation 2015-08-16 19:24:35 +00:00
Andika Triwidada f34f1973fb Updated Indonesian translation 2015-08-02 04:58:20 +00:00
Matthias Clasen 34e6e1a599 Avoid g_set_object
One of the backported fixes brought in a dependency on new glib
that I didn't mean to introduce here. Avoid it.
2015-07-21 12:05:46 -04:00
Matthias Clasen 8c9e611b26 3.14.15 2015-07-21 10:31:01 -04:00
Matthias Clasen a86d61e42d GtkListBox: Listen for adjustment changes
We automatically pick up an adjustment from our parent
scrollable, but we failed to update it when it changes.
This is happening in the places sidebar, and it was causing
the focus-tracking to fail there, letting the focus move
out of view. With this change, the focus remains visible.
2015-07-21 10:26:01 -04:00
Ryan Lortie 116af608a2 testgmenu: use the menu binding code
The menu tracker does a better job of this than we can, so move over to
using it instead.

This fixes issues with './testgmenu --import' not properly displaying
the language submenu.

https://bugzilla.gnome.org/show_bug.cgi?id=752016
2015-07-21 10:24:52 -04:00
Carlos Garnacho ad6a66ba07 gtkdnd: Account for setting a same icon helper
g_set_object() will take care of ref'ing before destroying the previous
instance, which might actually be the same pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=751401
2015-07-21 10:24:34 -04:00
Marek Černocký 57628268c1 Updated Czech translation 2015-07-18 09:41:24 +02:00
Matthias Clasen 9eef97fe1c GtkMenuSectionBox: Add a clarifying assertion
This assertion helps coverity see what is clear to us.
2015-07-17 20:15:24 -04:00
Matthias Clasen 963c6042a7 GtkSwitch: Avoid accessing uninitialized memory
The allocation is only set in the if branch, but used outside.
Pointed out by coverity.
2015-07-17 20:00:15 -04:00
Matthias Clasen 7052acf3c7 testgtk: Remove pointless code
The display is getting overwritten immediately. Pointed out by
coverity.
2015-07-17 19:56:38 -04:00
Matthias Clasen 6ea83871a4 inspector: Avoid a NULL deref
Coverity pointed out that getting a class name requires
dereferencing the pointer, so only don't do it if it is NULL.
2015-07-17 19:56:14 -04:00
Matthias Clasen 05d667918d GtkWindow: Fix a use-after-free
We were printing a string in a warning after freeing it.
Also, fix an x/y typo that might cause popovers to be
mispositioned.
2015-07-17 19:29:57 -04:00
Matthias Clasen d4d40d5e2b file chooser: remove an unused GError variable
Pointed out by coverity
2015-07-17 19:29:48 -04:00
Matthias Clasen f7e20e917f inspector: Remove some dead code
Not sure what I was thinking here. Coverity pointed this out.
2015-07-17 19:29:25 -04:00
Matthias Clasen ea5d79d1fd inspector: Avoid a NULL deref 2015-07-17 19:28:34 -04:00
Matthias Clasen ec4bb71596 treeview: Add an explicit return for clarity
I believe that first_column can only ever be NULL here if
last_column is NULL too, in which case we'd exited already.
But coverity doesn't see that, so add an explicit exit.
2015-07-17 19:28:22 -04:00
Matthias Clasen d6983d77d8 tooltip: Remove unnecessary checks
Coverity uses these as clues to complain.
2015-07-17 19:28:14 -04:00
Matthias Clasen ab5ca5225a list box: Remove unnecessary checks
Again, coverity takes these as clues to complain.
2015-07-17 19:27:58 -04:00
Matthias Clasen 09ff569b04 GtkLabel: Remove an unnecessary check
Coverity has the annoying habit of guessing backwards that
if we check the value here, it might be NULL earlier.
2015-07-17 19:27:52 -04:00
Matthias Clasen 8376acd4dd GtkActionHelper: Avoid null deref in debug code 2015-07-17 19:27:38 -04:00
Matthias Clasen d184027a98 GtkGrid: Add a few NULL checks
Coverity complained about these.
2015-07-17 19:27:30 -04:00
Matthias Clasen 49b2d84644 gdk: Add some parameter checking
This may help coverity recognize that we're not called with
invalid combinations.
2015-07-17 19:27:23 -04:00
Matthias Clasen f333df9394 testdialog: Error out if templates are missing
Coverity complained about us ignoring the return value
here, and it is nicer to get an error message about this.
2015-07-17 16:17:02 -04:00
Matthias Clasen 90dde24d6a cups: Annotate a call whose return value we don't care about
We're closing this fd, but we're not going to do anything else
if that fails. Annotate to let coverity see this.
2015-07-17 16:16:54 -04:00
Matthias Clasen 0df57451ea inspector: Check a return value
We don't care about the error here, but we were relying on
g_resources_get_info to zero the size even in case of error.
No need to do that, we can just check the return value. Plus,
it makes coverity happy.
2015-07-17 16:16:31 -04:00
Matthias Clasen 8bcac7a86f inspector: Annotate a call whose return value we don't need
The way this code is written, we know that there is an item in
the hash table and the iter_next call will give it to us, so
no need to check the return value. Annotate the call to tell
coverity.
2015-07-17 16:14:59 -04:00
Matthias Clasen 3709475e8d gtkicontheme: Check a return value
We were already looking at the error anyway, but rewriting things
this way lets coverity see the light.
2015-07-17 16:14:01 -04:00
Matthias Clasen 9fb727d989 gtkbuilderparser: Add some assertions
Add some assertions that things are non-NULL when we know they
are, so that coverity gets it.
2015-07-17 16:13:51 -04:00
Matthias Clasen 33b19a291a gtk-demo: Check a return value
Found by coverity.
2015-07-17 16:13:35 -04:00
Balázs Úr 4515d4b8d9 Updated Hungarian translation 2015-07-17 14:11:44 +00:00
Matthias Clasen ee7083931f Revert "x11: Query pointer devices' scroll valuators on toplevel enter events"
This reverts commit 33e6b73145.

This commit broke more scenarios than it fixes, not suitable for stable branches.
2015-07-15 16:31:42 -04:00
Owen W. Taylor 2ef204e607 GdkDisplayX11: Properly translate server timestamps from _NET_WM_FRAME_* messages
When using frame times from _NET_WM_FRAME_DRAWN and _NET_WM_FRAME_TIMINGS, we
were treating them as local monotonic times, but they are actually extended-precision
versions of the server time, and need to be translated to monotonic times in the
case where the X server and client aren't running on the same system.

This fixes rendering stalls when using X over a remote ssh connection.
https://bugzilla.gnome.org/show_bug.cgi?id=741800
2015-07-15 12:49:07 -04:00
Aurimas Černius 62e304257b Updated Lithuanian translation 2015-07-10 00:05:16 +03:00
Matej Urbančič e5a79b3504 Updated Slovenian translation 2015-07-08 15:38:27 +02:00
Piotr Drąg 7563c68c62 Updated Polish translation 2015-07-07 20:23:49 +02:00
Matthias Clasen 9f4c99ace0 3.14.14 2015-07-07 13:05:20 -04:00
Jasper St. Pierre fe44d52830 gdkdisplay-x11: The leader window should be an input-only window
This prevents it from creating a _NET_WM_USER_TIME_WINDOW, which can
confuse mutter / other window managers, and also me, when debugging.
2015-07-07 12:56:09 -04:00
Emmanuele Bassi 8eb59d1cd1 docs: Drop deprecated symbolic icon names
Do not suggest using icons that do not exist.
2015-07-07 12:56:01 -04:00
Emmanuele Bassi 98b5304fad container: Update the add() warning
Now that gtk_widget_reparent() has been deprecated, we should not
suggest it.
2015-07-07 12:55:55 -04:00
Matthias Clasen 051bd1a06b GtkSwitch: fix a reentry issue
The introduction of state broke some users which relied on
being able to set active in a notify::active handler.

https://bugzilla.gnome.org/show_bug.cgi?id=751754
2015-07-07 12:55:32 -04:00
Carlos Garnacho 33e6b73145 x11: Query pointer devices' scroll valuators on toplevel enter events
We used to "invalidate" scroll valuators, so the next scroll event could
be used as the base for the next scroll deltas. This has the inconvenience
that it invariably consumes the first event received after enter and,
due to interactions with WM overeager passive button grabs, there's a
possibility we don't scroll at all if we receive interleaved "smooth
scroll" XI_Motion events and XI_Enter events (Normally triggered by regular
scroll wheels in mice).

In order to fix this, and at the expense of some sync-call overhead on
XI_Enter events (one XIQueryDevice call per slave device), query the
current scroll valuator state for all the slaves of the entered pointer,
so we do know beforehand the right base values. If new devices are plugged
while the pointer is on top of the client, the initialized scroll values
will match the valuators'.

https://bugzilla.gnome.org/show_bug.cgi?id=750994
https://bugzilla.gnome.org/show_bug.cgi?id=750870
2015-07-07 12:55:26 -04:00
Carlos Garnacho 602d1dd9f6 x11: Avoid X error traps within server grabs
gdk_x11_device_xi2_window_at_position() may attempt to push/pop
a few error trap pairs while traversing the window tree. Move it
outside the server grab, and around the multiple XIQueryPointer
calls we may do here.

https://bugzilla.gnome.org/show_bug.cgi?id=751739
2015-07-07 12:55:20 -04:00
Krzesimir Nowak 6cad13c75a broadway: Fix memleak in error case
https://bugzilla.gnome.org/show_bug.cgi?id=751752
2015-07-07 12:55:13 -04:00
Jasper St. Pierre 253ce543df window: Don't send startup notifications for offscreen / popup windows
The WM isn't aware of O-R (popup) or offscreen windows. If somebody
maps an offscreen or a popup GTK+ window before the main window, we'll
complete the sequence before a "real" window is mapped. Make sure to
ignore these for startup notifies.
2015-07-07 12:55:06 -04:00
Alexander Larsson 64770685a9 broadway: Handle shm_open failing by falling back on tmp files
This is required if /dev/shm is not mounted on your system, which can
happen for instance in certain container configurations.
2015-07-07 12:55:00 -04:00
cedlemo fce7f71772 GtkImage: Make resource property work properly
gtk_image_set_from_resource was setting the resource_path,
only to have it overwritten again before returning. That
is not as it should be, so change things to set the resource
path late.

https://bugzilla.gnome.org/show_bug.cgi?id=751443
2015-07-07 12:54:53 -04:00
Matthias Clasen ced54098af GtkRange: Make drag gesture less agressive
Moving the mouse while pressing one of the steppers was making
the slider jump to the end, unexpectedly. This was caused by the
drag gesture kicking in when it shouldn't. Fix this by making
all drag gesture signal handlers only do something if we are in
a drag thats started on the slider.

https://bugzilla.gnome.org/show_bug.cgi?id=751050
2015-07-07 12:53:06 -04:00
Caolán McNamara 8de3a2cd23 file chooser: Avoid tall combos
The filter combo box in the file chooser was stretching to match
the height of the extra widgets next to it. Since, stretched combo
boxes are not a pretty sight, make it stick to the top instead.

Patch by Caolán McNamara,

https://bugzilla.gnome.org/show_bug.cgi?id=751227
2015-07-07 12:52:58 -04:00
Alexander Larsson 796eaa5d18 configure: test have_docbook_style != yes, not have_docbook_dtd 2015-07-07 12:52:50 -04:00
Matthias Clasen 2d1ea4c1a0 color editor: make popups toggleable
The popups on the color editor are somewhat hard to get rid of.
Arrange things so that clicking the same control again dismisses
the current popup.
2015-07-07 12:48:41 -04:00
Matthias Clasen cf6851bd8d Don't show a menu on the color editor swatch
There's nothing to customize here, so no need to show a menu.
2015-07-07 12:48:33 -04:00
Matthias Clasen 01fec30f5a Add a way to avoid menu on color swatches 2015-07-07 12:48:27 -04:00
Cosimo Cecchi 85aeb2e43b testsuite: add a test for non-square symbolic icons
To verify the previous fix.

https://bugzilla.gnome.org/show_bug.cgi?id=750605
2015-07-07 12:48:01 -04:00
Cosimo Cecchi ee555c02a6 icontheme: don't modify symbolic SVG dimensions when recoloring
When recoloring symbolic SVG, do not modify the original width and
height of the passed-in file; the function later will scale the image
through gdk_pixbuf_new_from_stream_at_scale(), but we should still
use the original size to create the proxy SVG, or the image will
possibly be doubly-resized or blurry.

https://bugzilla.gnome.org/show_bug.cgi?id=750605
2015-07-07 12:47:54 -04:00
Matthias Clasen 626a2cf0af recent chooser: Make it expand
It is expected that the list fills the available space.

https://bugzilla.gnome.org/show_bug.cgi?id=750690
2015-07-07 12:47:47 -04:00
Benjamin Otte d8e880f7f1 fontchooser: Don't cause "row-changed" signal in cell data func
The font chooser delays creating the font description from the font face
as long as possible (it's slow). Because we use fixed height mode, we
only have to create font descriptions for rows we are actually going to
show.

This was achieved by looking at the font description column and if it
was NULL, we created a font description and gtk_list_stiore_set() it.
Unfortunately this caused a "row-changed" signal to be emitted and this
emission could happen during the cell data func.
And that caused infinite loops with accessibility when you were unlucky.

This change replaces the NULL font description with an empty one and
instead of setting the correct font description, we
pango_font_description_merge() it in. This way, the list store doesn't
change and no signals are emitted.

https://bugzilla.redhat.com/show_bug.cgi?id=1197267
2015-06-12 16:51:38 -04:00
John Ralls 4983d437e3 Bug 745957 - GTK+/Quartz >= 3.14.8: Symbol not found: _gtk_drag_cancel
Implement gtk_drag_cancel, made public in c160ba069 and 62616a71, in
gtkdnd-quartz.c.
2015-05-31 11:59:02 -07:00
Cédric Valmary 74b5e315ce Updated Occitan translation 2015-05-29 20:38:37 +00:00
Jakub Steiner e4e60b251e set background for menubar
- only an issue in 3.14

https://bugzilla.gnome.org/show_bug.cgi?id=750011
2015-05-29 15:43:46 +02:00
Matthias Clasen 7d5fe40f2e GtkMenuButton: Submit to action
As an actionable (inherited from GtkButton), a GtkMenuButton
should not set its own sensitivity when it has an action-name
set, but just follow the enabled state of the associated
action.

https://bugzilla.gnome.org/show_bug.cgi?id=738083
2015-05-20 16:28:53 +02:00
Marek Kasik 24a399252e printing: Check connection to remote CUPS server on correct port
Add parameter for specification of port to gtk_cups_connection_cups_new().
Use default port returned by ippPort() if the given port is lower than 0.

https://bugzilla.gnome.org/show_bug.cgi?id=693738
2015-05-13 12:31:56 +02:00
Руслан Ижбулатов 69aeaacedd Use GDK_KEY_KP_Decimal instead of GDK_KP_Decimal
Fixes the FTBFS introduced in 578043f97e
2015-05-04 17:03:22 +00:00
Cédric Valmary 46411546e8 Updated Occitan translation 2015-05-02 15:29:15 +00:00
Matthias Clasen ca3f730960 win32: Support the decimal point on the keypad
Based on a patch by John Emmas.
2015-05-01 07:34:30 -04:00
Sveinn í Felli f8ff25e554 Updated Icelandic translation 2015-04-28 15:10:23 +00:00
Sveinn í Felli e8f1f9906b Updated Icelandic translation 2015-04-28 15:07:46 +00:00
Matthias Clasen 9718f4b53e 3.14.13 2015-04-27 13:31:52 -04:00
Christian Hergert 6500211ea4 gdk: don't segfault on beep with offscreen window
https://bugzilla.gnome.org/show_bug.cgi?id=748341
2015-04-27 13:27:00 -04:00
Matthias Clasen e2a61b595d GtkDialog: Fix up docs
The ui fragment in the example was causing a critical
warning, which is not nice. Fix it to work properly.
2015-04-27 13:25:29 -04:00
Michael Catanzaro 3adf2be50f GtkMessageDialog: Minor documentation update
Icons went away in 3.12

https://bugzilla.gnome.org/show_bug.cgi?id=748061
2015-04-27 13:23:14 -04:00
Federico Mena Quintero 226728e44d gdkcolor.h: Use GDK_DEPRECATED_IN_3_14_FOR() throughout
So that lazy people like me can see in the header file which new functions to use.
2015-04-27 13:22:52 -04:00
Sveinn í Felli 2b5ed04520 Updated Icelandic translation 2015-04-23 11:23:41 +00:00
Christian Kirbach 7b82be4dc5 Updated German translation 2015-04-18 14:52:36 +00:00
Lars Uebernickel 872123366d GtkRange: fix horizontal scrolling
https://bugzilla.gnome.org/show_bug.cgi?id=737175
2015-04-15 15:28:07 +02:00
Matthias Clasen cbe4f410c8 Fix window button updates in split headers
We were only updating window buttons when the headerbar was
a direct child of the window. That is not the case in more
complicated situations, such as the split headers in gedit
or polari. To fix such cases, make the headerbar itself listen
for state changes on its toplevel.

https://bugzilla.gnome.org/show_bug.cgi?id=747805
2015-04-14 17:37:12 -04:00
Carlos Garnacho 5256834657 gesturesingle: Ignore motion/updates from unhandled sequences
This used to do the right thing, practically ignoring those event
if they went all through the event handler, unless this motion event
triggered the cancellation of this gesture from the event handler
of another controllers.

In this case, the controller would be reset, but the motion event
would still go through its handler, setting again
current_button/sequence as the motion event has buttons in its
modifiers. This leaves GtkGestureSingle with inconsistent data
that may interfere with future runs.

https://bugzilla.gnome.org/show_bug.cgi?id=747469
2015-04-13 17:30:17 +02:00
Carlos Garnacho 280dca8c18 plug: Remove size_allocate handler
Since windows can be intermediate containers this is somewhat redundant,
plus gtk_window_size_allocate() will do additional things like allocating
the popovers, which was mistakenly skipped by local plugs not chaining up.

https://bugzilla.gnome.org/show_bug.cgi?id=747553
2015-04-13 12:41:42 +02:00
Matthias Clasen d59f435057 GtkApplication: Prevent more crashes around shutdown
gtk_application_shutdown clears the impl member, so all
callbacks, signal handlers, etc that might still be triggered
between a shutdown call and the return from the mainloop
better be prepared to deal with impl being NULL.
2015-04-10 08:05:51 -04:00
Matthias Clasen b015f8a1b8 3.14.12 2015-04-09 06:49:10 -04:00
Matthias Clasen e0fe93062e popover: Remove signal handlers in dispose
If we don't, they may get triggered at an inopportune
time later, causing us to crash.

See
https://bugzilla.redhat.com/show_bug.cgi?id=1203499

https://bugzilla.gnome.org/show_bug.cgi?id=747539
2015-04-09 06:40:32 -04:00
Matthias Clasen 5af10c9c70 Make gtk-update-icon-cache not fall over leftover temp files
This is a followup to 0fd185fa6d. There is no
good reason to only try again if --force is passed. Do it
always.

See
https://bugzilla.redhat.com/show_bug.cgi?id=1194957
2015-04-08 20:35:49 -04:00
Matthias Clasen 1d93df8a5e tree view: Avoid a crash with rubberbanding
When a treeview is destroyed while rubberbanding is going
on, we crash because the rb tree is nuked before we want
to access it to stop the rubberbanding. To avoid this crash
end the rubberbanding early in destroy().

See
https://bugzilla.redhat.com/show_bug.cgi?id=1173904
2015-04-08 18:57:40 -04:00
Matthias Clasen 792ba583f3 GtkApplication: avoid a crash
It can apparently happen that we get focus in events
on windows after gtk_application_shutdown() has been
called. Avoid an unnecessary crash in this case.

See
https://bugzilla.redhat.com/show_bug.cgi?id=1176339
2015-04-08 15:46:34 -04:00
Matthias Clasen 2e733c2587 Revert "image: Optimize non-resize changes"
This reverts commit 78475606c9.

We're still seeing regressions from this, see
http://bugzilla.redhat.com/show_bug.cgi?id=1208183
2015-04-08 14:20:08 -04:00
Georges Basile Stavracas Neto 3df5b52148 places sidebar: compare bookmarks by index
GtkPlacesSidebar applies a sorting function on
the tree model that does not consider the case
of bookmarks, which are sorted by their indexes.

By adding the bookmarks corner case and comparing
then by their indexes, GtkPlacesSidebar can sort
the bookmarks properly in the order they're saved.

https://bugzilla.gnome.org/show_bug.cgi?id=744589
2015-04-05 10:21:34 -04:00
Carlos Garnacho dd62e0410e gtkdnd: Restore widget opacity after fading out
Otherwise the widget is left fully transparent, and will start as such if
the widget is reused.
2015-03-30 12:47:02 +02:00
Carlos Garnacho a65a371822 gtkdnd: Set the icon helper from the drag site onto the context
If the icon happened to come from the drag site icon helper (ie. set through
gtk_drag_source_set_icon*), it would be referenced on the GtkDragInfo,
but not hooked into its context. This results on non visible drag windows,
until set_icon_helper() happened to be called on some path.
2015-03-30 12:46:53 +02:00
Matthias Clasen ce4819a137 3.14.11 2015-03-29 17:37:23 -04:00
Benjamin Otte 307d54ba7b roundedbox: Fix a copy/paste error
This caused shadows to not be drawn in certain situations when overlayed
via a popover animation.

https://bugzilla.gnome.org/show_bug.cgi?id=746862
2015-03-29 17:30:00 -04:00
Matthias Clasen 4b8d66ea21 radio button: Fix directional navigation
GtkRadioButton had a deficient copy of the focus sort code
in GtkContainer, causing focus to jump over the next button
in the list. Just use _gtk_container_focus_sort() here,
which fixes the bug _and_ saves 80 lines of code.

https://bugzilla.gnome.org/show_bug.cgi?id=746817
2015-03-29 17:29:47 -04:00
Matthias Clasen 33833cdd88 Fix separator in testsplitheaders 2015-03-29 17:29:38 -04:00
Will Thompson fcc4744181 bbox: correct documentation typo 2015-03-29 17:29:19 -04:00
Joanmarie Diggs 74426d896d Fix an AtkStateType emitted for GtkBooleanCellAccessible
An apparent copy-and-paste error is resulting in ATs being notified of
changes in ATK_STATE_CHECKED when the cell's "sensitive" state changes.

https://bugzilla.gnome.org/show_bug.cgi?id=746784
2015-03-29 17:29:08 -04:00
Benjamin Otte c8c007a49e filechooser: Use same priority everywhere
I managed to stall recent files today while trying to save a GTK
testcase in glade that contained enough spinning spinners that the CPU
was saturated just redrawing things.

I had to navigate the filesystem!
2015-03-29 17:29:02 -04:00
Marcus Karlsson 06a952c55d GtkRange: Check "inverted" property when drawing
The direction in which the slider moves can be inverted by setting the
inverted property. But the draw method does not check this, instead it
checks if the direction of the widget is set to be right to left.

Call the should_invert function in order to determine if the direction
of the range should be inverted. It too checks the widget's direction,
but also checks the "inverted" property, and allows the range to be
drawn inverted even if it is vertically oriented.

https://bugzilla.gnome.org/show_bug.cgi?id=746712
2015-03-29 17:28:56 -04:00
Marcus Karlsson 5a61fcd1b3 GtkRange: Fix drawing of fill-level
Compute the proportion of the range that should be filled to match the
fill level, and use it to compute the starting point and length of the
area between the slider and the fill level.

https://bugzilla.gnome.org/show_bug.cgi?id=734741
2015-03-29 17:28:48 -04:00
Matthias Clasen f34ecab28f GtkRange: Fix scroll wheel direction for horizontal ranges
The expected behavior here is that scrolling up goes towards
larger values, ie to the right. This matches e.g. volume
sliders in gnome-shell.

https://bugzilla.gnome.org/show_bug.cgi?id=737175
2015-03-29 17:22:36 -04:00
Руслан Ижбулатов b76e9e35e6 W32: Only override window miximized position for CSDed windows
This fixes an issue with non-CSDed windows being improperly positioned
when maximized, which was introduced by the previous commit.

https://bugzilla.gnome.org/show_bug.cgi?id=746821
2015-03-26 17:08:04 +00:00
Руслан Ижбулатов 2c07c71efe W32: Correctly set maximized window position
Use screen workarea to *also* set the position of a maximized window,
not just its size. Without this the window position defaults to 0:0
(the topleft corner), which is wrong when taskbar is position along the
top or left edge of the screen.

https://bugzilla.gnome.org/show_bug.cgi?id=746821
2015-03-26 15:56:28 +00:00
Marek Černocký fdb1ed64f7 Updated Czech translation 2015-03-23 16:10:50 +01:00
Matthias Clasen 055d799f6a 3.14.10 2015-03-23 06:49:21 -04:00
Benjamin Otte b7f4c25ba4 docs: Fix some copy/paste errors 2015-03-23 06:49:21 -04:00
Matthias Clasen ef1fa3d4d3 Gestures: Properly handle weak references
Every call to g_object_add_weak_pointer must be matched with
a g_object_remove_weak_pointer call, or we will get invalid
writes inside GObject.

https://bugzilla.gnome.org/show_bug.cgi?id=746013
2015-03-23 06:10:04 -04:00
Matthias Clasen 9813971304 Fix 7c4bf742e8
The objects-finalize test constructs gestures with NULL as
a widget. The recent addition of weak references was not
ready for that.
2015-03-23 06:10:04 -04:00
Matthias Clasen 2b16ef289d Stop using GDK_POINTER_MOTION_HINT_MASK in widgets
It is deprecated and no longer needed, and,as observed in
https://bugzilla.gnome.org/show_bug.cgi?id=746253 it
interferes with turning off event compression.
2015-03-22 23:30:51 -04:00
Matthias Clasen 636dd80421 Don't return G_TYPE_INVALID as a pointer
Use NULL for g_return_val_if_fail checks if the function returns
a pointer. Pointed out by clang.
2015-03-22 23:30:51 -04:00
Matthias Clasen cb1d02ecd7 text view: Avoid clang compiler warnings
Again, our habit to use -1 as an unset value for enum types.
2015-03-22 23:30:51 -04:00
Matthias Clasen 272ddd5687 Remove a redundant const
const gchar const is still just const gchar, unless there's
indirections in between.
2015-03-22 23:30:51 -04:00
Matthias Clasen dea45574c4 Remove a pointless comparison
Comparing an unsigned value against < 0 is not going to succeed.
Pointed out by clang.
2015-03-22 23:30:51 -04:00
Matthias Clasen 48f7faf0da More of the same
A similar case in GtkIconHelper. Here we were confusing ourselves,
and compared a icon_size against -1, although the variable is
never set to -1.
2015-03-22 23:30:51 -04:00
Matthias Clasen ca759c3eb6 Avoid some clang compiler warnings
Avoid some compiler warnings from clang in deprecated code.
Most of these are around our habit of using -1 as an 'unset'
value for enumerations.
2015-03-22 23:30:51 -04:00
Matthias Clasen 8f5bdfe3e2 Make the blur code compile with clang
clang complains that the expression involving sqrt() is not
constant, and thus refuses to accept it as a case label. So,
use precomputed values instead.

https://bugzilla.gnome.org/show_bug.cgi?id=746468
2015-03-22 23:30:51 -04:00
Matthias Clasen 4e9ff47868 tooltip: Minor cleanup
Preserve the symmetry in gtk_tooltip_set_last_window.
2015-03-22 23:30:50 -04:00
Matthias Clasen 482b0295e0 mount operation: Minor formatting cleanup
The pattern for g_object_add_weak_pointer calls is to
have the same expression in both arguments.
2015-03-22 23:30:50 -04:00
Matthias Clasen 74b6474597 menu button: Minor cleanup
Preserve the symmetry in set_align_widget_pointer.
2015-03-22 23:30:50 -04:00
Matthias Clasen a8d8cfdc39 Clean up some unfortunate formatting
"if (...) do" just looks wrong.
2015-03-22 23:30:50 -04:00
Matthias Clasen 78605a6549 dnd: Introduce a helper to manage the weak pointer
Introduce a setter that takes care of updating the weak ref
whenever we assign info->widget. Just a cleanup of the previous patch.
2015-03-22 23:30:50 -04:00
Tom Hughes 3b036cf4d4 DND: Clean up weak pointers when they are no longer needed
Failure to do so leads to memory corruption down the road.
This was introduced in commit 650c25e06c.

https://bugzilla.gnome.org/show_bug.cgi?id=746602
2015-03-22 23:30:50 -04:00
Matthias Clasen a4115f4612 radio-menu-item: Allow arguments to be NULL
Some arguments, like the group and the label of a RadioMenuItem, can be
NULL: the RadioMenuItem has all the code to deal with them. The argument
validation is too strict, though, for instance doing:

  return_if_fail (IS_RADIO_MENU_ITEM (foo))

  if (foo != NULL)
    set_foo (foo)

Which is obviously incorrect.

This commit also modifies the annotations of the API, to ensure that
language bindings do the right thing.

https://bugzilla.gnome.org/show_bug.cgi?id=671362
2015-03-22 23:30:50 -04:00
Emmanuele Bassi b10d3d0051 radio-menu-item: Handle a !NULL group
If we create a RadioMenuItem without a group, and then set a group, the
menu item will still be set as active, which means an inconsistently
drawn radio menu item - as the RadioMenuItem will set the active flag on
itself, but then it won't reset it when it gets a new group.

https://bugzilla.gnome.org/show_bug.cgi?id=671362
2015-03-22 23:30:50 -04:00
Matthias Clasen 78475606c9 image: Optimize non-resize changes
When the image content is changed, only queue a resize
if the size is actually changing, otherwise just a
redraw. Suggested by Owen in

https://bugzilla.gnome.org/show_bug.cgi?id=613833
2015-03-22 23:30:50 -04:00
Christian Hergert 6e32881a59 a11y: handle atk race condition where widget has been destroyed
If the widget has been destroyed since a DBus message had been sent,
we could be in a condition that the widget pointer exists but it does
not have a window.

This bails as if the widget didn't exist if there is no available
GdkWindow.

We also set the extents to 0 to be defensive since this is a vfunc
implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=746586
2015-03-22 23:30:50 -04:00
Alexander Larsson 4dfbbba7b0 gtkcairoblur: Unroll inner loop for common radius values
This unrolls the inner blur loop for radius 1-10, allowing
the compiler to use a divide-by-constant operation instead
of a generic division.

Here is the blur-performance output before:

Radius  1: 124.95 msec, 32.01 kpixels/msec:
Radius  2: 117.27 msec, 34.11 kpixels/msec:
Radius  3: 123.57 msec, 32.37 kpixels/msec:
Radius  4: 118.17 msec, 33.85 kpixels/msec:
Radius  5: 119.32 msec, 33.52 kpixels/msec:
Radius  6: 124.17 msec, 32.21 kpixels/msec:
Radius  7: 121.04 msec, 33.05 kpixels/msec:
Radius  8: 130.64 msec, 30.62 kpixels/msec:
Radius  9: 119.47 msec, 33.48 kpixels/msec:
Radius 10: 117.95 msec, 33.91 kpixels/msec:
Radius 11: 122.38 msec, 32.68 kpixels/msec:
Radius 12: 121.92 msec, 32.81 kpixels/msec:
Radius 13: 125.45 msec, 31.89 kpixels/msec:
Radius 14: 121.63 msec, 32.89 kpixels/msec:
Radius 15: 120.18 msec, 33.28 kpixels/msec:

And after:

Radius  1: 42.26 msec, 94.65 kpixels/msec:
Radius  2: 59.15 msec, 67.62 kpixels/msec:
Radius  3: 60.29 msec, 66.35 kpixels/msec:
Radius  4: 64.53 msec, 61.99 kpixels/msec:
Radius  5: 60.07 msec, 66.59 kpixels/msec:
Radius  6: 62.43 msec, 64.07 kpixels/msec:
Radius  7: 60.36 msec, 66.27 kpixels/msec:
Radius  8: 59.59 msec, 67.13 kpixels/msec:
Radius  9: 76.17 msec, 52.51 kpixels/msec:
Radius 10: 79.41 msec, 50.37 kpixels/msec:
Radius 11: 118.92 msec, 33.64 kpixels/msec:
Radius 12: 121.31 msec, 32.97 kpixels/msec:
Radius 13: 118.30 msec, 33.81 kpixels/msec:
Radius 14: 116.82 msec, 34.24 kpixels/msec:
Radius 15: 116.99 msec, 34.19 kpixels/msec:

I.e. almost double performance for the unrolled radius values.

https://bugzilla.gnome.org/show_bug.cgi?id=746468
2015-03-22 23:30:50 -04:00
Alexander Larsson d34f4f6f57 gtkcairoblur: Minor restructure
This just moves get_box_filter_size to the top and makes
it a macro (so it can be used as a constant later).

https://bugzilla.gnome.org/show_bug.cgi?id=746468
2015-03-22 23:30:40 -04:00
Alexander Larsson 813cb485b6 Add performance test for gtkcairoblur
This just creates a large cairo surface and times bluring it
at various values of radius.

https://bugzilla.gnome.org/show_bug.cgi?id=746468
2015-03-22 23:15:47 -04:00
Matthias Clasen 8a5bf398f5 gtk-demo: Plug a memory leak 2015-03-22 23:15:32 -04:00
Benjamin Otte fc22007559 notebook: Protect against invalid allocations
A widget can be mapped but not have a size allocated yet. In that case
avoid computing a broken rectangle.

https://bugzilla.gnome.org/show_bug.cgi?id=746301
2015-03-22 23:14:49 -04:00
Matthias Clasen 6a6350b855 Don't pass invalid rectangles to cairo
This causes pixman warnings, or worse.
Clearly, something is not quite right here, if we end up
redrawing tabs at a time when the allocation is set to (1, 1).
For now, avoid straining the error handling in the lower layers.

https://bugzilla.gnome.org/show_bug.cgi?id=746301
2015-03-22 23:14:23 -04:00
Carlos Garnacho b6a480bf97 inspector: Remove flash timeout from widgets being unmapped
Otherwise the timeout can keep running, even if the widget is being
destroyed.
2015-03-22 23:14:23 -04:00
Carlos Garnacho ea7361c148 widget: Take a ref during ::unrealize emission
In order to prevent invalid memory access/crashes if the widget is
destroyed in a callback of that signal.

https://bugzilla.gnome.org/show_bug.cgi?id=745829
2015-03-22 23:14:23 -04:00
Carlos Garnacho 9fd9c4b0af widget: Take a ref during ::unmap emission
This ensures the widget data stays live long enough to perform invariants
check after emission if the widget happens to be destroyed on a callback.

https://bugzilla.gnome.org/show_bug.cgi?id=745829
2015-03-22 23:14:23 -04:00
Benjamin Otte 81da1b0274 docs: Add a man page for gtk3-demo-application
It is an installed binary, so it needs a man page!
2015-03-22 23:14:17 -04:00
hanniedu 79373646ab Updated Dutch translation 3.14 gtk+ and gtk-properties 2015-03-22 18:09:51 +01:00
Matej Urbančič 825f0f106e Updated Slovenian translation 2015-03-22 10:09:02 +01:00
Necdet Yücel 5684844df7 Updated Turkish translation 2015-03-21 18:14:21 +00:00
Aurimas Černius e385cd82a9 Updated Lithuanian translation 2015-03-21 17:20:10 +02:00
Balázs Úr 5f54cb0251 Updated Hungarian translation 2015-03-20 22:59:23 +00:00
Piotr Drąg d5c9d4e807 Updated Polish translation 2015-03-20 16:04:55 +01:00
Andika Triwidada de47cd1633 Updated Indonesian translation 2015-03-20 06:33:22 +00:00
Anders Jonsson 12e55af53b Updated Swedish translation 2015-03-19 22:26:47 +00:00
Anders Jonsson d11455cecb Updated Swedish translation 2015-03-19 22:23:03 +00:00
Vadim Rutkovsky f12e76c61f inspector: show accessible name and description
https://bugzilla.gnome.org/show_bug.cgi?id=746458
2015-03-19 17:35:11 +01:00
Matthias Clasen baba3ff0e5 Inspector: Show more misc info about widgets
This adds clip area, accessible role, mapped, realize,
is-toplevel, child-visible and mnemonic labels to the displayed information.
2015-03-19 17:32:29 +01:00
Andika Triwidada 1570517b13 Updated Indonesian translation 2015-03-18 12:23:45 +00:00
Samir Ribic 83db446e1e Updated Bosnian translation 2015-03-14 19:18:12 +00:00
Samir Ribic 397738c199 Updated Bosnian translation 2015-03-14 19:15:53 +00:00
Andre Heinecke 378823ba4b Prevent empty password request popup for kerberos
If auth_info_required is only set to "negotiate" the
    request password dialog is shown anyway for each print
    job without any input fields. As the request_password
    dialog only handles username, password and domain.

    https://bugzilla.gnome.org/show_bug.cgi?id=669008
2015-03-09 16:06:21 +01:00
Chun-wei Fan c0e4d80a6d MSVC Builds: "Install" .pdb Files
"Install" the .pdb files that were generated along with the build, to make
it easier for people to develop and debug GTK+, especially when used as a
stack, and as the .pdb files are already generated with all builds.

Also make the copy of the .dll, .lib and .exe files more selective so that
we do not accidently copy files that are not meant to be "installed", or
end up making extra copies of plugin DLLs in the wrong places, when the
projects here are included as a part of a grand solution that is used to
build the entire GTK+ stack, for example.
2015-03-06 10:41:44 +08:00
Chun-wei Fan 45028dfc0e MSVC 2010+ Builds: Fix .pdb Generation
For Visual Studio 2010 and later, the .pdb filename needs to be explicitly
specified so that it will match the filename of the target, if the project
name differs from the filename of the target.  Make sure that is the case
for the 3 DLLs that we build for Visual Studio 2010 and later.
2015-03-06 10:41:30 +08:00
Chun-wei Fan 17d4a4e2d1 MSVC 2008 Builds: Speed Up Release Builds
Use the /MP compiler option, where the build time for release builds can
be cut down by quite a bit.  This will however cause a brief warning with
debug builds due to the use of /Gm, but the code will otherwise build
normally.  Unlike the Visual Studio 2010+ builds, we can't use /d2Zi+ as
Visual Studio 2008 does not support that, so we can't get a better
debugging experience for release builds here.
2015-03-03 18:41:26 +08:00
Chun-wei Fan d62cb72fac MSVC Builds: Improve Build Speed and Debugging
Use Multiprocessor compilation which can cut down build times by quite a
bit and use the /d2Zi+ flag to have better debugging info being logged to
the .pdb for release builds.

These are only applicable for Visual Studio 2010/2012 and later.
2015-03-03 14:10:15 +08:00
Carlos Garnacho 5c17e0b027 x11: Store last axes from device
And use these for the missing axes if the valuator mask is incomplete.
This used to work fine on tablets because the Wacom driver ensures all
valuators are sent, which is not true if using the evdev driver.

https://bugzilla.gnome.org/show_bug.cgi?id=703610
2015-03-02 18:59:02 +01:00
Мирослав Николић 8a7c236f86 Updated Serbian translation 2015-03-02 18:31:44 +01:00
Debarshi Ray d51c9fb9a3 eventcontroller: Chain up on constructed
https://bugzilla.gnome.org/show_bug.cgi?id=745225
2015-03-02 11:59:56 +01:00
Debarshi Ray 95ea70e2da eventcontroller, widget: Don't crash if destroyed before the other
There are two scenarios. A widget sub-class owns a GtkEventController
and passes itself to it, or a controller owned by something else is
passed a widget.

In the second case, if the widget is destroyed before the controller,
we will have a crash when destructing the controller because we will
be accessing invalid memory. Adding a weak reference on the widget
addresses that problem.

This leads to a crash in the first case. When the widget is getting
destroyed, it will drop the reference to its own controller. The
controller will skip touching the widget because the weak reference
would have turned it to NULL. However, when the widget sub-class chains
up to GtkWidget it will try to free all the controllers in its list.
Unfortunately, all these controllers have already been destroyed. So
we need to guard against this too.

https://bugzilla.gnome.org/show_bug.cgi?id=745225
2015-03-02 11:59:56 +01:00
Marek Kasik 6e5e282b59 printing: Set printer state correctly
Consider NULL printer state message as empty too.
Printer state IPP_PRINTER_STOPPED can be considered as paused state.

https://bugzilla.gnome.org/show_bug.cgi?id=743323
2015-03-02 10:53:30 +01:00
Marek Černocký 12321d3be7 Updated Czech translation 2015-03-01 18:54:11 +01:00
Marek Černocký 4e22211dce Updated Czech translation 2015-03-01 18:25:00 +01:00
Matej Urbančič 777fabd9fd Updated Slovenian translation 2015-02-28 21:06:19 +01:00
Peter Bloomfield 095e28226f Do not return NULL AtkStateSet
https://bugzilla.gnome.org/show_bug.cgi?id=741511
2015-02-28 13:57:18 -05:00
Aurimas Černius 7361873d52 Updated Lithuanian translation 2015-02-27 23:56:18 +02:00
Balázs Úr 3c2230bf53 Updated Hungarian translation 2015-02-27 21:24:16 +00:00
Piotr Drąg cb86e3140d Updated Polish translation 2015-02-27 19:37:17 +01:00
Piotr Drąg e5c187c506 Updated POTFILES.in 2015-02-27 19:32:54 +01:00
Matthias Clasen fed589d418 3.14.9 2015-02-25 16:23:10 -05:00
Matthias Clasen f9be976836 Fix distcheck 2015-02-25 16:23:10 -05:00
Matthias Clasen bf096d99dd Silence a compiler warning 2015-02-25 16:23:10 -05:00
Matthias Clasen db44c357c3 Fix a misleading condition
gcc5 rightfully complains about this condition being unclear.
2015-02-25 16:23:10 -05:00
Matej Urbančič 8380062c6a Updated Slovenian translation 2015-02-25 20:39:29 +01:00
Marek Kasik 1f04ff7f4a printing: Always get details of Avahi printers over IPP
Request details of Avahi browsed printers even when
we've got their PPDs already. Some options are not
present in PPD.

https://bugzilla.gnome.org/show_bug.cgi?id=743323
2015-02-25 18:11:57 +01:00
Marek Kasik d5c7da5c83 printing: Get covers for each printer individually
Since we combine Avahi browsed printers and
printers of local CUPS in one backend we need to
get covers for each printer separately.

https://bugzilla.gnome.org/show_bug.cgi?id=743323
2015-02-25 18:11:53 +01:00
Benjamin Otte 4592bd3e6e gdkcairo: Bail if surface is in error
Don't try to paint onto an error surface. This happens for example when
gdk_cairo_set_source_pixbuf() is called with a pixbuf that is too big
for Cairo to handle.

Spotted by Christian Boxdörfer
2015-02-25 16:31:16 +01:00
Benjamin Otte 6b086d965c css: Fix _gtk_bitmask_subtract()
We were doing the wrong thing *and* writing uninitialized memory while
doing so. BAD.

Also added tests exposing these.

https://bugzilla.redhat.com/show_bug.cgi?id=1185585
2015-02-25 16:31:05 +01:00
Matthias Clasen 4fbbb87be6 range: Make zoom scrolling less sensitive
Use the new long press delay factor to make the zoom
scrolling less easy to trigger accidentally.
2015-02-24 21:09:37 -05:00
Matthias Clasen 371d3fc5a6 long press: Add a delay-factor property
Add a way to set a delay factor that can be used
to make the long press more or less sensitive.
Making this a factor instead of exposing the delay
itself preserves the value of the setting as an
overall 'slow down long press' setting.
2015-02-24 21:09:30 -05:00
Matthias Clasen 1c395c900e zoom scrolling: avoid 'jumping back'
We record the starting position on button press, but only
start the zoom mode when the long press timeout kicks in.
Depending on circumstances, this can cause a noticable jump.

Avoid this by resetting the recorded starting position after
the long press timeout. Suggested by Sebastian Keller.
2015-02-24 21:09:04 -05:00
Ignacio Casal Quinteiro ff1ec03d96 Do not return on void functions 2015-02-24 21:05:55 -05:00
Matthias Clasen a44baab9de color scale: simplify code a bit
It is not necessary to call gtk_widget_get_accessible repeatedly.
2015-02-24 21:05:28 -05:00
Matthias Clasen 8ba4d8f21d Explicitly set the a11y role of tooltip windows
This seems better than trying to identify the 'tooltipness'
of the window on the other side.

https://bugzilla.gnome.org/show_bug.cgi?id=744683
2015-02-24 21:05:14 -05:00
Matthias Clasen ffeda6ffec Drop nonworking code to set a11y roles of tooltips
This code relied on widget names, and we don't set those anymore.
2015-02-24 21:04:34 -05:00
Matthias Clasen 32e9659d83 widget factory: Don't make file chooser local-only
There's no reason to.
2015-02-24 21:04:05 -05:00
Rico Tzschichholz 75ab755f08 AppChooserDialog: Fix memleak 2015-02-24 21:03:38 -05:00
Paolo Borelli 8cf2c8d85a Do not use "return" when chaining up to a void function 2015-02-24 21:03:09 -05:00
Matej Urbančič 40e3cd0dac Updated Slovenian translation 2015-02-24 19:56:42 +01:00
Matej Urbančič 073e0483e9 Updated Slovenian translation 2015-02-24 19:08:54 +01:00
Thibault Saunier e2d89d21d4 gdk/quartz: Fix mixup in attributes usage creating window implementation
First, attributes can be NULL (which is always the case when calling
gdk_window_ensure_native) so do not unconditionally dereference it.

Then the window_type should be taken directly from the GdkWindow as
in other backends (such as the X11 one for example).

https://bugzilla.gnome.org/show_bug.cgi?id=744942
2015-02-22 15:52:44 +01:00
Ignacio Casal Quinteiro e2e37c772f statusicon: missed setting one uID 2015-02-21 16:02:03 +01:00
Arnav Singh e17fb52cfc statusicon: fix crash storing pointer in UINT
https://bugzilla.gnome.org/show_bug.cgi?id=696505
2015-02-21 16:01:57 +01:00
Piotr Drąg c724f4b57e Updated POTFILES.skip 2015-02-17 01:14:04 +01:00
Pier Luigi Fiorini 071447700e wayland: Do not require latest wl_seat
Some compositors might not offer wl_seat 4 resulting in GTK+ clients not
working on that compositor.

wl_seat 4 introduces keyboard repeat information, but when that information
is missing it is retrieved from settings, hence there's no reason to
require wl_seat 4.

This patch was tested against QtCompositor (5.5, dev branch)
and Weston 1.6.1.

Reviewed-by: Daniel Stone <daniels@collabora.com>

https://bugzilla.gnome.org/show_bug.cgi?id=744172
2015-02-15 18:37:02 -05:00
Benjamin Otte 77c27772c5 treeview: Don't create an overly large pixel cache
GPUs generally have problems when you create a 35000px wide surface.
Luckily X catches this and sends a BadAlloc. Which GTK immediately
abort()s on.

Testcase included.

https://bugzilla.redhat.com/show_bug.cgi?id=1163579
2015-02-15 18:31:06 -05:00
Matej Urbančič 8ad8cc703b Updated Slovenian translation 2015-02-14 21:00:08 +01:00
Necdet Yücel 1a9ed8c524 Updated Turkish translation 2015-02-14 17:06:03 +00:00
Matthias Clasen e810cb8782 Revert "image: Optimize non-resize changes"
This reverts commit 82c21b1e93.

This change was causing problems in gnome-mines. Revert it
until we can figure out what exactly is going wrong there.
See https://bugzilla.redhat.com/show_bug.cgi?id=1190887
2015-02-11 11:24:28 -05:00
Lars Uebernickel 8842ee8579 css: use pre-3.16 gtk_css_style_property_register
This fixes the backport of the last commit.
2015-02-06 12:19:31 +01:00
Benjamin Otte a4c837e09b css: Add -gtk-dpi CSS property hack
This property is necessary to ensure widgets automatically update after
the text scale factor is changed desktop-wide.

And if I'm already doing a property like this, I can make it
overridable. So now you can override the dpi per-widget with CSS like
GtkSwitch {
  -gtk-dpi: 48;
}
if you want to debug things.

Long-term, we want to get rid of this property and insist on dpi being
96 everywhere and people can change the font size to get larger fonts.
2015-02-06 12:02:36 +01:00
Matthias Clasen e38943ad69 3.14.8 2015-01-31 13:34:46 -05:00
Matthias Clasen 8af9287808 Reduce symbolic icon warnings to a debug message
These icons are out there in the wild, and the warning causes
distcheck to fail. So, reduce it to a debug message.
2015-01-31 13:34:46 -05:00
Matthias Clasen 82c21b1e93 image: Optimize non-resize changes
Suggested by Owen in

https://bugzilla.gnome.org/show_bug.cgi?id=613833
2015-01-31 11:41:19 -05:00
Matias De lellis eb0a76439c GtkSettings: Consider default settings for font hinting and antialias
Arrange things so that gtk-xdg-hinting==-1 and gtk-xfg-antialias==-1
end up as CAIRO_HINT_STYLE_DEFAULT and CAIRO_ANTIALIAS_DEFAULT in the
cairo font options.

This will not change anything on Linux desktops where xsettings will
always provide values different from -1. But on other platforms, we
can benefit from getting the platform-specific defaults in cairo.

Based on the first patch in:
https://bugzilla.gnome.org/show_bug.cgi?id=735316
2015-01-31 11:39:58 -05:00
Tom Hughes 4a5d06fb72 Resume events when disconnecting from a frame clock
If we are disconnecting from a frame clock that has paused event
processing and hasn't issued a resume yet make sure we resume the
events or they will stay blocked forever.

https://bugzilla.gnome.org/show_bug.cgi?id=742636
2015-01-31 11:39:35 -05:00
Matthias Clasen 70b4d11259 Robustness fixes for drag cancel animation
gtk_widget_get_frame_clock() can return NULL. Deal with that
by silently stopping the drag cancel animation in this case.
2015-01-31 11:38:58 -05:00
Matthias Clasen c44d18e8c2 testnotebookdnd: Defer deletion to an idle
The code here was always a bit buggy: We removed the tab from
the notebook in a ::drag-data-received handler. But with
GTK_DEST_DEFAULT_DROP, that signal is emitted before we inform
the source side that the drag is finished. With its improved drag
handling, GtkNotebook now interprets this as a 'spontaneous'
removal of the tab being dragged, and cancels the drag, leading
to an unwanted cancel animation.

The easiest fix is to just defer the tab removal to an idle.
2015-01-31 11:38:52 -05:00
Matthias Clasen 37751cd0fb notebook: Protect removal-from-within
When a tab is dropped, we have to remove it from the notebook to
insert it elsewhere. This is expected part of the tab dnd operation,
and we need to differentiate it from 'spontaneous' removals which
cause us to cancel the drag operation.
2015-01-31 11:38:43 -05:00
Matthias Clasen 267d8dc3fb notebook: Make dnd safe against tab disappearance
when the dragged tab is being removed during the drag operation,
we need to cancel the drag. To do so, we have to keep around
a reference to the drag context.

This should fix
https://bugzilla.gnome.org/show_bug.cgi?id=732051
2015-01-31 11:38:28 -05:00
Matthias Clasen 7b9a8958be notebook: Make reordering safe for tab disappearance
If the dragged tab is removed during reordering, we need to
call gtk_notebook_stop_reorder(), to clean up and bring the
remaining tabs back in order.
2015-01-31 11:38:19 -05:00
Matthias Clasen 62616a716f dnd: Allow programmatic drag cancellation
Add a gtk_drag_cancel() function that can be used on the
source side to cancel an ongoing drag operation. This can
be useful, e.g. if the data that is being dragged becomes
unavailable.

gtk_drag_cancel() will become public API in 3.16; we keep it
private here so we can use it from GtkNotebook.
2015-01-31 11:37:32 -05:00
Matthias Clasen 650c25e06c dnd: Make dest side safe against destroy
Use a weak pointer to clean up when the current drag destination
gets destroyed.
2015-01-31 11:35:52 -05:00
Matthias Clasen 90d42ef5cc file chooser button: Make dnd work as expected
Update the button contents when accepting a drop.

https://bugzilla.gnome.org/show_bug.cgi?id=743451
2015-01-31 11:35:41 -05:00
Garrett Regier 92263fd5b1 Fix VA marshaller for GtkWidget's "event-after" signal
Just a copy and paste typo from the "event" signal.

https://bugzilla.gnome.org/show_bug.cgi?id=743593
Signed-off-by: Garrett Regier <garrettregier@gmail.com>
2015-01-31 11:34:30 -05:00
Christian Persch 07b39b2140 GtkAboutDialog: Fix crash on link click
https://bugzilla.gnome.org/show_bug.cgi?id=743592
2015-01-31 11:34:21 -05:00
Alexander Larsson 14fca7522d gtktreeview: Fix horizontal grid lines
The clipping was wrong so it was not drawing grid lines
outside the visible area, which broke due to the pixel cache.
2015-01-31 11:33:22 -05:00
Mike Gorse b2fe2da866 A11y: fix typo when initializing a container cell accessible
Gtk_container_cell_widget_set should chain up to its parent's set
function, not its parent's unset function. This was resulting in
accessibles being erroneously marked defunct after being created.
2015-01-31 11:33:11 -05:00
Matthias Clasen fbb63e3e2d x11: Handle obsolete selection requests without crashing
The ICCCM says:

If the specified property is None, the requestor is an obsolete client.
Owners are encouraged to support these clients by using the specified
target atom as the property name to be used for the reply.

Lets do that, instead of crashing.

https://bugzilla.gnome.org/show_bug.cgi?id=740613

The previous fix for this issue in 732af31424 was incomplete.
2015-01-31 11:33:00 -05:00
Matthias Clasen ecca2456b8 wayland: Don't claim to support selection notification
We don't support selection notification, so don't claim
we do, only to fail later.

https://bugzilla.gnome.org/show_bug.cgi?id=743229
2015-01-31 11:31:47 -05:00
Matthias Clasen a096820883 Initialize variables
No need to risk valgrind complaints about initialized
values.

https://bugzilla.gnome.org/show_bug.cgi?id=743422
2015-01-31 11:31:36 -05:00
Matthias Clasen 959d1eff53 broadway: Only use abstract sockets when they are supported
GIO has a function to check whether abstract sockets are
supported, so use it. This should make broadway work on
Freebsd again.

https://bugzilla.gnome.org/show_bug.cgi?id=742980
2015-01-31 11:29:28 -05:00
Matthias Clasen 6231082839 Make Broadway work on freebsd
It seems that posix_fallocate gives an ENODEV error when
called on an fd opened with shm_open on freebsd. Fix up
the error check to only trigger if we get ENOSPC.

https://bugzilla.gnome.org/show_bug.cgi?id=742980
2015-01-31 11:29:21 -05:00
Maks Naumov 6ea86ef1c7 Fix event->button.y_root when using mouse buttons and dnd canceled
Signed-off-by: Maks Naumov <maksqwe1@ukr.net>

https://bugzilla.gnome.org/show_bug.cgi?id=742785
2015-01-31 11:25:34 -05:00
Maks Naumov d237e04864 Fix save_hot_y init in gtk_drag_get_icon()
Signed-off-by: Maks Naumov <maksqwe1@ukr.net>

https://bugzilla.gnome.org/show_bug.cgi?id=742786
2015-01-31 11:25:34 -05:00
Carlos Garnacho 765902dbd6 win32: Don't check the position of a NULL device
This function is given a barely setup GdkEvent, so the GdkDevice field
is still unset, causing warnings and misbehaviors when the position
is queried for it.

Given that the wintab GTK+ code seems to rely somewhat hard on the wintab
device managing the pointer cursor, query the pointer position from the
pointer itself.

https://bugzilla.gnome.org/show_bug.cgi?id=743330
2015-01-28 17:02:57 +00:00
Carlos Garnacho 59c02b7f1c win32: Ensure we can create a window for wintab
The window used NULL as a parent window, which defaults internally to
using the root window of the default screen. But at the time wintab is
initialized, there is no default display/screen yet.

Fix this by retrieving this information from the given GdkDeviceManager,
so we don't have to wait for the display to be in place before
initialization.

https://bugzilla.gnome.org/show_bug.cgi?id=743330
2015-01-28 17:02:56 +00:00
Lars Uebernickel 420d7414bf Also bundle icons in status/ as resources 2015-01-28 14:52:36 +00:00
Lars Uebernickel 90a253758d gtkimagemenuitem: create widget for action icons lazily
GtkImageMenuItem always packs a GtkImage when it is synced with a
related action. This is unnecessary when the action doesn't have an icon
set and results in excess padding when a GtkImageMenuItem is put in a
menu bar (GtkUIManager does this).

Fix this by not creating the GtkImage for icon-less actions.

https://bugzilla.gnome.org/show_bug.cgi?id=742181
2015-01-19 09:01:29 -05:00
Lars Uebernickel 9466e8926d Menu items: force loading 16x16 icons
GtkIconTheme doesn't scale icons beyond the size specified in the theme
anymore. This can result in arbitrarily large menu items when a theme
only provides large icons.

Force icons to always be 16x16 to ensure that menu items always have the
same height.

https://bugzilla.gnome.org/show_bug.cgi?id=741259
2015-01-19 08:59:25 -05:00
Nelson Benítez León 7c31af26e5 gtkplacessidebar: insert bookmark by dnd in correct position
Add needed COLUMN INDEX to "new bookmark" row based on previous
bookmark index plus one.

Fixes bug 742727
2015-01-14 18:38:24 -05:00
Carlos Garnacho 485ab7a3d9 widget: Free the controller list on finalize()
If this is done on dispose(), the widget may be destroyed (and its
controllers list NULLified) within _gtk_widget_run_controllers(),
causing warnings/crashes when it just tried to hop on the next
controllers.

Freeing the controllers here should be a safety net for implementations,
so it also makes sense to do this late. The widgets that choose to
free their controllers on dispose can still do so, and get
_gtk_widget_remove_controller() called for these as an indirect result.
2015-01-14 17:44:03 +01:00
Carlos Garnacho 75659b2b60 listbox: Free the multipress gesture on finalize 2015-01-14 17:43:54 +01:00
Carlos Garnacho 02108abfa4 event-controller: Chain up on dispose 2015-01-14 17:43:42 +01:00
Sveinn í Felli ac97bfde80 Updated Icelandic translation 2015-01-13 13:44:08 +00:00
Maks Naumov 2a98e4ace5 Properly check result of g_utf8_get_char_validated()
g_utf8_get_char_validated() may return -1 or -2
return type is gunichar(guint32)

Therefore such checks like 'gunichar < 0' or 'gunichar > 0'
are always 'false' or 'true'(except when gunichar == 0).

Signed-off-by: Maks Naumov <maksqwe1@ukr.net>

https://bugzilla.gnome.org/show_bug.cgi?id=742774
2015-01-11 15:47:31 -05:00
Maks Naumov 05c0a487ad Fix check for 'y' padding in gtk_cell_renderer_set_padding()
Signed-off-by: Maks Naumov <maksqwe1@ukr.net>

https://bugzilla.gnome.org/show_bug.cgi?id=742764
2015-01-11 15:35:01 -05:00
Matthias Clasen 66888cedec Remove an unused define 2015-01-11 15:24:11 -05:00
Maks Naumov 579e47bc66 Properly ignore BadWindow and BadDrawable in get_child_info_handler()
Signed-off-by: Maks Naumov <maksqwe1@ukr.net>

https://bugzilla.gnome.org/show_bug.cgi?id=742771
2015-01-11 15:23:54 -05:00
Matthias Clasen 6429a66258 Deal with absence of org.gnome.desktop.interface schema
This should fully address
https://bugzilla.gnome.org/show_bug.cgi?id=742664
in the 3.14 branch.
2015-01-11 14:07:10 -05:00
Matthias Clasen ab31b0d1aa 3.14.7 2015-01-10 22:00:13 -05:00
Iain Lane c945526b1f gtkfilechooserwidget: When using an extra widget, show or hide the filter combo as appropriate
https://bugzilla.gnome.org/show_bug.cgi?id=742653
2015-01-10 21:43:58 -05:00
Matthias Clasen 9f374a185d file chooser: Add some padidng
https://bugzilla.gnome.org/show_bug.cgi?id=742631
2015-01-10 21:43:50 -05:00
Matthias Clasen 592794b309 inspector: Don't use GSettings directly
It is not necessary here, and using GtkSettings gives us
a greater chance to not fail e.g. on Windows.

https://bugzilla.gnome.org/show_bug.cgi?id=742664
2015-01-10 21:42:57 -05:00
Matthias Clasen 0691f8f011 inspector: be careful about gsize vs guint64
Since gsize doesn't work as a typename in a ui file,
we have to be careful not to pass pointers to wrongly
sized variables when getting the guint64 values out
of the model.

https://bugzilla.gnome.org/show_bug.cgi?id=742664
2015-01-10 21:36:52 -05:00
David King 2f20fffbae docs: Add Since for GtkCellRendererPixbuf:surface 2015-01-10 21:32:13 -05:00
David King c28891bd97 docs: Fix some old live.gnome.org URLs 2015-01-10 21:32:05 -05:00
Emmanuele Bassi d9b7a24c90 Point to copy/cut/delete named icons in the stock item deprecations
We still use symbolic icons for Copy, Cut, and Delete operations inside
toolbars and some menus, so it's worth pointing to the symbolic icon
names in the deprecation notices.

https://bugzilla.gnome.org/show_bug.cgi?id=741969
2015-01-10 21:31:46 -05:00
Matthias Clasen 682dc8eea7 file chooser: Don't force a scrollbar
No point in showing the scrollbar when it is not needed.
https://bugzilla.gnome.org/show_bug.cgi?id=742343
2015-01-10 21:31:31 -05:00
Sebastien Lafargue 46fa7bb4cd cellrenderertext: notify inverted
The notify for "size" and "size-points" properties
are inverted.

https://bugzilla.gnome.org/show_bug.cgi?id=742311
2015-01-10 21:30:42 -05:00
Christian Hergert eeb6e7a7b6 textview: fix duplicated binding entries. use kp variants instead.
This appears to have accidentally used the normal keypresses twice instead
of the KP variants. This resulted in shift+insert pasting twice.

https://bugzilla.gnome.org/show_bug.cgi?id=742170
2015-01-10 21:29:43 -05:00
Patrick Welche d518f5959f GtkApplicationWindow: Documentation fix
gtk_builder_add_from_string takes more than 2 parameters.

https://bugzilla.gnome.org/show_bug.cgi?id=741897
2015-01-10 21:26:35 -05:00
Matthias Clasen 4d66aeab4e GtkNotebook: Be a bit more safe against cur_page being NULL
https://bugzilla.gnome.org/show_bug.cgi?id=477454
2015-01-10 21:26:10 -05:00
Matthias Clasen 9655cc46e5 GtkRecentManager: Survive without a filename
We were asserting priv->filename != NULL in various places,
which leads to apps refusing to work when HOME is set to a
nonexisting or nonwritable value. Since it isn't hard, just
make GtkRecentManager survive without a filename. We won't
save or read any recently used files in this state, but
thats ok.
https://bugzilla.gnome.org/show_bug.cgi?id=739038
2015-01-10 21:25:56 -05:00
Matthias Clasen 0da9ef6233 GtkRecentManager: Allow instantiating without gtk_init
This apparently used to work, and it doesn't do harm to allow it.

https://bugzilla.gnome.org/show_bug.cgi?id=705582
2015-01-10 21:25:26 -05:00
Sebastien Lafargue f42f12e775 gtktextlayout: fix to quiet a warning
Gcc complains about a possible use of a not initialised
widget ref ( which can't happen in reality )

https://bugzilla.gnome.org/show_bug.cgi?id=741702
2015-01-10 21:23:24 -05:00
Sebastien Lafargue 583a8dd1a7 gtktextlayout: fix for right margin with RTL text
When a RTL paragraph is not set to wrap, the right margin is not respected
because of the margins counted twice so we replace
display->width by PIXEL_BOUND (extents.width), the same quantity
without the margins.

https://bugzilla.gnome.org/show_bug.cgi?id=741702
2015-01-10 21:23:14 -05:00
Matthias Clasen d82e76c1de GtkMenuButton: Don't leak popovers
Detach the previous popover from the toplevel when a new one
is set. This should fix

https://bugzilla.gnome.org/show_bug.cgi?id=741652
2015-01-10 21:22:34 -05:00
Timm Bäder ef8322c46e menubutton: Fix double freeze_notify 2015-01-10 21:21:47 -05:00
Matt Watson eddb6eb086 GtkEntryCompletion: fix sizing bug with multiple cells
When using a completion with some custom cells in the cell layout,
if would often size wrong when first presented on screen.

The entry completion is the only place in the entire gtk code base
that calls gtk_tree_view_column_cell_get_size outside of gtktreeview
itself. It calls into the function before the tree view has done some
important validation on its cell state, the net result of which is
only the first element in the gtkcellareabox the entry completion uses
well actually have its size respected.

We now call gtk_widget_get_preferred_size on the tree view before
calling into the individual cell size routines, to guarantee that the
tree view has run its validate_rows routine and cell state is valid.

https://bugzilla.gnome.org/show_bug.cgi?id=741130
2015-01-10 21:19:42 -05:00
Timm Bäder 393e4205ec gtklabel: Don't accept unhandled mouse buttons
If the pressed mouse button neither triggers a context menu nor
activates a link, set the sequence's state to DENIED.

https://bugzilla.gnome.org/show_bug.cgi?id=742010
2015-01-08 21:58:37 -05:00
Jasper St. Pierre 9cdb9e648a x11: Scale the frame extents as well
(cherry picked from commit 0f79cb3d11)
2015-01-08 14:12:52 +01:00
Bruce Cowan c7557b95d6 Updated British English translation 2015-01-05 20:40:52 +00:00
Shankar Prasad c6fc30721c Updated Kannada translation 2014-12-24 11:02:15 +00:00
Ting-Wei Lan 4523b394b9 reftests: Fix typo
It causes build failure on MinGW.

https://bugzilla.gnome.org/show_bug.cgi?id=741827
2014-12-22 11:16:27 +08:00
Matthias Clasen d3abcd823f places sidebar: Fix the sort function
When returning 1 for a pair (a,b), a sort function must
return -1 for the pair (b,a), otherwise things can go
badly.

https://bugzilla.gnome.org/show_bug.cgi?id=739729
2014-12-17 23:01:33 -05:00
Ryan Lortie 2f9e88b664 GtkMenuTracker: one more visibility tweak
On creation, we call action_removed() in case the action was missing
from the start.  Because we just created the action, 'can_activate' will
always be FALSE here and this function will therefore always do nothing.

We do want the visibility state to be updated though, for the case where
the action is missing but the item should still be visible from the
start.

Update the visibility directly instead of trying to call
action_removed().

https://bugzilla.gnome.org/show_bug.cgi?id=735122
2014-12-14 18:36:53 -05:00
Ryan Lortie bd6608036a GtkMenuTrackerItem: fix submenu visibility flag
We were only properly setting the "is-visible" flag to TRUE for menu
items with associated actions and not (for example) on submenus.

This was fine because the code for building GtkMenus from models
(correctly) assumed that submenus should always be visible and never
checked the property.

This is not true for the Mac OS code, which actually checked the
property and found it to be false for submenus.

Initialise the property to TRUE so that we get the correct value
reported for items that don't have actions.

https://bugzilla.gnome.org/show_bug.cgi?id=735122
2014-12-14 18:36:42 -05:00
Ryan Lortie 3c745d6f7a quartz menu: update visibility property name
This property is called "is-visible" now, not "visible".

https://bugzilla.gnome.org/show_bug.cgi?id=735122
2014-12-14 18:36:32 -05:00
Matthias Clasen 23eeb44beb GtkFileChooser: Don't crash if invisible files are deleted
This is a crash that has been around for a long time, as
can be seen here:
https://bugzilla.redhat.com/show_bug.cgi?id=1048388
https://bugzilla.redhat.com/show_bug.cgi?id=984375
https://bugzilla.redhat.com/show_bug.cgi?id=1159015
https://bugzilla.redhat.com/show_bug.cgi?id=1059187
https://bugzilla.redhat.com/show_bug.cgi?id=1122172
https://bugzilla.redhat.com/show_bug.cgi?id=1016895
https://bugzilla.redhat.com/show_bug.cgi?id=1133235
https://bugzilla.redhat.com/show_bug.cgi?id=1077500
https://bugzilla.redhat.com/show_bug.cgi?id=1054378
https://bugzilla.redhat.com/show_bug.cgi?id=1173212

Fix suggested by Benjamin Otte.
2014-12-11 22:58:03 -05:00
Matthias Clasen 07f8ecd4cf 3.14.6 2014-12-11 11:51:21 -05:00
Lapo Calamandrei 1cfbf16617 Adwaita: draw drag hilight on treeview rows.
See https://bugzilla.gnome.org/show_bug.cgi?id=741314
2014-12-11 17:48:29 +01:00
Matthias Clasen ff669c6b12 Make gtk_tree_model_foreach robust
Make gtk_tree_model_foreach safe for callbacks that modify
the model, even if the model does not have persistent iters.

https://bugzilla.gnome.org/show_bug.cgi?id=722781
2014-12-11 09:22:32 -05:00
Matthias Clasen 866c9a498d Don't compare booleans
Just use negation.
2014-12-11 09:22:24 -05:00
Matthias Clasen 87c5c662c0 Fix another header guard oversight
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=741252
2014-12-11 09:22:09 -05:00
Matthias Clasen d6b4bd0967 Fix some oversights with header guards
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=741254
2014-12-11 09:22:01 -05:00
Matthias Clasen 023fbb91d6 Drop a few unneeded ifs
It does not hurt to pass NULL to g_list_free().
2014-12-11 09:21:46 -05:00
Matthias Clasen 623f3e00e4 GtkWidget: Don't return FALSE as a pointer
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=741251
2014-12-11 09:21:35 -05:00
Matthias Clasen 1d17891eaa GtkPlacesSidebar: Don't return FALSE as a pointer
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=741250
2014-12-11 09:21:26 -05:00
Matthias Clasen 292a9b4a02 GtkMenuTracker: Don't return FALSE as a pointer
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=741249
2014-12-11 09:21:19 -05:00
Matthias Clasen 812109cc3f GtkEntry: Refresh when activity ends
We need to queue a redraw when pulse mode is ended by
setting a fraction. Noticed in gtk3-demo's search entry demo.
2014-12-11 09:21:07 -05:00
Kjell Ahlstedt 4621142e0c docs: Explain 'icon theme context' better in gtkicontheme.c
Add links from gtk_icon_theme_list_contexts() to
gtk_icon_theme_list_icons(), and from there to the Icon Theme
Specification and the Icon Naming Specification.

https://bugzilla.gnome.org/show_bug.cgi?id=461249
2014-12-11 09:20:55 -05:00
Matthias Clasen 28c39fb0f8 Handle KP keys in copy/paste keybindings
We currently handle KP variants of some keys, but not consistenly.

https://bugzilla.gnome.org/show_bug.cgi?id=364566
2014-12-11 09:20:44 -05:00
Phillip Wood c68490ee17 Editable cells demo: Add new row at cursor
Adding rows to the bottom of the list is confusing as you cannot see
them if the window is small so it is not apparent that anything has
happened. Fix this by adding the new row immediately below the current
row and set the cursor on the new row so it is ready to be edited.

https://bugzilla.gnome.org/show_bug.cgi?id=721939
2014-12-11 09:20:37 -05:00
Benjamin Otte 7833835930 inspector: Properly update flashing hilight
Previously, the inspector would not change the hilight while the
previous hilight was still flashing.
This is inconvenient while arrowing through the object selection
treeview though where you want the currently selected row to hilight
when arrowing quickly.
2014-12-11 09:18:25 -05:00
Cosimo Cecchi 1a1c1091da GtkPlacesSidebar: add support for unmount notifications
Now that we can use GNotification from here, send a notification when
umounting from GtkPlacesSidebar.

https://bugzilla.gnome.org/show_bug.cgi?id=740896
2014-12-11 09:16:58 -05:00
Matthias Clasen 7e21425228 GtkModelMenuItem: put some space between icon and label
This makes the bloatpad icons menu look slightly less odd.
2014-12-11 09:16:43 -05:00
Yosef Or Boczko e65112aaef GtkStackSwitcher: Make the buttons fill vertically
It fix some cases with different height for the buttons,
like with Hebrew character.

https://bugzilla.gnome.org/show_bug.cgi?id=740642
2014-12-11 09:15:53 -05:00
Andre Heinecke 7d066258f3 Remove overzealous validity check for secrets
We directly get the length of the secret from the g_variant
   and use it in a following g_strndup which ensures that the
   resulting string is terminated.

   This fixes reading secrets which were stored by system-config-printer.

https://bugzilla.gnome.org/show_bug.cgi?id=740612
2014-12-11 09:14:43 -05:00
Carlos Garnacho 527d262804 wayland: Don't translate a NULL region into an empty one
cairo_region_copy(NULL) will effectively return an empty region, as this
function is always meant to return valid memory. This however inverts the
meaning of the NULL region and results in entirely non-clickable windows.
2014-12-11 09:04:53 -05:00
Carlos Garnacho b8a154ad69 gtkwindow: claim the press sequence when clicking on the titlebar
This event might not have an action yet, but certainly accounts, and
should be triggering recognition.

This fixes a crash when attempting to drag CSD windows through touch. As
since cfaec2d2f5, gtk_gesture_single_get_current_sequence() would
rightfully return NULL if the gesture didn't enter recognition, making
event lookup fail.
2014-12-11 09:04:30 -05:00
Jasper St. Pierre bd893461b0 inspector: Remove unused variable 2014-12-11 08:53:44 -05:00
Matthias Clasen 63d0cf2a83 inspector: Look for themes in the right places
Match the places that GtkCssProvider looks in, so we show all
the themes that GTK+ would actually find.
2014-12-11 08:53:11 -05:00
Benjamin Otte 2f5adb1f76 inspector: Add missing directory when scanning for themes 2014-12-11 08:52:43 -05:00
Matthias Clasen 40aadf8502 css: Avoid excessive shadow rendering
The shadow rendering code had code to exit early if we determine
that the shadow is entirely clipped away. Unfortunately, the check
based on cairo clip extents fails for any clip regions that are
more complicated than axis-aligned rectangles, and we are using
a hollow rounded rectangle here. So, instead, do the check manually,
using the just-introduced API in GtkRoundedBox.
2014-12-02 14:29:04 -05:00
Matthias Clasen 10319e1f3d Add clipping apis to GtkRoundedBox
This adds two functions for checking whether an axis-aligned
rectangle is completely outside or inside of a rounded box.
These are not trying to be exact, but fast.
2014-12-02 14:28:57 -05:00
Matias De Lellis b4ec98dbec GtkPlacesSidebar: Fix Home and Desktop on Windows.
We were concatenating "file://" to the result of g_get_user_special_dir() to build
a URI, but this is not enough on Windows.  Use g_filename_to_uri() instead.

See https://bugzilla.gnome.org/show_bug.cgi?id=739453
2014-12-01 14:58:21 -06:00
Marek Kasik ab5a8e6bb9 printing: Don't crop dimensions of layout preview
Enlarge area for drawing of layout preview in the print dialog
so that it can embody landscape preview with dimensions.

https://bugzilla.gnome.org/show_bug.cgi?id=730232
2014-12-01 13:13:59 +01:00
Lapo Calamandrei af3efad099 Adwaita: insensitive GtkTreeView styling
See https://bugzilla.gnome.org/show_bug.cgi?id=740770
2014-11-28 17:49:20 +01:00
Leo Wolf 4d1fdfeb10 printing: Fix origin for scaled, rotated pages
The calls to cairo_translate in
_gtk_print_context_rotate_according_to_orientation,
_gtk_print_context_reverse_according_to_orientation and
_gtk_print_context_translate_into_margin assume an unscaled context.
These functions should therefore be called before scaling the context,
otherwise the origin does not always end up in the top left corner.

https://bugzilla.gnome.org/show_bug.cgi?id=740742
2014-11-27 12:22:32 +01:00
Matthias Clasen 2749b473ce x11: Handle obsolete selection requests without crashing
The ICCCM says:

If the specified property is None , the requestor is an obsolete client.
Owners are encouraged to support these clients by using the specified
target atom as the property name to be used for the reply.

Lets do that, instead of crashing.

https://bugzilla.gnome.org/show_bug.cgi?id=740613
2014-11-26 22:30:03 -05:00
Matthias Clasen 8d6b5ece9f Drop an unused variable 2014-11-26 20:19:10 -05:00
Emmanuele Bassi 98b961a1d6 docs: Fix annotation for GtkCssProviderError
https://bugzilla.gnome.org/show_bug.cgi?id=740374
2014-11-26 20:19:04 -05:00
Matthias Clasen 7c213fa980 Keep gtk_window_set_hide_titlebar_when_maximized working
This broke in 510c2cdfb6.

https://bugzilla.gnome.org/show_bug.cgi?id=740287
2014-11-26 20:19:04 -05:00
Matthias Clasen 8a2bf9f853 GtkStack: Remove some clumsy use of GList API
No need for g_list_next(), and don't open-code g_list_index().
2014-11-26 20:18:52 -05:00
Chun-wei Fan 047dd914a3 Visual Studio Builds: Fix gdkconfig.h Generation
...for Broadway builds, as it was producing a wrongly-named check file for
that configuration, so that a clean would not be correctly performed and
subsequently affected rebuilds.
2014-11-20 22:36:59 +08:00
Efstathios Iosifidis e3ce367e18 Updated Greek translation 2014-11-18 08:33:52 +00:00
Timm Bäder 9cab6be752 GtkDialog: Connect to activate signals only once
If the widget is an action widget, it's been previously added with
gtk_dialog_add_action_widget, which calls add_response_data on it, which
in turn connects to the clicked/activate signal of that widget, so we
don't need to connect to that signal a second time in
gtk_buildable_custom_finished.
2014-11-17 19:15:57 +01:00
Debarshi Ray 3a683e46e7 query, searchengine: Drop unused and undefined function declarations
https://bugzilla.gnome.org/show_bug.cgi?id=739977
2014-11-12 13:24:43 +01:00
Lapo Calamandrei 3617c3bd15 Adwaita: add a missing comma... 2014-11-11 16:32:02 +01:00
Emmanuele Bassi 0b8f666e02 window: GtkPlug is conditionally supported on X11 only
We cannot do a type check on it if we don't have the X11 backend
compiled in.

https://bugzilla.gnome.org/show_bug.cgi?id=739885
2014-11-10 15:10:41 +00:00
Alexander Larsson a329677311 gdk_window_end_paint: Flush destination surface after paint
It seems in cairo 1.14 we need this after having painted an image surface
to a X11 window surface (i.e. with GDK_RENDERING=image).

(cherry picked from commit 90555e06be)
2014-11-10 15:29:09 +01:00
Matthias Clasen f935432ac5 3.14.5 2014-11-09 16:17:51 -05:00
Matthias Clasen d7bff60140 Fix a problem with screen changes and csd
When a new screen is set on a window, we unrealize it, to
recreate all the resources. But we don't reset the client_decorated
flag, so realize() doesn't call create_decoration() - which makes
sense, since the decoration already exists. But the side-effect
of create_decoration() is to select the rgba visual, and visuals
are per-screen.

Fix this by looking for the rgba visual in set_screen(), and
replacing it with the rgba visual for the new screen, if necessary.
2014-11-09 13:02:20 -05:00
Aurimas Černius 55174e3f62 Updated Lithuanian translation 2014-11-09 17:45:35 +02:00
Carlos Garnacho 1977ad5bb7 treeview: remove single-click activation from GtkGestureMultiPress::pressed
This is already handled in GtkGestureMultiPress::release, and more in
concordance with how it was done pre-gestures.

https://bugzilla.gnome.org/show_bug.cgi?id=737891
2014-11-07 13:52:40 +01:00
Alberts Muktupāvels 695ff3882b gtkmenu: fix unnecessary scroll buttons
Don't change menu height if menu is out of monitor only by shadow
width.

https://bugzilla.gnome.org/show_bug.cgi?id=738321
2014-11-05 17:05:43 -05:00
Matthias Clasen e9c4313337 Make window scale changes work again
Commit afd9709aff made us keep impl window
cairo surfaces around across changes of window scale. But the
window scale setter forgot to update the size and scale of the
surface. The effect of this was that toggling the window scale
from 1 to 2 in the inspector was not causing the window to draw
at twice the size, although the X window was made twice as big,
and input was scaled too. Fix this by updating the surface when
the window scale changes.

(cherry picked from commit 113e1d1dc0)
2014-11-05 14:40:38 +01:00
Alexander Larsson 0ddb4fd989 GdkWindowX11: Keep the impl window cairo surface around until destroy
We used to have a weak ref to the cairo surface and it was keep
alive by the references in the normal windows, but that reference
was removed by d48adf9cee, causing
us to constantly create and destroy the surface.

https://bugzilla.gnome.org/show_bug.cgi?id=738648
(cherry picked from commit afd9709aff)
2014-11-05 14:40:19 +01:00
Carlos Garnacho 02bae1885b gtkwindow: Resort to regular event bubbling by all means on non-toplevels
If the multipress gesture is not created (ie. not a toplevel GtkWindow),
also avoid possibly calling gtk_widget_event() on the events gotten here.
2014-11-04 19:16:06 +01:00
Carlos Garnacho 81f94245ba gtkwindow: Do not create the multipress gesture for plugs
GtkPlugs may "qualify" as toplevels, even though they're not meant to
be WM manipulated, so refuse to create the multipress gesture for these
too.
2014-11-04 19:16:06 +01:00
Lapo Calamandrei 7acbd5fd24 Adwaita: backport osd style changes from 3.15 2014-11-04 13:31:21 +01:00
Lapo Calamandrei c01578284d Adwaita: add back text color
See https://bugzilla.gnome.org/show_bug.cgi?id=726316 for details.
2014-10-31 15:32:56 +01:00
Lapo Calamandrei 8055a37230 Adwaita: dim backdrop foreground color
To make the focused window more evident.
2014-10-31 14:04:25 +01:00
Lapo Calamandrei 5e7630c1ee Adwaita: use $backdrop_fg_color where it should
.background:backdrop was not using that one so some labels didn't
look right in backdrop.
2014-10-31 14:00:17 +01:00
Bernd Homuth 637ef1df38 Updated German translation 2014-10-30 19:05:54 +00:00
Sebastien Lafargue ed0e7f61af popover menus: Take iconic into account
We don't want separators in both side of an iconic section
and use a 10px margin to separate two iconic sections.

Separators are also updated in case of dynamic insertion
( often used with menu items for plugins )

https://bugzilla.gnome.org/show_bug.cgi?id=738650
2014-10-27 07:20:49 -04:00
Matthias Clasen 830a72b307 quartz: Move the FullscreenSavedGeometry definition earlier
Move the FullscreenSavedGeometry before the first (conditional)
use, to fix the build on OS X 10.6.

https://bugzilla.gnome.org/show_bug.cgi?id=737561
2014-10-27 06:52:03 -04:00
Marcus Karlsson 7d3991f275 quartz: fix build on 10.6 and below
It is not possible to successfully build GTK+ on OS X 10.6 and below
since NSFullScreenWindowMask is only available starting with 10.7. Add
ifdef guards around setStyleMask: in order to allow it to build on
earlier OS X releases.

https://bugzilla.gnome.org/show_bug.cgi?id=737561
2014-10-27 06:51:56 -04:00
Christophe Fergeau fe6b3e552e Return correct font from gtk_font_chooser_widget_find_font
Commit 30a1c4ab fixed several memleaks including one in
gtk_font_chooser_widget_find_font.

However, the fix causes one extra call to gtk_tree_model_iter_next()
after finding the font we look for (ie pango_font_description_equal
returns TRUE): the 'increment' part of the for loop
(gtk_tree_model_iter_next) is run before the 'exit condition' of the for
loop is evaluated.

This commit reverts this part of commit 30a1c4ab and adds an extra
call to pango_font_description_free in order to fix the leak.

https://bugzilla.gnome.org/show_bug.cgi?id=739111
2014-10-26 21:57:27 -04:00
Christophe Fergeau 9e96e13d28 fontchooserwidget: Don't invalidate priv->font_iter in load_fonts
When using GtkFontChooserButton, the same GtkFontChooserWidget can be
hidden and shown multiple times. When doing that, the font that was
chosen the previous time should be the selected one in the
GtkFontChooserWidget, however this does not work as expected and a
somehow 'random' font gets selected (or none) instead.

Every time the font chooser widget is shown, its style will be updated,
causing gtk_font_chooser_widget_style_updated and then
gtk_font_chooser_widget_load_fonts to be called.

gtk_font_chooser_widget_load_fonts starts by clearing the GtkListStore
listing the available fonts, repopulates it, and then makes sure the
current font is selected.

However, this does not work as expected, as during the call to
gtk_list_store_clear, the cursor_changed_cb will be invoked multiple
times when the GtkTreeView cursor gets moved when the line where the
cursor currently is gets removed. This will cause the 'current font'
state (priv->font_desc) to be unexpectedly modified, and when
gtk_font_chooser_widget_load_fonts tries to reposition the cursor to the
'current font', we won't get the expect result.

This commit avoids that by making sure cursor_changed_cb does not get
called when we call gtk_list_store_clear in
gtk_font_chooser_widget_load_fonts.

https://bugzilla.gnome.org/show_bug.cgi?id=739111
2014-10-26 21:57:19 -04:00
Matthias Clasen 752170e8d6 Fix an out-of-bounds access in MyEnhancedXkbTranslateKeyCode
Commits 314b6abbe8 and eb9223c008 were ignoring
the fact that the code where found is set to 1 was modifying
col - which was an ok thing to do when that part of the code
was still breaking out of the loop, but it is no longer doing
that (since 2003 !). Fix things up by storing the final col
value in a separate variable and using that after the loop.

https://bugzilla.gnome.org/show_bug.cgi?id=738886
2014-10-26 21:57:09 -04:00
Marek Černocký 8336d56af9 Updated Czech translation 2014-10-26 00:32:14 +02:00
Marek Černocký 59769a0046 Updated Czech translation 2014-10-26 00:32:03 +02:00
Мирослав Николић 7c804dbf21 Updated Serbian translation 2014-10-24 10:42:07 +02:00
Мирослав Николић 84d6b0f35c Updated Serbian translation 2014-10-24 10:30:34 +02:00
Chun-wei Fan ccdcc8a1ec Fix Up Visual Studio Property Sheets
"Install" gdkbroadwaydisplay.h, as it is a public header of GDK Broadway,
also fix the MSVC 2010+ gtk-copy-gdk-broadway.props property sheet as a
'>' is missing.  Sorry for not noting these issues earlier, as MSVC
Broadway builds were recently restored.  My bad :|
2014-10-24 12:53:15 +08:00
Chun-wei Fan ca26f696c6 gtk/deprecated/gtkstatusicon.c: Fix Build on C89 Compilers
Declare variable at the top of the block, which is needed from the change
in commit 1bad7865.
2014-10-24 12:24:16 +08:00
Gábor Kelemen 4a25c48a01 Updated Hungarian translation 2014-10-23 10:49:41 +00:00
Gábor Kelemen 5d9d1f161b Updated Hungarian translation 2014-10-23 10:48:17 +00:00
Matthias Clasen 01dd0eb4c2 Revert "Implement support for ATK_STATE_HAS_TOOLTIP"
This reverts commit ad6de7637b.

This requires new atk API that is not available in 2.14.0.
2014-10-22 23:10:55 -04:00
Brion Vibber 0b883daf15 Fix to gtkstatusicon.c to allow building both X11 and Quartz backends
https://bugzilla.gnome.org/show_bug.cgi?id=739005
2014-10-22 22:57:50 -04:00
Joanmarie Diggs ad6de7637b Implement support for ATK_STATE_HAS_TOOLTIP
https://bugzilla.gnome.org/show_bug.cgi?id=738982
2014-10-22 22:57:43 -04:00
Matthias Clasen 79e7934eb3 Fix mispositioned window menu in hi-dpi
We always want to send the position in device pixels,
so apply the window scale before sending them out.

https://bugzilla.gnome.org/show_bug.cgi?id=738955
2014-10-22 22:57:35 -04:00
Chun-wei Fan ea8a281543 gdk/broadway/toarray.pl: Fix Code Generation for MSVC
The current implementation of this script generate headers with \x-escaped
strings that can become too long (> 65535 characters) for Visual Studio
to consume, hence the build of broadwayd would break on Visual Studio.

This changes the script to instead format the string as an array of hex
characters, not unlike what GResource does, so that builds can continue as
normal on Visual Studio builds as well.

https://bugzilla.gnome.org/show_bug.cgi?id=739001
2014-10-23 09:13:16 +08:00
Chun-wei Fan cd443f34c7 Visual Studio Builds: Fix broadwayd Build
There is now a broadway-buffer.c source that needs to be built for this, so
add it into the projects.  Since crypt() is no longer used, don't include
crypt.c in the builds, and so clean up the projects a bit.
2014-10-22 19:42:15 +08:00
Matthias Clasen 210c3d0129 3.14.4 2014-10-21 11:02:15 -04:00
Ryan Lortie 8f1c6e3717 wayland: don't init if XDG_RUNTIME_DIR missing
wayland doesn't strictly follow the XDG_RUNTIME_DIR spec by falling back
to another directory in case the runtime dir is not properly set.

When this variable is unset, wayland will log an error to us, which we
treat as fatal, aborting the entire program.

Skip ourselves all the trouble and don't try to bring up the wayland
backend when we know it will fail in this way.

https://bugzilla.gnome.org/show_bug.cgi?id=738873
2014-10-21 08:13:25 -04:00
Benjamin Otte 989330a9fd render: We use CHECKED now, not ACTIVE
Update docs and custom rendering of checkmarks and radio buttons
2014-10-21 05:58:02 +02:00
Benjamin Otte 5930c55d42 stylecontext: fix icon-source extents computation
for the builtin image or invalid matrix case. We used to return invalid
memory in those cases. And that was not good.
2014-10-21 05:55:28 +02:00
Rafael Ferreira 4f9f52c513 Updated Brazilian Portuguese translation 2014-10-20 21:30:26 +00:00
Kjartan Maraas cd6caea94c Updated Norwegian bokmål translation. 2014-10-20 19:03:27 +02:00
Daniel Mustieles 5291d0870b Updated Spanish translation 2014-10-20 15:05:01 +02:00
Dušan Kazik 78bb68685b Updated Slovak translation 2014-10-19 17:22:29 +00:00
Andika Triwidada baf2b5c57b Updated Indonesian translation 2014-10-19 04:25:12 +00:00
Andika Triwidada 94b471aaed Updated Indonesian translation 2014-10-19 04:22:17 +00:00
Piotr Drąg 5ce6756f96 Updated Polish translation 2014-10-18 23:45:21 +02:00
Thomas Lange 63076ad085 aboutdialog: Mark strings as translatable
https://bugzilla.gnome.org/show_bug.cgi?id=730893
2014-10-18 23:01:19 +02:00
Matthias Clasen 21e5031103 GtkWindow: Avoid an early exit
When gtk_window_set_titlebar (win, NULL) is called, we were taking
an early exit and forgot to re-map the window. This does not normally
happen in practice, but glade is about to get a 'csd' switch which
lets one toggle back and forth between titlebar and no titlebar.
2014-10-17 14:02:16 -04:00
Baurzhan Muftakhidinov 7abd5a5636 Updated Kazakh translation 2014-10-17 11:52:28 +00:00
Matthias Clasen c4fe388255 GtkEntry: plug a small memleak
GtkEntry was leaking a pango attribute list, if one was set.
2014-10-16 22:00:08 -04:00
Matthias Clasen 06842a2dc5 GtkPlacesSidebar: Don't leak an icon
Found in valgrind.
2014-10-16 20:30:42 -04:00
Matthias Clasen 30a1c4ab35 GtkFontChooserWidget: Plug several memleaks
These were showing up in valgrind.
2014-10-16 20:30:34 -04:00
Matthias Clasen 973b52e8cf GtkContainerAccessible: avoid resurrecting accessibles
When removing a child, we don't want to resurrect its
accessible needlessly.
2014-10-16 20:30:25 -04:00
Lapo Calamandrei c25e8cefae Adwaita: fix stack-switcher button outline offset
See https://bugzilla.gnome.org/show_bug.cgi?id=738636
2014-10-16 20:26:12 +02:00
Matthias Clasen 627c285b4c Avoid deprecation warnings
We don't really care if we use deprecated API inside deprecated
code, so just ignore the warning.
2014-10-15 14:44:03 -04:00
Matthias Clasen 36bc6c82f9 Revert "gtktrayicon-x11: Stop using set_double_buffered"
This reverts commit 4a72563c7b.

It turns out that this commit broke statusicons under Xfce when
not using a compositor.

https://bugzilla.gnome.org/show_bug.cgi?id=737986
2014-10-15 14:43:53 -04:00
Matthias Clasen 1670ba1d51 GtkBox: Ensure we only allow one center child
Glade was happily adding multiple center widgets. Oops.
2014-10-13 12:44:02 -04:00
Matthias Clasen adfb60dff7 Updates for 3.14.3 2014-10-13 11:50:03 -04:00
Carlos Soriano ffc4111fea gtkplacessidebar: Fix commit f6870e5b79
Commit f6870e5b79 introduced a some memory leaks and could be
improved in some areas.

Fix the memory leaks and apply the improvements.

https://bugzilla.gnome.org/show_bug.cgi?id=737983
2014-10-13 11:50:03 -04:00
Milo Casagrande 8710a14d34 Updated Italian translation 2014-10-13 11:13:03 +00:00
Matthias Clasen 654c989f22 GtkSearchBar: don't peek out
When the searchbar is hidden, a 1-pixel-high piece of it is
still peeking out, because visible widgets are always allocated
at least 1x1. Work around this by setting child-visible to FALSE
in this situation.

https://bugzilla.gnome.org/show_bug.cgi?id=724096
2014-10-12 18:21:25 -04:00
Dušan Kazik 1515a5a8f9 Updated Slovak translation 2014-10-12 21:02:10 +00:00
Dušan Kazik 9c1ecdf112 Updated Slovak translation 2014-10-12 21:01:04 +00:00
Мирослав Николић b261ca7ec2 Updated Serbian translation 2014-10-12 08:44:10 +02:00
Lapo Calamandrei 4e569765be Adwaita: fix the special cased sidebar scrollbar...
...which I broke with the latest commit.
2014-10-11 14:37:16 +02:00
Lapo Calamandrei d840504741 Adwaita: finally kill the scrollbar junction frame...
See https://bugzilla.gnome.org/show_bug.cgi?id=737981
2014-10-11 14:33:01 +02:00
Lapo Calamandrei b1345c0218 Adwaita: dim menu overflow button border color 2014-10-11 11:11:56 +02:00
Lapo Calamandrei e119422927 Adwaita: style menu overflow button
See bug https://bugzilla.gnome.org/show_bug.cgi?id=738158
2014-10-11 11:11:43 +02:00
Arash Mousavi 9a24f8295b Updates Persian Translations 2014-10-11 00:55:52 +03:30
Carlos Soriano a9ebdd3aa8 gtkplacessidebar: Open $HOME after unmounting or ejecting
When a drive is ejected or a volume unmounted the current directory
doesn't change most of the times being empty or being a directory that
user shouldn't take care about, like /run/media

Seems more useful to change to $HOME directory in that case so the user
can see something useful and familiar just after unmounting.

https://bugzilla.gnome.org/show_bug.cgi?id=737983
2014-10-10 15:29:50 -04:00
Carlos Soriano 6e42eb1224 gtkplacessidebar: Don't change location if clicked on eject button
Currently we change the current location if we click the eject button of
a mount.

Check whether the user actually clicked the eject button and don't
change location in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=737983
2014-10-10 15:29:43 -04:00
Carlos Garnacho 57121ffe2c wayland: write wl_data_offer data asynchronously
Currently writing wl_data_offer data into the fd is 1) synchronous, which
is noticeable when transferring large amounts of data, and 2) buggy, write()
error checking is done on the accumulator, breaking both the written data
accounting and error checking itself.

Fix both by making writes asynchonous through GOutputStream, the operation
is spun off and either finished, or cancelled if new data is stored in the
selection while the transfer is active.
2014-10-10 21:06:34 +02:00
Matthias Clasen 69fd4348a8 Add top/bottom style classes to scroll arrows 2014-10-10 08:55:29 -04:00
Milo Casagrande 590ed447e8 Updated Italian translation 2014-10-10 11:50:23 +00:00
Matthias Clasen 3b2466b1ac ColorChooser: Fix an off-by-one error
We were not filling the last free space in the custom color
row.
2014-10-09 00:14:52 -04:00
Lars Uebernickel 5d4d144103 Distribute gtk/resources/ui/*.ui.h
POTFILES references them.
2014-10-08 17:24:30 +02:00
Lapo Calamandrei 7ca79b2ca5 Adwaita: don't round scrolled window frame corners
See https://bugzilla.gnome.org/show_bug.cgi?id=737985
2014-10-08 14:11:29 +02:00
Matthias Clasen 693b568b99 Bump version 2014-10-07 20:53:30 -04:00
Matthias Clasen 8247e44874 Add one more bug 2014-10-07 19:30:37 -04:00
Dariusz Gadomski 231cac4f78 printing: Properly initialize auth_info in gtkprintbackend.c
auth_info should be a NULL-terminated array as it is used in
e.g. g_strdupv invocations iterating over its elements until
a NULL element is encountered.

https://bugzilla.gnome.org/show_bug.cgi?id=737777
2014-10-07 18:54:40 -04:00
Matthias Clasen 597aa8b74d Updates for 3.14.2 2014-10-07 13:38:24 -04:00
Matthias Clasen 3eba66d11d Make touch-selection popovers font-inert
Just like context menus, these should not inherit font
settings from the text view they are attached to.
2014-10-07 13:38:24 -04:00
Matthias Clasen cc953409d5 Add a style class for touch selection popovers 2014-10-07 13:38:05 -04:00
Matthias Clasen 8aece58e2b GtkBuilder: Undo the type name heuristic changes
These turned out to break existing ui files, concretely
GWeatherLocationEntry was no longer guessed correctly.

Update the testcases to reflect this, and add a testcase
for GWeather.
2014-10-07 11:56:44 -04:00
Michael Catanzaro 85f1c1f8bc tooltip: fix line wrapping
We enable line wrap on the internal GtkLabel, but nowadays this does
nothing unless we also set a max number of characters.

https://bugzilla.gnome.org/show_bug.cgi?id=737929
2014-10-07 09:05:09 -05:00
Nilamdyuti Goswami d94f9e5680 Updated Assamese translation 2014-10-07 13:41:01 +00:00
Nilamdyuti Goswami cb670543bc Updated Assamese translation 2014-10-07 13:36:43 +00:00
Vasiliy Nuzha 7f406f2db1 Fix monitors enumeration bug
Fix monitors enumeration bug. By default used MONITORINFOEXW (UTF-16 Build) with wrong structure size
2014-10-07 10:43:55 +00:00
Matthias Clasen ea205f75d2 GtkStackSwitcher: Pick up the visible child from the stack
We forgot to synchronize the visible child when setting a
stack on the switcher. Oops.
2014-10-06 23:08:21 -04:00
Matthias Clasen 951b59ffbe Add GtkTextViewClass to the docs
So that the existing information about draw_layer actually
ends up in the docs. While we are at it, document the other
vfuncs.

https://bugzilla.gnome.org/show_bug.cgi?id=737952
2014-10-06 22:35:18 -04:00
Benjamin Otte 590955dcce gdk: Fix gdk_cairo_create() without begin_paint()
We were translating the clip region twice in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=737825
2014-10-06 22:41:00 +02:00
Aurimas Černius 8b83ec9b59 Updated Lithuanian translation 2014-10-06 23:37:38 +03:00
Changwoo Ryu 700b3e7d8a Updated Korean translation 2014-10-07 01:35:12 +09:00
Kalev Lember a0b2cf402f gdk: Allow calling gdk_cairo_surface_create_from_pixbuf with scale 0
The documentation explicitly states that 0 is an allowed value for using
the same scale as the window. This 0 value is also explicitly checked
down in the call chain and handled.
2014-10-06 14:40:00 +02:00
Matthias Clasen d46a271112 GtkPlacesSidebar: Don't pile up duplicate bookmarks
We get multiple notifications from the bookmark manager when
something changes. Every time, we reconstruct the sidebar contents
completely, by clearing the store. The bookmarks are added with
async calls though, and the code was forgetting to cancel outstanding
async requests, leading to multiple instances of the same bookmark
getting added. Use the cancellable we already have to prevent that.

This could be made much more efficient by not recreating the entire
sidebar quite so often (3-5 times for a single bookmark rename).

https://bugzilla.gnome.org/show_bug.cgi?id=737679
2014-10-05 13:40:52 -04:00
Christian Kirbach 846c91c66d Updated German translation 2014-10-05 14:22:50 +00:00
Rafael Ferreira 05d7be8a54 Updated Brazilian Portuguese translation 2014-10-04 22:11:06 +00:00
Matthias Clasen 0851a16d90 printing: Avoid missing icons
I've noticed a missing image show up in my print dialog, where
the printer reported "printer-paused" as icon. Rearrange things
so we always fall back to "printer" for printer icons.
2014-10-04 12:22:24 -04:00
Matthias Clasen ee25d35cd0 printing: Make GtkPrinter have a useful icon by default
It causes complication elsewhere if gtk_printer_get_icon_name()
returns NULL initially. So make the icon name default to
"printer".
2014-10-04 12:22:16 -04:00
Matthias Clasen 666f7d35e4 printing: Another tweak to sheet drawing
After consultation, revisit the vertical centering to center
the first 'stack', and put the second one behind it.
2014-10-04 11:58:15 -04:00
Matthias Clasen 0891ff83b6 inspector: Down the model tree
Show nested tree models, inside filter or sort models. Without
this, you can't get at the data.
2014-10-04 11:58:07 -04:00
Matthias Clasen 90c639fe46 printing: Simplify sheet drawing
We don't need the scaling support anymore - icon sizes are
no longer settable.
2014-10-04 11:07:11 -04:00
Matthias Clasen d65b8e6ff1 print: Center sheet drawing horizontally
Center the page ordering indicator horizontally, relative to the
spinbutton above it.
2014-10-04 11:07:04 -04:00
Matthias Clasen c5e39fd4c1 print: Center sheet drawing vertically
Center the page ordering indicator vertically, relative to the
checkboxes next to it.
2014-10-04 11:06:56 -04:00
Benjamin Otte 928a51533f print: Improve sheet drawing a bit
This is only one step in the right direction. Long term this code should
probably be replaced by real widgets.
2014-10-04 11:06:49 -04:00
Kjartan Maraas cfb51ddb4a Updated Norwegian bokmål translation. 2014-10-03 21:43:59 +02:00
Matthias Clasen 7599f1804c Printing: Make the print dialog look better with bottom buttons
With buttons at the bottom, things were not looking good here:
no spacing, and a gray background. Add spacing, and put the buttons
on the white background.
2014-10-03 00:09:36 -04:00
Matthias Clasen 4fc47c800d GtkRadioButton: Allow setting group more than once
It turns out that GtkBuilder will sometimes set a property
twice. Normally, this is harmless, but for GtkRadioButton:group,
it triggered a critical. Remove that.
2014-10-02 23:40:15 -04:00
Matthias Clasen 19e8357471 Trivial typography improvement
Use an em dash instead of -- in documentation.
2014-10-02 23:40:09 -04:00
Matthias Clasen 4de087262e GtkExpander: Fix a problem with resize-toplevel
The toplevel resizing was not working properly when the
content had non-trivial height-for-width behavior (such
as a wrapping label).
2014-10-02 18:04:44 -04:00
Matthias Clasen 2c9c2f704c GtkColorEditor: Fix missing background in popups 2014-10-02 00:38:49 -04:00
Matthias Clasen 84f5091459 GtkCalendar: deal better with a large allocation
When allocated more than the requested height, GtkCalendar
was 'falling apart'. Not only was the main part rendered
at the far end of the allocation, clicking on days was
broken in this scenario.

Fix this by always placing the main part directly under
the header and day names.

https://bugzilla.gnome.org/show_bug.cgi?id=737670
2014-10-01 20:52:58 -04:00
Stas Solovey 2ce384cc5a Updated Russian translation 2014-10-01 19:26:56 +00:00
Matthias Clasen 94592be5bc Don't emit a useless warning
The warning may have had some value at some point, but if
people uninstall large icons just to make the warning go
away, it does more harm than good. So just remove it.
2014-10-01 13:18:44 -04:00
Matthias Clasen d763169bb5 Fix fonts in context menus
Context menus inherit their style from the widget they are attached
to. This can have unexpected effects in particular for font, as can
be seen in gedit or gnome-calculator. Prevent this by resetting
the font of context-menus to the initial value.
2014-10-01 07:15:17 -04:00
Alexandre Franke 3ae6d33667 Updated French translation 2014-09-30 17:47:43 +00:00
Marek Černocký 73f386169c Updated Czech translation 2014-09-30 13:22:12 +02:00
Chun-wei Fan deed16b151 Update README.txt for MSVC Builds
Tell people that they need to download and install the Adwaita icon theme,
by following the instructions given on
https://live.gnome.org/GTK%2B/Win32/MSVCCompilationOfGTKStack.

Also tell people they can either use IJG JPEG or libjpeg-turbo for non-GDI+
builds of GDK-Pixbuf.
2014-09-30 13:02:52 +08:00
Matthias Clasen e2355b55e4 Bump version 2014-09-29 22:13:29 -04:00
282 changed files with 80584 additions and 62923 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ can be found here:
Information about using git with GNOME can be found here:
http://live.gnome.org/Git
https://wiki.gnome.org/Git
In order to get GIT GTK+ installed on your system, you need to have
the most recent GIT versions of GLib, Pango, and ATK installed as well.
+325
View File
@@ -1,3 +1,328 @@
Overview of Changes in GTK+ 3.14.14 to 3.14.15
==============================================
* Bugs fixed:
741800 GTK3 apps have huge rendering pauses/hangs over SSH connection
751401 crash on DnD
752016 testgmenu: use the menu binding code
listbox: listen for adjustment changes
many coverity warning fixes
* Translation updates:
Czech
Hungarian
Lithuanian
Polish
Slovenian
Overview of Changes in GTK+ 3.14.13 to 3.14.14
==============================================
* Bugs fixed:
693738 gtk print dialog shows "Getting printer information failed"...
738083 GtkMenuButton is not disabled even if corresponding GAction is
745957 GTK+/Quartz >= 3.14.8: Symbol not found: _gtk_drag_cancel (...
750011 Adwaita : missing background for menu
750605 icontheme: don't modify symbolic SVG dimensions when recoloring
750690 Recent Chooser Widget doesn't expand
750870 gtk3 does apparently ignore replayed events?
750994 X11: First mouse wheel event ignored after right click or Alt+Tab...
751050 Moving the mouse while a stepper is activated causes the scrollba...
751227 file picker list box height stretches to matchtk extra widgets area...
751443 resource_path value cleared in gtk_image_set_from_resource
751739 Deadlock in X11 when setting XSetErrorHandler while another threa...
751752 Memleak when both opening shm and opening file in tmp fail
* Translation updates:
Icelandic
Occitan
Overview of Changes in GTK+ 3.14.12 to 3.14.13
==============================================
* Bugs fixed:
737175 most horizontal sliders are inverted when scrolled with wheel
747469 CSD: can't open window menu using right click after moving window
747553 Popovers inside local plugs don't get size_allocate() called
747805 Split Headerbar unmaximize
748061 GtkMessageDialog: Minor documentation update
748341 GdkOffscreenWindow should not segfault on gdk_window_beep()
GtkApplication: Prevent more crashes on shutdown
* Translation updates:
German
Icelandic
Overview of Changes in GTK+ 3.14.11 to 3.14.12
==============================================
* Bugs fixed:
744589 nautilus bookmarks changing places randomly
747539 popover: Remove signal handlers in dispose
Fix unwanted transparency of drag icons
Revert "image: Optimize non-resize changes"
Avoid a crash in GtkApplication
Avoid a crash with tree view rubberbanding
Make gtk-update-icon-cache more resilient
Overview of Changes in GTK+ 3.14.10 to 3.14.11
==============================================
* Bugs fixed:
734741 GtkScale's fill-level starts at the very left if show-fill-level...
737175 most horizontal sliders are inverted when scrolled with mouse wheel
746712 Range ignores the "inverted" property
746784 GtkBooleanCellAccessible emits state-changed:checked signals ins...
746817 GtkRadioButton keynav uses wrong succession
746821 W32: Maximized window is obscured by the taskbar
746862 popover clears shadow of underlying widgets
* Translation updates:
Czech
Overview of Changes in GTK+ 3.14.9 to 3.14.10
=============================================
* Bugs fixed:
613833 Unnecessary queue_resize() for GtkImage
669008 Kerberos authentication popup
671362 Fixes for GtkRadioMenuItem
703610 Problems with UC-Logic WA60 tablet
741511 Critical message: NULL is passed to g_object_unref() in spi_atk...
743323 avahi-discovered CUPS printers don't work
745225 eventcontroller: Don't crash if the widget is destroyed first
745829 crash when double-clicking close button while popover is visible
746253 has-tooltip property interferes with event-compression
746301 Opening "Sound" panel generates pixman error
746458 Inspector: show accessible name and description
746468 gtkcairoblur is slow
746586 crtical warnings in a11y if focus widget is destroyed
746602 Invalid writes through dangling weak pointers in DND code cause...
* Translation updates:
Bosnian
Czech
Dutch
Hungarian
Indonesian
Lithuanian
Polish
Serbian
Slovenian
Swedish
Turkish
Overview of Changes in GTK+ 3.14.8 to 3.14.9
============================================
* GtkScrolledWindow
- Avoid 'jumping' when zoom scrolling kicks in
- Make zoom scrolling less easy to trigger
* Bugs fixed:
743323 avahi-discovered CUPS printers don't work
744172 Wayland: Clients won't work on compositors that support wl_...
744683 Tooltips should have ATK_ROLE_TOOL_TIP (like they did before)
744942 quartz: Avoid segfaulting when calling gdk_window_ensure_native
744991 Fix loading of GResource SVGs
745052 Icon theme code assumes directories with mtime 0 don't exist
Fix crash and miscalculation in css bitmask manipulation
Fix a crash due to too large surfaces
Update on text scale factor changes
* Translation updates:
Slovenian
Turkish
Overview of Changes in GTK+ 3.14.7 to 3.14.8
============================================
* Bugs fixed:
613833 Unnecessary queue_resize() for GtkImage
732051 Crash can result if a child widget is destroyed while its tab is...
735316 Default font antialiasing results in wrong behavior on OS X
740613 XConvertSelection crashes Gtk+ apps
741259 gtkmodelmenuitem: force icon scaling
742181 "show images in menus" causes weird padding outside GNOME
742636 Freeze if window closed while resume-events pending
742664 Portabilitiy issues with GTK-Inspector 32-bit and non-gnome3 des...
742727 nautilus adding bookmark by dragging appear always at top
742764 Fix check for 'y' padding in gtk_cell_renderer_set_padding()
742771 Properly ignore BadWindow and BadDrawable in get_child_info_hand...
742774 Properly check result of g_utf8_get_char_validated()
742785 Fix event->button.y_root when using mouse buttons and dnd canceled
742786 Fix save_hot_y init in gtk_drag_get_icon()
742980 cannot start broadway on FreeBSD
743229 clipboard: support selection notification on wayland
743330 Wintab initialization glitches
743422 valgrind: Conditional jump or move depends on uninitialised valu...
743451 Drag and drop on GtkFileChooserButton doesn't work
743592 crash on link click in about dialogue
743593 GtkWidget's va_marshaller for "event-after" signal is incorrect
* Translation updates:
Icelandic
Overview of Changes in GTK+ 3.14.6 to 3.14.7
============================================
* Bugs fixed:
477454 libgtk crashed in gtk_notebook_button_release
705582 gtk_recent_manager_init fails to check settings==NULL
735122 GtkApplication: fix global menubar on Mac OS
739038 gtk_recent_manager_set_filename: assertion failed: (priv->fil...
739729 Bookmarks in sidebar sometimes randomly change their order
741130 Entry completion with multiple cells can size wrong on first ...
741652 Leaking menus when attaching to a button
741702 Right margin not respected with RTL text in non-wrapping mode...
741827 Typo in testsuite/reftests/Makefile.am causes build failure o...
741897 documentation fix
741969 GTK_STOCK_COPY
742010 GtkLabel eats thumb-button clicks
742170 cut/copy/paste binding entries are registered 2x
742311 On cellrenderertext, notify for "size" and "size-points" prop...
742343 Hide scrollbar in GtkFileChooser if appropriate
742631 Left padding on File Chooser List
742653 gtkfilechooserwidget: When using an extra widget, show or hid...
742664 Portabilitiy issues with GTK-Inspector 32-bit and non-gnome3 ...
GtkFileChooser: Don't crash if invisible files are deleted
* Translation updates:
British English
Kannada
Overview of Changes in GTK+ 3.14.5 to 3.14.6
============================================
* Bugs fixed:
364566 Text editing widgets should support keypad Insert/Delete...
461249 gtk_icon_theme_list_contexts() documentation: What is a ...
721939 Editable cells demo: Add new row at cursor
722781 Foreach call on sort model fails with sort function
730232 print dialog clips off left page size label on A4 landsc...
739453 Home and Desktop do not link to correct place in PlacesS...
739885 gtk3-3.14.5 - fail to link - undefined reference to `GTK...
739977 Don't wait for ENTER to initiate search
740287 GtkWindow's hide-titlebar-when-maximized no longer does ...
740374 Is enum GtkCssProviderError really deprecated?
740612 Cups secret service auth_info lookup fails to read auth_...
740613 XConvertSelection crashes Gtk+ apps
740642 Fix different height for buttons with Hebrew character
740742 Don't scale before translation
740770 Missing style when the GtkCellRenderer:sensitive propert...
740896 GtkPlacesSidebar: add support for unmount notifications
741249 gtk_menu_tracker_section_find_model returns FALSE
741250 gtk_places_sidebar_list_shortcuts returns FALSE
741251 gtk_widget_get_frame_clock returns 0
741252 tests/variable.h header guard typo
741254 Improper headers guards
741314 Adwaita: draw drag hilight on treeview rows
Redraw problems with cairo 1.14
Avoid excessive redraws due to CSD shadows
* Translation updates:
Greek
Overview of Changes in GTK+ 3.14.4 to 3.14.5
============================================
* Bugs fixed:
726316 Backdrop inconvenient on multimonitor for reading text
737561 quartz: gtk+ 3.14.0 fails to build on 10.6.8, 'NSFullScreen...
737891 mounting LUKS partition from nautilus takes very long
738321 GtkMenu has unnecessary scroll buttons
738648 gdk_window_get_content() causes creation/destruction of bac...
738650 fix separator with iconic section and more
738886 Out of bounds access in MyEnhancedXkbTranslateKeyCode`
738955 Client-side decoration window menus appear at wrong positio...
739005 gtkstatusicon.c won't build with both X11 and Quartz backen...
739111 GtkFontChooserDialog fixes
* Translation updates:
Czech
German
Hungarian
Lithuanian
Serbian
Overview of Changes in GTK+ 3.14.3 to 3.14.4
============================================
* Bugs fixed:
730893 Dialogs use headerbars even when DialogsUseHeader is unset
737986 Transparent icon background rendered black on XFCE
738636 GtkStackSwitcher focus overlap border
738873 wayland backend aborts [...] if XDG_RUNTIME_DIR unset
Only allow one center widget in boxes
Memory leak fixes
* Translation updates
Brazilian Portuguese
Indonesian
Kazakh
Norwegian bokmål
Polish
Slovak
Spanish
Overview of Changes in GTK+ 3.14.2 to 3.14.3
============================================
* Bugs fixed:
724096 search-bar: don't show the widget until we're ready to reveal
737981 Strange frame in GtkScrolledWindow
737983 gtkplacessidebar: Open $HOME after unmounting or ejecting
737985 Unnecessary "GtkScrolledWindow .frame"
738158 Flat context menu button
* Translation updates:
Italian
Persian
Serbian
Slovak
Overview of Changes in GTK+ 3.14.1 to 3.14.2
============================================
* GtkInspector now shows nested tree models
* Bugs fixed:
737670 GtkCalendar days cannot be selected if vertical size is greater...
737679 Bookmarks are visually duplicated in sidebar
737952 Documentation missing for GtkTextView's new draw-layer function...
737929 Long tooltips extend too far horizontally without wrapping
737777 printing: Properly initialize auth_info in gtkprintbackend.c
Teach GtkExpander:resize-toplevel about height-for-width
Fix setting GtkRadioButton:group from .ui files
Improve sheet drawing in the print dialog
Avoid missing icons in the print dialog
GtkStackSwitcher: Fix initially active button
* Translation updates:
Assamese
Brazilian Portuguese
Czech
French
German
Korean
Lithuanian
Norwegian bokmål
Russian
Overview of Changes in GTK+ 3.14.0 to 3.14.1
============================================
+1 -1
View File
@@ -166,7 +166,7 @@ Please refer to the following GNOME Live! page for a more detailed ouline
on the process of building the GTK+ stack and its dependencies with Visual
C++:
https://live.gnome.org/GTK%2B/Win32/MSVCCompilationOfGTKStack
https://wiki.gnome.org/Projects/GTK+/Win32/MSVCCompilationOfGTKStack
Alternative 1 also generates Microsoft import libraries (.lib), if you
have lib.exe available. It might also work for cross-compilation from
+8 -3
View File
@@ -5,7 +5,7 @@ the use of the library.
A more detailed outline for instructions on building the GTK+ with Visual
C++ can be found in the following GNOME Live! page:
https://live.gnome.org/GTK%2B/Win32/MSVCCompilationOfGTKStack
https://wiki.gnome.org/Projects/GTK+/Win32/MSVCCompilationOfGTKStack
This VS10 solution and the projects it includes are intented to be used
in a GTK+ source tree unpacked from a tarball. In a git checkout you
@@ -59,9 +59,9 @@ The recommended build order for these dependencies:
as described in the README.txt file in the build/win32/vs10 folder)
-zlib
-libpng
-(for GDK-Pixbuf, if not using GDI+) IJG JPEG
-(for GDK-Pixbuf, if not using GDI+) IJG JPEG or libjpeg-turbo
-(for GDK-Pixbuf, if not using GDI+) libtiff
[libtiff requires zlib and IJG JPEG]
[libtiff requires zlib and IJG JPEG or libjpeg-turbo]
-(for GDK-Pixbuf, if not using GDI+) jasper [jpeg-2000 library]
-(optional for GLib) PCRE (version 8.12 or later, use of CMake to
build PCRE is recommended-see build/win32/vs10/README.txt of GLib)
@@ -81,6 +81,11 @@ built DLLs go into <root>\vs10\<PlatformName>\bin, built LIBs into
project files higher in the stack are supposed to look for them, not
from a specific GLib source tree.
Please note, as GTK+ uses the Adwaita theme for all platforms by default,
most icons used are not included with GTK+ (which *are* needed), so please see
https://live.gnome.org/GTK%2B/Win32/MSVCCompilationOfGTKStack (under the
GTK+ section) on how to get those icons set up for use with GTK+.
*About the dependencies marked with *: These dependencies are optional
as those are not compulsory components for building and running GTK+
itself, but note that they are needed for people running and building
+5 -5
View File
@@ -75,7 +75,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\gdk;..\..\..\gdk\broadway;..\crypt;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\..\gdk;..\..\..\gdk\broadway;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;$(GdkDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -95,7 +95,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>..\..\..\gdk;..\..\..\gdk\broadway;..\crypt;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\..\gdk;..\..\..\gdk\broadway;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>$(GdkDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -120,7 +120,7 @@
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\gdk;..\..\..\gdk\broadway;..\crypt;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\..\gdk;..\..\..\gdk\broadway;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;$(GdkDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -143,7 +143,7 @@
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>..\..\..\gdk;..\..\..\gdk\broadway;..\crypt;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\..\gdk;..\..\..\gdk\broadway;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>$(GdkDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -163,8 +163,8 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\crypt\crypt3.c" />
<ClCompile Include="..\..\..\gdk\broadway\broadwayd.c" />
<ClCompile Include="..\..\..\gdk\broadway\broadway-buffer.c" />
<ClCompile Include="..\..\..\gdk\broadway\broadway-output.c" />
<ClCompile Include="..\..\..\gdk\broadway\broadway-server.c" />
</ItemGroup>
+1 -1
View File
@@ -15,8 +15,8 @@
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\crypt\crypt3.c"><Filter>Sources</Filter></ClCompile>
<ClCompile Include="..\..\..\gdk\broadway\broadwayd.c"><Filter>Sources</Filter></ClCompile>
<ClCompile Include="..\..\..\gdk\broadway\broadway-buffer.c"><Filter>Sources</Filter></ClCompile>
<ClCompile Include="..\..\..\gdk\broadway\broadway-output.c"><Filter>Sources</Filter></ClCompile>
<ClCompile Include="..\..\..\gdk\broadway\broadway-server.c"><Filter>Sources</Filter></ClCompile>
</ItemGroup>
+4
View File
@@ -89,6 +89,7 @@
<AdditionalDependencies>atk-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<ModuleDefinitionFile>..\..\..\libgail-util\gailutil.def</ModuleDefinitionFile>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<SubSystem>Windows</SubSystem>
@@ -113,6 +114,7 @@
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ModuleDefinitionFile>..\..\..\libgail-util\gailutil.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
@@ -135,6 +137,7 @@
<AdditionalDependencies>atk-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<ModuleDefinitionFile>..\..\..\libgail-util\gailutil.def</ModuleDefinitionFile>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<SubSystem>Windows</SubSystem>
@@ -158,6 +161,7 @@
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ModuleDefinitionFile>..\..\..\libgail-util\gailutil.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
+8
View File
@@ -147,6 +147,7 @@
<AdditionalDependencies>imm32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
@@ -169,6 +170,7 @@
<AdditionalDependencies>imm32.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
@@ -188,6 +190,7 @@
<AdditionalDependencies>imm32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
@@ -209,6 +212,7 @@
<AdditionalDependencies>imm32.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
@@ -233,6 +237,7 @@
<AdditionalDependencies>imm32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
@@ -255,6 +260,7 @@
<AdditionalDependencies>imm32.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
@@ -274,6 +280,7 @@
<AdditionalDependencies>imm32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
@@ -295,6 +302,7 @@
<AdditionalDependencies>imm32.lib;winmm.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
+2
View File
@@ -21,6 +21,8 @@
<AdditionalIncludeDirectories>..\..\..;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\include;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>HAVE_CONFIG_H;G_DISABLE_SINGLE_INCLUDES;ATK_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ForcedIncludeFiles>msvc_recommended_pragmas.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalOptions>/d2Zi+ %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<AdditionalDependencies>pangocairo-1.0.lib;cairo.lib;cairo-gobject.lib;pango-1.0.lib;gdk_pixbuf-2.0.lib;gio-2.0.lib;gmodule-2.0.lib;gobject-2.0.lib;glib-2.0.lib;intl.lib;%(AdditionalDependencies)</AdditionalDependencies>
+1 -1
View File
@@ -9,7 +9,7 @@
<ItemDefinitionGroup>
<Link>
<AdditionalOptions>/EXPORT:gdk_win32_display_manager_get_type</AdditionalOptions>
</Link
</Link>
<PostBuildEvent>
<Command>
if "$(Configuration)" == "Release" goto END
+2 -2
View File
@@ -33,7 +33,7 @@ echo $(Configuration) &gt; ..\..\..\MSVC_$(Configuration)
:DONE_GDKCONFIG_H
</GenGdkConfigHWin32>
<GenGdkConfigHBroadway>
if exist ..\..\..\MSVC_$(Configuration) goto DONE_GDKCONFIG_H
if exist ..\..\..\MSVC_$(Configuration)_Broadway goto DONE_GDKCONFIG_H
if exist ..\..\..\gdk\gdkconfig.h del ..\..\..\gdk\gdkconfig.h
@@ -53,7 +53,7 @@ copy ..\..\..\gdk\gdkconfig.h.win32_broadway ..\..\..\gdk\gdkconfig.h
copy ..\..\..\gdk\gdkconfig.h.win32_broadway ..\..\..\GDK_BROADWAY_BUILD
echo $(Configuration) &gt; ..\..\..\MSVC_$(Configuration)
echo $(Configuration) &gt; ..\..\..\MSVC_$(Configuration)_Broadway
:DONE_GDKCONFIG_H
</GenGdkConfigHBroadway>
+60 -16
View File
@@ -11,26 +11,69 @@
<GtkDoInstallBin>
mkdir $(CopyDir)\bin
mkdir $(CopyDir)\lib
copy "$(BinDir)\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gdk$(GtkDllSuffix).pdb" $(CopyDir)\bin
copy "$(BinDir)\gdk-$(ApiVersion).lib" $(CopyDir)\lib
if "$(Configuration)" == "Release_Broadway" goto DO_BROADWAY_BIN
if "$(Configuration)" == "Debug_Broadway" goto DO_BROADWAY_BIN
copy "$(BinDir)\*.dll" $(CopyDir)\bin
copy "$(BinDir)\*-$(ApiVersion).lib" $(CopyDir)\lib
copy "$(BinDir)\*.exe" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gtk$(GtkDllSuffix).pdb" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gailutil$(GtkDllSuffix).dll" $(CopyDir)\bin
copy "$(BinDir)\$(GtkDllPrefix)gailutil$(GtkDllSuffix).pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-$(ApiVersion).lib" $(CopyDir)\lib
copy "$(BinDir)\gailutil-$(ApiVersion).lib" $(CopyDir)\lib
copy "$(BinDir)\gtk3-demo.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk3-demo.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk3-demo-application.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk3-demo-application.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk3-icon-browser.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk3-icon-browser.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-encode-symbolic-svg.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-encode-symbolic-svg.pdb" $(CopyDir)\bin
goto DONE_BIN
:DO_BROADWAY_BIN
copy "$(BinDir)\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll" $(CopyDir)\bin
copy "$(BinDir)\gdk-$(ApiVersion).lib" $(CopyDir)\lib
copy "$(BinDir)\broadwayd.exe" $(CopyDir)\bin
if "$(Configuration)" == "Release_Broadway" copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll $(CopyDir)\bin
if "$(Configuration)" == "Release_Broadway" copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).dll $(CopyDir)\bin
if "$(Configuration)" == "Release_Broadway" copy .\Release\$(Platform)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib
if "$(Configuration)" == "Release_Broadway" copy .\Release\$(Platform)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib
if "$(Configuration)" == "Release_Broadway" copy .\Release\$(Platform)\bin\*.exe $(CopyDir)\bin
if "$(Configuration)" == "Debug_Broadway" copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll $(CopyDir)\bin
if "$(Configuration)" == "Debug_Broadway" copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).dll $(CopyDir)\bin
if "$(Configuration)" == "Debug_Broadway" copy .\Debug\$(Platform)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib
if "$(Configuration)" == "Debug_Broadway" copy .\Debug\$(Platform)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib
if "$(Configuration)" == "Debug_Broadway" copy .\Debug\$(Platform)\bin\*.exe $(CopyDir)\bin
copy "$(BinDir)\broadwayd.pdb" $(CopyDir)\bin
if "$(Configuration)" == "Release_Broadway" goto DO_BROADWAY_RELEASE
if "$(Configuration)" == "Debug_Broadway" goto DO_BROADWAY_DEBUG
:DO_BROADWAY_RELEASE
copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll $(CopyDir)\bin
copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).dll $(CopyDir)\bin
copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib
copy .\Release\$(Platform)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib
copy .\Release\$(Platform)\bin\gtk3-demo.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk3-demo.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk3-demo-application.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk3-demo-application.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk3-icon-browser.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin
goto DONE_BIN
:DO_BROADWAY_DEBUG
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).dll $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib
copy .\Debug\$(Platform)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib
copy .\Debug\$(Platform)\bin\gtk3-demo.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk3-demo.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk3-demo-application.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk3-demo-application.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk3-icon-browser.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin
:DONE_BIN
</GtkDoInstallBin>
<GtkDoInstall>
@@ -407,9 +450,10 @@ $(CopyDir)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas
<GtkDoInstallBroadwayHeaders>
copy ..\..\..\gdk\broadway\gdkbroadway.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\broadway
copy ..\..\..\gdk\broadway\gdkbroadwaywindow.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\broadway
copy ..\..\..\gdk\broadway\gdkbroadwaycursor.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\broadway
copy ..\..\..\gdk\broadway\gdkbroadwaydisplay.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\broadway
copy ..\..\..\gdk\broadway\gdkbroadwayvisual.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\broadway
copy ..\..\..\gdk\broadway\gdkbroadwaywindow.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\broadway
</GtkDoInstallBroadwayHeaders>
</PropertyGroup>
<PropertyGroup>
+4
View File
@@ -89,6 +89,7 @@
<AdditionalDependencies>atk-1.0.lib;pangowin32-1.0.lib;imm32.lib;winspool.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
@@ -108,6 +109,7 @@
<AdditionalDependencies>atk-1.0.lib;pangowin32-1.0.lib;imm32.lib;winspool.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
@@ -132,6 +134,7 @@
<AdditionalDependencies>atk-1.0.lib;pangowin32-1.0.lib;imm32.lib;winspool.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(ProjectName)-$(ApiVersion).lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
@@ -151,6 +154,7 @@
<AdditionalDependencies>atk-1.0.lib;pangowin32-1.0.lib;imm32.lib;winspool.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
+8 -3
View File
@@ -5,7 +5,7 @@ the use of the library.
A more detailed outline for instructions on building the GTK+ with Visual
C++ can be found in the following GNOME Live! page:
https://live.gnome.org/GTK%2B/Win32/MSVCCompilationOfGTKStack
https://wiki.gnome.org/Projects/GTK+/Win32/MSVCCompilationOfGTKStack
This VS9 solution and the projects it includes are intented to be used
in a GTK+ source tree unpacked from a tarball. In a git checkout you
@@ -58,9 +58,9 @@ The recommended build order for these dependencies:
as described in the README.txt file in the build/win32/vs9 folder)
-zlib
-libpng
-(for GDK-Pixbuf, if not using GDI+) IJG JPEG
-(for GDK-Pixbuf, if not using GDI+) IJG JPEG or libjpeg-turbo
-(for GDK-Pixbuf, if not using GDI+) libtiff
[libtiff requires zlib and IJG JPEG]
[libtiff requires zlib and IJG JPEG or libjpeg-turbo]
-(for GDK-Pixbuf, if not using GDI+) jasper [jpeg-2000 library])
-(optional for GLib) PCRE (version 8.12 or later, use of CMake to
build PCRE is recommended-see build/win32/vs9/README.txt of GLib)
@@ -80,6 +80,11 @@ built DLLs go into <root>\vs9\<PlatformName>\bin, built LIBs into
project files higher in the stack are supposed to look for them, not
from a specific GLib source tree.
Please note, as GTK+ uses the Adwaita theme for all platforms by default,
most icons used are not included with GTK+ (which *are* needed), so please see
https://live.gnome.org/GTK%2B/Win32/MSVCCompilationOfGTKStack (under the
GTK+ section) on how to get those icons set up for use with GTK+.
*About the dependencies marked with *: These dependencies are optional
as those are not compulsory components for building and running GTK+
itself, but note that they are needed for people running and building
+5 -5
View File
@@ -31,7 +31,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\broadway;..\crypt"
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\broadway"
PreprocessorDefinitions="_DEBUG;$(GdkDefines)"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@@ -62,7 +62,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\broadway;..\crypt"
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\broadway"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions="$(GdkDefines)"
RuntimeLibrary="2"
@@ -95,7 +95,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\broadway;..\crypt"
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\broadway"
PreprocessorDefinitions="_DEBUG;$(GdkDefines)"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@@ -127,7 +127,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\broadway;..\crypt"
AdditionalIncludeDirectories="..\..\..\gdk;..\..\..\gdk\broadway"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions="$(GdkDefines)"
RuntimeLibrary="2"
@@ -157,8 +157,8 @@
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
</Filter>
<File RelativePath="..\crypt\crypt3.c" />
<File RelativePath="..\..\..\gdk\broadway\broadwayd.c" />
<File RelativePath="..\..\..\gdk\broadway\broadway-buffer.c" />
<File RelativePath="..\..\..\gdk\broadway\broadway-output.c" />
<File RelativePath="..\..\..\gdk\broadway\broadway-server.c" />
<Filter
@@ -12,6 +12,7 @@
AdditionalIncludeDirectories="..\..\..;$(GlibEtcInstallRoot)\lib\glib-2.0\include;$(GlibEtcInstallRoot)\include\glib-2.0;$(GlibEtcInstallRoot)\include;$(GlibEtcInstallRoot)\include\cairo;$(GlibEtcInstallRoot)\include\atk-1.0;$(GlibEtcInstallRoot)\include\pango-1.0;$(GlibEtcInstallRoot)\include\gdk-pixbuf-2.0"
PreprocessorDefinitions="HAVE_CONFIG_H;G_DISABLE_SINGLE_INCLUDES;ATK_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES"
ForcedIncludeFiles="msvc_recommended_pragmas.h"
AdditionalOptions="/MP"
/>
<Tool
Name="VCLinkerTool"
+2 -2
View File
@@ -36,7 +36,7 @@ echo $(ConfigurationName) &gt; ..\..\..\MSVC_$(ConfigurationName)&#x0D;&#x0A;
<UserMacro
Name="GenGdkConfigHBroadway"
Value="
if exist ..\..\..\MSVC_$(ConfigurationName) goto DONE_GDKCONFIG_H&#x0D;&#x0A;
if exist ..\..\..\MSVC_$(ConfigurationName)_Broadway goto DONE_GDKCONFIG_H&#x0D;&#x0A;
if exist ..\..\..\gdk\gdkconfig.h del ..\..\..\gdk\gdkconfig.h&#x0D;&#x0A;
if exist ..\..\..\GDK_WIN32ONLY_BUILD del ..\..\..\GDK_WIN32ONLY_BUILD&#x0D;&#x0A;
@@ -50,7 +50,7 @@ if &quot;$(ConfigurationName)&quot; == &quot;Debug_Broadway&quot; del ..\..\..\M
copy ..\..\..\gdk\gdkconfig.h.win32_broadway ..\..\..\gdk\gdkconfig.h&#x0D;&#x0A;
copy ..\..\..\gdk\gdkconfig.h.win32_broadway ..\..\..\GDK_BROADWAY_BUILD&#x0D;&#x0A;
echo $(ConfigurationName) &gt; ..\..\..\MSVC_$(ConfigurationName)&#x0D;&#x0A;
echo $(ConfigurationName) &gt; ..\..\..\MSVC_$(ConfigurationName)_Broadway&#x0D;&#x0A;
:DONE_GDKCONFIG_H&#x0D;&#x0A;
"
/>
+54 -16
View File
@@ -10,26 +10,63 @@
Value="
mkdir $(CopyDir)\bin&#x0D;&#x0A;
mkdir $(CopyDir)\lib&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).pdb $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gdk-$(ApiVersion).lib $(CopyDir)\lib&#x0D;&#x0A;
if &quot;$(ConfigurationName)&quot; == &quot;Release_Broadway&quot; goto DO_BROADWAY_BIN&#x0D;&#x0A;
if &quot;$(ConfigurationName)&quot; == &quot;Debug_Broadway&quot; goto DO_BROADWAY_BIN&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\*.dll $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\*-$(ApiVersion).lib $(CopyDir)\lib&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\*.exe $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).pdb $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).dll $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).pdb $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk3-demo.exe $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk3-demo.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk3-demo-application.exe $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk3-demo-application.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk3-icon-browser.exe $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin&#x0D;&#x0A;
goto DONE_BIN&#x0D;&#x0A;
:DO_BROADWAY_BIN&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gdk-$(ApiVersion).lib $(CopyDir)\lib&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\broadwayd.exe $(CopyDir)\bin&#x0D;&#x0A;
if &quot;$(ConfigurationName)&quot; == &quot;Release_Broadway&quot; copy .\Release\$(PlatformName)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll $(CopyDir)\bin&#x0D;&#x0A;
if &quot;$(ConfigurationName)&quot; == &quot;Release_Broadway&quot; copy .\Release\$(PlatformName)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).dll $(CopyDir)\bin&#x0D;&#x0A;
if &quot;$(ConfigurationName)&quot; == &quot;Release_Broadway&quot; copy .\Release\$(PlatformName)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib&#x0D;&#x0A;
if &quot;$(ConfigurationName)&quot; == &quot;Release_Broadway&quot; copy .\Release\$(PlatformName)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib&#x0D;&#x0A;
if &quot;$(ConfigurationName)&quot; == &quot;Release_Broadway&quot; copy .\Release\$(PlatformName)\bin\*.exe $(CopyDir)\bin&#x0D;&#x0A;
if &quot;$(ConfigurationName)&quot; == &quot;Debug_Broadway&quot; copy .\Debug\$(PlatformName)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll $(CopyDir)\bin&#x0D;&#x0A;
if &quot;$(ConfigurationName)&quot; == &quot;Debug_Broadway&quot; copy .\Debug\$(PlatformName)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).dll $(CopyDir)\bin&#x0D;&#x0A;
if &quot;$(ConfigurationName)&quot; == &quot;Debug_Broadway&quot; copy .\Debug\$(PlatformName)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib&#x0D;&#x0A;
if &quot;$(ConfigurationName)&quot; == &quot;Debug_Broadway&quot; copy .\Debug\$(PlatformName)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib&#x0D;&#x0A;
if &quot;$(ConfigurationName)&quot; == &quot;Debug_Broadway&quot; copy .\Debug\$(PlatformName)\bin\*.exe $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\broadwayd.pdb $(CopyDir)\bin&#x0D;&#x0A;
if &quot;$(ConfigurationName)&quot; == &quot;Release_Broadway&quot; goto DO_BROADWAY_RELEASE&#x0D;&#x0A;
if &quot;$(ConfigurationName)&quot; == &quot;Debug_Broadway&quot; goto DO_BROADWAY_DEBUG&#x0D;&#x0A;
:DO_BROADWAY_RELEASE&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).dll $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk3-demo.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk3-demo.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk3-demo-application.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk3-demo-application.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk3-icon-browser.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin&#x0D;&#x0A;
goto DONE_BIN&#x0D;&#x0A;
:DO_BROADWAY_DEBUG&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\$(GtkDllPrefix)gailutil$(GtkDllSuffix).dll $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk-$(ApiVersion).lib $(CopyDir)\lib&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gailutil-$(ApiVersion).lib $(CopyDir)\lib&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk3-demo.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk3-demo.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk3-demo-application.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk3-demo-application.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk3-icon-browser.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin&#x0D;&#x0A;
:DONE_BIN&#x0D;&#x0A;
"
/>
@@ -412,9 +449,10 @@ $(CopyDir)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas&#x0D;&
Value="
copy ..\..\..\gdk\broadway\gdkbroadway.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\broadway&#x0D;&#x0A;
copy ..\..\..\gdk\broadway\gdkbroadwaywindow.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\broadway&#x0D;&#x0A;
copy ..\..\..\gdk\broadway\gdkbroadwaycursor.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\broadway&#x0D;&#x0A;
copy ..\..\..\gdk\broadway\gdkbroadwaydisplay.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\broadway&#x0D;&#x0A;
copy ..\..\..\gdk\broadway\gdkbroadwayvisual.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\broadway&#x0D;&#x0A;
copy ..\..\..\gdk\broadway\gdkbroadwaywindow.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\broadway&#x0D;&#x0A;
"
/>
</VisualStudioPropertySheet>
+3 -8
View File
@@ -10,8 +10,8 @@
m4_define([gtk_major_version], [3])
m4_define([gtk_minor_version], [14])
m4_define([gtk_micro_version], [1])
m4_define([gtk_interface_age], [1])
m4_define([gtk_micro_version], [15])
m4_define([gtk_interface_age], [15])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
m4_define([gtk_version],
@@ -477,11 +477,6 @@ else
fi
fi
AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}",
[Define if debugging is enabled])
# Build time sanity check...
AM_SANITY_CHECK
@@ -1707,7 +1702,7 @@ if test "$enable_man" != no; then
dnl check for DocBook XSL stylesheets in the local catalog
JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
[DocBook XSL Stylesheets], [have_docbook_style=yes],[have_docbook_style=no])
if test "$have_docbook_dtd" != yes; then
if test "$have_docbook_style" != yes; then
if test "$enable_man" = yes ; then
AC_MSG_ERROR([DocBook XSL Stylesheets are required for --enable-man])
fi
+21 -4
View File
@@ -142,8 +142,11 @@ static void
add_item (GtkWidget *button, gpointer data)
{
Item foo;
GtkTreeIter iter;
GtkTreeModel *model = (GtkTreeModel *)data;
GtkTreeIter current, iter;
GtkTreePath *path;
GtkTreeModel *model;
GtkTreeViewColumn *column;
GtkTreeView *treeview = (GtkTreeView *)data;
g_return_if_fail (articles != NULL);
@@ -152,12 +155,26 @@ add_item (GtkWidget *button, gpointer data)
foo.yummy = 50;
g_array_append_vals (articles, &foo, 1);
gtk_list_store_append (GTK_LIST_STORE (model), &iter);
/* Insert a new row below the current one */
gtk_tree_view_get_cursor (treeview, &path, NULL);
model = gtk_tree_view_get_model (treeview);
gtk_tree_model_get_iter (model, &current, path);
gtk_tree_path_free (path);
/* Set the data for the new row */
gtk_list_store_insert_after (GTK_LIST_STORE (model), &iter, &current);
gtk_list_store_set (GTK_LIST_STORE (model), &iter,
COLUMN_ITEM_NUMBER, foo.number,
COLUMN_ITEM_PRODUCT, foo.product,
COLUMN_ITEM_YUMMY, foo.yummy,
-1);
/* Move focus to the new row */
path = gtk_tree_model_get_path (model, &iter);
column = gtk_tree_view_get_column (treeview, 0);
gtk_tree_view_set_cursor (treeview, path, column, FALSE);
gtk_tree_path_free (path);
}
static void
@@ -368,7 +385,7 @@ do_editable_cells (GtkWidget *do_widget)
button = gtk_button_new_with_label ("Add item");
g_signal_connect (button, "clicked",
G_CALLBACK (add_item), items_model);
G_CALLBACK (add_item), treeview);
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 0);
button = gtk_button_new_with_label ("Remove item");
+3 -4
View File
@@ -158,9 +158,8 @@ activate_run (GSimpleAction *action,
GtkTreeIter iter;
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
gtk_tree_selection_get_selected (selection, &model, &iter);
run_example_for_row (window, model, &iter);
if (gtk_tree_selection_get_selected (selection, &model, &iter))
run_example_for_row (window, model, &iter);
}
/* Stupid syntax highlighting.
@@ -543,7 +542,7 @@ add_data_tab (const gchar *demoname)
* not an image. Let's try something else then.
*/
g_object_ref_sink (widget);
gtk_widget_destroy (widget);
g_object_unref (widget);
bytes = g_resources_lookup_data (resource_name, 0, NULL);
g_assert (bytes);
+1
View File
@@ -1037,6 +1037,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
<object class="GtkFileChooserButton" id="filechooserbutton1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="local_only">False</property>
</object>
<packing>
<property name="expand">False</property>
+2
View File
@@ -152,6 +152,7 @@ content_files = \
windows.sgml \
x11.sgml \
gtk3-demo.xml \
gtk3-demo-application.xml \
gtk3-widget-factory.xml \
gtk3-icon-browser.xml \
gtk-query-immodules-3.0.xml \
@@ -339,6 +340,7 @@ man_MANS = \
gtk-encode-symbolic-svg.1 \
gtk-launch.1 \
gtk3-demo.1 \
gtk3-demo-application.1 \
gtk3-widget-factory.1 \
gtk3-icon-browser.1 \
broadwayd.1
+1 -1
View File
@@ -202,7 +202,7 @@ How to compile GTK+ itself
</listitem>
<listitem>
<para>
<ulink url="http://live.gnome.org/GObjectIntrospection">Gobject Introspection</ulink>
<ulink url="https://wiki.gnome.org/Projects/GObjectIntrospection">Gobject Introspection</ulink>
is a framework for making introspection data available to
language bindings. It is available
<ulink url="http://download.gnome.org/sources/gobject-introspection/">here</ulink>.
+1
View File
@@ -394,6 +394,7 @@
<part>
<title>GTK+ Tools</title>
<xi:include href="gtk3-demo.xml" />
<xi:include href="gtk3-demo-application.xml" />
<xi:include href="gtk3-widget-factory.xml" />
<xi:include href="gtk3-icon-browser.xml" />
<xi:include href="gtk-query-immodules-3.0.xml" />
@@ -0,0 +1,44 @@
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
]>
<refentry id="gtk3-demo-application">
<refentryinfo>
<title>gtk3-demo-application</title>
<productname>GTK+</productname>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Matthias</firstname>
<surname>Clasen</surname>
</author>
</authorgroup>
</refentryinfo>
<refmeta>
<refentrytitle>gtk3-demo-application</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="manual">User Commands</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gtk3-demo-application</refname>
<refpurpose>Demonstrate GtkApplication</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>gtk3-demo-application</command>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1><title>Description</title>
<para>
<command>gtk3-demo-application</command> is an example application
used by <command>gtk3-demo</command>. There is no need to call it
manually.
</para>
</refsect1>
</refentry>
+4 -1
View File
@@ -3810,6 +3810,8 @@ gtk_text_tag_table_get_type
<FILE>gtktextview</FILE>
<TITLE>GtkTextView</TITLE>
GtkTextView
GtkTextViewClass
GtkTextViewLayer
GtkTextWindowType
GtkWrapMode
gtk_text_view_new
@@ -3827,7 +3829,7 @@ gtk_text_view_get_visible_rect
gtk_text_view_get_iter_location
gtk_text_view_get_cursor_locations
gtk_text_view_get_line_at_y
gtk_text_view_get_line_yrange
/gtk_text_view_get_line_yrange
gtk_text_view_get_iter_at_location
gtk_text_view_get_iter_at_position
gtk_text_view_buffer_to_window_coords
@@ -6507,6 +6509,7 @@ gtk_drag_unhighlight
<SUBSECTION Source Side>
gtk_drag_begin
gtk_drag_begin_with_coordinates
gtk_drag_cancel
gtk_drag_set_icon_widget
gtk_drag_set_icon_pixbuf
gtk_drag_set_icon_stock
+1 -1
View File
@@ -31,7 +31,7 @@ or environment variables.
<para>
For up-to-date information about the current status of this port, see the
<ulink url="http://live.gnome.org/GTK+/OSX">project page</ulink>.
<ulink url="https://wiki.gnome.org/Projects/GTK+/OSX">project page</ulink>.
</para>
</refsect1>
+1 -1
View File
@@ -110,7 +110,7 @@ in 256 color mode.
<para>
More information about GTK+ on Windows, including detailed build
instructions, binary downloads, etc, can be found
<ulink url="http://live.gnome.org/GTK+/Win32">online</ulink>.
<ulink url="https://wiki.gnome.org/Projects/GTK+/Win32">online</ulink>.
</para>
</refsect1>
+20 -6
View File
@@ -819,19 +819,33 @@ map_named_shm (char *name, gsize size)
int fd;
void *ptr;
char *filename = NULL;
fd = shm_open(name, O_RDONLY, 0600);
fd = shm_open (name, O_RDONLY, 0600);
if (fd == -1)
{
perror ("Failed to shm_open");
return NULL;
filename = g_build_filename (g_get_tmp_dir (), name, NULL);
fd = open (filename, O_RDONLY);
if (fd == -1)
{
perror ("Failed to map shm");
g_free (filename);
return NULL;
}
}
ptr = mmap(0, size, PROT_READ, MAP_SHARED, fd, 0);
ptr = mmap (0, size, PROT_READ, MAP_SHARED, fd, 0);
(void) close(fd);
(void) close (fd);
shm_unlink (name);
if (filename)
{
unlink (filename);
g_free (filename);
}
else
shm_unlink (name);
return ptr;
+4 -3
View File
@@ -452,10 +452,11 @@ main (int argc, char *argv[])
if (display == NULL)
{
#ifdef G_OS_UNIX
display = ":0";
#else
display = ":tcp";
if (g_unix_socket_address_abstract_names_supported ())
display = ":0";
else
#endif
display = ":tcp";
}
if (g_str_has_prefix (display, ":tcp"))
+42 -14
View File
@@ -110,10 +110,11 @@ _gdk_broadway_server_new (const char *display, GError **error)
if (display == NULL)
{
#ifdef G_OS_UNIX
display = ":0";
#else
display = ":tcp";
if (g_unix_socket_address_abstract_names_supported ())
display = ":0";
else
#endif
display = ":tcp";
}
if (g_str_has_prefix (display, ":tcp"))
@@ -523,10 +524,11 @@ _gdk_broadway_server_window_set_transient_for (GdkBroadwayServer *server,
}
static void *
map_named_shm (char *name, gsize size)
map_named_shm (char *name, gsize size, gboolean *is_shm)
{
#ifdef G_OS_UNIX
char *filename = NULL;
int fd;
void *ptr;
int res;
@@ -534,23 +536,40 @@ map_named_shm (char *name, gsize size)
fd = shm_open(name, O_RDWR|O_CREAT|O_EXCL, 0600);
if (fd == -1)
{
if (errno != EEXIST)
g_error ("Unable to allocate shared mem for window");
return NULL;
if (errno == EEXIST)
return NULL;
filename = g_build_filename (g_get_tmp_dir (), name, NULL);
fd = open (filename, O_RDWR | O_CREAT | O_EXCL, 0600);
g_free (filename);
if (fd == -1)
{
if (errno != EEXIST)
g_error ("Unable to allocate shared mem for window");
return NULL;
}
else
*is_shm = FALSE;
}
else
*is_shm = TRUE;
res = ftruncate (fd, size);
g_assert (res != -1);
#ifdef HAVE_POSIX_FALLOCATE
res = posix_fallocate (fd, 0, size);
if (res != 0)
if (res != 0 && errno == ENOSPC)
{
shm_unlink (name);
if (filename)
unlink (filename);
else
shm_unlink (name);
g_error ("Not enough shared memory for window surface");
}
#endif
ptr = mmap(0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
(void) close(fd);
@@ -578,6 +597,7 @@ map_named_shm (char *name, gsize size)
return NULL;
}
*is_shm = TRUE;
res = ftruncate (fd, size);
g_assert (res != -1);
@@ -613,7 +633,7 @@ make_valid_fs_char (char c)
/* name must have at least space for 34 bytes */
static gpointer
create_random_shm (char *name, gsize size)
create_random_shm (char *name, gsize size, gboolean *is_shm)
{
guint32 r;
int i, o;
@@ -637,7 +657,7 @@ create_random_shm (char *name, gsize size)
}
name[o++] = 0;
ptr = map_named_shm (name, size);
ptr = map_named_shm (name, size, is_shm);
if (ptr)
return ptr;
}
@@ -649,6 +669,7 @@ typedef struct {
char name[36];
void *data;
gsize data_size;
gboolean is_shm;
} BroadwayShmSurfaceData;
static void
@@ -659,7 +680,14 @@ shm_data_destroy (void *_data)
#ifdef G_OS_UNIX
munmap (data->data, data->data_size);
shm_unlink (data->name);
if (data->is_shm)
shm_unlink (data->name);
else
{
char *filename = g_build_filename (g_get_tmp_dir (), data->name, NULL);
unlink (filename);
g_free (filename);
}
#elif defined(G_OS_WIN32)
@@ -688,7 +716,7 @@ _gdk_broadway_server_create_surface (int width,
data = g_new (BroadwayShmSurfaceData, 1);
data->data_size = width * height * sizeof (guint32);
data->data = create_random_shm (data->name, data->data_size);
data->data = create_random_shm (data->name, data->data_size, &data->is_shm);
surface = cairo_image_surface_create_for_data ((guchar *)data->data,
CAIRO_FORMAT_ARGB32, width, height, width * sizeof (guint32));
+3 -3
View File
@@ -15,8 +15,8 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GDK_EVENT_SOURCE_H__
#define __GDK_EVENT_SOURCE_H__
#ifndef __GDK_BROADWAY_EVENT_SOURCE_H__
#define __GDK_BROADWAY_EVENT_SOURCE_H__
#include "gdkprivate-broadway.h"
@@ -29,4 +29,4 @@ GSource * _gdk_broadway_event_source_new (GdkDisplay *display);
G_END_DECLS
#endif /* __GDK_EVENT_SOURCE_H__ */
#endif /* __GDK_BROADWAY_EVENT_SOURCE_H__ */
+8 -3
View File
@@ -1,17 +1,22 @@
#!/usr/bin/perl -w
my $ARRAYNAME = $ARGV[0];
print "static const char $ARRAYNAME\[\] = \"";
my $first = 0;
print "static const char $ARRAYNAME\[\] = {";
for ($i = 1; $i <= $#ARGV; $i = $i + 1) {
my $FILENAME = $ARGV[$i];
open FILE, $FILENAME or die "Cannot open $FILENAME";
while (my $line = <FILE>) {
foreach my $c (split //, $line) {
printf ("\\x%02x", ord ($c));
if ($first == 1) {
printf (",\n");
}
printf ("0x%02x", ord ($c));
$first = 1;
}
}
}
print "\";\n";
print "};\n";
+7 -7
View File
@@ -61,24 +61,24 @@ struct _GdkColor
#define GDK_TYPE_COLOR (gdk_color_get_type ())
GDK_DEPRECATED_IN_3_14
GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_get_type)
GType gdk_color_get_type (void) G_GNUC_CONST;
GDK_DEPRECATED_IN_3_14
GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_copy)
GdkColor *gdk_color_copy (const GdkColor *color);
GDK_DEPRECATED_IN_3_14
GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_free)
void gdk_color_free (GdkColor *color);
GDK_DEPRECATED_IN_3_14
GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_hash)
guint gdk_color_hash (const GdkColor *color);
GDK_DEPRECATED_IN_3_14
GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_equal)
gboolean gdk_color_equal (const GdkColor *colora,
const GdkColor *colorb);
GDK_DEPRECATED_IN_3_14
GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_parse)
gboolean gdk_color_parse (const gchar *spec,
GdkColor *color);
GDK_DEPRECATED_IN_3_14
GDK_DEPRECATED_IN_3_14_FOR(gdk_rgba_to_string)
gchar * gdk_color_to_string (const GdkColor *color);
+4 -1
View File
@@ -185,6 +185,9 @@ gdk_cairo_surface_paint_pixbuf (cairo_surface_t *surface,
int n_channels;
int j;
if (cairo_surface_status (surface) != CAIRO_STATUS_SUCCESS)
return;
/* This function can't just copy any pixbuf to any surface, be
* sure to read the invariants here before calling it */
@@ -285,7 +288,7 @@ gdk_cairo_surface_create_from_pixbuf (const GdkPixbuf *pixbuf,
cairo_surface_t *surface;
g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL);
g_return_val_if_fail (scale > 0, NULL);
g_return_val_if_fail (scale >= 0, NULL);
g_return_val_if_fail (for_window == NULL || GDK_IS_WINDOW (for_window), NULL);
if (gdk_pixbuf_get_n_channels (pixbuf) == 3)
+3 -3
View File
@@ -1,11 +1,11 @@
/*** BEGIN file-header ***/
#ifndef __GDK_ENUM_TYPES_H__
#define __GDK_ENUM_TYPES_H__
#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
#error "Only <gdk/gdk.h> can be included directly."
#endif
#ifndef __GDK_ENUM_TYPES_H__
#define __GDK_ENUM_TYPES_H__
#include <glib-object.h>
#include <gdk/gdkversionmacros.h>
+3 -3
View File
@@ -22,13 +22,13 @@
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#ifndef __GDK_FRAME_CLOCK_H__
#define __GDK_FRAME_CLOCK_H__
#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
#error "Only <gdk/gdk.h> can be included directly."
#endif
#ifndef __GDK_FRAME_CLOCK_H__
#define __GDK_FRAME_CLOCK_H__
#include <gdk/gdkframetimings.h>
G_BEGIN_DECLS
+3 -3
View File
@@ -15,13 +15,13 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GDK_FRAME_TIMINGS_H__
#define __GDK_FRAME_TIMINGS_H__
#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
#error "Only <gdk/gdk.h> can be included directly."
#endif
#ifndef __GDK_FRAME_TIMINGS_H__
#define __GDK_FRAME_TIMINGS_H__
#include <glib-object.h>
#include <gdk/gdkversionmacros.h>
+1
View File
@@ -240,6 +240,7 @@ struct _GdkWindow
guint in_update : 1;
guint geometry_dirty : 1;
guint event_compression : 1;
guint frame_clock_events_paused : 1;
/* The GdkWindow that has the impl, ref:ed if another window.
* This ref is required to keep the wrapper of the impl window alive
+7 -1
View File
@@ -676,6 +676,12 @@ gdk_offscreen_window_set_opacity (GdkWindow *window, gdouble opacity)
{
}
static gboolean
gdk_offscreen_window_beep (GdkWindow *window)
{
return FALSE;
}
static void
gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass)
{
@@ -709,7 +715,7 @@ gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass)
impl_class->destroy_foreign = NULL;
impl_class->get_shape = NULL;
impl_class->get_input_shape = NULL;
impl_class->beep = NULL;
impl_class->beep = gdk_offscreen_window_beep;
impl_class->focus = NULL;
impl_class->set_type_hint = NULL;
+26 -9
View File
@@ -2864,6 +2864,8 @@ gdk_window_end_paint (GdkWindow *window)
cairo_destroy (cr);
cairo_region_destroy (full_clip);
cairo_surface_flush (surface);
}
gdk_window_free_current_paint (window);
@@ -3042,7 +3044,7 @@ _gdk_window_ref_cairo_surface (GdkWindow *window)
* Creates a Cairo context for drawing to @window.
*
* Note that calling cairo_reset_clip() on the resulting #cairo_t will
* produce undefined results, so avoid it at all costs.
*rproduce undefined results, so avoid it at all costs.
*
* Returns: A newly created Cairo context. Free with
* cairo_destroy() when you are done drawing.
@@ -3063,11 +3065,15 @@ gdk_cairo_create (GdkWindow *window)
cr = cairo_create (surface);
if (window->impl_window->current_paint.region != NULL)
region = cairo_region_copy (window->impl_window->current_paint.region);
{
region = cairo_region_copy (window->impl_window->current_paint.region);
cairo_region_translate (region, -window->abs_x, -window->abs_y);
}
else
region = cairo_region_copy (window->clip_region);
{
region = cairo_region_copy (window->clip_region);
}
cairo_region_translate (region, -window->abs_x, -window->abs_y);
gdk_cairo_region (cr, region);
cairo_region_destroy (region);
cairo_clip (cr);
@@ -3623,10 +3629,10 @@ gdk_window_process_updates (GdkWindow *window,
{
g_return_if_fail (GDK_IS_WINDOW (window));
return gdk_window_process_updates_with_mode (window,
update_children ?
PROCESS_UPDATES_WITH_ALL_CHILDREN :
PROCESS_UPDATES_NO_RECURSE);
gdk_window_process_updates_with_mode (window,
update_children ?
PROCESS_UPDATES_WITH_ALL_CHILDREN :
PROCESS_UPDATES_NO_RECURSE);
}
static void
@@ -4361,6 +4367,8 @@ gdk_window_get_device_position_double (GdkWindow *window,
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
g_return_val_if_fail (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD, NULL);
tmp_x = tmp_y = 0;
tmp_mask = 0;
normal_child = GDK_WINDOW_IMPL_GET_CLASS (window->impl)->get_device_state (window,
device,
&tmp_x, &tmp_y,
@@ -9422,6 +9430,8 @@ gdk_window_set_geometry_hints (GdkWindow *window,
const GdkGeometry *geometry,
GdkWindowHints geom_mask)
{
g_return_if_fail (geometry != NULL || geom_mask == 0);
GDK_WINDOW_IMPL_GET_CLASS (window->impl)->set_geometry_hints (window, geometry, geom_mask);
}
@@ -10599,6 +10609,8 @@ gdk_window_flush_events (GdkFrameClock *clock,
_gdk_display_pause_events (display);
gdk_frame_clock_request_phase (clock, GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS);
window->frame_clock_events_paused = TRUE;
}
static void
@@ -10625,6 +10637,8 @@ gdk_window_resume_events (GdkFrameClock *clock,
display = gdk_window_get_display (window);
_gdk_display_unpause_events (display);
window->frame_clock_events_paused = FALSE;
}
static void
@@ -10657,6 +10671,9 @@ gdk_window_set_frame_clock (GdkWindow *window,
if (window->frame_clock)
{
if (window->frame_clock_events_paused)
gdk_window_resume_events (window->frame_clock, G_OBJECT (window));
g_signal_handlers_disconnect_by_func (G_OBJECT (window->frame_clock),
G_CALLBACK (gdk_window_flush_events),
window);
@@ -10766,7 +10783,7 @@ gdk_window_set_opaque_region (GdkWindow *window,
impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
if (impl_class->set_opaque_region)
return impl_class->set_opaque_region (window, region);
impl_class->set_opaque_region (window, region);
}
/**
+4
View File
@@ -654,6 +654,8 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
_gdk_quartz_drag_source_context = NULL;
}
#ifdef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
- (void)setStyleMask:(NSUInteger)styleMask
{
gboolean was_fullscreen;
@@ -669,4 +671,6 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
_gdk_quartz_window_update_fullscreen_state ([[self contentView] gdkWindow]);
}
#endif
@end
+3
View File
@@ -42,7 +42,10 @@
-(BOOL)trackManualResize;
-(void)showAndMakeKey:(BOOL)makeKey;
-(void)hide;
#ifdef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
-(void)setStyleMask:(NSUInteger)styleMask;
#endif
@end
+10 -9
View File
@@ -44,12 +44,6 @@ static GSList *main_window_stack;
void _gdk_quartz_window_flush (GdkWindowImplQuartz *window_impl);
#ifndef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
static FullscreenSavedGeometry *get_fullscreen_geometry (GdkWindow *window);
#endif
#define FULLSCREEN_DATA "fullscreen-data"
typedef struct
{
gint x, y;
@@ -58,6 +52,12 @@ typedef struct
} FullscreenSavedGeometry;
#ifndef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
static FullscreenSavedGeometry *get_fullscreen_geometry (GdkWindow *window);
#endif
#define FULLSCREEN_DATA "fullscreen-data"
static void update_toplevel_order (void);
static void clear_toplevel_order (void);
@@ -873,7 +873,7 @@ _gdk_quartz_display_create_window_impl (GdkDisplay *display,
impl->view = NULL;
switch (attributes->window_type)
switch (window->window_type)
{
case GDK_WINDOW_TOPLEVEL:
case GDK_WINDOW_TEMP:
@@ -901,8 +901,9 @@ _gdk_quartz_display_create_window_impl (GdkDisplay *display,
window->width,
window->height);
if (attributes->window_type == GDK_WINDOW_TEMP ||
attributes->type_hint == GDK_WINDOW_TYPE_HINT_SPLASHSCREEN)
if (window->window_type == GDK_WINDOW_TEMP ||
((attributes_mask & GDK_WA_TYPE_HINT) &&
attributes->type_hint == GDK_WINDOW_TYPE_HINT_SPLASHSCREEN))
{
style_mask = NSBorderlessWindowMask;
}
+9 -2
View File
@@ -171,7 +171,7 @@ gdk_registry_handle_global(void *data, struct wl_registry *registry, uint32_t id
wl_registry_bind(display_wayland->wl_registry, id, &wl_output_interface, MIN (version, 2));
_gdk_wayland_screen_add_output(display_wayland->screen, id, output, MIN (version, 2));
} else if (strcmp(interface, "wl_seat") == 0) {
seat = wl_registry_bind(display_wayland->wl_registry, id, &wl_seat_interface, 4);
seat = wl_registry_bind(display_wayland->wl_registry, id, &wl_seat_interface, MIN (version, 4));
_gdk_wayland_device_manager_add_seat (gdk_display->device_manager, id, seat);
} else if (strcmp(interface, "wl_data_device_manager") == 0) {
display_wayland->data_device_manager =
@@ -216,6 +216,13 @@ _gdk_wayland_display_open (const gchar *display_name)
GdkDisplay *display;
GdkWaylandDisplay *display_wayland;
/* If this variable is unset then wayland initialisation will surely
* fail, logging a fatal error in the process. Save ourselves from
* that.
*/
if (g_getenv ("XDG_RUNTIME_DIR") == NULL)
return NULL;
wl_log_set_handler_client(log_handler);
wl_display = wl_display_connect(display_name);
@@ -348,7 +355,7 @@ gdk_wayland_display_get_default_group (GdkDisplay *display)
static gboolean
gdk_wayland_display_supports_selection_notification (GdkDisplay *display)
{
return TRUE;
return FALSE;
}
static gboolean
+1 -1
View File
@@ -494,7 +494,7 @@ gdk_wayland_drag_context_undo_grab (GdkDragContext *context)
event->button.button = button;
event->button.time = GDK_CURRENT_TIME;
event->button.x = event->button.x_root = x;
event->button.y = event->button.x_root = y;
event->button.y = event->button.y_root = y;
}
else
return;
+98 -18
View File
@@ -20,6 +20,7 @@
#include <fcntl.h>
#include <gio/gunixinputstream.h>
#include <gio/gunixoutputstream.h>
#include <glib-unix.h>
#include "gdkwayland.h"
@@ -33,6 +34,7 @@
typedef struct _SelectionBuffer SelectionBuffer;
typedef struct _StoredSelection StoredSelection;
typedef struct _AsyncWriteData AsyncWriteData;
struct _SelectionBuffer
{
@@ -48,6 +50,7 @@ struct _SelectionBuffer
struct _StoredSelection
{
GdkWindow *source;
GCancellable *cancellable;
guchar *data;
gsize data_len;
GdkAtom type;
@@ -60,6 +63,12 @@ struct _DataSourceData
GdkAtom selection;
};
struct _AsyncWriteData {
GOutputStream *stream;
GdkWaylandSelection *selection;
gsize index;
};
enum {
ATOM_CLIPBOARD,
ATOM_DND
@@ -87,6 +96,7 @@ struct _GdkWaylandSelection
};
static void selection_buffer_read (SelectionBuffer *buffer);
static void async_write_data_write (AsyncWriteData *write_data);
static void
selection_buffer_notify (SelectionBuffer *buffer)
@@ -272,6 +282,12 @@ gdk_wayland_selection_free (GdkWaylandSelection *selection)
g_free (selection->stored_selection.data);
if (selection->stored_selection.cancellable)
{
g_cancellable_cancel (selection->stored_selection.cancellable);
g_object_unref (selection->stored_selection.cancellable);
}
if (selection->stored_selection.fd > 0)
close (selection->stored_selection.fd);
@@ -366,34 +382,91 @@ gdk_wayland_selection_emit_request (GdkWindow *window,
gdk_event_free (event);
}
static AsyncWriteData *
async_write_data_new (GdkWaylandSelection *selection)
{
AsyncWriteData *write_data;
write_data = g_slice_new0 (AsyncWriteData);
write_data->selection = selection;
write_data->stream =
g_unix_output_stream_new (selection->stored_selection.fd, TRUE);
return write_data;
}
static void
async_write_data_free (AsyncWriteData *write_data)
{
g_object_unref (write_data->stream);
g_slice_free (AsyncWriteData, write_data);
}
static void
async_write_data_cb (GObject *object,
GAsyncResult *res,
gpointer user_data)
{
AsyncWriteData *write_data = user_data;
GError *error = NULL;
gsize bytes_written;
bytes_written = g_output_stream_write_finish (G_OUTPUT_STREAM (object),
res, &error);
if (error)
{
g_warning ("Error writing selection data: %s", error->message);
g_error_free (error);
async_write_data_free (write_data);
return;
}
write_data->index += bytes_written;
if (write_data->index <
write_data->selection->stored_selection.data_len)
{
/* Write the next chunk */
async_write_data_write (write_data);
}
else
async_write_data_free (write_data);
}
static void
async_write_data_write (AsyncWriteData *write_data)
{
GdkWaylandSelection *selection = write_data->selection;
gsize buf_len;
guchar *buf;
buf = selection->stored_selection.data;
buf_len = selection->stored_selection.data_len;
g_output_stream_write_async (write_data->stream,
&buf[write_data->index],
buf_len - write_data->index,
G_PRIORITY_DEFAULT,
selection->stored_selection.cancellable,
async_write_data_cb,
write_data);
}
static gboolean
gdk_wayland_selection_check_write (GdkWaylandSelection *selection)
{
gssize len, bytes_written = 0;
gchar *buf;
AsyncWriteData *write_data;
if (selection->stored_selection.fd < 0 ||
selection->stored_selection.data_len == 0)
return FALSE;
len = selection->stored_selection.data_len;
buf = (gchar *) selection->stored_selection.data;
while (len > 0)
{
bytes_written += write (selection->stored_selection.fd,
buf + bytes_written, len);
if (bytes_written < 0)
break;
len -= bytes_written;
}
close (selection->stored_selection.fd);
write_data = async_write_data_new (selection);
async_write_data_write (write_data);
selection->stored_selection.fd = -1;
return bytes_written != 0;
return TRUE;
}
void
@@ -435,10 +508,17 @@ gdk_wayland_selection_store (GdkWindow *window,
g_free (selection->stored_selection.data);
}
if (selection->stored_selection.cancellable)
{
g_cancellable_cancel (selection->stored_selection.cancellable);
g_object_unref (selection->stored_selection.cancellable);
}
selection->stored_selection.source = window;
selection->stored_selection.data_len = array->len;
selection->stored_selection.data = (guchar *) g_array_free (array, FALSE);
selection->stored_selection.type = type;
selection->stored_selection.cancellable = g_cancellable_new ();
gdk_wayland_selection_check_write (selection);
}
+7 -2
View File
@@ -1402,8 +1402,13 @@ gdk_window_wayland_input_shape_combine_region (GdkWindow *window,
return;
g_clear_pointer (&impl->input_region, cairo_region_destroy);
impl->input_region = cairo_region_copy (shape_region);
cairo_region_translate (impl->input_region, offset_x, offset_y);
if (shape_region)
{
impl->input_region = cairo_region_copy (shape_region);
cairo_region_translate (impl->input_region, offset_x, offset_y);
}
gdk_wayland_window_sync_input_region (window);
}
+4 -5
View File
@@ -371,6 +371,8 @@ void
_gdk_input_wintab_init_check (GdkDeviceManager *_device_manager)
{
GdkDeviceManagerWin32 *device_manager = (GdkDeviceManagerWin32 *)_device_manager;
GdkDisplay *display = gdk_device_manager_get_display (_device_manager);
GdkWindow *root = gdk_screen_get_root_window (gdk_display_get_default_screen (display));
static gboolean wintab_initialized = FALSE;
GdkDeviceWintab *device;
GdkWindowAttr wa;
@@ -459,7 +461,7 @@ _gdk_input_wintab_init_check (GdkDeviceManager *_device_manager)
wa.x = -100;
wa.y = -100;
wa.window_type = GDK_WINDOW_TOPLEVEL;
if ((wintab_window = gdk_window_new (NULL, &wa, GDK_WA_X|GDK_WA_Y)) == NULL)
if ((wintab_window = gdk_window_new (root, &wa, GDK_WA_X | GDK_WA_Y)) == NULL)
{
g_warning ("gdk_input_wintab_init: gdk_window_new failed");
return;
@@ -884,7 +886,6 @@ _gdk_input_other_event (GdkEvent *event,
GdkDeviceManagerWin32 *device_manager;
GdkDeviceWintab *source_device = NULL;
GdkDeviceGrabInfo *last_grab;
GdkDevice *device = NULL;
GdkEventMask masktest;
guint key_state;
POINT pt;
@@ -906,9 +907,7 @@ _gdk_input_other_event (GdkEvent *event,
}
device_manager = GDK_DEVICE_MANAGER_WIN32 (gdk_display_get_device_manager (_gdk_display));
device = gdk_event_get_device (event);
window = gdk_device_get_window_at_position (device, &x, &y);
window = gdk_device_get_window_at_position (device_manager->core_pointer, &x, &y);
if (window == NULL)
window = _gdk_root;
+1 -1
View File
@@ -83,7 +83,7 @@ enum_monitor (HMONITOR hmonitor,
monitor = _gdk_monitors + *index;
monitor_info.cbSize = sizeof (MONITORINFOEX);
monitor_info.cbSize = sizeof (MONITORINFOEXA2);
GetMonitorInfoA (hmonitor, (MONITORINFO *) &monitor_info);
#ifndef MONITORINFOF_PRIMARY
+9 -1
View File
@@ -1837,6 +1837,7 @@ gdk_event_translate (MSG *msg,
RECT rect, *drag, orig_drag;
POINT point;
MINMAXINFO *mmi;
LONG style;
HWND hwnd;
HCURSOR hcursor;
BYTE key_state[256];
@@ -3044,6 +3045,8 @@ gdk_event_translate (MSG *msg,
mmi->ptMaxPosition.x, mmi->ptMaxPosition.y,
mmi->ptMaxSize.x, mmi->ptMaxSize.y));
style = GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE);
if (impl->hint_flags & GDK_HINT_MIN_SIZE)
{
rect.left = rect.top = 0;
@@ -3072,7 +3075,10 @@ gdk_event_translate (MSG *msg,
mmi->ptMaxTrackSize.x = maxw > 0 && maxw < G_MAXSHORT ? maxw : G_MAXSHORT;
mmi->ptMaxTrackSize.y = maxh > 0 && maxh < G_MAXSHORT ? maxh : G_MAXSHORT;
}
else
/* Assume that these styles are incompatible with CSD,
* so there's no reason for us to override the defaults.
*/
else if ((style & (WS_BORDER | WS_THICKFRAME)) == 0)
{
HMONITOR winmon;
MONITORINFO moninfo;
@@ -3085,6 +3091,8 @@ gdk_event_translate (MSG *msg,
{
mmi->ptMaxTrackSize.x = moninfo.rcWork.right - moninfo.rcWork.left;
mmi->ptMaxTrackSize.y = moninfo.rcWork.bottom - moninfo.rcWork.top;
mmi->ptMaxPosition.x = moninfo.rcWork.left;
mmi->ptMaxPosition.y = moninfo.rcWork.top;
}
else
{
+2
View File
@@ -164,6 +164,8 @@ handle_special (guint vk,
*ksymp = GDK_KEY_Meta_R; break;
case VK_APPS:
*ksymp = GDK_KEY_Menu; break;
case VK_DECIMAL:
*ksymp = GDK_KEY_KP_Decimal; break;
case VK_MULTIPLY:
*ksymp = GDK_KEY_KP_Multiply; break;
case VK_ADD:
+1 -1
View File
@@ -476,7 +476,7 @@ get_child_info_handler (Display *dpy,
if (rep->generic.type == X_Error)
{
state->child_has_error = TRUE;
if (rep->error.errorCode != BadDrawable ||
if (rep->error.errorCode != BadDrawable &&
rep->error.errorCode != BadWindow)
{
state->have_error = TRUE;
+71 -30
View File
@@ -51,6 +51,7 @@ struct _GdkX11DeviceXI2
gint device_id;
GArray *scroll_valuators;
gdouble *last_axes;
};
struct _GdkX11DeviceXI2Class
@@ -157,6 +158,7 @@ gdk_x11_device_xi2_finalize (GObject *object)
GdkX11DeviceXI2 *device = GDK_X11_DEVICE_XI2 (object);
g_array_free (device->scroll_valuators, TRUE);
g_free (device->last_axes);
G_OBJECT_CLASS (gdk_x11_device_xi2_parent_class)->finalize (object);
}
@@ -497,10 +499,13 @@ gdk_x11_device_xi2_window_at_position (GdkDevice *device,
XIButtonState button_state = { 0 };
XIModifierState mod_state;
XIGroupState group_state;
Bool retval;
display = gdk_device_get_display (device);
screen = gdk_display_get_default_screen (display);
gdk_x11_display_error_trap_push (display);
/* This function really only works if the mouse pointer is held still
* during its operation. If it moves from one leaf window to another
* than we'll end up with inaccurate values for win_x, win_y
@@ -547,18 +552,18 @@ gdk_x11_device_xi2_window_at_position (GdkDevice *device,
/* Free previous button mask, if any */
g_free (button_state.mask);
gdk_x11_display_error_trap_push (display);
XIQueryPointer (xdisplay,
device_xi2->device_id,
xwindow,
&root, &child,
&xroot_x, &xroot_y,
&xwin_x, &xwin_y,
&button_state,
&mod_state,
&group_state);
if (gdk_x11_display_error_trap_pop (display))
retval = XIQueryPointer (xdisplay,
device_xi2->device_id,
xwindow,
&root, &child,
&xroot_x, &xroot_y,
&xwin_x, &xwin_y,
&button_state,
&mod_state,
&group_state);
if (!retval)
continue;
if (child != None)
{
pointer_window = child;
@@ -607,17 +612,16 @@ gdk_x11_device_xi2_window_at_position (GdkDevice *device,
last = xwindow;
free (button_state.mask);
gdk_x11_display_error_trap_push (display);
XIQueryPointer (xdisplay,
device_xi2->device_id,
xwindow,
&root, &xwindow,
&xroot_x, &xroot_y,
&xwin_x, &xwin_y,
&button_state,
&mod_state,
&group_state);
if (gdk_x11_display_error_trap_pop (display))
retval = XIQueryPointer (xdisplay,
device_xi2->device_id,
xwindow,
&root, &xwindow,
&xroot_x, &xroot_y,
&xwin_x, &xwin_y,
&button_state,
&mod_state,
&group_state);
if (!retval)
break;
if (get_toplevel && last != root &&
@@ -631,10 +635,25 @@ gdk_x11_device_xi2_window_at_position (GdkDevice *device,
gdk_x11_display_ungrab (display);
window = gdk_x11_window_lookup_for_display (display, last);
impl = NULL;
if (window)
impl = GDK_WINDOW_IMPL_X11 (window->impl);
if (gdk_x11_display_error_trap_pop (display) == 0)
{
window = gdk_x11_window_lookup_for_display (display, last);
impl = NULL;
if (window)
impl = GDK_WINDOW_IMPL_X11 (window->impl);
if (mask)
*mask = _gdk_x11_device_xi2_translate_state (&mod_state, &button_state, &group_state);
free (button_state.mask);
}
else
{
window = NULL;
if (mask)
*mask = 0;
}
if (win_x)
*win_x = (window) ? (xwin_x / impl->window_scale) : -1;
@@ -642,10 +661,6 @@ gdk_x11_device_xi2_window_at_position (GdkDevice *device,
if (win_y)
*win_y = (window) ? (xwin_y / impl->window_scale) : -1;
if (mask)
*mask = _gdk_x11_device_xi2_translate_state (&mod_state, &button_state, &group_state);
free (button_state.mask);
return window;
}
@@ -891,3 +906,29 @@ _gdk_x11_device_xi2_get_id (GdkX11DeviceXI2 *device)
return device->device_id;
}
gdouble
gdk_x11_device_xi2_get_last_axis_value (GdkX11DeviceXI2 *device,
gint n_axis)
{
if (n_axis >= gdk_device_get_n_axes (GDK_DEVICE (device)))
return 0;
if (!device->last_axes)
return 0;
return device->last_axes[n_axis];
}
void
gdk_x11_device_xi2_store_axes (GdkX11DeviceXI2 *device,
gdouble *axes,
gint n_axes)
{
g_free (device->last_axes);
if (axes && n_axes)
device->last_axes = g_memdup (axes, sizeof (gdouble) * n_axes);
else
device->last_axes = NULL;
}
+8 -2
View File
@@ -766,6 +766,7 @@ handle_device_changed (GdkX11DeviceManagerXI2 *device_manager,
{
_gdk_device_reset_axes (device);
_gdk_device_xi2_unset_scroll_valuators ((GdkX11DeviceXI2 *) device);
gdk_x11_device_xi2_store_axes (GDK_X11_DEVICE_XI2 (device), NULL, 0);
translate_device_classes (display, device, ev->classes, ev->num_classes);
g_signal_emit_by_name (G_OBJECT (device), "changed");
@@ -868,13 +869,16 @@ translate_axes (GdkDevice *device,
axes = g_new0 (gdouble, n_axes);
vals = valuators->values;
for (i = 0; i < valuators->mask_len * 8; i++)
for (i = 0; i < MIN (valuators->mask_len * 8, n_axes); i++)
{
GdkAxisUse use;
gdouble val;
if (!XIMaskIsSet (valuators->mask, i))
continue;
{
axes[i] = gdk_x11_device_xi2_get_last_axis_value (GDK_X11_DEVICE_XI2 (device), i);
continue;
}
use = gdk_device_get_axis_use (device, i);
val = *vals++;
@@ -899,6 +903,8 @@ translate_axes (GdkDevice *device,
}
}
gdk_x11_device_xi2_store_axes (GDK_X11_DEVICE_XI2 (device), axes, n_axes);
return axes;
}
+48 -4
View File
@@ -907,7 +907,10 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
event->selection.window = window;
event->selection.selection = gdk_x11_xatom_to_atom_for_display (display, xevent->xselectionrequest.selection);
event->selection.target = gdk_x11_xatom_to_atom_for_display (display, xevent->xselectionrequest.target);
event->selection.property = gdk_x11_xatom_to_atom_for_display (display, xevent->xselectionrequest.property);
if (xevent->xselectionrequest.property == None)
event->selection.property = event->selection.target;
else
event->selection.property = gdk_x11_xatom_to_atom_for_display (display, xevent->xselectionrequest.property);
if (xevent->xselectionrequest.requestor != None)
event->selection.requestor = gdk_x11_window_foreign_new_for_display (display,
xevent->xselectionrequest.requestor);
@@ -927,7 +930,7 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
event->selection.selection = gdk_x11_xatom_to_atom_for_display (display, xevent->xselection.selection);
event->selection.target = gdk_x11_xatom_to_atom_for_display (display, xevent->xselection.target);
if (xevent->xselection.property == None)
event->selection.property = GDK_NONE;
event->selection.property = event->selection.target;
else
event->selection.property = gdk_x11_xatom_to_atom_for_display (display, xevent->xselection.property);
event->selection.time = xevent->xselection.time;
@@ -1093,6 +1096,47 @@ find_frame_timings (GdkFrameClock *clock,
return NULL;
}
/* _NET_WM_FRAME_DRAWN and _NET_WM_FRAME_TIMINGS messages represent time
* as a "high resolution server time" - this is the server time interpolated
* to microsecond resolution. The advantage of this time representation
* is that if X server is running on the same computer as a client, and
* the Xserver uses 'clock_gettime(CLOCK_MONOTONIC, ...)' for the server
* time, the client can detect this, and all such clients will share a
* a time representation with high accuracy. If there is not a common
* time source, then the time synchronization will be less accurate.
*/
gint64
server_time_to_monotonic_time (GdkX11Display *display_x11,
gint64 server_time)
{
if (display_x11->server_time_query_time == 0 ||
(!display_x11->server_time_is_monotonic_time &&
server_time > display_x11->server_time_query_time + 10*1000*1000)) /* 10 seconds */
{
gint64 current_server_time = gdk_x11_get_server_time (display_x11->leader_gdk_window);
gint64 current_server_time_usec = (gint64)current_server_time * 1000;
gint64 current_monotonic_time = g_get_monotonic_time ();
display_x11->server_time_query_time = current_monotonic_time;
/* If the server time is within a second of the monotonic time,
* we assume that they are identical. This seems like a big margin,
* but we want to be as robust as possible even if the system
* is under load and our processing of the server response is
* delayed.
*/
if (current_server_time_usec > current_monotonic_time - 1000*1000 &&
current_server_time_usec < current_monotonic_time + 1000*1000)
display_x11->server_time_is_monotonic_time = TRUE;
display_x11->server_time_offset = current_server_time_usec - current_monotonic_time;
}
if (display_x11->server_time_is_monotonic_time)
return server_time;
else
return server_time - display_x11->server_time_offset;
}
GdkFilterReturn
_gdk_wm_protocols_filter (GdkXEvent *xev,
GdkEvent *event,
@@ -1125,7 +1169,7 @@ _gdk_wm_protocols_filter (GdkXEvent *xev,
guint32 d3 = xevent->xclient.data.l[3];
guint64 serial = ((guint64)d1 << 32) | d0;
gint64 frame_drawn_time = ((guint64)d3 << 32) | d2;
gint64 frame_drawn_time = server_time_to_monotonic_time (GDK_X11_DISPLAY (display), ((guint64)d3 << 32) | d2);
gint64 refresh_interval, presentation_time;
GdkFrameClock *clock = gdk_window_get_frame_clock (win);
@@ -1413,7 +1457,7 @@ _gdk_x11_display_open (const gchar *display_name)
gdk_event_init (display);
attr.window_type = GDK_WINDOW_TOPLEVEL;
attr.wclass = GDK_INPUT_OUTPUT;
attr.wclass = GDK_INPUT_ONLY;
attr.x = 10;
attr.y = 10;
attr.width = 10;
+6
View File
@@ -124,6 +124,12 @@ struct _GdkX11Display
GSList *error_traps;
gint wm_moveresize_button;
/* Translation between X server time and system-local monotonic time */
gint64 server_time_query_time;
gint64 server_time_offset;
guint server_time_is_monotonic_time : 1;
};
struct _GdkX11DisplayClass
+3 -3
View File
@@ -15,8 +15,8 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GDK_EVENT_SOURCE_H__
#define __GDK_EVENT_SOURCE_H__
#ifndef __GDK_X11_EVENT_SOURCE_H__
#define __GDK_X11_EVENT_SOURCE_H__
#include "gdkeventtranslator.h"
@@ -40,4 +40,4 @@ void gdk_x11_event_source_select_events (GdkEventSource *source,
G_END_DECLS
#endif /* __GDK_EVENT_SOURCE_H__ */
#endif /* __GDK_X11_EVENT_SOURCE_H__ */
+5 -4
View File
@@ -1058,6 +1058,7 @@ MyEnhancedXkbTranslateKeyCode(register XkbDescPtr xkb,
int col,nKeyGroups;
unsigned preserve,effectiveGroup;
KeySym *syms;
int found_col = 0;
if (mods_rtrn!=NULL)
*mods_rtrn = 0;
@@ -1090,7 +1091,7 @@ MyEnhancedXkbTranslateKeyCode(register XkbDescPtr xkb,
break;
}
}
col= effectiveGroup*XkbKeyGroupsWidth(xkb,key);
found_col = col= effectiveGroup*XkbKeyGroupsWidth(xkb,key);
type = XkbKeyKeyType(xkb,key,effectiveGroup);
preserve= 0;
@@ -1129,7 +1130,7 @@ MyEnhancedXkbTranslateKeyCode(register XkbDescPtr xkb,
}
if (!found && ((mods&type->mods.mask) == entry->mods.mask)) {
col+= entry->level;
found_col= col + entry->level;
if (type->preserve)
preserve= type->preserve[i].mask;
@@ -1143,7 +1144,7 @@ MyEnhancedXkbTranslateKeyCode(register XkbDescPtr xkb,
}
if (keysym_rtrn!=NULL)
*keysym_rtrn= syms[col];
*keysym_rtrn= syms[found_col];
if (mods_rtrn) {
/* ---- Begin section modified for GDK ---- */
*mods_rtrn &= ~preserve;
@@ -1175,7 +1176,7 @@ MyEnhancedXkbTranslateKeyCode(register XkbDescPtr xkb,
/* ---- End stuff GDK adds to the original Xlib version ---- */
return (syms[col] != NoSymbol);
return (syms[found_col] != NoSymbol);
}
#endif /* HAVE_XKB */
+6
View File
@@ -247,6 +247,12 @@ gboolean _gdk_x11_device_xi2_get_scroll_delta (GdkX11DeviceXI2 *device,
gdouble *delta_ret);
void _gdk_device_xi2_reset_scroll_valuators (GdkX11DeviceXI2 *device);
gdouble gdk_x11_device_xi2_get_last_axis_value (GdkX11DeviceXI2 *device,
gint n_axis);
void gdk_x11_device_xi2_store_axes (GdkX11DeviceXI2 *device,
gdouble *axes,
gint n_axes);
#endif
void _gdk_x11_event_translate_keyboard_string (GdkEventKey *event);
+20 -25
View File
@@ -181,8 +181,6 @@ _gdk_x11_window_get_toplevel (GdkWindow *window)
return impl->toplevel;
}
static const cairo_user_data_key_t gdk_x11_cairo_key;
/**
* _gdk_x11_window_update_size:
* @impl: a #GdkWindowImplX11.
@@ -442,14 +440,6 @@ gdk_x11_window_end_frame (GdkWindow *window)
* X11 specific implementations of generic functions *
*****************************************************/
static void
gdk_x11_cairo_surface_destroy (void *data)
{
GdkWindowImplX11 *impl = data;
impl->cairo_surface = NULL;
}
static cairo_surface_t *
gdk_x11_create_cairo_surface (GdkWindowImplX11 *impl,
int width,
@@ -480,16 +470,12 @@ gdk_x11_ref_cairo_surface (GdkWindow *window)
#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
cairo_surface_set_device_scale (impl->cairo_surface, impl->window_scale, impl->window_scale);
#endif
if (impl->cairo_surface)
cairo_surface_set_user_data (impl->cairo_surface, &gdk_x11_cairo_key,
impl, gdk_x11_cairo_surface_destroy);
if (WINDOW_IS_TOPLEVEL (window) && impl->toplevel->in_frame)
hook_surface_changed (window);
}
else
cairo_surface_reference (impl->cairo_surface);
cairo_surface_reference (impl->cairo_surface);
return impl->cairo_surface;
}
@@ -1329,8 +1315,8 @@ gdk_x11_window_destroy (GdkWindow *window,
if (impl->cairo_surface)
{
cairo_surface_finish (impl->cairo_surface);
cairo_surface_set_user_data (impl->cairo_surface, &gdk_x11_cairo_key,
NULL, NULL);
cairo_surface_destroy (impl->cairo_surface);
impl->cairo_surface = NULL;
}
if (!recursing && !foreign_destroy)
@@ -1924,6 +1910,11 @@ _gdk_x11_window_set_window_scale (GdkWindow *window,
impl = GDK_WINDOW_IMPL_X11 (window->impl);
impl->window_scale = scale;
#ifdef HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE
if (impl->cairo_surface)
cairo_surface_set_device_scale (impl->cairo_surface, impl->window_scale, impl->window_scale);
#endif
_gdk_window_update_size (window);
toplevel = _gdk_x11_window_get_toplevel (window);
if (toplevel && window->window_type != GDK_WINDOW_FOREIGN)
@@ -3637,8 +3628,14 @@ gdk_x11_window_set_shadow_width (GdkWindow *window,
int top,
int bottom)
{
GdkWindowImplX11 *impl = GDK_WINDOW_IMPL_X11 (window->impl);
Atom frame_extents;
gulong data[4] = { left, right, top, bottom };
gulong data[4] = {
left * impl->window_scale,
right * impl->window_scale,
top * impl->window_scale,
bottom * impl->window_scale
};
frame_extents = gdk_x11_get_xatom_by_name_for_display (gdk_window_get_display (window),
"_GTK_FRAME_EXTENTS");
@@ -3839,10 +3836,7 @@ gdk_x11_window_set_icon_list (GdkWindow *window,
/* silently ignore overlarge icons */
if (size + 2 + width * height > GDK_SELECTION_MAX_SIZE(display))
{
g_warning ("gdk_window_set_icon_list: icon too large (%dx%d)", width, height);
break;
}
break;
n++;
size += 2 + width * height;
@@ -5688,6 +5682,7 @@ static gboolean
gdk_x11_window_show_window_menu (GdkWindow *window,
GdkEvent *event)
{
GdkWindowImplX11 *impl = GDK_WINDOW_IMPL_X11 (window->impl);
GdkDisplay *display = GDK_WINDOW_DISPLAY (window);
GdkDevice *device;
int device_id;
@@ -5720,8 +5715,8 @@ gdk_x11_window_show_window_menu (GdkWindow *window,
xclient.window = GDK_WINDOW_XID (window);
xclient.message_type = gdk_x11_get_xatom_by_name_for_display (display, "_GTK_SHOW_WINDOW_MENU");
xclient.data.l[0] = device_id;
xclient.data.l[1] = x_root;
xclient.data.l[2] = y_root;
xclient.data.l[1] = x_root * impl->window_scale;
xclient.data.l[2] = y_root * impl->window_scale;
xclient.format = 32;
XSendEvent (GDK_DISPLAY_XDISPLAY (display), GDK_WINDOW_XROOTWIN (window), False,
+8 -4
View File
@@ -1405,10 +1405,13 @@ gtk.gresource.xml: Makefile.am
n=`basename $$f`; \
$(ECHO) " <file compressed=\"true\">ui/$$n</file>" >> $@; \
done; \
for s in 16x16 22x22 24x24 32x32; do \
for f in $(srcdir)/resources/icons/$$s/actions/*.png; do \
n=`basename $$f`; \
$(ECHO) " <file>icons/$$s/actions/$$n</file>" >> $@; \
shopt -s nullglob; \
for s in 16x16 22x22 24x24 32x32 48x48; do \
for c in actions status; do \
for f in $(srcdir)/resources/icons/$$s/$$c/*.png; do \
n=`basename $$f`; \
$(ECHO) " <file>icons/$$s/$$c/$$n</file>" >> $@; \
done; \
done; \
done; \
$(ECHO) " </gresource>" >> $@; \
@@ -1720,6 +1723,7 @@ EXTRA_DIST += \
$(Raleigh_sources) \
$(win32_theme_sources) \
$(gsettings_SCHEMAS) \
$(template_headers) \
libgtk3.manifest.in \
gtk-win32.rc.in \
gtkwin32embed.h \
+1 -1
View File
@@ -138,7 +138,7 @@ gtk_boolean_cell_accessible_update_cache (GtkCellAccessible *cell)
{
boolean_cell->priv->cell_sensitive = !boolean_cell->priv->cell_sensitive;
atk_object_notify_state_change (ATK_OBJECT (cell), ATK_STATE_CHECKED, sensitive);
atk_object_notify_state_change (ATK_OBJECT (cell), ATK_STATE_SENSITIVE, sensitive);
}
}
+1 -1
View File
@@ -150,7 +150,7 @@ gtk_container_accessible_real_remove_gtk (GtkContainer *container,
gint index;
atk_parent = ATK_OBJECT (data);
atk_child = gtk_widget_get_accessible (widget);
atk_child = _gtk_widget_peek_accessible (widget);
if (atk_child == NULL)
return 1;
accessible = GTK_CONTAINER_ACCESSIBLE (atk_parent);
+1 -1
View File
@@ -82,7 +82,7 @@ gtk_container_cell_widget_set (GtkAccessible *accessible)
for (l = container->priv->children; l; l = l->next)
gtk_accessible_set_widget (l->data, gtk_accessible_get_widget (accessible));
GTK_ACCESSIBLE_CLASS (gtk_container_cell_accessible_parent_class)->widget_unset (accessible);
GTK_ACCESSIBLE_CLASS (gtk_container_cell_accessible_parent_class)->widget_set (accessible);
}
static void
+14 -3
View File
@@ -97,11 +97,14 @@ gtk_text_view_accessible_ref_state_set (AtkObject *accessible)
AtkStateSet *state_set;
GtkWidget *widget;
state_set = ATK_OBJECT_CLASS (gtk_text_view_accessible_parent_class)->ref_state_set (accessible);
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
if (widget == NULL)
return NULL;
state_set = ATK_OBJECT_CLASS (gtk_text_view_accessible_parent_class)->ref_state_set (accessible);
{
atk_state_set_add_state (state_set, ATK_STATE_DEFUNCT);
return state_set;
}
if (gtk_text_view_get_editable (GTK_TEXT_VIEW (widget)))
atk_state_set_add_state (state_set, ATK_STATE_EDITABLE);
@@ -506,6 +509,11 @@ gtk_text_view_accessible_get_character_extents (AtkText *text,
GdkWindow *window;
gint x_widget, y_widget, x_window, y_window;
*x = 0;
*y = 0;
*width = 0;
*height = 0;
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
if (widget == NULL)
return;
@@ -516,6 +524,9 @@ gtk_text_view_accessible_get_character_extents (AtkText *text,
gtk_text_view_get_iter_location (view, &iter, &rectangle);
window = gtk_text_view_get_window (view, GTK_TEXT_WINDOW_WIDGET);
if (window == NULL)
return;
gdk_window_get_origin (window, &x_widget, &y_widget);
*height = rectangle.height;
+1 -10
View File
@@ -90,25 +90,16 @@ gtk_window_accessible_initialize (AtkObject *obj,
gpointer data)
{
GtkWidget *widget = GTK_WIDGET (data);
const gchar *name;
ATK_OBJECT_CLASS (gtk_window_accessible_parent_class)->initialize (obj, data);
g_signal_connect (data, "window-state-event", G_CALLBACK (window_state_event_cb), NULL);
_gtk_widget_accessible_set_layer (GTK_WIDGET_ACCESSIBLE (obj), ATK_LAYER_WINDOW);
name = gtk_widget_get_name (widget);
if (!g_strcmp0 (name, "gtk-tooltip"))
obj->role = ATK_ROLE_TOOL_TIP;
else if (gtk_window_get_window_type (GTK_WINDOW (widget)) == GTK_WINDOW_POPUP)
if (gtk_window_get_window_type (GTK_WINDOW (widget)) == GTK_WINDOW_POPUP)
obj->role = ATK_ROLE_WINDOW;
else
obj->role = ATK_ROLE_FRAME;
/* Notify that tooltip is showing */
if (obj->role == ATK_ROLE_TOOL_TIP && gtk_widget_get_mapped (widget))
atk_object_notify_state_change (obj, ATK_STATE_SHOWING, 1);
}
static GtkWidget *
+1 -2
View File
@@ -47,8 +47,7 @@
* doing automatic flipping between #GTK_ARROW_LEFT and #GTK_ARROW_RIGHT,
* depending on the text direction. To get the same effect with an image,
* use the icon names pan-start-symbolic and pan-end-symbolic, which
* react to the text direction instead of pan-left-symbolic and
* pan-right-symbolic which don't.
* react to the text direction.
*/
#include "config.h"
+2 -2
View File
@@ -1111,7 +1111,7 @@ gtk_font_selection_size_activate (GtkWidget *w,
const gchar *text;
text = gtk_entry_get_text (GTK_ENTRY (priv->size_entry));
new_size = MAX (0.1, atof (text) * PANGO_SCALE + 0.5);
new_size = (int) MAX (0.1, atof (text) * PANGO_SCALE + 0.5);
if (priv->size != new_size)
gtk_font_selection_set_size (fontsel, new_size);
@@ -1130,7 +1130,7 @@ gtk_font_selection_size_focus_out (GtkWidget *w,
const gchar *text;
text = gtk_entry_get_text (GTK_ENTRY (priv->size_entry));
new_size = MAX (0.1, atof (text) * PANGO_SCALE + 0.5);
new_size = (int) MAX (0.1, atof (text) * PANGO_SCALE + 0.5);
gtk_font_selection_set_size (fontsel, new_size);
+2 -2
View File
@@ -76,7 +76,7 @@ struct _GtkHandleBoxPrivate
{
/* Properties */
GtkPositionType handle_position;
GtkPositionType snap_edge;
gint snap_edge;
GtkShadowType shadow_type;
gboolean child_detached;
/* Properties */
@@ -1050,7 +1050,7 @@ gtk_handle_box_get_snap_edge (GtkHandleBox *handle_box)
{
g_return_val_if_fail (GTK_IS_HANDLE_BOX (handle_box), (GtkPositionType)-1);
return handle_box->priv->snap_edge;
return (GtkPositionType)handle_box->priv->snap_edge;
}
/**
+3 -3
View File
@@ -2944,17 +2944,17 @@ gtk_icon_factory_buildable_custom_tag_end (GtkBuildable *buildable,
}
if (source_data->icon_name)
gtk_icon_source_set_icon_name (icon_source, source_data->icon_name);
if (source_data->size != -1)
if ((gint)source_data->size != -1)
{
gtk_icon_source_set_size (icon_source, source_data->size);
gtk_icon_source_set_size_wildcarded (icon_source, FALSE);
}
if (source_data->direction != -1)
if ((gint)source_data->direction != -1)
{
gtk_icon_source_set_direction (icon_source, source_data->direction);
gtk_icon_source_set_direction_wildcarded (icon_source, FALSE);
}
if (source_data->state != -1)
if ((gint)source_data->state != -1)
{
gtk_icon_source_set_state (icon_source, source_data->state);
gtk_icon_source_set_state_wildcarded (icon_source, FALSE);
+33 -35
View File
@@ -672,22 +672,35 @@ gtk_image_menu_item_activatable_interface_init (GtkActivatableIface *iface)
iface->sync_action_properties = gtk_image_menu_item_sync_action_properties;
}
static GtkWidget *
gtk_image_menu_item_ensure_image (GtkImageMenuItem *item)
{
GtkWidget *image;
image = gtk_image_menu_item_get_image (item);
if (!GTK_IS_IMAGE (image))
{
image = gtk_image_new ();
gtk_widget_show (image);
gtk_image_menu_item_set_image (item, image);
}
return image;
}
static gboolean
activatable_update_stock_id (GtkImageMenuItem *image_menu_item, GtkAction *action)
{
GtkWidget *image;
const gchar *stock_id = gtk_action_get_stock_id (action);
image = gtk_image_menu_item_get_image (image_menu_item);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
if (GTK_IS_IMAGE (image) &&
stock_id && gtk_icon_factory_lookup_default (stock_id))
if (stock_id && gtk_icon_factory_lookup_default (stock_id))
{
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
GtkWidget *image;
image = gtk_image_menu_item_ensure_image (image_menu_item);
gtk_image_set_from_stock (GTK_IMAGE (image), stock_id, GTK_ICON_SIZE_MENU);
G_GNUC_END_IGNORE_DEPRECATIONS;
return TRUE;
}
@@ -699,7 +712,6 @@ activatable_update_stock_id (GtkImageMenuItem *image_menu_item, GtkAction *actio
static gboolean
activatable_update_gicon (GtkImageMenuItem *image_menu_item, GtkAction *action)
{
GtkWidget *image;
GIcon *icon = gtk_action_get_gicon (action);
const gchar *stock_id;
gboolean ret = FALSE;
@@ -708,11 +720,11 @@ activatable_update_gicon (GtkImageMenuItem *image_menu_item, GtkAction *action)
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
image = gtk_image_menu_item_get_image (image_menu_item);
if (icon && GTK_IS_IMAGE (image) &&
!(stock_id && gtk_icon_factory_lookup_default (stock_id)))
if (icon && !(stock_id && gtk_icon_factory_lookup_default (stock_id)))
{
GtkWidget *image;
image = gtk_image_menu_item_ensure_image (image_menu_item);
gtk_image_set_from_gicon (GTK_IMAGE (image), icon, GTK_ICON_SIZE_MENU);
ret = TRUE;
}
@@ -722,20 +734,21 @@ activatable_update_gicon (GtkImageMenuItem *image_menu_item, GtkAction *action)
return ret;
}
static void
static gboolean
activatable_update_icon_name (GtkImageMenuItem *image_menu_item, GtkAction *action)
{
GtkWidget *image;
const gchar *icon_name = gtk_action_get_icon_name (action);
image = gtk_image_menu_item_get_image (image_menu_item);
if (GTK_IS_IMAGE (image) &&
(gtk_image_get_storage_type (GTK_IMAGE (image)) == GTK_IMAGE_EMPTY ||
gtk_image_get_storage_type (GTK_IMAGE (image)) == GTK_IMAGE_ICON_NAME))
if (icon_name)
{
GtkWidget *image;
image = gtk_image_menu_item_ensure_image (image_menu_item);
gtk_image_set_from_icon_name (GTK_IMAGE (image), icon_name, GTK_ICON_SIZE_MENU);
return TRUE;
}
return FALSE;
}
static void
@@ -767,7 +780,6 @@ gtk_image_menu_item_sync_action_properties (GtkActivatable *activatable,
GtkAction *action)
{
GtkImageMenuItem *image_menu_item;
GtkWidget *image;
gboolean use_appearance;
image_menu_item = GTK_IMAGE_MENU_ITEM (activatable);
@@ -781,21 +793,6 @@ gtk_image_menu_item_sync_action_properties (GtkActivatable *activatable,
if (!use_appearance)
return;
image = gtk_image_menu_item_get_image (image_menu_item);
if (image && !GTK_IS_IMAGE (image))
{
gtk_image_menu_item_set_image (image_menu_item, NULL);
image = NULL;
}
if (!image)
{
image = gtk_image_new ();
gtk_widget_show (image);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (activatable),
image);
}
if (!activatable_update_stock_id (image_menu_item, action) &&
!activatable_update_gicon (image_menu_item, action))
activatable_update_icon_name (image_menu_item, action);
@@ -1098,6 +1095,7 @@ gtk_image_menu_item_set_image (GtkImageMenuItem *image_menu_item,
"visible", show_image (image_menu_item),
"no-show-all", TRUE,
NULL);
gtk_image_set_pixel_size (GTK_IMAGE (image), 16);
g_object_notify (G_OBJECT (image_menu_item), "image");
}
+24 -5
View File
@@ -691,6 +691,24 @@ button_callback (gpointer data)
static UINT taskbar_created_msg = 0;
static GSList *status_icons = NULL;
static UINT status_icon_id = 0;
static GtkStatusIcon *
find_status_icon (UINT id)
{
GSList *rover;
for (rover = status_icons; rover != NULL; rover = rover->next)
{
GtkStatusIcon *status_icon = GTK_STATUS_ICON (rover->data);
GtkStatusIconPrivate *priv = status_icon->priv;
if (priv->nid.uID == id)
return status_icon;
}
return NULL;
}
static LRESULT CALLBACK
wndproc (HWND hwnd,
@@ -708,7 +726,7 @@ wndproc (HWND hwnd,
GtkStatusIconPrivate *priv = status_icon->priv;
priv->nid.hWnd = hwnd;
priv->nid.uID = GPOINTER_TO_UINT (status_icon);
priv->nid.uID = status_icon_id++;
priv->nid.uCallbackMessage = WM_GTK_TRAY_NOTIFICATION;
priv->nid.uFlags = NIF_MESSAGE;
@@ -752,7 +770,7 @@ wndproc (HWND hwnd,
buttondown0:
bc = g_new (ButtonCallbackData, 1);
bc->event = (GdkEventButton *) gdk_event_new (GDK_BUTTON_PRESS);
bc->status_icon = GTK_STATUS_ICON (wparam);
bc->status_icon = find_status_icon (wparam);
build_button_event (bc->status_icon->priv, bc->event, button);
g_idle_add (button_callback, bc);
break;
@@ -778,7 +796,7 @@ wndproc (HWND hwnd,
buttonup0:
bc = g_new (ButtonCallbackData, 1);
bc->event = (GdkEventButton *) gdk_event_new (GDK_BUTTON_RELEASE);
bc->status_icon = GTK_STATUS_ICON (wparam);
bc->status_icon = find_status_icon (wparam);
build_button_event (bc->status_icon->priv, bc->event, button);
g_idle_add (button_callback, bc);
break;
@@ -925,7 +943,7 @@ gtk_status_icon_init (GtkStatusIcon *status_icon)
memset (&priv->nid, 0, sizeof (priv->nid));
priv->nid.hWnd = create_tray_observer ();
priv->nid.uID = GPOINTER_TO_UINT (status_icon);
priv->nid.uID = status_icon_id++;
priv->nid.uCallbackMessage = WM_GTK_TRAY_NOTIFICATION;
priv->nid.uFlags = NIF_MESSAGE;
@@ -2599,7 +2617,8 @@ gtk_status_icon_set_tooltip_markup (GtkStatusIcon *status_icon,
{
#ifdef GDK_WINDOWING_X11
GtkStatusIconPrivate *priv;
#else
#endif
#if defined (GDK_WINDOWING_WIN32) || defined (GDK_WINDOWING_QUARTZ)
gchar *text = NULL;
#endif
+1 -1
View File
@@ -95,7 +95,7 @@ real_add (const GtkStockItem *items,
gpointer old_key, old_value;
const GtkStockItem *item = &items[i];
if (replace_primary && item->modifier == PRIMARY_MODIFIER)
if (replace_primary && (guint)item->modifier == PRIMARY_MODIFIER)
{
item = gtk_stock_item_copy (item);
((GtkStockItem *)item)->modifier = (NON_STATIC_MASK |
+3 -3
View File
@@ -232,7 +232,7 @@ typedef char * GtkStock;
*
* The Copy item and icon.
*
* Deprecated: 3.10: Do not use an icon. Use label &quot;_Copy&quot;.
* Deprecated: 3.10: Use the named icon &quot;edit-copy&quot; or the label &quot;_Copy&quot;.
*/
#define GTK_STOCK_COPY ((GtkStock)"gtk-copy")
@@ -241,7 +241,7 @@ typedef char * GtkStock;
*
* The Cut item and icon.
*
* Deprecated: 3.10: Do not use an icon. Use label &quot;Cu_t&quot;.
* Deprecated: 3.10: Use the named icon &quot;edit-cut&quot; or the label &quot;Cu_t&quot;.
*/
#define GTK_STOCK_CUT ((GtkStock)"gtk-cut")
@@ -250,7 +250,7 @@ typedef char * GtkStock;
*
* The Delete item and icon.
*
* Deprecated: 3.10: Do not use an icon. Use label &quot;_Delete&quot;.
* Deprecated: 3.10: Use the named icon &quot;edit-cut&quot; or the label &quot;_Delete&quot;.
*/
#define GTK_STOCK_DELETE ((GtkStock)"gtk-delete")
+2 -2
View File
@@ -1177,7 +1177,7 @@ gtk_theming_engine_render_check (GtkThemingEngine *engine,
}
else
{
if (flags & GTK_STATE_FLAG_ACTIVE)
if (flags & GTK_STATE_FLAG_CHECKED)
{
cairo_translate (cr,
x + pad, y + pad);
@@ -1301,7 +1301,7 @@ gtk_theming_engine_render_option (GtkThemingEngine *engine,
line_thickness);
cairo_fill (cr);
}
if (flags & GTK_STATE_FLAG_ACTIVE)
if (flags & GTK_STATE_FLAG_CHECKED)
{
pad = thickness + MAX (1, 2 * (exterior_size - 2 * thickness) / 9);
interior_size = MAX (1, exterior_size - 2 * pad);
+29
View File
@@ -355,6 +355,27 @@ gtk_tray_icon_draw (GtkWidget *widget,
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
cairo_paint (cr);
}
else
{
GdkRectangle clip;
if (gdk_cairo_get_clip_rectangle (cr, &clip))
{
/* Clear to parent-relative pixmap
* We need to use direct X access here because GDK doesn't know about
* the parent realtive pixmap. */
cairo_surface_flush (target);
XClearArea (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window),
clip.x, clip.y,
clip.width, clip.height,
False);
cairo_surface_mark_dirty_rectangle (target,
clip.x, clip.y,
clip.width, clip.height);
}
}
if (GTK_WIDGET_CLASS (gtk_tray_icon_parent_class)->draw)
retval = GTK_WIDGET_CLASS (gtk_tray_icon_parent_class)->draw (widget, cr);
@@ -480,6 +501,14 @@ gtk_tray_icon_get_visual_property (GtkTrayIcon *icon)
icon->priv->manager_visual_rgba = FALSE;
}
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
/* For the background-relative hack we use when we aren't
* using a real RGBA visual, we can't be double-buffered
*/
gtk_widget_set_double_buffered (GTK_WIDGET (icon), icon->priv->manager_visual_rgba);
G_GNUC_END_IGNORE_DEPRECATIONS
if (type != None)
XFree (prop.prop);
}
+6 -6
View File
@@ -405,8 +405,8 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
*/
props[PROP_LICENSE] =
g_param_spec_string ("license",
_("License"),
_("The license of the program"),
P_("License"),
P_("The license of the program"),
NULL,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
@@ -694,7 +694,7 @@ apply_use_header_bar (GtkAboutDialog *about)
action_area = gtk_dialog_get_action_area (GTK_DIALOG (about));
G_GNUC_END_IGNORE_DEPRECATIONS
priv->credits_button = gtk_toggle_button_new_with_mnemonic ("C_redits");
priv->credits_button = gtk_toggle_button_new_with_mnemonic (_("C_redits"));
g_object_bind_property (priv->credits_page, "visible",
priv->credits_button, "visible", G_BINDING_SYNC_CREATE);
g_signal_connect (priv->credits_button, "toggled", G_CALLBACK (toggle_credits), about);
@@ -702,7 +702,7 @@ apply_use_header_bar (GtkAboutDialog *about)
"secondary", TRUE,
NULL);
priv->license_button = gtk_toggle_button_new_with_mnemonic ("_License");
priv->license_button = gtk_toggle_button_new_with_mnemonic (_("_License"));
g_object_bind_property (priv->license_page, "visible",
priv->license_button, "visible", G_BINDING_SYNC_CREATE);
g_signal_connect (priv->license_button, "toggled", G_CALLBACK (toggle_license), about);
@@ -711,7 +711,7 @@ apply_use_header_bar (GtkAboutDialog *about)
NULL);
gtk_dialog_add_button (GTK_DIALOG (about), "_Close", GTK_RESPONSE_DELETE_EVENT);
gtk_dialog_add_button (GTK_DIALOG (about), _("_Close"), GTK_RESPONSE_DELETE_EVENT);
}
}
@@ -1926,7 +1926,7 @@ follow_if_link (GtkAboutDialog *about,
GtkStateFlags state = gtk_widget_get_state_flags (GTK_WIDGET (about));
gtk_style_context_get_color (context, state | GTK_STATE_FLAG_VISITED, &visited_link_color);
g_object_set (G_OBJECT (tag), "foreground-rgba", visited_link_color, NULL);
g_object_set (G_OBJECT (tag), "foreground-rgba", &visited_link_color, NULL);
priv->visited_links = g_slist_prepend (priv->visited_links, g_strdup (uri));
}
+1 -1
View File
@@ -380,7 +380,7 @@ gtk_action_helper_set_action_name (GtkActionHelper *helper,
return;
GTK_NOTE(ACTIONS,
if (!strchr (action_name, '.'))
if (action_name == NULL || !strchr (action_name, '.'))
g_message ("actionhelper: action name %s doesn't look like 'app.' or 'win.' "
"which means that it will probably not work properly.", action_name));
+4 -3
View File
@@ -207,7 +207,7 @@ _gtk_allocated_bitmask_subtract (GtkBitmask *mask,
const GtkBitmask *other)
{
GtkBitmask other_allocated;
guint i;
guint i, len;
g_return_val_if_fail (mask != NULL, NULL);
g_return_val_if_fail (other != NULL, NULL);
@@ -215,9 +215,10 @@ _gtk_allocated_bitmask_subtract (GtkBitmask *mask,
mask = gtk_bitmask_ensure_allocated (mask);
ENSURE_ALLOCATED (other, other_allocated);
for (i = 0; i < other->len; i++)
len = MIN (mask->len, other->len);
for (i = 0; i < len; i++)
{
mask->data[i] |= ~other->data[i];
mask->data[i] &= ~other->data[i];
}
return gtk_allocated_bitmask_shrink (mask);
+6 -1
View File
@@ -460,10 +460,15 @@ software_button_clicked_cb (GtkButton *button,
static void
ensure_software_button (GtkAppChooserDialog *self)
{
if (g_find_program_in_path ("gnome-software"))
gchar *path;
path = g_find_program_in_path ("gnome-software");
if (path != NULL)
gtk_widget_show (self->priv->software_button);
else
gtk_widget_hide (self->priv->software_button);
g_free (path);
}
static void
+4 -11
View File
@@ -798,17 +798,10 @@ gtk_app_chooser_widget_real_add_items (GtkAppChooserWidget *self)
if (default_app != NULL)
g_object_unref (default_app);
if (all_applications != NULL)
g_list_free_full (all_applications, g_object_unref);
if (recommended_apps != NULL)
g_list_free_full (recommended_apps, g_object_unref);
if (fallback_apps != NULL)
g_list_free_full (fallback_apps, g_object_unref);
if (exclude_apps != NULL)
g_list_free (exclude_apps);
g_list_free_full (all_applications, g_object_unref);
g_list_free_full (recommended_apps, g_object_unref);
g_list_free_full (fallback_apps, g_object_unref);
g_list_free (exclude_apps);
}
static void
+1 -1
View File
@@ -89,7 +89,7 @@ tracker_item_changed (GObject *object,
[item didChangeLabel];
else if (g_str_equal (name, "icon"))
[item didChangeIcon];
else if (g_str_equal (name, "visible"))
else if (g_str_equal (name, "is-visible"))
[item didChangeVisible];
else if (g_str_equal (name, "toggled"))
[item didChangeToggled];
+7 -3
View File
@@ -502,7 +502,9 @@ gtk_application_focus_in_event_cb (GtkWindow *window,
priv->windows = g_list_concat (link, priv->windows);
}
gtk_application_impl_active_window_changed (application->priv->impl, window);
if (application->priv->impl)
gtk_application_impl_active_window_changed (application->priv->impl, window);
g_object_notify (G_OBJECT (application), "active-window");
return FALSE;
@@ -1774,14 +1776,16 @@ void
gtk_application_handle_window_realize (GtkApplication *application,
GtkWindow *window)
{
gtk_application_impl_handle_window_realize (application->priv->impl, window);
if (application->priv->impl)
gtk_application_impl_handle_window_realize (application->priv->impl, window);
}
void
gtk_application_handle_window_map (GtkApplication *application,
GtkWindow *window)
{
gtk_application_impl_handle_window_map (application->priv->impl, window);
if (application->priv->impl)
gtk_application_impl_handle_window_map (application->priv->impl, window);
}
/**
+3 -3
View File
@@ -83,8 +83,7 @@
* |[<!-- language="C" -->
* app = gtk_application_new ();
*
* builder = gtk_builder_new ();
* gtk_builder_add_from_string (builder,
* builder = gtk_builder_new_from_string (
* "<interface>"
* " <menu id='menubar'>"
* " <submenu label='_Edit'>"
@@ -92,7 +91,8 @@
* " <item label='_Paste' action='win.paste'/>"
* " </submenu>"
* " </menu>"
* "</interface>");
* "</interface>",
* -1);
*
* menubar = G_MENU_MODEL (gtk_builder_get_object (builder,
* "menubar"));
+1 -1
View File
@@ -1132,7 +1132,7 @@ gtk_button_box_size_allocate (GtkWidget *widget,
/**
* gtk_button_box_new:
* @orientation: the box' orientation.
* @orientation: the box's orientation.
*
* Creates a new #GtkButtonBox.
*
+2 -2
View File
@@ -38,7 +38,7 @@ static inline void
_gtk_bitmask_free (GtkBitmask *mask)
{
if (_gtk_bitmask_is_allocated (mask))
return _gtk_allocated_bitmask_free (mask);
_gtk_allocated_bitmask_free (mask);
}
static inline char *
@@ -55,7 +55,7 @@ static inline void
_gtk_bitmask_print (const GtkBitmask *mask,
GString *string)
{
return _gtk_allocated_bitmask_print (mask, string);
_gtk_allocated_bitmask_print (mask, string);
}
static inline GtkBitmask *
+6 -2
View File
@@ -2619,10 +2619,14 @@ gtk_box_set_center_widget (GtkBox *box,
g_return_if_fail (GTK_IS_BOX (box));
if (priv->center)
{
gtk_box_remove (GTK_CONTAINER (box), priv->center->widget);
priv->center = NULL;
}
if (widget)
priv->center = gtk_box_pack (box, widget, FALSE, TRUE, 0, GTK_PACK_START);
else if (priv->center)
gtk_box_remove (GTK_CONTAINER (box), priv->center->widget);
}
/**
+11 -10
View File
@@ -128,7 +128,7 @@
* in the local xml fragment and objects exposed via
* gtk_builder_expose_object().
*
* In general, GtkBuilder allows forward references to objects --
* In general, GtkBuilder allows forward references to objects
* declared in the local xml; an object doesnt have to be constructed
* before it can be referred to. The exception to this rule is that an
* object has to be constructed before it can be used as the value of
@@ -372,23 +372,24 @@ gtk_builder_get_property (GObject *object,
* GtkWindow -> gtk_window_get_type
* GtkHBox -> gtk_hbox_get_type
* GtkUIManager -> gtk_ui_manager_get_type
* GdkRGB -> gdk_rgb_get_type
* GWeatherLocation -> gweather_location_get_type
*
* Keep in sync with testsuite/gtk/typename.c !
*/
static gchar *
type_name_mangle (const gchar *name)
{
GString *symbol_name = g_string_new ("");
int i;
gint i;
for (i = 0; name[i] != '\0'; i++)
{
/* skip if uppercase, first or previous is uppercase */
if ((i > 0 && name[i] == g_ascii_toupper (name[i]) &&
(name[i-1] != g_ascii_toupper (name[i-1]) || i == 1)) ||
(i > 2 && name[i] == g_ascii_toupper (name[i]) &&
name[i-1] == g_ascii_toupper (name[i-1]) &&
name[i-2] == g_ascii_toupper (name[i-2]) &&
name[i+1] != 0 && name[i+1] != g_ascii_toupper (name[i+1])))
if ((name[i] == g_ascii_toupper (name[i]) &&
i > 0 && name[i-1] != g_ascii_toupper (name[i-1])) ||
(i > 2 && name[i] == g_ascii_toupper (name[i]) &&
name[i-1] == g_ascii_toupper (name[i-1]) &&
name[i-2] == g_ascii_toupper (name[i-2])))
g_string_append_c (symbol_name, '_');
g_string_append_c (symbol_name, g_ascii_tolower (name[i]));
}
@@ -1785,7 +1786,7 @@ gtk_builder_value_from_string (GtkBuilder *builder,
gunichar c;
g_value_init (value, G_TYPE_UINT);
c = g_utf8_get_char_validated (string, strlen (string));
if (c > 0)
if (c != 0 && c != (gunichar)-1 && c != (gunichar)-2)
g_value_set_uint (value, c);
return TRUE;
}
+8 -5
View File
@@ -947,23 +947,23 @@ subparser_end (GMarkupParseContext *context,
if (data->subparser->parser->end_element)
data->subparser->parser->end_element (context, element_name,
data->subparser->data, error);
if (!strcmp (data->subparser->start, element_name) == 0)
if (strcmp (data->subparser->start, element_name) != 0)
return;
gtk_buildable_custom_tag_end (GTK_BUILDABLE (data->subparser->object),
data->builder,
data->subparser->child,
element_name,
data->subparser->data);
g_free (data->subparser->parser);
if (GTK_BUILDABLE_GET_IFACE (data->subparser->object)->custom_finished)
data->custom_finalizers = g_slist_prepend (data->custom_finalizers,
data->subparser);
else
free_subparser (data->subparser);
data->subparser = NULL;
}
@@ -1216,6 +1216,8 @@ end_element (GMarkupParseContext *context,
PropertyInfo *prop_info = state_pop_info (data, PropertyInfo);
CommonInfo *info = state_peek_info (data, CommonInfo);
g_assert (info != NULL);
/* Normal properties */
if (strcmp (info->tag.name, "object") == 0 ||
strcmp (info->tag.name, "template") == 0)
@@ -1252,6 +1254,7 @@ end_element (GMarkupParseContext *context,
{
SignalInfo *signal_info = state_pop_info (data, SignalInfo);
ObjectInfo *object_info = (ObjectInfo*)state_peek_info (data, CommonInfo);
g_assert (object_info != NULL);
signal_info->object_name = g_strdup (object_info->id);
object_info->signals =
g_slist_prepend (object_info->signals, signal_info);
+56 -13
View File
@@ -25,6 +25,32 @@
#include <math.h>
#include <string.h>
/*
* Gets the size for a single box blur.
*
* Much of this, the 3 * sqrt(2 * pi) / 4, is the known value for
* approximating a Gaussian using box blurs. This yields quite a good
* approximation for a Gaussian. For more details, see:
* http://www.w3.org/TR/SVG11/filters.html#feGaussianBlurElement
* https://bugzilla.mozilla.org/show_bug.cgi?id=590039#c19
*/
#define GAUSSIAN_SCALE_FACTOR ((3.0 * sqrt(2 * G_PI) / 4))
#define get_box_filter_size(radius) ((int)(GAUSSIAN_SCALE_FACTOR * (radius)))
/* Sadly, clang is picky about get_box_filter_size(2) not being a
* constant expression, thus we have to use precomputed values.
*/
#define BOX_FILTER_SIZE_2 3
#define BOX_FILTER_SIZE_3 5
#define BOX_FILTER_SIZE_4 7
#define BOX_FILTER_SIZE_5 9
#define BOX_FILTER_SIZE_6 11
#define BOX_FILTER_SIZE_7 13
#define BOX_FILTER_SIZE_8 15
#define BOX_FILTER_SIZE_9 16
#define BOX_FILTER_SIZE_10 18
/* This applies a single box blur pass to a horizontal range of pixels;
* since the box blur has the same weight for all pixels, we can
* implement an efficient sliding window algorithm where we add
@@ -60,18 +86,37 @@ blur_xspan (guchar *row,
* only divide down after all three passes. (SSE parallel implementation
* of the divide step is possible.)
*/
for (i = -d + offset; i < row_width + offset; i++)
#define BLUR_ROW_KERNEL(D) \
for (i = -(D) + offset; i < row_width + offset; i++) \
{ \
if (i >= 0 && i < row_width) \
sum += row[i]; \
\
if (i >= offset) \
{ \
if (i >= (D)) \
sum -= row[i - (D)]; \
\
tmp_buffer[i - offset] = (sum + (D) / 2) / (D); \
} \
} \
break;
/* We unroll the values for d for radius 2-10 to avoid a generic
* divide operation (not radius 1, because its a no-op) */
switch (d)
{
if (i >= 0 && i < row_width)
sum += row[i];
if (i >= offset)
{
if (i >= d)
sum -= row[i - d];
tmp_buffer[i - offset] = (sum + d / 2) / d;
}
case BOX_FILTER_SIZE_2: BLUR_ROW_KERNEL (BOX_FILTER_SIZE_2);
case BOX_FILTER_SIZE_3: BLUR_ROW_KERNEL (BOX_FILTER_SIZE_3);
case BOX_FILTER_SIZE_4: BLUR_ROW_KERNEL (BOX_FILTER_SIZE_4);
case BOX_FILTER_SIZE_5: BLUR_ROW_KERNEL (BOX_FILTER_SIZE_5);
case BOX_FILTER_SIZE_6: BLUR_ROW_KERNEL (BOX_FILTER_SIZE_6);
case BOX_FILTER_SIZE_7: BLUR_ROW_KERNEL (BOX_FILTER_SIZE_7);
case BOX_FILTER_SIZE_8: BLUR_ROW_KERNEL (BOX_FILTER_SIZE_8);
case BOX_FILTER_SIZE_9: BLUR_ROW_KERNEL (BOX_FILTER_SIZE_9);
case BOX_FILTER_SIZE_10: BLUR_ROW_KERNEL (BOX_FILTER_SIZE_10);
default: BLUR_ROW_KERNEL (d);
}
memcpy (row, tmp_buffer, row_width);
@@ -218,8 +263,6 @@ _gtk_cairo_blur_surface (cairo_surface_t* surface,
* http://www.w3.org/TR/SVG11/filters.html#feGaussianBlurElement
* https://bugzilla.mozilla.org/show_bug.cgi?id=590039#c19
*/
#define GAUSSIAN_SCALE_FACTOR ((3.0 * sqrt(2 * G_PI) / 4) * 1.5)
int
_gtk_cairo_blur_compute_pixels (double radius)
{
+4 -7
View File
@@ -1253,17 +1253,14 @@ static gint
calendar_top_y_for_row (GtkCalendar *calendar,
gint row)
{
GtkAllocation allocation;
gint inner_border = calendar_get_inner_border (calendar);
GtkCalendarPrivate *priv = calendar->priv;
GtkBorder padding;
gint inner_border = calendar_get_inner_border (calendar);
gtk_widget_get_allocation (GTK_WIDGET (calendar), &allocation);
get_component_paddings (calendar, &padding, NULL, NULL, NULL);
return allocation.height
- padding.top - inner_border
- (CALENDAR_MARGIN + (6 - row)
* calendar_row_height (calendar));
return priv->header_h + priv->day_name_h + padding.top + inner_border
+ row * calendar_row_height (calendar);
}
/* row_from_y: returns the row 0-5 that the
+1 -1
View File
@@ -1093,7 +1093,7 @@ gtk_cell_renderer_set_padding (GtkCellRenderer *cell,
GtkCellRendererPrivate *priv;
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
g_return_if_fail (xpad >= 0 && xpad >= 0);
g_return_if_fail (xpad >= 0 && ypad >= 0);
priv = cell->priv;
+5
View File
@@ -168,6 +168,11 @@ gtk_cell_renderer_pixbuf_class_init (GtkCellRendererPixbufClass *class)
P_("Pixbuf for closed expander"),
GDK_TYPE_PIXBUF,
GTK_PARAM_READWRITE));
/**
* GtkCellRendererPixbuf:surface:
*
* Since: 3.10
*/
g_object_class_install_property (object_class,
PROP_SURFACE,
g_param_spec_boxed ("surface",
+2 -2
View File
@@ -1384,12 +1384,12 @@ gtk_cell_renderer_text_set_property (GObject *object,
case PROP_SIZE:
pango_font_description_set_size (priv->font,
g_value_get_int (value));
g_object_notify (object, "size-points");
g_object_notify (object, "size");
break;
case PROP_SIZE_POINTS:
pango_font_description_set_size (priv->font,
g_value_get_double (value) * PANGO_SCALE);
g_object_notify (object, "size");
g_object_notify (object, "size-points");
break;
}
+2 -2
View File
@@ -570,7 +570,7 @@ gtk_color_chooser_widget_init (GtkColorChooserWidget *cc)
connect_custom_signals (p, cc);
gtk_container_add (GTK_CONTAINER (box), p);
if (i == 8)
if (i == 9)
break;
}
g_variant_unref (variant);
@@ -734,7 +734,7 @@ add_custom_color (GtkColorChooserWidget *cc,
GList *children;
children = gtk_container_get_children (GTK_CONTAINER (cc->priv->custom));
if (g_list_length (children) >= 8)
if (g_list_length (children) >= 9)
{
last = g_list_last (children)->data;
gtk_widget_destroy (last);
+3 -1
View File
@@ -208,7 +208,9 @@ popup_edit (GtkWidget *widget,
focus = editor->priv->a_entry;
}
if (popup)
if (popup == editor->priv->current_popup)
dismiss_current_popup (editor);
else if (popup)
{
dismiss_current_popup (editor);
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (editor));
+1 -1
View File
@@ -309,7 +309,7 @@ scale_set_type (GtkColorScale *scale,
atk_object_set_name (atk_obj, C_("Color channel", "Hue"));
else if (type == GTK_COLOR_SCALE_ALPHA)
atk_object_set_name (atk_obj, C_("Color channel", "Alpha"));
atk_object_set_role (gtk_widget_get_accessible (GTK_WIDGET (scale)), ATK_ROLE_COLOR_CHOOSER);
atk_object_set_role (atk_obj, ATK_ROLE_COLOR_CHOOSER);
}
}
+17 -4
View File
@@ -43,6 +43,7 @@ struct _GtkColorSwatchPrivate
guint contains_pointer : 1;
guint use_alpha : 1;
guint selectable : 1;
guint has_menu : 1;
GdkWindow *event_window;
@@ -54,7 +55,8 @@ enum
{
PROP_ZERO,
PROP_RGBA,
PROP_SELECTABLE
PROP_SELECTABLE,
PROP_HAS_MENU
};
enum
@@ -84,6 +86,7 @@ gtk_color_swatch_init (GtkColorSwatch *swatch)
swatch->priv = gtk_color_swatch_get_instance_private (swatch);
swatch->priv->use_alpha = TRUE;
swatch->priv->selectable = TRUE;
swatch->priv->has_menu = TRUE;
gtk_widget_set_can_focus (GTK_WIDGET (swatch), TRUE);
gtk_widget_set_has_window (GTK_WIDGET (swatch), FALSE);
@@ -387,7 +390,7 @@ swatch_key_press (GtkWidget *widget,
event->keyval == GDK_KEY_KP_Enter ||
event->keyval == GDK_KEY_KP_Space)
{
if (swatch->priv->has_color &&
if (swatch->priv->has_color &&
swatch->priv->selectable &&
(gtk_widget_get_state_flags (widget) & GTK_STATE_FLAG_SELECTED) == 0)
gtk_widget_set_state_flags (widget, GTK_STATE_FLAG_SELECTED, FALSE);
@@ -551,7 +554,7 @@ tap_action (GtkGestureMultiPress *gesture,
}
else if (button == GDK_BUTTON_SECONDARY)
{
if (swatch->priv->has_color)
if (swatch->priv->has_color && swatch->priv->has_menu)
do_popup (GTK_WIDGET (swatch), button, gtk_get_current_event_time ());
}
}
@@ -609,7 +612,7 @@ swatch_realize (GtkWidget *widget)
gtk_widget_set_window (widget, window);
g_object_ref (window);
swatch->priv->event_window =
swatch->priv->event_window =
gdk_window_new (window,
&attributes, attributes_mask);
gtk_widget_register_window (widget, swatch->priv->event_window);
@@ -675,6 +678,9 @@ swatch_get_property (GObject *object,
case PROP_SELECTABLE:
g_value_set_boolean (value, gtk_color_swatch_get_selectable (swatch));
break;
case PROP_HAS_MENU:
g_value_set_boolean (value, swatch->priv->has_menu);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -697,6 +703,9 @@ swatch_set_property (GObject *object,
case PROP_SELECTABLE:
gtk_color_swatch_set_selectable (swatch, g_value_get_boolean (value));
break;
case PROP_HAS_MENU:
swatch->priv->has_menu = g_value_get_boolean (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -762,10 +771,14 @@ gtk_color_swatch_class_init (GtkColorSwatchClass *class)
g_object_class_install_property (object_class, PROP_SELECTABLE,
g_param_spec_boolean ("selectable", P_("Selectable"), P_("Whether the swatch is selectable"),
TRUE, GTK_PARAM_READWRITE));
g_object_class_install_property (object_class, PROP_HAS_MENU,
g_param_spec_boolean ("has-menu", P_("Has Menu"), P_("Whether the swatch should offer customization"),
TRUE, GTK_PARAM_READWRITE));
gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_COLOR_SWATCH_ACCESSIBLE);
}
/* Public API {{{1 */
GtkWidget *

Some files were not shown because too many files have changed in this diff Show More