Compare commits

...

213 Commits

Author SHA1 Message Date
Tobias Bannert 6717c5ba00 Updated German translation 2016-03-17 09:08:47 +00:00
Cédric Valmary 8973ed8412 Updated Occitan translation 2015-05-29 20:32:45 +00:00
Cédric Valmary 0cf24bcf41 Updated Occitan translation 2015-05-15 16:29:05 +00:00
Kenneth Nielsen 52dc7c7f89 Reverted file accidentally commited to wrong branch 2014-09-17 18:43:30 +02:00
Ask H. Larsen d7c394899f Update Danish translation of properties 2014-09-17 18:34:53 +02:00
Kenneth Nielsen 5f3dc31675 Updated Danish translation of the properties 2013-10-07 22:53:06 +02:00
Nik Kalach c89d1b11f6 [l10n] Update Interlingua translation 2013-04-24 16:01:13 +02:00
Мирослав Николић 83ec149b51 Updated Serbian translation 2013-03-13 09:23:51 +01:00
Geoff Reedy fad0e7c43f x11: add missing checks that a hint is supported
Before acting on any hint that is set by the window manager we must
first check that the hint is supported by the current window manager.
Checking that a property has a value is insufficient as it may have
been set by a previous window manager which did support the hint.

https://bugzilla.gnome.org/show_bug.cgi?id=691515
2013-01-17 21:13:37 -05:00
Balázs Úr 7e3f14d0a7 Updated Hungarian translation 2012-12-27 21:09:01 +01:00
Stéphane Démurget f9fb0e8ae4 gtkmenushell: Fix an endless loop on focus cycle
This is a simple fallout from sealing gtkmenushell, which only appears
when F10 or Shift-F10 is used in a submenu.

https://bugzilla.gnome.org/show_bug.cgi?id=690266
2012-12-17 16:07:38 +01:00
Marek Kasik 1d521344ee printing: Call mark_printer_active() with correct parameters
Revert the second part of the commit
6ad6f719c6. mark_printer_active()
was called without its second parameter in g_list_free_full().
2012-12-04 15:52:29 +01:00
Benjamin Berg 7675a52d70 Use the ppd groups "name" instead of "text" (bug #687065)
This commit fixes a regression caused by a patch to remove Cups 1.2
ifdefs. This resulted in the "installable options" to appear in the
print dialog.
2012-11-29 10:08:56 +01:00
Sasi Bhushan d4e03477c6 Updated Telugu translations 2012-10-16 13:01:19 +05:30
Shankar Prasad 22962dce5c Updated kn translation 2012-09-23 01:49:48 +05:30
Shankar Prasad 6e0096f37f Updated kn translation 2012-09-23 01:49:05 +05:30
Marek Kasik 1f20360ce0 printing: Add "Custom." prefix only once to paper size
Check whether "Custom." prefix is already present in the name
of selected paper size. (#679883)
2012-09-19 18:30:37 +02:00
Chun-wei Fan 50f23810c3 gtkimcontexttime.c: Check context_ime->client_window is not NULL
Be a bit more careful in get_pango_attr_list() and
get_utf8_preedit_string() to ensure that the client_window is properly
created before proceeding, to avoid access violation/segfault crashes on
Windows with IME installed, especially when running the pickers demo.

https://bugzilla.gnome.org/show_bug.cgi?id=682919
2012-09-14 15:13:52 +08:00
Alexandre Franke 9bcbee0173 Fix French translation
po/fr.po was overwritten instead of po-properties/fr.po in commit bb65a54f15.
2012-09-09 20:03:41 +02:00
Alexandre Franke bb65a54f15 Update French translation 2012-09-09 19:46:33 +02:00
Marek Kasik 47f57da2a0 printing: Don't load custom paper sizes in file backend
Resolves #683474.
2012-09-06 15:10:17 +02:00
Marek Černocký 88759859e5 Updated Czech translation 2012-09-05 10:44:29 +02:00
Sebastian Geiger a1bcab9f86 [GtkFileChooserButton] bgo#645065 - Restore the previously-selected file when the button's GtkFileChooserDialog is canceled
The file chooser is asynchronous, so doing 'select_file (old_file)' and subsequently querying
the file for updating the labels is not going to work.  However, the underlying file chooser
will emit 'selection-changed' as appropriate when it finishes restoring the old file.  So,
we only need to update the labels when the file chooser dialog is confirmed, not cancelled.
2012-08-31 12:02:26 -05:00
YunQiang Su 25a760ebf6 fix an typo in zh_CN translation 2012-08-18 11:19:28 +08:00
Gil Forcada 8af5fe309f [l10n] Updated Catalan translation 2012-08-12 13:56:26 +02:00
Nilamdyuti Goswami c1c146980c Assamese translation updated 2012-08-08 20:35:38 +05:30
Nilamdyuti Goswami 8e8490aff8 Assamese translation updated 2012-08-08 18:03:21 +05:30
Michael Natterer 71df007dd0 gtk: ref the action around gtk_action_emit_activate()
for the same reason we already ref the action's group in the function.
(cherry picked from commit ebe50bbecb)
2012-08-03 23:38:08 +02:00
René Stadler ab97556660 iconview: fix get_tooltip_context transfer annotation
Just like treeview.

https://bugzilla.gnome.org/show_bug.cgi?id=681005
2012-08-01 19:12:03 +02:00
Funda Wang 55148ae25d fix bug#680901: translations of "even sheet" and "odd sheet" are wrong 2012-07-31 22:07:29 +00:00
Fran Diéguez b7b5d7ae37 Updated Galician translations 2012-07-27 12:21:56 +02:00
Chun-wei Fan 0220a2d961 Visual C++ property sheets: Remove wrong "install" line
We have gailutil-3.0.lib, not gailutil.lib...
2012-07-26 18:03:17 +08:00
Praveen Illa 4e5f332a5f Updated Telugu Translation 2012-07-26 10:54:56 +05:30
Wolfgang Stoeggl fab4492319 Updated German translation 2012-07-22 21:43:02 +02:00
Matej Urbančič 322cb7049f Updated Slovenian translation 2012-07-19 09:30:47 +02:00
Sasi Bhushan Boddepalli 2d1415c8b5 Updated Telugu Translation 2012-07-17 17:30:11 +05:30
Sasi Bhushan Boddepalli c0dfe33224 Updated Telugu Translation 2012-07-17 17:29:35 +05:30
Rui Matos fbe14d2dec GtkTreeModelFilter: Fix _iter_previous() when iter points at 2nd node
GSequence iterators point at the position between two elements so an
iterator pointing at the N tree model node is actually between the N-1
and N sequence elements. This means that asking for the previous
sequence iterator first and then checking if it is the begin iterator
would yeld true for an iterator pointing at the 2nd tree model node
and make us return FALSE mistakenly.

https://bugzilla.gnome.org/show_bug.cgi?id=679910
2012-07-17 10:52:48 +02:00
Rui Matos 9414823356 tests/filtermodel: Add test for bug 679910 2012-07-17 10:52:45 +02:00
Daniel Mustieles c1210e5bb1 Updated Spanish translation 2012-07-16 17:13:45 +02:00
Piotr Drąg 865a050d16 Updated Polish translation 2012-07-15 23:31:39 +02:00
Matthias Clasen 16abdd8d1d Bump version 2012-07-15 14:01:43 -04:00
Matthias Clasen cc39961694 Update expected test output
This was affected by the change to add stock icons to the
assistant butons.
2012-07-15 13:27:19 -04:00
Matthias Clasen 2778939ad2 Fix the infobar builder test 2012-07-15 13:23:28 -04:00
Matthias Clasen 9c1df66a2e Updates 2012-07-15 12:58:40 -04:00
Matthias Clasen a7074f6c4e Fix preview sizing in GtkFontSelection
The code that was trying to limit preview size changes was
running into some width-for-height pitfalls. It turns out
that the dialog behaves quite ok without this code, so just
remove it.
2012-07-15 12:58:40 -04:00
Emmanuele Bassi a50d8ee062 Ensure that XDG_DATA_HOME is created before using it
The recently-used.xbel storage for recently used files is located inside
the $XDG_DATA_HOME directory; there's no actual guarantee that the
directory has been created already, even though it's very highly
probable on any modern distribution. We should create it, along with its
intermediate parents, before constructing the file monitor that we use
to get change notifications.

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

https://bugzilla.gnome.org/show_bug.cgi?id=667808
2012-07-15 12:58:39 -04:00
Micah Carrick 9953f524e5 Fix typo replacing action "Parse" with "Paste"
The builder XML description has an action for "win.parse" but the
application is looking for "win.paste". Rename the label to
"_Paste" and the action to "win.paste" in the window action XML.

https://bugzilla.gnome.org/show_bug.cgi?id=678829
2012-07-15 12:58:39 -04:00
Phil Clayton 94910512f4 Change signal parameter names in GdkWindow to be valid C identifiers
https://bugzilla.gnome.org/show_bug.cgi?id=679228
2012-07-15 12:58:39 -04:00
Víctor Manuel Jáquez Leal 74f82fe97f docs: link against libgdk-3.la
https://bugzilla.gnome.org/show_bug.cgi?id=679409
2012-07-15 12:58:38 -04:00
Antoine Jacoutot 9b760d4a6e OpenBSD: use G_N_ELEMENTS instead of nitems
nitems is never guaranteed to be defined in sys/params.h as it is meant
to be defined within a protected ifdef __KERNEL conditional.
Use G_N_ELEMENTS from GLib which is the proper way of doing this.
2012-07-15 12:58:38 -04:00
Benjamin Otte 5328cb71db a11y: Don't mess up if column gets hidden
We were using a function that insisted on visible columns for computing
the potential ID of an invisible column. Not good.

https://bugzilla.gnome.org/show_bug.cgi?id=675990
2012-07-15 12:58:38 -04:00
Cosimo Cecchi 1f415e86d8 modelmenu: listen for toplevel changes on the attach widget
Right now, when we create a GtkModelMenu for a GMenuModel, we listen to
changes to the menu's attach-widget to detect when a toplevel
GtkApplicationWindow becomes available to fetch actions from it.

This unfortunately breaks this simple code:

  GtkWidget *application_window = gtk_application_window_new();
  GtkWidget *menu_button = gtk_menu_button_new();
  GMenuModel *menu_model = get_menu_model();

  gtk_menu_button_set_menu_model(menu_button, menu_model);
  gtk_container_add(GTK_CONTAINER(application_window), menu_button);

Since GtkMenuButton creates a GtkModelMenu and sets itself as its attach
widget before it's added to a hierarchy containing a
GtkApplicationWindow.

Fix the bug by simply listening for changes in the window hierarchy, and
creating the menu model when the attach widget is added to an
application window.

https://bugzilla.gnome.org/show_bug.cgi?id=679454
2012-07-15 12:58:37 -04:00
Cosimo Cecchi 5aae0040f7 menu: notify attach-widget property when menu is detached
When the menu is detached, the attach-widget property changes value to
NULL, so we should notify a property change, like
gtk_menu_attach_to_widget() does.

https://bugzilla.gnome.org/show_bug.cgi?id=679454
2012-07-15 12:58:37 -04:00
Cosimo Cecchi 0f3d475c25 modelmenu: set the accel group on the GtkMenu
Or the accelerators added for actions in the menu won't be displayed in
the menu items.

https://bugzilla.gnome.org/show_bug.cgi?id=679166
2012-07-15 12:58:36 -04:00
Ryan Lortie 75aefaf32c GActionMuxer: disconnect group signals on finalize
The signals for the action group were being disconnected when the action
group was explicitly removed from the GActionMuxer but the same was not
being done when it was finalized.

This means that a change in the state of an action group that used to be
associated with a finalized GActionMuxer would result in a crash.  This
would happen for stateful application actions after closing a window.
2012-07-15 12:58:36 -04:00
Cosimo Cecchi f245f370b0 radiobutton: add missing (element-type) annotation for radio groups
The GSLists should specify their element-type in every annotation. We
are missing some.

https://bugzilla.gnome.org/show_bug.cgi?id=677127
2012-07-15 12:58:36 -04:00
Cosimo Cecchi 58f9d23244 menu: add missing (scope async) annotation to gtk_menu_popup()
Or the g-i scanner will emit a warning.

https://bugzilla.gnome.org/show_bug.cgi?id=677127
2012-07-15 12:58:35 -04:00
Matthias Clasen 21a3c4ae70 GdkDevice: Fix an inverted assertion
gdk_device_list_slave_devices only makes sense to call on master
devices, yet its g_return_if_fail check made it reject such devices.

Pointed out by monty.
2012-07-15 12:58:35 -04:00
Dan Vrátil 13c0e8f8f7 Fix a memory leak in GtkImage
https://bugzilla.gnome.org/show_bug.cgi?id=678175
2012-07-15 12:58:34 -04:00
Jasper St. Pierre 8fd32fc9bb assistant: Set the proper stock images on the proper buttons
Copy/paste typo.
2012-07-15 12:58:34 -04:00
Cosimo Cecchi 6f6b5c81ea entry-completion: don't move to leftmost character with inline-selection
When inline-selection is set, and the completion popup is showing,
pressing left abruptly jumps to the beginning of the entry text.
This is not expected, since the cursor is at the end of the text before
the left key is pressed, and this behavior is completely inconsistent
with how an entry would normally behave.
The behavior can be observed in Epiphany by selecting a completion match
and pressing left.

This patch changes the code so that it just runs the default entry key
press keybindings in such a case.

https://bugzilla.gnome.org/show_bug.cgi?id=677915
2012-07-15 12:58:34 -04:00
Matthias Clasen 11150d7bb9 fix a typo 2012-07-15 12:58:33 -04:00
Martin Pitt d53732ad0c liststore: Make gtk_list_store_reorder() introspectable
Mark the new_order argument as zero-terminated array, even though it does not
need to be zero terminated (it has an implicit length not given by a constant
or another method argument). It does not hurt if bindings append an extra zero
to the array as long as it has enough elements, and this makes the method
introspectable.

https://bugzilla.gnome.org/show_bug.cgi?id=677941
2012-07-15 12:58:33 -04:00
Cosimo Cecchi 195da30575 spinbutton: fix a typo
GTK_STATE_* -> GTK_STATE_FLAG_*
2012-07-15 12:58:33 -04:00
Matthias Clasen f812772037 Update docs for GtkEntry::activate
Remove the 'you shall not connect' message from this signal.
While it is a keybinding signal, using it from applications is
fine and, in fact, expected.
2012-07-15 12:58:32 -04:00
Torsten Schönfeld 82972adbba gdk: annotate the attributes_mask type for gdk_window_new
https://bugzilla.gnome.org/show_bug.cgi?id=670369
2012-07-15 12:58:32 -04:00
Torsten Schönfeld 68fe504733 gdk: add a missing annotation to GdkEventProperty
Its 'state' field is of type GdkPropertyState.

https://bugzilla.gnome.org/show_bug.cgi?id=677775
2012-07-15 12:58:31 -04:00
Torsten Schönfeld 2138dfa393 gdk: add missing annotations to gdk_event_get_scroll_deltas
https://bugzilla.gnome.org/show_bug.cgi?id=677774
2012-07-15 12:58:31 -04:00
Cosimo Cecchi 24ccf3e35d a11y: fix a typo leading to a crash
text can't be NULL here, or we would have failed way earlier.
The original code from gail returned if the renderer text was NULL, and
we have to do that, or we'll end up calling e.g.
g_utf8_offset_to_pointer() on a NULL pointer.

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

https://bugzilla.gnome.org/show_bug.cgi?id=677551
2012-07-15 12:58:31 -04:00
Cosimo Cecchi 424647137f tests: add an unit test for the previous commits
https://bugzilla.gnome.org/show_bug.cgi?id=677649
2012-07-15 12:58:30 -04:00
Cosimo Cecchi e985a2ac0f treestore: fix transformation of GValues on set
There are three bugs here:
- we should check if the value type is transformable instead of being
  compatible, since that's all we care about in order to call
  g_value_transform()
- the check is only meaningful in the direction
  passed-in-type->column-type and not viceversa
- we should init the destination GValue to the column type before
  calling g_value_transform on it, or the destination type information
  will be missing and the method will fail

Thanks to Jasper St. Pierre and Colin Walters for all the help in
tracking this down.

https://bugzilla.gnome.org/show_bug.cgi?id=677649
2012-07-15 12:58:30 -04:00
Cosimo Cecchi d4b3e4d97b liststore: fix transformation of GValues on set
There are three bugs here:
- we should check if the value type is transformable instead of being
  compatible, since that's all we care about in order to call
  g_value_transform()
- the check is only meaningful in the direction
  passed-in-type->column-type and not viceversa
- we should init the destination GValue to the column type before
  calling g_value_transform on it, or the destination type information
  will be missing and the method will fail

Thanks to Jasper St. Pierre and Colin Walters for all the help in
tracking this down.

https://bugzilla.gnome.org/show_bug.cgi?id=677649
2012-07-15 12:58:30 -04:00
Marc-Antoine Perennou aa350e5aef build: Fix MKDIR_P for recent automake
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2012-07-15 12:58:29 -04:00
Bastian Winkler 74041bb6ea grid: Add missing guard to gtk_grid_get_child_at()
Add missing guard to make sure it's called with a GtkGrid argument.

https://bugzilla.gnome.org/show_bug.cgi?id=677363
2012-07-15 12:58:29 -04:00
Matthias Clasen 253d8037ec Remove gtk_accel_group_query from the docs
It is marked as "internal" in the headers, and the struct it
returns is not documented either.
2012-07-15 12:58:28 -04:00
Matthias Clasen 494f3cc9cd Link to the 2.x deprecated index in the migration guide 2012-07-15 12:58:28 -04:00
Matthias Clasen 6235545ce7 Document "set" properties a bit
Both GtkTextTag and GtkCellRenderer make use of "set" properties
which are a bit special. Document this.

https://bugzilla.gnome.org/show_bug.cgi?id=531319
2012-07-15 12:58:28 -04:00
Matthias Clasen 167df3ea03 Correct the docs for GDK_MSB_FIRST
https://bugzilla.gnome.org/show_bug.cgi?id=571254
2012-07-15 12:58:27 -04:00
Matthias Clasen 5a6897659e Mention cairo_save/restore in the ::draw migration docs
https://bugzilla.gnome.org/show_bug.cgi?id=646798
2012-07-15 12:58:27 -04:00
Matthias Clasen 9e5ad61f71 Reword lockbutton docs
https://bugzilla.gnome.org/show_bug.cgi?id=659613
2012-07-15 12:58:26 -04:00
Matthias Clasen 65d477ea27 Clarify the gtk_style_context_add_provider docs
https://bugzilla.gnome.org/show_bug.cgi?id=643490
2012-07-15 12:58:26 -04:00
Matthias Clasen 7f7ed154d8 Mention GTK_DIALOG_NO_SEPARATOR in migration docs
http://bugzilla.gnome.org/show_bug.cgi?id=647779
2012-07-15 12:58:26 -04:00
Matthias Clasen 8190fae7f1 GtkToolbar: Prevent accidental drag starts
We don't want to start drags on double- or triple clicks, and
doing so causes problems for embedded range widgets.

https://bugzilla.gnome.org/show_bug.cgi?id=675535
2012-07-15 12:58:25 -04:00
Matthias Clasen e9425fa7df Fix the build on Solaris
http://bugzilla.gnome.org/show_bug.cgi?id=663991
2012-07-15 12:58:25 -04:00
Christian Kirbach 1e62a5333b Updated German translation 2012-07-15 18:22:08 +02:00
Emmanuele Bassi 7feef179c5 docs: Escape bare '#' in GdkRGBA string definitions
GTK-Doc does not like bare '#', so let's turn them into &num;.
2012-07-15 00:52:45 -04:00
Руслан Ижбулатов 05e960d303 docs: libgailutil is now called libgailutil-3 2012-07-15 00:52:37 -04:00
Matthias Clasen 770e564675 Add since annotations to some enum values
The things related to touch and smooth scrolling were 3.4 additions,
so mark them as such.

https://bugzilla.gnome.org/show_bug.cgi?id=676329
2012-07-15 00:52:27 -04:00
Holger Berndt e344f795b4 Document removing of accelerators
https://bugzilla.gnome.org/show_bug.cgi?id=676243
2012-07-15 00:52:01 -04:00
Matthias Clasen 4f34e0db3d gtk-demo: Update language in colorsel demo
We're no longer demoing GtkColorSelection, it is GtkColorChooser now.
2012-07-15 00:51:47 -04:00
Matthias Clasen 40260587e1 file printbackend: Protect a callback by GDK_THREADS_ENTER
https://bugzilla.gnome.org/show_bug.cgi?id=649569
2012-07-15 00:51:25 -04:00
Volker Sobek 0d69020d6c doc: Add missing CDATA around a XML programlisting
https://bugzilla.gnome.org/show_bug.cgi?id=675423
2012-07-15 00:51:06 -04:00
Cosimo Cecchi e99ac6c531 entry: guard for != NULL before unreffing the pixbuf
In gtk_entry_get_icon_pixbuf() we unreference the pixbuf that
_gtk_icon_helper_ensure_pixbuf() gives us back, since the function
doesn't return a reference, and by doing so we're able to return the
reference owned by the cached icon helper.
Since the icon helper method can return NULL though, if no icon
properties have been set on it, guard for != NULL before unreffing the
pixbuf, as that would cause a critical warning.

https://bugzilla.gnome.org/show_bug.cgi?id=679537
2012-07-09 11:22:20 -04:00
Alexander Larsson 72feb95edb Handle transparent colors better in GtkStyle emulation
We can't expose colors with alpha in the GtkStyle colors, since
GdkColor has no alpha. Currently we throw away alpha completely,
which fails very badly for completely transparent backgrounds,
which now is the default for most widgets, as it typically
end up with black-on-black.

We handle this by falling back on the default/previous colors for
transparent colors. This is is simple and avoids complete failure.

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

(cherry picked from commit 1042372670)
2012-06-30 13:24:43 -04:00
Chun-wei Fan 2c01d52a7e Bug 676077: Fix handling of Keyboard Input on Windows
Don't use ASCII control characters to denote the input of Esc, Tab,
Return/Enter, Backspace and Delete, as it seems that it is not how
Windows handle them, and they cause weird characters to appear in the
input field on GTK+3 programs in non-English Windows.  Instead, let
these keys be handled as-is on Windows, like what is done in GTK+-2.x.

Checked with mclasen on IRC, and thanks to the people who verified the
patch to not break anything on English Windows.
2012-06-25 23:24:38 +08:00
Shankar Prasad 6528476bcf Fixed the issue reported in Bug #613561 2012-06-22 16:28:35 +05:30
Pavel Holejsovsky 93264446bb GtkImage: fix get_property('stock')
The code was trying to get icon's name instead of icon's stock-id.

https://bugzilla.gnome.org/show_bug.cgi?id=678407
2012-06-19 16:27:42 +02:00
Benjamin Otte f4bd8a161c iconview: Special case the empty iconview
If the icon view is empty, we cannot get a reasonable size request from
the cell renderers. So all values we would compute are pretty much
useless.
So we special case it.

This also gets rid of a bunch of crashers from div-by-0 in corner cases.

https://bugzilla.gnome.org/show_bug.cgi?id=677809
2012-06-19 14:21:15 +02:00
Benjamin Otte d5685b391e iconview: Add a descriptive function
I want to special-case empty icon views in the sizing code to avoid
various bugs, and having such a function is nice.
2012-06-19 14:21:15 +02:00
Benjamin Otte 265e65f7a3 iconview: Ensure icons are at least 1x1 pixels
This is useful for 2 reasons:
(1) Items actually exist and are clickable
(2) Size computations don't divide by 0

I've not seen problems with this in the wild (mostly because
item-padding defaults to non-0), but noticed this while fixing other
bugs.
2012-06-19 14:21:15 +02:00
Benjamin Otte cb190f7d2a iconview: Include column spacing in calculation
The function is probably almost never used, so nobody has ever seen this
bug, but we should still get it right.

https://bugzilla.gnome.org/show_bug.cgi?id=677809
2012-06-19 14:21:15 +02:00
Benjamin Otte 29da4cf295 iconview: clamp item size to be in [minimum, natural]
Minimum size is necessary so you can see the item. If we can't get that
we need to scroll.
Natural as the maximum is used so that the spacing between items doesn't
increase when resizing the iconview, but empty space is added to the
right/bottom instead.

https://bugzilla.gnome.org/show_bug.cgi?id=677809
2012-06-19 14:21:15 +02:00
Benjamin Otte a3018f97c8 iconview: Don't add item-padding
... to item sizes when there are no items.
2012-06-19 14:21:15 +02:00
Benjamin Otte a1c8c8af85 iconview: Add documentation abour different sizes
Did I mention I hate code that has different kinds of "boxes" or
coordinate systems but no clear way to distinguish them?
It's all ints here...

https://bugzilla.gnome.org/show_bug.cgi?id=677809
2012-06-19 14:20:39 +02:00
Hans de Goede 99a6b4ffa8 iconview: gtk_icon_view_compute_n_items_for_size bugfix
While working on the "iconview: Don't shrink items" patch I noticed that
gtk_icon_view_compute_n_items_for_size modifies the natural and minimum
item sizes it got from gtk_icon_view_get_preferred_item_size when
calculating the max number of items which will fit, but later on it
checks against these sizes when calculating the item_size, and these
checks expect these values to be unmodified.

This patch fixes this by modifying the natural and minimum values in
advance and doing all computations with modified values.

https://bugzilla.gnome.org/show_bug.cgi?id=677809
2012-06-19 14:20:39 +02:00
Benjamin Otte eb74c6f7d0 iconview: Don't shrink items
The previous code assumed that the width was always enough for more than
one column, which is obviously not correct when a number of columns is
hardcoded.

With this patch, it will now always check that the width is enough and
otherwise cause scrolling.

https://bugzilla.gnome.org/show_bug.cgi?id=677809
2012-06-19 14:20:33 +02:00
Matthias Clasen 98ad869c9a Fix up the deprecation annotation for gtk_widget_get_pointer
When I added the versioned annotation, I accidentally backdated
it, so the Deprecated: tag in the docs said 3.4, but the annotation
said 3.0. Fix it so we say 3.4 in both places.
2012-06-13 19:10:56 -04:00
Christian Persch 580a83b1ab application: Really allow NULL application-id
While the docs were adjusted to claim that NULL application-id is allowed,
the code actually segfaulted on it.
(cherry picked from commit 69d6e7110094fed2cc8770683ac57a61f84949ff)
2012-06-12 16:15:31 +02:00
Matthias Clasen 0634796aa6 GtkFontSel: Don't try to set the cursor on invalid iters
This causes a lot of warnings.
https://bugzilla.gnome.org/show_bug.cgi?id=677293
2012-06-01 17:15:02 -04:00
Matthias Clasen 344d5cd1b4 GtkFontSelection: Populate list models atomically
This is just a cosmetic fix.
2012-06-01 17:14:52 -04:00
Matthias Clasen 20083af049 Fix build with --enable-debug
(cherry picked from commit 18db64749f)
2012-05-26 20:45:59 -04:00
Christian Kirbach 9fb442c254 [l10n] Updated German translation 2012-05-19 11:39:45 +02:00
Owen W. Taylor f31856dc02 GtkPlug: fix handling of key events for different layouts
GtkPlug directly handles X KeyPress/Release events, instead of using
translation in GDK (which expects XI2 events for XI2). When this
was done, the handling of the group was stubbed out and never replaced.

Export gdk_keymap_x11_group_for_state() and gdk_keymap_x11_is_modifier()
so we can fill out the fields correctly.

Backported-By: Ray Strode

https://bugzilla.gnome.org/show_bug.cgi?id=675167
2012-05-18 21:13:27 -04:00
Ray Strode 50ea273bc1 gtkuimanager: don't use g_clear_pointer
it's too new and cool to hang out with gtk+ 3.4.
2012-05-18 19:21:53 -04:00
Juan Pablo Ugarte e83ec9359c Chain up custom_tag_start() propertly.
Fixes bug #675899 "Infobar not loadable by GTKBuilder (using python gi introspection)"
2012-05-18 19:28:04 -03:00
Bastien Nocera 375a297b2c statusicon: Fix implicit declaration warning
gtkstatusicon.c:1333:4: warning: implicit declaration of function 'abs' [-Wimplicit-function-declaration]

Added in commit c837809960
2012-05-17 15:17:55 -04:00
Fernando Lemos e694bd75f6 statusicon: use absolute delta to find the nearest icon size
Otherwise, if we only look at (pixel_size - stock_size), we miss the
case when the pixel size is smaller than any provided stock size.

https://bugzilla.gnome.org/show_bug.cgi?id=673749
2012-05-17 15:17:55 -04:00
Bastien Nocera 2e51d827de gdkoffscreenwindow: Fix compilation
https://bugzilla.gnome.org/show_bug.cgi?id=676262
2012-05-17 18:49:09 +01:00
Matthias Clasen 18de282771 Fix a case of 'stuck grab'
This was showing up when using a combo box in list mode. After popping
up the list, the keyboard grab appeared stuck. What was stuck here is
only the client-side grab, since we forgot to clean up our grabs
when receiving an UnmapNotify.

This bug was introduced in 1c97003664.
2012-05-16 18:19:23 -04:00
Matthias Clasen 48786a3dbc Be more careful when freeing ui manager nodes
https://bugzilla.redhat.com//show_bug.cgi?id=812035 has
a stacktrace that shows recursion via
free_node -> unref -> dispose -> ui manager api
which ends in a crash, since we run free_node over the entire
tree and it leaves lots of dangling pointers behind.
So, better be careful by setting all pointers to NULL after
freeing them.
2012-05-16 18:19:23 -04:00
Martin Pitt 4b2e929774 grid: add missing transfer annotation
gtk_grid_get_child_at() is missing a transfer annotation for the returned
widget, making it not introspectable.
2012-05-16 18:02:26 +02:00
Bastien Nocera f78cf0806b gdkoffscreenwindow: Don't crash when resetting cursor
When the toplevel is a GdkOffscreenWindow which doesn't
implement the set_device_cursor() vfunc, we would have
crashed. Implement a dummy ->set_device_cursor vfunc.

https://bugzilla.gnome.org/show_bug.cgi?id=675809
2012-05-15 18:24:21 +01:00
Andika Triwidada 8d08ae00e3 [l10n] Updated Indonesian translation 2012-05-15 22:44:19 +07:00
Matthias Clasen c48cc7f1c6 iconview: Bring back rtl flipping
This was lost in the recent layout rewrite.
2012-05-15 08:08:13 -04:00
Edward Sheldrake a3314b5c40 GDK X11 DND: Fix infinite loop
Related: https://bugzilla.gnome.org/show_bug.cgi?id=664646
2012-05-15 08:08:13 -04:00
Frédéric Péters 03be723395 Fix links to developer.gnome.org 2012-05-13 19:46:17 +02:00
Matthias Clasen 7ee4667bea Bump version 2012-05-11 19:23:47 -04:00
Matthias Clasen 4668d8c579 Fix distcheck 2012-05-11 19:22:45 -04:00
Matthias Clasen 2b68bab9ab Update for 3.4.3 2012-05-11 18:33:17 -04:00
Cosimo Cecchi 4ba4ee03ae box: set orientation style classes when setting orientation
Since we override the property, we have to call the internal helper
manually.
2012-05-11 18:00:39 -04:00
Bastien Nocera c2d436bafb gtk: Fix warnings for some uses of GtkLinkButton
Not setting a URI but catching the activate-link signal is a
valid use of GtkLinkButton, but we shouldn't allow showing a
popup menu which offers to copy the URI if there's none.
2012-05-11 18:00:23 -04:00
Michael Natterer e30d8f8a5a quartz: add a special case to GtkIMContextSimply for entering '"'
Turn dead_doubleacute plus space into '"' and not into a double
acute because that's the way to enter double quotes on the
US-International keyboard layout.
(cherry picked from commit 71164e57b9)
2012-05-11 18:00:13 -04:00
Michael Natterer df4d6154db quartz: handle yet another dead tilde variant
which is delivered by the US-International keyboard layout.
2012-05-11 17:59:52 -04:00
Rico Tzschichholz d72a712eed gtk: Add private headers to EXTRA_DIST
This got lost with 985881ffcc
2012-05-11 17:59:41 -04:00
John Ralls 0036683db7 [Bug 675501] gtkquartz.h is not in the gtk+-3.5.2.tar.xz archive
Rearrange the gtk_private_h_sources so that they're all added to EXTRA_DIST instead of only the ones included in the current build.
2012-05-11 17:59:06 -04:00
Federico Mena Quintero 438e1ea08b bgo#675421 - Set the wm_role on GtkFileChooserDialog
The window's role is 'GtkFileChooserDialog', so that window managers can match it
for positioning.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2012-05-11 17:58:37 -04:00
Marc-André Lureau e5246cabb6 gdk: do not send leave event on touchpad button release
This is along the changes introduced in
bd55519f7e,
A TOUCHPAD device behaves like a mouse"

https://bugzilla.gnome.org/show_bug.cgi?id=674549
2012-05-11 17:58:10 -04:00
Cosimo Cecchi a68d903b1a entry-completion: set size request on the toplevel window
Instead of setting it on the child scrolled window. This is needed
because the whole window's allocation must be equal to the one of the
entry (in case the popup-set-width property is TRUE); if we set the size
request on a children of the window, there might be other children with
borders/paddings in between the toplevel and the child we set the size
request too, which will break alignment.

https://bugzilla.gnome.org/show_bug.cgi?id=672947
2012-05-11 17:57:59 -04:00
Cosimo Cecchi 302696b4c8 entry-completion: don't subtract entry borders from popup allocation
The completion popup should be aligned with the GtkEntry allocation, not
less than that.

https://bugzilla.gnome.org/show_bug.cgi?id=672947
2012-05-11 17:57:52 -04:00
David King f20290479b docs: Improve GtkMessageDialog description
Add mention of default setting of GtkWindow:skip-taskbar-hint.

https://bugzilla.gnome.org/show_bug.cgi?id=587873
2012-05-11 17:57:41 -04:00
David King 8cf5b21797 docs: Move GtkSelectionData to gtk3-Selections
Put the (albeit empty) documentation for the GtkSelectionData struct
with the gtk_selection_data_*() methods.

https://bugzilla.gnome.org/show_bug.cgi?id=663072
2012-05-11 17:57:35 -04:00
David King 08159c8317 docs: Correct gtk_tree_row_reference_new() description
Remove the text that mentions listening to tree model signals, and
instead say that any changes are automatically propagated.

https://bugzilla.gnome.org/show_bug.cgi?id=478344
2012-05-11 17:57:26 -04:00
Rui Matos fe48111e60 window: Remove needless call to ensure_state_flag_backdrop() on map
This call was forcing needless work since gtk_window_map() already
does a gdk_window_show() which initially sets GDK_WINDOW_STATE_FOCUSED
that we then handle regularly on the widget's window state event
handler.

https://bugzilla.gnome.org/show_bug.cgi?id=673237
2012-05-11 17:57:07 -04:00
Michael Biebl 79149defd0 build: Fix out-of-tree build of widget-factory demo application
https://bugzilla.gnome.org/show_bug.cgi?id=674192
2012-05-11 17:56:57 -04:00
Matthias Clasen e28b927c05 Remove lies
We forgot the documentation when we simplified the GtkApplication
session api.
2012-05-11 17:44:33 -04:00
Matthias Clasen 2aa69bde73 Fix unclosed comments 2012-05-11 16:11:43 +02:00
Benjamin Otte f66e835aa9 iconview: Don't draw unallocated items
This is more a workaround for Clutter-GTK than anything else. Most of
all, it makes gnome-boxes start again.
2012-05-11 16:09:28 +02:00
Benjamin Otte 2d8655eebf iconview: Only compute item sizes in one place
Code was using different places to compute the icon size when layouting
and when doing size requests. This resulted in non-matching behavior in
obscure cases. And that lead to iconviews that were too small.
2012-05-11 16:09:19 +02:00
Benjamin Otte f3cde19426 iconview: Bring back per-row contexts
Apparently GtkCellAreaContext is broken enough to not allow multiple
allocations...
2012-05-11 16:09:12 +02:00
Benjamin Otte fdcef2a38b iconview: Move wrap width adjustment to size request code 2012-05-11 16:09:04 +02:00
Benjamin Otte 01f65de7d7 iconview: Fix negative natural size request on empty iconview 2012-05-11 16:08:58 +02:00
Benjamin Otte 62eb034927 iconview: Don't expand items to more than natural size
This ensures that items stay left-aligned instead of slowly expanding into
empty space when widening the iconview. It's also what the iconview did
pre-refactoring.

Note that for cases where natural width != minimum width, the cells
might still expand and shrink back.
2012-05-11 16:08:51 +02:00
Benjamin Otte ad2eabe557 iconview: Redo layouting 2012-05-11 16:08:41 +02:00
Benjamin Otte 77904e1f40 iconview: Respect item width in size requestr code 2012-05-11 16:08:34 +02:00
Benjamin Otte a21e348d3e iconview: Reduce complexity of sizing code
Always assume max-columns and min-rows. The old approach was kinda
insane.

As an example, try to write an algorithm that optimizes the minimum size
for infinite (take a reasonably large number like 2520) word-wrapped
Monospace text cells containing the text "XXXXX XXX XXX XXXXX" (keep in
mind that this is the easy problem, because it's assuming equal cell
renderers). There's 4 ways to reasonably lay out this text:
19 glyphs (19x1):
  XXXXX XXX XXX XXXXX
18 glyphs (9x2):
  XXXXX XXX
  XXX XXXXX
21 glyphs (7x3):
  XXXXX
  XXX XXX
  XXXXX
20 glyphs (5x4):
  XXXXX
  XXX
  XXX
  XXXXX
The best thing to do usually is using the 9x2 approach, but that's
neither the one using the natural nor the one using the minimum size.

As a side note, this does not include spacing and padding, which might
also influence the decision. Nor does it include height-for-width
considerations. Look at this table (numbers given in glyphs, not pixels,
as for pixel-sizes it gets even more interesting):
  given  best solution
  width  columns  sizing  glyphs per cell
   6      1       6x4           20
   7      1       7x3           21
   8      1       7x3           24
   9      1       9x2           18
  10      1/2     9x2/5x4       20
  11      1/2     9x2/5x4       22
  12      1/2     9x2/5x4       24
  13      1/2     9x2/5x4       26
  14      2       7x3           21
  15      3       5x4           20
  16      3       5x4           21.3
  17      3       5x4           22.7
  18      2       9x2           18
  19      1/2    19x1/8x2       19
  20      1/2/4  19x1/8x2/5x4   20
  21      1-4     any           21
  22      1-4     any           22
  23      1-4     any           23
  24      1-4     any           24
  25      5       5x4           20
  26      5       5x4           20.8
  27      3       9x2           18
  28      3       9x2           18.7
  29      3       9x2           19.3
  30      3/6     9x2/5x4       20

Now of course, nobody wants the number of columns to randomly change in
inexplicable ways while they enlarge or shrink an iconview, so we not
only have to optimize for smallest or other size measurements, but we
also have to optimize for "most pleasing to the eye".

And last but not least, I'd like to once again remind you - if you kept
up until now - that this discussion was for identically-sized cells
only.
2012-05-11 16:08:28 +02:00
Benjamin Otte b4963a4c7c iconview: Redo size requests
Instead of just returning the last allocated numbers, we now compute the
proper sizes from scratch. This is a bit less trivial, but it results in
proper height-for-width handling.
2012-05-11 16:08:14 +02:00
Benjamin Otte 141875cebd iconview: Don't cache iters
This is a huge quest to remove all caching from GtkIconview to simplify
the code. As it turns out, iconview performance is a joke, so the caches
are kinda unnecessary.

If we need caching, we can add it in a useful way later.
2012-05-11 16:08:08 +02:00
Benjamin Otte 498b525da1 iconview: Remove needless requirement
If we use
  &item->cell_area
instead of
  (GdkRectangle *) item
there is no need anymore to keep the cell_area as the first member of
the the item. And we cget compile-time checks for changes to the item
struct.
2012-05-11 16:07:57 +02:00
Luca Ferretti b6cf19af4e l10n: updated Italian translation 2012-05-09 11:49:06 +02:00
José Alburquerque c5c79cb550 gtk_entry_[get|set]_inner_border(): Clarify the deprecation docs. 2012-05-06 15:08:23 -04:00
Reinout van Schouwen 46aae7a5c2 Updated Dutch translation by Rachid, reviewed by Reinout van Schouwen 2012-05-04 00:53:11 +02:00
Chun-wei Fan 8813a71b36 Bug 670499-gtk/fallback-c89.c: Add fallback for nearbyint()
This adds a C89 implementation for nearbyint() as it is a function that
is only made available in C99.
2012-05-03 12:02:01 +08:00
Chun-wei Fan 49deb19d69 Bug 670499-gdk/gdkrgba.c: Include fallback-c89.c
Include (gdk/)fallback-c89.c as isnan() and isinf() is used.
2012-05-03 12:01:52 +08:00
Chun-wei Fan 3aefe35df6 Bug 670499-Add gdk/fallback-c89.c
Add a fallback-c89.c for the gdk/ subdirectory as there is code that uses
functions that are introduced by C99.  This currently adds fallback
implementations for MSVC for isnan() and isinf()

Dist this "new" source file as well
2012-05-03 12:01:43 +08:00
Chun-wei Fan c6b01fb47b Bug 670499-configure.ac: Check for nearbyint(), isinf() and isnan()
nearbyint(), isinf() and isnan() are C99 functions, so check for them.

Also clean up configure.ac a little bit as the checks for rint() and
round() can be a bit simpler, according to Matthias' suggestions.
2012-05-03 12:01:35 +08:00
Chun-wei Fan 851f51c054 Bug 670449-gtk/gtksettings.c: Fix build on Windows
On Windows, gtkwin32themeprivate.h is needed as
_gtk_win32_theme_get_default() is called on that platform to avoid C4013
warnings/errors (aka implicit declaration of ... for GCC folks).
2012-05-03 12:01:25 +08:00
Matthias Clasen 2494c48a29 Bump version 2012-05-02 21:23:47 -04:00
Matthias Clasen eb2c0e39c0 Updates for 3.4.2 2012-05-02 10:18:52 -04:00
Matthias Clasen e146a3c421 Silence gtk-doc warnings 2012-05-02 08:55:46 -04:00
Matthias Clasen 7306695ba2 Add some more documentation about GDK_SCROLL_SMOOTH 2012-05-02 08:49:01 -04:00
Matthias Clasen 2f5a729b69 GtkGrid: Add a note about overlapping children
https://bugzilla.gnome.org/show_bug.cgi?id=669989
2012-05-02 08:47:46 -04:00
Cosimo Cecchi 3bc206c13e icontheme: search first in all themes if the requested icon is symbolic
Symbolic icons use a "-symbolic" suffix to distinguish themselves from
highcolor variants. Note that the dash character here has a different
meaning than the specificity level defined in the icon-naming-spec [1],
as it identifies a property of the icon itself.

Since they might be provided by a parent theme (e.g. the HighContrast theme
relies on the gnome icon theme for them), when we are looking up one we
should first escape the generic icon inheritance mechanism defined in the
icon-naming-spec [1], and privilege a symbolic icon, if it exists in a
parent theme, before applying the inheritance evaluation.

This fixes symbolic icons not working properly when used in the
HighContrast theme with the GTK_ICON_LOOKUP_GENERIC_FALLBACK flag set.

[1]
http://standards.freedesktop.org/icon-naming-spec/latest/ar01s03.html

https://bugzilla.gnome.org/show_bug.cgi?id=674806
2012-05-02 08:46:50 -04:00
Cosimo Cecchi 2b496e390f spinbutton: port to GtkIconHelper
Instead of doing our own lookup for symbolic icons and rendering the
pixbuf, use GtkIconHelper as other widgets do, which saves a bunch of
code.

https://bugzilla.gnome.org/show_bug.cgi?id=674807
2012-05-02 08:46:32 -04:00
Matthias Clasen f28c50a182 Make page up/down work again in scrolled menus
This was broken since before GTK+ 3.0, when we replaced
a use of requisition by allocation. Fix this by using the
requisition height, that is already cached by the menu code.

The math is not quite right here; if you page all the way
down a long menu, you end up on the second-to-last menuitem.
But at least, page up/down let you move up and down the menu
again.
https://bugzilla.gnome.org/show_bug.cgi?id=668931
2012-05-02 08:46:10 -04:00
Ryan Lortie 336575a149 ./configure: fix error output for no -libXext
Due to the way the tests are structured, a missing libXext will give a
warning about a missing libX11 (even if libX11 is installed).  This is
confusing to people who are trying to build Gtk.

https://bugzilla.gnome.org/show_bug.cgi?id=674200
2012-05-02 08:44:28 -04:00
Marek Kasik 41f58738b2 printing: Localize loaded PPD files
Use ppdLocalize() to localize strings in loaded PPD file (#674326).
2012-05-02 08:44:17 -04:00
Alexander Larsson 16cb9a27a5 gtk-demo: Find gtk-demo-application.exe on win32
We need to append the ".exe" extension when looking for the
application file on windows.
2012-05-02 08:43:50 -04:00
Matthias Clasen e3aae59ed7 Fix a cornercase of menu parsing
When a uimanager in a gtkbuilder file contains a menu,
the builder parser was getting confused.

https://bugzilla.gnome.org/show_bug.cgi?id=672789
2012-05-02 08:43:39 -04:00
Murray Cumming 73ae49ce85 GtkAppplication docs: Fix small typo. 2012-05-02 08:43:14 -04:00
Michael Vogt 02eef4951e GtkImage: Move g_clear_object() to gtk_image_finalize()
This moves the freeing of the icon_helper from the destory to the finalize
function to avoid segfaults when trying to access a destroyed object before it
is disposed. This often happens in signal handlers which get called
asynchronously after destroy.

https://bugzilla.gnome.org/show_bug.cgi?id=674050
2012-05-02 08:41:38 -04:00
Carlos Garnacho d6fc987f2e treemodelsort: fix iter_previous so it can go back to the first item
It was getting the previous element, then checking whether it was the
first one, that has to be inverted so it doesn't stop on the second
item.

https://bugzilla.gnome.org/show_bug.cgi?id=674587
2012-05-01 13:38:12 +02:00
Ryan Lortie ab2ce66856 GtkApplication: fix for NULL application ID
Deal with the possibility of a NULL application ID by updating our
copied logic from GLib: use a path of /org/gtk/Application/anonymous in
this case.

https://bugzilla.gnome.org/show_bug.cgi?id=671249
2012-04-30 17:31:35 -04:00
Ryan Lortie fa96610408 GtkApplication: fixes for NULL session bus
We currently have a couple of cases where GtkApplication assumes that
the session bus will be non-NULL causing critical error output or (in
the case of trying to publish menus) an infinite loop.

Three fixes:

 - if the session bus is NULL due to not having registered the
   GtkApplication yet then give a g_critical on the entry point to the
   menu setters instead of going into an infinite loop.  Document this.

 - check for NULL session bus even when calling the menu setters at the
   right time in order to prevent the infinite loop for
   non-programer-error cases (ie: because we had trouble connecting to
   the session bus)

 - check for NULL session bus when publishing the X11 properties on the
   GtkApplicationWindow and skip publishing them if we're not on the bus

https://bugzilla.gnome.org/show_bug.cgi?id=671249
2012-04-30 17:31:32 -04:00
Richard Hughes 1aa7d8c546 Fix the colord support in GtkPrinterCups when the PPD is loaded async
If the PPD is not available when the printer is loaded then the PPD options are
not available and we can't get the correct qualifier to use with colord.

When the PPD becomes available, refresh the profile title to reflect reality.

https://bugzilla.gnome.org/show_bug.cgi?id=674890
2012-04-30 14:21:14 +01:00
Matthias Clasen eb94f92f26 gtk-demo: fix the tool palette demo
The palette was confined to its minimal size, when in horizontal mode.
2012-04-27 08:31:35 -04:00
Benjamin Otte 67e2e41907 toolpalette: Configure adjustment properly
https://bugzilla.gnome.org/show_bug.cgi?id=673650
2012-04-27 03:38:25 +02:00
Benjamin Otte 27ff5516cc toolpalette: Rename variable
The variable that holds the total size for all widget allocations
shouldn't be called page_start.
2012-04-27 03:38:22 +02:00
Mark Vender c64dafa88a Regenerate the gdk/gdkkeysyms.h and gdk/gdkkeysyms-compat.h files
https://bugzilla.gnome.org/show_bug.cgi?id=673259
2012-04-25 20:31:36 -04:00
Mark Vender 1919ad6529 Fix the gdk/gdkkeysyms-update.pl to reflect new upstream location
https://bugzilla.gnome.org/show_bug.cgi?id=673259
2012-04-25 20:31:35 -04:00
Sam Thursfield 60274b15f5 Fix build with XInput < 2.2
Fixes regression introduced in fa8e6f7857
2012-04-24 12:49:51 +01:00
Cosimo Cecchi f016b55234 docs: add gtk_builder_add_from_resource() to gtk-doc 2012-04-23 17:42:55 -04:00
John Ralls 122e12bc5f Remove some more CUPS 1.2 ifdefs. 2012-04-23 14:37:46 -07:00
John Ralls 63b9487421 Bug 670373: modules/printing/cups/gtkprintbackendcups.c won't build with CUPS 1.6
Fix up accesses of ipp structures in gtkcupsutils.c
2012-04-23 14:37:46 -07:00
John Ralls 4b3d566de1 Bug 670373: modules/printing/cups/gtkprintbackendcups.c won't build with CUPS 1.6
Having refactored cups_request_printer_list_cb so that the cups
version-dependent block size is small enough to be handled in a single ifdef,
make the ifdef HAVE_CUPS_API_1_6 block.
2012-04-23 14:37:46 -07:00
John Ralls 595fce1406 Move some variable declarations into the scopes in which they're used. 2012-04-23 14:37:46 -07:00
John Ralls 8fa106dca6 Extract Function cups_create_printer 2012-04-23 14:37:46 -07:00
John Ralls 36fe2cafa6 Extract function cups_printer_handle_attribute 2012-04-23 14:37:46 -07:00
John Ralls 5903c5e47a Extract printer setup variables into a struct
So that it can be passed as a single parameter to functions as we
extract-function to make cups_request_printer_list_cb more manageable.

Note that not all of the affected variables are changed in this
changeset. Those are in extracted functions and will be addressed in the
next two changes.
2012-04-23 14:37:46 -07:00
John Ralls c687883b20 Create enum PrinterStateLevel
Fixes "magic number" in printer_state_reason_level.
2012-04-23 14:37:46 -07:00
John Ralls 5f667f4d24 Extract reasons and reasons_desc arrays to file level
So that they can be used from more than one function. Rename them to avoid naming conflicts.
2012-04-23 14:37:46 -07:00
John Ralls ee7adab87e Bug 670373: modules/printing/cups/gtkprintbackendcups.c won't build with CUPS 1.6
The first, simple changes. Turns off the deprecation warnings and substitutes macros and short ifdef blocks where feasible.
2012-04-23 14:37:46 -07:00
Cosimo Cecchi 37e3722d3a xi2: ignore extraneous events for smooth scroll
Since the event will be ignored anyway after it's translated (slave
devices are disabled), don't let it run in the smooth scroll code path,
as it will burn our caches for the actual event we're interested in.

https://bugzilla.gnome.org/show_bug.cgi?id=673644
2012-04-22 13:11:28 -04:00
Cosimo Cecchi 251ecd1177 xi2: fix thinko in variable type
https://bugzilla.gnome.org/show_bug.cgi?id=673644
2012-04-22 13:11:20 -04:00
Matthias Clasen fa8e6f7857 XI2: More logging for smooth scrolling
In addition to the delta, log device information.
This was triggered by
https://bugzilla.gnome.org/show_bug.cgi?id=673644
2012-04-22 13:11:11 -04:00
Kristian Rietveld 49eb2f2b2c quartz: fix coordinates for synthesized event
Of course, we must pass coordinates in the NSWindow coordinate system
when creating an NSEvent. This fixes drag icon positioning and makes
the icon slide back to the correct position when the drag is
canceled.
2012-04-22 17:45:26 +02:00
Cosimo Cecchi b202263efb messagedialog: also set GtkMisc alignment to zero for dialog labels
Setting xalign to START is not enough to make them left-aligned in every
case. This fixes a regression introduced in commit
cc0be1f949

https://bugzilla.gnome.org/show_bug.cgi?id=674286
2012-04-18 14:45:39 -04:00
Kristian Høgsberg df69f49a44 wayland: Prefer X11 backend over Wayland
https://bugzilla.gnome.org/show_bug.cgi?id=674102
2012-04-16 18:56:01 +02:00
Kalev Lember 9857c28e2b application-window: Move desktop file handling code to separate function
https://bugzilla.gnome.org/show_bug.cgi?id=674118
2012-04-16 19:23:34 +03:00
Reşat SABIQ 9082110835 Updated Crimean Tatar (Crimean Turkish) translation 2012-04-16 01:48:58 -05:00
Reşat SABIQ 0709c4b411 Updated Crimean Tatar (Crimean Turkish) translation 2012-04-16 01:40:07 -05:00
Reşat SABIQ 076a9f072c Updated Crimean Tatar (Crimean Turkish) translation 2012-04-16 01:40:07 -05:00
Yinghua Wang d0f1b7abbd update Simplified Chinese (zh_CN) translation 2012-04-16 14:14:57 +08:00
141 changed files with 42247 additions and 37341 deletions
+107
View File
@@ -1,3 +1,110 @@
Overview of Changes in GTK+ 3.4.4
=================================
* GtkIconView:
Fallout from the layout rewrite has been fixed
* Bugs fixed:
531319 "weight-set" cellrenderertext attribute misbehaves...
571254 Constructing a pixel value from components
613561 single quote missing in translation of gtk-2-18.kn.po
643490 gtk-style-context-add-provider () documentation ne...
646798 Add a tip about "cloning contexts"
647779 Doesn't mention GtkDialog replacements
649569 GDK_THREADS_ENTER in file_print_cb@modules/printba...
659613 GtkLockButton docs are inaccurate
663991 _XOPEN_SOURCE 500 causes error in Solaris Studio c...
664646 dnd pointer lock when dragging tab between two ged...
667808 Accept -1 as the position where insert an element ...
670369 gdk: annotate the attributes_mask type for gdk_win...
671437 GtkStyle background color regression
671817 GTK+ doesn't create ~/.local/share (path) and ~/.l...
673749 Error Message When Creating Tray Icon
675167 GtkPlug gets key translation wrong with multiple l...
675423 doc: Add missing CDATA around a XML programlisting...
675535 GtkScale in GtkToolbar: strange behaviour with dou...
675809 Crash when clicking xrefs
675899 Infobar not loadable by GTKBuilder (using python g...
675990 gtk_tree_column_set_visible badly interact with th...
676077 Windows: Weird characters appearing when using cer...
676243 Document removing of accelerators
676262 Build failure in gdk
676329 GDK_SMOOTH_SCROLL_MASK lacks "Since"
677127 Misc annotation fixes
677293 GtkFontSelectionDialog partially broken on gtk 3.4
677363 grid: Add missing guard to gtk_grid_get_child_at()
677551 a11y: fix a typo leading to a crash
677649 gtk[list,tree]store: fix transformation of GValues...
677774 gdk: add missing annotations to gdk_event_get_scro...
677775 gdk: add a missing annotation to GdkEventProperty
677809 Regression: gtkiconview changes in 3.4.2 / master ...
677915 entry-completion: don't move to leftmost character...
677941 Gtk.ListStore doesn't have the method "reorder" as...
678175 [Patch] Memory leak in GtkImage
678407 GtkImage: fix get_property('stock')
678829 Bloatpad example application has "parse" action in...
679166 modelmenu: set the accel group on the GtkMenu
679228 signal parameter names are not valid C identifiers
679409 docs: link against libgdk-3.la
679454 modelmenu: listen for toplevel changes on the atta...
679537 Crash in GtkEntry gtk_entry_get_icon_pixbuf()
* Updated translations:
German
Indonesian
Overview of Changes in GTK+ 3.4.3
=================================
* GtkIconView:
- The sizing and layout has been rewritten
* Bug fixes:
478344 GtkTreeRowReference falsely said to auto-subscribe...
587873 Documentation should explain MessageDialogs don't ...
663072 GtkSelectionData is incorrectly documented
670449 Splash screen stays
672947 GtkEntryCompletion sizing/position fixes
673237 window: Remove needless call to ensure_state_flag_...
674192 out-of-tree build failure: demos/widget-factory/wi...
674549 widget receives leave event when button released
675421 GtkFileChooser should set its role
675501 gtkquartz.h is not the gtk+-3.5.2.tar.xz archive
* Translation updates:
Dutch
Italian
Overview of Changes in GTK+ 3.4.2
=================================
* Bug fixes:
673644 Scroll not working in document overview
671249 GApplication: Allow a null application_id?
668931 Scrolling down via PageDown/PageUp keys impossible in list...
669989 gtk_grid_attach(): Documentation doesn't mention multiple ...
670373 modules/printing/cups/gtkprintbackendcups.c won't build wi...
672789 gtk_builder_add_objects_from_file() crashes on GtkUIManage...
673259 The gdk/gdkkeysyms-update.pl script and the keysym files g...
673650 Evince 3.4: adding new annotation is not possible (pencil ...
674050 Free image->priv->icon_helper in gtk_image_finalize instea...
674102 Defaults to wayland over x11 backend
674118 application-window: Desktop file handling improvements
674200 ./configure gives wrong error message if -lXext is not ins...
674286 "Delete confirmation" dialog has wrong padding
674326 Use localizations of option names and values contained in ...
674587 treemodelsort: allow iter_previous() to go past the second...
674806 icontheme: search first in all themes if the requested ico...
674807 spinbutton: port to GtkIconHelper
674890 Fix the colord support in GtkPrinterCups when the PPD is l...
* Translation updates:
Simplified Chinese
Crimean Tatar
Overview of Changes in GTK+ 3.4.1
=================================
+4 -1
View File
@@ -78,7 +78,10 @@ Release notes for 3.4
* Scroll events have been separated from button events, and smooth
scrolling has been added with a separate event mask. Widgets now
need to have either GDK_SCROLL_MASK or GDK_SMOOTH_SCROLL_MASK in
their event mask to receive scroll events.
their event mask to receive scroll events. In addition, the
GdkScrollDirection enumeration has gained a new member,
GDK_SCROLL_SMOOTH, so switch statements will have to be amended
to cover this case.
* GTK+ now uses <Primary> instead of <Control> in keyboard accelerators,
for improved cross-platform handling. This should not affect
-2
View File
@@ -589,8 +589,6 @@ copy ..\..\..\gdk\gdkconfig.h $(CopyDir)\include\gtk-3.0\gdk
copy $(Configuration)\$(Platform)\bin\*-$(GtkApiVersion).lib $(CopyDir)\lib
copy $(Configuration)\$(Platform)\bin\gailutil.lib $(CopyDir)\lib
mkdir $(CopyDir)\share\glib-2.0\schemas
-1
View File
@@ -352,7 +352,6 @@ copy ..\..\..\libgail-util\gailtextutil.h $(OutDir)\include\gail-$(GtkApiVersion
copy ..\..\..\gdk\gdkconfig.h $(OutDir)\include\gtk-3.0\gdk&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\*-$(GtkApiVersion).lib $(OutDir)\lib&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gailutil.lib $(OutDir)\lib&#x0D;&#x0A;
mkdir $(OutDir)\share\glib-2.0\schemas&#x0D;&#x0A;
copy ..\..\..\gtk\org.gtk.Settings.FileChooser.gschema.xml $(OutDir)\share\glib-2.0\schemas&#x0D;&#x0A;
+14 -15
View File
@@ -10,8 +10,8 @@
m4_define([gtk_major_version], [3])
m4_define([gtk_minor_version], [4])
m4_define([gtk_micro_version], [2])
m4_define([gtk_interface_age], [2])
m4_define([gtk_micro_version], [5])
m4_define([gtk_interface_age], [5])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
m4_define([gtk_version],
@@ -125,6 +125,7 @@ AC_SUBST([GAIL_LT_CURRENT_MINUS_AGE],[gail_lt_current_minus_age])
AC_PROG_CC
AC_PROG_CC_C_O
AC_PROG_CC_STDC
AC_PROG_MKDIR_P
AC_PROG_INSTALL
AC_PROG_MAKE_SET
@@ -734,17 +735,9 @@ AC_CHECK_FUNCS(mallinfo)
AC_CHECK_FUNCS(getresuid)
AC_TYPE_UID_T
# Check for round()
AC_CHECK_LIB(m,round,have_round=yes,have_round=no)
if test $have_round = yes; then
AC_DEFINE(HAVE_ROUND, 1, [Define to 1 if round() is available])
fi
# Check for rint()
AC_CHECK_LIB(m,rint,have_rint=yes,have_rint=no)
if test $have_rint = yes; then
AC_DEFINE(HAVE_RINT, 1, [Define to 1 if rint() is available])
fi
# Check for round(), rint(), isnan(), isinf() and nearbyint()
AC_CHECK_LIB(m,round,,)
AC_CHECK_FUNCS(round rint isnan isinf nearbyint)
# Checks for gdkspawn
AC_CHECK_HEADERS(crt_externs.h)
@@ -961,9 +954,9 @@ if test "x$enable_x11_backend" = xyes; then
# Xext is optional, the chances a system has *none* of these things is so
# small that we just unconditionally require it.
AC_CHECK_FUNC(XOpenDisplay, :,
AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]))
AC_MSG_ERROR([*** libX11 and libXext not found. Check 'config.log' for more details.]))
AC_CHECK_FUNC(XextFindDisplay, :,
AC_MSG_ERROR([*** libXext not found. Check 'config.log' for more details.]))
AC_MSG_ERROR([*** libX11 and libXext not found. Check 'config.log' for more details.]))
# Check for xReply
@@ -1394,6 +1387,12 @@ else
$CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -lt 2; then
AC_MSG_ERROR([CUPS >= 1.2 not found])
fi
if test $CUPS_API_MAJOR -gt 1 -o \
$CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 6; then
AC_DEFINE(HAVE_CUPS_API_1_6, 1,
[Define to 1 if CUPS 1.6 API is available])
fi
AC_SUBST(CUPS_API_MAJOR)
AC_SUBST(CUPS_API_MINOR)
+8 -2
View File
@@ -427,6 +427,12 @@ on_name_vanished (GDBusConnection *connection,
}
}
#ifdef G_OS_WIN32
#define APP_EXTENSION ".exe"
#else
#define APP_EXTENSION
#endif
GtkWidget *
do_application (GtkWidget *toplevel)
{
@@ -445,8 +451,8 @@ do_application (GtkWidget *toplevel)
const gchar *command;
GError *error = NULL;
if (g_file_test ("./gtk3-demo-application", G_FILE_TEST_IS_EXECUTABLE))
command = "./gtk3-demo-application";
if (g_file_test ("./gtk3-demo-application" APP_EXTENSION, G_FILE_TEST_IS_EXECUTABLE))
command = "./gtk3-demo-application" APP_EXTENSION;
else
command = "gtk3-demo-application";
+6 -5
View File
@@ -1,8 +1,9 @@
/* Color Selector
*
* GtkColorSelection lets the user choose a color. GtkColorSelectionDialog is
* a prebuilt dialog containing a GtkColorSelection.
/* Color Chooser
*
* A GtkColorChooser lets the user choose a color. There are several
* implementations of the GtkColorChooser interface in GTK+. The
* GtkColorChooserDialog is a prebuilt dialog containing a
* GtkColorChooserWidget.
*/
#include <gtk/gtk.h>
@@ -77,7 +78,7 @@ do_colorsel (GtkWidget *do_widget)
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_screen (GTK_WINDOW (window),
gtk_widget_get_screen (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Color Selection");
gtk_window_set_title (GTK_WINDOW (window), "Color Chooser");
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
+1
View File
@@ -522,6 +522,7 @@ do_toolpalette (GtkWidget *do_widget)
GTK_POLICY_NEVER,
GTK_POLICY_AUTOMATIC);
gtk_container_set_border_width (GTK_CONTAINER (palette_scroller), 6);
gtk_widget_set_hexpand (palette_scroller, TRUE);
gtk_container_add (GTK_CONTAINER (palette_scroller), palette);
gtk_container_add (GTK_CONTAINER (hbox), palette_scroller);
+1 -1
View File
@@ -22,7 +22,7 @@ gtk3_widget_factory_LDADD = \
$(top_builddir)/gtk/libgtk-3.la \
$(GTK_DEP_LIBS)
widget_factory_resources.c: widget-factory.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies $(srcdir)/widget-factory.gresource.xml)
widget_factory_resources.c: widget-factory.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/widget-factory.gresource.xml)
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $<
EXTRA_DIST += \
+2 -2
View File
@@ -10,9 +10,9 @@
<releaseinfo>
This document is for the GDK 3 library, version &version;
The latest versions can be found online at
<ulink role="online-location" url="http://developer.gnome.org/devel/gdk3/">http://developer.gnome.org/devel/gdk3/</ulink>.
<ulink role="online-location" url="http://developer.gnome.org/gdk3/">http://developer.gnome.org/gdk3/</ulink>.
If you are looking for the older GDK 2 series of libraries,
see <ulink role="online-location" url="http://developer.gnome.org/devel/gdk/">http://developer.gnome.org/devel/gdk/</ulink>.
see <ulink role="online-location" url="http://developer.gnome.org/gdk/">http://developer.gnome.org/gdk/</ulink>.
</releaseinfo>
</bookinfo>
+1
View File
@@ -106,6 +106,7 @@ CPPFLAGS += \
-UGTK_DISABLE_SINGLE_INCLUDES
GTKDOC_LIBS = \
$(top_builddir)/gdk/libgdk-3.la \
$(top_builddir)/gtk/libgtk-3.la \
$(GTK_DEP_LIBS)
+2 -2
View File
@@ -12,9 +12,9 @@
<releaseinfo>
This document is for the GTK+ 3 library, version &version;.
The latest versions can be found online at
<ulink role="online-location" url="http://developer.gnome.org/devel/gtk3/">http://developer.gnome.org/devel/gtk3/</ulink>.
<ulink role="online-location" url="http://developer.gnome.org/gtk3/">http://developer.gnome.org/gtk3/</ulink>.
If you are looking for the older GTK+ 2 series of libraries,
see <ulink role="online-location" url="http://developer.gnome.org/devel/gtk/">http://developer.gnome.org/devel/gtk/</ulink>.
see <ulink role="online-location" url="http://developer.gnome.org/gtk/">http://developer.gnome.org/gtk/</ulink>.
</releaseinfo>
</bookinfo>
+3 -2
View File
@@ -62,7 +62,6 @@ GtkAccelGroupActivate
GtkAccelGroupFindFunc
gtk_accel_group_disconnect
gtk_accel_group_disconnect_key
gtk_accel_group_query
gtk_accel_group_activate
gtk_accel_group_lock
gtk_accel_group_unlock
@@ -96,6 +95,7 @@ GTK_ACCEL_GROUP_GET_CLASS
GTK_ACCEL_GROUP_GET_PRIVATE
GtkAccelGroupPrivate
GtkAccelGroupEntry
gtk_accel_group_query
gtk_accel_group_get_type
</SECTION>
@@ -526,6 +526,7 @@ GtkBuilderConnectFunc
GtkBuilderError
gtk_builder_new
gtk_builder_add_from_file
gtk_builder_add_from_resource
gtk_builder_add_from_string
gtk_builder_add_objects_from_file
gtk_builder_add_objects_from_string
@@ -5029,7 +5030,6 @@ GtkWidgetClass
GtkCallback
GtkRequisition
GtkAllocation
GtkSelectionData
GtkWidgetAuxInfo
GtkWidgetHelpType
gtk_widget_new
@@ -5999,6 +5999,7 @@ GtkRcContext
<SECTION>
<FILE>gtkselection</FILE>
<TITLE>Selections</TITLE>
GtkSelectionData
GtkTargetEntry
GtkTargetList
GtkTargetPair
+13 -6
View File
@@ -82,9 +82,8 @@
Over the years, a number of functions, and in some cases, entire
widgets have been deprecated. These deprecations are clearly spelled
out in the API reference, with hints about the recommended replacements.
The API reference also includes an
<link linkend="api-index-deprecated">index</link> of all deprecated
symbols.
The API reference for GTK+ 2 also includes an
<ulink url="http://developer.gnome.org/gtk/2.24/api-index-deprecated.html">index</ulink> of all deprecated symbols.
</para>
<para>
To verify that your program does not use any deprecated symbols,
@@ -92,7 +91,14 @@
as follows:
<programlisting>
make CFLAGS+="-DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
</programlisting>
</programlisting>
</para>
<para>
Note that some parts of our API, such as enumeration values, are
not well covered by the deprecation warnings. In most cases, using
them will require you to also use deprecated functions, which will
trigger warnings. But some things, like the %GTK_DIALOG_NO_SEPARATOR
flag that has disappeared in GTK+ 3, may not.
</para>
</section>
@@ -273,7 +279,7 @@ gdk_cairo_set_source_pixbuf() instead of cairo_set_source_surface().
<para>
Drawing layouts clipped is often used to avoid overdraw or to
allow drawing selections. Code would have looked like this:
<informalexample><programlisting>
<informalexample><programlisting>
GdkGC *gc;
/* setup */
@@ -994,7 +1000,8 @@ AM_CONDITIONAL(BUILD_x11, [test "x$have_x11" = "xyes"])
Another convenience function that can help when implementing
::draw for multi-window widgets is gtk_cairo_transform_to_window(),
which transforms a cairo context from widget-relative coordinates
to window-relative coordinates.
to window-relative coordinates. You may want to use cairo_save() and
cairo_restore() when modifying the cairo context in your draw function.
</para>
<para>
All GtkStyle drawing functions (gtk_paint_box(), etc) have been changed
@@ -31,18 +31,18 @@
</thead>
<tbody>
<row><entry>EggSMClient::quit-requested</entry><entry>instead of calling will_quit (FALSE,...) in response to this signal, install an inhibitor</entry></row>
<row><entry>EggSMClient::quit</entry><entry>the #GtkApplication::quit signal</entry></row>
<row><entry>EggSMClient::quit-cancelled</entry><entry></entry></row>
<row><entry>EggSMClient::quit</entry><entry>the #GApplication::shutdown signal</entry></row>
<row><entry>EggSMClient::quit-cancelled</entry><entry>-</entry></row>
<row><entry>egg_sm_client_will_quit</entry><entry>instead of calling will_quit (FALSE,...), install an inhibitor</entry></row>
<row><entry>egg_sm_client_end_session</entry><entry>gtk_application_end_session()</entry></row>
<row><entry>egg_sm_client_end_session</entry><entry>-</entry></row>
</tbody>
</tgroup>
</table>
<para>
At this point, GtkApplication has no special support for state saving.
Applications can use GSettings or GKeyFile and save as much state as
they see fit in response to #GtkApplication::quit or whenever they
consider appropriate.
At this point, GtkApplication has no special support for state saving
and restarting. Applications can use GSettings or GKeyFile and save as
much state as they see fit in response to #GApplication::shutdown or
whenever they consider appropriate.
</para>
</chapter>
+1 -1
View File
@@ -22,7 +22,7 @@ AM_CPPFLAGS = \
-I$(top_builddir) \
$(DEP_CFLAGS)
GTKDOC_LIBS = $(top_builddir)/libgail-util/libgailutil.la
GTKDOC_LIBS = $(top_builddir)/libgail-util/libgailutil-3.la
# gtkdoc-mkdb related varaibles
MKDB_OPTIONS =
@@ -10,7 +10,7 @@
<releaseinfo>
Version &version;
The latest version of this documentation can be found on-line at
<ulink role="online-location" url="http://developer.gnome.org/devel/gail-libgail-util/unstable/">http://developer.gnome.org/devel/gail-libgail-util/unstable/</ulink>.
<ulink role="online-location" url="http://developer.gnome.org/gail-libgail-util/unstable/">http://developer.gnome.org/gail-libgail-util/unstable/</ulink>.
</releaseinfo>
</bookinfo>
<chapter id="libgail-util-main">
+2 -2
View File
@@ -285,8 +285,8 @@ bloat_pad_startup (GApplication *application)
" <attribute name='accel'>&lt;Primary&gt;c</attribute>"
" </item>"
" <item>"
" <attribute name='label' translatable='yes'>_Parse</attribute>"
" <attribute name='action'>win.parse</attribute>"
" <attribute name='label' translatable='yes'>_Paste</attribute>"
" <attribute name='action'>win.paste</attribute>"
" <attribute name='accel'>&lt;Primary&gt;v</attribute>"
" </item>"
" </section>"
+3 -1
View File
@@ -306,7 +306,9 @@ endif
lib_LTLIBRARIES = libgdk-3.la
MAINTAINERCLEANFILES = $(gdk_built_sources) stamp-gdkenumtypes.h
EXTRA_DIST += $(gdk_built_sources)
EXTRA_DIST += \
$(gdk_built_sources) \
fallback-c89.c
install-exec-hook:
if DISABLE_EXPLICIT_DEPS
+44
View File
@@ -0,0 +1,44 @@
/* GTK - The GIMP Toolkit
* Copyright (C) 2011 Chun-wei Fan <fanc999@yahoo.com.tw>
*
* Author: Chun-wei Fan <fanc999@yahoo.com.tw>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <float.h>
#ifndef HAVE_ISNAN
/* it seems of the supported compilers only
* MSVC does not have isnan(), but it does
* have _isnan() which does the same as isnan()
*/
static inline gboolean
isnan (double x)
{
return _isnan (x);
}
#endif
#ifndef HAVE_ISINF
/* Unfortunately MSVC does not have finite()
* but it does have _finite() which is the same
* as finite() except when x is a NaN
*/
static inline gboolean
isinf (double x)
{
return (!_finite (x) && !_isnan (x));
}
#endif
+2
View File
@@ -560,7 +560,9 @@ gdk_x11_get_xatom_by_name_for_display
gdk_x11_get_xatom_name
gdk_x11_get_xatom_name_for_display
gdk_x11_grab_server
gdk_x11_keymap_get_group_for_state_libgtk_only
gdk_x11_keymap_get_type
gdk_x11_keymap_key_is_modifier_libgtk_only
gdk_x11_lookup_xdisplay
gdk_x11_register_standard_event_type
gdk_x11_screen_get_monitor_output
+1 -1
View File
@@ -939,7 +939,7 @@ GList *
gdk_device_list_slave_devices (GdkDevice *device)
{
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
g_return_val_if_fail (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_MASTER, NULL);
g_return_val_if_fail (gdk_device_get_device_type (device) == GDK_DEVICE_TYPE_MASTER, NULL);
return g_list_copy (device->slaves);
}
+1 -2
View File
@@ -970,8 +970,7 @@ switch_to_pointer_grab (GdkDisplay *display,
* synthesized when needed.
*/
if (source_device &&
(gdk_device_get_source (source_device) == GDK_SOURCE_TOUCHSCREEN ||
gdk_device_get_source (source_device) == GDK_SOURCE_TOUCHPAD))
(gdk_device_get_source (source_device) == GDK_SOURCE_TOUCHSCREEN))
info->need_touch_press_enter = TRUE;
pointer_window = NULL;
+5 -5
View File
@@ -244,16 +244,16 @@ gdk_display_manager_get (void)
manager = g_object_new (gdk_win32_display_manager_get_type (), NULL);
else
#endif
#ifdef GDK_WINDOWING_WAYLAND
if (backend == NULL || strcmp (backend, "wayland") == 0)
manager = g_object_new (gdk_wayland_display_manager_get_type (), NULL);
else
#endif
#ifdef GDK_WINDOWING_X11
if (backend == NULL || strcmp (backend, "x11") == 0)
manager = g_object_new (gdk_x11_display_manager_get_type (), NULL);
else
#endif
#ifdef GDK_WINDOWING_WAYLAND
if (backend == NULL || strcmp (backend, "wayland") == 0)
manager = g_object_new (gdk_wayland_display_manager_get_type (), NULL);
else
#endif
#ifdef GDK_WINDOWING_BROADWAY
if (backend == NULL || strcmp (backend, "broadway") == 0)
manager = g_object_new (gdk_broadway_display_manager_get_type (), NULL);
+2 -2
View File
@@ -1215,8 +1215,8 @@ gdk_event_get_scroll_direction (const GdkEvent *event,
/**
* gdk_event_get_scroll_deltas:
* @event: a #GdkEvent
* @delta_x: return location for X delta
* @delta_y: return location for Y delta
* @delta_x: (out): return location for X delta
* @delta_y: (out): return location for Y delta
*
* Retrieves the scroll deltas from a #GdkEvent
*
+10 -4
View File
@@ -349,7 +349,7 @@ typedef enum
* @GDK_SCROLL_LEFT: the window is scrolled to the left.
* @GDK_SCROLL_RIGHT: the window is scrolled to the right.
* @GDK_SCROLL_SMOOTH: the scrolling is determined by the delta values
* in #GdkEventScroll. See gdk_event_get_scroll_deltas().
* in #GdkEventScroll. See gdk_event_get_scroll_deltas(). Since: 3.4
*
* Specifies the direction for #GdkEventScroll.
*/
@@ -736,7 +736,8 @@ struct _GdkEventTouch
* the modifier keys (e.g. Control, Shift and Alt) and the pointer
* buttons. See #GdkModifierType.
* @direction: the direction to scroll to (one of %GDK_SCROLL_UP,
* %GDK_SCROLL_DOWN, %GDK_SCROLL_LEFT and %GDK_SCROLL_RIGHT).
* %GDK_SCROLL_DOWN, %GDK_SCROLL_LEFT, %GDK_SCROLL_RIGHT or
* %GDK_SCROLL_SMOOTH).
* @device: the device where the event originated.
* @x_root: the x coordinate of the pointer relative to the root of the
* screen.
@@ -746,6 +747,11 @@ struct _GdkEventTouch
* Generated from button presses for the buttons 4 to 7. Wheel mice are
* usually configured to generate button press events for buttons 4 and 5
* when the wheel is turned.
*
* Some GDK backends can also generate 'smooth' scroll events, which
* can be recognized by the %GDK_SCROLL_SMOOTH scroll direction. For
* these, the scroll deltas can be obtained with
* gdk_event_get_scroll_deltas().
*/
struct _GdkEventScroll
{
@@ -904,8 +910,8 @@ struct _GdkEventConfigure
* <function>XSendEvent</function>).
* @atom: the property that was changed.
* @time: the time of the event in milliseconds.
* @state: whether the property was changed (%GDK_PROPERTY_NEW_VALUE) or
* deleted (%GDK_PROPERTY_DELETE).
* @state: (type GdkPropertyState): whether the property was changed
* (%GDK_PROPERTY_NEW_VALUE) or deleted (%GDK_PROPERTY_DELETE).
*
* Describes a property change on a window.
*/
+108 -14
View File
@@ -286,6 +286,7 @@
#define GDK_dead_U 0xfe89
#define GDK_dead_small_schwa 0xfe8a
#define GDK_dead_capital_schwa 0xfe8b
#define GDK_dead_greek 0xfe8c
#define GDK_First_Virtual_Screen 0xfed0
#define GDK_Prev_Virtual_Screen 0xfed1
#define GDK_Next_Virtual_Screen 0xfed2
@@ -332,6 +333,12 @@
#define GDK_Pointer_Accelerate 0xfefa
#define GDK_Pointer_DfltBtnNext 0xfefb
#define GDK_Pointer_DfltBtnPrev 0xfefc
#define GDK_ch 0xfea0
#define GDK_Ch 0xfea1
#define GDK_CH 0xfea2
#define GDK_c_h 0xfea3
#define GDK_C_h 0xfea4
#define GDK_C_H 0xfea5
#define GDK_3270_Duplicate 0xfd01
#define GDK_3270_FieldMark 0xfd02
#define GDK_3270_Right2 0xfd03
@@ -611,9 +618,9 @@
#define GDK_nacute 0x1f1
#define GDK_ncaron 0x1f2
#define GDK_odoubleacute 0x1f5
#define GDK_udoubleacute 0x1fb
#define GDK_rcaron 0x1f8
#define GDK_uring 0x1f9
#define GDK_udoubleacute 0x1fb
#define GDK_tcedilla 0x1fe
#define GDK_abovedot 0x1ff
#define GDK_Hstroke 0x2a1
@@ -674,32 +681,32 @@
#define GDK_uogonek 0x3f9
#define GDK_utilde 0x3fd
#define GDK_umacron 0x3fe
#define GDK_Wcircumflex 0x1000174
#define GDK_wcircumflex 0x1000175
#define GDK_Ycircumflex 0x1000176
#define GDK_ycircumflex 0x1000177
#define GDK_Babovedot 0x1001e02
#define GDK_babovedot 0x1001e03
#define GDK_Dabovedot 0x1001e0a
#define GDK_Wgrave 0x1001e80
#define GDK_Wacute 0x1001e82
#define GDK_dabovedot 0x1001e0b
#define GDK_Ygrave 0x1001ef2
#define GDK_Fabovedot 0x1001e1e
#define GDK_fabovedot 0x1001e1f
#define GDK_Mabovedot 0x1001e40
#define GDK_mabovedot 0x1001e41
#define GDK_Pabovedot 0x1001e56
#define GDK_wgrave 0x1001e81
#define GDK_pabovedot 0x1001e57
#define GDK_wacute 0x1001e83
#define GDK_Sabovedot 0x1001e60
#define GDK_ygrave 0x1001ef3
#define GDK_sabovedot 0x1001e61
#define GDK_Tabovedot 0x1001e6a
#define GDK_tabovedot 0x1001e6b
#define GDK_Wgrave 0x1001e80
#define GDK_wgrave 0x1001e81
#define GDK_Wacute 0x1001e82
#define GDK_wacute 0x1001e83
#define GDK_Wdiaeresis 0x1001e84
#define GDK_wdiaeresis 0x1001e85
#define GDK_sabovedot 0x1001e61
#define GDK_Wcircumflex 0x1000174
#define GDK_Tabovedot 0x1001e6a
#define GDK_Ycircumflex 0x1000176
#define GDK_wcircumflex 0x1000175
#define GDK_tabovedot 0x1001e6b
#define GDK_ycircumflex 0x1000177
#define GDK_Ygrave 0x1001ef2
#define GDK_ygrave 0x1001ef3
#define GDK_OE 0x13bc
#define GDK_oe 0x13bd
#define GDK_Ydiaeresis 0x13be
@@ -1194,6 +1201,7 @@
#define GDK_leftdoublequotemark 0xad2
#define GDK_rightdoublequotemark 0xad3
#define GDK_prescription 0xad4
#define GDK_permille 0xad5
#define GDK_minutes 0xad6
#define GDK_seconds 0xad7
#define GDK_latincross 0xad9
@@ -1627,6 +1635,8 @@
#define GDK_obarred 0x1000275
#define GDK_SCHWA 0x100018f
#define GDK_schwa 0x1000259
#define GDK_EZH 0x10001b7
#define GDK_ezh 0x1000292
#define GDK_Lbelowdot 0x1001e36
#define GDK_lbelowdot 0x1001e37
#define GDK_Abelowdot 0x1001ea0
@@ -2032,6 +2042,86 @@
#define GDK_braille_dots_1345678 0x10028fd
#define GDK_braille_dots_2345678 0x10028fe
#define GDK_braille_dots_12345678 0x10028ff
#define GDK_Sinh_ng 0x1000d82
#define GDK_Sinh_h2 0x1000d83
#define GDK_Sinh_a 0x1000d85
#define GDK_Sinh_aa 0x1000d86
#define GDK_Sinh_ae 0x1000d87
#define GDK_Sinh_aee 0x1000d88
#define GDK_Sinh_i 0x1000d89
#define GDK_Sinh_ii 0x1000d8a
#define GDK_Sinh_u 0x1000d8b
#define GDK_Sinh_uu 0x1000d8c
#define GDK_Sinh_ri 0x1000d8d
#define GDK_Sinh_rii 0x1000d8e
#define GDK_Sinh_lu 0x1000d8f
#define GDK_Sinh_luu 0x1000d90
#define GDK_Sinh_e 0x1000d91
#define GDK_Sinh_ee 0x1000d92
#define GDK_Sinh_ai 0x1000d93
#define GDK_Sinh_o 0x1000d94
#define GDK_Sinh_oo 0x1000d95
#define GDK_Sinh_au 0x1000d96
#define GDK_Sinh_ka 0x1000d9a
#define GDK_Sinh_kha 0x1000d9b
#define GDK_Sinh_ga 0x1000d9c
#define GDK_Sinh_gha 0x1000d9d
#define GDK_Sinh_ng2 0x1000d9e
#define GDK_Sinh_nga 0x1000d9f
#define GDK_Sinh_ca 0x1000da0
#define GDK_Sinh_cha 0x1000da1
#define GDK_Sinh_ja 0x1000da2
#define GDK_Sinh_jha 0x1000da3
#define GDK_Sinh_nya 0x1000da4
#define GDK_Sinh_jnya 0x1000da5
#define GDK_Sinh_nja 0x1000da6
#define GDK_Sinh_tta 0x1000da7
#define GDK_Sinh_ttha 0x1000da8
#define GDK_Sinh_dda 0x1000da9
#define GDK_Sinh_ddha 0x1000daa
#define GDK_Sinh_nna 0x1000dab
#define GDK_Sinh_ndda 0x1000dac
#define GDK_Sinh_tha 0x1000dad
#define GDK_Sinh_thha 0x1000dae
#define GDK_Sinh_dha 0x1000daf
#define GDK_Sinh_dhha 0x1000db0
#define GDK_Sinh_na 0x1000db1
#define GDK_Sinh_ndha 0x1000db3
#define GDK_Sinh_pa 0x1000db4
#define GDK_Sinh_pha 0x1000db5
#define GDK_Sinh_ba 0x1000db6
#define GDK_Sinh_bha 0x1000db7
#define GDK_Sinh_ma 0x1000db8
#define GDK_Sinh_mba 0x1000db9
#define GDK_Sinh_ya 0x1000dba
#define GDK_Sinh_ra 0x1000dbb
#define GDK_Sinh_la 0x1000dbd
#define GDK_Sinh_va 0x1000dc0
#define GDK_Sinh_sha 0x1000dc1
#define GDK_Sinh_ssha 0x1000dc2
#define GDK_Sinh_sa 0x1000dc3
#define GDK_Sinh_ha 0x1000dc4
#define GDK_Sinh_lla 0x1000dc5
#define GDK_Sinh_fa 0x1000dc6
#define GDK_Sinh_al 0x1000dca
#define GDK_Sinh_aa2 0x1000dcf
#define GDK_Sinh_ae2 0x1000dd0
#define GDK_Sinh_aee2 0x1000dd1
#define GDK_Sinh_i2 0x1000dd2
#define GDK_Sinh_ii2 0x1000dd3
#define GDK_Sinh_u2 0x1000dd4
#define GDK_Sinh_uu2 0x1000dd6
#define GDK_Sinh_ru2 0x1000dd8
#define GDK_Sinh_e2 0x1000dd9
#define GDK_Sinh_ee2 0x1000dda
#define GDK_Sinh_ai2 0x1000ddb
#define GDK_Sinh_o2 0x1000ddc
#define GDK_Sinh_oo2 0x1000ddd
#define GDK_Sinh_au2 0x1000dde
#define GDK_Sinh_lu2 0x1000ddf
#define GDK_Sinh_ruu2 0x1000df2
#define GDK_Sinh_luu2 0x1000df3
#define GDK_Sinh_kunddaliya 0x1000df4
#define GDK_ModeLock 0x1008ff01
#define GDK_MonBrightnessUp 0x1008ff02
#define GDK_MonBrightnessDown 0x1008ff03
@@ -2186,6 +2276,8 @@
#define GDK_Suspend 0x1008ffa7
#define GDK_Hibernate 0x1008ffa8
#define GDK_TouchpadToggle 0x1008ffa9
#define GDK_TouchpadOn 0x1008ffb0
#define GDK_TouchpadOff 0x1008ffb1
#define GDK_Switch_VT_1 0x1008fe01
#define GDK_Switch_VT_2 0x1008fe02
#define GDK_Switch_VT_3 0x1008fe03
@@ -2202,5 +2294,7 @@
#define GDK_ClearGrab 0x1008fe21
#define GDK_Next_VMode 0x1008fe22
#define GDK_Prev_VMode 0x1008fe23
#define GDK_LogWindowTree 0x1008fe24
#define GDK_LogGrabInfo 0x1008fe25
#endif /* __GDK_KEYSYMS_COMPAT_H__ */
+18 -18
View File
@@ -1,15 +1,15 @@
#!/usr/bin/env perl
# Updates http://git.gnome.org/cgit/gtk+/tree/gdk/gdkkeysyms.h from upstream (X.org 7.x),
# from http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=keysymdef.h
# Updates http://git.gnome.org/browse/gtk+/tree/gdk/gdkkeysyms.h from upstream (X.org 7.x),
# from http://cgit.freedesktop.org/xorg/proto/x11proto/plain/keysymdef.h
#
# Author : Simos Xenitellis <simos at gnome dot org>.
# Authos : Bastien Nocera <hadess@hadess.net>
# Version : 1.2
#
# Input : http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=keysymdef.h
# Input : http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=XF86keysym.h
# Output : http://git.gnome.org/cgit/gtk+/tree/gdk/gdkkeysyms.h
# Input : http://cgit.freedesktop.org/xorg/proto/x11proto/plain/keysymdef.h
# Input : http://cgit.freedesktop.org/xorg/proto/x11proto/plain/XF86keysym.h
# Output : http://git.gnome.org/browse/gtk+/tree/gdk/gdkkeysyms.h
#
# Notes : It downloads keysymdef.h from the Internet, if not found locally,
# Notes : and creates an updated gdkkeysyms.h
@@ -23,31 +23,31 @@ my @keysymelements;
if ( ! -f "keysymdef.h" )
{
print "Trying to download keysymdef.h from\n";
print "http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=keysymdef.h\n";
die "Unable to download keysymdef.h from http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=keysymdef.h\n"
unless system("wget -c -O keysymdef.h \"http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=keysymdef.h\"") == 0;
print "http://cgit.freedesktop.org/xorg/proto/x11proto/plain/keysymdef.h\n";
die "Unable to download keysymdef.h from http://cgit.freedesktop.org/xorg/proto/x11proto/plain/keysymdef.h\n"
unless system("wget -c -O keysymdef.h \"http://cgit.freedesktop.org/xorg/proto/x11proto/plain/keysymdef.h\"") == 0;
print " done.\n\n";
}
else
{
print "We are using existing keysymdef.h found in this directory.\n";
print "It is assumed that you took care and it is a recent version\n";
print "as found at http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob;f=keysymdef.h\n\n";
print "as found at http://cgit.freedesktop.org/xorg/proto/x11proto/plain/keysymdef.h\n\n";
}
if ( ! -f "XF86keysym.h" )
{
print "Trying to download XF86keysym.h from\n";
print "http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=XF86keysym.h\n";
die "Unable to download keysymdef.h from http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=XF86keysym.h\n"
unless system("wget -c -O XF86keysym.h \"http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=XF86keysym.h\"") == 0;
print "http://cgit.freedesktop.org/xorg/proto/x11proto/plain/XF86keysym.h\n";
die "Unable to download keysymdef.h from http://cgit.freedesktop.org/xorg/proto/x11proto/plain/XF86keysym.h\n"
unless system("wget -c -O XF86keysym.h \"http://cgit.freedesktop.org/xorg/proto/x11proto/plain/XF86keysym.h\"") == 0;
print " done.\n\n";
}
else
{
print "We are using existing XF86keysym.h found in this directory.\n";
print "It is assumed that you took care and it is a recent version\n";
print "as found at http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob;f=XF86keysym.h\n\n";
print "as found at http://cgit.freedesktop.org/xorg/proto/x11proto/plain/XF86keysym.h\n\n";
}
if ( -f "gdkkeysyms.h" )
@@ -57,7 +57,7 @@ if ( -f "gdkkeysyms.h" )
die "Exiting...\n\n";
}
# Source: http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob;f=keysymdef.h
# Source: http://cgit.freedesktop.org/xorg/proto/x11proto/plain/keysymdef.h
die "Could not open file keysymdef.h: $!\n" unless open(IN_KEYSYMDEF, "<:utf8", "keysymdef.h");
# Output: gtk+/gdk/gdkkeysyms.h
@@ -93,11 +93,11 @@ print OUT_GDKKEYSYMS_COMPAT $LICENSE_HEADER;
print OUT_GDKKEYSYMS<<EOF;
/*
* File auto-generated from script http://git.gnome.org/cgit/gtk+/tree/gdk/gdkkeysyms-update.pl
* File auto-generated from script http://git.gnome.org/browse/gtk+/tree/gdk/gdkkeysyms-update.pl
* using the input file
* http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=keysymdef.h
* http://cgit.freedesktop.org/xorg/proto/x11proto/plain/keysymdef.h
* and
* http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=XF86keysym.h
* http://cgit.freedesktop.org/xorg/proto/x11proto/plain/XF86keysym.h
*/
/*
@@ -154,7 +154,7 @@ close IN_KEYSYMDEF;
#$gdksyms{"0"} = "0000";
# Source: http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob;f=XF86keysym.h
# Source: http://cgit.freedesktop.org/xorg/proto/x11proto/plain/XF86keysym.h
die "Could not open file XF86keysym.h: $!\n" unless open(IN_XF86KEYSYM, "<:utf8", "XF86keysym.h");
while (<IN_XF86KEYSYM>)
+29 -17
View File
@@ -18,11 +18,11 @@
/*
* File auto-generated from script http://git.gnome.org/cgit/gtk+/tree/gdk/gdkkeysyms-update.pl
* File auto-generated from script http://git.gnome.org/browse/gtk+/tree/gdk/gdkkeysyms-update.pl
* using the input file
* http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=keysymdef.h
* http://cgit.freedesktop.org/xorg/proto/x11proto/plain/keysymdef.h
* and
* http://gitweb.freedesktop.org/?p=xorg/proto/x11proto.git;a=blob_plain;f=XF86keysym.h
* http://cgit.freedesktop.org/xorg/proto/x11proto/plain/XF86keysym.h
*/
/*
@@ -295,6 +295,7 @@
#define GDK_KEY_dead_U 0xfe89
#define GDK_KEY_dead_small_schwa 0xfe8a
#define GDK_KEY_dead_capital_schwa 0xfe8b
#define GDK_KEY_dead_greek 0xfe8c
#define GDK_KEY_First_Virtual_Screen 0xfed0
#define GDK_KEY_Prev_Virtual_Screen 0xfed1
#define GDK_KEY_Next_Virtual_Screen 0xfed2
@@ -341,6 +342,12 @@
#define GDK_KEY_Pointer_Accelerate 0xfefa
#define GDK_KEY_Pointer_DfltBtnNext 0xfefb
#define GDK_KEY_Pointer_DfltBtnPrev 0xfefc
#define GDK_KEY_ch 0xfea0
#define GDK_KEY_Ch 0xfea1
#define GDK_KEY_CH 0xfea2
#define GDK_KEY_c_h 0xfea3
#define GDK_KEY_C_h 0xfea4
#define GDK_KEY_C_H 0xfea5
#define GDK_KEY_3270_Duplicate 0xfd01
#define GDK_KEY_3270_FieldMark 0xfd02
#define GDK_KEY_3270_Right2 0xfd03
@@ -620,9 +627,9 @@
#define GDK_KEY_nacute 0x1f1
#define GDK_KEY_ncaron 0x1f2
#define GDK_KEY_odoubleacute 0x1f5
#define GDK_KEY_udoubleacute 0x1fb
#define GDK_KEY_rcaron 0x1f8
#define GDK_KEY_uring 0x1f9
#define GDK_KEY_udoubleacute 0x1fb
#define GDK_KEY_tcedilla 0x1fe
#define GDK_KEY_abovedot 0x1ff
#define GDK_KEY_Hstroke 0x2a1
@@ -683,32 +690,32 @@
#define GDK_KEY_uogonek 0x3f9
#define GDK_KEY_utilde 0x3fd
#define GDK_KEY_umacron 0x3fe
#define GDK_KEY_Wcircumflex 0x1000174
#define GDK_KEY_wcircumflex 0x1000175
#define GDK_KEY_Ycircumflex 0x1000176
#define GDK_KEY_ycircumflex 0x1000177
#define GDK_KEY_Babovedot 0x1001e02
#define GDK_KEY_babovedot 0x1001e03
#define GDK_KEY_Dabovedot 0x1001e0a
#define GDK_KEY_Wgrave 0x1001e80
#define GDK_KEY_Wacute 0x1001e82
#define GDK_KEY_dabovedot 0x1001e0b
#define GDK_KEY_Ygrave 0x1001ef2
#define GDK_KEY_Fabovedot 0x1001e1e
#define GDK_KEY_fabovedot 0x1001e1f
#define GDK_KEY_Mabovedot 0x1001e40
#define GDK_KEY_mabovedot 0x1001e41
#define GDK_KEY_Pabovedot 0x1001e56
#define GDK_KEY_wgrave 0x1001e81
#define GDK_KEY_pabovedot 0x1001e57
#define GDK_KEY_wacute 0x1001e83
#define GDK_KEY_Sabovedot 0x1001e60
#define GDK_KEY_ygrave 0x1001ef3
#define GDK_KEY_sabovedot 0x1001e61
#define GDK_KEY_Tabovedot 0x1001e6a
#define GDK_KEY_tabovedot 0x1001e6b
#define GDK_KEY_Wgrave 0x1001e80
#define GDK_KEY_wgrave 0x1001e81
#define GDK_KEY_Wacute 0x1001e82
#define GDK_KEY_wacute 0x1001e83
#define GDK_KEY_Wdiaeresis 0x1001e84
#define GDK_KEY_wdiaeresis 0x1001e85
#define GDK_KEY_sabovedot 0x1001e61
#define GDK_KEY_Wcircumflex 0x1000174
#define GDK_KEY_Tabovedot 0x1001e6a
#define GDK_KEY_Ycircumflex 0x1000176
#define GDK_KEY_wcircumflex 0x1000175
#define GDK_KEY_tabovedot 0x1001e6b
#define GDK_KEY_ycircumflex 0x1000177
#define GDK_KEY_Ygrave 0x1001ef2
#define GDK_KEY_ygrave 0x1001ef3
#define GDK_KEY_OE 0x13bc
#define GDK_KEY_oe 0x13bd
#define GDK_KEY_Ydiaeresis 0x13be
@@ -1203,6 +1210,7 @@
#define GDK_KEY_leftdoublequotemark 0xad2
#define GDK_KEY_rightdoublequotemark 0xad3
#define GDK_KEY_prescription 0xad4
#define GDK_KEY_permille 0xad5
#define GDK_KEY_minutes 0xad6
#define GDK_KEY_seconds 0xad7
#define GDK_KEY_latincross 0xad9
@@ -1636,6 +1644,8 @@
#define GDK_KEY_obarred 0x1000275
#define GDK_KEY_SCHWA 0x100018f
#define GDK_KEY_schwa 0x1000259
#define GDK_KEY_EZH 0x10001b7
#define GDK_KEY_ezh 0x1000292
#define GDK_KEY_Lbelowdot 0x1001e36
#define GDK_KEY_lbelowdot 0x1001e37
#define GDK_KEY_Abelowdot 0x1001ea0
@@ -2293,5 +2303,7 @@
#define GDK_KEY_ClearGrab 0x1008fe21
#define GDK_KEY_Next_VMode 0x1008fe22
#define GDK_KEY_Prev_VMode 0x1008fe23
#define GDK_KEY_LogWindowTree 0x1008fe24
#define GDK_KEY_LogGrabInfo 0x1008fe25
#endif /* __GDK_KEYSYMS_H__ */
+8 -1
View File
@@ -830,13 +830,18 @@ static const struct {
/* Following items added to GTK, not in the xterm table */
/* A few ASCII control characters */
#ifndef GDK_WINDOWING_WIN32
{ 0xFF08 /* Backspace */, '\b' },
{ 0xFF09 /* Tab */, '\t' },
#endif
{ 0xFF0A /* Linefeed */, '\n' },
{ 0xFF0B /* Vert. Tab */, '\v' },
#ifndef GDK_WINDOWING_WIN32
{ 0xFF0D /* Return */, '\r' },
{ 0xFF1B /* Escape */, '\033' },
#endif
/* Numeric keypad */
@@ -861,7 +866,9 @@ static const struct {
/* End numeric keypad */
#ifndef GDK_WINDOWING_WIN32
{ 0xFFFF /* Delete */, '\177' }
#endif
};
/**
+8 -1
View File
@@ -217,6 +217,13 @@ gdk_offscreen_window_reparent (GdkWindow *window,
return was_mapped;
}
static void
gdk_offscreen_window_set_device_cursor (GdkWindow *window,
GdkDevice *device,
GdkCursor *cursor)
{
}
static void
from_embedder (GdkWindow *window,
double embedder_x, double embedder_y,
@@ -727,7 +734,7 @@ gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass)
impl_class->move_resize = gdk_offscreen_window_move_resize;
impl_class->set_background = gdk_offscreen_window_set_background;
impl_class->reparent = gdk_offscreen_window_reparent;
impl_class->set_device_cursor = NULL;
impl_class->set_device_cursor = gdk_offscreen_window_set_device_cursor;
impl_class->get_geometry = gdk_offscreen_window_get_geometry;
impl_class->get_root_coords = gdk_offscreen_window_get_root_coords;
impl_class->get_device_state = gdk_offscreen_window_get_device_state;
+4 -1
View File
@@ -28,6 +28,8 @@
#include <errno.h>
#include <math.h>
#include "fallback-c89.c"
/**
* SECTION:rgba_colors
* @Short_description: RGBA colors
@@ -146,7 +148,8 @@ parse_rgb_value (const gchar *str,
* A standard name (Taken from the X11 rgb.txt file).
* </listitem>
* <listitem>
* A hex value in the form '#rgb' '#rrggbb' '#rrrgggbbb' or '#rrrrggggbbbb'
* A hex value in the form '&num;rgb' '&num;rrggbb' '&num;rrrgggbbb'
* or '&num;rrrrggggbbbb'
* </listitem>
* <listitem>
* A RGB color in the form 'rgb(r,g,b)' (In this case the color will
+3 -3
View File
@@ -135,7 +135,7 @@ typedef struct _GdkAppLaunchContext GdkAppLaunchContext;
* in memory as 0xcc, 0xee, 0xff, 0x00.
* @GDK_MSB_FIRST: The values are stored with the most-significant byte
* first. For instance, the 32-bit value 0xffeecc would be stored
* in memory as 0x00, 0xcc, 0xee, 0xff.
* in memory as 0x00, 0xff, 0xee, 0xcc.
*
* A set of values describing the possible byte-orders
* for storing pixel values in memory.
@@ -348,8 +348,8 @@ typedef enum
* @GDK_SUBSTRUCTURE_MASK: receive events about window configuration changes of
* child windows
* @GDK_SCROLL_MASK: receive scroll events
* @GDK_TOUCH_MASK: receive touch events
* @GDK_SMOOTH_SCROLL_MASK: receive smooth scrolling events
* @GDK_TOUCH_MASK: receive touch events. Since 3.4
* @GDK_SMOOTH_SCROLL_MASK: receive smooth scrolling events. Since 3.4
* @GDK_ALL_EVENTS_MASK: the combination of all the above event masks.
*
* A set of bit-flags to indicate which events a window is to receive.
+10 -9
View File
@@ -397,11 +397,11 @@ gdk_window_class_init (GdkWindowClass *klass)
/**
* GdkWindow::to-embedder:
* @window: the offscreen window on which the signal is emitted
* @offscreen-x: x coordinate in the offscreen window
* @offscreen-y: y coordinate in the offscreen window
* @embedder-x: (out) (type double): return location for the x
* @offscreen_x: x coordinate in the offscreen window
* @offscreen_y: y coordinate in the offscreen window
* @embedder_x: (out) (type double): return location for the x
* coordinate in the embedder window
* @embedder-y: (out) (type double): return location for the y
* @embedder_y: (out) (type double): return location for the y
* coordinate in the embedder window
*
* The ::to-embedder signal is emitted to translate coordinates
@@ -428,11 +428,11 @@ gdk_window_class_init (GdkWindowClass *klass)
/**
* GdkWindow::from-embedder:
* @window: the offscreen window on which the signal is emitted
* @embedder-x: x coordinate in the embedder window
* @embedder-y: y coordinate in the embedder window
* @offscreen-x: (out) (type double): return location for the x
* @embedder_x: x coordinate in the embedder window
* @embedder_y: y coordinate in the embedder window
* @offscreen_x: (out) (type double): return location for the x
* coordinate in the offscreen window
* @offscreen-y: (out) (type double): return location for the y
* @offscreen_y: (out) (type double): return location for the y
* coordinate in the offscreen window
*
* The ::from-embedder signal is emitted to translate coordinates
@@ -1300,7 +1300,8 @@ sync_native_window_stack_position (GdkWindow *window)
* @parent: (allow-none): a #GdkWindow, or %NULL to create the window as a child of
* the default root window for the default display.
* @attributes: attributes of the new window
* @attributes_mask: mask indicating which fields in @attributes are valid
* @attributes_mask: (type GdkWindowAttributesType): mask indicating which
* fields in @attributes are valid
*
* Creates a new #GdkWindow using the attributes from
* @attributes. See #GdkWindowAttr and #GdkWindowAttributesType for
+1
View File
@@ -220,6 +220,7 @@ const static struct {
{ 0xf2c6, GDK_KEY_dead_circumflex },
{ 0xf302, GDK_KEY_dead_circumflex },
{ 0xf07e, GDK_KEY_dead_tilde },
{ 0xf2dc, GDK_KEY_dead_tilde },
{ 0xf303, GDK_KEY_dead_tilde },
{ 0xf342, GDK_KEY_dead_perispomeni },
{ 0xf0af, GDK_KEY_dead_macron },
+2 -2
View File
@@ -145,7 +145,7 @@ translate_key_event (GdkDisplay *display,
gdk_event_set_device (event, device_manager->core_keyboard);
event->key.state = (GdkModifierType) xevent->xkey.state;
event->key.group = _gdk_x11_get_group_for_state (display, xevent->xkey.state);
event->key.group = gdk_x11_keymap_get_group_for_state_libgtk_only (keymap, xevent->xkey.state);
event->key.hardware_keycode = xevent->xkey.keycode;
event->key.keyval = GDK_KEY_VoidSymbol;
@@ -161,7 +161,7 @@ translate_key_event (GdkDisplay *display,
_gdk_x11_keymap_add_virt_mods (keymap, &state);
event->key.state |= state;
event->key.is_modifier = _gdk_x11_keymap_key_is_modifier (keymap, event->key.hardware_keycode);
event->key.is_modifier = gdk_x11_keymap_key_is_modifier_libgtk_only (keymap, event->key.hardware_keycode);
_gdk_x11_event_translate_keyboard_string (&event->key);
+25 -12
View File
@@ -1062,7 +1062,7 @@ scroll_valuators_changed (GdkX11DeviceXI2 *device,
gdouble *dx,
gdouble *dy)
{
gdouble has_scroll_valuators = FALSE;
gboolean has_scroll_valuators = FALSE;
GdkScrollDirection direction;
guint n_axes, i, n_val;
gdouble *vals;
@@ -1160,10 +1160,10 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
event->key.time = xev->time;
event->key.state = _gdk_x11_device_xi2_translate_state (&xev->mods, &xev->buttons, &xev->group);
event->key.group = _gdk_x11_get_group_for_state (display, event->key.state);
event->key.group = xev->group.effective;
event->key.hardware_keycode = xev->detail;
event->key.is_modifier = _gdk_x11_keymap_key_is_modifier (keymap, event->key.hardware_keycode);
event->key.is_modifier = gdk_x11_keymap_key_is_modifier_libgtk_only (keymap, event->key.hardware_keycode);
device = g_hash_table_lookup (device_manager->id_table,
GUINT_TO_POINTER (xev->deviceid));
@@ -1305,20 +1305,37 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
case XI_Motion:
{
XIDeviceEvent *xev = (XIDeviceEvent *) ev;
GdkDevice *source_device;
GdkDevice *source_device, *device;
gdouble delta_x, delta_y;
source_device = g_hash_table_lookup (device_manager->id_table,
GUINT_TO_POINTER (xev->sourceid));
device = g_hash_table_lookup (device_manager->id_table,
GUINT_TO_POINTER (xev->deviceid));
if (scroll_valuators_changed (GDK_X11_DEVICE_XI2 (source_device),
/* When scrolling, X might send events twice here; once with both the
* device and the source device set to the physical device, and once
* with the device set to the master device.
* Since we are only interested in the latter, and
* scroll_valuators_changed() updates the valuator cache for the
* source device, we need to explicitly ignore the first event in
* order to get the correct delta for the second.
*/
if (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_SLAVE &&
scroll_valuators_changed (GDK_X11_DEVICE_XI2 (source_device),
&xev->valuators, &delta_x, &delta_y))
{
event->scroll.type = GDK_SCROLL;
event->scroll.direction = GDK_SCROLL_SMOOTH;
GDK_NOTE(EVENTS,
g_message ("smooth scroll:\twindow %ld\n\tdeltas: %f %f",
g_message ("smooth scroll: %s\n\tdevice: %u\n\tsource device: %u\n\twindow %ld\n\tdeltas: %f %f",
#ifdef XINPUT_2_2
(xev->flags & XIPointerEmulated) ? "emulated" : "",
#else
"",
#endif
xev->deviceid, xev->sourceid,
xev->event, delta_x, delta_y));
@@ -1331,9 +1348,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
event->scroll.delta_x = delta_x;
event->scroll.delta_y = delta_y;
event->scroll.device = g_hash_table_lookup (device_manager->id_table,
GUINT_TO_POINTER (xev->deviceid));
event->scroll.device = device;
gdk_event_set_source_device (event, source_device);
event->scroll.state = _gdk_x11_device_xi2_translate_state (&xev->mods, &xev->buttons, &xev->group);
@@ -1348,9 +1363,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
event->motion.x_root = (gdouble) xev->root_x;
event->motion.y_root = (gdouble) xev->root_y;
event->motion.device = g_hash_table_lookup (device_manager->id_table,
GINT_TO_POINTER (xev->deviceid));
event->motion.device = device;
gdk_event_set_source_device (event, source_device);
event->motion.state = _gdk_x11_device_xi2_translate_state (&xev->mods, &xev->buttons, &xev->group);
+7 -8
View File
@@ -659,16 +659,15 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
* means we hid the window ourselves, so we will have already flipped
* the iconified bit off.
*/
if (window)
{
if (GDK_WINDOW_IS_MAPPED (window))
gdk_synthesize_window_state (window,
0,
GDK_WINDOW_STATE_ICONIFIED);
_gdk_x11_window_grab_check_unmap (window, xevent->xany.serial);
}
if (window && GDK_WINDOW_IS_MAPPED (window))
gdk_synthesize_window_state (window,
0,
GDK_WINDOW_STATE_ICONIFIED);
}
if (window)
_gdk_x11_window_grab_check_unmap (window, xevent->xany.serial);
break;
case MapNotify:
+2 -4
View File
@@ -240,12 +240,12 @@ gdk_drag_context_find (GdkDisplay *display,
Window source_xid,
Window dest_xid)
{
GList *tmp_list = contexts;
GList *tmp_list;
GdkDragContext *context;
GdkX11DragContext *context_x11;
Window context_dest_xid;
while (tmp_list)
for (tmp_list = contexts; tmp_list; tmp_list = tmp_list->next)
{
context = (GdkDragContext *)tmp_list->data;
context_x11 = (GdkX11DragContext *)context;
@@ -265,8 +265,6 @@ gdk_drag_context_find (GdkDisplay *display,
(GDK_WINDOW_XID (context->source_window) == source_xid))) &&
((dest_xid == None) || (context_dest_xid == dest_xid)))
return context;
tmp_list = tmp_list->next;
}
return NULL;
+38 -5
View File
@@ -1429,11 +1429,28 @@ _gdk_x11_display_manager_keyval_convert_case (GdkDisplayManager *manager,
*upper = xupper;
}
/**
* gdk_x11_keymap_get_group_for_state_libgtk_only:
* @keymap: a #GdkX11Keymap
* @state: raw state returned from X
*
* Extracts the group from the state field sent in an X Key event.
* This is only needed for code processing raw X events, since #GdkEventKey
* directly includes an is_modifier field.
*
* Returns: the index of the active keyboard group for the event
*/
gint
_gdk_x11_get_group_for_state (GdkDisplay *display,
GdkModifierType state)
gdk_x11_keymap_get_group_for_state_libgtk_only (GdkKeymap *keymap,
guint state)
{
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
GdkDisplay *display;
GdkX11Display *display_x11;
g_return_val_if_fail (GDK_IS_X11_KEYMAP (keymap), 0);
display = keymap->display;
display_x11 = GDK_X11_DISPLAY (display);
#ifdef HAVE_XKB
if (display_x11->use_xkb)
@@ -1498,13 +1515,29 @@ gdk_x11_keymap_add_virtual_modifiers (GdkKeymap *keymap,
}
}
/**
* gdk_x11_keymap_key_is_modifier_libgtk_only:
* @keymap: a #GdkX11Keymap
* @keycode: the hardware keycode from a key event
*
* Determines whether a particular key code represents a key that
* is a modifier. That is, it's a key that normally just affects
* the keyboard state and the behavior of other keys rather than
* producing a direct effect itself. This is only needed for code
* processing raw X events, since #GdkEventKey directly includes
* an is_modifier field.
*
* Returns: %TRUE if the hardware keycode is a modifier key
*/
gboolean
_gdk_x11_keymap_key_is_modifier (GdkKeymap *keymap,
guint keycode)
gdk_x11_keymap_key_is_modifier_libgtk_only (GdkKeymap *keymap,
guint keycode)
{
GdkX11Keymap *keymap_x11 = GDK_X11_KEYMAP (keymap);
gint i;
g_return_val_if_fail (GDK_IS_X11_KEYMAP (keymap), FALSE);
update_keyrange (keymap_x11);
if (keycode < keymap_x11->min_keycode ||
keycode > keymap_x11->max_keycode)
-4
View File
@@ -155,12 +155,8 @@ gboolean _gdk_x11_moveresize_configure_done (GdkDisplay *display,
void _gdk_x11_keymap_state_changed (GdkDisplay *display,
XEvent *event);
void _gdk_x11_keymap_keys_changed (GdkDisplay *display);
gint _gdk_x11_get_group_for_state (GdkDisplay *display,
GdkModifierType state);
void _gdk_x11_keymap_add_virt_mods (GdkKeymap *keymap,
GdkModifierType *modifiers);
gboolean _gdk_x11_keymap_key_is_modifier (GdkKeymap *keymap,
guint keycode);
void _gdk_x11_windowing_init (void);
+8
View File
@@ -280,6 +280,10 @@ get_current_desktop (GdkScreen *screen)
unsigned char *data_return = NULL;
int workspace = 0;
if (!gdk_x11_screen_supports_net_wm_hint (screen,
gdk_atom_intern_static_string ("_NET_CURRENT_DESKTOP")))
return workspace;
display = GDK_DISPLAY_XDISPLAY (gdk_screen_get_display (screen));
win = XRootWindow (display, GDK_SCREEN_XNUMBER (screen));
@@ -330,6 +334,10 @@ get_work_area (GdkScreen *screen,
area->width = gdk_screen_get_width (screen);
area->height = gdk_screen_get_height (screen);
if (!gdk_x11_screen_supports_net_wm_hint (screen,
gdk_atom_intern_static_string ("_NET_WORKAREA")))
return;
if (workarea == None)
return;
+9 -3
View File
@@ -1738,7 +1738,9 @@ static void
move_to_current_desktop (GdkWindow *window)
{
if (gdk_x11_screen_supports_net_wm_hint (GDK_WINDOW_SCREEN (window),
gdk_atom_intern_static_string ("_NET_WM_DESKTOP")))
gdk_atom_intern_static_string ("_NET_WM_DESKTOP")) &&
gdk_x11_screen_supports_net_wm_hint (GDK_WINDOW_SCREEN (window),
gdk_atom_intern_static_string ("_NET_CURRENT_DESKTOP")))
{
Atom type;
gint format;
@@ -2717,7 +2719,9 @@ gdk_x11_window_get_frame_extents (GdkWindow *window,
xwindow = GDK_WINDOW_XID (window);
/* first try: use _NET_FRAME_EXTENTS */
if (XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), xwindow,
if (gdk_x11_screen_supports_net_wm_hint (GDK_WINDOW_SCREEN (window),
gdk_atom_intern_static_string ("_NET_FRAME_EXTENTS")) &&
XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), xwindow,
gdk_x11_get_xatom_by_name_for_display (display,
"_NET_FRAME_EXTENTS"),
0, G_MAXLONG, False, XA_CARDINAL, &type_return,
@@ -2764,7 +2768,9 @@ gdk_x11_window_get_frame_extents (GdkWindow *window,
/* use NETWM_VIRTUAL_ROOTS if available */
root = GDK_WINDOW_XROOTWIN (window);
if (XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), root,
if (gdk_x11_screen_supports_net_wm_hint (GDK_WINDOW_SCREEN (window),
gdk_atom_intern_static_string ("_NET_VIRTUAL_ROOTS")) &&
XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), root,
gdk_x11_get_xatom_by_name_for_display (display,
"_NET_VIRTUAL_ROOTS"),
0, G_MAXLONG, False, XA_WINDOW, &type_return,
+5
View File
@@ -42,6 +42,11 @@ typedef struct _GdkX11KeymapClass GdkX11KeymapClass;
GType gdk_x11_keymap_get_type (void);
gint gdk_x11_keymap_get_group_for_state_libgtk_only (GdkKeymap *keymap,
guint state);
gboolean gdk_x11_keymap_key_is_modifier_libgtk_only (GdkKeymap *keymap,
guint keycode);
G_END_DECLS
#endif /* __GDK_X11_KEYMAP_H__ */
+29 -16
View File
@@ -865,34 +865,47 @@ gtk_use_win32_c_sources = \
gtk_use_quartz_c_sources = \
gtksearchenginequartz.c \
gtkmountoperation-stub.c \
gtkquartz-menu.h \
gtkquartz-menu.c \
gtkquartz-menu.c \
gtkquartz.c
gtk_use_stub_c_sources = \
gtkmountoperation-stub.c
gtk_all_c_sources += $(gtk_use_x11_c_sources) $(gtk_use_win32_c_sources) $(gtk_use_quartz_c_sources) $(gtk_use_stub_c_sources)
if USE_X11
gtk_private_h_sources += \
gtk_use_x11_private_h_sources = \
gtkxembed.h \
gtktrayicon.h \
xembed.h
if USE_X11
gtk_c_sources += $(gtk_use_x11_c_sources)
else
if USE_WIN32
gtk_private_h_sources += \
gtk_private_h_sources += $(gtk_use_x11_private_h_sources)
endif
gtk_use_win32_private_h_sources = \
gtkwin32embed.h \
gtkwin32embedwidget.h
if USE_WIN32
gtk_c_sources += $(gtk_use_win32_c_sources)
else
if USE_QUARTZ
gtk_private_h_sources += \
gtk_private_h_sources += $(gtk_use_win32_private_h_sources)
endif
gtk_use_quartz_private_h_sources = \
gtksearchenginequartz.h \
gtkmenuquartz.h \
gtkquartz-menu.h \
gtkquartz.h
if USE_QUARTZ
gtk_c_sources += $(gtk_use_quartz_c_sources)
libgtk_3_la_CFLAGS = "-xobjective-c"
gtk_private_h_sources += $(gtk_use_quartz_private_h_sources)
endif
else
gtk_all_private_h_sources = \
$(gtk_private_h_sources) \
$(gtk_use_x11_private_h_sources) \
$(gtk_use_win32_private_h_sources) \
$(gtk_use_quartz_private_h_sources)
if !USE_X11
if !USE_WIN32
if !USE_QUARTZ
gtk_c_sources += $(gtk_use_stub_c_sources)
endif
endif
@@ -976,7 +989,7 @@ MAINTAINERCLEANFILES = \
stock-icons/icon-theme.cache
EXTRA_HEADERS =
EXTRA_DIST += $(gtk_private_h_sources) $(gtk_extra_sources)
EXTRA_DIST += $(gtk_all_private_h_sources) $(gtk_extra_sources)
EXTRA_DIST += $(gtk_built_sources)
EXTRA_DIST += $(STOCK_ICONS)
@@ -1096,7 +1109,7 @@ endif
if USE_QUARTZ
install-mac-key-theme:
$(mkdir_p) $(DESTDIR)$(datadir)/themes/Mac/gtk-3.0
$(MKDIR_P) $(DESTDIR)$(datadir)/themes/Mac/gtk-3.0
$(INSTALL_DATA) $(srcdir)/gtk-keys.css.mac $(DESTDIR)$(datadir)/themes/Mac/gtk-3.0/gtk-keys.css
uninstall-mac-key-theme:
rm -f $(DESTDIR)$(datadir)/themes/Mac/gtk-3.0/gtk-keys.css
@@ -1139,9 +1152,9 @@ dist-hook: ../build/win32/vs9/gtk.vcproj ../build/win32/vs10/gtk.vcxproj ../buil
# Install a RC file for the default GTK+ theme, and key themes
install-data-local: install-ms-lib install-def-file install-mac-key-theme
$(mkdir_p) $(DESTDIR)$(datadir)/themes/Default/gtk-3.0
$(MKDIR_P) $(DESTDIR)$(datadir)/themes/Default/gtk-3.0
$(INSTALL_DATA) $(srcdir)/gtk-keys.css.default $(DESTDIR)$(datadir)/themes/Default/gtk-3.0/gtk-keys.css
$(mkdir_p) $(DESTDIR)$(datadir)/themes/Emacs/gtk-3.0
$(MKDIR_P) $(DESTDIR)$(datadir)/themes/Emacs/gtk-3.0
$(INSTALL_DATA) $(srcdir)/gtk-keys.css.emacs $(DESTDIR)$(datadir)/themes/Emacs/gtk-3.0/gtk-keys.css
uninstall-local: uninstall-ms-lib uninstall-def-file uninstall-mac-key-theme
+1 -1
View File
@@ -226,7 +226,7 @@ get_pixbuf_box (GtkIconView *icon_view,
_gtk_icon_view_set_cell_data (icon_view, item);
gtk_cell_area_foreach_alloc (icon_view->priv->cell_area, context,
GTK_WIDGET (icon_view),
(GdkRectangle *)item, (GdkRectangle *)item,
&item->cell_area, &item->cell_area,
(GtkCellAllocCallback)get_pixbuf_foreach, &data);
return data.pixbuf_found;
+2 -5
View File
@@ -542,11 +542,8 @@ gtk_text_cell_accessible_get_character_extents (AtkText *text,
gtk_renderer = GTK_CELL_RENDERER_TEXT (gail_renderer->renderer);
g_object_get (gtk_renderer, "text", &renderer_text, NULL);
if (text == NULL)
{
g_free (renderer_text);
return;
}
if (renderer_text == NULL)
return;
parent = atk_object_get_parent (ATK_OBJECT (text));
if (GTK_IS_CONTAINER_CELL_ACCESSIBLE (parent))
+28 -11
View File
@@ -1785,24 +1785,41 @@ _gtk_tree_view_accessible_toggle_visibility (GtkTreeView *treeview,
GtkTreeViewColumn *column)
{
AtkObject *obj;
guint id;
guint i, id;
obj = _gtk_widget_peek_accessible (GTK_WIDGET (treeview));
if (obj == NULL)
return;
id = get_column_number (treeview, column);
if (gtk_tree_view_column_get_visible (column))
_gtk_tree_view_accessible_do_add_column (GTK_TREE_VIEW_ACCESSIBLE (obj),
treeview,
column,
id);
{
id = get_column_number (treeview, column);
_gtk_tree_view_accessible_do_add_column (GTK_TREE_VIEW_ACCESSIBLE (obj),
treeview,
column,
id);
}
else
_gtk_tree_view_accessible_do_remove_column (GTK_TREE_VIEW_ACCESSIBLE (obj),
treeview,
column,
id);
{
id = 0;
for (i = 0; i < gtk_tree_view_get_n_columns (treeview); i++)
{
GtkTreeViewColumn *cur = gtk_tree_view_get_column (treeview, i);
if (gtk_tree_view_column_get_visible (cur))
id++;
if (cur == column)
break;
}
_gtk_tree_view_accessible_do_remove_column (GTK_TREE_VIEW_ACCESSIBLE (obj),
treeview,
column,
id);
}
}
static GtkTreeViewColumn *
+14 -33
View File
@@ -821,12 +821,11 @@ gtk_font_selection_show_available_fonts (GtkFontSelection *fontsel)
const gchar *name = pango_font_family_get_name (families[i]);
GtkTreeIter iter;
gtk_list_store_append (model, &iter);
gtk_list_store_set (model, &iter,
FAMILY_COLUMN, families[i],
FAMILY_NAME_COLUMN, name,
-1);
gtk_list_store_insert_with_values (model, &iter, -1,
FAMILY_COLUMN, families[i],
FAMILY_NAME_COLUMN, name,
-1);
if (i == 0 || !g_ascii_strcasecmp (name, "sans"))
{
match_family = families[i];
@@ -923,11 +922,10 @@ gtk_font_selection_show_available_styles (GtkFontSelection *fontsel)
GtkTreeIter iter;
const gchar *str = pango_font_face_get_face_name (faces[i]);
gtk_list_store_append (model, &iter);
gtk_list_store_set (model, &iter,
FACE_COLUMN, faces[i],
FACE_NAME_COLUMN, str,
-1);
gtk_list_store_insert_with_values (model, &iter, -1,
FACE_COLUMN, faces[i],
FACE_NAME_COLUMN, str,
-1);
if (i == 0)
{
@@ -1034,8 +1032,8 @@ gtk_font_selection_show_available_sizes (GtkFontSelection *fontsel,
{
GtkTreeIter iter;
gtk_list_store_append (model, &iter);
gtk_list_store_set (model, &iter, SIZE_COLUMN, font_sizes[i], -1);
gtk_list_store_insert_with_values (model, &iter, -1,
SIZE_COLUMN, font_sizes[i], -1);
if (font_sizes[i] * PANGO_SCALE == priv->size)
set_cursor_to_iter (GTK_TREE_VIEW (priv->size_list), &iter);
@@ -1055,7 +1053,8 @@ gtk_font_selection_show_available_sizes (GtkFontSelection *fontsel,
found = TRUE;
}
gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &iter);
if (!gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &iter))
break;
}
if (!found)
@@ -1183,36 +1182,18 @@ gtk_font_selection_get_font_description (GtkFontSelection *fontsel)
return font_desc;
}
/* This sets the font in the preview entry to the selected font,
* and tries to make sure that the preview entry is a reasonable
* size, i.e. so that the text can be seen with a bit of space to
* spare. But it tries to avoid resizing the entry every time the
* font changes. This also used to shrink the preview if the font
* size was decreased, but that made it awkward if the user wanted
* to resize the window themself.
/* This sets the font in the preview entry to the selected font.
*/
static void
gtk_font_selection_update_preview (GtkFontSelection *fontsel)
{
GtkFontSelectionPrivate *priv = fontsel->priv;
gint new_height;
GtkRequisition old_requisition, new_requisition;
GtkWidget *preview_entry = priv->preview_entry;
const gchar *text;
gtk_widget_get_preferred_size (preview_entry, &old_requisition, NULL);
gtk_widget_override_font (preview_entry,
gtk_font_selection_get_font_description (fontsel));
gtk_widget_get_preferred_size (preview_entry, &new_requisition, NULL);
/* We don't ever want to be over MAX_PREVIEW_HEIGHT pixels high. */
new_height = CLAMP (new_requisition.height, INITIAL_PREVIEW_HEIGHT, MAX_PREVIEW_HEIGHT);
if (new_height > old_requisition.height || new_height < old_requisition.height - 30)
gtk_widget_set_size_request (preview_entry, -1, new_height);
/* This sets the preview text, if it hasn't been set already. */
text = gtk_entry_get_text (GTK_ENTRY (preview_entry));
if (strlen (text) == 0)
+1 -1
View File
@@ -673,7 +673,7 @@ set_color (GtkStyle *style,
break;
}
if (color)
if (color && color->alpha > 0.01)
{
dest->pixel = 0;
dest->red = CLAMP ((guint) (color->red * 65535), 0, 65535);
+12 -1
View File
@@ -53,4 +53,15 @@ rint (double x)
return ceil (x - 0.5);
}
}
#endif
#endif
#ifndef HAVE_NEARBYINT
/* Workaround for nearbyint() for non-GCC/non-C99 compilers */
/* This is quite similar to rint() in most respects */
static inline double
nearbyint (double x)
{
return floor (x + 0.5);
}
#endif
+5 -4
View File
@@ -352,6 +352,11 @@ static void
g_action_muxer_free_group (gpointer data)
{
Group *group = data;
gint i;
/* 'for loop' or 'four loop'? */
for (i = 0; i < 4; i++)
g_signal_handler_disconnect (group->group, group->handler_ids[i]);
g_object_unref (group->group);
g_free (group->prefix);
@@ -485,10 +490,6 @@ g_action_muxer_remove (GActionMuxer *muxer,
g_action_muxer_action_removed (group->group, actions[i], group);
g_strfreev (actions);
/* 'for loop' or 'four loop'? */
for (i = 0; i < 4; i++)
g_signal_handler_disconnect (group->group, group->handler_ids[i]);
g_action_muxer_free_group (group);
}
}
+1 -1
View File
@@ -149,7 +149,7 @@ gtk_accel_group_class_init (GtkAccelGroupClass *class)
* @modifier: the modifier combination of the accelerator
* @accel_closure: the #GClosure of the accelerator
*
* The accel-changed signal is emitted when a #GtkAccelGroupEntry
* The accel-changed signal is emitted when an entry
* is added to or removed from the accel group.
*
* Widgets like #GtkAccelLabel which display an associated
+3
View File
@@ -207,6 +207,9 @@ _gtk_accel_path_is_valid (const gchar *accel_path)
* To change the accelerator during runtime programatically, use
* gtk_accel_map_change_entry().
*
* Set @accel_key and @accel_mods to 0 to request a removal of
* the accelerator.
*
* Note that @accel_path string will be stored in a #GQuark. Therefore, if you
* pass a static string, you can save some memory by interning it first with
* g_intern_static_string().
+5 -3
View File
@@ -791,18 +791,20 @@ _gtk_action_emit_activate (GtkAction *action)
{
GtkActionGroup *group = action->private_data->action_group;
if (group != NULL)
if (group != NULL)
{
g_object_ref (action);
g_object_ref (group);
_gtk_action_group_emit_pre_activate (group, action);
}
g_signal_emit (action, action_signals[ACTIVATE], 0);
g_signal_emit (action, action_signals[ACTIVATE], 0);
if (group != NULL)
if (group != NULL)
{
_gtk_action_group_emit_post_activate (group, action);
g_object_unref (group);
g_object_unref (action);
}
}
+20 -6
View File
@@ -185,6 +185,9 @@ gtk_application_x11_publish_menu (GtkApplication *application,
{
gint i;
if (application->priv->session_bus == NULL)
return;
/* unexport any existing menu */
if (*id)
{
@@ -276,6 +279,9 @@ object_path_from_appid (const gchar *appid)
{
gchar *appid_path, *iter;
if (appid == NULL)
return g_strdup ("/org/gtk/Application/anonymous");
appid_path = g_strconcat ("/", appid, NULL);
for (iter = appid_path; *iter; iter++)
{
@@ -805,7 +811,7 @@ GtkApplication *
gtk_application_new (const gchar *application_id,
GApplicationFlags flags)
{
g_return_val_if_fail (g_application_id_is_valid (application_id), NULL);
g_return_val_if_fail (application_id == NULL || g_application_id_is_valid (application_id), NULL);
g_type_init ();
@@ -820,7 +826,7 @@ gtk_application_new (const gchar *application_id,
* @application: a #GtkApplication
* @window: a #GtkWindow
*
* Adds a window from @application.
* Adds a window to @application.
*
* This call is equivalent to setting the #GtkWindow:application
* property of @window to @application.
@@ -999,6 +1005,10 @@ gtk_application_remove_accelerator (GtkApplication *application,
*
* Sets or unsets the application menu for @application.
*
* This can only be done in the primary instance of the application,
* after it has been registered. #GApplication:startup is a good place
* to call this.
*
* The application menu is a single menu containing items that typically
* impact the application as a whole, rather than acting on a specific
* window or document. For example, you would expect to see
@@ -1008,8 +1018,6 @@ gtk_application_remove_accelerator (GtkApplication *application,
* If supported, the application menu will be rendered by the desktop
* environment.
*
* You might call this method in your #GApplication:startup signal handler.
*
* Use the base #GActionMap interface to add actions, to respond to the user
* selecting these menu items.
*
@@ -1020,6 +1028,8 @@ gtk_application_set_app_menu (GtkApplication *application,
GMenuModel *app_menu)
{
g_return_if_fail (GTK_IS_APPLICATION (application));
g_return_if_fail (g_application_get_is_registered (G_APPLICATION (application)));
g_return_if_fail (!g_application_get_is_remote (G_APPLICATION (application)));
if (app_menu != application->priv->app_menu)
{
@@ -1069,6 +1079,10 @@ gtk_application_get_app_menu (GtkApplication *application)
*
* This is a menubar in the traditional sense.
*
* This can only be done in the primary instance of the application,
* after it has been registered. #GApplication:startup is a good place
* to call this.
*
* Depending on the desktop environment, this may appear at the top of
* each window, or at the top of the screen. In some environments, if
* both the application menu and the menubar are set, the application
@@ -1077,8 +1091,6 @@ gtk_application_get_app_menu (GtkApplication *application)
* example, the application menu may be rendered by the desktop shell
* while the menubar (if set) remains in each individual window.
*
* You might call this method in your #GApplication:startup signal handler.
*
* Use the base #GActionMap interface to add actions, to respond to the user
* selecting these menu items.
*
@@ -1089,6 +1101,8 @@ gtk_application_set_menubar (GtkApplication *application,
GMenuModel *menubar)
{
g_return_if_fail (GTK_IS_APPLICATION (application));
g_return_if_fail (g_application_get_is_registered (G_APPLICATION (application)));
g_return_if_fail (!g_application_get_is_remote (G_APPLICATION (application)));
if (menubar != application->priv->menubar)
{
+42 -24
View File
@@ -257,6 +257,32 @@ gtk_application_window_update_menubar (GtkApplicationWindow *window)
}
}
static gchar *
gtk_application_window_get_app_desktop_name ()
{
gchar *retval = NULL;
#ifdef HAVE_GIO_UNIX
GDesktopAppInfo *app_info;
const gchar *app_name = NULL;
gchar *desktop_file;
desktop_file = g_strconcat (g_get_prgname (), ".desktop", NULL);
app_info = g_desktop_app_info_new (desktop_file);
g_free (desktop_file);
if (app_info != NULL)
app_name = g_app_info_get_name (G_APP_INFO (app_info));
if (app_name != NULL)
retval = g_strdup (app_name);
g_clear_object (&app_info);
#endif /* HAVE_GIO_UNIX */
return retval;
}
static void
gtk_application_window_update_shell_shows_app_menu (GtkApplicationWindow *window,
GtkSettings *settings)
@@ -282,33 +308,25 @@ gtk_application_window_update_shell_shows_app_menu (GtkApplicationWindow *window
if (app_menu != NULL)
{
const gchar *name;
GDesktopAppInfo *app_info = NULL;
const gchar *app_name;
gchar *name;
name = g_get_application_name ();
if (name == g_get_prgname ())
app_name = g_get_application_name ();
if (app_name != g_get_prgname ())
{
const gchar *app_name = NULL;
#ifdef HAVE_GIO_UNIX
gchar *desktop_name;
desktop_name = g_strconcat (name, ".desktop", NULL);
app_info = g_desktop_app_info_new (desktop_name);
if (app_info != NULL)
app_name = g_app_info_get_name (G_APP_INFO (app_info));
g_free (desktop_name);
#endif /* HAVE_GIO_UNIX */
if (app_name != NULL &&
g_strcmp0 (app_name, name) != 0)
name = app_name;
else
name = _("Application");
/* the app has set its application name, use it */
name = g_strdup (app_name);
}
else
{
/* get the name from .desktop file */
name = gtk_application_window_get_app_desktop_name ();
if (name == NULL)
name = g_strdup (_("Application"));
}
g_menu_append_submenu (window->priv->app_menu_section, name, app_menu);
g_clear_object (&app_info);
g_free (name);
}
}
}
@@ -750,7 +768,7 @@ gtk_application_window_real_realize (GtkWidget *widget)
gdkwindow = gtk_widget_get_window (GTK_WIDGET (window));
if (GDK_IS_X11_WINDOW (gdkwindow))
if (GDK_IS_X11_WINDOW (gdkwindow) && window->priv->session)
{
gdk_x11_window_set_utf8_property (gdkwindow, "_GTK_APPLICATION_ID",
g_application_get_application_id (G_APPLICATION (application)));
+2 -2
View File
@@ -1005,11 +1005,11 @@ gtk_assistant_init (GtkAssistant *assistant)
gtk_button_set_image (GTK_BUTTON (priv->forward),
gtk_image_new_from_stock (GTK_STOCK_GO_FORWARD, GTK_ICON_SIZE_BUTTON));
priv->back = gtk_button_new_with_mnemonic (_("Go _Back"));
gtk_button_set_image (GTK_BUTTON (priv->forward),
gtk_button_set_image (GTK_BUTTON (priv->back),
gtk_image_new_from_stock (GTK_STOCK_GO_BACK, GTK_ICON_SIZE_BUTTON));
priv->cancel = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
priv->last = gtk_button_new_with_mnemonic (_("_Finish"));
gtk_button_set_image (GTK_BUTTON (priv->forward),
gtk_button_set_image (GTK_BUTTON (priv->last),
gtk_image_new_from_stock (GTK_STOCK_GOTO_LAST, GTK_ICON_SIZE_BUTTON));
gtk_widget_set_can_default (priv->close, TRUE);
gtk_widget_set_can_default (priv->apply, TRUE);
+2
View File
@@ -81,6 +81,7 @@
#include "gtkboxprivate.h"
#include "gtkintl.h"
#include "gtkorientable.h"
#include "gtkorientableprivate.h"
#include "gtkprivate.h"
#include "gtktypebuiltins.h"
#include "gtksizerequest.h"
@@ -353,6 +354,7 @@ gtk_box_set_property (GObject *object,
{
case PROP_ORIENTATION:
private->orientation = g_value_get_enum (value);
_gtk_orientable_set_style_classes (GTK_ORIENTABLE (box));
gtk_widget_queue_resize (GTK_WIDGET (box));
break;
case PROP_SPACING:
+4 -4
View File
@@ -963,15 +963,15 @@ end_element (GMarkupParseContext *context,
else if (strcmp (element_name, "interface") == 0)
{
}
else if (strcmp (element_name, "menu") == 0)
{
_gtk_builder_menu_end (data);
}
else if (data->requested_objects && !data->inside_requested_object)
{
/* If outside a requested object, simply ignore this tag */
return;
}
else if (strcmp (element_name, "menu") == 0)
{
_gtk_builder_menu_end (data);
}
else if (strcmp (element_name, "object") == 0)
{
ObjectInfo *object_info = state_pop_info (data, ObjectInfo);
+8 -3
View File
@@ -41,12 +41,12 @@
* elements on a #cairo_t. Typically, one cell renderer is used to
* draw many cells on the screen. To this extent, it isn't expected that a
* CellRenderer keep any permanent state around. Instead, any state is set
* just prior to use using #GObject<!-- -->s property system. Then, the
* just prior to use using #GObjects property system. Then, the
* cell is measured using gtk_cell_renderer_get_size(). Finally, the cell
* is rendered in the correct location using gtk_cell_renderer_render().
*
* There are a number of rules that must be followed when writing a new
* #GtkCellRenderer. First and formost, its important that a certain set
* #GtkCellRenderer. First and foremost, its important that a certain set
* of properties will always yield a cell renderer of the same size,
* barring a #GtkStyle change. The #GtkCellRenderer also has a number of
* generic properties that are expected to be honored by all children.
@@ -60,6 +60,11 @@
* To make a cell renderer activatable or editable, you have to
* implement the #GtkCellRendererClass.activate or
* #GtkCellRendererClass.start_editing virtual functions, respectively.
*
* Many properties of #GtkCellRenderer and its subclasses have a
* corresponding "set" property, e.g. "cell-background-set" corresponds
* to "cell-background". These "set" properties reflect whether a property
* has been set or not. You should not set them independently.
*/
@@ -420,7 +425,7 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class)
ADD_SET_PROP ("cell-background-set", PROP_CELL_BACKGROUND_SET,
P_("Cell background set"),
P_("Whether this tag affects the cell background color"));
P_("Whether the cell background color is set"));
g_type_class_add_private (class, sizeof (GtkCellRendererPrivate));
+19 -2
View File
@@ -1090,7 +1090,7 @@ gtk_drag_begin_idle (gpointer arg)
[nswindow dragImage:drag_image
at:point
offset:NSMakeSize(0, 0)
offset:NSZeroSize
event:info->nsevent
pasteboard:pasteboard
source:nswindow
@@ -1134,8 +1134,25 @@ gtk_drag_begin_internal (GtkWidget *widget,
{
if (gdk_event_get_coords (event, &x, &y))
{
/* We need to translate (x, y) to coordinates relative to the
* toplevel GdkWindow, which should be the GdkWindow backing
* nswindow. Then, we convert to the NSWindow coordinate system.
*/
GdkWindow *window = event->any.window;
GdkWindow *toplevel = gdk_window_get_effective_toplevel (window);
while (window != toplevel)
{
double old_x = x;
double old_y = y;
gdk_window_coords_to_parent (window, old_x, old_y,
&x, &y);
window = gdk_window_get_effective_parent (window);
}
point.x = x;
point.y = y;
point.y = gdk_window_get_height (window) - y;
}
time = (double)gdk_event_get_time (event);
}
+28 -20
View File
@@ -790,8 +790,9 @@ gtk_entry_class_init (GtkEntryClass *class)
*
* Sets the text area's border between the text and the frame.
*
* Deprecated: 3.4: Use the standard border and padding CSS properties;
* the value of this style property is ignored.
* Deprecated: 3.4: Use the standard border and padding CSS properties
* (through objects like #GtkStyleContext and #GtkCssProvider); the value
* of this style property is ignored.
*/
g_object_class_install_property (gobject_class,
PROP_INNER_BORDER,
@@ -1379,8 +1380,9 @@ gtk_entry_class_init (GtkEntryClass *class)
*
* Since: 2.16
*
* Deprecated: 3.4: Use the standard margin CSS property;
* the value of this style property is ignored.
* Deprecated: 3.4: Use the standard margin CSS property (through objects
* like #GtkStyleContext and #GtkCssProvider); the value of this style
* property is ignored.
*/
gtk_widget_class_install_style_property (widget_class,
g_param_spec_boxed ("progress-border",
@@ -1438,12 +1440,13 @@ gtk_entry_class_init (GtkEntryClass *class)
* GtkEntry::activate:
* @entry: The entry on which the signal is emitted
*
* A <link linkend="keybinding-signals">keybinding signal</link>
* which gets emitted when the user activates the entry.
*
* Applications should not connect to it, but may emit it with
* g_signal_emit_by_name() if they need to control activation
* programmatically.
* The ::activate signal is emitted when the user hits
* the Enter key.
*
* While this signal is used as a
* <link linkend="keybinding-signals">keybinding signal</link>,
* it is also commonly used by applications to intercept
* activation of entries.
*
* The default bindings for this signal are all forms of the Enter key.
*/
@@ -1875,8 +1878,9 @@ gtk_entry_class_init (GtkEntryClass *class)
*
* Since: 2.10
*
* Deprecated: 3.4: Use the standard border and padding CSS properties;
* the value of this style property is ignored.
* Deprecated: 3.4: Use the standard border and padding CSS properties
* (through objects like #GtkStyleContext and #GtkCssProvider); the value
* of this style property is ignored.
*/
gtk_widget_class_install_style_property (widget_class,
g_param_spec_boxed ("inner-border",
@@ -7331,8 +7335,9 @@ gtk_entry_get_has_frame (GtkEntry *entry)
*
* Since: 2.10
*
* Deprecated: 3.4: Use the standard border and padding CSS properties;
* the value set with this function is ignored by #GtkEntry.
* Deprecated: 3.4: Use the standard border and padding CSS properties (through
* objects like #GtkStyleContext and #GtkCssProvider); the value set with
* this function is ignored by #GtkEntry.
**/
void
gtk_entry_set_inner_border (GtkEntry *entry,
@@ -7354,8 +7359,9 @@ gtk_entry_set_inner_border (GtkEntry *entry,
*
* Since: 2.10
*
* Deprecated: 3.4: Use the standard border and padding CSS properties;
* the value returned by this function is ignored by #GtkEntry.
* Deprecated: 3.4: Use the standard border and padding CSS properties (through
* objects like #GtkStyleContext and #GtkCssProvider); the value returned by
* this function is ignored by #GtkEntry.
**/
const GtkBorder *
gtk_entry_get_inner_border (GtkEntry *entry)
@@ -7937,7 +7943,8 @@ gtk_entry_get_icon_pixbuf (GtkEntry *entry,
* the icon helper's cache ref directly.
*/
pixbuf = gtk_entry_ensure_pixbuf (entry, icon_pos);
g_object_unref (pixbuf);
if (pixbuf)
g_object_unref (pixbuf);
return pixbuf;
}
@@ -9550,14 +9557,15 @@ gtk_entry_completion_key_press (GtkWidget *widget,
gtk_entry_set_text (GTK_ENTRY (completion->priv->entry), "");
}
/* Move the cursor to the end for Right/Esc, to the
beginning for Left */
/* Move the cursor to the end for Right/Esc */
if (event->keyval == GDK_KEY_Right ||
event->keyval == GDK_KEY_KP_Right ||
event->keyval == GDK_KEY_Escape)
gtk_editable_set_position (GTK_EDITABLE (widget), -1);
/* Let the default keybindings run for Left, i.e. either move to the
* previous character or select word if a modifier is used */
else
gtk_editable_set_position (GTK_EDITABLE (widget), 0);
retval = FALSE;
}
keypress_completion_out:
+3 -9
View File
@@ -1469,7 +1469,6 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
GtkAllocation allocation;
gint x, y;
gint matches, actions, items, height;
GtkBorder borders;
GdkScreen *screen;
gint monitor_num;
gint vertical_separator;
@@ -1496,8 +1495,6 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
x += allocation.x;
y += allocation.y + (allocation.height - entry_req.height) / 2;
_gtk_entry_get_borders (GTK_ENTRY (completion->priv->entry), &borders);
matches = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (completion->priv->filter_model), NULL);
actions = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (completion->priv->actions), NULL);
action_column = gtk_tree_view_get_column (GTK_TREE_VIEW (completion->priv->action_view), 0);
@@ -1532,20 +1529,17 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
gtk_widget_show (completion->priv->scrolled_window);
if (completion->priv->popup_set_width)
width = MIN (allocation.width, monitor.width) - borders.left - borders.right;
width = MIN (allocation.width, monitor.width);
else
width = -1;
gtk_tree_view_columns_autosize (GTK_TREE_VIEW (completion->priv->tree_view));
gtk_scrolled_window_set_min_content_width (GTK_SCROLLED_WINDOW (completion->priv->scrolled_window), width);
gtk_widget_set_size_request (completion->priv->scrolled_window, width, -1);
gtk_widget_set_size_request (completion->priv->popup_window, width, -1);
gtk_scrolled_window_set_min_content_height (GTK_SCROLLED_WINDOW (completion->priv->scrolled_window), items * height);
if (actions)
{
gtk_widget_show (completion->priv->action_view);
gtk_widget_set_size_request (completion->priv->action_view, width, -1);
}
gtk_widget_show (completion->priv->action_view);
else
gtk_widget_hide (completion->priv->action_view);
+6 -6
View File
@@ -2683,8 +2683,11 @@ dialog_response_cb (GtkDialog *dialog,
if (response == GTK_RESPONSE_ACCEPT ||
response == GTK_RESPONSE_OK)
{
g_signal_emit_by_name (user_data, "current-folder-changed");
g_signal_emit_by_name (user_data, "selection-changed");
g_signal_emit_by_name (button, "current-folder-changed");
g_signal_emit_by_name (button, "selection-changed");
update_label_and_image (button);
update_combo_box (button);
}
else if (priv->old_file)
{
@@ -2712,9 +2715,6 @@ dialog_response_cb (GtkDialog *dialog,
priv->old_file = NULL;
}
update_label_and_image (user_data);
update_combo_box (user_data);
if (priv->active)
{
g_signal_handler_unblock (priv->dialog,
@@ -2731,7 +2731,7 @@ dialog_response_cb (GtkDialog *dialog,
if (response == GTK_RESPONSE_ACCEPT ||
response == GTK_RESPONSE_OK)
g_signal_emit (user_data, file_chooser_button_signals[FILE_SET], 0);
g_signal_emit (button, file_chooser_button_signals[FILE_SET], 0);
}
+2
View File
@@ -257,6 +257,8 @@ gtk_file_chooser_dialog_init (GtkFileChooserDialog *dialog)
gtk_box_set_spacing (GTK_BOX (content_area), 2); /* 2 * 5 + 2 = 12 */
gtk_container_set_border_width (GTK_CONTAINER (action_area), 5);
gtk_window_set_role (GTK_WINDOW (dialog), "GtkFileChooserDialog");
/* We do a signal connection here rather than overriding the method in
* class_init because GtkDialog::response is a RUN_LAST signal. We want *our*
* handler to be run *first*, regardless of whether the user installs response
+8 -3
View File
@@ -42,7 +42,8 @@
*
* Children are added using gtk_grid_attach(). They can span multiple
* rows or columns. It is also possible to add a child next to an
* existing child, using gtk_grid_attach_next_to().
* existing child, using gtk_grid_attach_next_to(). The behaviour of
* GtkGrid when several children occupy the same grid cell is undefined.
*
* GtkGrid can be used like a #GtkBox by just using gtk_container_add(),
* which will place children next to each other in the direction determined
@@ -1593,7 +1594,7 @@ gtk_grid_attach_next_to (GtkGrid *grid,
* Gets the child of @grid whose area covers the grid
* cell whose upper left corner is at @left, @top.
*
* Returns: the child at the given position, or %NULL
* Returns: (transfer none): the child at the given position, or %NULL
*
* Since: 3.2
*/
@@ -1602,10 +1603,14 @@ gtk_grid_get_child_at (GtkGrid *grid,
gint left,
gint top)
{
GtkGridPrivate *priv = grid->priv;
GtkGridPrivate *priv;
GtkGridChild *child;
GList *list;
g_return_val_if_fail (GTK_IS_GRID (grid), NULL);
priv = grid->priv;
for (list = priv->children; list; list = list->next)
{
child = list->data;
+17
View File
@@ -1331,6 +1331,23 @@ choose_icon (GtkIconTheme *icon_theme,
ensure_valid_themes (icon_theme);
/* for symbolic icons, do a search in all registered themes first;
* a theme that inherits them from a parent theme might provide
* an alternative highcolor version, but still expect the symbolic icon
* to show up instead.
*/
if (icon_names[0] &&
g_str_has_suffix (icon_names[0], "-symbolic"))
{
for (l = priv->themes; l; l = l->next)
{
IconTheme *theme = l->data;
icon_info = theme_lookup_icon (theme, icon_names[0], size, allow_svg, use_builtin);
if (icon_info)
goto out;
}
}
for (l = priv->themes; l; l = l->next)
{
IconTheme *theme = l->data;
+527 -349
View File
File diff suppressed because it is too large Load Diff
-5
View File
@@ -23,11 +23,8 @@
typedef struct _GtkIconViewItem GtkIconViewItem;
struct _GtkIconViewItem
{
/* First member is always the rectangle so it
* can be cast to a rectangle. */
GdkRectangle cell_area;
GtkTreeIter iter;
gint index;
gint row, col;
@@ -53,8 +50,6 @@ struct _GtkIconViewPrivate
GtkSelectionMode selection_mode;
guint layout_idle_id;
GdkWindow *bin_window;
GList *children;
+9 -7
View File
@@ -157,7 +157,7 @@ static void gtk_image_get_preferred_height (GtkWidget *widget,
static void gtk_image_style_updated (GtkWidget *widget);
static void gtk_image_screen_changed (GtkWidget *widget,
GdkScreen *prev_screen);
static void gtk_image_destroy (GtkWidget *widget);
static void gtk_image_finalize (GObject *object);
static void gtk_image_reset (GtkImage *image);
static void gtk_image_set_property (GObject *object,
@@ -199,10 +199,10 @@ gtk_image_class_init (GtkImageClass *class)
gobject_class->set_property = gtk_image_set_property;
gobject_class->get_property = gtk_image_get_property;
gobject_class->finalize = gtk_image_finalize;
widget_class = GTK_WIDGET_CLASS (class);
widget_class->draw = gtk_image_draw;
widget_class->destroy = gtk_image_destroy;
widget_class->get_preferred_width = gtk_image_get_preferred_width;
widget_class->get_preferred_height = gtk_image_get_preferred_height;
widget_class->unmap = gtk_image_unmap;
@@ -359,14 +359,16 @@ gtk_image_init (GtkImage *image)
}
static void
gtk_image_destroy (GtkWidget *widget)
gtk_image_finalize (GObject *object)
{
GtkImage *image = GTK_IMAGE (widget);
GtkImage *image = GTK_IMAGE (object);
g_clear_object (&image->priv->icon_helper);
g_free (image->priv->filename);
GTK_WIDGET_CLASS (gtk_image_parent_class)->destroy (widget);
}
G_OBJECT_CLASS (gtk_image_parent_class)->finalize (object);
};
static void
gtk_image_set_property (GObject *object,
@@ -445,7 +447,7 @@ gtk_image_get_property (GObject *object,
g_value_set_string (value, priv->filename);
break;
case PROP_STOCK:
g_value_set_string (value, _gtk_icon_helper_get_icon_name (priv->icon_helper));
g_value_set_string (value, _gtk_icon_helper_get_stock_id (priv->icon_helper));
break;
case PROP_ICON_SET:
g_value_set_boxed (value, _gtk_icon_helper_peek_icon_set (priv->icon_helper));
+39
View File
@@ -364,6 +364,40 @@ check_win32_special_case_after_compact_match (GtkIMContextSimple *context_sim
#endif
#ifdef GDK_WINDOWING_QUARTZ
static gboolean
check_quartz_special_cases (GtkIMContextSimple *context_simple,
gint n_compose)
{
GtkIMContextSimplePrivate *priv = context_simple->priv;
if (n_compose == 2 &&
priv->compose_buffer[1] == GDK_KEY_space)
{
gunichar value = 0;
switch (priv->compose_buffer[0])
{
case GDK_KEY_dead_doubleacute:
value = '"'; break;
}
if (value > 0)
{
gtk_im_context_simple_commit_char (GTK_IM_CONTEXT (context_simple), value);
priv->compose_buffer[0] = 0;
GTK_NOTE (MISC, g_print ("quartz: U+%04X\n", value));
return TRUE;
}
}
return FALSE;
}
#endif
static gboolean
check_compact_table (GtkIMContextSimple *context_simple,
const GtkComposeTableCompact *table,
@@ -1068,6 +1102,11 @@ gtk_im_context_simple_filter_keypress (GtkIMContext *context,
return TRUE;
#endif
#ifdef GDK_WINDOWING_QUARTZ
if (check_quartz_special_cases (context_simple, n_compose))
return TRUE;
#endif
if (check_compact_table (context_simple, &gtk_compose_table_compact, n_compose))
return TRUE;
+5 -5
View File
@@ -969,10 +969,11 @@ gtk_info_bar_buildable_custom_tag_start (GtkBuildable *buildable,
{
ActionWidgetsSubParserData *parser_data;
if (child)
return FALSE;
if (parent_buildable_iface->custom_tag_start (buildable, builder, child,
tagname, parser, data))
return TRUE;
if (strcmp (tagname, "action-widgets") == 0)
if (!child && strcmp (tagname, "action-widgets") == 0)
{
parser_data = g_slice_new0 (ActionWidgetsSubParserData);
parser_data->info_bar = GTK_INFO_BAR (buildable);
@@ -983,8 +984,7 @@ gtk_info_bar_buildable_custom_tag_start (GtkBuildable *buildable,
return TRUE;
}
return parent_buildable_iface->custom_tag_start (buildable, builder, child,
tagname, parser, data);
return FALSE;
}
static void
+4 -1
View File
@@ -526,7 +526,10 @@ gtk_link_button_button_press (GtkWidget *widget,
if (!gtk_widget_has_focus (widget))
gtk_widget_grab_focus (widget);
if (gdk_event_triggers_context_menu ((GdkEvent *) event))
/* Don't popup the menu if there's no URI set,
* otherwise the menu item will trigger a warning */
if (gdk_event_triggers_context_menu ((GdkEvent *) event) &&
GTK_LINK_BUTTON (widget)->priv->uri != NULL)
{
gtk_link_button_do_popup (GTK_LINK_BUTTON (widget), event);
+8 -6
View File
@@ -842,8 +842,7 @@ gtk_list_store_real_set_value (GtkListStore *list_store,
if (! g_type_is_a (G_VALUE_TYPE (value), priv->column_headers[column]))
{
if (! (g_value_type_compatible (G_VALUE_TYPE (value), priv->column_headers[column]) &&
g_value_type_compatible (priv->column_headers[column], G_VALUE_TYPE (value))))
if (! (g_value_type_transformable (G_VALUE_TYPE (value), priv->column_headers[column])))
{
g_warning ("%s: Unable to convert from %s to %s\n",
G_STRLOC,
@@ -851,6 +850,8 @@ gtk_list_store_real_set_value (GtkListStore *list_store,
g_type_name (priv->column_headers[column]));
return retval;
}
g_value_init (&real_value, priv->column_headers[column]);
if (!g_value_transform (value, &real_value))
{
g_warning ("%s: Unable to make conversion from %s to %s\n",
@@ -1690,11 +1691,12 @@ gtk_list_store_reorder_func (GSequenceIter *a,
}
/**
* gtk_list_store_reorder: (skip)
* gtk_list_store_reorder:
* @store: A #GtkListStore.
* @new_order: (array): an array of integers mapping the new position of each child
* to its old position before the re-ordering,
* i.e. @new_order<literal>[newpos] = oldpos</literal>.
* @new_order: (array zero-terminated=1): an array of integers mapping the new
* position of each child to its old position before the re-ordering,
* i.e. @new_order<literal>[newpos] = oldpos</literal>. It must have
* exactly as many items as the list store's length.
*
* Reorders @store to follow the order indicated by @new_order. Note that
* this function only works with unsorted stores.
+10 -10
View File
@@ -34,21 +34,21 @@
* preference dialogs to allow users to obtain and revoke authorizations
* needed to operate the controls. The required authorization is represented
* by a #GPermission object. Concrete implementations of #GPermission may use
* PolicyKit or some other authorization framework.
* PolicyKit or some other authorization framework. To obtain a PolicyKit-based
* #GPermission, use polkit_permission_new().
*
* If the user lacks the authorization but authorization can be obtained
* through authentication, the widget looks like this
* If the user is not currently allowed to perform the action, but can obtain
* the permission, the widget looks like this
* <informalexample><inlinegraphic fileref="lockbutton-locked.png"></inlinegraphic></informalexample>
* and the user can click the button to obtain the authorization. Depending
* and the user can click the button to request the permission. Depending
* on the platform, this may pop up an authentication dialog or ask the user
* to authenticate in some other way. Once authorization is obtained, the
* widget changes to this
* to authenticate in some other way. Once the user has obtained the permission,
* the widget changes to this
* <informalexample><inlinegraphic fileref="lockbutton-unlocked.png"></inlinegraphic></informalexample>
* and the authorization can be dropped by clicking the button. If the user
* is not able to obtain authorization at all, the widget looks like this
* and the permission can be dropped again by clicking the button. If the user
* is not able to obtain the permission at all, the widget looks like this
* <informalexample><inlinegraphic fileref="lockbutton-sorry.png"></inlinegraphic></informalexample>
* If the user is authorized and cannot drop the authorization, the button
* is hidden.
* If the user has the permission and cannot drop it, the button is hidden.
*
* The text (and tooltips) that are shown in the various cases can be adjusted
* with the #GtkLockButton:text-lock, #GtkLockButton:text-unlock,
+4 -6
View File
@@ -1297,6 +1297,7 @@ gtk_menu_detach (GtkMenu *menu)
/* Fallback title for menu comes from attach widget */
gtk_menu_update_title (menu);
g_object_notify (G_OBJECT (menu), "attach-widget");
g_object_unref (menu);
}
@@ -1719,7 +1720,7 @@ gtk_menu_popup_for_device (GtkMenu *menu,
* triggering menu item, or %NULL
* @parent_menu_item: (allow-none): the menu item whose activation
* triggered the popup, or %NULL
* @func: (allow-none): a user supplied function used to position
* @func: (scope async) (allow-none): a user supplied function used to position
* the menu, or %NULL
* @data: user supplied data to be passed to @func.
* @button: the mouse button which was pressed to initiate the event.
@@ -5528,15 +5529,13 @@ static gint
get_menu_height (GtkMenu *menu)
{
GtkMenuPrivate *priv = menu->priv;
GtkAllocation allocation;
GtkWidget *widget = GTK_WIDGET (menu);
GtkBorder padding;
gint height;
gtk_widget_get_allocation (widget, &allocation);
get_menu_padding (widget, &padding);
height = allocation.height;
height = priv->requested_height;
height -= (gtk_container_get_border_width (GTK_CONTAINER (widget)) * 2) +
padding.top + padding.bottom;
@@ -5600,6 +5599,7 @@ gtk_menu_real_move_scroll (GtkMenu *menu,
GtkWidget *new_child;
gboolean new_upper_arrow_visible = priv->upper_arrow_visible && !priv->tearoff_active;
GtkBorder arrow_border;
get_arrows_border (menu, &arrow_border);
if (priv->scroll_offset != old_offset)
@@ -5616,13 +5616,11 @@ gtk_menu_real_move_scroll (GtkMenu *menu,
case GTK_SCROLL_START:
/* Ignore the enter event we might get if the pointer is on the menu */
menu_shell->priv->ignore_enter = TRUE;
gtk_menu_scroll_to (menu, 0);
gtk_menu_shell_select_first (menu_shell, TRUE);
break;
case GTK_SCROLL_END:
/* Ignore the enter event we might get if the pointer is on the menu */
menu_shell->priv->ignore_enter = TRUE;
gtk_menu_scroll_to (menu, end_position - page_size);
_gtk_menu_shell_select_last (menu_shell, TRUE);
break;
default:
+2 -2
View File
@@ -1727,8 +1727,8 @@ gtk_real_menu_shell_cycle_focus (GtkMenuShell *menu_shell,
while (menu_shell && !GTK_IS_MENU_BAR (menu_shell))
{
if (priv->parent_menu_shell)
menu_shell = GTK_MENU_SHELL (priv->parent_menu_shell);
if (menu_shell->priv->parent_menu_shell)
menu_shell = GTK_MENU_SHELL (menu_shell->priv->parent_menu_shell);
else
menu_shell = NULL;
}
+7
View File
@@ -50,6 +50,10 @@
* convenience widget; you could construct the equivalent of #GtkMessageDialog
* from #GtkDialog without too much effort, but #GtkMessageDialog saves typing.
*
* One difference from #GtkDialog is that #GtkMessageDialog sets the
* #GtkWindow:skip-taskbar-hint property to %TRUE, so that the dialog is hidden
* from the taskbar by default.
*
* The easiest way to do a modal message dialog is to use gtk_dialog_run(), though
* you can also pass in the %GTK_DIALOG_MODAL flag, gtk_dialog_run() automatically
* makes the dialog modal and waits for the user to respond to it. gtk_dialog_run()
@@ -350,6 +354,9 @@ gtk_message_dialog_init (GtkMessageDialog *dialog)
gtk_widget_set_halign (priv->secondary_label, GTK_ALIGN_START);
gtk_widget_set_valign (priv->secondary_label, GTK_ALIGN_START);
gtk_misc_set_alignment (GTK_MISC (priv->label), 0.0, 0.0);
gtk_misc_set_alignment (GTK_MISC (priv->secondary_label), 0.0, 0.0);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
priv->message_area = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
+50 -10
View File
@@ -29,6 +29,8 @@
#include "gtkmodelmenuitem.h"
#include "gtkapplicationprivate.h"
#define MODEL_MENU_WIDGET_DATA "gtk-model-menu-widget-data"
typedef struct {
GActionObservable *actions;
GMenuModel *model;
@@ -267,6 +269,7 @@ gtk_model_menu_create_menu (GMenuModel *model,
GtkWidget *menu;
menu = gtk_menu_new ();
gtk_menu_set_accel_group (GTK_MENU (menu), accels);
gtk_model_menu_bind (GTK_MENU_SHELL (menu), model, TRUE);
gtk_model_menu_populate (GTK_MENU_SHELL (menu), actions, accels);
@@ -274,24 +277,61 @@ gtk_model_menu_create_menu (GMenuModel *model,
return menu;
}
static void
gtk_model_menu_connect_app_window (GtkMenu *menu,
GtkApplicationWindow *window)
{
GActionObservable *actions;
GtkAccelGroup *accels;
actions = gtk_application_window_get_observable (window);
accels = gtk_application_window_get_accel_group (window);
gtk_menu_set_accel_group (menu, accels);
gtk_model_menu_populate (GTK_MENU_SHELL (menu), actions, accels);
}
static void
attach_widget_hierarchy_changed (GtkWidget *attach_widget,
GtkWidget *previous_toplevel,
gpointer user_data)
{
GtkWidget *toplevel;
GtkMenu *menu = user_data;
toplevel = gtk_widget_get_toplevel (attach_widget);
if (GTK_IS_APPLICATION_WINDOW (toplevel))
gtk_model_menu_connect_app_window (menu, GTK_APPLICATION_WINDOW (toplevel));
}
static void
notify_attach (GtkMenu *menu,
GParamSpec *pspec,
gpointer data)
{
GtkWidget *widget;
GtkWidget *toplevel;
GActionObservable *actions;
GtkAccelGroup *accels;
GtkWidget *attach_widget, *toplevel;
widget = gtk_menu_get_attach_widget (menu);
toplevel = gtk_widget_get_toplevel (widget);
attach_widget = g_object_get_data (G_OBJECT (menu), MODEL_MENU_WIDGET_DATA);
if (attach_widget != NULL)
{
g_signal_handlers_disconnect_by_func (attach_widget, attach_widget_hierarchy_changed, menu);
g_object_set_data (G_OBJECT (menu), MODEL_MENU_WIDGET_DATA, NULL);
}
attach_widget = gtk_menu_get_attach_widget (menu);
if (!attach_widget)
return;
toplevel = gtk_widget_get_toplevel (attach_widget);
if (GTK_IS_APPLICATION_WINDOW (toplevel))
{
actions = gtk_application_window_get_observable (GTK_APPLICATION_WINDOW (toplevel));
accels = gtk_application_window_get_accel_group (GTK_APPLICATION_WINDOW (toplevel));
gtk_model_menu_populate (GTK_MENU_SHELL (menu), actions, accels);
gtk_model_menu_connect_app_window (menu, GTK_APPLICATION_WINDOW (toplevel));
}
else
{
g_object_set_data (G_OBJECT (menu), MODEL_MENU_WIDGET_DATA, attach_widget);
g_signal_connect_object (attach_widget, "hierarchy-changed",
G_CALLBACK (attach_widget_hierarchy_changed), menu, 0);
}
}
+4 -4
View File
@@ -731,11 +731,11 @@ pid_get_parent (GPid pid)
int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, pid,
sizeof(struct kinfo_proc), 0 };
if (sysctl(mib, nitems(mib), NULL, &len, NULL, 0) == -1)
if (sysctl(mib, G_N_ELEMENTS (mib), NULL, &len, NULL, 0) == -1)
return (-1);
mib[5] = (len / sizeof(struct kinfo_proc));
if (sysctl(mib, nitems(mib), &kp, &len, NULL, 0) < 0)
if (sysctl(mib, G_N_ELEMENTS (mib), &kp, &len, NULL, 0) < 0)
return -1;
ppid = kp.p_ppid;
@@ -760,7 +760,7 @@ pid_get_env (GPid pid, const gchar *key)
key_len = strlen (key);
ret = NULL;
if (sysctl(mib, nitems(mib), strs, &len, NULL, 0) != -1)
if (sysctl(mib, G_N_ELEMENTS (mib), strs, &len, NULL, 0) != -1)
{
for (i = 0; strs[i] != NULL; i++)
{
@@ -792,7 +792,7 @@ pid_get_command_line (GPid pid)
strs = (char **)realloc(strs, len);
if (sysctl(mib, nitems(mib), strs, &len, NULL, 0) == -1) {
if (sysctl(mib, G_N_ELEMENTS (mib), strs, &len, NULL, 0) == -1) {
g_free (strs);
return ret;
}
+4 -4
View File
@@ -982,6 +982,10 @@ gtk_plug_filter_func (GdkXEvent *gdk_xevent,
gdk_event_set_device (event, keyboard);
keymap = gdk_keymap_get_for_display (display);
event->key.group = gdk_x11_keymap_get_group_for_state_libgtk_only (keymap, xevent->xkey.state);
event->key.is_modifier = gdk_x11_keymap_key_is_modifier_libgtk_only (keymap, event->key.hardware_keycode);
gdk_keymap_translate_keyboard_state (keymap,
event->key.hardware_keycode,
event->key.state,
@@ -996,10 +1000,6 @@ gtk_plug_filter_func (GdkXEvent *gdk_xevent,
event->key.length = 0;
event->key.string = g_strdup ("");
/* FIXME: These should be filled in properly */
event->key.group = 0;
event->key.is_modifier = FALSE;
return_val = GDK_FILTER_TRANSLATE;
}
}
+4 -3
View File
@@ -93,7 +93,8 @@ G_DEFINE_TYPE (GtkRadioMenuItem, gtk_radio_menu_item, GTK_TYPE_CHECK_MENU_ITEM)
/**
* gtk_radio_menu_item_new:
* @group: the group to which the radio menu item is to be attached
* @group: (element-type GtkRadioMenuItem): the group to which the
* radio menu item is to be attached
*
* Creates a new #GtkRadioMenuItem.
*
@@ -155,7 +156,7 @@ gtk_radio_menu_item_get_property (GObject *object,
/**
* gtk_radio_menu_item_set_group:
* @radio_menu_item: a #GtkRadioMenuItem.
* @group: the new group.
* @group: (element-type GtkRadioMenuItem): the new group.
*
* Sets the group of a radio menu item, or changes it.
*/
@@ -265,7 +266,7 @@ gtk_radio_menu_item_new_with_label (GSList *group,
/**
* gtk_radio_menu_item_new_with_mnemonic:
* @group: group the radio menu item is inside
* @group: (element-type GtkRadioMenuItem): group the radio menu item is inside
* @label: the text of the button, with an underscore in front of the
* mnemonic character
*
+2 -2
View File
@@ -151,8 +151,8 @@ gtk_radio_tool_button_new (GSList *group)
/**
* gtk_radio_tool_button_new_from_stock:
* @group: (allow-none): an existing radio button group, or %NULL if you are
* creating a new group
* @group: (allow-none) (element-type GtkRadioButton): an existing radio button
* group, or %NULL if you are creating a new group
* @stock_id: the name of a stock item
*
* Creates a new #GtkRadioToolButton, adding it to @group.
+12
View File
@@ -539,6 +539,18 @@ gtk_recent_manager_monitor_changed (GFileMonitor *monitor,
static gchar *
get_default_filename (void)
{
if (g_mkdir_with_parents (g_get_user_data_dir (), 0755) == -1)
{
int saved_errno = errno;
g_critical ("Unable to create user data directory '%s' for storing "
"the recently used files list: %s",
g_get_user_data_dir (),
g_strerror (saved_errno));
return NULL;
}
return g_build_filename (g_get_user_data_dir (),
GTK_RECENTLY_USED_FILE,
NULL);
+2 -2
View File
@@ -26,8 +26,8 @@
* export ftw() and friends only if _XOPEN_SOURCE and _GNU_SOURCE
* are defined. see bug #444097.
*/
#define _XOPEN_SOURCE 500
#define _GNU_SOURCE
#define _XOPEN_SOURCE 600
#define _GNU_SOURCE
#ifdef HAVE_FTW_H
#include <ftw.h>
+4
View File
@@ -45,6 +45,10 @@
#include "quartz/gdkquartz.h"
#endif
#ifdef G_OS_WIN32
#include "gtkwin32themeprivate.h"
#endif
#undef GDK_DEPRECATED
#undef GDK_DEPRECATED_FOR
#define GDK_DEPRECATED
-2
View File
@@ -768,7 +768,6 @@ gtk_socket_add_grabbed_key (GtkSocket *socket,
/**
* gtk_socket_remove_grabbed_key:
*
* @socket: a #GtkSocket
* @keyval: a key
* @modifiers: modifiers for the key
@@ -1160,7 +1159,6 @@ gtk_socket_handle_map_request (GtkSocket *socket)
/**
* gtk_socket_unmap_notify:
*
* @socket: a #GtkSocket
*
* Called from the GtkSocket backend when the plug has been unmapped ???
+23 -54
View File
@@ -38,6 +38,7 @@
#include "gtkadjustment.h"
#include "gtkbindings.h"
#include "gtkentryprivate.h"
#include "gtkiconhelperprivate.h"
#include "gtkicontheme.h"
#include "gtkintl.h"
#include "gtkmarshalers.h"
@@ -606,49 +607,6 @@ gtk_spin_button_get_property (GObject *object,
}
}
static gint
get_icon_size (void)
{
gint width, height, icon_size;
gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &width, &height);
icon_size = MAX (width, height);
return icon_size;
}
static GdkPixbuf *
create_one_pixbuf (GtkStyleContext *context,
const gchar *icon_name)
{
GtkIconInfo *icon_info;
GdkPixbuf *pix;
gint size = get_icon_size ();
icon_info = gtk_icon_theme_lookup_icon (gtk_icon_theme_get_default (),
icon_name, size,
GTK_ICON_LOOKUP_GENERIC_FALLBACK |
GTK_ICON_LOOKUP_USE_BUILTIN);
if (icon_info != NULL)
{
pix = gtk_icon_info_load_symbolic_for_context (icon_info, context,
NULL, NULL);
gtk_icon_info_free (icon_info);
}
else
{
GtkIconSet *icon_set;
icon_set = gtk_style_context_lookup_icon_set (context, GTK_STOCK_MISSING_IMAGE);
pix = gtk_icon_set_render_icon_pixbuf (icon_set, context, GTK_ICON_SIZE_MENU);
g_warning ("Unable to fetch icon %s from the icon theme", icon_name);
}
return pix;
}
static void
gtk_spin_button_init (GtkSpinButton *spin_button)
{
@@ -833,7 +791,7 @@ gtk_spin_button_panel_get_state (GtkSpinButton *spin_button,
else
{
if (priv->click_child == panel)
state |= GTK_STATE_ACTIVE;
state |= GTK_STATE_FLAG_ACTIVE;
else if (priv->in_child == panel &&
priv->click_child == NULL)
state |= GTK_STATE_FLAG_PRELIGHT;
@@ -861,6 +819,10 @@ gtk_spin_button_panel_get_width (GtkSpinButton *spin_button,
GtkBorder button_padding, button_border;
GtkStyleContext *context;
GtkStateFlags state;
gint icon_size, width, height;
gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &width, &height);
icon_size = MAX (width, height);
context = gtk_spin_button_panel_get_context (spin_button, panel);
state = gtk_spin_button_panel_get_state (spin_button, panel);
@@ -870,7 +832,7 @@ gtk_spin_button_panel_get_width (GtkSpinButton *spin_button,
g_object_unref (context);
return get_icon_size () + button_padding.left + button_padding.right +
return icon_size + button_padding.left + button_padding.right +
button_border.left + button_border.right;
}
@@ -892,7 +854,7 @@ gtk_spin_button_panel_get_allocations (GtkSpinButton *spin_button,
gtk_widget_get_preferred_size (widget, &requisition, NULL);
context = gtk_widget_get_style_context (GTK_WIDGET (spin_button));
gtk_style_context_get_border (context, GTK_STATE_NORMAL, &space);
gtk_style_context_get_border (context, GTK_STATE_FLAG_NORMAL, &space);
req_height = requisition.height - gtk_widget_get_margin_top (widget) - gtk_widget_get_margin_bottom (widget);
down_panel_width = gtk_spin_button_panel_get_width (spin_button, priv->down_panel);
@@ -936,7 +898,8 @@ gtk_spin_button_panel_draw (GtkSpinButton *spin_button,
GtkStateFlags state;
GtkWidget *widget;
gdouble width, height, x, y;
GdkPixbuf *pix;
gint icon_width, icon_height;
GtkIconHelper *icon_helper;
widget = GTK_WIDGET (spin_button);
@@ -950,24 +913,30 @@ gtk_spin_button_panel_draw (GtkSpinButton *spin_button,
height = gdk_window_get_height (panel);
width = gdk_window_get_width (panel);
icon_helper = _gtk_icon_helper_new ();
_gtk_icon_helper_set_use_fallback (icon_helper, TRUE);
if (panel == priv->down_panel)
pix = create_one_pixbuf (context, "list-remove-symbolic");
_gtk_icon_helper_set_icon_name (icon_helper, "list-remove-symbolic", GTK_ICON_SIZE_MENU);
else
pix = create_one_pixbuf (context, "list-add-symbolic");
_gtk_icon_helper_set_icon_name (icon_helper, "list-add-symbolic", GTK_ICON_SIZE_MENU);
_gtk_icon_helper_get_size (icon_helper, context,
&icon_width, &icon_height);
gtk_render_background (context, cr,
0, 0, width, height);
gtk_render_frame (context, cr,
0, 0, width, height);
x = floor ((width - gdk_pixbuf_get_width (pix)) / 2.0);
y = floor ((height - gdk_pixbuf_get_height (pix)) / 2.0);
x = floor ((width - icon_width) / 2.0);
y = floor ((height - icon_height) / 2.0);
gtk_render_icon (context, cr, pix,
x, y);
_gtk_icon_helper_draw (icon_helper, context, cr,
x, y);
cairo_restore (cr);
g_object_unref (pix);
g_object_unref (icon_helper);
g_object_unref (context);
}
+3 -3
View File
@@ -28,6 +28,7 @@
#include "config.h"
#include <string.h>
#include <stdlib.h>
#include "gtkstatusicon.h"
@@ -1328,10 +1329,9 @@ round_pixel_size (GtkWidget *widget,
for (s = GTK_ICON_SIZE_MENU; s <= GTK_ICON_SIZE_DIALOG; s++)
{
if (gtk_icon_size_lookup_for_settings (settings, s, &w, &h) &&
w <= pixel_size && h <= pixel_size)
if (gtk_icon_size_lookup_for_settings (settings, s, &w, &h))
{
d = MAX (pixel_size - w, pixel_size - h);
d = MAX (abs (pixel_size - w), abs (pixel_size - h));
if (d < dist)
{
dist = d;
+5 -2
View File
@@ -1235,6 +1235,10 @@ gtk_style_context_new (void)
* %GTK_STYLE_PROVIDER_PRIORITY_USER
*
* Adds a style provider to @context, to be used in style construction.
* Note that a style provider added by this function only affects
* the style of the widget to which @context belongs. If you want
* to affect the style of all widgets, use
* gtk_style_context_add_provider_for_screen().
*
* <note><para>If both priorities are the same, A #GtkStyleProvider
* added through this function takes precedence over another added
@@ -1332,8 +1336,7 @@ gtk_style_context_reset_widgets (GdkScreen *screen)
* %GTK_STYLE_PROVIDER_PRIORITY_USER
*
* Adds a global style provider to @screen, which will be used
* in style construction for all #GtkStyleContext<!-- -->s under
* @screen.
* in style construction for all #GtkStyleContexts under @screen.
*
* GTK+ uses this to make styling information from #GtkSettings
* available.
+5
View File
@@ -61,6 +61,11 @@
*
* gtk_text_buffer_create_tag() is the best way to create tags.
* See <application>gtk3-demo</application> for numerous examples.
*
* For each property of #GtkTextTag, there is a "set" property, e.g.
* "font-set" corresponds to "font". These "set" properties reflect
* whether a property has been set or not.
* You should not set them independently.
*/
#include "config.h"
+3
View File
@@ -2749,6 +2749,9 @@ gtk_toolbar_button_press (GtkWidget *toolbar,
return return_value;
}
if (event->type != GDK_BUTTON_PRESS)
return FALSE;
window = gtk_widget_get_toplevel (toolbar);
if (window)
+10 -13
View File
@@ -473,7 +473,7 @@ gtk_tool_palette_size_allocate (GtkWidget *widget,
gint remaining_space = 0;
gint expand_space = 0;
gint page_start, page_size = 0;
gint total_size, page_size;
gint offset = 0;
guint i;
guint border_width;
@@ -652,43 +652,40 @@ gtk_tool_palette_size_allocate (GtkWidget *widget,
child_allocation.y += border_width;
child_allocation.y += offset;
page_start = child_allocation.y;
total_size = child_allocation.y;
}
else
{
x += border_width;
x += offset;
page_start = x;
total_size = x;
}
/* update the scrollbar to match the displayed adjustment */
if (adjustment)
{
gdouble value, lower, upper;
gdouble lower, upper;
total_size = MAX (0, total_size);
page_size = MIN (total_size, page_size);
if (GTK_ORIENTATION_VERTICAL == palette->priv->orientation ||
GTK_TEXT_DIR_LTR == direction)
{
lower = 0;
upper = MAX (0, page_start);
value = MIN (offset, upper - page_size);
gtk_adjustment_clamp_page (adjustment, value, offset + page_size);
upper = total_size;
}
else
{
lower = page_size - MAX (0, page_start);
lower = page_size - total_size;
upper = page_size;
offset = -offset;
value = MAX (offset, lower);
gtk_adjustment_clamp_page (adjustment, offset, value + page_size);
}
gtk_adjustment_configure (adjustment,
value,
offset,
lower,
upper,
page_size * 0.1,
+2 -2
View File
@@ -2208,8 +2208,8 @@ gtk_tree_row_reference_unref_path (GtkTreePath *path,
* Creates a row reference based on @path.
*
* This reference will keep pointing to the node pointed to
* by @path, so long as it exists. It listens to all signals
* emitted by @model, and updates its path appropriately. If
* by @path, so long as it exists. Any changes that occur on @model are
* propagated, and the path is updated appropriately. If
* @path isn't a valid path in @model, then %NULL is returned.
*
* Return value: a newly allocated #GtkTreeRowReference, or %NULL
+2 -2
View File
@@ -3227,12 +3227,12 @@ gtk_tree_model_filter_iter_previous (GtkTreeModel *model,
elt = iter->user_data2;
siter = g_sequence_iter_prev (elt->visible_siter);
if (g_sequence_iter_is_begin (siter))
if (g_sequence_iter_is_begin (elt->visible_siter))
{
iter->stamp = 0;
return FALSE;
}
siter = g_sequence_iter_prev (elt->visible_siter);
iter->user_data2 = GET_ELT (siter);
+3 -2
View File
@@ -1406,12 +1406,13 @@ gtk_tree_model_sort_iter_previous (GtkTreeModel *tree_model,
elt = iter->user_data2;
siter = g_sequence_iter_prev (elt->siter);
if (g_sequence_iter_is_begin (siter))
if (g_sequence_iter_is_begin (elt->siter))
{
iter->stamp = 0;
return FALSE;
}
siter = g_sequence_iter_prev (elt->siter);
iter->user_data2 = GET_ELT (siter);
return TRUE;
+3 -2
View File
@@ -853,8 +853,7 @@ gtk_tree_store_real_set_value (GtkTreeStore *tree_store,
if (! g_type_is_a (G_VALUE_TYPE (value), priv->column_headers[column]))
{
if (! (g_value_type_compatible (G_VALUE_TYPE (value), priv->column_headers[column]) &&
g_value_type_compatible (priv->column_headers[column], G_VALUE_TYPE (value))))
if (! (g_value_type_transformable (G_VALUE_TYPE (value), priv->column_headers[column])))
{
g_warning ("%s: Unable to convert from %s to %s\n",
G_STRLOC,
@@ -862,6 +861,8 @@ gtk_tree_store_real_set_value (GtkTreeStore *tree_store,
g_type_name (priv->column_headers[column]));
return retval;
}
g_value_init (&real_value, priv->column_headers[column]);
if (!g_value_transform (value, &real_value))
{
g_warning ("%s: Unable to make conversion from %s to %s\n",
+10 -10
View File
@@ -123,7 +123,7 @@
*
* <example>
* <title>A UI definition</title>
* <programlisting>
* <programlisting><![CDATA[
* <ui>
* <menubar>
* <menu name="FileMenu" action="FileMenuAction">
@@ -148,7 +148,7 @@
* </placeholder>
* </toolbar>
* </ui>
* </programlisting>
* ]]></programlisting>
* </example>
*
* The constructed widget hierarchy is very similar to the element tree
@@ -1391,17 +1391,17 @@ static gboolean
free_node (GNode *node)
{
Node *info = NODE_INFO (node);
g_list_free_full (info->uifiles, node_ui_reference_free);
if (info->action)
g_object_unref (info->action);
if (info->proxy)
g_object_unref (info->proxy);
if (info->extra)
g_object_unref (info->extra);
g_list_free_full (info->uifiles, node_ui_reference_free);
info->uifiles = NULL;
g_clear_object (&info->action);
g_clear_object (&info->proxy);
g_clear_object (&info->extra);
g_free (info->name);
info->name = NULL;
g_slice_free (Node, info);
node->data = NULL;
return FALSE;
}
+1 -1
View File
@@ -743,7 +743,7 @@ void gtk_widget_set_margin_bottom (GtkWidget *widget,
gint gtk_widget_get_events (GtkWidget *widget);
GdkEventMask gtk_widget_get_device_events (GtkWidget *widget,
GdkDevice *device);
GDK_DEPRECATED_IN_3_0_FOR(gdk_window_get_device_position)
GDK_DEPRECATED_IN_3_4_FOR(gdk_window_get_device_position)
void gtk_widget_get_pointer (GtkWidget *widget,
gint *x,
gint *y);

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