Compare commits

...

169 Commits

Author SHA1 Message Date
Cédric Valmary 046fda77bf Updated Occitan translation 2015-05-29 20:38:53 +00:00
Cédric Valmary efb6a5a52d Updated Occitan translation 2015-05-15 16:41:39 +00:00
Stéphane Démurget 7cdea6184e 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:32 +01:00
Rafael Ferreira 67127997ed Updated Brazilian Portuguese translation 2012-09-17 23:08:05 -03:00
Djavan Fagundes 762515de1c Updated Brazilian Portuguese translation by Rafael Ferreira <rafael.f.f1@gmail.com> and myself 2012-09-17 10:23:04 -03:00
YunQiang Su c1e51450dc fix an typo in zh_CN translation 2012-08-18 11:19:04 +08:00
Funda Wang 59ba06bae4 fix bug#680901: translations of "even sheet" and "odd sheet" are wrong 2012-07-31 22:07:58 +00:00
Matthias Clasen 1a86265532 Bump version 2012-03-11 22:57:37 -04:00
Matthias Clasen f72011c065 3.2.4 2012-03-11 22:27:12 -04:00
Matthias Clasen 4386ee6be7 Update expected output 2012-03-11 21:50:51 -04:00
Matthias Clasen 23390794cd grid: Work harder for tight homogeneous allocation
When doing homogeneous allocation in the presence of
overlapping spanning children, we need to avoid uneven
line allocations, otherwise, the final homogenization
will blow up the size request of the grid.

https://bugzilla.gnome.org/show_bug.cgi?id=671170
2012-03-11 21:25:37 -04:00
Bastien Nocera 7fc62a0e9c x11: Simplify XI2 mods state
https://bugzilla.gnome.org/show_bug.cgi?id=671070
2012-03-11 21:25:06 -04:00
Bastien Nocera d7c460288a x11: Correct GroupSwitch mask
base | latched | locked is incorrect for the group mask,
and the clamping has already been applied.

https://bugzilla.gnome.org/show_bug.cgi?id=671070
2012-03-11 21:24:52 -04:00
Matthias Clasen 95d90ae255 Correct Since: tag for gtk-application-prefer-dark-theme
This setting was available since 2.90.x, so give it a 3.0 tag.

https://bugzilla.gnome.org/show_bug.cgi?id=670832
2012-03-11 21:22:08 -04:00
Paolo Borelli 7d15f34204 Init the InfoBar message_type to GTK_MESSAGE_OTHER
In this way the the code executed when the message_type property is set
to its default value (which is 0) gets actually run.
2012-03-11 21:21:24 -04:00
Carlos Garnacho fc7eaaa17d xi2: Get the effective group state by ORing the XIGroupState values 2012-03-11 21:20:43 -04:00
Sebastian Keller fe1433a50d Bug 650693 - Drawing errors in column headers when adding new columns
Reset style on visible headers, not on invisible ones
2012-03-11 21:19:38 -04:00
Claudio Saavedra 5df0b775be GtkNotebook: and another fix
https://bugzilla.gnome.org/show_bug.cgi?id=669116
2012-03-11 21:15:24 -04:00
Claudio Saavedra 0694e8bcd3 GtkNotebook: fix one child-notify emission
Forgot to increase the counter in the for loop, doing it now.

https://bugzilla.gnome.org/show_bug.cgi?id=669116
2012-03-11 21:15:05 -04:00
Claudio Saavedra afa9f13088 GtkNotebook: emit child-notify::position on drag 'n drop reorder
https://bugzilla.gnome.org/show_bug.cgi?id=669116
2012-03-11 21:14:34 -04:00
Claudio Saavedra 4743dcd619 GtkNotebook: emit child-notify::position on page add/removal
For each page added/removed, notify all the other children changing
position.

https://bugzilla.gnome.org/show_bug.cgi?id=669116
2012-03-11 21:14:22 -04:00
Cosimo Cecchi cfec22fee3 about-dialog: set proper spacing between columnns in credits section
Spacing ended up being really tight; add another 6px.

https://bugzilla.gnome.org/show_bug.cgi?id=668114
2012-03-11 21:13:00 -04:00
Cosimo Cecchi 5784f764f8 about-dialog: don't set a margin around the license area
Make it consistent with the credits page.

https://bugzilla.gnome.org/show_bug.cgi?id=670077
2012-03-11 21:12:45 -04:00
Cosimo Cecchi d9b3086df6 about-dialog: add a stroke around the credits area
Makes it consistent with e.g. the license page.

https://bugzilla.gnome.org/show_bug.cgi?id=670078
2012-03-11 21:12:31 -04:00
Claudio Saavedra d7daa3cb0d GtkNotebook: emit child-notify::position a few more times
When moving a page around, all children changing their position
need to be notified.

There are still other places where proper notification is missing
(drag 'n drop, etc.)

https://bugzilla.gnome.org/show_bug.cgi?id=669116
2012-03-11 21:11:38 -04:00
Diego Escalante Urrelo a2135ef032 gtkactiongroup: clarify set_translation_domain docs
NULL is an actual useful value for
gtk_action_group_set_translation_domain, but this information is buried
in g_dgettext() documentation.

Be extra redundant, to make it obvious that NULL is ok.

https://bugzilla.gnome.org/show_bug.cgi?id=669636
2012-03-11 21:09:38 -04:00
Matthias Clasen 0be061d8c8 Use larger screen for tests
We used to run Xvfb with 800x600, which turns out to be too small
for some of our reftests. Bump it to 1024x768.
2012-03-11 21:08:50 -04:00
Will Newton b076de9409 iconcache: Always check return value of find_image_offset.
find_image_offset returns 0 if it failed to find a matching image.
Check this return value in _gtk_icon_cache_get_icon to avoid
making bad memory accesses later.

Signed-off-by: Will Newton <will.newton@imgtec.com>

https://bugzilla.gnome.org/show_bug.cgi?id=667745
2012-03-11 21:03:58 -04:00
Siegfried-Angel Gevatter Pujals 7b3dba7268 GtkRecentManager: guess mime-type from filename when file doesn't exist 2012-03-11 21:03:53 -04:00
Alexander Larsson 4dae33cdb0 Fix visibility notification event reporting
We were checking the event mask for GDK_VISIBILITY_NOTIFY,
not GDK_VISIBILITY_NOTIFY_MASK, which was clearly a typo.
2012-03-11 21:00:10 -04:00
Benjamin Berg cdf116605f Strip "Custom." prefix when getting default options from cups. 2012-03-11 20:59:06 -04:00
Matthias Clasen c7ba64aaf0 Add a few missing Since tags 2012-03-11 20:57:59 -04:00
Rui Matos 1f91adbcf7 x11: Fix the _NET_SUPPORTING_WM_CHECK window fetch to be spec compliant
"The child window MUST also have the _NET_SUPPORTING_WM_CHECK property set to
the ID of the child window. […] If the _NET_SUPPORTING_WM_CHECK window on the
client window is missing or not properly set, clients SHOULD assume that no
conforming Window Manager is present."

This commit implements that, which allows us to not have to do a
XGetWindowProperty() every N seconds when running under a compliant WM.

This is also a more correct fix for the bug handled in commit
daf29bffed.

https://bugzilla.gnome.org/show_bug.cgi?id=666921
2012-03-11 20:54:34 -04:00
Matthias Clasen ab9d570918 GtkRange: fix resize-grip overlap handling
We only want to shrink the scrollbar allocation by the actual
overlap, not always by the full size of the resize grip.
2012-03-11 20:53:14 -04:00
Matthias Clasen c1ff1c398c GtkStatusbar: Fix resize-grip overlap calculation
The allocation is relative to the window, so the way the statusbar
was doing the overlap calculation was wrong.
2012-03-11 20:53:00 -04:00
Mikael Magnusson e9944eb3ff Iconification using _NET_WM_STATE_HIDDEN hint if supported by WM
If the Window Manager supports the _NET_WM_STATE_HIDDEN, we use it to use
the _NET_WM_STATE protocol when de-iconifying windows (iconification is
unchanged, via XIconifyWindow). Additionally, we no longer interpret all
UnmapNotify events for our window as the result of iconification.

(Based on patch by Tomas Frydrych <tf@linux.intel.com>)
2012-03-02 20:50:05 +01:00
John Ralls 51f6bb488e Bug 655065 Build failure on OS X 10.7 Lion
Remove LDDADS and setting each object file's LDDAD to it; just set a global LDDAD.
2012-03-01 16:22:36 -08:00
Krishnababu Krothapalli 58191d5ed0 Updated Telugu Translations 2012-03-01 14:54:23 +05:30
Michael Natterer 55f9e5cbaf quartz: make function keys work (again?)
The F keys have no unicode mapping, and UCKeyTranslate() returns
a bogus 0x10 as mapping to unicode. Instead of checking for this
random and undocumented return value, simply assign all function
keys explicitly. This patch also splits the ill-named "known_keys"
array into "modifier_keys" and "function_keys" which is much
more obvious.
(cherry picked from commit 0b24f16241)
2012-02-23 13:42:50 +01:00
Ihar Hrachyshka 413b70df4a Updated Belarusian translation. 2012-02-20 16:51:51 +03:00
Bastien Nocera ede5591df0 x11: Fix first call to _gdk_x11_keymap_key_is_modifier()
_gdk_x11_keymap_key_is_modifier() never tries to set min/max_keycode
if they haven't been set before, meaning that until another function
sets those, all the keys will be seen as non-modifiers.

This causes GdkKeyEvents to be wrongly tagged with "->is_modifier = 0"
when in actual fact the key is a modifier. This fixes keyboard
shortcuts captured with GtkCellRendererAccel in "raw" mode thinking
a modifier without any actual keys is a valid shortcut.

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

Conflicts:

	gdk/x11/gdkkeys-x11.c
2012-02-19 17:41:11 +01:00
Milan Crha 516bb1dbc1 Bug 455900 - Invalid write on gtkfilechooserdefault finalise 2012-02-15 09:17:20 +01:00
Swecha Localization Team 3736a118ec Updated Telugu Translation 2012-02-06 17:32:30 +05:30
Marek Kasik a8e0895449 printing: Fix a typo
Fix a typo which crashes on my printer.
2012-01-26 10:54:22 +01:00
Michael Natterer e1c107a094 Bug 667691 - implement gdk_window_restack() for Quartz
Apply patch from Paul Davis which implements this missing function.
(cherry picked from commit 5f48cfe491)
2012-01-26 10:23:47 +01:00
Michael Natterer d915d17ff6 quartz: add virtual modifiers already in GDK, just as X11 does it
Key event states  will now always contain GDK_META_MASK in addition
to GDK_MOD2_MASK.
(cherry picked from commit 0488c28488)
2012-01-19 16:24:47 +01:00
Stefan Sauer fe23dc2c10 gtkscale: fix bogus compare func
The GtkScaleMark values are gdouble, a simple a-b compare func would fail for
values with the same integer value. This breaks the sorting and causes random
marker label placement.
2012-01-09 18:31:53 +01:00
Matthias Clasen c40ea99866 Use the right icon-name for missing images
Patch by Erik van Pienbroek, bug 629878.
2012-01-05 14:08:48 -05:00
Marek Kasik 4b423ca5ea GtkPrintUnixDialog: Hide unused tabs
Don't show tabs which are empty. This is related to
the recent GtkTable -> GtkGrid conversion. (#663479)
Also backport a fix of a typo from master.
2012-01-05 13:19:50 +01:00
Matthias Clasen 44e30c6db9 Fix problems with DND on some X servers
When the X server does not support the shape extension (as some
vnc implementations seem to), our DND code was always seeing
an empty input shape, so drops always missed their target.

http://bugzilla.gnome.org/show_bug.cgi?id=620240
2012-01-03 11:16:46 -05:00
Piotr Drąg 153b4f222a Updated POTFILES.skip 2011-12-29 17:49:42 +01:00
Benjamin Otte 97e3e4c3ba reftests: Add test for empty grid with spacing
This used to crash.

https://bugzilla.gnome.org/show_bug.cgi?id=660139
2011-12-29 10:02:54 +01:00
Matthias Clasen 97c1df4bb0 Fix natural/min widht calculations for empty grids
https://bugzilla.gnome.org/show_bug.cgi?id=660139
2011-12-29 10:01:59 +01:00
Matthias Clasen 49c9ec586e Bump version 2011-12-19 10:41:22 -05:00
Matthias Clasen a53cfaaf7b Make the pickers test work
Use the unix volume monitor, since gvfs is injecting all my extra
partitions into the dump of the file chooser.
2011-12-19 10:10:34 -05:00
Matthias Clasen db6282d20f Updates 2011-12-19 09:15:17 -05:00
Carlos Garnacho c6cc1a848f gdk,xi2: Make more resilient about not yet known devices
Dealing with disabled devices may turn into hierarchy/device
changed events on device IDs with no backing GdkDevice yet,
so protect against that. The device attachment will be handled
correctly when the device is enabled later.
2011-12-19 09:01:10 -05:00
Pavol Šimo 98c44a0ea8 Updated Slovak translation 2011-12-14 14:23:25 +01:00
Jan Rękorajski 5c8d9de2fc print dialog: Fix authentication logic
Reset state of CUPS requests correctly during authentization and
check CUPS requests for errors.
Don't initialize variables holding password and username with empty
string (#664640).
2011-12-14 14:11:55 +01:00
Federico Mena Quintero 2e931bd1fe bgo#662814 - Don't print a g_warning() when GtkRecentManager can't find a file
Also, *do* add the file to the recently-used list, even if the file does not
exist yet.  This is used from the Save dialog, so even shitty apps which don't
add the file to GtkRecentManager, will get the file added from the Save dialog.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-12-13 11:05:54 -06:00
Matthias Clasen e3005ea454 Fix move-resize emulation with XI2
https://bugzilla.gnome.org/show_bug.cgi?id=650943
2011-12-12 09:33:25 -05:00
Matthias Clasen 0847389581 Revert 3fd7dbc940
Calling gdk_keymap_add_virtual_modifiers causes _all_ virtual
modifiers to be added, which causes problem when they are co-located
on the same real modifier (as Super and Hyper often are). Effectively,
this made it impossible to enter key combinations involving Super,
since they all turn into Super+Hyper.
2011-12-12 09:33:09 -05:00
Matthias Clasen efe53e5afc Test some virtual modifiers
This adds some accelerators involving Super and Hyper to testmerge.
This helps in testing our accel matching for those.
2011-12-12 09:32:53 -05:00
Stef Walter b38f5ffa52 GtkCssProvider: don't segfault when CSS file is not found
* Fix null dereference in gtk_css_provider_take_error()
 * And another in gtk_css_provider_emit_error()

https://bugzilla.gnome.org/show_bug.cgi?id=664537
2011-12-12 09:29:46 -05:00
Matthias Clasen 6c988c2850 XI2: Push error traps around XIQueryDevice calls
This may help against the crashes at resume time that some
people have been hitting when input devices mysteriously
disappear.
2011-12-12 09:29:37 -05:00
Paolo Borelli 18a366a206 Avoid shadowing a variable
Move bg_color variable to an inner scope.
2011-12-12 09:29:11 -05:00
Christian Persch 901449adf7 prop-editor: Implement property editing for GdkRGBA properties
Bug #664467.
2011-12-12 09:28:14 -05:00
Christian Persch 47a321f5f2 color-button: Notify "color" and "alpha" properties when changing the rgba
Bug #664469.
2011-12-12 09:27:28 -05:00
Matthias Clasen cf028a1f7b GtkIconView: Fix a segfault
Keynav on an empty iconview was causing segfaults. This
was reported in https://bugzilla.gnome.org/show_bug.cgi?id=664456
2011-12-12 09:27:09 -05:00
Federico Mena Quintero bdd163d4ea [GtkFileChooserDefault] Don't destroy and re-create the filename entry
This is a leftover from the big rework to remove the expanded/collapsed mode
in Save mode.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-11-29 15:08:25 -06:00
Federico Mena Quintero 67437c8d6c [GtkPathBar] Remove unused error argument
It used to be that _gtk_path_bar_set_file() would return an error if
it wasn't able to switch to the specified file, but that hasn't been
the case for a long while now, since the file chooser became async.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-11-29 15:07:01 -06:00
Federico Mena Quintero f5a6279471 [path-bar] Add some comments to explain the async recursion on an I/O callback
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-11-29 14:16:29 -06:00
Federico Mena Quintero 0fb5e6fff3 [path-bar] Only reset the children's styles if the children actually changed
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-11-29 14:16:24 -06:00
Federico Mena Quintero 674404f171 Remove unused argument
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2011-11-29 14:16:19 -06:00
Benjamin Otte aca43f43be filechooserdefault: Don't unref value twice
Double unref was introduced in eb02dacb37

https://bugzilla.gnome.org/show_bug.cgi?id=646461
https://bugzilla.gnome.org/show_bug.cgi?id=664137
2011-11-29 20:52:07 +01:00
Benjamin Otte 512ac214c6 a11y: Fix crash in treeview
This is a band-aid fix. The master branch has a complete rework of the
treeview a11y code. Let's hope this will cause most crashes to magically
disappear. This code has been indexing by random memory on the stack for
a long while and things didn't crash, so let's hope for the best.

https://bugzilla.gnome.org/show_bug.cgi?id=663322
https://bugzilla.gnome.org/show_bug.cgi?id=664137
2011-11-26 20:46:26 +01:00
Rui Matos 32c08de08c Bug 653676 - Expand/Collapse doesn't respond after one click
Ignore leave-notify-event when mode is GDK_CROSSING_GTK_[UN]GRAB.
Just [un]grabbing shouldn't cause us to [un]prelight the current arrow
and node.
2011-11-20 21:04:29 +01:00
Kristian Rietveld d2d45b652f Don't call scroll to cell if the tree view is empty
Account for the case when gtk_drag_finish() didn't actually add a row
(can happen when dragging from an empty tree view to itself ...).
2011-11-20 20:07:38 +01:00
Kristian Rietveld 895eb18412 Bug 660554 - gtk_tree_view_drag_begin: assertion `path != NULL' failed
Turned assertion into silent return.

This assertion is only hit when dragging from an empty tree view.  In
this case, gtk_tree_view_begin_drag() is triggered from gtkdnd.c and not
from gtk_tree_view_maybe_begin_dragging_row().  We actually want to
cancel the drag at this point, but that is not possible with the GTK+
API as far as I can see.

The alternative is to not allowing the drag to start.  This could be
done by simply unsetting the tree view as drag source when it is empty
and setting it as drag source again when rows are added.  I didn't
choose to go with this for now, since this will likely break third party
code.
2011-11-20 20:07:38 +01:00
Kristian Rietveld 39f0287c58 quartz: fix coding style in quartz-version of gtk_drag_begin_internal 2011-11-20 20:07:38 +01:00
Kristian Rietveld 0e941cca92 quartz: do not call gdk_drag_begin() twice
This makes drag and drop work again on Quartz.
2011-11-20 20:07:38 +01:00
John Ralls 22db419f52 [Bug 664238] GTK apps crash when dragging something
Corrects a bad condition in a test in 9d900681
2011-11-20 10:40:08 -08:00
Jorge González e82aed1e95 Updated Spanish translation 2011-11-20 10:40:55 +01:00
Michel Dänzer b448ae7963 Fix gdk_cairo_region_create_from_surface on big endian
gdk_cairo_region_create_from_surface doesn't work correctly on PPC.
This is most prominently seen with the GTK window resize grip, the
shape of which is mirrored every eight pixels horizontally.

At the same time, use an A1 surface for the resize grip shape to
eliminates an A8->A1 surface conversion.
2011-11-19 12:25:39 -05:00
Michael Natterer 182cf3daa6 Bug 663856 - Make option-foo accelerators use the right symbol
If the keyboard group shifting modifier is *also* a normal
accelerator modifier, we need to special case it when calling
gdk_keymap_translate_keyboard_state(), so we get the right
key symbol for accelerators (for example we want Option-O,
not Option-Ø displayed in menu items). This patch should only
affect quartz where the Alt key both shifts the group and can
be used as accel modifier, and not X11 or Win32 where AltGr
is not used for accelerators.

- fix quartz' gdk_keymap_translate_keyboard_state() to return
  the right consumed_modifiers
- add _gtk_translate_keyboard_accel_state() which does the
  special casing
- use it everywhere instead of gdk_keymap_translate_keyboard_state()
2011-11-18 12:47:14 +01:00
Michael Natterer 87ebfb19fd notebook: don't leak the action widgets
The notebook owns them, so it must destroy them in destroy().
(cherry picked from commit 4c35d987df)
2011-11-17 01:03:53 +01:00
Xan Lopez 1842b87465 treeview: fix the build 2011-11-16 19:02:35 -05:00
Cosimo Cecchi 722517dacb treeview: use gtk_tree_view_ensure_background() consistently
In gtk_tree_view_state_flags_changed() we were setting the background on
the bin_window without the necessary "view" style class, making the
treeview render with the wrong color in some circumstances (such as when
adding an empty treeview in a window, as spotted by Brian Smith).
2011-11-16 16:11:23 -05:00
Cosimo Cecchi aac0806ca6 treeview: factor out gtk_tree_view_ensure_background()
We'll use it shortly.
2011-11-16 16:11:21 -05:00
Cosimo Cecchi 1f23b40b3d toolbutton: don't force the icon widget to be a GtkMisc
There's really no reason the icon widget must be a GtkMisc. You might
want to use e.g. a GtkSpinner.
2011-11-16 10:05:10 -05:00
Martin Pitt cba492ae24 Fix gtk_tree_view_get_tooltip_context() transfer annotation
The default (out) transfer mode is "full", but the passed "model" pointer gets
set to gtk_tree_view_get_model() which is "transfer none". This caused Python
programs to free the model after calling this, causing crashes.
2011-11-14 14:35:14 +01:00
Matthias Clasen c8f483c228 Bump version 2011-11-11 23:55:05 -05:00
Matthias Clasen cfbbb5d076 Updates 2011-11-11 23:18:14 -05:00
Matthias Clasen 6f3cdac015 Update iconview test results
The 'showing' state of items is now correct, due to the
'layout not in idle' change in GtkIconView.
2011-11-11 23:08:19 -05:00
Matthias Clasen b763e2cdaa GtkProgressbar: respect the range of 'fraction'
The setter should not set the property to values outside the allowed
range.

https://bugzilla.gnome.org/show_bug.cgi?id=663825
2011-11-11 23:08:19 -05:00
Benjamin Otte 456b19a35a a11y: Fix gcc warning 2011-11-11 23:08:19 -05:00
Benjamin Otte 6ad897819c a11y: It's not a bug if there's no row at some point
In that case, there's just nothing there.
2011-11-11 23:08:19 -05:00
Guillaume Desmottes b256211737 gtktreeviewaccessible: use a value_destroy_func with the cell_info_by_index hash
This ensures that we don't leak any GtkTreeViewAccessibleCellInfo when
re-inserting a new one with the same key.

https://bugzilla.gnome.org/show_bug.cgi?id=663694
2011-11-11 23:08:19 -05:00
Guillaume Desmottes 4651571ec3 gtktreeviewaccessible: factor out cell_info_free()
https://bugzilla.gnome.org/show_bug.cgi?id=663694
2011-11-11 23:08:19 -05:00
Morten Welinder a6179ec639 Print preview: make cancel work
This makes cancels of a print preview work in the same way it
works for non-previews, i.e., the operation stops at the next
page boundary.

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

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

https://bugzilla.gnome.org/show_bug.cgi?id=662691
2011-11-11 23:08:18 -05:00
Torsten Schönfeld cd0a5fef30 gtk: add annotations for some GtkSymbolicColor constructors
https://bugzilla.gnome.org/show_bug.cgi?id=661859
2011-11-11 23:08:18 -05:00
Rui Matos 6a5e53a34a x11: Fix window manager change detection
Since the wmspec_check_window doesn't have a corresponding GdkWindow we can't
rely on the get_event_window() return value to get the XID from. Just use the
XID from the XEvent directly.

https://bugzilla.gnome.org/show_bug.cgi?id=662953
2011-11-11 23:08:18 -05:00
Benjamin Moody 0dde424db3 Mark gtk_dialog_new_with_buttons as NULL-terminated
https://bugzilla.gnome.org/show_bug.cgi?id=663073
2011-11-11 23:08:18 -05:00
Matthias Clasen fcd5e44e15 Pop up context menus at the right device
When multiple pointers are in play, we need to be careful
not to loose track of the device between receiving a button
press and popping up a menu.

https://bugzilla.gnome.org/show_bug.cgi?id=663396
2011-11-11 23:08:18 -05:00
Matthias Clasen 73b34cbe18 Don't use deprecated Pango api 2011-11-11 23:08:18 -05:00
Matthias Clasen b463530a72 Don't use deprecated Pango api 2011-11-11 23:08:18 -05:00
Cosimo Cecchi a53a30c7f8 iconview: layout items immediately when setting a GtkTreeModel
As the draw handler expects the items to be laid out already, we cannot
queue a layout here to avoid a race condition with the resize that is
queued immediately after, which in turn would lead to a segfault later
in the paint_item() implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=663138
2011-11-11 23:08:18 -05:00
Emmanuele Bassi 988f374151 radiotoolbutton: Fix the introspection annotations
Everything that deals with a group has to be fixed.

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

https://bugzilla.gnome.org/show_bug.cgi?id=662870
2011-11-11 23:08:18 -05:00
Emmanuele Bassi 96e95d0a9f radiotoolbutton: Fix the annotation for get_group()
Use the same annotation used by gtk_radio_button_get_group().

https://bugzilla.gnome.org/show_bug.cgi?id=662870
2011-11-11 23:08:18 -05:00
Matthias Clasen b4b8a969f4 Print dialog: small keynav improvement
Mark the page range entry and the copies spin button as
activates-default.

https://bugzilla.gnome.org/show_bug.cgi?id=662670
2011-11-11 23:08:18 -05:00
Matthias Clasen b4120d6f25 Update grid tests to match
The previous fix changed some test results here.
2011-11-11 23:08:18 -05:00
Matthias Clasen 9a16a83c95 Fix gtk_grid_attach_next_to
The function did not behave as intended when @sibling is NULL.
Also add an example to the docs to clarify the intended behaviour.
2011-11-11 23:08:18 -05:00
Michael Natterer e9dfc997a0 quartz: fix a race condition when waking up the CGRunLoop
Wake up the run loop unconditionally (don't check if it is waiting) because
it might go into waiting state right after we checked for it. Fixes GIMP
startup (which has a lot of GIOChannel I/O but zero NSEvents) from several
minutes to a few seconds.
(cherry picked from commit 0729cdc9a1)
2011-11-11 23:56:10 +01:00
Kristian Rietveld 0f6ec6e76d Bug 661997 - Gtk crashes when changing the TreeView model while ...
Simply stopping rubber banding in gtk_tree_view_set_model() eliminates
the crash.  Reported by Thomas Perl.
(cherry picked from commit 91ae19768e)
2011-11-09 08:47:18 +01:00
Michael Natterer 5deb446b50 quartz: include all buttons' state in GdkEventMotion.state
(cherry picked from commit 3b5c5710da)
2011-11-09 00:36:55 +01:00
Michael Natterer e0d2525a52 quartz: include all buttons' states in GdkEventButton.state
(cherry picked from commit a381e8ea62)
2011-11-09 00:27:18 +01:00
Michael Natterer 73d9ee0e62 Bug 663605 - Fix event->state of many event types on quartz
Don't try to remember the current keyboard modifier and mouse button
states from the last event, because that isn't always right, and don't
set event.state = 0 for generated events. Instead, add private functions
to get the current states, and implement them with API that retrieves
these states independently from an event.
(cherry picked from commit 264241eb11)
2011-11-08 21:55:10 +01:00
John Ralls 9d900681d7 [Quartz Bug 663182] NSImage throws an exception from _gtk_quartz_create_image_from_pixbuf()"
If a zero-sized NSImage calls lockfocus it throws an exception. Make sure that the image isn't zero-sized before calling lockfocus, and log a warning and return NULL if it is zero-sized.

Have the quartz version of gtk_drag_begin_idle return FALSE if the returned image is NULL.
2011-11-07 14:27:09 -08:00
Stef Walter 9d2963f469 gtk: GtkToolbar returns invalid paths when adding tool items
* Calculate siblings_path on demand, so that it's always correct
   and doesn't get out of sync with the toolbar state.

https://bugzilla.gnome.org/show_bug.cgi?id=662177
2011-11-07 17:16:50 -05:00
Benjamin Otte a8b315f41f toolbar: Fix widget path creation code
- Ensure arrow button is always included
- Invalidate list when direction changes
2011-11-07 17:16:27 -05:00
Michael Natterer 273283db92 gdk: exclude MOD1 from the virtual modifier mapping
which effectively nails down the MOD1 == ALT assumption that is valid
in all other parts of GTK+. After the modifier abstraction fixes for
OSX, the virtual mapping is now (correctly) used in more places, and
caused problems with the common default PC keyboard layout on X11 that
colocates ALT and META on the same key.
(cherry picked from commit ac943bf69a)
2011-11-07 20:14:33 +01:00
Michael Natterer ef9a92d225 quartz: handle recursive CFRunLoops
Fixes e.g. crashs when dropping from finder.

Turn the "getting_events" boolean into a counter to handle poll_func()
being called recursively, and track the loop depth correctly by
changing its counter before bailing out in run_loop_observer_callback().
This way we reallocate our autorelease pool at the right time, and
don't kill memory that is still in use by outer run loops.

Also drain, not release the pool, just for some defensive forward
compatibility.
2011-11-06 23:30:28 +01:00
Alexander Larsson 7b06b81306 Make sure we only show icons in the file selector bookmarks toolbar
This looked really bad in non-gnome settings where default is to
show text too.
(cherry picked from commit c002c83ec5)
2011-11-02 14:49:14 +01:00
Michael Natterer 1481aac73f gtkrc.key.mac: add Command-cursor text navigation
and some emacs-ish Control bindings that work in native widgets.
Patch from Michael Hutchinson.
(cherry picked from commit ccf12f7b40)
2011-10-25 22:25:37 +02:00
Michael Natterer b246dc21c6 gtkrc.key.mac: remove half the file, it was an accidential double paste
(cherry picked from commit 79a92f99a9)
2011-10-25 17:03:37 +02:00
Michael Natterer 0fd83a217b quartz: don't return FALSE from GdkDevice::query_state()
Not finding a child window to return is not a failure.
(cherry picked from commit 077b366879)
2011-10-22 23:27:03 +02:00
Michael Natterer b292ecef1f gtkquartz: don't free the string returned by get_bundle_path()
It's statically allocated.
(cherry picked from commit c040b03c2e)
2011-10-22 23:10:38 +02:00
André Gondim f4dfcefbd5 Fixed some strings in Brazilian Portuguese translation 2011-10-17 10:06:27 -02:00
Jiro Matsuzawa 194303fc8f Updated Japanese translation 2011-10-17 01:25:41 +09:00
Bruce Cowan e5b30eecaf Updated British English translation 2011-10-16 14:45:05 +01:00
John Ralls f5cc6dbdfa Bug 658772: Directory paths for resource directories are hard coded.
Corrected formatting to match coding standards; introduced local statics
to prevent leaking returned strings.
2011-10-15 12:45:37 -07:00
Matthias Clasen b433772b03 bump version 2011-10-14 16:36:01 -04:00
Matthias Clasen 4e99d8d090 Fix more test breakage 2011-10-14 15:52:24 -04:00
Matthias Clasen 0594d4e349 Updates 2011-10-14 12:37:48 -04:00
Matthias Clasen 756c3a09af Fix make check
Somebody committed a behaviour change that broke his own
tests...tsk, tsk.
2011-10-14 11:43:40 -04:00
Matthias Clasen 1d3fc6c0c0 Add a css parser test for transparent 2011-10-14 11:37:02 -04:00
Chun-wei Fan a3344ef699 Bug 660730: Win32: Only use _fstat32 if available
_fstat32 is only introduced with msvcrt80.dll (i.e. Visual C++ 2005),
in which using this function will break compilation with MinGW,
which links against msvcrt.dll.  The msvcrt.lib in the Windows DDK
which links to a later incarnation of the msvcrt.dll in later Windows
systems may have this symbol defined, but that needs to be checked
upon to be sure.

Thanks to Dieter Verfaillie for pointing out this problem.
2011-10-12 11:42:43 +08:00
John Ralls 68135b53fc Bug 658767 - Drag and Drop NSEvent capture is racy
Create a synthetic NSMouseLeftDown to store in the GtkQuartzDragSourceInfo
rather than relying on the NSWindow's latest event being the right one (or the
right kind).
2011-10-09 11:28:13 -07:00
Kristian Rietveld 436547a80e Bug 657770 - Write to released memory in gtkdnd-quartz.c
Clear the Drag paste board just before the info->context is released.
This way the GtkDragSourceOwner is released just before the drag context
is and thus can pasteboard:provideDataForType: not accidentally access
an already released drag context
2011-10-09 11:28:13 -07:00
Alex Corrado 9aa26f0d64 Quartz, Bug 655057: Eliminate Compiler Warning
When compiled with older SDKs, the original change for this bug caused a
compiler warning about NSWindow not being able to handle a setStyleMask
message. This tricks the compiler into thinking that it can.
2011-10-09 10:06:54 -07:00
John Ralls 48791fd514 Bug 658772: Directory paths for resource directories are hard coded.
Provide dynamic path discovery functions as are provided for win32.
2011-10-08 15:05:41 -07:00
Rudolfs Mazurs 32ec6ad073 Updated Latvian translation. 2011-10-09 00:09:03 +03:00
Kristian Rietveld 296c534663 quartz: also update window position on windowDidResize
When a window goes fullscreen, the resize also changes its size.
(cherry picked from commit d172f1ce22)
2011-10-08 11:48:48 +02:00
Wouter Bolsterlee cb35b3166e Updated Dutch translation by Wouter Bolsterlee 2011-10-08 00:42:19 +02:00
Rachid 7276fbc1d1 Updated Dutch translation by Rachid 2011-10-08 00:42:15 +02:00
Michael Natterer 31863fc1b4 gtk: also define the default *virtual* accel mod mask
and use it in stock items and GtkAccelGroup. Change the non-virtual
one to MOD2 on OSX, so hardcoded accelerators in the IM context and
the treeview work.
(cherry picked from commit 21e971b3cb)
2011-10-07 20:29:54 +02:00
Michael Natterer f46c1b76d8 gdk: fix gdk_keyval_to_lower/upper() for Quartz, Win32 and Broadway
In 2.x, the !HAVE_XCONVERTCASE fallback of keyval_convert_case() was
implicitly used as implementation for all !X11 backends.

In 3.x, when this function was virtualized in GdkDisplayManager,
this fallback was moved to the X11 backend and the other backends
"equipped" with /* FIXME implement */ implementations of
keyval_convert_case() which don't convert anything.

Move the fallback code back to gdk/ as default implementation
of GdkDisplayManager::keyval_convert_case() and remove its
implementations is all backends but X11. Also remove the
implementation is Wayland which was a plain copy of what
is now the default implementation.
2011-10-07 16:10:19 +02:00
Fran Dieguez eaecf396bf Updated Galician translations 2011-10-07 01:30:08 +02:00
John Ralls a628761838 Bug 628936: Minimal change to pass introspection.
gobject_introspection's G-ir-scanner doesn't like the -xobjective-c
option needed to compile ObjectiveC features in quartz implementations
of certain gtk functions. This rearranges the compiler flag environment
variables in Makefile so that G-ir-scanner doesn't see them.
2011-10-04 17:17:30 -07:00
Tristan Van Berkom 126adb6ef3 Fixed gtk_cell_area_stop_editing() to properly notify when editing is not canceled
This fixes bug 653289, in gtk+-2 gtk_tree_view_stop_editing() was previously
responsible for notifying with gtk_cell_editable_editing_done(), this detail
was missed when porting the cell renderer management to GtkCellArea.
2011-10-04 14:16:00 -04:00
Nicolás Lichtmaier 932ad8ad29 Updated Spanish translation, fixes bug #659655 2011-10-03 23:22:51 +02:00
Kristian Rietveld bcfb7a6cdd Bug 659022 - gtk_tree_model_filter_clear_cache_helper: assertion failed
This bug is resolved by fixing two things in
gtk_tree_model_filter_row_deleted():

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

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

For both bugs unit tests have been added in the preceding commit.
2011-10-03 23:02:54 +02:00
Kristian Rietveld a9b9699bde Add two more unit tests for bug 659022
Both pointing out problems in gtk_tree_model_filter_row_deleted().
2011-10-03 23:02:50 +02:00
Kristian Rietveld 51b11b36a4 Fix first part of bug 659022
Push creation of path into if clause, the path cannot be created anyway
(and would be meaningless otherwise) if the parent is not visible.
2011-10-03 23:02:45 +02:00
Kristian Rietveld 59a015fb85 Add unit test for part 1 of bug 659022
This tests a case where gtk_tree_model_filter_row_changed() is run
for a node with visible_siter != NULL, however its parent has
visible_iter == NULL. For this case, no valid paths can be generated
as the node cannot be accessed (because the parent is invisible).
2011-10-03 23:02:39 +02:00
Kristian Rietveld bba6657bb5 Fix commit 5e41964965
Where the commit suggested "somebody should review it [the test]",
it would have been useful to test this particular commit instead...
2011-10-03 23:02:25 +02:00
Benjamin Otte 5e41964965 tests: Fix a bunch of set-but-unused warnings in the filtermodel test
The whole test doesn't seem to unref any memoery, somebody should review
it.
2011-10-03 18:05:57 +02:00
Benjamin Otte 04c42b6e53 iconcache: Fix gcc warning 2011-10-03 18:03:57 +02:00
Benjamin Otte e248c6812e a11y: Hack around infinite loops in parent setting
This is kind of a hack to get rid of infinite loops that occur when
child accessibles try to set their parent upon creation but the parent
accessible creates its children in the initialize vfunc. Because in that
case, the parent will not have an accessible set when the child tries to
access it, because it is still initializing itself. Which will cause a
new accessible to be created.

https://bugzilla.gnome.org/show_bug.cgi?id=660687
2011-10-03 17:29:12 +02:00
Chun-wei Fan ff6983e400 Bug 660730: Use GStatBuf for portability
Thanks to Kean Johnston for pointing this out.

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

Based on patch submitted by Kean Johnston
2011-10-03 23:27:48 +08:00
Adel Gadllah 1edd94a950 gdk: Plug leak in gdk_display_pointer_is_grabbed
gdk_x11_device_manager_core_list_devices returns a new allocated
list, which has to be freed.

valgrind output:

==18686== 160,176 (80,088 direct, 80,088 indirect) bytes in 3,337 blocks are definitely lost in loss record 25,347 of 25,378
==18686==    at 0x4C256DD: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==18686==    by 0x6CD7752: g_malloc (in /lib64/libglib-2.0.so.0.3000.0)
==18686==    by 0x6CEE2B6: g_slice_alloc (in /lib64/libglib-2.0.so.0.3000.0)
==18686==    by 0x6CCB37D: g_list_prepend (in /lib64/libglib-2.0.so.0.3000.0)
==18686==    by 0x654CADA: gdk_x11_device_manager_core_list_devices (gdkdevicemanager-core-x11.c:836)
==18686==    by 0x6531489: gdk_display_pointer_is_grabbed (gdkdisplay.c:1270)
==18686==    by 0x5162E1E: filter_func (ui.c:140)
==18686==    by 0x6558B50: gdk_event_apply_filters (gdkeventsource.c:83)
==18686==    by 0x6558CB3: _gdk_x11_display_queue_events (gdkeventsource.c:197)
==18686==    by 0x6530680: gdk_display_get_event (gdkdisplay.c:311)
==18686==    by 0x65589F1: gdk_event_source_dispatch (gdkeventsource.c:356)
==18686==    by 0x6CD0A0E: g_main_context_dispatch (in /lib64/libglib-2.0.so.0.3000.0)

https://bugzilla.gnome.org/show_bug.cgi?id=660676
2011-10-03 14:25:55 +02:00
Tiffany Antopolski a93793dca3 Updated Esperanto translation 2011-10-03 13:38:06 +02:00
Nguyễn Thái Ngọc Duy 483d8f3446 Updated Vietnamese translation 2011-10-01 20:10:25 +10:00
Nguyễn Thái Ngọc Duy 58e1481d38 po/vi: import from Damned Lies 2011-10-01 20:10:23 +10:00
Michael Natterer 64a7fc279c quartz: don't filter away directly encoded 24-bit UCS characters
gdk_unicode_to_keyval(uc) returning (uc | 0x01000000) is not an
error return value but simply the way to encode 24-bit unicode
characters directly as keyvals.
(cherry picked from commit 0a13deae88)
2011-09-28 13:58:52 +02:00
YunQiang Su e35e112ea9 update zh_CN translation 2011-09-28 01:34:08 +08:00
Piotr Drąg 4fa78201a1 Updated POTFILES.skip 2011-09-27 16:07:35 +02:00
126 changed files with 23954 additions and 19466 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ TEST_PROGS =
### testing rules
# Xvfb based test rules
XVFB = Xvfb -ac -noreset -screen 0 800x600x16
XVFB = Xvfb -ac -noreset -screen 0 1024x768x16
XIDS = 101 102 103 104 105 106 107 197 199 211 223 227 293 307 308 309 310 311 \
491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 \
991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 \
@@ -29,7 +29,7 @@ endif
XVFB_START = \
${XVFB} -help 2>/dev/null 1>&2 \
&& XID=`for id in $(XIDS) ; do test -e /tmp/.X$$id-lock || { echo $$id; exit 0; }; done; exit 1` \
&& { ${XVFB} :$$XID -screen 0 800x600x16 -nolisten tcp -auth /dev/null >/dev/null 2>&1 & \
&& { ${XVFB} :$$XID -nolisten tcp -auth /dev/null >/dev/null 2>&1 & \
trap "kill -15 $$! " 0 HUP INT QUIT TRAP USR1 PIPE TERM ; } \
|| { echo "Gtk+Tests:ERROR: Failed to start Xvfb environment for X11 target tests."; exit 1; } \
&& DISPLAY=:$$XID && export DISPLAY
+135
View File
@@ -1,3 +1,138 @@
Overview of Changes in GTK+ 3.2.4
=================================
* Bugs fixed:
455900 invalid write on gtkfilechooserdefault finalise
620240 GNOME Drag & Drop broken for remote X sessions
629878 Missing "Back" and "Forward" icons for Firefox
650693 Drawing errors in column headers when adding new...
655065 Build failure on OS X 10.7 Lion
660139 GtkGrid gives Gtk-Warnings about negative sizes when empty
663479 "Finishing" ("Completion") and "Advanced" tabs are empty
666921 x11: Fix the _NET_SUPPORTING_WM_CHECK window fetch...
667691 implement gdk_window_restack() for Quartz (should work...
667745 icon cache can be unsafe when accessing missing icons
668114 odd spacing in about dialog credits
669116 GtkNotebook's child-notify::position not always emitted...
669636 gtkactiongroup: clarify set_translation_domain docs
670077 license text has poor alignment with close button
670078 no stroke around credits scrollable area
670400 First shortcut capture is broken
670832 Wrong "Since" for GtkSettings property gtk-application-pr...
671070 x11: Correct GroupSwitch mask
671170 GtkTable and GtkGrid alignment problem
* Translation updates:
Belarusian
Telugu
Overview of Changes in GTK+ 3.2.3
=================================
* GtkNotebook is now properly destroying action widgets
* The XI2 code has been made more robust:
- Trap errors due to disappearing devices, which
can happen when resuming from suspend
- Prevent stuck grabs when using move-resize emulation
with XI2
- Avoid segfaults due to events on disabled devices
* Bugs fixed:
646461 Leak in gtkfilechooserbutton.c: model_free_row_data
650943 Clicking resize grip causes strange mouse grabbing...
653676 Expand/Collapse doesn't respond after one click
660554 gtk_tree_view_drag_begin: assertion `path != NULL' failed
662814 Request for way to tell gtk_recent_manager_add_item_query...
663322 a11y-related crash
663856 Make option-foo accelerators use the right symbol
664132 gdk_cairo_region_create_from_surface broken on PPC...
664137 Crash in Audacious audio player when browsing...
664238 GTK apps crashe when dragging something
664456 segfault on arrow keypress in empty GtkIconView
664467 prop-editor is broken for GdkColor properties
664469 color button doesn't notify "color" and "alpha"...
664537 GtkCssProvider: don't segfault when CSS file is not found
664640 CUPS authentication does not work
* Translation updates:
Slovak
Spanish
Overview of Changes in GTK+ 3.2.2
=================================
* Bugs fixed:
658772 Directory paths for resource directories are hard-coded
661858 Add annotations for some GtkRadio* constructors
661859 Add annotations for some GtkSymbolicColor constructors
661997 Gtk crashes when changing the TreeView model while rubber...
662160 gtk_print_operation_cancel fails
662177 Toolbar returns invalid paths for toolbar items
662670 Pressing "Enter" in print dialog box will not cause printing
662691 menuitem: Always treat submenus as popup
662870 Fix introspection annotations for GtkRadioToolButton
662953 x11: Fix window manager change detection
663073 gtk_dialog_new_with_buttons should be G_GNUC_NULL_TERMINATED
663138 iconview: layout items immediately when setting a GtkTreeModel
663396 With multiple master devices, right clicking may show popup...
663605 Fix event->state of many event types on quartz
663694 GtkTreeViewAccessibleCellInfo are leaked
663825 calling gtk_progress_bar_set_fraction with a fraction > 1.0...
* Translation updates:
Brazilian Portuguese
British English
Japanese
Overview of Changes in GTK+ 3.2.1
=================================
* GtkCellRendererAccel can show virtual modifiers
* CSS improvements:
- 'transparent' can be used a color
* OS X improvements:
- Disable mnemonics
- Make Option work as a modifier
- Cleanup of modifiers: Alt/Option is MOD1, Command is MOD2
- Fix keyval <> Unicode and lowercase/uppercase mapping
* Improvements of cross-platform key and button event handling:
- Support '<Primary>' in accelerator strings
- Use approprivate modifiers for extending and modifying
selections, depending on the platform
- Use the appropriate button for triggering context menus,
depending on the platform
* Bugs fixed:
628936 gtk build fails because of objective-c elements
653289 GtkCellRendererText "edited" signal not emitted...
655057 rendering issues with map plugin
657770 Write to released memory in gtkdnd-quartz.c
658767 Drag and Drop NSEvent capture is racy
658772 Directory paths for resource directories are hard-coded
659022 gtk_tree_model_filter_clear_cache_helper: assertion failed
659655 3 errors in Spanish translation of gtk+
660687 roxterm X crashes with accessibility enabled
660730 Use of "struct stat" breaks Windows
* Translation updates
Catalan (Valencian)
Czech
Dutch
Esperanto
Galician
Latvian
Spanish
Traditional Chinese
Vietnamese
Overview of Changes in GTK+ 3.2
===============================
+11 -2
View File
@@ -10,8 +10,8 @@
m4_define([gtk_major_version], [3])
m4_define([gtk_minor_version], [2])
m4_define([gtk_micro_version], [1])
m4_define([gtk_interface_age], [1])
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],
@@ -318,6 +318,11 @@ if test -z "$backend_set"; then
fi
fi
AC_ARG_ENABLE(quartz-relocation,
[AS_HELP_STRING([--enable-quartz-relocation],
[enable bundle-based relocation functions])],
[quartz_relocation=yes])
cairo_backends=
backend_immodules=
GDK_BACKENDS=
@@ -360,6 +365,10 @@ if test "x$enable_quartz_backend" = xyes; then
#define GDK_WINDOWING_QUARTZ"
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -framework Cocoa"
AM_CONDITIONAL(USE_QUARTZ, true)
if test "x$quartz_relocation" = xyes; then
AC_DEFINE([QUARTZ_RELOCATION], [1], [Use NSBundle functions to determine load paths for libraries, translations, etc.])
fi
else
AM_CONDITIONAL(USE_QUARTZ, false)
fi
-14
View File
@@ -87,19 +87,6 @@ gdk_broadway_display_manager_lookup_keyval (GdkDisplayManager *manager,
return _gdk_keyval_from_name (name);
}
static void
gdk_broadway_display_manager_keyval_convert_case (GdkDisplayManager *manager,
guint symbol,
guint *lower,
guint *upper)
{
/* FIXME implement this */
if (lower)
*lower = symbol;
if (upper)
*upper = symbol;
}
static void
gdk_broadway_display_manager_init (GdkBroadwayDisplayManager *manager)
{
@@ -129,7 +116,6 @@ gdk_broadway_display_manager_class_init (GdkBroadwayDisplayManagerClass *class)
manager_class->get_atom_name = _gdk_broadway_display_manager_get_atom_name;
manager_class->lookup_keyval = gdk_broadway_display_manager_lookup_keyval;
manager_class->get_keyval_name = gdk_broadway_display_manager_get_keyval_name;
manager_class->keyval_convert_case = gdk_broadway_display_manager_keyval_convert_case;
}
void
+4
View File
@@ -427,7 +427,11 @@ gdk_cairo_region_create_from_surface (cairo_surface_t *surface)
gint x0 = x;
while (x < extents.width)
{
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
if (((data[x / 8] >> (x%8)) & 1) == 0)
#else
if (((data[x / 8] >> (7-(x%8))) & 1) == 0)
#endif
/* This pixel is "transparent"*/
break;
x++;
+6 -1
View File
@@ -1275,9 +1275,14 @@ gdk_display_pointer_is_grabbed (GdkDisplay *display)
if (gdk_device_get_source (device) == GDK_SOURCE_MOUSE &&
gdk_display_device_is_grabbed (display, device))
return TRUE;
{
g_list_free (devices);
return TRUE;
}
}
g_list_free (devices);
return FALSE;
}
+3
View File
@@ -29,6 +29,7 @@
#include "gdkconfig.h"
#include "gdkdisplaymanagerprivate.h"
#include "gdkinternals.h"
#include "gdkkeysprivate.h"
#include "gdkmarshalers.h"
#include "gdkintl.h"
@@ -136,6 +137,8 @@ gdk_display_manager_class_init (GdkDisplayManagerClass *klass)
object_class->set_property = gdk_display_manager_set_property;
object_class->get_property = gdk_display_manager_get_property;
klass->keyval_convert_case = _gdk_display_manager_real_keyval_convert_case;
/**
* GdkDisplayManager::display-opened:
* @manager: the object on which the signal is emitted
+127
View File
@@ -26,6 +26,7 @@
#include "config.h"
#include "gdkkeysyms.h"
#include "gdkkeysprivate.h"
#include "gdkdisplay.h"
#include "gdkdisplaymanagerprivate.h"
@@ -649,3 +650,129 @@ gdk_keyval_from_name (const gchar *keyval_name)
return GDK_DISPLAY_MANAGER_GET_CLASS (manager)->lookup_keyval (manager,
keyval_name);
}
void
_gdk_display_manager_real_keyval_convert_case (GdkDisplayManager *manager,
guint symbol,
guint *lower,
guint *upper)
{
guint xlower = symbol;
guint xupper = symbol;
/* Check for directly encoded 24-bit UCS characters: */
if ((symbol & 0xff000000) == 0x01000000)
{
if (lower)
*lower = gdk_unicode_to_keyval (g_unichar_tolower (symbol & 0x00ffffff));
if (upper)
*upper = gdk_unicode_to_keyval (g_unichar_toupper (symbol & 0x00ffffff));
return;
}
switch (symbol >> 8)
{
case 0: /* Latin 1 */
if ((symbol >= GDK_KEY_A) && (symbol <= GDK_KEY_Z))
xlower += (GDK_KEY_a - GDK_KEY_A);
else if ((symbol >= GDK_KEY_a) && (symbol <= GDK_KEY_z))
xupper -= (GDK_KEY_a - GDK_KEY_A);
else if ((symbol >= GDK_KEY_Agrave) && (symbol <= GDK_KEY_Odiaeresis))
xlower += (GDK_KEY_agrave - GDK_KEY_Agrave);
else if ((symbol >= GDK_KEY_agrave) && (symbol <= GDK_KEY_odiaeresis))
xupper -= (GDK_KEY_agrave - GDK_KEY_Agrave);
else if ((symbol >= GDK_KEY_Ooblique) && (symbol <= GDK_KEY_Thorn))
xlower += (GDK_KEY_oslash - GDK_KEY_Ooblique);
else if ((symbol >= GDK_KEY_oslash) && (symbol <= GDK_KEY_thorn))
xupper -= (GDK_KEY_oslash - GDK_KEY_Ooblique);
break;
case 1: /* Latin 2 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol == GDK_KEY_Aogonek)
xlower = GDK_KEY_aogonek;
else if (symbol >= GDK_KEY_Lstroke && symbol <= GDK_KEY_Sacute)
xlower += (GDK_KEY_lstroke - GDK_KEY_Lstroke);
else if (symbol >= GDK_KEY_Scaron && symbol <= GDK_KEY_Zacute)
xlower += (GDK_KEY_scaron - GDK_KEY_Scaron);
else if (symbol >= GDK_KEY_Zcaron && symbol <= GDK_KEY_Zabovedot)
xlower += (GDK_KEY_zcaron - GDK_KEY_Zcaron);
else if (symbol == GDK_KEY_aogonek)
xupper = GDK_KEY_Aogonek;
else if (symbol >= GDK_KEY_lstroke && symbol <= GDK_KEY_sacute)
xupper -= (GDK_KEY_lstroke - GDK_KEY_Lstroke);
else if (symbol >= GDK_KEY_scaron && symbol <= GDK_KEY_zacute)
xupper -= (GDK_KEY_scaron - GDK_KEY_Scaron);
else if (symbol >= GDK_KEY_zcaron && symbol <= GDK_KEY_zabovedot)
xupper -= (GDK_KEY_zcaron - GDK_KEY_Zcaron);
else if (symbol >= GDK_KEY_Racute && symbol <= GDK_KEY_Tcedilla)
xlower += (GDK_KEY_racute - GDK_KEY_Racute);
else if (symbol >= GDK_KEY_racute && symbol <= GDK_KEY_tcedilla)
xupper -= (GDK_KEY_racute - GDK_KEY_Racute);
break;
case 2: /* Latin 3 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol >= GDK_KEY_Hstroke && symbol <= GDK_KEY_Hcircumflex)
xlower += (GDK_KEY_hstroke - GDK_KEY_Hstroke);
else if (symbol >= GDK_KEY_Gbreve && symbol <= GDK_KEY_Jcircumflex)
xlower += (GDK_KEY_gbreve - GDK_KEY_Gbreve);
else if (symbol >= GDK_KEY_hstroke && symbol <= GDK_KEY_hcircumflex)
xupper -= (GDK_KEY_hstroke - GDK_KEY_Hstroke);
else if (symbol >= GDK_KEY_gbreve && symbol <= GDK_KEY_jcircumflex)
xupper -= (GDK_KEY_gbreve - GDK_KEY_Gbreve);
else if (symbol >= GDK_KEY_Cabovedot && symbol <= GDK_KEY_Scircumflex)
xlower += (GDK_KEY_cabovedot - GDK_KEY_Cabovedot);
else if (symbol >= GDK_KEY_cabovedot && symbol <= GDK_KEY_scircumflex)
xupper -= (GDK_KEY_cabovedot - GDK_KEY_Cabovedot);
break;
case 3: /* Latin 4 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol >= GDK_KEY_Rcedilla && symbol <= GDK_KEY_Tslash)
xlower += (GDK_KEY_rcedilla - GDK_KEY_Rcedilla);
else if (symbol >= GDK_KEY_rcedilla && symbol <= GDK_KEY_tslash)
xupper -= (GDK_KEY_rcedilla - GDK_KEY_Rcedilla);
else if (symbol == GDK_KEY_ENG)
xlower = GDK_KEY_eng;
else if (symbol == GDK_KEY_eng)
xupper = GDK_KEY_ENG;
else if (symbol >= GDK_KEY_Amacron && symbol <= GDK_KEY_Umacron)
xlower += (GDK_KEY_amacron - GDK_KEY_Amacron);
else if (symbol >= GDK_KEY_amacron && symbol <= GDK_KEY_umacron)
xupper -= (GDK_KEY_amacron - GDK_KEY_Amacron);
break;
case 6: /* Cyrillic */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol >= GDK_KEY_Serbian_DJE && symbol <= GDK_KEY_Serbian_DZE)
xlower -= (GDK_KEY_Serbian_DJE - GDK_KEY_Serbian_dje);
else if (symbol >= GDK_KEY_Serbian_dje && symbol <= GDK_KEY_Serbian_dze)
xupper += (GDK_KEY_Serbian_DJE - GDK_KEY_Serbian_dje);
else if (symbol >= GDK_KEY_Cyrillic_YU && symbol <= GDK_KEY_Cyrillic_HARDSIGN)
xlower -= (GDK_KEY_Cyrillic_YU - GDK_KEY_Cyrillic_yu);
else if (symbol >= GDK_KEY_Cyrillic_yu && symbol <= GDK_KEY_Cyrillic_hardsign)
xupper += (GDK_KEY_Cyrillic_YU - GDK_KEY_Cyrillic_yu);
break;
case 7: /* Greek */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol >= GDK_KEY_Greek_ALPHAaccent && symbol <= GDK_KEY_Greek_OMEGAaccent)
xlower += (GDK_KEY_Greek_alphaaccent - GDK_KEY_Greek_ALPHAaccent);
else if (symbol >= GDK_KEY_Greek_alphaaccent && symbol <= GDK_KEY_Greek_omegaaccent &&
symbol != GDK_KEY_Greek_iotaaccentdieresis &&
symbol != GDK_KEY_Greek_upsilonaccentdieresis)
xupper -= (GDK_KEY_Greek_alphaaccent - GDK_KEY_Greek_ALPHAaccent);
else if (symbol >= GDK_KEY_Greek_ALPHA && symbol <= GDK_KEY_Greek_OMEGA)
xlower += (GDK_KEY_Greek_alpha - GDK_KEY_Greek_ALPHA);
else if (symbol >= GDK_KEY_Greek_alpha && symbol <= GDK_KEY_Greek_omega &&
symbol != GDK_KEY_Greek_finalsmallsigma)
xupper -= (GDK_KEY_Greek_alpha - GDK_KEY_Greek_ALPHA);
break;
}
if (lower)
*lower = xlower;
if (upper)
*upper = xupper;
}
+5
View File
@@ -75,6 +75,11 @@ struct _GdkKeymap
GdkDisplay *display;
};
void _gdk_display_manager_real_keyval_convert_case (GdkDisplayManager *manager,
guint symbol,
guint *lower,
guint *upper);
G_END_DECLS
#endif
+2 -3
View File
@@ -356,12 +356,11 @@ gdk_pango_context_get_for_screen (GdkScreen *screen)
PangoContext *context;
const cairo_font_options_t *options;
double dpi;
g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
fontmap = pango_cairo_font_map_get_default ();
context = pango_cairo_font_map_create_context (PANGO_CAIRO_FONT_MAP (fontmap));
context = pango_font_map_create_context (fontmap);
options = gdk_screen_get_font_options (screen);
pango_cairo_context_set_font_options (context, options);
+1 -1
View File
@@ -770,7 +770,7 @@ gdk_window_update_visibility (GdkWindow *window)
window->effective_visibility = new_visibility;
if (new_visibility != GDK_VISIBILITY_NOT_VIEWABLE &&
window->event_mask & GDK_VISIBILITY_NOTIFY)
window->event_mask & GDK_VISIBILITY_NOTIFY_MASK)
{
event = _gdk_make_event (window, GDK_VISIBILITY_NOTIFY,
NULL, FALSE);
+5
View File
@@ -165,6 +165,11 @@
window->width = content_rect.size.width;
window->height = content_rect.size.height;
/* Certain resize operations (e.g. going fullscreen), also move the
* origin of the window.
*/
_gdk_quartz_window_update_position (window);
[[self contentView] setFrame:NSMakeRect (0, 0, window->width, window->height)];
_gdk_window_update_size (window);
-5
View File
@@ -268,7 +268,6 @@ gdk_quartz_device_core_query_state (GdkDevice *device,
gint *win_y,
GdkModifierType *mask)
{
GdkDisplay *display;
GdkWindow *found_window;
NSPoint point;
gint x_tmp, y_tmp;
@@ -276,10 +275,6 @@ gdk_quartz_device_core_query_state (GdkDevice *device,
found_window = gdk_quartz_device_core_query_state_helper (window, device,
win_x, win_y,
mask);
if (!found_window)
return FALSE;
display = gdk_window_get_display (window);
if (root_window)
*root_window = _gdk_root;
-14
View File
@@ -91,19 +91,6 @@ gdk_quartz_display_manager_lookup_keyval (GdkDisplayManager *manager,
return _gdk_keyval_from_name (name);
}
static void
gdk_quartz_display_manager_keyval_convert_case (GdkDisplayManager *manager,
guint symbol,
guint *lower,
guint *upper)
{
/* FIXME implement this */
if (lower)
*lower = symbol;
if (upper)
*upper = symbol;
}
static void
gdk_quartz_display_manager_init (GdkQuartzDisplayManager *manager)
{
@@ -144,7 +131,6 @@ gdk_quartz_display_manager_class_init (GdkQuartzDisplayManagerClass *class)
manager_class->get_atom_name = _gdk_quartz_display_manager_get_atom_name;
manager_class->lookup_keyval = gdk_quartz_display_manager_lookup_keyval;
manager_class->get_keyval_name = gdk_quartz_display_manager_get_keyval_name;
manager_class->keyval_convert_case = gdk_quartz_display_manager_keyval_convert_case;
}
void
+35 -23
View File
@@ -124,7 +124,7 @@ static NSAutoreleasePool *autorelease_pool;
* a run loop iteration, so we need to detect that and avoid triggering
* our "run the GLib main looop while the run loop is active machinery.
*/
static gboolean getting_events;
static gint getting_events = 0;
/************************************************************
********* Select Thread *********
@@ -207,9 +207,12 @@ signal_main_thread (void)
*/
if (!run_loop_polling_async)
CFRunLoopSourceSignal (select_main_thread_source);
if (CFRunLoopIsWaiting (main_thread_run_loop))
CFRunLoopWakeUp (main_thread_run_loop);
/* Don't check for CFRunLoopIsWaiting() here because it causes a
* race condition (the loop could go into waiting state right after
* we checked).
*/
CFRunLoopWakeUp (main_thread_run_loop);
}
static void *
@@ -632,17 +635,18 @@ gdk_event_check (GSource *source)
GDK_THREADS_ENTER ();
/* Refresh the autorelease pool if we're at the base CFRunLoop level
* (indicated by current_loop_level) and the base g_main_loop level
* (indicated by g_main_depth()). Messing with the autorelease pool at
* any level of nesting can cause access to deallocated memory because
* autorelease_pool is static and releasing a pool will cause all
* pools allocated inside of it to be released as well.
*/
/* Refresh the autorelease pool if we're at the base CFRunLoop level
* (indicated by current_loop_level) and the base g_main_loop level
* (indicated by g_main_depth()). Messing with the autorelease pool at
* any level of nesting can cause access to deallocated memory because
* autorelease_pool is static and releasing a pool will cause all pools
* allocated inside of it to be released as well.
*/
if (current_loop_level == 0 && g_main_depth() == 0)
{
if (autorelease_pool)
[autorelease_pool release];
[autorelease_pool drain];
autorelease_pool = [[NSAutoreleasePool alloc] init];
}
@@ -710,12 +714,12 @@ poll_func (GPollFD *ufds,
else
limit_date = [NSDate dateWithTimeIntervalSinceNow:timeout_/1000.0];
getting_events = TRUE;
getting_events++;
event = [NSApp nextEventMatchingMask: NSAnyEventMask
untilDate: limit_date
inMode: NSDefaultRunLoopMode
dequeue: YES];
getting_events = FALSE;
getting_events--;
if (n_ready < 0)
n_ready = select_thread_collect_poll (ufds, nfds);
@@ -776,8 +780,6 @@ query_main_context (GMainContext *context,
static void
run_loop_entry (void)
{
current_loop_level++;
if (acquired_loop_level == -1)
{
if (g_main_context_acquire (NULL))
@@ -926,16 +928,13 @@ run_loop_after_waiting (void)
static void
run_loop_exit (void)
{
g_return_if_fail (current_loop_level > 0);
if (current_loop_level == acquired_loop_level)
/* + 1 because we decrement current_loop_level separately in observer_callback() */
if ((current_loop_level + 1) == acquired_loop_level)
{
g_main_context_release (NULL);
acquired_loop_level = -1;
GDK_NOTE (EVENTLOOP, g_print ("EventLoop: Ended tracking run loop activity\n"));
}
current_loop_level--;
}
static void
@@ -943,9 +942,22 @@ run_loop_observer_callback (CFRunLoopObserverRef observer,
CFRunLoopActivity activity,
void *info)
{
if (getting_events) /* Activity we triggered */
switch (activity)
{
case kCFRunLoopEntry:
current_loop_level++;
break;
case kCFRunLoopExit:
g_return_if_fail (current_loop_level > 0);
current_loop_level--;
break;
default:
break;
}
if (getting_events > 0) /* Activity we triggered */
return;
switch (activity)
{
case kCFRunLoopEntry:
+78 -56
View File
@@ -50,9 +50,6 @@
/* This is the window corresponding to the key window */
static GdkWindow *current_keyboard_window;
/* This is the event mask and button state from the last event */
static GdkModifierType current_keyboard_modifiers;
static GdkModifierType current_button_state;
static void append_event (GdkEvent *event,
gboolean windowing);
@@ -195,6 +192,25 @@ get_mouse_button_from_ns_event (NSEvent *event)
}
}
static GdkModifierType
get_mouse_button_modifiers_from_ns_buttons (NSUInteger nsbuttons)
{
GdkModifierType modifiers = 0;
if (nsbuttons & (1 << 0))
modifiers |= GDK_BUTTON1_MASK;
if (nsbuttons & (1 << 1))
modifiers |= GDK_BUTTON3_MASK;
if (nsbuttons & (1 << 2))
modifiers |= GDK_BUTTON2_MASK;
if (nsbuttons & (1 << 3))
modifiers |= GDK_BUTTON4_MASK;
if (nsbuttons & (1 << 4))
modifiers |= GDK_BUTTON5_MASK;
return modifiers;
}
static GdkModifierType
get_mouse_button_modifiers_from_ns_event (NSEvent *event)
{
@@ -210,13 +226,10 @@ get_mouse_button_modifiers_from_ns_event (NSEvent *event)
}
static GdkModifierType
get_keyboard_modifiers_from_ns_event (NSEvent *nsevent)
get_keyboard_modifiers_from_ns_flags (NSUInteger nsflags)
{
GdkModifierType modifiers = 0;
int nsflags;
nsflags = [nsevent modifierFlags];
if (nsflags & NSAlphaShiftKeyMask)
modifiers |= GDK_LOCK_MASK;
if (nsflags & NSShiftKeyMask)
@@ -231,6 +244,12 @@ get_keyboard_modifiers_from_ns_event (NSEvent *nsevent)
return modifiers;
}
static GdkModifierType
get_keyboard_modifiers_from_ns_event (NSEvent *nsevent)
{
return get_keyboard_modifiers_from_ns_flags ([nsevent modifierFlags]);
}
/* Return an event mask from an NSEvent */
static GdkEventMask
get_event_mask_from_ns_event (NSEvent *nsevent)
@@ -361,7 +380,8 @@ generate_motion_event (GdkWindow *window)
event->motion.x_root = x_root;
event->motion.y_root = y_root;
/* FIXME event->axes */
event->motion.state = 0;
event->motion.state = _gdk_quartz_events_get_current_keyboard_modifiers () |
_gdk_quartz_events_get_current_mouse_modifiers ();
event->motion.is_hint = FALSE;
event->motion.device = _gdk_display->core_pointer;
@@ -446,7 +466,8 @@ _gdk_quartz_events_send_enter_notify_event (GdkWindow *window)
event->crossing.y_root = y_root;
event->crossing.mode = GDK_CROSSING_NORMAL;
event->crossing.detail = GDK_NOTIFY_ANCESTOR;
event->crossing.state = 0;
event->crossing.state = _gdk_quartz_events_get_current_keyboard_modifiers () |
_gdk_quartz_events_get_current_mouse_modifiers ();
gdk_event_set_device (event, _gdk_display->core_pointer);
@@ -750,7 +771,8 @@ fill_crossing_event (GdkWindow *toplevel,
event->crossing.y_root = y_root;
event->crossing.mode = mode;
event->crossing.detail = detail;
event->crossing.state = get_keyboard_modifiers_from_ns_event (nsevent);
event->crossing.state = get_keyboard_modifiers_from_ns_event (nsevent) |
_gdk_quartz_events_get_current_mouse_modifiers ();
gdk_event_set_device (event, _gdk_display->core_pointer);
@@ -768,9 +790,9 @@ fill_button_event (GdkWindow *window,
{
GdkEventType type;
gint state;
gint button;
state = get_keyboard_modifiers_from_ns_event (nsevent);
state = get_keyboard_modifiers_from_ns_event (nsevent) |
_gdk_quartz_events_get_current_mouse_modifiers ();
switch ([nsevent type])
{
@@ -778,18 +800,19 @@ fill_button_event (GdkWindow *window,
case NSRightMouseDown:
case NSOtherMouseDown:
type = GDK_BUTTON_PRESS;
state &= ~get_mouse_button_modifiers_from_ns_event (nsevent);
break;
case NSLeftMouseUp:
case NSRightMouseUp:
case NSOtherMouseUp:
type = GDK_BUTTON_RELEASE;
state |= get_mouse_button_modifiers_from_ns_event (nsevent);
break;
default:
g_assert_not_reached ();
}
button = get_mouse_button_from_ns_event (nsevent);
event->any.type = type;
event->button.window = window;
@@ -800,7 +823,7 @@ fill_button_event (GdkWindow *window,
event->button.y_root = y_root;
/* FIXME event->axes */
event->button.state = state;
event->button.button = button;
event->button.button = get_mouse_button_from_ns_event (nsevent);
event->button.device = _gdk_display->core_pointer;
}
@@ -813,22 +836,6 @@ fill_motion_event (GdkWindow *window,
gint x_root,
gint y_root)
{
GdkModifierType state;
state = get_keyboard_modifiers_from_ns_event (nsevent);
switch ([nsevent type])
{
case NSLeftMouseDragged:
case NSRightMouseDragged:
case NSOtherMouseDragged:
state |= get_mouse_button_modifiers_from_ns_event (nsevent);
break;
case NSMouseMoved:
break;
}
event->any.type = GDK_MOTION_NOTIFY;
event->motion.window = window;
event->motion.time = get_time_from_ns_event (nsevent);
@@ -837,7 +844,8 @@ fill_motion_event (GdkWindow *window,
event->motion.x_root = x_root;
event->motion.y_root = y_root;
/* FIXME event->axes */
event->motion.state = state;
event->motion.state = get_keyboard_modifiers_from_ns_event (nsevent) |
_gdk_quartz_events_get_current_mouse_modifiers ();
event->motion.is_hint = FALSE;
event->motion.device = _gdk_display->core_pointer;
}
@@ -941,7 +949,14 @@ fill_key_event (GdkWindow *window,
event->key.state |= mask;
}
event->key.state |= current_button_state;
event->key.state |= _gdk_quartz_events_get_current_mouse_modifiers ();
/* The X11 backend adds the first virtual modifier MOD2..MOD5 are
* mapped to. Since we only have one virtual modifier in the quartz
* backend, calling the standard function will do.
*/
gdk_keymap_add_virtual_modifiers (gdk_keymap_get_for_display (_gdk_display),
&event->key.state);
event->key.string = NULL;
@@ -1041,13 +1056,41 @@ synthesize_crossing_event (GdkWindow *window,
GdkModifierType
_gdk_quartz_events_get_current_keyboard_modifiers (void)
{
return current_keyboard_modifiers;
if (gdk_quartz_osx_version () >= GDK_OSX_SNOW_LEOPARD)
{
return get_keyboard_modifiers_from_ns_flags ([NSClassFromString(@"NSEvent") modifierFlags]);
}
else
{
guint carbon_modifiers = GetCurrentKeyModifiers ();
GdkModifierType modifiers = 0;
if (carbon_modifiers & alphaLock)
modifiers |= GDK_LOCK_MASK;
if (carbon_modifiers & shiftKey)
modifiers |= GDK_SHIFT_MASK;
if (carbon_modifiers & controlKey)
modifiers |= GDK_CONTROL_MASK;
if (carbon_modifiers & optionKey)
modifiers |= GDK_MOD1_MASK;
if (carbon_modifiers & cmdKey)
modifiers |= GDK_MOD2_MASK;
return modifiers;
}
}
GdkModifierType
_gdk_quartz_events_get_current_mouse_modifiers (void)
{
return current_button_state;
if (gdk_quartz_osx_version () >= GDK_OSX_SNOW_LEOPARD)
{
return get_mouse_button_modifiers_from_ns_buttons ([NSClassFromString(@"NSEvent") pressedMouseButtons]);
}
else
{
return get_mouse_button_modifiers_from_ns_buttons (GetCurrentButtonState ());
}
}
/* Detect window resizing */
@@ -1134,25 +1177,6 @@ gdk_event_translate (GdkEvent *event,
return FALSE;
}
/* Keep track of button state, since we don't get that information
* for key events.
*/
switch (event_type)
{
case NSLeftMouseDown:
case NSRightMouseDown:
case NSOtherMouseDown:
current_button_state |= get_mouse_button_modifiers_from_ns_event (nsevent);
break;
case NSLeftMouseUp:
case NSRightMouseUp:
case NSOtherMouseUp:
current_button_state &= ~get_mouse_button_modifiers_from_ns_event (nsevent);
break;
default:
break;
}
if (_gdk_default_filters)
{
/* Apply global filters */
@@ -1240,8 +1264,6 @@ gdk_event_translate (GdkEvent *event,
}
}
current_keyboard_modifiers = get_keyboard_modifiers_from_ns_event (nsevent);
return_val = TRUE;
switch (event_type)
+57 -54
View File
@@ -136,7 +136,7 @@ const static struct {
guint keycode;
guint keyval;
unsigned int modmask; /* So we can tell when a mod key is pressed/released */
} known_keys[] = {
} modifier_keys[] = {
{ 54, GDK_KEY_Meta_R, NSCommandKeyMask },
{ 55, GDK_KEY_Meta_L, NSCommandKeyMask },
{ 56, GDK_KEY_Shift_L, NSShiftKeyMask },
@@ -145,23 +145,29 @@ const static struct {
{ 59, GDK_KEY_Control_L, NSControlKeyMask },
{ 60, GDK_KEY_Shift_R, NSShiftKeyMask },
{ 61, GDK_KEY_Alt_R, NSAlternateKeyMask },
{ 62, GDK_KEY_Control_R, NSControlKeyMask },
{ 122, GDK_KEY_F1, 0 },
{ 120, GDK_KEY_F2, 0 },
{ 99, GDK_KEY_F3, 0 },
{ 118, GDK_KEY_F4, 0 },
{ 96, GDK_KEY_F5, 0 },
{ 97, GDK_KEY_F6, 0 },
{ 98, GDK_KEY_F7, 0 },
{ 100, GDK_KEY_F8, 0 },
{ 101, GDK_KEY_F9, 0 },
{ 109, GDK_KEY_F10, 0 },
{ 103, GDK_KEY_F11, 0 },
{ 111, GDK_KEY_F12, 0 },
{ 105, GDK_KEY_F13, 0 },
{ 107, GDK_KEY_F14, 0 },
{ 113, GDK_KEY_F15, 0 },
{ 106, GDK_KEY_F16, 0 }
{ 62, GDK_KEY_Control_R, NSControlKeyMask }
};
const static struct {
guint keycode;
guint keyval;
} function_keys[] = {
{ 122, GDK_KEY_F1 },
{ 120, GDK_KEY_F2 },
{ 99, GDK_KEY_F3 },
{ 118, GDK_KEY_F4 },
{ 96, GDK_KEY_F5 },
{ 97, GDK_KEY_F6 },
{ 98, GDK_KEY_F7 },
{ 100, GDK_KEY_F8 },
{ 101, GDK_KEY_F9 },
{ 109, GDK_KEY_F10 },
{ 103, GDK_KEY_F11 },
{ 111, GDK_KEY_F12 },
{ 105, GDK_KEY_F13 },
{ 107, GDK_KEY_F14 },
{ 113, GDK_KEY_F15 },
{ 106, GDK_KEY_F16 }
};
const static struct {
@@ -359,18 +365,10 @@ maybe_update_keymap (void)
p[j] = GDK_KEY_ISO_Left_Tab;
if (!found)
{
guint tmp;
tmp = gdk_unicode_to_keyval (uc);
if (tmp != (uc | 0x01000000))
p[j] = tmp;
else
p[j] = 0;
}
p[j] = gdk_unicode_to_keyval (uc);
}
}
if (p[3] == p[2])
p[3] = 0;
if (p[2] == p[1])
@@ -412,7 +410,6 @@ maybe_update_keymap (void)
0,
&state, 4, &nChars, chars);
/* FIXME: Theoretically, we can get multiple UTF-16 values;
* we should convert them to proper unicode and figure
* out whether there are really keyboard layouts that
@@ -453,20 +450,12 @@ maybe_update_keymap (void)
*/
if (found && p[j] == GDK_KEY_Tab && modifiers[j] == shiftKey)
p[j] = GDK_KEY_ISO_Left_Tab;
if (!found)
{
guint tmp;
tmp = gdk_unicode_to_keyval (uc);
if (tmp != (uc | 0x01000000))
p[j] = tmp;
else
p[j] = 0;
}
p[j] = gdk_unicode_to_keyval (uc);
}
}
if (p[3] == p[2])
p[3] = 0;
if (p[2] == p[1])
@@ -486,13 +475,21 @@ maybe_update_keymap (void)
}
#endif
for (i = 0; i < G_N_ELEMENTS (known_keys); i++)
for (i = 0; i < G_N_ELEMENTS (modifier_keys); i++)
{
p = keyval_array + known_keys[i].keycode * KEYVALS_PER_KEYCODE;
p = keyval_array + modifier_keys[i].keycode * KEYVALS_PER_KEYCODE;
if (p[0] == 0 && p[1] == 0 &&
p[2] == 0 && p[3] == 0)
p[0] = known_keys[i].keyval;
p[0] = modifier_keys[i].keyval;
}
for (i = 0; i < G_N_ELEMENTS (function_keys); i++)
{
p = keyval_array + function_keys[i].keycode * KEYVALS_PER_KEYCODE;
p[0] = function_keys[i].keyval;
p[1] = p[2] = p[3] = 0;
}
for (i = 0; i < G_N_ELEMENTS (known_numeric_keys); i++)
@@ -708,12 +705,18 @@ gdk_quartz_keymap_translate_keyboard_state (GdkKeymap *keymap,
if (hardware_keycode < 0 || hardware_keycode >= NUM_KEYCODES)
return FALSE;
/* Check if shift or capslock modify the keyval */
for (bit = GDK_SHIFT_MASK; bit < GDK_CONTROL_MASK; bit <<= 1)
/* Check if modifiers modify the keyval */
for (bit = GDK_SHIFT_MASK; bit < GDK_BUTTON1_MASK; bit <<= 1)
{
if (translate_keysym (hardware_keycode, group, state & ~bit, NULL, NULL) !=
translate_keysym (hardware_keycode, group, state | bit, NULL, NULL))
if (translate_keysym (hardware_keycode,
(bit == GDK_MOD1_MASK) ? 0 : group,
state & ~bit,
NULL, NULL) !=
translate_keysym (hardware_keycode,
(bit == GDK_MOD1_MASK) ? 1 : group,
state | bit,
NULL, NULL))
tmp_modifiers |= bit;
}
@@ -773,11 +776,11 @@ _gdk_quartz_keys_event_type (NSEvent *event)
keycode = [event keyCode];
flags = [event modifierFlags];
for (i = 0; i < G_N_ELEMENTS (known_keys); i++)
for (i = 0; i < G_N_ELEMENTS (modifier_keys); i++)
{
if (known_keys[i].keycode == keycode)
if (modifier_keys[i].keycode == keycode)
{
if (flags & known_keys[i].modmask)
if (flags & modifier_keys[i].modmask)
return GDK_KEY_PRESS;
else
return GDK_KEY_RELEASE;
@@ -794,12 +797,12 @@ _gdk_quartz_keys_is_modifier (guint keycode)
{
gint i;
for (i = 0; i < G_N_ELEMENTS (known_keys); i++)
for (i = 0; i < G_N_ELEMENTS (modifier_keys); i++)
{
if (known_keys[i].modmask == 0)
if (modifier_keys[i].modmask == 0)
break;
if (known_keys[i].keycode == keycode)
if (modifier_keys[i].keycode == keycode)
return TRUE;
}
+22 -3
View File
@@ -1630,7 +1630,18 @@ gdk_window_quartz_restack_toplevel (GdkWindow *window,
GdkWindow *sibling,
gboolean above)
{
/* FIXME: Implement this */
GdkWindowImplQuartz *impl;
gint sibling_num;
impl = GDK_WINDOW_IMPL_QUARTZ (sibling->impl);
sibling_num = [impl->toplevel windowNumber];
impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);
if (above)
[impl->toplevel orderWindow:NSWindowAbove relativeTo:sibling_num];
else
[impl->toplevel orderWindow:NSWindowBelow relativeTo:sibling_num];
}
static void
@@ -2530,9 +2541,17 @@ gdk_quartz_window_get_frame_extents (GdkWindow *window,
rect->height = ns_rect.size.height;
}
/* Fake protocol to make gcc think that it's OK to call setStyleMask
even if it isn't. We check to make sure before actually calling
it. */
@protocol CanSetStyleMask
- (void)setStyleMask:(int)mask;
@end
static void
gdk_quartz_window_set_decorations (GdkWindow *window,
GdkWMDecoration decorations)
GdkWMDecoration decorations)
{
GdkWindowImplQuartz *impl;
NSUInteger old_mask, new_mask;
@@ -2589,7 +2608,7 @@ gdk_quartz_window_set_decorations (GdkWindow *window,
*/
if ([impl->toplevel respondsToSelector:@selector(setStyleMask:)])
{
[impl->toplevel setStyleMask:new_mask];
[(id<CanSetStyleMask>)impl->toplevel setStyleMask:new_mask];
}
else
{
-127
View File
@@ -138,132 +138,6 @@ gdk_wayland_display_manager_get_keyval_name (GdkDisplayManager *manager,
return buf;
}
static void
gdk_wayland_display_manager_keyval_convert_case (GdkDisplayManager *manager,
guint symbol,
guint *lower,
guint *upper)
{
guint xlower = symbol;
guint xupper = symbol;
/* Check for directly encoded 24-bit UCS characters: */
if ((symbol & 0xff000000) == 0x01000000)
{
if (lower)
*lower = gdk_unicode_to_keyval (g_unichar_tolower (symbol & 0x00ffffff));
if (upper)
*upper = gdk_unicode_to_keyval (g_unichar_toupper (symbol & 0x00ffffff));
return;
}
switch (symbol >> 8)
{
case 0: /* Latin 1 */
if ((symbol >= GDK_KEY_A) && (symbol <= GDK_KEY_Z))
xlower += (GDK_KEY_a - GDK_KEY_A);
else if ((symbol >= GDK_KEY_a) && (symbol <= GDK_KEY_z))
xupper -= (GDK_KEY_a - GDK_KEY_A);
else if ((symbol >= GDK_KEY_Agrave) && (symbol <= GDK_KEY_Odiaeresis))
xlower += (GDK_KEY_agrave - GDK_KEY_Agrave);
else if ((symbol >= GDK_KEY_agrave) && (symbol <= GDK_KEY_odiaeresis))
xupper -= (GDK_KEY_agrave - GDK_KEY_Agrave);
else if ((symbol >= GDK_KEY_Ooblique) && (symbol <= GDK_KEY_Thorn))
xlower += (GDK_KEY_oslash - GDK_KEY_Ooblique);
else if ((symbol >= GDK_KEY_oslash) && (symbol <= GDK_KEY_thorn))
xupper -= (GDK_KEY_oslash - GDK_KEY_Ooblique);
break;
case 1: /* Latin 2 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol == GDK_KEY_Aogonek)
xlower = GDK_KEY_aogonek;
else if (symbol >= GDK_KEY_Lstroke && symbol <= GDK_KEY_Sacute)
xlower += (GDK_KEY_lstroke - GDK_KEY_Lstroke);
else if (symbol >= GDK_KEY_Scaron && symbol <= GDK_KEY_Zacute)
xlower += (GDK_KEY_scaron - GDK_KEY_Scaron);
else if (symbol >= GDK_KEY_Zcaron && symbol <= GDK_KEY_Zabovedot)
xlower += (GDK_KEY_zcaron - GDK_KEY_Zcaron);
else if (symbol == GDK_KEY_aogonek)
xupper = GDK_KEY_Aogonek;
else if (symbol >= GDK_KEY_lstroke && symbol <= GDK_KEY_sacute)
xupper -= (GDK_KEY_lstroke - GDK_KEY_Lstroke);
else if (symbol >= GDK_KEY_scaron && symbol <= GDK_KEY_zacute)
xupper -= (GDK_KEY_scaron - GDK_KEY_Scaron);
else if (symbol >= GDK_KEY_zcaron && symbol <= GDK_KEY_zabovedot)
xupper -= (GDK_KEY_zcaron - GDK_KEY_Zcaron);
else if (symbol >= GDK_KEY_Racute && symbol <= GDK_KEY_Tcedilla)
xlower += (GDK_KEY_racute - GDK_KEY_Racute);
else if (symbol >= GDK_KEY_racute && symbol <= GDK_KEY_tcedilla)
xupper -= (GDK_KEY_racute - GDK_KEY_Racute);
break;
case 2: /* Latin 3 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol >= GDK_KEY_Hstroke && symbol <= GDK_KEY_Hcircumflex)
xlower += (GDK_KEY_hstroke - GDK_KEY_Hstroke);
else if (symbol >= GDK_KEY_Gbreve && symbol <= GDK_KEY_Jcircumflex)
xlower += (GDK_KEY_gbreve - GDK_KEY_Gbreve);
else if (symbol >= GDK_KEY_hstroke && symbol <= GDK_KEY_hcircumflex)
xupper -= (GDK_KEY_hstroke - GDK_KEY_Hstroke);
else if (symbol >= GDK_KEY_gbreve && symbol <= GDK_KEY_jcircumflex)
xupper -= (GDK_KEY_gbreve - GDK_KEY_Gbreve);
else if (symbol >= GDK_KEY_Cabovedot && symbol <= GDK_KEY_Scircumflex)
xlower += (GDK_KEY_cabovedot - GDK_KEY_Cabovedot);
else if (symbol >= GDK_KEY_cabovedot && symbol <= GDK_KEY_scircumflex)
xupper -= (GDK_KEY_cabovedot - GDK_KEY_Cabovedot);
break;
case 3: /* Latin 4 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol >= GDK_KEY_Rcedilla && symbol <= GDK_KEY_Tslash)
xlower += (GDK_KEY_rcedilla - GDK_KEY_Rcedilla);
else if (symbol >= GDK_KEY_rcedilla && symbol <= GDK_KEY_tslash)
xupper -= (GDK_KEY_rcedilla - GDK_KEY_Rcedilla);
else if (symbol == GDK_KEY_ENG)
xlower = GDK_KEY_eng;
else if (symbol == GDK_KEY_eng)
xupper = GDK_KEY_ENG;
else if (symbol >= GDK_KEY_Amacron && symbol <= GDK_KEY_Umacron)
xlower += (GDK_KEY_amacron - GDK_KEY_Amacron);
else if (symbol >= GDK_KEY_amacron && symbol <= GDK_KEY_umacron)
xupper -= (GDK_KEY_amacron - GDK_KEY_Amacron);
break;
case 6: /* Cyrillic */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol >= GDK_KEY_Serbian_DJE && symbol <= GDK_KEY_Serbian_DZE)
xlower -= (GDK_KEY_Serbian_DJE - GDK_KEY_Serbian_dje);
else if (symbol >= GDK_KEY_Serbian_dje && symbol <= GDK_KEY_Serbian_dze)
xupper += (GDK_KEY_Serbian_DJE - GDK_KEY_Serbian_dje);
else if (symbol >= GDK_KEY_Cyrillic_YU && symbol <= GDK_KEY_Cyrillic_HARDSIGN)
xlower -= (GDK_KEY_Cyrillic_YU - GDK_KEY_Cyrillic_yu);
else if (symbol >= GDK_KEY_Cyrillic_yu && symbol <= GDK_KEY_Cyrillic_hardsign)
xupper += (GDK_KEY_Cyrillic_YU - GDK_KEY_Cyrillic_yu);
break;
case 7: /* Greek */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol >= GDK_KEY_Greek_ALPHAaccent && symbol <= GDK_KEY_Greek_OMEGAaccent)
xlower += (GDK_KEY_Greek_alphaaccent - GDK_KEY_Greek_ALPHAaccent);
else if (symbol >= GDK_KEY_Greek_alphaaccent && symbol <= GDK_KEY_Greek_omegaaccent &&
symbol != GDK_KEY_Greek_iotaaccentdieresis &&
symbol != GDK_KEY_Greek_upsilonaccentdieresis)
xupper -= (GDK_KEY_Greek_alphaaccent - GDK_KEY_Greek_ALPHAaccent);
else if (symbol >= GDK_KEY_Greek_ALPHA && symbol <= GDK_KEY_Greek_OMEGA)
xlower += (GDK_KEY_Greek_alpha - GDK_KEY_Greek_ALPHA);
else if (symbol >= GDK_KEY_Greek_alpha && symbol <= GDK_KEY_Greek_omega &&
symbol != GDK_KEY_Greek_finalsmallsigma)
xupper -= (GDK_KEY_Greek_alpha - GDK_KEY_Greek_ALPHA);
break;
}
if (lower)
*lower = xlower;
if (upper)
*upper = xupper;
}
static void
gdk_wayland_display_manager_class_init (GdkWaylandDisplayManagerClass *class)
{
@@ -280,7 +154,6 @@ gdk_wayland_display_manager_class_init (GdkWaylandDisplayManagerClass *class)
manager_class->get_atom_name = gdk_wayland_display_manager_get_atom_name;
manager_class->lookup_keyval = gdk_wayland_display_manager_lookup_keyval;
manager_class->get_keyval_name = gdk_wayland_display_manager_get_keyval_name;
manager_class->keyval_convert_case = gdk_wayland_display_manager_keyval_convert_case;
}
static void
-14
View File
@@ -82,19 +82,6 @@ gdk_win32_display_manager_lookup_keyval (GdkDisplayManager *manager,
return _gdk_keyval_from_name (name);
}
static void
gdk_win32_display_manager_keyval_convert_case (GdkDisplayManager *manager,
guint symbol,
guint *lower,
guint *upper)
{
/* FIXME implement this */
if (lower)
*lower = symbol;
if (upper)
*upper = symbol;
}
static void
gdk_win32_display_manager_init (GdkWin32DisplayManager *manager)
{
@@ -131,5 +118,4 @@ gdk_win32_display_manager_class_init (GdkWin32DisplayManagerClass *class)
manager_class->get_atom_name = _gdk_win32_display_manager_get_atom_name;
manager_class->lookup_keyval = gdk_win32_display_manager_lookup_keyval;
manager_class->get_keyval_name = gdk_win32_display_manager_get_keyval_name;
manager_class->keyval_convert_case = gdk_win32_display_manager_keyval_convert_case;
}
+7 -13
View File
@@ -192,10 +192,12 @@ gdk_x11_device_xi2_get_state (GdkDevice *device,
display = gdk_device_get_display (device);
gdk_x11_display_error_trap_push (display);
info = XIQueryDevice (GDK_DISPLAY_XDISPLAY (display),
device_xi2->device_id, &ndevices);
gdk_x11_display_error_trap_pop_ignored (display);
for (i = 0, j = 0; i < info->num_classes; i++)
for (i = 0, j = 0; info && i < info->num_classes; i++)
{
XIAnyClassInfo *class_info = info->classes[i];
GdkAxisUse use;
@@ -234,7 +236,8 @@ gdk_x11_device_xi2_get_state (GdkDevice *device,
j++;
}
XIFreeDeviceInfo (info);
if (info)
XIFreeDeviceInfo (info);
}
if (mask)
@@ -698,7 +701,7 @@ _gdk_x11_device_xi2_translate_state (XIModifierState *mods_state,
guint state = 0;
if (mods_state)
state = (guint) mods_state->base | mods_state->latched | mods_state->locked;
state = mods_state->effective;
if (buttons_state)
{
@@ -736,16 +739,7 @@ _gdk_x11_device_xi2_translate_state (XIModifierState *mods_state,
}
if (group_state)
{
gint group;
group = group_state->base + group_state->latched + group_state->locked;
/* FIXME: do we need the XKB complications for this ? */
group = CLAMP(group, 0, 3);
state |= group << 13;
}
state |= (group_state->effective) << 13;
return state;
}
+4
View File
@@ -100,6 +100,8 @@ _gdk_x11_device_manager_new (GdkDisplay *display)
*
* Returns: (transfer none): (allow-none): The #GdkDevice wrapping the device ID,
* or %NULL if the given ID doesn't currently represent a device.
*
* Since: 3.2
**/
GdkDevice *
gdk_x11_device_manager_lookup (GdkDeviceManager *device_manager,
@@ -145,6 +147,8 @@ gdk_x11_device_manager_lookup (GdkDeviceManager *device_manager,
* </note>
*
* Returns: the XInput2 device ID.
*
* Since: 3.2
**/
gint
gdk_x11_device_get_id (GdkDevice *device)
+30 -11
View File
@@ -586,9 +586,14 @@ handle_hierarchy_changed (GdkX11DeviceManagerXI2 *device_manager,
{
if (ev->info[i].flags & XIDeviceEnabled)
{
gdk_x11_display_error_trap_push (display);
info = XIQueryDevice (xdisplay, ev->info[i].deviceid, &ndevices);
add_device (device_manager, &info[0], TRUE);
XIFreeDeviceInfo (info);
gdk_x11_display_error_trap_pop_ignored (display);
if (info)
{
add_device (device_manager, &info[0], TRUE);
XIFreeDeviceInfo (info);
}
}
else if (ev->info[i].flags & XIDeviceDisabled)
remove_device (device_manager, ev->info[i].deviceid);
@@ -600,6 +605,9 @@ handle_hierarchy_changed (GdkX11DeviceManagerXI2 *device_manager,
slave = g_hash_table_lookup (device_manager->id_table,
GINT_TO_POINTER (ev->info[i].deviceid));
if (!slave)
continue;
/* Remove old master info */
master = gdk_device_get_associated_device (slave);
@@ -614,15 +622,23 @@ handle_hierarchy_changed (GdkX11DeviceManagerXI2 *device_manager,
/* Add new master if it's an attachment event */
if (ev->info[i].flags & XISlaveAttached)
{
gdk_x11_display_error_trap_push (display);
info = XIQueryDevice (xdisplay, ev->info[i].deviceid, &ndevices);
gdk_x11_display_error_trap_pop_ignored (display);
if (info)
{
master = g_hash_table_lookup (device_manager->id_table,
GINT_TO_POINTER (info->attachment));
XIFreeDeviceInfo (info);
}
master = g_hash_table_lookup (device_manager->id_table,
GINT_TO_POINTER (info->attachment));
if (master)
{
_gdk_device_set_associated_device (slave, master);
_gdk_device_add_slave (master, slave);
_gdk_device_set_associated_device (slave, master);
_gdk_device_add_slave (master, slave);
g_signal_emit_by_name (device_manager, "device-changed", master);
g_signal_emit_by_name (device_manager, "device-changed", master);
}
}
g_signal_emit_by_name (device_manager, "device-changed", slave);
@@ -641,10 +657,13 @@ handle_device_changed (GdkX11DeviceManagerXI2 *device_manager,
device = g_hash_table_lookup (device_manager->id_table,
GUINT_TO_POINTER (ev->deviceid));
_gdk_device_reset_axes (device);
translate_device_classes (display, device, ev->classes, ev->num_classes);
if (device)
{
_gdk_device_reset_axes (device);
translate_device_classes (display, device, ev->classes, ev->num_classes);
g_signal_emit_by_name (G_OBJECT (device), "changed");
g_signal_emit_by_name (G_OBJECT (device), "changed");
}
}
static GdkCrossingMode
+39 -14
View File
@@ -240,6 +240,21 @@ do_net_wm_state_changes (GdkWindow *window)
0,
GDK_WINDOW_STATE_MAXIMIZED);
}
if (old_state & GDK_WINDOW_STATE_ICONIFIED)
{
if (!toplevel->have_hidden)
gdk_synthesize_window_state (window,
GDK_WINDOW_STATE_ICONIFIED,
0);
}
else
{
if (toplevel->have_hidden)
gdk_synthesize_window_state (window,
0,
GDK_WINDOW_STATE_ICONIFIED);
}
}
static void
@@ -297,6 +312,7 @@ gdk_check_wm_state_changed (GdkWindow *window)
toplevel->have_maxvert = FALSE;
toplevel->have_maxhorz = FALSE;
toplevel->have_fullscreen = FALSE;
toplevel->have_hidden = FALSE;
type = None;
gdk_x11_display_error_trap_push (display);
@@ -312,6 +328,7 @@ gdk_check_wm_state_changed (GdkWindow *window)
Atom maxvert_atom = gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_STATE_MAXIMIZED_VERT");
Atom maxhorz_atom = gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_STATE_MAXIMIZED_HORZ");
Atom fullscreen_atom = gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_STATE_FULLSCREEN");
Atom hidden_atom = gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_STATE_HIDDEN");
atoms = (Atom *)data;
@@ -326,6 +343,8 @@ gdk_check_wm_state_changed (GdkWindow *window)
toplevel->have_maxhorz = TRUE;
else if (atoms[i] == fullscreen_atom)
toplevel->have_fullscreen = TRUE;
else if (atoms[i] == hidden_atom)
toplevel->have_hidden = TRUE;
++i;
}
@@ -385,7 +404,6 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
GdkToplevelX11 *toplevel = NULL;
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
gboolean return_val;
Window xwindow = None;
/* Find the GdkWindow that this event relates to.
* Basically this means substructure events
@@ -405,7 +423,6 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
x11_screen = GDK_X11_SCREEN (screen);
toplevel = _gdk_x11_window_get_toplevel (window);
window_impl = GDK_WINDOW_IMPL_X11 (window->impl);
xwindow = GDK_WINDOW_XID (window);
g_object_ref (window);
}
@@ -432,7 +449,7 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
screen = gdk_display_get_screen (display, i);
x11_screen = GDK_X11_SCREEN (screen);
if (x11_screen->wmspec_check_window == xwindow)
if (x11_screen->wmspec_check_window == xevent->xdestroywindow.window)
{
x11_screen->wmspec_check_window = None;
x11_screen->last_wmspec_check_time = 0;
@@ -608,19 +625,27 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
event->any.type = GDK_UNMAP;
event->any.window = window;
/* If we are shown (not withdrawn) and get an unmap, it means we
* were iconified in the X sense. If we are withdrawn, and get
* an unmap, it means we hid the window ourselves, so we
* will have already flipped the iconified bit off.
/* If the WM supports the _NET_WM_STATE_HIDDEN hint, we do not want to
* interpret UnmapNotify events as implying iconic state.
* http://bugzilla.gnome.org/show_bug.cgi?id=590726.
*/
if (window)
if (screen &&
!gdk_x11_screen_supports_net_wm_hint (screen,
gdk_atom_intern_static_string ("_NET_WM_STATE_HIDDEN")))
{
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 we are shown (not withdrawn) and get an unmap, it means we were
* iconified in the X sense. If we are withdrawn, and get an unmap, it
* 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);
}
}
break;
+2
View File
@@ -110,7 +110,9 @@ gdk_x11_display_manager_class_init (GdkX11DisplayManagerClass *class)
manager_class->get_atom_name = _gdk_x11_display_manager_get_atom_name;
manager_class->lookup_keyval = _gdk_x11_display_manager_lookup_keyval;
manager_class->get_keyval_name = _gdk_x11_display_manager_get_keyval_name;
#ifdef HAVE_XCONVERTCASE
manager_class->keyval_convert_case = _gdk_x11_display_manager_keyval_convert_case;
#endif
}
void
+9 -4
View File
@@ -662,11 +662,16 @@ is_pointer_within_shape (GdkDisplay *display,
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
cairo_region_t *input_shape;
child->shape = _gdk_x11_xwindow_get_shape (display_x11->xdisplay,
child->xid, ShapeBounding);
child->shape = NULL;
if (gdk_display_supports_shapes (display))
child->shape = _gdk_x11_xwindow_get_shape (display_x11->xdisplay,
child->xid, ShapeBounding);
#ifdef ShapeInput
input_shape = _gdk_x11_xwindow_get_shape (display_x11->xdisplay,
child->xid, ShapeInput);
input_shape = NULL;
if (gdk_display_supports_input_shapes (display))
input_shape = _gdk_x11_xwindow_get_shape (display_x11->xdisplay,
child->xid, ShapeInput);
if (child->shape && input_shape)
{
cairo_region_intersect (child->shape, input_shape);
+14 -135
View File
@@ -1457,133 +1457,7 @@ _gdk_x11_display_manager_keyval_convert_case (GdkDisplayManager *manager,
if (upper)
*upper = xupper;
}
#else /* !HAVE_XCONVERTCASE */
void
_gdk_x11_display_manager_keyval_convert_case (GdkDisplayManager *manager,
guint symbol,
guint *lower,
guint *upper)
{
guint xlower = symbol;
guint xupper = symbol;
/* Check for directly encoded 24-bit UCS characters: */
if ((symbol & 0xff000000) == 0x01000000)
{
if (lower)
*lower = gdk_unicode_to_keyval (g_unichar_tolower (symbol & 0x00ffffff));
if (upper)
*upper = gdk_unicode_to_keyval (g_unichar_toupper (symbol & 0x00ffffff));
return;
}
switch (symbol >> 8)
{
case 0: /* Latin 1 */
if ((symbol >= GDK_KEY_A) && (symbol <= GDK_KEY_Z))
xlower += (GDK_KEY_a - GDK_KEY_A);
else if ((symbol >= GDK_KEY_a) && (symbol <= GDK_KEY_z))
xupper -= (GDK_KEY_a - GDK_KEY_A);
else if ((symbol >= GDK_KEY_Agrave) && (symbol <= GDK_KEY_Odiaeresis))
xlower += (GDK_KEY_agrave - GDK_KEY_Agrave);
else if ((symbol >= GDK_KEY_agrave) && (symbol <= GDK_KEY_odiaeresis))
xupper -= (GDK_KEY_agrave - GDK_KEY_Agrave);
else if ((symbol >= GDK_KEY_Ooblique) && (symbol <= GDK_KEY_Thorn))
xlower += (GDK_KEY_oslash - GDK_KEY_Ooblique);
else if ((symbol >= GDK_KEY_oslash) && (symbol <= GDK_KEY_thorn))
xupper -= (GDK_KEY_oslash - GDK_KEY_Ooblique);
break;
case 1: /* Latin 2 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol == GDK_KEY_Aogonek)
xlower = GDK_KEY_aogonek;
else if (symbol >= GDK_KEY_Lstroke && symbol <= GDK_KEY_Sacute)
xlower += (GDK_KEY_lstroke - GDK_KEY_Lstroke);
else if (symbol >= GDK_KEY_Scaron && symbol <= GDK_KEY_Zacute)
xlower += (GDK_KEY_scaron - GDK_KEY_Scaron);
else if (symbol >= GDK_KEY_Zcaron && symbol <= GDK_KEY_Zabovedot)
xlower += (GDK_KEY_zcaron - GDK_KEY_Zcaron);
else if (symbol == GDK_KEY_aogonek)
xupper = GDK_KEY_Aogonek;
else if (symbol >= GDK_KEY_lstroke && symbol <= GDK_KEY_sacute)
xupper -= (GDK_KEY_lstroke - GDK_KEY_Lstroke);
else if (symbol >= GDK_KEY_scaron && symbol <= GDK_KEY_zacute)
xupper -= (GDK_KEY_scaron - GDK_KEY_Scaron);
else if (symbol >= GDK_KEY_zcaron && symbol <= GDK_KEY_zabovedot)
xupper -= (GDK_KEY_zcaron - GDK_KEY_Zcaron);
else if (symbol >= GDK_KEY_Racute && symbol <= GDK_KEY_Tcedilla)
xlower += (GDK_KEY_racute - GDK_KEY_Racute);
else if (symbol >= GDK_KEY_racute && symbol <= GDK_KEY_tcedilla)
xupper -= (GDK_KEY_racute - GDK_KEY_Racute);
break;
case 2: /* Latin 3 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol >= GDK_KEY_Hstroke && symbol <= GDK_KEY_Hcircumflex)
xlower += (GDK_KEY_hstroke - GDK_KEY_Hstroke);
else if (symbol >= GDK_KEY_Gbreve && symbol <= GDK_KEY_Jcircumflex)
xlower += (GDK_KEY_gbreve - GDK_KEY_Gbreve);
else if (symbol >= GDK_KEY_hstroke && symbol <= GDK_KEY_hcircumflex)
xupper -= (GDK_KEY_hstroke - GDK_KEY_Hstroke);
else if (symbol >= GDK_KEY_gbreve && symbol <= GDK_KEY_jcircumflex)
xupper -= (GDK_KEY_gbreve - GDK_KEY_Gbreve);
else if (symbol >= GDK_KEY_Cabovedot && symbol <= GDK_KEY_Scircumflex)
xlower += (GDK_KEY_cabovedot - GDK_KEY_Cabovedot);
else if (symbol >= GDK_KEY_cabovedot && symbol <= GDK_KEY_scircumflex)
xupper -= (GDK_KEY_cabovedot - GDK_KEY_Cabovedot);
break;
case 3: /* Latin 4 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol >= GDK_KEY_Rcedilla && symbol <= GDK_KEY_Tslash)
xlower += (GDK_KEY_rcedilla - GDK_KEY_Rcedilla);
else if (symbol >= GDK_KEY_rcedilla && symbol <= GDK_KEY_tslash)
xupper -= (GDK_KEY_rcedilla - GDK_KEY_Rcedilla);
else if (symbol == GDK_KEY_ENG)
xlower = GDK_KEY_eng;
else if (symbol == GDK_KEY_eng)
xupper = GDK_KEY_ENG;
else if (symbol >= GDK_KEY_Amacron && symbol <= GDK_KEY_Umacron)
xlower += (GDK_KEY_amacron - GDK_KEY_Amacron);
else if (symbol >= GDK_KEY_amacron && symbol <= GDK_KEY_umacron)
xupper -= (GDK_KEY_amacron - GDK_KEY_Amacron);
break;
case 6: /* Cyrillic */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol >= GDK_KEY_Serbian_DJE && symbol <= GDK_KEY_Serbian_DZE)
xlower -= (GDK_KEY_Serbian_DJE - GDK_KEY_Serbian_dje);
else if (symbol >= GDK_KEY_Serbian_dje && symbol <= GDK_KEY_Serbian_dze)
xupper += (GDK_KEY_Serbian_DJE - GDK_KEY_Serbian_dje);
else if (symbol >= GDK_KEY_Cyrillic_YU && symbol <= GDK_KEY_Cyrillic_HARDSIGN)
xlower -= (GDK_KEY_Cyrillic_YU - GDK_KEY_Cyrillic_yu);
else if (symbol >= GDK_KEY_Cyrillic_yu && symbol <= GDK_KEY_Cyrillic_hardsign)
xupper += (GDK_KEY_Cyrillic_YU - GDK_KEY_Cyrillic_yu);
break;
case 7: /* Greek */
/* Assume the KeySym is a legal value (ignore discontinuities) */
if (symbol >= GDK_KEY_Greek_ALPHAaccent && symbol <= GDK_KEY_Greek_OMEGAaccent)
xlower += (GDK_KEY_Greek_alphaaccent - GDK_KEY_Greek_ALPHAaccent);
else if (symbol >= GDK_KEY_Greek_alphaaccent && symbol <= GDK_KEY_Greek_omegaaccent &&
symbol != GDK_KEY_Greek_iotaaccentdieresis &&
symbol != GDK_KEY_Greek_upsilonaccentdieresis)
xupper -= (GDK_KEY_Greek_alphaaccent - GDK_KEY_Greek_ALPHAaccent);
else if (symbol >= GDK_KEY_Greek_ALPHA && symbol <= GDK_KEY_Greek_OMEGA)
xlower += (GDK_KEY_Greek_alpha - GDK_KEY_Greek_ALPHA);
else if (symbol >= GDK_KEY_Greek_alpha && symbol <= GDK_KEY_Greek_omega &&
symbol != GDK_KEY_Greek_finalsmallsigma)
xupper -= (GDK_KEY_Greek_alpha - GDK_KEY_Greek_ALPHA);
break;
}
if (lower)
*lower = xlower;
if (upper)
*upper = xupper;
}
#endif
#endif /* HAVE_XCONVERTCASE */
gint
_gdk_x11_get_group_for_state (GdkDisplay *display,
@@ -1615,13 +1489,12 @@ _gdk_x11_keymap_add_virt_mods (GdkKeymap *keymap,
keymap = GET_EFFECTIVE_KEYMAP (keymap);
keymap_x11 = GDK_X11_KEYMAP (keymap);
for (i = 3; i < 8; i++)
/* See comment in add_virtual_modifiers() */
for (i = 4; i < 8; i++)
{
if ((1 << i) & *modifiers)
{
if (keymap_x11->modmap[i] & GDK_MOD1_MASK)
*modifiers |= GDK_MOD1_MASK;
else if (keymap_x11->modmap[i] & GDK_SUPER_MASK)
if (keymap_x11->modmap[i] & GDK_SUPER_MASK)
*modifiers |= GDK_SUPER_MASK;
else if (keymap_x11->modmap[i] & GDK_HYPER_MASK)
*modifiers |= GDK_HYPER_MASK;
@@ -1641,12 +1514,16 @@ gdk_x11_keymap_add_virtual_modifiers (GdkKeymap *keymap,
keymap = GET_EFFECTIVE_KEYMAP (keymap);
keymap_x11 = GDK_X11_KEYMAP (keymap);
for (i = 3; i < 8; i++)
/* This loop used to start at 3, which included MOD1 in the
* virtual mapping. However, all of GTK+ treats MOD1 as a
* synonym for Alt, and does not expect it to be mapped around,
* therefore it's more sane to simply treat MOD1 like SHIFT and
* CONTROL, which are not mappable either.
*/
for (i = 4; i < 8; i++)
{
if ((1 << i) & *state)
{
if (keymap_x11->modmap[i] & GDK_MOD1_MASK)
*state |= GDK_MOD1_MASK;
if (keymap_x11->modmap[i] & GDK_SUPER_MASK)
*state |= GDK_SUPER_MASK;
if (keymap_x11->modmap[i] & GDK_HYPER_MASK)
@@ -1667,6 +1544,7 @@ _gdk_x11_keymap_key_is_modifier (GdkKeymap *keymap,
keymap = GET_EFFECTIVE_KEYMAP (keymap);
keymap_x11 = GDK_X11_KEYMAP (keymap);
update_keyrange (keymap_x11);
if (keycode < keymap_x11->min_keycode ||
keycode > keymap_x11->max_keycode)
return FALSE;
@@ -1715,7 +1593,8 @@ gdk_x11_keymap_map_virtual_modifiers (GdkKeymap *keymap,
{
if (*state & vmods[j])
{
for (i = 3; i < 8; i++)
/* See comment in add_virtual_modifiers() */
for (i = 4; i < 8; i++)
{
if (keymap_x11->modmap[i] & vmods[j])
{
+2
View File
@@ -275,10 +275,12 @@ guint _gdk_x11_display_manager_lookup_keyval (GdkDisplayManager *manager,
const gchar *name);
gchar * _gdk_x11_display_manager_get_keyval_name (GdkDisplayManager *manager,
guint keyval);
#ifdef HAVE_XCONVERTCASE
void _gdk_x11_display_manager_keyval_convert_case (GdkDisplayManager *manager,
guint symbol,
guint *lower,
guint *upper);
#endif
GdkCursor *_gdk_x11_display_get_cursor_for_type (GdkDisplay *display,
GdkCursorType type);
+53 -36
View File
@@ -1202,17 +1202,45 @@ cleanup_atoms(gpointer data)
g_free (supported_atoms);
}
static void
fetch_net_wm_check_window (GdkScreen *screen)
static Window
get_net_supporting_wm_check (GdkX11Screen *screen,
Window window)
{
GdkX11Screen *x11_screen;
GdkDisplay *display;
Atom type;
gint format;
gulong n_items;
gulong bytes_after;
guchar *data;
Window *xwindow;
Window value;
display = screen->display;
type = None;
data = NULL;
value = None;
gdk_x11_display_error_trap_push (display);
XGetWindowProperty (screen->xdisplay, window,
gdk_x11_get_xatom_by_name_for_display (display, "_NET_SUPPORTING_WM_CHECK"),
0, G_MAXLONG, False, XA_WINDOW, &type, &format,
&n_items, &bytes_after, &data);
gdk_x11_display_error_trap_pop_ignored (display);
if (type == XA_WINDOW)
value = *(Window *)data;
if (data)
XFree (data);
return value;
}
static void
fetch_net_wm_check_window (GdkScreen *screen)
{
GdkX11Screen *x11_screen;
GdkDisplay *display;
Window window;
GTimeVal tv;
gint error;
@@ -1220,57 +1248,46 @@ fetch_net_wm_check_window (GdkScreen *screen)
display = x11_screen->display;
g_return_if_fail (GDK_X11_DISPLAY (display)->trusted_client);
if (x11_screen->wmspec_check_window != None)
return; /* already have it */
g_get_current_time (&tv);
if (ABS (tv.tv_sec - x11_screen->last_wmspec_check_time) < 15)
return; /* we've checked recently */
x11_screen->last_wmspec_check_time = tv.tv_sec;
window = get_net_supporting_wm_check (x11_screen, x11_screen->xroot_window);
if (window == None)
return;
data = NULL;
XGetWindowProperty (x11_screen->xdisplay, x11_screen->xroot_window,
gdk_x11_get_xatom_by_name_for_display (display, "_NET_SUPPORTING_WM_CHECK"),
0, G_MAXLONG, False, XA_WINDOW, &type, &format,
&n_items, &bytes_after, &data);
if (type != XA_WINDOW)
{
if (data)
XFree (data);
return;
}
xwindow = (Window *)data;
if (x11_screen->wmspec_check_window == *xwindow)
{
XFree (xwindow);
return;
}
if (window != get_net_supporting_wm_check (x11_screen, window))
return;
gdk_x11_display_error_trap_push (display);
/* Find out if this WM goes away, so we can reset everything. */
XSelectInput (x11_screen->xdisplay, *xwindow, StructureNotifyMask);
XSelectInput (x11_screen->xdisplay, window, StructureNotifyMask);
error = gdk_x11_display_error_trap_pop (display);
if (!error)
{
x11_screen->wmspec_check_window = *xwindow;
/* We check the window property again because after XGetWindowProperty()
* and before XSelectInput() the window may have been recycled in such a
* way that XSelectInput() doesn't fail but the window is no longer what
* we want.
*/
if (window != get_net_supporting_wm_check (x11_screen, window))
return;
x11_screen->wmspec_check_window = window;
x11_screen->last_wmspec_check_time = tv.tv_sec;
x11_screen->need_refetch_net_supported = TRUE;
x11_screen->need_refetch_wm_name = TRUE;
/* Careful, reentrancy */
_gdk_x11_screen_window_manager_changed (GDK_SCREEN (x11_screen));
_gdk_x11_screen_window_manager_changed (screen);
}
else if (error == BadWindow)
{
/* Leftover property, try again immediately, new wm may be starting up */
x11_screen->last_wmspec_check_time = 0;
}
XFree (xwindow);
}
/**
+59 -8
View File
@@ -1272,6 +1272,14 @@ set_initial_hints (GdkWindow *window)
++i;
}
if (window->state & GDK_WINDOW_STATE_ICONIFIED)
{
atoms[i] = gdk_x11_get_xatom_by_name_for_display (display,
"_NET_WM_STATE_HIDDEN");
++i;
toplevel->have_hidden = TRUE;
}
if (i > 0)
{
XChangeProperty (xdisplay,
@@ -3407,6 +3415,9 @@ gdk_x11_window_iconify (GdkWindow *window)
gdk_synthesize_window_state (window,
0,
GDK_WINDOW_STATE_ICONIFIED);
gdk_wmspec_change_state (TRUE, window,
gdk_atom_intern_static_string ("_NET_WM_STATE_HIDDEN"),
GDK_NONE);
}
}
@@ -3420,6 +3431,9 @@ gdk_x11_window_deiconify (GdkWindow *window)
if (GDK_WINDOW_IS_MAPPED (window))
{
gdk_window_show (window);
gdk_wmspec_change_state (FALSE, window,
gdk_atom_intern_static_string ("_NET_WM_STATE_HIDDEN"),
GDK_NONE);
}
else
{
@@ -3427,6 +3441,9 @@ gdk_x11_window_deiconify (GdkWindow *window)
gdk_synthesize_window_state (window,
GDK_WINDOW_STATE_ICONIFIED,
0);
gdk_wmspec_change_state (FALSE, window,
gdk_atom_intern_static_string ("_NET_WM_STATE_HIDDEN"),
GDK_NONE);
}
}
@@ -3829,17 +3846,24 @@ _gdk_x11_xwindow_get_shape (Display *xdisplay,
shape = NULL;
rn = 0;
xrl = XShapeGetRectangles (xdisplay,
window,
shape_type, &rn, &ord);
/* Note that XShapeGetRectangles returns NULL in two situations:
* - the server doesn't support the SHAPE extension
* - the shape is empty
*
* Since we can't discriminate these here, we always return
* an empty shape. It is the callers responsibility to check
* whether the server supports the SHAPE extensions beforehand.
*/
xrl = XShapeGetRectangles (xdisplay, window, shape_type, &rn, &ord);
if (xrl == NULL || rn == 0)
if (rn == 0)
return cairo_region_create (); /* Empty */
if (ord != YXBanded)
{
/* This really shouldn't happen with any xserver, as they
generally convert regions to YXBanded internally */
* generally convert regions to YXBanded internally
*/
g_warning ("non YXBanded shape masks not supported");
XFree (xrl);
return NULL;
@@ -3854,10 +3878,10 @@ _gdk_x11_xwindow_get_shape (Display *xdisplay,
rl[i].height = xrl[i].height;
}
XFree (xrl);
shape = cairo_region_create_rectangles (rl, rn);
g_free (rl);
return shape;
}
@@ -3879,7 +3903,7 @@ gdk_x11_window_get_input_shape (GdkWindow *window)
{
#if defined(ShapeInput)
if (!GDK_WINDOW_DESTROYED (window) &&
gdk_display_supports_shapes (GDK_WINDOW_DISPLAY (window)))
gdk_display_supports_input_shapes (GDK_WINDOW_DISPLAY (window)))
return _gdk_x11_xwindow_get_shape (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window),
ShapeInput);
@@ -4293,6 +4317,33 @@ _gdk_x11_moveresize_handle_event (XEvent *event)
if (event->xbutton.button == mv_resize->moveresize_button)
finish_drag (mv_resize);
break;
#ifdef HAVE_XGENERICEVENTS
case GenericEvent:
{
/* we just assume this is an XI2 event */
XIEvent *ev = (XIEvent *) event->xcookie.data;
XIDeviceEvent *xev = (XIDeviceEvent *)ev;
gint state;
switch (ev->evtype)
{
case XI_Motion:
update_pos (mv_resize, xev->root_x, xev->root_y);
state = _gdk_x11_device_xi2_translate_state (&xev->mods, &xev->buttons, &xev->group);
if ((state & button_mask) == 0)
finish_drag (mv_resize);
break;
case XI_ButtonRelease:
update_pos (mv_resize, xev->root_x, xev->root_y);
if (xev->detail == mv_resize->moveresize_button)
finish_drag (mv_resize);
break;
}
}
break;
#endif
}
return TRUE;
}
+1
View File
@@ -121,6 +121,7 @@ struct _GdkToplevelX11
guint have_maxvert : 1; /* _NET_WM_STATE_MAXIMIZED_VERT */
guint have_maxhorz : 1; /* _NET_WM_STATE_MAXIMIZED_HORZ */
guint have_fullscreen : 1; /* _NET_WM_STATE_FULLSCREEN */
guint have_hidden : 1; /* _NET_WM_STATE_HIDDEN */
guint is_leader : 1;
+3 -7
View File
@@ -54,7 +54,6 @@ AM_CPPFLAGS = \
-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED \
$(GTK_DEBUG_FLAGS) \
$(GTK_DEP_CFLAGS) \
$(gtk_clipboard_dnd_c_sources_CFLAGS) \
$(INCLUDED_IMMODULE_DEFINE)
if PLATFORM_WIN32
@@ -792,7 +791,8 @@ if USE_QUARTZ
gtk_private_h_sources += \
gtksearchenginequartz.h
gtk_c_sources += $(gtk_use_quartz_c_sources)
gtk_use_quartz_c_sources_CFLAGS = "-xobjective-c"
libgtk_3_la_CFLAGS = "-xobjective-c"
else
gtk_c_sources += $(gtk_use_stub_c_sources)
endif
@@ -805,12 +805,8 @@ gtk_clipboard_dnd_c_sources = \
gtkdnd-quartz.c \
gtkquartz.c
gtk_clipboard_dnd_h_sources = gtkquartz.h
gtk_clipboard_dnd_c_sources_CFLAGS = "-xobjective-c"
else
gtk_clipboard_dnd_c_sources = \
gtkclipboard.c \
gtkdnd.c
gtk_clipboard_dnd_c_sources_CFLAGS =
gtk_clipboard_dnd_c_sources = gtkclipboard.c gtkdnd.c
endif
EXTRA_DIST += gtkquartz.h
+16 -11
View File
@@ -206,6 +206,15 @@ vadjustment_set_cb (GObject *widget,
G_CALLBACK (adjustment_changed), widget);
}
static void
cell_info_free (GtkTreeViewAccessibleCellInfo *cell_info)
{
/* g_object_unref (cell_info->cell); */
if (cell_info->cell_row_ref)
gtk_tree_row_reference_free (cell_info->cell_row_ref);
g_free (cell_info);
}
static void
gtk_tree_view_accessible_initialize (AtkObject *obj,
gpointer data)
@@ -228,7 +237,8 @@ gtk_tree_view_accessible_initialize (AtkObject *obj,
accessible->idle_expand_path = NULL;
accessible->n_children_deleted = 0;
accessible->cell_info_by_index = g_hash_table_new (g_int_hash, g_int_equal);
accessible->cell_info_by_index = g_hash_table_new_full (g_int_hash,
g_int_equal, NULL, (GDestroyNotify) cell_info_free);
widget = GTK_WIDGET (data);
tree_view = GTK_TREE_VIEW (widget);
@@ -825,10 +835,7 @@ gtk_tree_view_accessible_ref_accessible_at_point (AtkComponent *component,
return gtk_tree_view_accessible_ref_child (ATK_OBJECT (component), index);
}
else
{
g_warning ("gtk_tree_view_accessible_ref_accessible_at_point: gtk_tree_view_get_path_at_pos () failed\n");
}
return NULL;
}
@@ -2836,11 +2843,7 @@ garbage_collect_cell_data (gpointer data)
{
if (!cell_info->in_use)
{
/* g_object_unref (cell_info->cell); */
if (cell_info->cell_row_ref)
gtk_tree_row_reference_free (cell_info->cell_row_ref);
g_free (cell_info);
g_hash_table_iter_remove (&iter);
g_hash_table_iter_remove (&iter);
}
}
@@ -3272,8 +3275,9 @@ refresh_cell_index (GtkCellAccessible *cell)
return;
cell_info_get_index (tree_view, info, &index);
g_hash_table_steal (accessible->cell_info_by_index, &cell->index);
cell->index = index;
g_hash_table_insert (accessible->cell_info_by_index, &index, info);
g_hash_table_insert (accessible->cell_info_by_index, &cell->index, info);
}
static void
@@ -3303,6 +3307,7 @@ disconnect_model_signals (GtkTreeViewAccessible *accessible)
GtkWidget *widget;
obj = G_OBJECT (accessible->tree_model);
g_object_remove_weak_pointer (obj, (gpointer *) &accessible->tree_model);
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (accessible));
g_signal_handlers_disconnect_by_func (obj, model_row_changed, widget);
g_signal_handlers_disconnect_by_func (obj, model_row_inserted, widget);
+2 -3
View File
@@ -2357,7 +2357,7 @@ create_credits_page (GtkAboutDialog *about)
priv->credits_page = gtk_notebook_append_page (GTK_NOTEBOOK (priv->notebook), page_vbox, NULL);
sw = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_NONE);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_IN);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_NEVER,
GTK_POLICY_AUTOMATIC);
@@ -2366,7 +2366,7 @@ create_credits_page (GtkAboutDialog *about)
grid = gtk_grid_new ();
gtk_container_set_border_width (GTK_CONTAINER (grid), 5);
gtk_orientable_set_orientation (GTK_ORIENTABLE (grid), GTK_ORIENTATION_VERTICAL);
gtk_grid_set_column_spacing (GTK_GRID (grid), 2);
gtk_grid_set_column_spacing (GTK_GRID (grid), 8);
gtk_grid_set_row_spacing (GTK_GRID (grid), 12);
gtk_widget_set_halign (grid, GTK_ALIGN_CENTER);
gtk_widget_set_valign (grid, GTK_ALIGN_START);
@@ -2422,7 +2422,6 @@ create_license_page (GtkAboutDialog *about)
priv->license_page = gtk_notebook_append_page (GTK_NOTEBOOK (priv->notebook), page_vbox, NULL);
sw = gtk_scrolled_window_new (NULL, NULL);
gtk_container_set_border_width (GTK_CONTAINER (sw), 5);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw), GTK_SHADOW_IN);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
+5 -5
View File
@@ -1219,7 +1219,7 @@ gtk_accelerator_parse (const gchar *accelerator,
{
accelerator += 9;
len -= 9;
mods |= GTK_DEFAULT_ACCEL_MOD_MASK;
mods |= GTK_DEFAULT_ACCEL_MOD_MASK_VIRTUAL;
}
else if (len >= 9 && is_control (accelerator))
{
@@ -1360,10 +1360,10 @@ gtk_accelerator_name (guint accelerator_key,
l = 0;
if (accelerator_mods & GDK_RELEASE_MASK)
l += sizeof (text_release) - 1;
if (accelerator_mods & GTK_DEFAULT_ACCEL_MOD_MASK)
if (accelerator_mods & GTK_DEFAULT_ACCEL_MOD_MASK_VIRTUAL)
{
l += sizeof (text_primary) - 1;
accelerator_mods &= ~GTK_DEFAULT_ACCEL_MOD_MASK; /* consume the default accel */
accelerator_mods &= ~GTK_DEFAULT_ACCEL_MOD_MASK_VIRTUAL; /* consume the default accel */
}
if (accelerator_mods & GDK_SHIFT_MASK)
l += sizeof (text_shift) - 1;
@@ -1397,11 +1397,11 @@ gtk_accelerator_name (guint accelerator_key,
strcpy (accelerator + l, text_release);
l += sizeof (text_release) - 1;
}
if (accelerator_mods & GTK_DEFAULT_ACCEL_MOD_MASK)
if (accelerator_mods & GTK_DEFAULT_ACCEL_MOD_MASK_VIRTUAL)
{
strcpy (accelerator + l, text_primary);
l += sizeof (text_primary) - 1;
accelerator_mods &= ~GTK_DEFAULT_ACCEL_MOD_MASK; /* consume the default accel */
accelerator_mods &= ~GTK_DEFAULT_ACCEL_MOD_MASK_VIRTUAL; /* consume the default accel */
}
if (accelerator_mods & GDK_SHIFT_MASK)
{
+2 -1
View File
@@ -1406,7 +1406,8 @@ dgettext_swapped (const gchar *msgid,
/**
* gtk_action_group_set_translation_domain:
* @action_group: a #GtkActionGroup
* @domain: the translation domain to use for g_dgettext() calls
* @domain: (allow-none): the translation domain to use for g_dgettext()
* calls, or %NULL to use the domain set with textdomain()
*
* Sets the translation domain and uses g_dgettext() for translating the
* @label and @tooltip of #GtkActionEntry<!-- -->s added by
+14 -4
View File
@@ -3464,11 +3464,14 @@ gtk_cell_area_activate_cell (GtkCellArea *area,
* @area: a #GtkCellArea
* @canceled: whether editing was canceled.
*
* Explicitly stops the editing of the currently
* edited cell (see gtk_cell_area_get_edited_cell()).
* Explicitly stops the editing of the currently edited cell.
*
* If @canceled is %TRUE, the cell renderer will emit
* the ::editing-canceled signal.
* If @canceled is %TRUE, the currently edited cell renderer
* will emit the ::editing-canceled signal, otherwise the
* the ::editing-done signal will be emitted on the current
* edit widget.
*
* See gtk_cell_area_get_edited_cell() and gtk_cell_area_get_edit_widget().
*
* Since: 3.0
*/
@@ -3490,6 +3493,13 @@ gtk_cell_area_stop_editing (GtkCellArea *area,
/* Stop editing of the cell renderer */
gtk_cell_renderer_stop_editing (priv->edited_cell, canceled);
/* When editing is explicitly halted either
* the "editing-canceled" signal is emitted on the cell
* renderer or the "editing-done" signal on the GtkCellEditable widget
*/
if (!canceled)
gtk_cell_editable_editing_done (edit_widget);
/* Remove any references to the editable widget */
gtk_cell_area_set_edited_cell (area, NULL);
gtk_cell_area_set_edit_widget (area, NULL);
+19 -18
View File
@@ -451,6 +451,7 @@ grab_key_callback (GtkWidget *widget,
GtkCellRendererAccelPrivate *priv = accel->priv;
GdkModifierType accel_mods = 0;
guint accel_key;
guint keyval;
gchar *path;
gboolean edited;
gboolean cleared;
@@ -465,16 +466,16 @@ grab_key_callback (GtkWidget *widget,
edited = FALSE;
cleared = FALSE;
gdk_keymap_translate_keyboard_state (gdk_keymap_get_for_display (display),
accel_mods = event->state;
_gtk_translate_keyboard_accel_state (gdk_keymap_get_for_display (display),
event->hardware_keycode,
event->state,
gtk_accelerator_get_default_mod_mask (),
event->group,
NULL, NULL, NULL, &consumed_modifiers);
&keyval, NULL, NULL, &consumed_modifiers);
accel_mods = event->state;
gdk_keymap_add_virtual_modifiers (gdk_keymap_get_for_display (display), &accel_mods);
accel_key = gdk_keyval_to_lower (event->keyval);
accel_key = gdk_keyval_to_lower (keyval);
if (accel_key == GDK_KEY_ISO_Left_Tab)
accel_key = GDK_KEY_Tab;
@@ -487,22 +488,22 @@ grab_key_callback (GtkWidget *widget,
/* Put shift back if it changed the case of the key, not otherwise.
*/
if (accel_key != event->keyval)
if (accel_key != keyval)
accel_mods |= GDK_SHIFT_MASK;
if (accel_mods == 0)
{
switch (event->keyval)
{
case GDK_KEY_Escape:
goto out; /* cancel */
case GDK_KEY_BackSpace:
/* clear the accelerator on Backspace */
cleared = TRUE;
goto out;
default:
break;
}
switch (keyval)
{
case GDK_KEY_Escape:
goto out; /* cancel */
case GDK_KEY_BackSpace:
/* clear the accelerator on Backspace */
cleared = TRUE;
goto out;
default:
break;
}
}
if (priv->accel_mode == GTK_CELL_RENDERER_ACCEL_MODE_GTK)
+2
View File
@@ -791,6 +791,8 @@ gtk_color_button_set_rgba (GtkColorButton *color_button,
gtk_widget_queue_draw (color_button->priv->draw_area);
g_object_notify (G_OBJECT (color_button), "color");
g_object_notify (G_OBJECT (color_button), "alpha");
g_object_notify (G_OBJECT (color_button), "rgba");
}
+3 -3
View File
@@ -2302,8 +2302,8 @@ get_focus_chain (GtkContainer *container)
/* same as gtk_container_get_children, except it includes internals
*/
static GList *
gtk_container_get_all_children (GtkContainer *container)
GList *
_gtk_container_get_all_children (GtkContainer *container)
{
GList *children = NULL;
@@ -2377,7 +2377,7 @@ gtk_container_focus (GtkWidget *widget,
if (priv->has_focus_chain)
children = g_list_copy (get_focus_chain (container));
else
children = gtk_container_get_all_children (container);
children = _gtk_container_get_all_children (container);
if (priv->has_focus_chain &&
(direction == GTK_DIR_TAB_FORWARD ||
+1
View File
@@ -23,6 +23,7 @@
G_BEGIN_DECLS
GList * _gtk_container_get_all_children (GtkContainer *container);
void _gtk_container_queue_resize (GtkContainer *container);
void _gtk_container_resize_invalidate (GtkContainer *container);
void _gtk_container_clear_resize_widgets (GtkContainer *container);
+2 -2
View File
@@ -1220,7 +1220,7 @@ gtk_css_provider_emit_error (GtkCssProvider *provider,
const GError *error)
{
g_signal_emit (provider, css_provider_signals[PARSING_ERROR], 0,
scanner->section, error);
scanner != NULL ? scanner->section : NULL, error);
}
static void
@@ -1532,7 +1532,7 @@ gtk_css_provider_take_error (GtkCssProvider *provider,
GtkCssScanner *scanner,
GError *error)
{
gtk_css_provider_emit_error (scanner->provider,
gtk_css_provider_emit_error (provider,
scanner,
error);
+1 -1
View File
@@ -138,7 +138,7 @@ GtkWidget* gtk_dialog_new_with_buttons (const gchar *title,
GtkWindow *parent,
GtkDialogFlags flags,
const gchar *first_button_text,
...);
...) G_GNUC_NULL_TERMINATED;
void gtk_dialog_add_action_widget (GtkDialog *dialog,
GtkWidget *child,
+89 -32
View File
@@ -1081,6 +1081,11 @@ gtk_drag_begin_idle (gpointer arg)
point = [info->nsevent locationInWindow];
drag_image = _gtk_quartz_create_image_from_pixbuf (info->icon_pixbuf);
if (drag_image == NULL)
{
g_object_unref (info->context);
return FALSE;
}
point.x -= info->hot_x;
point.y -= info->hot_y;
@@ -1100,6 +1105,13 @@ gtk_drag_begin_idle (gpointer arg)
return FALSE;
}
/* Fake protocol to let us call GdkNSView gdkWindow without including
* gdk/GdkNSView.h (which we can't because it pulls in the internal-only
* gdkwindow.h).
*/
@protocol GdkNSView
- (GdkWindow *)gdkWindow;
@end
static GdkDragContext *
gtk_drag_begin_internal (GtkWidget *widget,
@@ -1110,21 +1122,54 @@ gtk_drag_begin_internal (GtkWidget *widget,
GdkEvent *event)
{
GtkDragSourceInfo *info;
GdkDragContext *context;
GdkDevice *pointer;
NSWindow *nswindow;
GdkWindow *window;
GdkDragContext *context;
NSWindow *nswindow = get_toplevel_nswindow (widget);
NSPoint point = {0, 0};
gdouble x, y;
double time = (double)g_get_real_time ();
NSEvent *nsevent;
NSTimeInterval nstime;
context = gdk_drag_begin (gtk_widget_get_window (widget), NULL);
if (event)
{
if (gdk_event_get_coords (event, &x, &y))
{
point.x = x;
point.y = y;
}
time = (double)gdk_event_get_time (event);
}
nstime = [[NSDate dateWithTimeIntervalSince1970: time / 1000] timeIntervalSinceReferenceDate];
nsevent = [NSEvent mouseEventWithType: NSLeftMouseDown
location: point
modifierFlags: 0
timestamp: nstime
windowNumber: [nswindow windowNumber]
context: [nswindow graphicsContext]
eventNumber: 0
clickCount: 1
pressure: 0.0 ];
window = [(id<GdkNSView>)[nswindow contentView] gdkWindow];
g_return_val_if_fail (nsevent != NULL, NULL);
context = gdk_drag_begin (window, NULL);
g_return_val_if_fail (context != NULL, NULL);
info = gtk_drag_get_source_info (context, TRUE);
info->nsevent = nsevent;
[info->nsevent retain];
info->source_widget = g_object_ref (widget);
info->widget = g_object_ref (widget);
info->target_list = target_list;
gtk_target_list_ref (target_list);
info->possible_actions = actions;
g_signal_emit_by_name (widget, "drag-begin", info->context);
/* Ensure that we have an icon before we start the drag; the
@@ -1134,36 +1179,34 @@ gtk_drag_begin_internal (GtkWidget *widget,
if (!info->icon_pixbuf)
{
if (!site || site->icon_type == GTK_IMAGE_EMPTY)
gtk_drag_set_icon_default (context);
gtk_drag_set_icon_default (context);
else
switch (site->icon_type)
{
case GTK_IMAGE_PIXBUF:
gtk_drag_set_icon_pixbuf (context,
site->icon_data.pixbuf.pixbuf,
-2, -2);
break;
case GTK_IMAGE_STOCK:
gtk_drag_set_icon_stock (context,
site->icon_data.stock.stock_id,
-2, -2);
break;
case GTK_IMAGE_ICON_NAME:
gtk_drag_set_icon_name (context,
site->icon_data.name.icon_name,
-2, -2);
break;
case GTK_IMAGE_EMPTY:
default:
g_assert_not_reached();
break;
}
{
switch (site->icon_type)
{
case GTK_IMAGE_PIXBUF:
gtk_drag_set_icon_pixbuf (context,
site->icon_data.pixbuf.pixbuf,
-2, -2);
break;
case GTK_IMAGE_STOCK:
gtk_drag_set_icon_stock (context,
site->icon_data.stock.stock_id,
-2, -2);
break;
case GTK_IMAGE_ICON_NAME:
gtk_drag_set_icon_name (context,
site->icon_data.name.icon_name,
-2, -2);
break;
case GTK_IMAGE_EMPTY:
default:
g_assert_not_reached();
break;
}
}
}
nswindow = get_toplevel_nswindow (widget);
info->nsevent = [nswindow currentEvent];
[info->nsevent retain];
/* drag will begin in an idle handler to avoid nested run loops */
g_idle_add_full (G_PRIORITY_HIGH_IDLE, gtk_drag_begin_idle, context, NULL);
@@ -1777,6 +1820,9 @@ gtk_drag_set_icon_default (GdkDragContext *context)
static void
gtk_drag_source_info_destroy (GtkDragSourceInfo *info)
{
NSPasteboard *pasteboard;
NSAutoreleasePool *pool;
if (info->icon_pixbuf)
g_object_unref (info->icon_pixbuf);
@@ -1791,10 +1837,21 @@ gtk_drag_source_info_destroy (GtkDragSourceInfo *info)
gtk_target_list_unref (info->target_list);
pool = [[NSAutoreleasePool alloc] init];
/* Empty the pasteboard, so that it will not accidentally access
* info->context after it has been destroyed.
*/
pasteboard = [NSPasteboard pasteboardWithName: NSDragPboard];
[pasteboard declareTypes: nil owner: nil];
[pool release];
gtk_drag_clear_source_info (info->context);
g_object_unref (info->context);
g_free (info);
info = NULL;
}
static gboolean
+7 -4
View File
@@ -8880,6 +8880,7 @@ typedef struct
GtkEntry *entry;
gint button;
guint time;
GdkDevice *device;
} PopupInfo;
static void
@@ -8987,15 +8988,15 @@ popup_targets_received (GtkClipboard *clipboard,
info_entry_priv->popup_menu);
if (info->button)
gtk_menu_popup (GTK_MENU (info_entry_priv->popup_menu), NULL, NULL,
NULL, NULL,
if (info->device)
gtk_menu_popup_for_device (GTK_MENU (info_entry_priv->popup_menu),
info->device, NULL, NULL, NULL, NULL, NULL,
info->button, info->time);
else
{
gtk_menu_popup (GTK_MENU (info_entry_priv->popup_menu), NULL, NULL,
popup_position_func, entry,
info->button, info->time);
0, gtk_get_current_event_time ());
gtk_menu_shell_select_first (GTK_MENU_SHELL (info_entry_priv->popup_menu), FALSE);
}
}
@@ -9020,11 +9021,13 @@ gtk_entry_do_popup (GtkEntry *entry,
{
info->button = event->button;
info->time = event->time;
info->device = event->device;
}
else
{
info->button = 0;
info->time = gtk_get_current_event_time ();
info->device = NULL;
}
gtk_clipboard_request_contents (gtk_widget_get_clipboard (GTK_WIDGET (entry), GDK_SELECTION_CLIPBOARD),
+9 -13
View File
@@ -3663,6 +3663,7 @@ shortcuts_pane_create (GtkFileChooserDefault *impl,
/* Box for buttons */
toolbar = gtk_toolbar_new ();
gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_ICONS);
gtk_toolbar_set_icon_size (GTK_TOOLBAR (toolbar), GTK_ICON_SIZE_MENU);
context = gtk_widget_get_style_context (toolbar);
@@ -4659,21 +4660,18 @@ location_switch_to_filename_entry (GtkFileChooserDefault *impl)
impl->operation_mode == OPERATION_MODE_RECENT)
return;
if (impl->location_entry)
{
gtk_widget_destroy (impl->location_entry);
impl->location_entry = NULL;
}
/* Box */
gtk_widget_show (impl->location_entry_box);
/* Entry */
location_entry_create (impl);
gtk_box_pack_start (GTK_BOX (impl->location_entry_box), impl->location_entry, TRUE, TRUE, 0);
gtk_label_set_mnemonic_widget (GTK_LABEL (impl->location_label), impl->location_entry);
if (!impl->location_entry)
{
location_entry_create (impl);
gtk_box_pack_start (GTK_BOX (impl->location_entry_box), impl->location_entry, TRUE, TRUE, 0);
gtk_label_set_mnemonic_widget (GTK_LABEL (impl->location_label), impl->location_entry);
}
/* Configure the entry */
@@ -5288,7 +5286,7 @@ put_recent_folder_in_pathbar (GtkFileChooserDefault *impl, GtkTreeIter *iter)
gtk_tree_model_get (GTK_TREE_MODEL (impl->recent_model), iter,
MODEL_COL_FILE, &file,
-1);
_gtk_path_bar_set_file (GTK_PATH_BAR (impl->browse_path_bar), file, FALSE, NULL); /* NULL-GError */
_gtk_path_bar_set_file (GTK_PATH_BAR (impl->browse_path_bar), file, FALSE);
g_object_unref (file);
}
@@ -7302,8 +7300,7 @@ update_current_folder_get_info_cb (GCancellable *cancellable,
if (! _gtk_file_info_consider_as_directory (info))
goto out;
if (!_gtk_path_bar_set_file (GTK_PATH_BAR (impl->browse_path_bar), data->file, data->keep_trail, NULL))
goto out;
_gtk_path_bar_set_file (GTK_PATH_BAR (impl->browse_path_bar), data->file, data->keep_trail);
if (impl->current_folder != data->file)
{
@@ -10126,7 +10123,6 @@ list_row_activated (GtkTreeView *tree_view,
if (is_folder && file)
{
change_folder_and_display_error (impl, file, FALSE);
g_object_unref (file);
goto out;
}
+69 -24
View File
@@ -772,37 +772,72 @@ gtk_grid_request_spanning (GtkGridRequest *request,
/* If we need to request more space for this child to fill
* its requisition, then divide up the needed space amongst the
* lines it spans, favoring expandable lines if any.
*
* When doing homogeneous allocation though, try to keep the
* line allocations even, since we're going to force them to
* be the same anyway, and we don't want to introduce unnecessary
* extra space.
*/
if (span_minimum < minimum)
{
extra = minimum - span_minimum;
expand = span_expand;
for (i = 0; i < attach->span; i++)
if (linedata->homogeneous)
{
line = &lines->lines[attach->pos - lines->min + i];
if (force_expand || line->expand)
gint total, m;
total = minimum - (attach->span - 1) * linedata->spacing;
m = total / attach->span + (total % attach->span ? 1 : 0);
for (i = 0; i < attach->span; i++)
{
line_extra = extra / expand;
line->minimum += line_extra;
extra -= line_extra;
expand -= 1;
line = &lines->lines[attach->pos - lines->min + i];
line->minimum = MAX(line->minimum, m);
}
}
else
{
extra = minimum - span_minimum;
expand = span_expand;
for (i = 0; i < attach->span; i++)
{
line = &lines->lines[attach->pos - lines->min + i];
if (force_expand || line->expand)
{
line_extra = extra / expand;
line->minimum += line_extra;
extra -= line_extra;
expand -= 1;
}
}
}
}
if (span_natural < natural)
{
extra = natural - span_natural;
expand = span_expand;
for (i = 0; i < attach->span; i++)
if (linedata->homogeneous)
{
line = &lines->lines[attach->pos - lines->min + i];
if (force_expand || line->expand)
gint total, n;
total = natural - (attach->span - 1) * linedata->spacing;
n = total / attach->span + (total % attach->span ? 1 : 0);
for (i = 0; i < attach->span; i++)
{
line_extra = extra / expand;
line->natural += line_extra;
extra -= line_extra;
expand -= 1;
line = &lines->lines[attach->pos - lines->min + i];
line->natural = MAX(line->natural, n);
}
}
else
{
extra = natural - span_natural;
expand = span_expand;
for (i = 0; i < attach->span; i++)
{
line = &lines->lines[attach->pos - lines->min + i];
if (force_expand || line->expand)
{
line_extra = extra / expand;
line->natural += line_extra;
extra -= line_extra;
expand -= 1;
}
}
}
}
@@ -927,8 +962,13 @@ gtk_grid_request_sum (GtkGridRequest *request,
linedata = &priv->linedata[orientation];
lines = &request->lines[orientation];
min = (nonempty - 1) * linedata->spacing;
nat = (nonempty - 1) * linedata->spacing;
min = 0;
nat = 0;
if (nonempty > 0)
{
min = (nonempty - 1) * linedata->spacing;
nat = (nonempty - 1) * linedata->spacing;
}
for (i = 0; i < lines->max - lines->min; i++)
{
@@ -1465,6 +1505,9 @@ gtk_grid_attach (GtkGrid *grid,
* @side. When @sibling is %NULL, the widget is placed in row (for
* left or right placement) or column 0 (for top or bottom placement),
* at the end indicated by @side.
*
* Attaching widgets labeled [1], [2], [3] with @sibling == %NULL and
* @side == %GTK_POS_LEFT yields a layout of [3][2][1].
*/
void
gtk_grid_attach_next_to (GtkGrid *grid,
@@ -1515,20 +1558,22 @@ gtk_grid_attach_next_to (GtkGrid *grid,
switch (side)
{
case GTK_POS_LEFT:
left = find_attach_position (grid, GTK_ORIENTATION_HORIZONTAL, 0, height, TRUE);
left = find_attach_position (grid, GTK_ORIENTATION_HORIZONTAL, 0, height, FALSE);
left -= width;
top = 0;
break;
case GTK_POS_RIGHT:
left = find_attach_position (grid, GTK_ORIENTATION_HORIZONTAL, 0, height, FALSE);
left = find_attach_position (grid, GTK_ORIENTATION_HORIZONTAL, 0, height, TRUE);
top = 0;
break;
case GTK_POS_TOP:
left = 0;
top = find_attach_position (grid, GTK_ORIENTATION_VERTICAL, 0, width, TRUE);
top = find_attach_position (grid, GTK_ORIENTATION_VERTICAL, 0, width, FALSE);
top -= height;
break;
case GTK_POS_BOTTOM:
left = 0;
top = find_attach_position (grid, GTK_ORIENTATION_VERTICAL, 0, width, FALSE);
top = find_attach_position (grid, GTK_ORIENTATION_VERTICAL, 0, width, TRUE);
break;
default:
g_assert_not_reached ();
+24 -9
View File
@@ -89,9 +89,8 @@ _gtk_icon_cache_new_for_path (const gchar *path)
gchar *cache_filename;
gint fd = -1;
struct stat st;
struct stat path_st;
CacheInfo info;
GStatBuf st;
GStatBuf path_st;
/* Check if we have a cache file */
cache_filename = g_build_filename (path, "icon-theme.cache", NULL);
@@ -107,7 +106,18 @@ _gtk_icon_cache_new_for_path (const gchar *path)
if (fd < 0)
goto done;
#ifdef G_OS_WIN32
/* Bug 660730: _fstat32 is only defined in msvcrt80.dll+/VS 2005+ */
/* or possibly in the msvcrt.dll linked to by the Windows DDK */
/* (will need to check on the Windows DDK part later) */
#if (_MSC_VER >= 1400 || __MSVCRT_VERSION__ >= 0x0800)
#undef fstat /* Just in case */
#define fstat _fstat32
#endif
#endif
if (fstat (fd, &st) < 0 || st.st_size < 4)
goto done;
@@ -124,14 +134,16 @@ _gtk_icon_cache_new_for_path (const gchar *path)
if (!map)
goto done;
info.cache = g_mapped_file_get_contents (map);
info.cache_size = g_mapped_file_get_length (map);
info.n_directories = 0;
info.flags = CHECK_OFFSETS|CHECK_STRINGS;
#ifdef G_ENABLE_DEBUG
if (gtk_get_debug_flags () & GTK_DEBUG_ICONTHEME)
{
CacheInfo info;
info.cache = g_mapped_file_get_contents (map);
info.cache_size = g_mapped_file_get_length (map);
info.n_directories = 0;
info.flags = CHECK_OFFSETS|CHECK_STRINGS;
if (!_gtk_icon_cache_validate (&info))
{
g_mapped_file_unref (map);
@@ -436,6 +448,9 @@ _gtk_icon_cache_get_icon (GtkIconCache *cache,
offset = find_image_offset (cache, icon_name, directory_index);
if (!offset)
return NULL;
image_data_offset = GET_UINT32 (cache->buffer, offset + 4);
if (!image_data_offset)
+4 -3
View File
@@ -1663,9 +1663,10 @@ render_fallback_image (GtkStyleContext *context,
_gtk_icon_theme_ensure_builtin_cache ();
index = _gtk_icon_cache_get_directory_index (_builtin_cache, "24");
pixbuf = _gtk_icon_cache_get_icon (_builtin_cache,
GTK_STOCK_MISSING_IMAGE,
index);
pixbuf = _gtk_icon_cache_get_icon (_builtin_cache, "image-missing", index);
g_return_val_if_fail(pixbuf != NULL, NULL);
gtk_icon_source_set_pixbuf (&fallback_source, pixbuf);
g_object_unref (pixbuf);
}
+3 -3
View File
@@ -979,7 +979,7 @@ insert_theme (GtkIconTheme *icon_theme, const char *theme_name)
GKeyFile *theme_file;
GError *error = NULL;
IconThemeDirMtime *dir_mtime;
struct stat stat_buf;
GStatBuf stat_buf;
priv = icon_theme->priv;
@@ -1123,7 +1123,7 @@ load_themes (GtkIconTheme *icon_theme)
IconSuffix old_suffix, new_suffix;
GTimeVal tv;
IconThemeDirMtime *dir_mtime;
struct stat stat_buf;
GStatBuf stat_buf;
priv = icon_theme->priv;
@@ -1948,7 +1948,7 @@ rescan_themes (GtkIconTheme *icon_theme)
IconThemeDirMtime *dir_mtime;
GList *d;
int stat_res;
struct stat stat_buf;
GStatBuf stat_buf;
GTimeVal tv;
priv = icon_theme->priv;
+23 -9
View File
@@ -3750,11 +3750,18 @@ gtk_icon_view_move_cursor_up_down (GtkIconView *icon_view,
else
list = g_list_last (icon_view->priv->items);
item = list ? list->data : NULL;
if (list)
{
item = list->data;
/* Give focus to the first cell initially */
gtk_icon_view_set_cell_data (icon_view, item);
gtk_cell_area_focus (icon_view->priv->cell_area, direction);
/* Give focus to the first cell initially */
gtk_icon_view_set_cell_data (icon_view, item);
gtk_cell_area_focus (icon_view->priv->cell_area, direction);
}
else
{
item = NULL;
}
}
else
{
@@ -3895,11 +3902,18 @@ gtk_icon_view_move_cursor_left_right (GtkIconView *icon_view,
else
list = g_list_last (icon_view->priv->items);
item = list ? list->data : NULL;
if (list)
{
item = list->data;
/* Give focus to the first cell initially */
gtk_icon_view_set_cell_data (icon_view, item);
gtk_cell_area_focus (icon_view->priv->cell_area, direction);
/* Give focus to the first cell initially */
gtk_icon_view_set_cell_data (icon_view, item);
gtk_cell_area_focus (icon_view->priv->cell_area, direction);
}
else
{
item = NULL;
}
}
else
{
@@ -4915,7 +4929,7 @@ gtk_icon_view_set_model (GtkIconView *icon_view,
gtk_icon_view_build_items (icon_view);
gtk_icon_view_queue_layout (icon_view);
gtk_icon_view_layout (icon_view);
}
g_object_notify (G_OBJECT (icon_view), "model");
+5
View File
@@ -541,6 +541,11 @@ gtk_info_bar_init (GtkInfoBar *info_bar)
info_bar->priv->content_area = content_area;
info_bar->priv->action_area = action_area;
/* message-type is a CONSTRUCT property, so we init to a value
* different from its default to trigger its property setter
* during construction */
info_bar->priv->message_type = GTK_MESSAGE_OTHER;
gtk_widget_pop_composite_child ();
gtk_info_bar_style_updated (widget);
+28 -7
View File
@@ -18,9 +18,12 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include "gtkdebug.h"
#include "gtkkeyhash.h"
#include "gtkprivate.h"
typedef struct _GtkKeyHashEntry GtkKeyHashEntry;
@@ -392,6 +395,7 @@ _gtk_key_hash_lookup (GtkKeyHash *key_hash,
gint level;
GdkModifierType modifiers;
GdkModifierType consumed_modifiers;
gboolean group_mod_is_accel_mod = FALSE;
const GdkModifierType xmods = GDK_MOD2_MASK|GDK_MOD3_MASK|GDK_MOD4_MASK|GDK_MOD5_MASK;
const GdkModifierType vmods = GDK_SUPER_MASK|GDK_HYPER_MASK|GDK_META_MASK;
@@ -399,11 +403,18 @@ _gtk_key_hash_lookup (GtkKeyHash *key_hash,
*/
state &= ~GDK_LOCK_MASK;
gdk_keymap_map_virtual_modifiers (key_hash->keymap, &mask);
_gtk_translate_keyboard_accel_state (key_hash->keymap,
hardware_keycode, state, mask, group,
&keyval,
&effective_group, &level, &consumed_modifiers);
gdk_keymap_translate_keyboard_state (key_hash->keymap,
hardware_keycode, state, group,
&keyval, &effective_group, &level, &consumed_modifiers);
/* if the group-toggling modifier is part of the default accel mod
* mask, and it is active, disable it for matching
*/
if (mask & GTK_TOGGLE_GROUP_MOD_MASK)
group_mod_is_accel_mod = TRUE;
gdk_keymap_map_virtual_modifiers (key_hash->keymap, &mask);
gdk_keymap_add_virtual_modifiers (key_hash->keymap, &state);
GTK_NOTE (KEYBINDINGS,
@@ -433,7 +444,14 @@ _gtk_key_hash_lookup (GtkKeyHash *key_hash,
{
gint i;
if (keyval == entry->keyval) /* Exact match */
if (keyval == entry->keyval && /* Exact match */
/* but also match for group if it is an accel mod, because
* otherwise we can get multiple exact matches, some being
* bogus */
(!group_mod_is_accel_mod ||
(state & GTK_TOGGLE_GROUP_MOD_MASK) ==
(entry->modifiers & GTK_TOGGLE_GROUP_MOD_MASK)))
{
GTK_NOTE (KEYBINDINGS,
g_message (" found exact match, keyval = %u, modifiers = 0x%04x",
@@ -453,8 +471,11 @@ _gtk_key_hash_lookup (GtkKeyHash *key_hash,
{
for (i = 0; i < entry->n_keys; i++)
{
if (entry->keys[i].keycode == hardware_keycode &&
entry->keys[i].level == level) /* Match for all but group */
if (entry->keys[i].keycode == hardware_keycode &&
entry->keys[i].level == level &&
/* Only match for group if it's an accel mod */
(!group_mod_is_accel_mod ||
entry->keys[i].group == effective_group))
{
GTK_NOTE (KEYBINDINGS,
g_message (" found group = %d, level = %d",
+1 -2
View File
@@ -4116,8 +4116,6 @@ gtk_label_draw (GtkWidget *widget,
if (priv->text && (*priv->text != '\0'))
{
GdkRGBA bg_color, fg_color;
get_layout_location (label, &x, &y);
context = gtk_widget_get_style_context (widget);
@@ -4137,6 +4135,7 @@ gtk_label_draw (GtkWidget *widget,
{
gint range[2];
cairo_region_t *clip;
GdkRGBA bg_color, fg_color;
range[0] = info->selection_anchor;
range[1] = info->selection_end;
+45
View File
@@ -2663,3 +2663,48 @@ _gtk_button_event_triggers_context_menu (GdkEventButton *event)
return FALSE;
}
gboolean
_gtk_translate_keyboard_accel_state (GdkKeymap *keymap,
guint hardware_keycode,
GdkModifierType state,
GdkModifierType accel_mask,
gint group,
guint *keyval,
gint *effective_group,
gint *level,
GdkModifierType *consumed_modifiers)
{
gboolean group_mask_disabled = FALSE;
gboolean retval;
/* if the group-toggling modifier is part of the accel mod mask, and
* it is active, disable it for matching
*/
if (accel_mask & state & GTK_TOGGLE_GROUP_MOD_MASK)
{
state &= ~GTK_TOGGLE_GROUP_MOD_MASK;
group = 0;
group_mask_disabled = TRUE;
}
retval = gdk_keymap_translate_keyboard_state (keymap,
hardware_keycode, state, group,
keyval,
effective_group, level,
consumed_modifiers);
/* add back the group mask, we want to match against the modifier,
* but not against the keyval from its group
*/
if (group_mask_disabled)
{
if (effective_group)
*effective_group = 1;
if (consumed_modifiers)
*consumed_modifiers &= ~GTK_TOGGLE_GROUP_MOD_MASK;
}
return retval;
}
+8 -6
View File
@@ -3581,17 +3581,19 @@ gtk_menu_key_press (GtkWidget *widget,
}
/* Figure out what modifiers went into determining the key symbol */
gdk_keymap_translate_keyboard_state (gdk_keymap_get_for_display (display),
_gtk_translate_keyboard_accel_state (gdk_keymap_get_for_display (display),
event->hardware_keycode,
event->state, event->group,
NULL, NULL, NULL, &consumed_modifiers);
event->state,
gtk_accelerator_get_default_mod_mask (),
event->group,
&accel_key, NULL, NULL, &consumed_modifiers);
accel_key = gdk_keyval_to_lower (event->keyval);
accel_key = gdk_keyval_to_lower (accel_key);
accel_mods = event->state & gtk_accelerator_get_default_mod_mask () & ~consumed_modifiers;
/* If lowercasing affects the keysym, then we need to include SHIFT
* in the modifiers, we re-uppercase when we match against the keyval,
* but display and save in caseless form.
* in the modifiers, We re-upper case when we match against the
* keyval, but display and save in caseless form.
*/
if (accel_key != event->keyval)
accel_mods |= GDK_SHIFT_MASK;
+1 -15
View File
@@ -2175,21 +2175,7 @@ gtk_menu_item_position_menu (GtkMenu *menu,
available_right = monitor.x + monitor.width - (tx + allocation.width);
parent = gtk_widget_get_parent (widget);
if (GTK_IS_MENU_BAR (parent))
{
priv->from_menubar = TRUE;
}
else if (GTK_IS_MENU (parent))
{
if (GTK_MENU (parent)->priv->parent_menu_item)
priv->from_menubar = GTK_MENU_ITEM (GTK_MENU (parent)->priv->parent_menu_item)->priv->from_menubar;
else
priv->from_menubar = FALSE;
}
else
{
priv->from_menubar = FALSE;
}
priv->from_menubar = GTK_IS_MENU_BAR (parent);
switch (priv->submenu_placement)
{
+2 -2
View File
@@ -1752,8 +1752,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;
}
+47 -7
View File
@@ -1685,6 +1685,18 @@ gtk_notebook_destroy (GtkWidget *widget)
GtkNotebook *notebook = GTK_NOTEBOOK (widget);
GtkNotebookPrivate *priv = notebook->priv;
if (priv->action_widget[GTK_PACK_START])
{
gtk_widget_unparent (priv->action_widget[GTK_PACK_START]);
priv->action_widget[GTK_PACK_START] = NULL;
}
if (priv->action_widget[GTK_PACK_END])
{
gtk_widget_unparent (priv->action_widget[GTK_PACK_END]);
priv->action_widget[GTK_PACK_END] = NULL;
}
if (priv->menu)
gtk_notebook_popup_disable (notebook);
@@ -3134,7 +3146,7 @@ gtk_notebook_stop_reorder (GtkNotebook *notebook)
{
if (priv->during_reorder)
{
gint old_page_num, page_num;
gint old_page_num, page_num, i;
GList *element;
element = get_drop_position (notebook);
@@ -3143,9 +3155,16 @@ gtk_notebook_stop_reorder (GtkNotebook *notebook)
gtk_notebook_child_reordered (notebook, page);
if (priv->has_scrolled || old_page_num != page_num)
g_signal_emit (notebook,
notebook_signals[PAGE_REORDERED], 0,
page->child, page_num);
{
for (element = priv->children, i = 0; element; element = element->next, i++)
{
if (MIN (old_page_num, page_num) <= i && i <= MAX (old_page_num, page_num))
gtk_widget_child_notify (((GtkNotebookPage *) element->data)->child, "position");
}
g_signal_emit (notebook,
notebook_signals[PAGE_REORDERED], 0,
page->child, page_num);
}
priv->has_scrolled = FALSE;
priv->during_reorder = FALSE;
@@ -4044,7 +4063,7 @@ gtk_notebook_remove (GtkContainer *container,
GtkNotebook *notebook = GTK_NOTEBOOK (container);
GtkNotebookPrivate *priv = notebook->priv;
GtkNotebookPage *page;
GList *children;
GList *children, *list;
gint page_num = 0;
children = priv->children;
@@ -4064,8 +4083,15 @@ gtk_notebook_remove (GtkContainer *container,
g_object_ref (widget);
list = children->next;
gtk_notebook_real_remove (notebook, children);
while (list)
{
gtk_widget_child_notify (((GtkNotebookPage *)list->data)->child, "position");
list = list->next;
}
g_signal_emit (notebook,
notebook_signals[PAGE_REMOVED],
0,
@@ -4513,6 +4539,7 @@ gtk_notebook_real_insert_page (GtkNotebook *notebook,
GtkNotebookPrivate *priv = notebook->priv;
GtkNotebookPage *page;
gint nchildren;
GList *list;
gtk_widget_freeze_child_notify (child);
@@ -4595,7 +4622,14 @@ gtk_notebook_real_insert_page (GtkNotebook *notebook,
gtk_widget_child_notify (child, "tab-fill");
gtk_widget_child_notify (child, "tab-label");
gtk_widget_child_notify (child, "menu-label");
gtk_widget_child_notify (child, "position");
list = g_list_nth (priv->children, position);
while (list)
{
gtk_widget_child_notify (((GtkNotebookPage *)list->data)->child, "position");
list = list->next;
}
gtk_widget_thaw_child_notify (child);
/* The page-added handler might have reordered the pages, re-get the position */
@@ -7899,6 +7933,7 @@ gtk_notebook_reorder_child (GtkNotebook *notebook,
GtkNotebookPage *page;
gint old_pos;
gint max_pos;
gint i;
g_return_if_fail (GTK_IS_NOTEBOOK (notebook));
g_return_if_fail (GTK_IS_WIDGET (child));
@@ -7934,7 +7969,12 @@ gtk_notebook_reorder_child (GtkNotebook *notebook,
/* Move around the menu items if necessary */
gtk_notebook_child_reordered (notebook, page);
gtk_widget_child_notify (child, "position");
for (list = priv->children, i = 0; list; list = list->next, i++)
{
if (MIN (old_pos, position) <= i && i <= MAX (old_pos, position))
gtk_widget_child_notify (((GtkNotebookPage *) list->data)->child, "position");
}
if (priv->show_tabs)
gtk_notebook_pages_allocate (notebook);
+15 -14
View File
@@ -1666,8 +1666,7 @@ make_directory_button (GtkPathBar *path_bar,
static gboolean
gtk_path_bar_check_parent_path (GtkPathBar *path_bar,
GFile *file,
GtkFileSystem *file_system)
GFile *file)
{
GList *list;
GList *current_path = NULL;
@@ -1751,6 +1750,8 @@ gtk_path_bar_set_file_finish (struct SetFileInfo *info,
GtkWidget *button = BUTTON_DATA (l->data)->button;
gtk_container_add (GTK_CONTAINER (info->path_bar), button);
}
child_ordering_changed (info->path_bar);
}
else
{
@@ -1772,8 +1773,6 @@ gtk_path_bar_set_file_finish (struct SetFileInfo *info,
if (info->parent_file)
g_object_unref (info->parent_file);
child_ordering_changed (info->path_bar);
g_free (info);
}
@@ -1820,17 +1819,23 @@ gtk_path_bar_get_info_callback (GCancellable *cancellable,
if (BUTTON_IS_FAKE_ROOT (button_data))
file_info->fake_root = file_info->new_buttons;
/* We have assigned the info for the innermost button, i.e. the deepest directory.
* Now, go on to fetch the info for this directory's parent.
*/
file_info->file = file_info->parent_file;
file_info->first_directory = FALSE;
if (!file_info->file)
{
/* No parent? Okay, we are done. */
gtk_path_bar_set_file_finish (file_info, TRUE);
return;
}
file_info->parent_file = g_file_get_parent (file_info->file);
/* Recurse asynchronously */
file_info->path_bar->get_info_cancellable =
_gtk_file_system_get_info (file_info->path_bar->file_system,
file_info->file,
@@ -1839,23 +1844,21 @@ gtk_path_bar_get_info_callback (GCancellable *cancellable,
file_info);
}
gboolean
void
_gtk_path_bar_set_file (GtkPathBar *path_bar,
GFile *file,
const gboolean keep_trail,
GError **error)
const gboolean keep_trail)
{
struct SetFileInfo *info;
g_return_val_if_fail (GTK_IS_PATH_BAR (path_bar), FALSE);
g_return_val_if_fail (G_IS_FILE (file), FALSE);
g_return_if_fail (GTK_IS_PATH_BAR (path_bar));
g_return_if_fail (G_IS_FILE (file));
/* Check whether the new path is already present in the pathbar as buttons.
* This could be a parent directory or a previous selected subdirectory.
*/
if (keep_trail &&
gtk_path_bar_check_parent_path (path_bar, file, path_bar->file_system))
return TRUE;
if (keep_trail && gtk_path_bar_check_parent_path (path_bar, file))
return;
info = g_new0 (struct SetFileInfo, 1);
info->file = g_object_ref (file);
@@ -1872,8 +1875,6 @@ _gtk_path_bar_set_file (GtkPathBar *path_bar,
"standard::display-name,standard::is-hidden,standard::is-backup",
gtk_path_bar_get_info_callback,
info);
return TRUE;
}
/* FIXME: This should be a construct-only property */
+2 -3
View File
@@ -84,10 +84,9 @@ struct _GtkPathBarClass
GType gtk_path_bar_get_type (void) G_GNUC_CONST;
void _gtk_path_bar_set_file_system (GtkPathBar *path_bar,
GtkFileSystem *file_system);
gboolean _gtk_path_bar_set_file (GtkPathBar *path_bar,
void _gtk_path_bar_set_file (GtkPathBar *path_bar,
GFile *file,
gboolean keep_trail,
GError **error);
gboolean keep_trail);
void _gtk_path_bar_up (GtkPathBar *path_bar);
void _gtk_path_bar_down (GtkPathBar *path_bar);
+1 -1
View File
@@ -547,7 +547,7 @@ gtk_print_context_create_pango_context (GtkPrintContext *context)
g_return_val_if_fail (GTK_IS_PRINT_CONTEXT (context), NULL);
pango_context = pango_cairo_font_map_create_context (PANGO_CAIRO_FONT_MAP (_gtk_print_context_get_fontmap (context)));
pango_context = pango_font_map_create_context (_gtk_print_context_get_fontmap (context));
options = cairo_font_options_create ();
cairo_font_options_set_hint_metrics (options, CAIRO_HINT_METRICS_OFF);
+19 -7
View File
@@ -551,11 +551,19 @@ preview_print_idle_done (gpointer data)
op = GTK_PRINT_OPERATION (pop->preview);
cairo_surface_finish (pop->surface);
/* Surface is destroyed in launch_preview */
_gtk_print_operation_platform_backend_launch_preview (op,
pop->surface,
pop->parent,
pop->filename);
if (op->priv->status == GTK_PRINT_STATUS_FINISHED_ABORTED)
{
cairo_surface_destroy (pop->surface);
}
else
{
/* Surface is destroyed in launch_preview */
_gtk_print_operation_platform_backend_launch_preview (op,
pop->surface,
pop->parent,
pop->filename);
}
g_free (pop->filename);
@@ -581,10 +589,14 @@ preview_print_idle (gpointer data)
op = GTK_PRINT_OPERATION (pop->preview);
priv = op->priv;
if (priv->page_drawing_state == GTK_PAGE_DRAWING_STATE_READY)
{
if (!pop->pages_data->initialized)
if (priv->cancelled)
{
done = TRUE;
_gtk_print_operation_set_status (op, GTK_PRINT_STATUS_FINISHED_ABORTED, NULL);
}
else if (!pop->pages_data->initialized)
{
pop->pages_data->initialized = TRUE;
prepare_data (pop->pages_data);
+5 -3
View File
@@ -1346,8 +1346,8 @@ setup_page_table (GtkPrinterOptionSet *options,
add_option_to_table,
table);
nrows = grid_rows (GTK_GRID (page));
if (nrows == 1)
nrows = grid_rows (GTK_GRID (table));
if (nrows == 0)
gtk_widget_hide (page);
else
gtk_widget_show (page);
@@ -1521,7 +1521,7 @@ update_dialog_from_settings (GtkPrintUnixDialog *dialog)
table);
nrows = grid_rows (GTK_GRID (table));
if (nrows == 1)
if (nrows == 0)
gtk_widget_destroy (table);
else
{
@@ -2312,6 +2312,7 @@ create_main_page (GtkPrintUnixDialog *dialog)
gtk_grid_attach (GTK_GRID (table), radio, 0, 3, 1, 1);
entry = gtk_entry_new ();
gtk_widget_set_tooltip_text (entry, range_tooltip);
gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
atk_object_set_name (gtk_widget_get_accessible (entry), _("Pages"));
atk_object_set_description (gtk_widget_get_accessible (entry), range_tooltip);
priv->page_range_entry = entry;
@@ -2334,6 +2335,7 @@ create_main_page (GtkPrintUnixDialog *dialog)
gtk_widget_show (label);
gtk_grid_attach (GTK_GRID (table), label, 0, 0, 1, 1);
spinbutton = gtk_spin_button_new_with_range (1.0, 100.0, 1.0);
gtk_entry_set_activates_default (GTK_ENTRY (spinbutton), TRUE);
priv->copies_spin = spinbutton;
gtk_widget_show (spinbutton);
gtk_grid_attach (GTK_GRID (table), spinbutton, 1, 0, 1, 1);
+22 -2
View File
@@ -33,7 +33,8 @@
G_BEGIN_DECLS
#ifdef G_OS_WIN32
#if defined G_OS_WIN32 \
|| (defined GDK_WINDOWING_QUARTZ && defined QUARTZ_RELOCATION)
const gchar *_gtk_get_datadir ();
const gchar *_gtk_get_libdir ();
@@ -63,8 +64,10 @@ const gchar *_gtk_get_data_prefix ();
* Copy, Paste). This symbol is for those simple cases. */
#ifndef GDK_WINDOWING_QUARTZ
#define GTK_DEFAULT_ACCEL_MOD_MASK GDK_CONTROL_MASK
#define GTK_DEFAULT_ACCEL_MOD_MASK_VIRTUAL GDK_CONTROL_MASK
#else
#define GTK_DEFAULT_ACCEL_MOD_MASK GDK_META_MASK
#define GTK_DEFAULT_ACCEL_MOD_MASK GDK_MOD2_MASK
#define GTK_DEFAULT_ACCEL_MOD_MASK_VIRTUAL GDK_META_MASK
#endif
/* When any of these modifiers are active, a key
@@ -101,8 +104,25 @@ void _gtk_modules_init (gint *argc,
void _gtk_modules_settings_changed (GtkSettings *settings,
const gchar *modules);
#ifndef GDK_WINDOWING_QUARTZ
#define GTK_TOGGLE_GROUP_MOD_MASK 0
#else
#define GTK_TOGGLE_GROUP_MOD_MASK GDK_MOD1_MASK
#endif
gboolean _gtk_button_event_triggers_context_menu (GdkEventButton *event);
gboolean _gtk_translate_keyboard_accel_state (GdkKeymap *keymap,
guint hardware_keycode,
GdkModifierType state,
GdkModifierType accel_mask,
gint group,
guint *keyval,
gint *effective_group,
gint *level,
GdkModifierType *consumed_modifiers);
G_END_DECLS
#endif /* __GTK_PRIVATE_H__ */
+2 -2
View File
@@ -1060,7 +1060,7 @@ gtk_progress_bar_set_activity_mode (GtkProgressBar *pbar,
* of the bar. The fraction should be between 0.0 and 1.0,
* inclusive.
*
**/
*/
void
gtk_progress_bar_set_fraction (GtkProgressBar *pbar,
gdouble fraction)
@@ -1071,7 +1071,7 @@ gtk_progress_bar_set_fraction (GtkProgressBar *pbar,
priv = pbar->priv;
priv->fraction = fraction;
priv->fraction = CLAMP(fraction, 0.0, 1.0);
gtk_progress_bar_set_activity_mode (pbar, FALSE);
gtk_progress_bar_real_update (pbar);
+91
View File
@@ -35,9 +35,11 @@ _gtk_quartz_create_image_from_pixbuf (GdkPixbuf *pixbuf)
int rowstride, pixbuf_width, pixbuf_height;
gboolean has_alpha;
NSImage *nsimage;
NSSize nsimage_size;
pixbuf_width = gdk_pixbuf_get_width (pixbuf);
pixbuf_height = gdk_pixbuf_get_height (pixbuf);
g_return_val_if_fail (pixbuf_width != 0 && pixbuf_height != 0, NULL);
rowstride = gdk_pixbuf_get_rowstride (pixbuf);
has_alpha = gdk_pixbuf_get_has_alpha (pixbuf);
@@ -57,6 +59,13 @@ _gtk_quartz_create_image_from_pixbuf (GdkPixbuf *pixbuf)
CGColorSpaceRelease (colorspace);
nsimage = [[NSImage alloc] initWithSize:NSMakeSize (pixbuf_width, pixbuf_height)];
nsimage_size = [nsimage size];
if (nsimage_size.width == 0.0 && nsimage_size.height == 0.0)
{
[nsimage release];
g_critical ("%s returned a zero-sized image", G_STRFUNC);
return NULL;
}
[nsimage lockFocus];
context = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
@@ -310,3 +319,85 @@ _gtk_quartz_set_selection_data_for_pasteboard (NSPasteboard *pasteboard,
freeWhenDone:NO]
forType:type];
}
/*
* Bundle-based functions for various directories. These almost work
* even when the application isn't in a bundle, becuase mainBundle
* paths point to the bin directory in that case. It's a simple matter
* to test for that and remove the last element.
*/
static const gchar *
get_bundle_path (void)
{
static gchar *path = NULL;
if (path == NULL)
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
gchar *resource_path = g_strdup ([[[NSBundle mainBundle] resourcePath] UTF8String]);
gchar *base;
[pool drain];
base = g_path_get_basename (resource_path);
if (strcmp (base, "bin") == 0)
path = g_path_get_dirname (resource_path);
else
path = strdup (resource_path);
g_free (resource_path);
g_free (base);
}
return path;
}
const gchar *
_gtk_get_datadir (void)
{
static gchar *path = NULL;
if (path == NULL)
path = g_build_filename (get_bundle_path (), "share", NULL);
return path;
}
const gchar *
_gtk_get_libdir (void)
{
static gchar *path = NULL;
if (path == NULL)
path = g_build_filename (get_bundle_path (), "lib", NULL);
return path;
}
const gchar *
_gtk_get_localedir (void)
{
static gchar *path = NULL;
if (path == NULL)
path = g_build_filename (get_bundle_path (), "share", "locale", NULL);
return path;
}
const gchar *
_gtk_get_sysconfdir (void)
{
static gchar *path = NULL;
if (path == NULL)
path = g_build_filename (get_bundle_path (), "etc", NULL);
return path;
}
const gchar *
_gtk_get_data_prefix (void)
{
return get_bundle_path ();
}
+1 -1
View File
@@ -483,7 +483,7 @@ gtk_radio_button_new_with_mnemonic (GSList *group,
}
/**
* gtk_radio_button_new_from_widget:
* gtk_radio_button_new_from_widget: (constructor)
* @radio_group_member: (allow-none): an existing #GtkRadioButton.
*
* Creates a new #GtkRadioButton, adding it to the same group as
+3 -3
View File
@@ -298,7 +298,7 @@ gtk_radio_menu_item_new_with_mnemonic (GSList *group,
}
/**
* gtk_radio_menu_item_new_from_widget:
* gtk_radio_menu_item_new_from_widget: (constructor)
* @group: An existing #GtkRadioMenuItem
*
* Creates a new #GtkRadioMenuItem adding it to the same group as @group.
@@ -321,7 +321,7 @@ gtk_radio_menu_item_new_from_widget (GtkRadioMenuItem *group)
}
/**
* gtk_radio_menu_item_new_with_mnemonic_from_widget:
* gtk_radio_menu_item_new_with_mnemonic_from_widget: (constructor)
* @group: An existing #GtkRadioMenuItem
* @label: the text of the button, with an underscore in front of the
* mnemonic character
@@ -351,7 +351,7 @@ gtk_radio_menu_item_new_with_mnemonic_from_widget (GtkRadioMenuItem *group,
}
/**
* gtk_radio_menu_item_new_with_label_from_widget:
* gtk_radio_menu_item_new_with_label_from_widget: (constructor)
* @group: an existing #GtkRadioMenuItem
* @label: the text for the label
*
+14 -12
View File
@@ -129,7 +129,8 @@ gtk_radio_tool_button_set_property (GObject *object,
/**
* gtk_radio_tool_button_new:
* @group: (allow-none): An existing radio button group, or %NULL if you are creating a new group
* @group: (allow-none) (transfer none) (element-type GtkRadioButton): An
* existing radio button group, or %NULL if you are creating a new group
*
* Creates a new #GtkRadioToolButton, adding it to @group.
*
@@ -152,7 +153,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): 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.
@@ -182,8 +184,8 @@ gtk_radio_tool_button_new_from_stock (GSList *group,
}
/**
* gtk_radio_tool_button_new_from_widget:
* @group: An existing #GtkRadioToolButton
* gtk_radio_tool_button_new_from_widget: (constructor)
* @group: (allow-none): An existing #GtkRadioToolButton, or %NULL
*
* Creates a new #GtkRadioToolButton adding it to the same group as @gruup
*
@@ -196,17 +198,17 @@ gtk_radio_tool_button_new_from_widget (GtkRadioToolButton *group)
{
GSList *list = NULL;
g_return_val_if_fail (GTK_IS_RADIO_TOOL_BUTTON (group), NULL);
g_return_val_if_fail (group == NULL || GTK_IS_RADIO_TOOL_BUTTON (group), NULL);
if (group)
if (group != NULL)
list = gtk_radio_tool_button_get_group (GTK_RADIO_TOOL_BUTTON (group));
return gtk_radio_tool_button_new (list);
}
/**
* gtk_radio_tool_button_new_with_stock_from_widget:
* @group: An existing #GtkRadioToolButton.
* gtk_radio_tool_button_new_with_stock_from_widget: (constructor)
* @group: (allow-none): An existing #GtkRadioToolButton.
* @stock_id: the name of a stock item
*
* Creates a new #GtkRadioToolButton adding it to the same group as @group.
@@ -223,9 +225,9 @@ gtk_radio_tool_button_new_with_stock_from_widget (GtkRadioToolButton *group,
{
GSList *list = NULL;
g_return_val_if_fail (GTK_IS_RADIO_TOOL_BUTTON (group), NULL);
g_return_val_if_fail (group == NULL || GTK_IS_RADIO_TOOL_BUTTON (group), NULL);
if (group)
if (group != NULL)
list = gtk_radio_tool_button_get_group (group);
return gtk_radio_tool_button_new_from_stock (list, stock_id);
@@ -243,7 +245,7 @@ get_radio_button (GtkRadioToolButton *button)
*
* Returns the radio button group @button belongs to.
*
* Return value: (transfer none): The group @button belongs to.
* Return value: (transfer none) (element-type GtkRadioButton): The group @button belongs to.
*
* Since: 2.4
*/
@@ -258,7 +260,7 @@ gtk_radio_tool_button_get_group (GtkRadioToolButton *button)
/**
* gtk_radio_tool_button_set_group:
* @button: a #GtkRadioToolButton
* @group: an existing radio button group
* @group: (transfer none) (element-type GtkRadioButton): an existing radio button group
*
* Adds @button to @group, removing it from the group it belonged to before.
*
+1 -1
View File
@@ -1629,7 +1629,7 @@ modify_allocation_for_window_grip (GtkWidget *widget,
}
/* If the stepper button intersects the window resize grip.. */
if (gdk_rectangle_intersect (&grip_rect, &translated_rect, NULL))
if (gdk_rectangle_intersect (&grip_rect, &translated_rect, &grip_rect))
{
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
{
+25 -110
View File
@@ -83,124 +83,39 @@ binding "gtk-mac-entry"
class "GtkEntry" binding "gtk-mac-entry"
binding "gtk-mac-file-chooser"
binding "gtk-mac-cmd-arrows"
{
bind "<meta>v" { "location-popup-on-paste" () }
unbind "<ctrl>v"
bind "<meta><shift>G" { "location-popup" () }
bind "<meta><shift>H" { "home-folder" () }
bind "<meta>Up" { "up-folder" () }
bind "<meta>Left" { "move-cursor" (paragraph-ends, -1, 0) }
bind "<meta>KP_Left" { "move-cursor" (paragraph-ends, -1, 0) }
bind "<shift><meta>Left" { "move-cursor" (paragraph-ends, -1, 1) }
bind "<shift><meta>KP_Left" { "move-cursor" (paragraph-ends, -1, 1) }
bind "<meta>Right" { "move-cursor" (paragraph-ends, 1, 0) }
bind "<meta>KP_Right" { "move-cursor" (paragraph-ends, 1, 0) }
bind "<shift><meta>Right" { "move-cursor" (paragraph-ends, 1, 1) }
bind "<shift><meta>KP_Right" { "move-cursor" (paragraph-ends, 1, 1) }
}
class "GtkFileChooserDefault" binding "gtk-mac-file-chooser"
class "GtkTextView" binding "gtk-mac-cmd-arrows"
class "GtkLabel" binding "gtk-mac-cmd-arrows"
class "GtkEntry" binding "gtk-mac-cmd-arrows"
binding "gtk-mac-tree-view"
binding "gtk-mac-emacs-like"
{
bind "<meta>a" { "select-all" () }
bind "<shift><meta>a" { "unselect-all" () }
bind "<meta>f" { "start-interactive-search" () }
bind "<meta>F" { "start-interactive-search" () }
unbind "<ctrl>a"
unbind "<shift><ctrl>a"
unbind "<ctrl>f"
unbind "<ctrl>F"
bind "<ctrl>a" { "move-cursor" (paragraph-ends, -1, 0) }
bind "<shift><ctrl>a" { "move-cursor" (paragraph-ends, -1, 1) }
bind "<ctrl>e" { "move-cursor" (paragraph-ends, 1, 0) }
bind "<shift><ctrl>e" { "move-cursor" (paragraph-ends, 1, 1) }
bind "<ctrl>b" { "move-cursor" (logical-positions, -1, 0) }
bind "<shift><ctrl>b" { "move-cursor" (logical-positions, -1, 1) }
bind "<ctrl>f" { "move-cursor" (logical-positions, 1, 0) }
bind "<shift><ctrl>f" { "move-cursor" (logical-positions, 1, 1) }
}
class "GtkTreeView" binding "gtk-mac-tree-view"
binding "gtk-mac-icon-view"
{
bind "<meta>a" { "select-all" () }
bind "<shift><meta>a" { "unselect-all" () }
unbind "<ctrl>a"
unbind "<shift><ctrl>a"
}
class "GtkIconView" binding "gtk-mac-icon-view"
binding "gtk-mac-alt-arrows"
{
bind "<alt>Right" { "move-cursor" (words, 1, 0) }
bind "<alt>KP_Right" { "move-cursor" (words, 1, 0) }
bind "<alt>Left" { "move-cursor" (words, -1, 0) }
bind "<alt>KP_Left" { "move-cursor" (words, -1, 0) }
bind "<shift><alt>Right" { "move-cursor" (words, 1, 1) }
bind "<shift><alt>KP_Right" { "move-cursor" (words, 1, 1) }
bind "<shift><alt>Left" { "move-cursor" (words, -1, 1) }
bind "<shift><alt>KP_Left" { "move-cursor" (words, -1, 1) }
}
class "GtkTextView" binding "gtk-mac-alt-arrows"
class "GtkLabel" binding "gtk-mac-alt-arrows"
class "GtkEntry" binding "gtk-mac-alt-arrows"
binding "gtk-mac-alt-delete"
{
bind "<alt>Delete" { "delete-from-cursor" (word-ends, 1) }
bind "<alt>KP_Delete" { "delete-from-cursor" (word-ends, 1) }
bind "<alt>BackSpace" { "delete-from-cursor" (word-ends, -1) }
}
class "GtkTextView" binding "gtk-mac-alt-delete"
class "GtkEntry" binding "gtk-mac-alt-delete"
binding "gtk-mac-cmd-c"
{
bind "<meta>x" { "cut-clipboard" () }
bind "<meta>c" { "copy-clipboard" () }
bind "<meta>v" { "paste-clipboard" () }
unbind "<ctrl>x"
unbind "<ctrl>c"
unbind "<ctrl>v"
}
class "GtkTextView" binding "gtk-mac-cmd-c"
class "GtkEntry" binding "gtk-mac-cmd-c"
binding "gtk-mac-text-view"
{
bind "<shift><meta>a" { "select-all" (0) }
bind "<meta>a" { "select-all" (1) }
unbind "<shift><ctrl>a"
unbind "<ctrl>a"
}
class "GtkTextView" binding "gtk-mac-text-view"
binding "gtk-mac-label"
{
bind "<meta>a" {
"move-cursor" (paragraph-ends, -1, 0)
"move-cursor" (paragraph-ends, 1, 1)
}
bind "<shift><meta>a" { "move-cursor" (paragraph-ends, 0, 0) }
bind "<meta>c" { "copy-clipboard" () }
unbind "<ctrl>a"
unbind "<shift><ctrl>a"
unbind "<ctrl>c"
}
class "GtkLabel" binding "gtk-mac-label"
binding "gtk-mac-entry"
{
bind "<meta>a" {
"move-cursor" (buffer-ends, -1, 0)
"move-cursor" (buffer-ends, 1, 1)
}
bind "<shift><meta>a" { "move-cursor" (visual-positions, 0, 0) }
unbind "<ctrl>a"
unbind "<shift><ctrl>a"
}
class "GtkEntry" binding "gtk-mac-entry"
class "GtkTextView" binding "gtk-mac-emacs-like"
class "GtkLabel" binding "gtk-mac-emacs-like"
class "GtkEntry" binding "gtk-mac-emacs-like
binding "gtk-mac-file-chooser"
+9 -16
View File
@@ -729,21 +729,11 @@ gtk_recent_manager_add_item_query_info (GObject *source_object,
GtkRecentManager *manager = user_data;
GtkRecentData recent_data;
GFileInfo *file_info;
gchar *uri;
GError *error;
gchar *uri, *basename;
uri = g_file_get_uri (file);
error = NULL;
file_info = g_file_query_info_finish (file, res, &error);
if (error)
{
g_warning ("Unable to retrieve the file info for `%s': %s",
uri,
error->message);
g_error_free (error);
goto out;
}
file_info = g_file_query_info_finish (file, res, NULL); /* NULL-GError */
recent_data.display_name = NULL;
recent_data.description = NULL;
@@ -763,7 +753,11 @@ gtk_recent_manager_add_item_query_info (GObject *source_object,
g_object_unref (file_info);
}
else
recent_data.mime_type = g_strdup (GTK_RECENT_DEFAULT_MIME);
{
basename = g_file_get_basename (file);
recent_data.mime_type = g_content_type_guess (basename, NULL, 0, NULL);
g_free (basename);
}
recent_data.app_name = g_strdup (g_get_application_name ());
recent_data.app_exec = g_strjoin (" ", g_get_prgname (), "%u", NULL);
@@ -785,7 +779,6 @@ gtk_recent_manager_add_item_query_info (GObject *source_object,
g_free (recent_data.app_name);
g_free (recent_data.app_exec);
out:
g_object_unref (manager);
g_free (uri);
}
@@ -2037,7 +2030,7 @@ gboolean
gtk_recent_info_exists (GtkRecentInfo *info)
{
gchar *filename;
struct stat stat_buf;
GStatBuf stat_buf;
gboolean retval = FALSE;
g_return_val_if_fail (info != NULL, FALSE);
@@ -2049,7 +2042,7 @@ gtk_recent_info_exists (GtkRecentInfo *info)
filename = g_filename_from_uri (info->uri, NULL, NULL);
if (filename)
{
if (stat (filename, &stat_buf) == 0)
if (g_stat (filename, &stat_buf) == 0)
retval = TRUE;
g_free (filename);
+1 -1
View File
@@ -1487,7 +1487,7 @@ compare_marks (gpointer a, gpointer b)
ma = a; mb = b;
return (gint) (ma->value - mb->value);
return (ma->value > mb->value) ? 1 : ((ma->value == mb->value) ? 0 : -1);
}
/**
+1 -1
View File
@@ -1147,7 +1147,7 @@ gtk_settings_class_init (GtkSettingsClass *class)
* Dark themes should not be used for documents, where large spaces are white/light
* and the dark chrome creates too much contrast (web browser, text editor...).
*
* Since: 2.22
* Since: 3.0
*/
result = settings_install_property_parser (class,
g_param_spec_boolean ("gtk-application-prefer-dark-theme",
+1 -6
View File
@@ -664,12 +664,7 @@ gtk_statusbar_size_allocate (GtkWidget *widget,
gtk_window_resize_grip_is_visible (GTK_WINDOW (window)))
{
gtk_window_get_resize_grip_area (GTK_WINDOW (window), &rect);
if (gtk_widget_translate_coordinates (gtk_widget_get_parent (widget),
window,
allocation->x,
allocation->y,
&x,
&y))
if (gtk_widget_translate_coordinates (widget, window, 0, 0, &x, &y))
{
translated_rect.x = x;
translated_rect.y = y;
+11 -11
View File
@@ -325,19 +325,19 @@ static const GtkStockItem builtin_items [] =
{ GTK_STOCK_CANCEL, NC_("Stock label", "_Cancel"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_CDROM, NC_("Stock label", "_CD-ROM"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_CLEAR, NC_("Stock label", "_Clear"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_CLOSE, NC_("Stock label", "_Close"), GTK_DEFAULT_ACCEL_MOD_MASK, 'w', GETTEXT_PACKAGE },
{ GTK_STOCK_CLOSE, NC_("Stock label", "_Close"), GTK_DEFAULT_ACCEL_MOD_MASK_VIRTUAL, 'w', GETTEXT_PACKAGE },
{ GTK_STOCK_CONNECT, NC_("Stock label", "C_onnect"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_CONVERT, NC_("Stock label", "_Convert"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_COPY, NC_("Stock label", "_Copy"), GTK_DEFAULT_ACCEL_MOD_MASK, 'c', GETTEXT_PACKAGE },
{ GTK_STOCK_CUT, NC_("Stock label", "Cu_t"), GTK_DEFAULT_ACCEL_MOD_MASK, 'x', GETTEXT_PACKAGE },
{ GTK_STOCK_COPY, NC_("Stock label", "_Copy"), GTK_DEFAULT_ACCEL_MOD_MASK_VIRTUAL, 'c', GETTEXT_PACKAGE },
{ GTK_STOCK_CUT, NC_("Stock label", "Cu_t"), GTK_DEFAULT_ACCEL_MOD_MASK_VIRTUAL, 'x', GETTEXT_PACKAGE },
{ GTK_STOCK_DELETE, NC_("Stock label", "_Delete"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_DISCARD, NC_("Stock label", "_Discard"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_DISCONNECT, NC_("Stock label", "_Disconnect"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_EXECUTE, NC_("Stock label", "_Execute"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_EDIT, NC_("Stock label", "_Edit"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_FILE, NC_("Stock label", "_File"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_FIND, NC_("Stock label", "_Find"), GTK_DEFAULT_ACCEL_MOD_MASK, 'f', GETTEXT_PACKAGE },
{ GTK_STOCK_FIND_AND_REPLACE, NC_("Stock label", "Find and _Replace"), GTK_DEFAULT_ACCEL_MOD_MASK, 'r', GETTEXT_PACKAGE },
{ GTK_STOCK_FIND, NC_("Stock label", "_Find"), GTK_DEFAULT_ACCEL_MOD_MASK_VIRTUAL, 'f', GETTEXT_PACKAGE },
{ GTK_STOCK_FIND_AND_REPLACE, NC_("Stock label", "Find and _Replace"), GTK_DEFAULT_ACCEL_MOD_MASK_VIRTUAL, 'r', GETTEXT_PACKAGE },
{ GTK_STOCK_FLOPPY, NC_("Stock label", "_Floppy"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_FULLSCREEN, NC_("Stock label", "_Fullscreen"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_LEAVE_FULLSCREEN, NC_("Stock label", "_Leave Fullscreen"), 0, 0, GETTEXT_PACKAGE },
@@ -358,7 +358,7 @@ static const GtkStockItem builtin_items [] =
/* This is a navigation label as in "go up" */
{ GTK_STOCK_GO_UP, NC_("Stock label, navigation", "_Up"), 0, 0, GETTEXT_PACKAGE "-navigation" },
{ GTK_STOCK_HARDDISK, NC_("Stock label", "_Hard Disk"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_HELP, NC_("Stock label", "_Help"), GTK_DEFAULT_ACCEL_MOD_MASK, 'h', GETTEXT_PACKAGE },
{ GTK_STOCK_HELP, NC_("Stock label", "_Help"), GTK_DEFAULT_ACCEL_MOD_MASK_VIRTUAL, 'h', GETTEXT_PACKAGE },
{ GTK_STOCK_HOME, NC_("Stock label", "_Home"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_INDENT, NC_("Stock label", "Increase Indent"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_UNINDENT, NC_("Stock label", "Decrease Indent"), 0, 0, GETTEXT_PACKAGE },
@@ -392,10 +392,10 @@ static const GtkStockItem builtin_items [] =
/* Media label */
{ GTK_STOCK_MEDIA_STOP, NC_("Stock label, media", "_Stop"), 0, 0, GETTEXT_PACKAGE "-media" },
{ GTK_STOCK_NETWORK, NC_("Stock label", "_Network"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_NEW, NC_("Stock label", "_New"), GTK_DEFAULT_ACCEL_MOD_MASK, 'n', GETTEXT_PACKAGE },
{ GTK_STOCK_NEW, NC_("Stock label", "_New"), GTK_DEFAULT_ACCEL_MOD_MASK_VIRTUAL, 'n', GETTEXT_PACKAGE },
{ GTK_STOCK_NO, NC_("Stock label", "_No"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_OK, NC_("Stock label", "_OK"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_OPEN, NC_("Stock label", "_Open"), GTK_DEFAULT_ACCEL_MOD_MASK, 'o', GETTEXT_PACKAGE },
{ GTK_STOCK_OPEN, NC_("Stock label", "_Open"), GTK_DEFAULT_ACCEL_MOD_MASK_VIRTUAL, 'o', GETTEXT_PACKAGE },
/* Page orientation */
{ GTK_STOCK_ORIENTATION_LANDSCAPE, NC_("Stock label", "Landscape"), 0, 0, GETTEXT_PACKAGE },
/* Page orientation */
@@ -405,17 +405,17 @@ static const GtkStockItem builtin_items [] =
/* Page orientation */
{ GTK_STOCK_ORIENTATION_REVERSE_PORTRAIT, NC_("Stock label", "Reverse portrait"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_PAGE_SETUP, NC_("Stock label", "Page Set_up"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_PASTE, NC_("Stock label", "_Paste"), GTK_DEFAULT_ACCEL_MOD_MASK, 'v', GETTEXT_PACKAGE },
{ GTK_STOCK_PASTE, NC_("Stock label", "_Paste"), GTK_DEFAULT_ACCEL_MOD_MASK_VIRTUAL, 'v', GETTEXT_PACKAGE },
{ GTK_STOCK_PREFERENCES, NC_("Stock label", "_Preferences"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_PRINT, NC_("Stock label", "_Print"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_PRINT_PREVIEW, NC_("Stock label", "Print Pre_view"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_PROPERTIES, NC_("Stock label", "_Properties"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_QUIT, NC_("Stock label", "_Quit"), GTK_DEFAULT_ACCEL_MOD_MASK, 'q', GETTEXT_PACKAGE },
{ GTK_STOCK_QUIT, NC_("Stock label", "_Quit"), GTK_DEFAULT_ACCEL_MOD_MASK_VIRTUAL, 'q', GETTEXT_PACKAGE },
{ GTK_STOCK_REDO, NC_("Stock label", "_Redo"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_REFRESH, NC_("Stock label", "_Refresh"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_REMOVE, NC_("Stock label", "_Remove"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_REVERT_TO_SAVED, NC_("Stock label", "_Revert"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_SAVE, NC_("Stock label", "_Save"), GTK_DEFAULT_ACCEL_MOD_MASK, 's', GETTEXT_PACKAGE },
{ GTK_STOCK_SAVE, NC_("Stock label", "_Save"), GTK_DEFAULT_ACCEL_MOD_MASK_VIRTUAL, 's', GETTEXT_PACKAGE },
{ GTK_STOCK_SAVE_AS, NC_("Stock label", "Save _As"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_SELECT_ALL, NC_("Stock label", "Select _All"), 0, 0, GETTEXT_PACKAGE },
{ GTK_STOCK_SELECT_COLOR, NC_("Stock label", "_Color"), 0, 0, GETTEXT_PACKAGE },
+3 -3
View File
@@ -131,7 +131,7 @@ gtk_symbolic_color_new_name (const gchar *name)
}
/**
* gtk_symbolic_color_new_shade:
* gtk_symbolic_color_new_shade: (constructor)
* @color: another #GtkSymbolicColor
* @factor: shading factor to apply to @color
*
@@ -162,7 +162,7 @@ gtk_symbolic_color_new_shade (GtkSymbolicColor *color,
}
/**
* gtk_symbolic_color_new_alpha:
* gtk_symbolic_color_new_alpha: (constructor)
* @color: another #GtkSymbolicColor
* @factor: factor to apply to @color alpha
*
@@ -193,7 +193,7 @@ gtk_symbolic_color_new_alpha (GtkSymbolicColor *color,
}
/**
* gtk_symbolic_color_new_mix:
* gtk_symbolic_color_new_mix: (constructor)
* @color1: color to mix
* @color2: another color to mix
* @factor: mix factor
+6 -3
View File
@@ -8153,6 +8153,7 @@ typedef struct
GtkTextView *text_view;
gint button;
guint time;
GdkDevice *device;
} PopupInfo;
static gboolean
@@ -8306,9 +8307,9 @@ popup_targets_received (GtkClipboard *clipboard,
0,
priv->popup_menu);
if (info->button)
gtk_menu_popup (GTK_MENU (priv->popup_menu), NULL, NULL,
NULL, NULL,
if (info->device)
gtk_menu_popup_for_device (GTK_MENU (priv->popup_menu),
info->device, NULL, NULL, NULL, NULL, NULL,
info->button, info->time);
else
{
@@ -8339,11 +8340,13 @@ gtk_text_view_do_popup (GtkTextView *text_view,
{
info->button = event->button;
info->time = event->time;
info->device = event->device;
}
else
{
info->button = 0;
info->time = gtk_get_current_event_time ();
info->device = NULL;
}
gtk_clipboard_request_contents (gtk_widget_get_clipboard (GTK_WIDGET (text_view),
+32 -34
View File
@@ -39,6 +39,7 @@
#include "gtkarrow.h"
#include "gtkbindings.h"
#include "gtkcontainerprivate.h"
#include "gtkimage.h"
#include "gtklabel.h"
#include "gtkmainprivate.h"
@@ -120,8 +121,6 @@ struct _GtkToolbarPrivate
GTimer *timer;
GtkWidgetPath *sibling_path;
gulong settings_connection;
gint idle_id;
@@ -233,6 +232,8 @@ static GtkWidgetPath * gtk_toolbar_get_path_for_child
GtkWidget *child);
static void gtk_toolbar_invalidate_order (GtkToolbar *toolbar);
static void gtk_toolbar_direction_changed (GtkWidget *widget,
GtkTextDirection previous_direction);
static void gtk_toolbar_orientation_changed (GtkToolbar *toolbar,
GtkOrientation orientation);
static void gtk_toolbar_real_style_changed (GtkToolbar *toolbar,
@@ -398,6 +399,7 @@ gtk_toolbar_class_init (GtkToolbarClass *klass)
widget_class->unmap = gtk_toolbar_unmap;
widget_class->popup_menu = gtk_toolbar_popup_menu;
widget_class->show_all = gtk_toolbar_show_all;
widget_class->direction_changed = gtk_toolbar_direction_changed;
container_class->add = gtk_toolbar_add;
container_class->remove = gtk_toolbar_remove;
@@ -3159,9 +3161,6 @@ gtk_toolbar_finalize (GObject *object)
GtkToolbar *toolbar = GTK_TOOLBAR (object);
GtkToolbarPrivate *priv = toolbar->priv;
if (priv->sibling_path != NULL)
gtk_widget_path_unref (priv->sibling_path);
g_list_free_full (priv->content, (GDestroyNotify)toolbar_content_free);
g_timer_destroy (priv->timer);
@@ -3304,7 +3303,7 @@ toolbar_content_new_tool_item (GtkToolbar *toolbar,
content->is_placeholder = is_placeholder;
priv->content = g_list_insert (priv->content, content, pos);
gtk_widget_set_parent (GTK_WIDGET (item), GTK_WIDGET (toolbar));
gtk_toolbar_invalidate_order (toolbar);
@@ -3934,37 +3933,34 @@ gtk_toolbar_get_path_for_child (GtkContainer *container,
GtkWidgetPath *path;
GtkToolbar *toolbar;
GtkToolbarPrivate *priv;
GtkWidgetPath *sibling_path;
gint vis_index;
GList *children;
toolbar = GTK_TOOLBAR (container);
priv = toolbar->priv;
if (priv->sibling_path == NULL)
{
GList *children;
/* build a path for all the visible children;
* get_children works in visible order
*/
sibling_path = gtk_widget_path_new ();
children = _gtk_container_get_all_children (container);
/* build a path for all the visible children;
* get_children works in visible order
*/
priv->sibling_path = gtk_widget_path_new ();
children = gtk_container_get_children (container);
if (priv->orientation != GTK_ORIENTATION_HORIZONTAL ||
gtk_widget_get_direction (GTK_WIDGET (toolbar)) != GTK_TEXT_DIR_RTL)
children = g_list_reverse (children);
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL &&
gtk_widget_get_direction (GTK_WIDGET (toolbar)) == GTK_TEXT_DIR_RTL)
children = g_list_reverse (children);
g_list_foreach (children, add_widget_to_path, priv->sibling_path);
g_list_free (children);
}
g_list_foreach (children, add_widget_to_path, sibling_path);
g_list_free (children);
path = gtk_widget_path_copy (gtk_widget_get_path (GTK_WIDGET (container)));
if (gtk_widget_get_visible (child))
{
vis_index = gtk_toolbar_get_visible_position (toolbar, child);
if (vis_index < gtk_widget_path_length (priv->sibling_path))
if (vis_index < gtk_widget_path_length (sibling_path))
gtk_widget_path_append_with_siblings (path,
priv->sibling_path,
sibling_path,
vis_index);
else
gtk_widget_path_append_for_widget (path, child);
@@ -3972,22 +3968,24 @@ gtk_toolbar_get_path_for_child (GtkContainer *container,
else
gtk_widget_path_append_for_widget (path, child);
gtk_widget_path_unref (sibling_path);
return path;
}
static void
gtk_toolbar_invalidate_order (GtkToolbar *toolbar)
{
GtkToolbarPrivate *priv = toolbar->priv;
if (priv->sibling_path != NULL)
{
gtk_widget_path_unref (priv->sibling_path);
priv->sibling_path = NULL;
gtk_container_foreach (GTK_CONTAINER (toolbar),
(GtkCallback) gtk_widget_reset_style,
NULL);
}
gtk_container_forall (GTK_CONTAINER (toolbar),
(GtkCallback) gtk_widget_reset_style,
NULL);
}
static void
gtk_toolbar_direction_changed (GtkWidget *widget,
GtkTextDirection previous_direction)
{
GTK_WIDGET_CLASS (gtk_toolbar_parent_class)->direction_changed (widget, previous_direction);
gtk_toolbar_invalidate_order (GTK_TOOLBAR (widget));
}
+3 -3
View File
@@ -972,9 +972,9 @@ gtk_tool_button_new_from_stock (const gchar *stock_id)
/**
* gtk_tool_button_new:
* @label: (allow-none): a string that will be used as label, or %NULL
* @icon_widget: (allow-none): a #GtkMisc widget that will be used as icon widget, or %NULL
* @icon_widget: (allow-none): a widget that will be used as the button contents, or %NULL
*
* Creates a new %GtkToolButton using @icon_widget as icon and @label as
* Creates a new %GtkToolButton using @icon_widget as contents and @label as
* label.
*
* Return value: A new #GtkToolButton
@@ -987,7 +987,7 @@ gtk_tool_button_new (GtkWidget *icon_widget,
{
GtkToolButton *button;
g_return_val_if_fail (icon_widget == NULL || GTK_IS_MISC (icon_widget), NULL);
g_return_val_if_fail (icon_widget == NULL || GTK_IS_WIDGET (icon_widget), NULL);
button = g_object_new (GTK_TYPE_TOOL_BUTTON,
"label", label,
+25 -24
View File
@@ -2073,17 +2073,17 @@ gtk_tree_model_filter_row_changed (GtkTreeModel *c_model,
if (current_state == TRUE && requested_state == TRUE)
{
/* propagate the signal; also get a path taking only visible
* nodes into account.
*/
gtk_tree_path_free (path);
path = gtk_tree_model_get_path (GTK_TREE_MODEL (filter), &iter);
level = FILTER_LEVEL (iter.user_data);
elt = FILTER_ELT (iter.user_data2);
if (gtk_tree_model_filter_elt_is_visible_in_target (level, elt))
{
/* propagate the signal; also get a path taking only visible
* nodes into account.
*/
gtk_tree_path_free (path);
path = gtk_tree_model_get_path (GTK_TREE_MODEL (filter), &iter);
if (level->ext_ref_count > 0)
gtk_tree_model_row_changed (GTK_TREE_MODEL (filter), path, &iter);
@@ -2614,20 +2614,21 @@ gtk_tree_model_filter_row_deleted (GtkTreeModel *c_model,
gtk_tree_model_filter_real_unref_node (GTK_TREE_MODEL (data), &iter,
TRUE, FALSE);
if (elt->children)
/* If this last node has children, then the recursion in free_level
* will release this reference.
*/
while (elt->ref_count > 1)
gtk_tree_model_filter_real_unref_node (GTK_TREE_MODEL (data), &iter,
FALSE, FALSE);
else
while (elt->ref_count > 0)
gtk_tree_model_filter_real_unref_node (GTK_TREE_MODEL (data), &iter,
FALSE, FALSE);
if (g_sequence_get_length (level->seq) == 1)
{
if (elt->children)
/* If this last node has children, then the recursion in free_level
* will release this reference.
*/
while (elt->ref_count > 1)
gtk_tree_model_filter_real_unref_node (GTK_TREE_MODEL (data), &iter,
FALSE, FALSE);
else
while (elt->ref_count > 0)
gtk_tree_model_filter_real_unref_node (GTK_TREE_MODEL (data), &iter,
FALSE, FALSE);
/* kill level */
gtk_tree_model_filter_free_level (filter, level, FALSE, TRUE, FALSE);
}
@@ -2636,16 +2637,16 @@ gtk_tree_model_filter_row_deleted (GtkTreeModel *c_model,
GSequenceIter *tmp;
gboolean is_first;
/* Release last references, if needed */
while (elt->ref_count > 0)
gtk_tree_model_filter_real_unref_node (GTK_TREE_MODEL (data), &iter,
FALSE, FALSE);
lookup_elt_with_offset (level->seq, elt->offset, &siter);
is_first = g_sequence_get_begin_iter (level->seq) == siter;
if (elt->children)
gtk_tree_model_filter_free_level (filter, elt->children,
FALSE, TRUE, FALSE);
/* remove the row */
g_sequence_remove (elt->visible_siter);
if (elt->visible_siter)
g_sequence_remove (elt->visible_siter);
tmp = g_sequence_iter_next (siter);
g_sequence_remove (siter);
g_sequence_foreach_range (tmp, g_sequence_get_end_iter (level->seq),
+38 -32
View File
@@ -2179,11 +2179,25 @@ gtk_tree_view_map (GtkWidget *widget)
gdk_window_show (gtk_widget_get_window (widget));
}
static void
gtk_tree_view_ensure_background (GtkTreeView *tree_view)
{
GtkStyleContext *context;
context = gtk_widget_get_style_context (GTK_WIDGET (tree_view));
gtk_style_context_save (context);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_VIEW);
gtk_style_context_set_background (context, tree_view->priv->bin_window);
gtk_style_context_restore (context);
gtk_style_context_set_background (context, tree_view->priv->header_window);
}
static void
gtk_tree_view_realize (GtkWidget *widget)
{
GtkAllocation allocation;
GtkStyleContext *context;
GtkTreeView *tree_view = GTK_TREE_VIEW (widget);
GdkWindow *window;
GdkWindowAttr attributes;
@@ -2252,14 +2266,7 @@ gtk_tree_view_realize (GtkWidget *widget)
&attributes, attributes_mask);
gdk_window_set_user_data (tree_view->priv->header_window, widget);
context = gtk_widget_get_style_context (widget);
gtk_style_context_save (context);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_VIEW);
gtk_style_context_set_background (context, tree_view->priv->bin_window);
gtk_style_context_restore (context);
gtk_style_context_set_background (context, tree_view->priv->header_window);
gtk_tree_view_ensure_background (tree_view);
tmp_list = tree_view->priv->children;
while (tmp_list)
@@ -5916,7 +5923,9 @@ gtk_tree_view_leave_notify (GtkWidget *widget,
{
GtkTreeView *tree_view;
if (event->mode == GDK_CROSSING_GRAB)
if (event->mode == GDK_CROSSING_GRAB ||
event->mode == GDK_CROSSING_GTK_GRAB ||
event->mode == GDK_CROSSING_GTK_UNGRAB)
return TRUE;
tree_view = GTK_TREE_VIEW (widget);
@@ -7587,7 +7596,14 @@ gtk_tree_view_drag_begin (GtkWidget *widget,
&cell_x,
&cell_y);
g_return_if_fail (path != NULL);
/* If path is NULL, there's nothing we can drag. For now, we silently
* bail out. Actually, dragging should not be possible from an empty
* tree view, but there's no way we can cancel that from here.
* Automatically unsetting the tree view as drag source for empty models
* is something that would likely break other people's code ...
*/
if (!path)
return;
row_pix = gtk_tree_view_create_row_drag_icon (tree_view,
path);
@@ -7955,8 +7971,9 @@ gtk_tree_view_drag_data_received (GtkWidget *widget,
(gdk_drag_context_get_selected_action (context) == GDK_ACTION_MOVE),
time);
if (gtk_tree_path_get_depth (dest_row) == 1
&& gtk_tree_path_get_indices (dest_row)[0] == 0)
if (gtk_tree_path_get_depth (dest_row) == 1 &&
gtk_tree_path_get_indices (dest_row)[0] == 0 &&
gtk_tree_model_iter_n_children (tree_view->priv->model, NULL) != 0)
{
/* special special case drag to "0", scroll to first item */
if (!tree_view->priv->scroll_to_path)
@@ -8445,16 +8462,7 @@ gtk_tree_view_style_updated (GtkWidget *widget)
if (gtk_widget_get_realized (widget))
{
GtkStyleContext *context;
context = gtk_widget_get_style_context (widget);
gtk_style_context_save (context);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_VIEW);
gtk_style_context_set_background (context, tree_view->priv->bin_window);
gtk_style_context_restore (context);
gtk_style_context_set_background (context, tree_view->priv->header_window);
gtk_tree_view_ensure_background (tree_view);
gtk_tree_view_set_grid_lines (tree_view, tree_view->priv->grid_lines);
gtk_tree_view_set_enable_tree_lines (tree_view, tree_view->priv->tree_lines_enabled);
@@ -11319,6 +11327,9 @@ gtk_tree_view_set_model (GtkTreeView *tree_view,
tree_view->priv->scroll_to_path = NULL;
}
if (tree_view->priv->rubber_band_status)
gtk_tree_view_stop_rubber_band (tree_view);
if (tree_view->priv->model)
{
GList *tmplist = tree_view->priv->columns;
@@ -11838,7 +11849,7 @@ _gtk_tree_view_reset_header_styles (GtkTreeView *tree_view)
GtkTreeViewColumn *column = columns->data;
GtkWidget *header_widget;
if (gtk_tree_view_column_get_visible (column))
if (!gtk_tree_view_column_get_visible (column))
continue;
header_widget = gtk_tree_view_column_get_widget (column);
@@ -15822,13 +15833,7 @@ gtk_tree_view_state_flags_changed (GtkWidget *widget,
GtkStateFlags previous_state)
{
if (gtk_widget_get_realized (widget))
{
GtkTreeView *tree_view = GTK_TREE_VIEW (widget);
GtkStyleContext *context;
context = gtk_widget_get_style_context (widget);
gtk_style_context_set_background (context, tree_view->priv->bin_window);
}
gtk_tree_view_ensure_background (GTK_TREE_VIEW (widget));
gtk_widget_queue_draw (widget);
}
@@ -16225,7 +16230,8 @@ gtk_tree_view_set_tooltip_cell (GtkTreeView *tree_view,
* @x: (inout): the x coordinate (relative to widget coordinates)
* @y: (inout): the y coordinate (relative to widget coordinates)
* @keyboard_tip: whether this is a keyboard tooltip or not
* @model: (out) (allow-none): a pointer to receive a #GtkTreeModel or %NULL
* @model: (out) (allow-none) (transfer none): a pointer to receive a
* #GtkTreeModel or %NULL
* @path: (out) (allow-none): a pointer to receive a #GtkTreePath or %NULL
* @iter: (out) (allow-none): a pointer to receive a #GtkTreeIter or %NULL
*
+21 -7
View File
@@ -12089,19 +12089,33 @@ gtk_widget_real_get_accessible (GtkWidget *widget)
accessible =
atk_object_factory_create_accessible (factory,
G_OBJECT (widget));
if (priv->accessible_role != ATK_ROLE_INVALID)
atk_object_set_role (accessible, priv->accessible_role);
g_object_set_qdata (G_OBJECT (widget),
quark_accessible_object,
accessible);
}
else
{
accessible = g_object_new (priv->accessible_type, NULL);
if (priv->accessible_role != ATK_ROLE_INVALID)
atk_object_set_role (accessible, priv->accessible_role);
g_object_set_qdata (G_OBJECT (widget),
quark_accessible_object,
accessible);
atk_object_initialize (accessible, widget);
/* Set the role again, since we don't want a role set
* in some parent initialize() function to override
* our own.
*/
if (priv->accessible_role != ATK_ROLE_INVALID)
atk_object_set_role (accessible, priv->accessible_role);
}
if (priv->accessible_role != ATK_ROLE_INVALID)
atk_object_set_role (accessible, priv->accessible_role);
g_object_set_qdata (G_OBJECT (widget),
quark_accessible_object,
accessible);
}
return accessible;
}
+1 -1
View File
@@ -5297,7 +5297,7 @@ set_grip_shape (GtkWindow *window)
width = gdk_window_get_width (priv->grip_window);
height = gdk_window_get_height (priv->grip_window);
surface = cairo_image_surface_create (CAIRO_FORMAT_A8, width, height);
surface = cairo_image_surface_create (CAIRO_FORMAT_A1, width, height);
cr = cairo_create (surface);
cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 0.0);
+199 -1
View File
@@ -2420,6 +2420,10 @@ insert_before (void)
signal_monitor_assert_is_empty (monitor);
check_level_length (GTK_TREE_MODEL_FILTER (filter), NULL, 3);
g_object_unref (filter);
g_object_unref (store);
gtk_widget_destroy (tree_view);
}
static void
@@ -2479,6 +2483,10 @@ insert_child (void)
signal_monitor_assert_is_empty (monitor);
check_level_length (GTK_TREE_MODEL_FILTER (filter), NULL, 1);
g_object_unref (filter);
g_object_unref (store);
gtk_widget_destroy (tree_view);
}
@@ -5003,6 +5011,10 @@ specific_has_child_filter (void)
set_path_visibility (&fixture, "0", FALSE);
/* check_filter_model (&fixture); */
signal_monitor_assert_is_empty (fixture.monitor);
g_object_unref (fixture.filter);
g_object_unref (fixture.store);
gtk_widget_destroy (tree_view);
}
@@ -5163,6 +5175,10 @@ specific_root_has_child_filter (void)
set_path_visibility (&fixture, "0", FALSE);
/* check_filter_model (&fixture); */
signal_monitor_assert_is_empty (fixture.monitor);
g_object_unref (fixture.filter);
g_object_unref (fixture.store);
gtk_widget_destroy (tree_view);
}
static void
@@ -5269,6 +5285,10 @@ specific_has_child_filter_on_sort_model (void)
set_path_visibility (&fixture, "0", FALSE);
/* check_filter_model (&fixture); */
signal_monitor_assert_is_empty (fixture.monitor);
g_object_unref (fixture.filter);
g_object_unref (fixture.store);
gtk_widget_destroy (tree_view);
}
static gboolean
@@ -5386,11 +5406,16 @@ specific_at_least_2_children_filter (void)
set_path_visibility (&fixture, "0", FALSE);
/* check_filter_model (&fixture); */
signal_monitor_assert_is_empty (fixture.monitor);
g_object_unref (fixture.filter);
g_object_unref (fixture.store);
gtk_widget_destroy (tree_view);
}
static void
specific_at_least_2_children_filter_on_sort_model (void)
{
GtkTreeRowReference *ref;
GtkTreeModel *filter;
GtkTreeModel *sort_model;
GtkTreeIter iter, root;
@@ -5427,7 +5452,6 @@ specific_at_least_2_children_filter_on_sort_model (void)
{
GtkTreePath *path = gtk_tree_path_new_from_indices (0, 0, -1);
GtkTreeRowReference *ref;
ref = gtk_tree_row_reference_new (sort_model, path);
gtk_tree_path_free (path);
@@ -5462,6 +5486,11 @@ specific_at_least_2_children_filter_on_sort_model (void)
gtk_tree_store_append (fixture.store, &root, NULL);
check_level_length (fixture.filter, NULL, 1);
signal_monitor_assert_is_empty (fixture.monitor);
gtk_tree_row_reference_free (ref);
g_object_unref (fixture.filter);
g_object_unref (fixture.store);
gtk_widget_destroy (tree_view);
}
@@ -6568,6 +6597,169 @@ specific_bug_658696 (void)
/* This used to cause a crash in gtk_tree_model_filter_check_ancestors() */
gtk_tree_store_append (store, &iter, NULL);
g_object_unref (store);
g_object_unref (filter);
}
static gboolean
specific_bug_659022_visible_func (GtkTreeModel *model,
GtkTreeIter *iter,
gpointer data)
{
GtkTreeIter tmp;
if (!gtk_tree_model_iter_parent (model, &tmp, iter))
{
if (gtk_tree_model_iter_n_children (model, iter) >= 2)
return TRUE;
else
return FALSE;
}
return TRUE;
}
static void
specific_bug_659022_row_changed_emission (void)
{
GtkTreeModel *filter;
GtkTreeModel *model;
GtkTreeModelRefCount *ref_model;
GtkTreeIter parent, child, child2;
GtkTreePath *path;
GtkWidget *tree_view;
model = gtk_tree_model_ref_count_new ();
ref_model = GTK_TREE_MODEL_REF_COUNT (model);
filter = gtk_tree_model_filter_new (model, NULL);
gtk_tree_model_filter_set_visible_func (GTK_TREE_MODEL_FILTER (filter),
specific_bug_659022_visible_func,
NULL, NULL);
tree_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (filter));
gtk_tree_store_insert (GTK_TREE_STORE (model), &parent, NULL, 0);
gtk_tree_store_insert (GTK_TREE_STORE (model), &child, &parent, 0);
gtk_tree_store_insert (GTK_TREE_STORE (model), &child2, &parent, 0);
gtk_tree_view_expand_all (GTK_TREE_VIEW (tree_view));
gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (filter));
gtk_tree_store_remove (GTK_TREE_STORE (model), &child2);
gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (filter));
path = gtk_tree_model_get_path (model, &child);
gtk_tree_model_row_changed (model, path, &child);
gtk_tree_path_free (path);
gtk_widget_destroy (tree_view);
g_object_unref (filter);
g_object_unref (model);
}
static void
specific_bug_659022_row_deleted_node_invisible (void)
{
GtkTreeModel *filter;
GtkTreeModel *model;
GtkTreeModelRefCount *ref_model;
GtkTreeIter parent, child;
GtkTreeIter parent2, child2, child3;
GtkWidget *tree_view;
model = gtk_tree_model_ref_count_new ();
ref_model = GTK_TREE_MODEL_REF_COUNT (model);
filter = gtk_tree_model_filter_new (model, NULL);
gtk_tree_model_filter_set_visible_func (GTK_TREE_MODEL_FILTER (filter),
specific_bug_659022_visible_func,
NULL, NULL);
tree_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (filter));
gtk_tree_store_insert (GTK_TREE_STORE (model), &parent, NULL, 0);
gtk_tree_store_insert (GTK_TREE_STORE (model), &child, &parent, 0);
gtk_tree_store_insert (GTK_TREE_STORE (model), &parent2, NULL, 0);
gtk_tree_store_insert (GTK_TREE_STORE (model), &child2, &parent2, 0);
gtk_tree_store_insert (GTK_TREE_STORE (model), &child3, &parent2, 0);
gtk_tree_view_expand_all (GTK_TREE_VIEW (tree_view));
gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (filter));
gtk_tree_store_remove (GTK_TREE_STORE (model), &parent);
gtk_widget_destroy (tree_view);
g_object_unref (filter);
g_object_unref (model);
}
static void
specific_bug_659022_row_deleted_free_level (void)
{
GtkTreeModel *filter;
GtkTreeModel *model;
GtkTreeModelRefCount *ref_model;
GtkTreeIter parent, child;
GtkTreeIter parent2, child2, child3;
GtkWidget *tree_view;
model = gtk_tree_model_ref_count_new ();
ref_model = GTK_TREE_MODEL_REF_COUNT (model);
filter = gtk_tree_model_filter_new (model, NULL);
gtk_tree_model_filter_set_visible_func (GTK_TREE_MODEL_FILTER (filter),
specific_bug_659022_visible_func,
NULL, NULL);
tree_view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (filter));
/* Carefully construct a model */
gtk_tree_store_insert (GTK_TREE_STORE (model), &parent, NULL, 0);
gtk_tree_store_insert (GTK_TREE_STORE (model), &child, &parent, 0);
gtk_tree_store_insert (GTK_TREE_STORE (model), &parent2, NULL, 0);
gtk_tree_store_insert (GTK_TREE_STORE (model), &child2, &parent2, 0);
gtk_tree_store_insert (GTK_TREE_STORE (model), &child3, &parent2, 0);
/* Only parent2 is visible, child3 holds first ref count for that level
* (Note that above, both child2 as child3 are inserted at position 0).
*/
assert_node_ref_count (ref_model, &parent, 0);
assert_node_ref_count (ref_model, &child, 0);
assert_node_ref_count (ref_model, &parent2, 3);
assert_node_ref_count (ref_model, &child3, 1);
assert_node_ref_count (ref_model, &child2, 0);
/* Make sure child level is cached */
gtk_tree_view_expand_all (GTK_TREE_VIEW (tree_view));
assert_node_ref_count (ref_model, &parent, 0);
assert_node_ref_count (ref_model, &child, 0);
assert_node_ref_count (ref_model, &parent2, 3);
assert_node_ref_count (ref_model, &child3, 2);
assert_node_ref_count (ref_model, &child2, 1);
gtk_tree_view_collapse_all (GTK_TREE_VIEW (tree_view));
assert_node_ref_count (ref_model, &parent, 0);
assert_node_ref_count (ref_model, &child, 0);
assert_node_ref_count (ref_model, &parent2, 3);
assert_node_ref_count (ref_model, &child3, 1);
assert_node_ref_count (ref_model, &child2, 0);
/* Remove node with longer child level first */
gtk_tree_store_remove (GTK_TREE_STORE (model), &parent2);
gtk_tree_store_remove (GTK_TREE_STORE (model), &parent);
gtk_widget_destroy (tree_view);
g_object_unref (filter);
g_object_unref (model);
}
/* main */
@@ -6923,4 +7115,10 @@ register_filter_model_tests (void)
specific_bug_657353);
g_test_add_func ("/TreeModelFilter/specific/bug-658696",
specific_bug_658696);
g_test_add_func ("/TreeModelFilter/specific/bug-659022/row-changed-emission",
specific_bug_659022_row_changed_emission);
g_test_add_func ("/TreeModelFilter/specific/bug-659022/row-deleted-node-invisible",
specific_bug_659022_row_deleted_node_invisible);
g_test_add_func ("/TreeModelFilter/specific/bug-659022/row-deleted-free-level",
specific_bug_659022_row_deleted_free_level);
}
+3 -3
View File
@@ -39,7 +39,7 @@ test_attach (void)
"width", &width,
"height", &height,
NULL);
g_assert_cmpint (left, ==, 0);
g_assert_cmpint (left, ==, -1);
g_assert_cmpint (top, ==, 0);
g_assert_cmpint (width, ==, 1);
g_assert_cmpint (height, ==, 1);
@@ -53,7 +53,7 @@ test_attach (void)
"width", &width,
"height", &height,
NULL);
g_assert_cmpint (left, ==, 1);
g_assert_cmpint (left, ==, 0);
g_assert_cmpint (top, ==, 0);
g_assert_cmpint (width, ==, 2);
g_assert_cmpint (height, ==, 2);
@@ -70,7 +70,7 @@ test_attach (void)
"width", &width,
"height", &height,
NULL);
g_assert_cmpint (left, ==, 0);
g_assert_cmpint (left, ==, -1);
g_assert_cmpint (top, ==, 1);
g_assert_cmpint (width, ==, 3);
g_assert_cmpint (height, ==, 1);
+4 -4
View File
@@ -73,11 +73,11 @@ static gchar *var_name = "-";
#include <ftw.h>
static struct stat cache_stat;
static GStatBuf cache_stat;
static gboolean cache_up_to_date;
static int check_dir_mtime (const char *dir,
const struct stat *sb,
const GStatBuf *sb,
int tf)
{
if (tf != FTW_NS && sb->st_mtime > cache_stat.st_mtime)
@@ -118,7 +118,7 @@ static int check_dir_mtime (const char *dir,
gboolean
is_cache_up_to_date (const gchar *path)
{
struct stat path_stat, cache_stat;
GStatBuf path_stat, cache_stat;
gchar *cache_path;
int retval;
@@ -1455,7 +1455,7 @@ build_cache (const gchar *path)
#endif
GHashTable *files;
FILE *cache;
struct stat path_stat, cache_stat;
GStatBuf path_stat, cache_stat;
struct utimbuf utime_buf;
GList *directories = NULL;
int fd;
+10 -5
View File
@@ -265,6 +265,9 @@ gtk_cups_request_read_write (GtkCupsRequest *request, gboolean connect_only)
else if (request->type == GTK_CUPS_GET)
get_states[request->state] (request);
if (gtk_cups_result_is_error (request->result))
request->state = GTK_CUPS_REQUEST_DONE;
if (request->attempts > _GTK_CUPS_MAX_ATTEMPTS &&
request->state != GTK_CUPS_REQUEST_DONE)
{
@@ -918,8 +921,8 @@ _get_auth (GtkCupsRequest *request)
* The callback sets cups_password to NULL to signal that the
* password has been used.
*/
static char *cups_password;
static char *cups_username;
static char *cups_password = NULL;
static char *cups_username = NULL;
static const char *
passwordCB (const char *prompt)
@@ -955,6 +958,7 @@ _post_check (GtkCupsRequest *request)
if (request->password_state == GTK_CUPS_PASSWORD_APPLIED)
{
request->poll_state = GTK_CUPS_HTTP_IDLE;
request->password_state = GTK_CUPS_PASSWORD_NOT_VALID;
request->state = GTK_CUPS_POST_AUTH;
request->need_password = TRUE;
@@ -972,7 +976,6 @@ _post_check (GtkCupsRequest *request)
{
if (request->password_state == GTK_CUPS_PASSWORD_NONE)
{
cups_password = g_strdup ("");
cups_username = request->username;
cupsSetPasswordCB (passwordCB);
@@ -984,6 +987,7 @@ _post_check (GtkCupsRequest *request)
/* move to AUTH state to let the backend
* ask for a password
*/
request->poll_state = GTK_CUPS_HTTP_IDLE;
request->state = GTK_CUPS_POST_AUTH;
request->need_password = TRUE;
@@ -1249,6 +1253,7 @@ _get_check (GtkCupsRequest *request)
if (request->password_state == GTK_CUPS_PASSWORD_APPLIED)
{
request->poll_state = GTK_CUPS_HTTP_IDLE;
request->password_state = GTK_CUPS_PASSWORD_NOT_VALID;
request->state = GTK_CUPS_GET_AUTH;
request->need_password = TRUE;
@@ -1266,7 +1271,6 @@ _get_check (GtkCupsRequest *request)
{
if (request->password_state == GTK_CUPS_PASSWORD_NONE)
{
cups_password = g_strdup ("");
cups_username = request->username;
cupsSetPasswordCB (passwordCB);
@@ -1278,6 +1282,7 @@ _get_check (GtkCupsRequest *request)
/* move to AUTH state to let the backend
* ask for a password
*/
request->poll_state = GTK_CUPS_HTTP_IDLE;
request->state = GTK_CUPS_GET_AUTH;
request->need_password = TRUE;
@@ -1324,7 +1329,7 @@ _get_check (GtkCupsRequest *request)
return;
}
request->state = GTK_CUPS_GET_SEND;
request->state = GTK_CUPS_GET_CONNECT;
request->last_status = HTTP_CONTINUE;
return;
@@ -3345,7 +3345,18 @@ create_pickone_option (ppd_file_t *ppd_file,
option->choices_display[i] = get_choice_text (ppd_file, available[i]);
}
}
gtk_printer_option_set (option, ppd_option->defchoice);
if (option->type != GTK_PRINTER_OPTION_TYPE_PICKONE)
{
if (g_str_has_prefix (ppd_option->defchoice, "Custom."))
gtk_printer_option_set (option, ppd_option->defchoice + 7);
else
gtk_printer_option_set (option, ppd_option->defchoice);
}
else
{
gtk_printer_option_set (option, ppd_option->defchoice);
}
}
#ifdef PRINT_IGNORED_OPTIONS
else
@@ -346,6 +346,8 @@ gtk_printer_cups_update_settings (GtkPrinterCups *printer,
/* cupsICCQualifier3 */
option = gtk_printer_option_set_lookup (set, "cups-Resolution");
if (option != NULL)
format[2] = option->value;
else
format[2] = "*";
/* get profile for the device given the qualifier */
+3
View File
@@ -17,6 +17,8 @@ tests/a11y/placeholder-text.ui
tests/a11y/tree.ui
tests/reftests/background-area.ref.ui
tests/reftests/background-area.ui
tests/reftests/background-color-transparent.ref.ui
tests/reftests/background-color-transparent.ui
tests/reftests/border-image-gradient.ref.ui
tests/reftests/border-image-gradient.ui
tests/reftests/border-image-url.ref.ui
@@ -34,6 +36,7 @@ tests/reftests/css-match-style-property-order.ref.ui
tests/reftests/css-match-style-property-order.ui
tests/reftests/entry-progress-coloring.ref.ui
tests/reftests/entry-progress-coloring.ui
tests/reftests/grid-empty-with-spacing.ui
tests/reftests/grid-wfh.ref.ui
tests/reftests/grid-wfh.ui
tests/reftests/label-shadows.ref.ui
+16 -13
View File
@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gtk+\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-09-19 13:10+0100\n"
"PO-Revision-Date: 2011-09-19 13:10+0100\n"
"POT-Creation-Date: 2011-10-16 14:44+0100\n"
"PO-Revision-Date: 2011-10-16 14:44+0100\n"
"Last-Translator: Bruce Cowan <bruce@bcowan.me.uk>\n"
"Language-Team: British English <en@li.org>\n"
"Language: en_GB\n"
@@ -17,7 +17,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Virtaal 0.7.1-beta1\n"
"X-Generator: Virtaal 0.7.1-rc1\n"
#: ../gdk/gdkapplaunchcontext.c:129 ../gdk/gdkcursor.c:136
#: ../gdk/gdkdevicemanager.c:146
@@ -100,11 +100,11 @@ msgstr "Number of axes in the device"
msgid "Display for the device manager"
msgstr "Display for the device manager"
#: ../gdk/gdkdisplaymanager.c:162
#: ../gdk/gdkdisplaymanager.c:165
msgid "Default Display"
msgstr "Default Display"
#: ../gdk/gdkdisplaymanager.c:163
#: ../gdk/gdkdisplaymanager.c:166
msgid "The default display for GDK"
msgstr "The default display for GDK"
@@ -1731,8 +1731,7 @@ msgid "Whether the text can be modified by the user"
msgstr "Whether the text can be modified by the user"
#: ../gtk/gtkcellrenderertext.c:357 ../gtk/gtkcellrenderertext.c:365
#: ../gtk/gtkfontchooser.c:67 ../gtk/gtkfontchooser.c:80
#: ../gtk/gtktexttag.c:294 ../gtk/gtktexttag.c:302
#: ../gtk/gtkfontchooser.c:67 ../gtk/gtktexttag.c:294 ../gtk/gtktexttag.c:302
msgid "Font"
msgstr "Font"
@@ -3166,6 +3165,10 @@ msgstr "Show size"
msgid "Whether selected font size is shown in the label"
msgstr "Whether selected font size is shown in the label"
#: ../gtk/gtkfontchooser.c:80
msgid "Font description"
msgstr "Font description"
#: ../gtk/gtkfontchooser.c:93 ../gtk/gtkfontsel.c:251
msgid "Preview text"
msgstr "Preview text"
@@ -3695,19 +3698,19 @@ msgstr "The width of the layout"
msgid "The height of the layout"
msgstr "The height of the layout"
#: ../gtk/gtklinkbutton.c:175
#: ../gtk/gtklinkbutton.c:176
msgid "URI"
msgstr "URI"
#: ../gtk/gtklinkbutton.c:176
#: ../gtk/gtklinkbutton.c:177
msgid "The URI bound to this button"
msgstr "The URI bound to this button"
#: ../gtk/gtklinkbutton.c:190
#: ../gtk/gtklinkbutton.c:191
msgid "Visited"
msgstr "Visited"
#: ../gtk/gtklinkbutton.c:191
#: ../gtk/gtklinkbutton.c:192
msgid "Whether this link has been visited."
msgstr "Whether this link has been visited."
@@ -4802,7 +4805,7 @@ msgstr ""
"is the current action of its group."
#: ../gtk/gtkradioaction.c:135 ../gtk/gtkradiobutton.c:164
#: ../gtk/gtkradiomenuitem.c:426 ../gtk/gtkradiotoolbutton.c:85
#: ../gtk/gtkradiomenuitem.c:427 ../gtk/gtkradiotoolbutton.c:85
msgid "Group"
msgstr "Group"
@@ -4826,7 +4829,7 @@ msgstr ""
msgid "The radio button whose group this widget belongs to."
msgstr "The radio button whose group this widget belongs to."
#: ../gtk/gtkradiomenuitem.c:427
#: ../gtk/gtkradiomenuitem.c:428
msgid "The radio menu item whose group this widget belongs to."
msgstr "The radio menu item whose group this widget belongs to."
+7 -7
View File
@@ -24,7 +24,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gtk+-master-po-properties-gl-77816____.merged\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-09-20 01:26+0200\n"
"POT-Creation-Date: 2011-10-07 01:20+0200\n"
"PO-Revision-Date: 2011-09-20 01:27+0200\n"
"Last-Translator: Fran Dieguez <frandieguez@gnome.org>\n"
"Language-Team: Galician <gnome-l10n-gl@gnome.org>\n"
@@ -3756,19 +3756,19 @@ msgstr "A largura da disposición"
msgid "The height of the layout"
msgstr "A altura da disposición"
#: ../gtk/gtklinkbutton.c:175
#: ../gtk/gtklinkbutton.c:176
msgid "URI"
msgstr "URI"
#: ../gtk/gtklinkbutton.c:176
#: ../gtk/gtklinkbutton.c:177
msgid "The URI bound to this button"
msgstr "O URI vinculado a este botón"
#: ../gtk/gtklinkbutton.c:190
#: ../gtk/gtklinkbutton.c:191
msgid "Visited"
msgstr "Visitada"
#: ../gtk/gtklinkbutton.c:191
#: ../gtk/gtklinkbutton.c:192
msgid "Whether this link has been visited."
msgstr "Indica se esta ligazón foi visitada."
@@ -4884,7 +4884,7 @@ msgstr ""
"a acción actual do seu grupo."
#: ../gtk/gtkradioaction.c:135 ../gtk/gtkradiobutton.c:164
#: ../gtk/gtkradiomenuitem.c:426 ../gtk/gtkradiotoolbutton.c:85
#: ../gtk/gtkradiomenuitem.c:427 ../gtk/gtkradiotoolbutton.c:85
msgid "Group"
msgstr "Grupo"
@@ -4908,7 +4908,7 @@ msgstr ""
msgid "The radio button whose group this widget belongs to."
msgstr "O botón de opción a cuxo grupo pertence este widget."
#: ../gtk/gtkradiomenuitem.c:427
#: ../gtk/gtkradiomenuitem.c:428
msgid "The radio menu item whose group this widget belongs to."
msgstr "O elemento do menú de opción a cuxo grupo pertence este widget."
+6419 -4081
View File
File diff suppressed because it is too large Load Diff
+2514 -2118
View File
File diff suppressed because it is too large Load Diff
+2854 -2206
View File
File diff suppressed because it is too large Load Diff
+98 -92
View File
@@ -18,8 +18,8 @@ msgstr ""
"Project-Id-Version: gtk+.properties master\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=gtk"
"%2b&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2011-09-13 01:36+0000\n"
"PO-Revision-Date: 2011-09-13 13:19+0800\n"
"POT-Creation-Date: 2011-09-27 08:59+0000\n"
"PO-Revision-Date: 2011-09-28 01:31+0800\n"
"Last-Translator: YunQiang Su <wzssyqa@gmail.com>\n"
"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
"MIME-Version: 1.0\n"
@@ -863,7 +863,7 @@ msgid "If TRUE, the child will not be subject to homogeneous sizing"
msgstr "若为 TRUE,子部件可不受统一尺寸的限制"
#: ../gtk/gtkbox.c:241 ../gtk/gtkcellareabox.c:317 ../gtk/gtkexpander.c:314
#: ../gtk/gtkiconview.c:643 ../gtk/gtktreeviewcolumn.c:283
#: ../gtk/gtkiconview.c:645 ../gtk/gtktreeviewcolumn.c:283
msgid "Spacing"
msgstr "间距"
@@ -871,7 +871,7 @@ msgstr "间距"
msgid "The amount of space between children"
msgstr "子部件间的间距总和"
#: ../gtk/gtkbox.c:251 ../gtk/gtktable.c:227 ../gtk/gtktoolbar.c:564
#: ../gtk/gtkbox.c:251 ../gtk/gtktable.c:227 ../gtk/gtktoolbar.c:568
#: ../gtk/gtktoolitemgroup.c:1645
msgid "Homogeneous"
msgstr "统一大小"
@@ -880,7 +880,7 @@ msgstr "统一大小"
msgid "Whether the children should all be the same size"
msgstr "子部件是否使用统一大小"
#: ../gtk/gtkbox.c:272 ../gtk/gtkcellareabox.c:337 ../gtk/gtktoolbar.c:556
#: ../gtk/gtkbox.c:272 ../gtk/gtkcellareabox.c:337 ../gtk/gtktoolbar.c:560
#: ../gtk/gtktoolitemgroup.c:1652 ../gtk/gtktoolpalette.c:1070
#: ../gtk/gtktreeviewcolumn.c:339
msgid "Expand"
@@ -1695,15 +1695,17 @@ msgid "Whether the text can be modified by the user"
msgstr "用户是否可以修改文字"
#: ../gtk/gtkcellrenderertext.c:357 ../gtk/gtkcellrenderertext.c:365
#: ../gtk/gtktexttag.c:294 ../gtk/gtktexttag.c:302
#: ../gtk/gtkfontchooser.c:67 ../gtk/gtktexttag.c:294 ../gtk/gtktexttag.c:302
msgid "Font"
msgstr "字体"
#: ../gtk/gtkcellrenderertext.c:358 ../gtk/gtktexttag.c:295
#: ../gtk/gtkcellrenderertext.c:358 ../gtk/gtkfontchooser.c:68
#: ../gtk/gtktexttag.c:295
msgid "Font description as a string, e.g. \"Sans Italic 12\""
msgstr "以字符串方式表示的字体描述,如“Sans Italic 12”"
#: ../gtk/gtkcellrenderertext.c:366 ../gtk/gtktexttag.c:303
#: ../gtk/gtkcellrenderertext.c:366 ../gtk/gtkfontchooser.c:81
#: ../gtk/gtktexttag.c:303
msgid "Font description as a PangoFontDescription struct"
msgstr "以 PangoFontDescription 结构表示的字体描述"
@@ -2036,13 +2038,13 @@ msgid "The model for cell view"
msgstr "单元格视图的模型"
#: ../gtk/gtkcellview.c:246 ../gtk/gtkcombobox.c:950
#: ../gtk/gtkentrycompletion.c:448 ../gtk/gtkiconview.c:768
#: ../gtk/gtkentrycompletion.c:448 ../gtk/gtkiconview.c:770
#: ../gtk/gtktreemenu.c:329 ../gtk/gtktreeviewcolumn.c:427
msgid "Cell Area"
msgstr "单元格大小"
#: ../gtk/gtkcellview.c:247 ../gtk/gtkcombobox.c:951
#: ../gtk/gtkentrycompletion.c:449 ../gtk/gtkiconview.c:769
#: ../gtk/gtkentrycompletion.c:449 ../gtk/gtkiconview.c:771
#: ../gtk/gtktreemenu.c:330 ../gtk/gtktreeviewcolumn.c:428
msgid "The GtkCellArea used to layout cells"
msgstr "用 GtkCellArea 设计单元格"
@@ -2112,7 +2114,7 @@ msgid "Whether to give the color an alpha value"
msgstr "是否要对颜色给出 alpha 值"
#: ../gtk/gtkcolorbutton.c:185 ../gtk/gtkfilechooserbutton.c:440
#: ../gtk/gtkfontbutton.c:150 ../gtk/gtkprintjob.c:141
#: ../gtk/gtkfontbutton.c:435 ../gtk/gtkprintjob.c:141
#: ../gtk/gtkstatusicon.c:438 ../gtk/gtktreeviewcolumn.c:331
msgid "Title"
msgstr "标题"
@@ -2358,7 +2360,7 @@ msgid "The amount of space used by the arrow"
msgstr "箭头所占空间大小"
#: ../gtk/gtkcombobox.c:1007 ../gtk/gtkentry.c:886 ../gtk/gtkhandlebox.c:218
#: ../gtk/gtkmenubar.c:218 ../gtk/gtkstatusbar.c:182 ../gtk/gtktoolbar.c:614
#: ../gtk/gtkmenubar.c:218 ../gtk/gtkstatusbar.c:182 ../gtk/gtktoolbar.c:618
#: ../gtk/gtkviewport.c:155
msgid "Shadow type"
msgstr "阴影类型"
@@ -2795,7 +2797,7 @@ msgstr "最小键长度"
msgid "Minimum length of the search key in order to look up matches"
msgstr "查阅匹配项时搜索关键字的最小长度"
#: ../gtk/gtkentrycompletion.c:344 ../gtk/gtkiconview.c:564
#: ../gtk/gtkentrycompletion.c:344 ../gtk/gtkiconview.c:566
msgid "Text column"
msgstr "文字列"
@@ -3054,75 +3056,79 @@ msgstr "竖直位置"
msgid "Y position of child widget"
msgstr "子部件的竖直位置"
#: ../gtk/gtkfontbutton.c:151
#: ../gtk/gtkfontbutton.c:436
msgid "The title of the font chooser dialog"
msgstr "字体选择器对话框的标题"
#: ../gtk/gtkfontbutton.c:166 ../gtk/gtkfontchooser.c:186
#: ../gtk/gtkfontsel.c:244
#: ../gtk/gtkfontbutton.c:451 ../gtk/gtkfontsel.c:244
msgid "Font name"
msgstr "字体名称"
#: ../gtk/gtkfontbutton.c:167
#: ../gtk/gtkfontbutton.c:452
msgid "The name of the selected font"
msgstr "选中字体的名称"
#: ../gtk/gtkfontbutton.c:168
#: ../gtk/gtkfontbutton.c:453
msgid "Sans 12"
msgstr "Sans 12"
#: ../gtk/gtkfontbutton.c:183
#: ../gtk/gtkfontbutton.c:468
msgid "Use font in label"
msgstr "在标签中使用字体"
#: ../gtk/gtkfontbutton.c:184
#: ../gtk/gtkfontbutton.c:469
msgid "Whether the label is drawn in the selected font"
msgstr "标签是否以选中字体绘制"
#: ../gtk/gtkfontbutton.c:199
#: ../gtk/gtkfontbutton.c:484
msgid "Use size in label"
msgstr "在标签中使用大小"
#: ../gtk/gtkfontbutton.c:200
#: ../gtk/gtkfontbutton.c:485
msgid "Whether the label is drawn with the selected font size"
msgstr "标签是否以选中字体大小绘制"
#: ../gtk/gtkfontbutton.c:216
#: ../gtk/gtkfontbutton.c:501
msgid "Show style"
msgstr "显示样式"
#: ../gtk/gtkfontbutton.c:217
#: ../gtk/gtkfontbutton.c:502
msgid "Whether the selected font style is shown in the label"
msgstr "标签中是否显示选中的字体样式"
#: ../gtk/gtkfontbutton.c:232
#: ../gtk/gtkfontbutton.c:517
msgid "Show size"
msgstr "显示大小"
#: ../gtk/gtkfontbutton.c:233
#: ../gtk/gtkfontbutton.c:518
msgid "Whether selected font size is shown in the label"
msgstr "标签中是否显示选中的字体大小"
#: ../gtk/gtkfontchooser.c:187 ../gtk/gtkfontsel.c:245
msgid "The string that represents this font"
msgstr "用来表示此字体的字符串"
#: ../gtk/gtkfontchooser.c:80
#| msgid "Font options"
msgid "Font description"
msgstr "字体描述"
#: ../gtk/gtkfontchooser.c:193 ../gtk/gtkfontsel.c:251
#: ../gtk/gtkfontchooser.c:93 ../gtk/gtkfontsel.c:251
msgid "Preview text"
msgstr "预览文字"
#: ../gtk/gtkfontchooser.c:194 ../gtk/gtkfontsel.c:252
#: ../gtk/gtkfontchooser.c:94 ../gtk/gtkfontsel.c:252
msgid "The text to display in order to demonstrate the selected font"
msgstr "为了演示选中字体而显示的文字"
#: ../gtk/gtkfontchooser.c:201
#: ../gtk/gtkfontchooser.c:106
msgid "Show preview text entry"
msgstr "显示预览文字输入控件"
#: ../gtk/gtkfontchooser.c:202
#: ../gtk/gtkfontchooser.c:107
msgid "Whether the preview text entry is shown or not"
msgstr "是否显示预览文字输入控件"
#: ../gtk/gtkfontsel.c:245
msgid "The string that represents this font"
msgstr "用来表示此字体的字符串"
#: ../gtk/gtkframe.c:172
msgid "Text of the frame's label"
msgstr "框架标签的文字"
@@ -3261,133 +3267,133 @@ msgid ""
"detached."
msgstr "用来表示手柄框的子控件是附属还是分离的二进制值"
#: ../gtk/gtkiconview.c:527 ../gtk/gtktreeselection.c:131
#: ../gtk/gtkiconview.c:529 ../gtk/gtktreeselection.c:131
msgid "Selection mode"
msgstr "选中模式"
#: ../gtk/gtkiconview.c:528
#: ../gtk/gtkiconview.c:530
msgid "The selection mode"
msgstr "选中模式"
#: ../gtk/gtkiconview.c:546
#: ../gtk/gtkiconview.c:548
msgid "Pixbuf column"
msgstr "像素缓冲列"
#: ../gtk/gtkiconview.c:547
#: ../gtk/gtkiconview.c:549
msgid "Model column used to retrieve the icon pixbuf from"
msgstr "用于获取图标像素缓冲列的模型列"
#: ../gtk/gtkiconview.c:565
#: ../gtk/gtkiconview.c:567
msgid "Model column used to retrieve the text from"
msgstr "用于获取文字的模型列"
#: ../gtk/gtkiconview.c:584
#: ../gtk/gtkiconview.c:586
msgid "Markup column"
msgstr "标记列"
#: ../gtk/gtkiconview.c:585
#: ../gtk/gtkiconview.c:587
msgid "Model column used to retrieve the text if using Pango markup"
msgstr "在使用 Pango 标记的情况下获取文字的模型列"
#: ../gtk/gtkiconview.c:592
#: ../gtk/gtkiconview.c:594
msgid "Icon View Model"
msgstr "图标视图模型"
#: ../gtk/gtkiconview.c:593
#: ../gtk/gtkiconview.c:595
msgid "The model for the icon view"
msgstr "图标视图的模型"
#: ../gtk/gtkiconview.c:609
#: ../gtk/gtkiconview.c:611
msgid "Number of columns"
msgstr "列数"
#: ../gtk/gtkiconview.c:610
#: ../gtk/gtkiconview.c:612
msgid "Number of columns to display"
msgstr "要显示的列数"
#: ../gtk/gtkiconview.c:627
#: ../gtk/gtkiconview.c:629
msgid "Width for each item"
msgstr "每项的宽度"
#: ../gtk/gtkiconview.c:628
#: ../gtk/gtkiconview.c:630
msgid "The width used for each item"
msgstr "每项所使用的宽度"
#: ../gtk/gtkiconview.c:644
#: ../gtk/gtkiconview.c:646
msgid "Space which is inserted between cells of an item"
msgstr "每项单元格之间插入的间距"
#: ../gtk/gtkiconview.c:659
#: ../gtk/gtkiconview.c:661
msgid "Row Spacing"
msgstr "行距"
#: ../gtk/gtkiconview.c:660
#: ../gtk/gtkiconview.c:662
msgid "Space which is inserted between grid rows"
msgstr "网格行之间插入的间距"
#: ../gtk/gtkiconview.c:675
#: ../gtk/gtkiconview.c:677
msgid "Column Spacing"
msgstr "列距"
#: ../gtk/gtkiconview.c:676
#: ../gtk/gtkiconview.c:678
msgid "Space which is inserted between grid columns"
msgstr "网格列之间插入的间距"
#: ../gtk/gtkiconview.c:691
#: ../gtk/gtkiconview.c:693
msgid "Margin"
msgstr "边距"
#: ../gtk/gtkiconview.c:692
#: ../gtk/gtkiconview.c:694
msgid "Space which is inserted at the edges of the icon view"
msgstr "图标视图边缘插入的间距"
#: ../gtk/gtkiconview.c:707
#: ../gtk/gtkiconview.c:709
msgid "Item Orientation"
msgstr "项的方向"
#: ../gtk/gtkiconview.c:708
#: ../gtk/gtkiconview.c:710
msgid ""
"How the text and icon of each item are positioned relative to each other"
msgstr "每项的文字和图标的相对位置"
#: ../gtk/gtkiconview.c:724 ../gtk/gtktreeview.c:1021
#: ../gtk/gtkiconview.c:726 ../gtk/gtktreeview.c:1021
#: ../gtk/gtktreeviewcolumn.c:374
msgid "Reorderable"
msgstr "可重新排列"
#: ../gtk/gtkiconview.c:725 ../gtk/gtktreeview.c:1022
#: ../gtk/gtkiconview.c:727 ../gtk/gtktreeview.c:1022
msgid "View is reorderable"
msgstr "视图可以重新排列"
#: ../gtk/gtkiconview.c:732 ../gtk/gtktreeview.c:1172
#: ../gtk/gtkiconview.c:734 ../gtk/gtktreeview.c:1172
msgid "Tooltip Column"
msgstr "工具提示列"
#: ../gtk/gtkiconview.c:733
#: ../gtk/gtkiconview.c:735
msgid "The column in the model containing the tooltip texts for the items"
msgstr "包含那些项的工具提示的模型那一列"
#: ../gtk/gtkiconview.c:750
#: ../gtk/gtkiconview.c:752
msgid "Item Padding"
msgstr "项目填充"
#: ../gtk/gtkiconview.c:751
#: ../gtk/gtkiconview.c:753
msgid "Padding around icon view items"
msgstr "图标视图项目周围的填充"
#: ../gtk/gtkiconview.c:782
#: ../gtk/gtkiconview.c:784
msgid "Selection Box Color"
msgstr "选择框颜色"
#: ../gtk/gtkiconview.c:783
#: ../gtk/gtkiconview.c:785
msgid "Color of the selection box"
msgstr "选择框的颜色"
#: ../gtk/gtkiconview.c:789
#: ../gtk/gtkiconview.c:791
msgid "Selection Box Alpha"
msgstr "选择框的 Alpha"
#: ../gtk/gtkiconview.c:790
#: ../gtk/gtkiconview.c:792
msgid "Opacity of the selection box"
msgstr "选择框的不透明度"
@@ -3420,7 +3426,7 @@ msgstr "图标集"
msgid "Icon set to display"
msgstr "要显示的图标集"
#: ../gtk/gtkimage.c:270 ../gtk/gtkscalebutton.c:228 ../gtk/gtktoolbar.c:531
#: ../gtk/gtkimage.c:270 ../gtk/gtkscalebutton.c:228 ../gtk/gtktoolbar.c:535
#: ../gtk/gtktoolpalette.c:1008
msgid "Icon size"
msgstr "图标大小"
@@ -3621,19 +3627,19 @@ msgstr "布局宽度"
msgid "The height of the layout"
msgstr "布局高度"
#: ../gtk/gtklinkbutton.c:173
#: ../gtk/gtklinkbutton.c:176
msgid "URI"
msgstr "URI"
#: ../gtk/gtklinkbutton.c:174
#: ../gtk/gtklinkbutton.c:177
msgid "The URI bound to this button"
msgstr "关联此按钮的 URI"
#: ../gtk/gtklinkbutton.c:188
#: ../gtk/gtklinkbutton.c:191
msgid "Visited"
msgstr "已访问"
#: ../gtk/gtklinkbutton.c:189
#: ../gtk/gtklinkbutton.c:192
msgid "Whether this link has been visited."
msgstr "此链接是否已经访问过"
@@ -3706,7 +3712,7 @@ msgstr "菜单栏的子折叠方向"
msgid "Style of bevel around the menubar"
msgstr "菜单栏的周围的立体样式"
#: ../gtk/gtkmenubar.c:226 ../gtk/gtktoolbar.c:581
#: ../gtk/gtkmenubar.c:226 ../gtk/gtktoolbar.c:585
msgid "Internal padding"
msgstr "内部留空"
@@ -4706,7 +4712,7 @@ msgstr ""
"值。"
#: ../gtk/gtkradioaction.c:135 ../gtk/gtkradiobutton.c:164
#: ../gtk/gtkradiomenuitem.c:426 ../gtk/gtkradiotoolbutton.c:85
#: ../gtk/gtkradiomenuitem.c:427 ../gtk/gtkradiotoolbutton.c:85
msgid "Group"
msgstr "组"
@@ -4728,7 +4734,7 @@ msgstr "当前活动成员的属性值,该成员属于能做出该动作的一
msgid "The radio button whose group this widget belongs to."
msgstr "此部件所属组的单选钮动作组。"
#: ../gtk/gtkradiomenuitem.c:427
#: ../gtk/gtkradiomenuitem.c:428
msgid "The radio menu item whose group this widget belongs to."
msgstr "此部件所属组的单选菜单项。"
@@ -6400,79 +6406,79 @@ msgstr "绘制指示器"
msgid "If the toggle part of the button is displayed"
msgstr "是否显示按钮的切换标志"
#: ../gtk/gtktoolbar.c:502 ../gtk/gtktoolpalette.c:1038
#: ../gtk/gtktoolbar.c:506 ../gtk/gtktoolpalette.c:1038
msgid "Toolbar Style"
msgstr "工具栏风格"
#: ../gtk/gtktoolbar.c:503
#: ../gtk/gtktoolbar.c:507
msgid "How to draw the toolbar"
msgstr "如何绘制工具栏"
#: ../gtk/gtktoolbar.c:510
#: ../gtk/gtktoolbar.c:514
msgid "Show Arrow"
msgstr "显示箭头"
#: ../gtk/gtktoolbar.c:511
#: ../gtk/gtktoolbar.c:515
msgid "If an arrow should be shown if the toolbar doesn't fit"
msgstr "工具栏显示不下时是否要显示箭头"
#: ../gtk/gtktoolbar.c:532
#: ../gtk/gtktoolbar.c:536
msgid "Size of icons in this toolbar"
msgstr "此工具栏上的图标大小"
#: ../gtk/gtktoolbar.c:547 ../gtk/gtktoolpalette.c:1024
#: ../gtk/gtktoolbar.c:551 ../gtk/gtktoolpalette.c:1024
msgid "Icon size set"
msgstr "图标大小设置"
#: ../gtk/gtktoolbar.c:548 ../gtk/gtktoolpalette.c:1025
#: ../gtk/gtktoolbar.c:552 ../gtk/gtktoolpalette.c:1025
msgid "Whether the icon-size property has been set"
msgstr "图标大小属性是否已经设定"
#: ../gtk/gtktoolbar.c:557
#: ../gtk/gtktoolbar.c:561
msgid "Whether the item should receive extra space when the toolbar grows"
msgstr "子部件是否在工具栏增长时获得额外空间"
#: ../gtk/gtktoolbar.c:565 ../gtk/gtktoolitemgroup.c:1646
#: ../gtk/gtktoolbar.c:569 ../gtk/gtktoolitemgroup.c:1646
msgid "Whether the item should be the same size as other homogeneous items"
msgstr "同类子部件是否使用统一大小"
#: ../gtk/gtktoolbar.c:572
#: ../gtk/gtktoolbar.c:576
msgid "Spacer size"
msgstr "间距大小"
#: ../gtk/gtktoolbar.c:573
#: ../gtk/gtktoolbar.c:577
msgid "Size of spacers"
msgstr "工具栏上间距的大小"
#: ../gtk/gtktoolbar.c:582
#: ../gtk/gtktoolbar.c:586
msgid "Amount of border space between the toolbar shadow and the buttons"
msgstr "工具栏阴影与按钮之间的间距"
#: ../gtk/gtktoolbar.c:590
#: ../gtk/gtktoolbar.c:594
msgid "Maximum child expand"
msgstr "最大的子控件展开"
#: ../gtk/gtktoolbar.c:591
#: ../gtk/gtktoolbar.c:595
msgid "Maximum amount of space an expandable item will be given"
msgstr "可展开项能获得的最大的空间"
#: ../gtk/gtktoolbar.c:599
#: ../gtk/gtktoolbar.c:603
msgid "Space style"
msgstr "间距风格"
#: ../gtk/gtktoolbar.c:600
#: ../gtk/gtktoolbar.c:604
msgid "Whether spacers are vertical lines or just blank"
msgstr "间距为竖直线或只是空白"
#: ../gtk/gtktoolbar.c:607
#: ../gtk/gtktoolbar.c:611
msgid "Button relief"
msgstr "按钮浮雕"
#: ../gtk/gtktoolbar.c:608
#: ../gtk/gtktoolbar.c:612
msgid "Type of bevel around toolbar buttons"
msgstr "工具栏按钮周围的立体效果类型"
#: ../gtk/gtktoolbar.c:615
#: ../gtk/gtktoolbar.c:619
msgid "Style of bevel around the toolbar"
msgstr "工具栏周围的立体效果样式"
+3
View File
@@ -18,6 +18,8 @@ tests/a11y/placeholder-text.ui
tests/a11y/tree.ui
tests/reftests/background-area.ref.ui
tests/reftests/background-area.ui
tests/reftests/background-color-transparent.ref.ui
tests/reftests/background-color-transparent.ui
tests/reftests/border-image-gradient.ref.ui
tests/reftests/border-image-gradient.ui
tests/reftests/border-image-url.ref.ui
@@ -35,6 +37,7 @@ tests/reftests/css-match-style-property-order.ref.ui
tests/reftests/css-match-style-property-order.ui
tests/reftests/entry-progress-coloring.ref.ui
tests/reftests/entry-progress-coloring.ui
tests/reftests/grid-empty-with-spacing.ui
tests/reftests/grid-wfh.ref.ui
tests/reftests/grid-wfh.ui
tests/reftests/label-shadows.ref.ui
+171 -153
View File
@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gtk+.master\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-09-17 23:28+0300\n"
"PO-Revision-Date: 2011-09-17 23:22+0300\n"
"POT-Creation-Date: 2012-02-20 16:49+0300\n"
"PO-Revision-Date: 2012-02-20 16:51+0300\n"
"Last-Translator: Ігар Грачышка <ihar.hrachyshka@gmail.com>\n"
"Language-Team: Belarusian <i18n-bel-gnome@googlegroups.com>\n"
"Language: be\n"
@@ -475,8 +475,8 @@ msgid ""
"This program comes with ABSOLUTELY NO WARRANTY; for details, visit <a href="
"\"%s\">%s</a>"
msgstr ""
"Аўтары гэтай праграмы не даюць ніякіх гарантый, падрабязней глядзіце <a href="
"\"%s\">%s</a>"
"Аўтары гэтай праграмы не даюць ніякіх гарантый; "
"падрабязней глядзіце <a href=\"%s\">%s</a>"
#: ../gtk/gtkaboutdialog.c:348
msgid "License"
@@ -605,7 +605,7 @@ msgstr "Не ўдалося здзейсніць пошук праграм у с
#: ../gtk/gtkappchooserdialog.c:174
msgid "Find applications online"
msgstr "Знайсці праграмы ў сеціве"
msgstr "Шукаць праграмы ў сеціве"
#: ../gtk/gtkappchooserdialog.c:230
msgid "Could not run application"
@@ -648,7 +648,7 @@ msgid ""
"online\" to install a new application"
msgstr ""
"Пстрыкніце \"Паказаць іншыя праграмы\", каб убачыць болей магчымасцяў, або "
"\"Знайсці праграмы ў сеціве\", каб усталяваць новую праграму"
"\"Шукаць праграмы ў сеціве\", каб усталяваць новую праграму"
#: ../gtk/gtkappchooserdialog.c:461
msgid "Forget association"
@@ -811,7 +811,7 @@ msgstr "Няправільна"
#. * an accelerator when the cell is clicked to change the
#. * acelerator.
#.
#: ../gtk/gtkcellrendereraccel.c:432 ../gtk/gtkcellrendereraccel.c:745
#: ../gtk/gtkcellrendereraccel.c:432 ../gtk/gtkcellrendereraccel.c:749
msgid "New accelerator..."
msgstr "Новая хуткая клавіша..."
@@ -946,7 +946,7 @@ msgstr "Выбраны колер."
msgid "_Save color here"
msgstr "_Захаваць колер"
#: ../gtk/gtkcolorsel.c:1664
#: ../gtk/gtkcolorsel.c:1663
msgid ""
"Click this palette entry to make it the current color. To change this entry, "
"drag a color swatch here or right-click it and select \"Save color here.\""
@@ -970,7 +970,7 @@ msgid "default:mm"
msgstr "default:mm"
#. And show the custom paper dialog
#: ../gtk/gtkcustompaperunixdialog.c:372 ../gtk/gtkprintunixdialog.c:3324
#: ../gtk/gtkcustompaperunixdialog.c:372 ../gtk/gtkprintunixdialog.c:3326
msgid "Manage Custom Sizes"
msgstr "Уласныя памеры аркушаў"
@@ -1023,23 +1023,23 @@ msgstr "С_права:"
msgid "Paper Margins"
msgstr "Палі аркуша"
#: ../gtk/gtkentry.c:8957 ../gtk/gtktextview.c:8277
#: ../gtk/gtkentry.c:8958 ../gtk/gtktextview.c:8278
msgid "Input _Methods"
msgstr "_Спосабы ўводу"
#: ../gtk/gtkentry.c:8971 ../gtk/gtktextview.c:8291
#: ../gtk/gtkentry.c:8972 ../gtk/gtktextview.c:8292
msgid "_Insert Unicode Control Character"
msgstr "_Уставіць кіроўны знак Унікоду"
#: ../gtk/gtkentry.c:10448
#: ../gtk/gtkentry.c:10451
msgid "Caps Lock and Num Lock are on"
msgstr "Caps Lock і Num Lock уключаныя"
#: ../gtk/gtkentry.c:10450
#: ../gtk/gtkentry.c:10453
msgid "Num Lock is on"
msgstr "Num Lock уключаны"
#: ../gtk/gtkentry.c:10452
#: ../gtk/gtkentry.c:10455
msgid "Caps Lock is on"
msgstr "Caps Lock уключаны"
@@ -1164,7 +1164,7 @@ msgstr "%1$s на %2$s"
msgid "Search"
msgstr "Пошук"
#: ../gtk/gtkfilechooserdefault.c:1762 ../gtk/gtkfilechooserdefault.c:4991
#: ../gtk/gtkfilechooserdefault.c:1762 ../gtk/gtkfilechooserdefault.c:4986
msgid "Recently Used"
msgstr "Нядаўнія файлы"
@@ -1197,7 +1197,7 @@ msgstr "Выдаліць закладку \"%s\""
msgid "Bookmark '%s' cannot be removed"
msgstr "Не ўдалося выдаліць закладку \"%s\""
#: ../gtk/gtkfilechooserdefault.c:2813 ../gtk/gtkfilechooserdefault.c:3698
#: ../gtk/gtkfilechooserdefault.c:2813 ../gtk/gtkfilechooserdefault.c:3699
msgid "Remove the selected bookmark"
msgstr "Выдаліць вылучаную закладку"
@@ -1219,145 +1219,145 @@ msgstr "Мясціны"
msgid "_Places"
msgstr "_Мясціны"
#: ../gtk/gtkfilechooserdefault.c:3686
#: ../gtk/gtkfilechooserdefault.c:3687
msgid "Add the selected folder to the Bookmarks"
msgstr "Дадаць вылучаную папку да закладак"
#: ../gtk/gtkfilechooserdefault.c:3946
#: ../gtk/gtkfilechooserdefault.c:3944
msgid "Could not select file"
msgstr "Не ўдалося выбраць файл"
#: ../gtk/gtkfilechooserdefault.c:4171
#: ../gtk/gtkfilechooserdefault.c:4169
msgid "_Visit this file"
msgstr "_Наведаць гэты файл"
#: ../gtk/gtkfilechooserdefault.c:4174
#: ../gtk/gtkfilechooserdefault.c:4172
msgid "_Copy file's location"
msgstr "_Скапіраваць размяшчэнне файла"
#: ../gtk/gtkfilechooserdefault.c:4177
#: ../gtk/gtkfilechooserdefault.c:4175
msgid "_Add to Bookmarks"
msgstr "Д_адаць да закладак"
#: ../gtk/gtkfilechooserdefault.c:4184
#: ../gtk/gtkfilechooserdefault.c:4182
msgid "Show _Hidden Files"
msgstr "Паказваць с_хаваныя файлы"
#: ../gtk/gtkfilechooserdefault.c:4187
#: ../gtk/gtkfilechooserdefault.c:4185
msgid "Show _Size Column"
msgstr "Паказваць _слупок памераў"
#: ../gtk/gtkfilechooserdefault.c:4412
#: ../gtk/gtkfilechooserdefault.c:4410
msgid "Files"
msgstr "Файлы"
#: ../gtk/gtkfilechooserdefault.c:4463
#: ../gtk/gtkfilechooserdefault.c:4461
msgid "Name"
msgstr "Назва"
#: ../gtk/gtkfilechooserdefault.c:4486
#: ../gtk/gtkfilechooserdefault.c:4484
msgid "Size"
msgstr "Памер"
#: ../gtk/gtkfilechooserdefault.c:4500
#: ../gtk/gtkfilechooserdefault.c:4498
msgid "Modified"
msgstr "Зменены"
#. Label
#: ../gtk/gtkfilechooserdefault.c:4595 ../gtk/gtkprinteroptionwidget.c:799
#: ../gtk/gtkfilechooserdefault.c:4593 ../gtk/gtkprinteroptionwidget.c:799
msgid "_Name:"
msgstr "_Назва:"
#: ../gtk/gtkfilechooserdefault.c:4829
#: ../gtk/gtkfilechooserdefault.c:4824
msgid "Type a file name"
msgstr "Упішыце назву файла"
#: ../gtk/gtkfilechooserdefault.c:4876 ../gtk/gtkfilechooserdefault.c:4887
#: ../gtk/gtkfilechooserdefault.c:4871 ../gtk/gtkfilechooserdefault.c:4882
msgid "Please select a folder below"
msgstr "Выберыце папку"
#: ../gtk/gtkfilechooserdefault.c:4882
#: ../gtk/gtkfilechooserdefault.c:4877
msgid "Please type a file name"
msgstr "Упішыце назву файла"
#. Create Folder
#: ../gtk/gtkfilechooserdefault.c:4953
#: ../gtk/gtkfilechooserdefault.c:4948
msgid "Create Fo_lder"
msgstr "Стварыць _папку"
#: ../gtk/gtkfilechooserdefault.c:5001
#: ../gtk/gtkfilechooserdefault.c:4996
msgid "Search:"
msgstr "Шукаць:"
#: ../gtk/gtkfilechooserdefault.c:5052
#: ../gtk/gtkfilechooserdefault.c:5047
msgid "_Location:"
msgstr "_Мясціна:"
#: ../gtk/gtkfilechooserdefault.c:5503
#: ../gtk/gtkfilechooserdefault.c:5498
msgid "Save in _folder:"
msgstr "Захаваць у _папцы:"
#: ../gtk/gtkfilechooserdefault.c:5505
#: ../gtk/gtkfilechooserdefault.c:5500
msgid "Create in _folder:"
msgstr "Стварыць у _папцы:"
#: ../gtk/gtkfilechooserdefault.c:6599
#: ../gtk/gtkfilechooserdefault.c:6594
#, c-format
msgid "Could not read the contents of %s"
msgstr "Не ўдалося прачытаць змест папкі \"%s\""
#: ../gtk/gtkfilechooserdefault.c:6603
#: ../gtk/gtkfilechooserdefault.c:6598
msgid "Could not read the contents of the folder"
msgstr "Не ўдалося прачытаць змест гэтай папкі"
#: ../gtk/gtkfilechooserdefault.c:6696 ../gtk/gtkfilechooserdefault.c:6764
#: ../gtk/gtkfilechooserdefault.c:6916
#: ../gtk/gtkfilechooserdefault.c:6691 ../gtk/gtkfilechooserdefault.c:6759
#: ../gtk/gtkfilechooserdefault.c:6911
msgid "Unknown"
msgstr "Невядома"
#: ../gtk/gtkfilechooserdefault.c:6711
#: ../gtk/gtkfilechooserdefault.c:6706
msgid "%H:%M"
msgstr "%H:%M"
#: ../gtk/gtkfilechooserdefault.c:6713
#: ../gtk/gtkfilechooserdefault.c:6708
msgid "Yesterday at %H:%M"
msgstr "Учора, %H:%M"
#: ../gtk/gtkfilechooserdefault.c:7388
#: ../gtk/gtkfilechooserdefault.c:7382
msgid "Cannot change to folder because it is not local"
msgstr "Не ўдалося перайсці ў папку, бо яна аддалена"
#: ../gtk/gtkfilechooserdefault.c:7988 ../gtk/gtkfilechooserdefault.c:8009
#: ../gtk/gtkfilechooserdefault.c:7982 ../gtk/gtkfilechooserdefault.c:8003
#, c-format
msgid "Shortcut %s already exists"
msgstr "Закладка %s ужо існуе"
#: ../gtk/gtkfilechooserdefault.c:8099
#: ../gtk/gtkfilechooserdefault.c:8093
#, c-format
msgid "Shortcut %s does not exist"
msgstr "Закладкі %s няма"
#: ../gtk/gtkfilechooserdefault.c:8345 ../gtk/gtkprintunixdialog.c:550
#: ../gtk/gtkfilechooserdefault.c:8339 ../gtk/gtkprintunixdialog.c:550
#, c-format
msgid "A file named \"%s\" already exists. Do you want to replace it?"
msgstr "Файл \"%s\" ужо існуе. Ці хочаце яго замяніць?"
#: ../gtk/gtkfilechooserdefault.c:8348 ../gtk/gtkprintunixdialog.c:554
#: ../gtk/gtkfilechooserdefault.c:8342 ../gtk/gtkprintunixdialog.c:554
#, c-format
msgid ""
"The file already exists in \"%s\". Replacing it will overwrite its contents."
msgstr ""
"Такі файл ужо існуе ў \"%s\". Яго замена перапіша змесціва файла новым."
#: ../gtk/gtkfilechooserdefault.c:8353 ../gtk/gtkprintunixdialog.c:561
#: ../gtk/gtkfilechooserdefault.c:8347 ../gtk/gtkprintunixdialog.c:561
msgid "_Replace"
msgstr "_Замяніць"
#: ../gtk/gtkfilechooserdefault.c:9160
#: ../gtk/gtkfilechooserdefault.c:9154
msgid "Could not start the search process"
msgstr "Не ўдалося распачаць пошук"
#: ../gtk/gtkfilechooserdefault.c:9161
#: ../gtk/gtkfilechooserdefault.c:9155
msgid ""
"The program was not able to create a connection to the indexer daemon. "
"Please make sure it is running."
@@ -1365,11 +1365,11 @@ msgstr ""
"Праграма не здолела злучыцца з службай індэксавання. Спраўдзьце, што яна "
"працуе."
#: ../gtk/gtkfilechooserdefault.c:9175
#: ../gtk/gtkfilechooserdefault.c:9169
msgid "Could not send the search request"
msgstr "Не ўдалося паслаць запыт на пошук"
#: ../gtk/gtkfilechooserdefault.c:9776
#: ../gtk/gtkfilechooserdefault.c:9770
#, c-format
msgid "Could not mount %s"
msgstr "Не ўдалося прымацаваць %s"
@@ -1387,14 +1387,14 @@ msgstr "Хібная сцежка"
#.
#: ../gtk/gtkfilechooserentry.c:1106
msgid "No match"
msgstr "Нічога не знойдзена"
msgstr "Няма адпаведнікаў"
#. translators: this text is shown when there is exactly one completion
#. * for something the user typed in a file chooser entry
#.
#: ../gtk/gtkfilechooserentry.c:1117
msgid "Sole completion"
msgstr "Адзінае дапаўненне"
msgstr "Адзіны адпаведнік"
#. translators: this text is shown when the text in a file chooser
#. * entry is a complete filename, but could be continued to find
@@ -1402,13 +1402,13 @@ msgstr "Адзінае дапаўненне"
#.
#: ../gtk/gtkfilechooserentry.c:1133
msgid "Complete, but not unique"
msgstr "Поўна, але не ўнікальна"
msgstr "Поўная назва, але не ўнікальная"
#. Translators: this text is shown while the system is searching
#. * for possible completions for filenames in a file chooser entry.
#: ../gtk/gtkfilechooserentry.c:1165
msgid "Completing..."
msgstr "Пошук..."
msgstr "Пошук варыянтаў дапаўнення..."
#. hostnames in a local_only file chooser? user error
#. Translators: this is shown in the feedback for Tab-completion in a
@@ -1416,7 +1416,7 @@ msgstr "Пошук..."
#. * "sftp://blahblah" in an app that only supports local filenames.
#: ../gtk/gtkfilechooserentry.c:1187 ../gtk/gtkfilechooserentry.c:1212
msgid "Only local files may be selected"
msgstr "Выбіраць можна толькі мясцовыя файлы"
msgstr "Можна выбіраць толькі мясцовыя файлы"
#. Another option is to complete the hostname based on the remote volumes that are mounted
#. Translators: this is shown in the feedback for Tab-completion in a
@@ -1424,7 +1424,7 @@ msgstr "Выбіраць можна толькі мясцовыя файлы"
#. * after a hostname and yet hits Tab (such as "sftp://blahblah[Tab]")
#: ../gtk/gtkfilechooserentry.c:1196
msgid "Incomplete hostname; end it with '/'"
msgstr "Няпоўная назва машыны; каб яе скончыць, устаўце ў канцы \"/\""
msgstr "Няпоўная назва хоста; закончыце яе знакам скосу (\"/\")"
#. Translators: this is shown in the feedback for Tab-completion in a file
#. * chooser's text entry when the user enters a path that does not exist
@@ -1450,7 +1450,7 @@ msgstr "Sans 12"
msgid "Pick a Font"
msgstr "Выбар шрыфту"
#: ../gtk/gtkfontbutton.c:1126
#: ../gtk/gtkfontbutton.c:1122
msgid "Font"
msgstr "Шрыфт"
@@ -1458,16 +1458,16 @@ msgstr "Шрыфт"
msgid "Font Selection"
msgstr "Выбар шрыфту"
#: ../gtk/gtkfontchooserwidget.c:118
#: ../gtk/gtkfontchooserwidget.c:113
msgid "No fonts matched your search. You can revise your search and try again."
msgstr ""
"Ні адзін шрыфт не адпавядае крытэрыям пошуку. Праверце іх і паўтарыце спробу."
#: ../gtk/gtkfontchooserwidget.c:642
#: ../gtk/gtkfontchooserwidget.c:612
msgid "Search font name"
msgstr "Пошук назвы шрыфту"
#: ../gtk/gtkfontchooserwidget.c:911
#: ../gtk/gtkfontchooserwidget.c:948
msgid "Font Family"
msgstr "Гарнітура"
@@ -1533,11 +1533,11 @@ msgstr "_Адкрыць спасылку"
msgid "Copy _Link Address"
msgstr "Скапіраваць _адрас спасылкі"
#: ../gtk/gtklinkbutton.c:494
#: ../gtk/gtklinkbutton.c:495
msgid "Copy URL"
msgstr "Скапіраваць URL-адрас"
#: ../gtk/gtklinkbutton.c:657
#: ../gtk/gtklinkbutton.c:658
msgid "Invalid URI"
msgstr "Хібны URI-адрас"
@@ -1675,32 +1675,32 @@ msgid "Cannot kill process with PID %d. Operation is not implemented."
msgstr "Немагчыма забіць працэс (PID %d). Дзеянне не падтрымліваецца."
#. translators: this string is a name for the 'less' command
#: ../gtk/gtkmountoperation-x11.c:959
#: ../gtk/gtkmountoperation-x11.c:960
msgid "Terminal Pager"
msgstr "Тэрмінальны пэйджар"
#: ../gtk/gtkmountoperation-x11.c:960
#: ../gtk/gtkmountoperation-x11.c:961
msgid "Top Command"
msgstr "Загад \"top\""
#: ../gtk/gtkmountoperation-x11.c:961
#: ../gtk/gtkmountoperation-x11.c:962
msgid "Bourne Again Shell"
msgstr "Абалонка bash"
#: ../gtk/gtkmountoperation-x11.c:962
#: ../gtk/gtkmountoperation-x11.c:963
msgid "Bourne Shell"
msgstr "Абалонка sh"
#: ../gtk/gtkmountoperation-x11.c:963
#: ../gtk/gtkmountoperation-x11.c:964
msgid "Z Shell"
msgstr "Абалонка zsh"
#: ../gtk/gtkmountoperation-x11.c:1060
#: ../gtk/gtkmountoperation-x11.c:1061
#, c-format
msgid "Cannot end process with PID %d: %s"
msgstr "Не ўдалося скончыць працэс (PID %d): %s"
#: ../gtk/gtknotebook.c:4902 ../gtk/gtknotebook.c:7587
#: ../gtk/gtknotebook.c:4914 ../gtk/gtknotebook.c:7599
#, c-format
msgid "Page %u"
msgstr "Старонка %u"
@@ -1742,7 +1742,7 @@ msgstr ""
" Уверсе: %s %s\n"
" Унізе: %s %s"
#: ../gtk/gtkpagesetupunixdialog.c:847 ../gtk/gtkprintunixdialog.c:3375
#: ../gtk/gtkpagesetupunixdialog.c:847 ../gtk/gtkprintunixdialog.c:3377
msgid "Manage Custom Sizes..."
msgstr "Уласныя памеры аркушаў..."
@@ -1750,7 +1750,7 @@ msgstr "Уласныя памеры аркушаў..."
msgid "_Format for:"
msgstr "_Фарматаваць для:"
#: ../gtk/gtkpagesetupunixdialog.c:919 ../gtk/gtkprintunixdialog.c:3523
#: ../gtk/gtkpagesetupunixdialog.c:919 ../gtk/gtkprintunixdialog.c:3525
msgid "_Paper size:"
msgstr "_Памер аркуша:"
@@ -1758,7 +1758,7 @@ msgstr "_Памер аркуша:"
msgid "_Orientation:"
msgstr "_Арыентацыя:"
#: ../gtk/gtkpagesetupunixdialog.c:1008 ../gtk/gtkprintunixdialog.c:3578
#: ../gtk/gtkpagesetupunixdialog.c:1008 ../gtk/gtkprintunixdialog.c:3580
msgid "Page Setup"
msgstr "Наладка аркушаў"
@@ -1799,70 +1799,70 @@ msgstr "_Захаваць у папцы:"
msgid "%s job #%d"
msgstr "%s: заданне №%d"
#: ../gtk/gtkprintoperation.c:1768
#: ../gtk/gtkprintoperation.c:1780
msgctxt "print operation status"
msgid "Initial state"
msgstr "Пачатковы стан"
#: ../gtk/gtkprintoperation.c:1769
#: ../gtk/gtkprintoperation.c:1781
msgctxt "print operation status"
msgid "Preparing to print"
msgstr "Падрыхтоўка да друку"
#: ../gtk/gtkprintoperation.c:1770
#: ../gtk/gtkprintoperation.c:1782
msgctxt "print operation status"
msgid "Generating data"
msgstr "Генераванне даных"
#: ../gtk/gtkprintoperation.c:1771
#: ../gtk/gtkprintoperation.c:1783
msgctxt "print operation status"
msgid "Sending data"
msgstr "Пасыланне даных"
#: ../gtk/gtkprintoperation.c:1772
#: ../gtk/gtkprintoperation.c:1784
msgctxt "print operation status"
msgid "Waiting"
msgstr "Чаканне"
#: ../gtk/gtkprintoperation.c:1773
#: ../gtk/gtkprintoperation.c:1785
msgctxt "print operation status"
msgid "Blocking on issue"
msgstr "Стрымана праблемай"
#: ../gtk/gtkprintoperation.c:1774
#: ../gtk/gtkprintoperation.c:1786
msgctxt "print operation status"
msgid "Printing"
msgstr "Друк"
#: ../gtk/gtkprintoperation.c:1775
#: ../gtk/gtkprintoperation.c:1787
msgctxt "print operation status"
msgid "Finished"
msgstr "Скончана"
#: ../gtk/gtkprintoperation.c:1776
#: ../gtk/gtkprintoperation.c:1788
msgctxt "print operation status"
msgid "Finished with error"
msgstr "Скончана памылкай"
#: ../gtk/gtkprintoperation.c:2343
#: ../gtk/gtkprintoperation.c:2355
#, c-format
msgid "Preparing %d"
msgstr "Падрыхтоўка %d"
#: ../gtk/gtkprintoperation.c:2345 ../gtk/gtkprintoperation.c:2975
#: ../gtk/gtkprintoperation.c:2357 ../gtk/gtkprintoperation.c:2987
msgid "Preparing"
msgstr "Падрыхтоўка"
#: ../gtk/gtkprintoperation.c:2348
#: ../gtk/gtkprintoperation.c:2360
#, c-format
msgid "Printing %d"
msgstr "Друк %d"
#: ../gtk/gtkprintoperation.c:3005
#: ../gtk/gtkprintoperation.c:3017
msgid "Error creating print preview"
msgstr "Не ўдалося стварыць акенца перадагляду для выдруку"
#: ../gtk/gtkprintoperation.c:3008
#: ../gtk/gtkprintoperation.c:3020
msgid "The most probable reason is that a temporary file could not be created."
msgstr "Відаць, не ўдалося стварыць часовы файл."
@@ -1979,28 +1979,28 @@ msgstr ""
"Вызначце прынамсі адзін дыяпазон старонак,\n"
" напрыклад, 1-3,7,11"
#: ../gtk/gtkprintunixdialog.c:2315
#: ../gtk/gtkprintunixdialog.c:2316
msgid "Pages"
msgstr "Старонкі"
#: ../gtk/gtkprintunixdialog.c:2326
#: ../gtk/gtkprintunixdialog.c:2327
msgid "Copies"
msgstr "Копіі"
#. FIXME chpe: too much space between Copies and spinbutton, put those 2 in a hbox and make it span 2 columns
#: ../gtk/gtkprintunixdialog.c:2331
#: ../gtk/gtkprintunixdialog.c:2332
msgid "Copie_s:"
msgstr "_Копіі:"
#: ../gtk/gtkprintunixdialog.c:2346
#: ../gtk/gtkprintunixdialog.c:2348
msgid "C_ollate"
msgstr "_Упарадкаваць"
#: ../gtk/gtkprintunixdialog.c:2352
#: ../gtk/gtkprintunixdialog.c:2354
msgid "_Reverse"
msgstr "_Перакуліць парадак"
#: ../gtk/gtkprintunixdialog.c:2368
#: ../gtk/gtkprintunixdialog.c:2370
msgid "General"
msgstr "Агульнае"
@@ -2010,42 +2010,42 @@ msgstr "Агульнае"
#. Translators: These strings name the possible arrangements of
#. * multiple pages on a sheet when printing
#.
#: ../gtk/gtkprintunixdialog.c:3108
#: ../gtk/gtkprintunixdialog.c:3110
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3586
msgid "Left to right, top to bottom"
msgstr "Злева ўправа, зверху ўніз"
#: ../gtk/gtkprintunixdialog.c:3108
#: ../gtk/gtkprintunixdialog.c:3110
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3586
msgid "Left to right, bottom to top"
msgstr "Злева ўправа, знізу ўверх"
#: ../gtk/gtkprintunixdialog.c:3109
#: ../gtk/gtkprintunixdialog.c:3111
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3587
msgid "Right to left, top to bottom"
msgstr "Справа ўлева, зверху ўніз"
#: ../gtk/gtkprintunixdialog.c:3109
#: ../gtk/gtkprintunixdialog.c:3111
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3587
msgid "Right to left, bottom to top"
msgstr "Справа ўлева, знізу ўверх"
#: ../gtk/gtkprintunixdialog.c:3110
#: ../gtk/gtkprintunixdialog.c:3112
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3588
msgid "Top to bottom, left to right"
msgstr "Зверху ўніз, злева ўправа"
#: ../gtk/gtkprintunixdialog.c:3110
#: ../gtk/gtkprintunixdialog.c:3112
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3588
msgid "Top to bottom, right to left"
msgstr "Зверху ўніз, справа ўлева"
#: ../gtk/gtkprintunixdialog.c:3111
#: ../gtk/gtkprintunixdialog.c:3113
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3589
msgid "Bottom to top, left to right"
msgstr "Знізу ўверх, злева ўправа"
#: ../gtk/gtkprintunixdialog.c:3111
#: ../gtk/gtkprintunixdialog.c:3113
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3589
msgid "Bottom to top, right to left"
msgstr "Знізу ўверх, справа ўлева"
@@ -2053,125 +2053,125 @@ msgstr "Знізу ўверх, справа ўлева"
#. Translators, this string is used to label the option in the print
#. * dialog that controls in what order multiple pages are arranged
#.
#: ../gtk/gtkprintunixdialog.c:3115 ../gtk/gtkprintunixdialog.c:3128
#: ../gtk/gtkprintunixdialog.c:3117 ../gtk/gtkprintunixdialog.c:3130
#: ../modules/printbackends/cups/gtkprintbackendcups.c:3623
msgid "Page Ordering"
msgstr "Парадкаванне старонак"
#: ../gtk/gtkprintunixdialog.c:3144
#: ../gtk/gtkprintunixdialog.c:3146
msgid "Left to right"
msgstr "Злева ўправа"
#: ../gtk/gtkprintunixdialog.c:3145
#: ../gtk/gtkprintunixdialog.c:3147
msgid "Right to left"
msgstr "Справа ўлева"
#: ../gtk/gtkprintunixdialog.c:3157
#: ../gtk/gtkprintunixdialog.c:3159
msgid "Top to bottom"
msgstr "Зверху ўніз"
#: ../gtk/gtkprintunixdialog.c:3158
#: ../gtk/gtkprintunixdialog.c:3160
msgid "Bottom to top"
msgstr "Знізу ўверх"
#: ../gtk/gtkprintunixdialog.c:3398
#: ../gtk/gtkprintunixdialog.c:3400
msgid "Layout"
msgstr "Размяшчэнне"
#: ../gtk/gtkprintunixdialog.c:3402
#: ../gtk/gtkprintunixdialog.c:3404
msgid "T_wo-sided:"
msgstr "Д_вухбаковы:"
#: ../gtk/gtkprintunixdialog.c:3414
#: ../gtk/gtkprintunixdialog.c:3416
msgid "Pages per _side:"
msgstr "Старонак на _бачыне:"
#: ../gtk/gtkprintunixdialog.c:3428
#: ../gtk/gtkprintunixdialog.c:3430
msgid "Page or_dering:"
msgstr "_Парадкаванне старонак:"
#: ../gtk/gtkprintunixdialog.c:3441
#: ../gtk/gtkprintunixdialog.c:3443
msgid "_Only print:"
msgstr "Дру_каваць толькі:"
#. In enum order
#: ../gtk/gtkprintunixdialog.c:3453
#: ../gtk/gtkprintunixdialog.c:3455
msgid "All sheets"
msgstr "Усе аркушы"
#: ../gtk/gtkprintunixdialog.c:3454
#: ../gtk/gtkprintunixdialog.c:3456
msgid "Even sheets"
msgstr "Цотныя аркушы"
#: ../gtk/gtkprintunixdialog.c:3455
#: ../gtk/gtkprintunixdialog.c:3457
msgid "Odd sheets"
msgstr "Няцотныя аркушы"
#: ../gtk/gtkprintunixdialog.c:3458
#: ../gtk/gtkprintunixdialog.c:3460
msgid "Sc_ale:"
msgstr "_Маштаб:"
#: ../gtk/gtkprintunixdialog.c:3482
#: ../gtk/gtkprintunixdialog.c:3484
msgid "Paper"
msgstr "Папера"
#: ../gtk/gtkprintunixdialog.c:3486
#: ../gtk/gtkprintunixdialog.c:3488
msgid "Paper _type:"
msgstr "_Від паперы:"
#: ../gtk/gtkprintunixdialog.c:3498
#: ../gtk/gtkprintunixdialog.c:3500
msgid "Paper _source:"
msgstr "_Крыніца паперы:"
#: ../gtk/gtkprintunixdialog.c:3510
#: ../gtk/gtkprintunixdialog.c:3512
msgid "Output t_ray:"
msgstr "Выхадны _трэй:"
#: ../gtk/gtkprintunixdialog.c:3543
#: ../gtk/gtkprintunixdialog.c:3545
msgid "Or_ientation:"
msgstr "_Арыентацыя:"
#. In enum order
#: ../gtk/gtkprintunixdialog.c:3555
#: ../gtk/gtkprintunixdialog.c:3557
msgid "Portrait"
msgstr "Партрэт"
#: ../gtk/gtkprintunixdialog.c:3556
#: ../gtk/gtkprintunixdialog.c:3558
msgid "Landscape"
msgstr "Пейзаж"
#: ../gtk/gtkprintunixdialog.c:3557
#: ../gtk/gtkprintunixdialog.c:3559
msgid "Reverse portrait"
msgstr "Перакулены партрэт"
#: ../gtk/gtkprintunixdialog.c:3558
#: ../gtk/gtkprintunixdialog.c:3560
msgid "Reverse landscape"
msgstr "Перакулены пейзаж"
#: ../gtk/gtkprintunixdialog.c:3603
#: ../gtk/gtkprintunixdialog.c:3605
msgid "Job Details"
msgstr "Падрабязнасці аб заданні"
#: ../gtk/gtkprintunixdialog.c:3607
#: ../gtk/gtkprintunixdialog.c:3609
msgid "Pri_ority:"
msgstr "Пр_ыярытэт:"
#: ../gtk/gtkprintunixdialog.c:3619
#: ../gtk/gtkprintunixdialog.c:3621
msgid "_Billing info:"
msgstr "_Білінг:"
#: ../gtk/gtkprintunixdialog.c:3634
#: ../gtk/gtkprintunixdialog.c:3636
msgid "Print Document"
msgstr "Друк дакумента"
#. Translators: this is one of the choices for the print at option
#. * in the print dialog
#.
#: ../gtk/gtkprintunixdialog.c:3641
#: ../gtk/gtkprintunixdialog.c:3643
msgid "_Now"
msgstr "_Зараз"
#: ../gtk/gtkprintunixdialog.c:3650
#: ../gtk/gtkprintunixdialog.c:3652
msgid "A_t:"
msgstr "_А:"
@@ -2179,7 +2179,7 @@ msgstr "_А:"
#. * You can remove the am/pm values below for your locale if they are not
#. * supported.
#.
#: ../gtk/gtkprintunixdialog.c:3656
#: ../gtk/gtkprintunixdialog.c:3658
msgid ""
"Specify the time of print,\n"
" e.g. 15:30, 2:35 pm, 14:15:20, 11:46:30 am, 4 pm"
@@ -2187,68 +2187,68 @@ msgstr ""
"Вызначце час для друку,\n"
" напрыклад, 15:30, 14:15:20, 11:46:30"
#: ../gtk/gtkprintunixdialog.c:3664
#: ../gtk/gtkprintunixdialog.c:3666
msgid "Time of print"
msgstr "Час друку"
#: ../gtk/gtkprintunixdialog.c:3678
#: ../gtk/gtkprintunixdialog.c:3680
msgid "On _hold"
msgstr "Па_чакаць"
#: ../gtk/gtkprintunixdialog.c:3679
#: ../gtk/gtkprintunixdialog.c:3681
msgid "Hold the job until it is explicitly released"
msgstr "Устрымаць заданне да яўнага паслання на друк"
#: ../gtk/gtkprintunixdialog.c:3697
#: ../gtk/gtkprintunixdialog.c:3699
msgid "Add Cover Page"
msgstr "Даданне вокладкі"
#. Translators, this is the label used for the option in the print
#. * dialog that controls the front cover page.
#.
#: ../gtk/gtkprintunixdialog.c:3704
#: ../gtk/gtkprintunixdialog.c:3706
msgid "Be_fore:"
msgstr "П_ерад:"
#. Translators, this is the label used for the option in the print
#. * dialog that controls the back cover page.
#.
#: ../gtk/gtkprintunixdialog.c:3719
#: ../gtk/gtkprintunixdialog.c:3721
msgid "_After:"
msgstr "П_асля:"
#. Translators: this is the tab label for the notebook tab containing
#. * job-specific options in the print dialog
#.
#: ../gtk/gtkprintunixdialog.c:3734
#: ../gtk/gtkprintunixdialog.c:3736
msgid "Job"
msgstr "Заданне"
#: ../gtk/gtkprintunixdialog.c:3800
#: ../gtk/gtkprintunixdialog.c:3802
msgid "Advanced"
msgstr "Адмысловае"
#. Translators: this will appear as tab label in print dialog.
#: ../gtk/gtkprintunixdialog.c:3838
#: ../gtk/gtkprintunixdialog.c:3840
msgid "Image Quality"
msgstr "Якасць выявы"
#. Translators: this will appear as tab label in print dialog.
#: ../gtk/gtkprintunixdialog.c:3842
#: ../gtk/gtkprintunixdialog.c:3844
msgid "Color"
msgstr "Колер"
#. Translators: this will appear as tab label in print dialog.
#. It's a typographical term, as in "Binding and finishing"
#: ../gtk/gtkprintunixdialog.c:3847
#: ../gtk/gtkprintunixdialog.c:3849
msgid "Finishing"
msgstr "Аздабленне"
#: ../gtk/gtkprintunixdialog.c:3857
#: ../gtk/gtkprintunixdialog.c:3859
msgid "Some of the settings in the dialog conflict"
msgstr "Некаторыя настройкі дыялогу ўзаемна супярэчаць"
#: ../gtk/gtkprintunixdialog.c:3880
#: ../gtk/gtkprintunixdialog.c:3882
msgid "Print"
msgstr "Друк"
@@ -2338,15 +2338,15 @@ msgctxt "recent menu label"
msgid "%d. %s"
msgstr "%d. %s"
#: ../gtk/gtkrecentmanager.c:1006 ../gtk/gtkrecentmanager.c:1019
#: ../gtk/gtkrecentmanager.c:1156 ../gtk/gtkrecentmanager.c:1166
#: ../gtk/gtkrecentmanager.c:1218 ../gtk/gtkrecentmanager.c:1227
#: ../gtk/gtkrecentmanager.c:1242
#: ../gtk/gtkrecentmanager.c:995 ../gtk/gtkrecentmanager.c:1008
#: ../gtk/gtkrecentmanager.c:1145 ../gtk/gtkrecentmanager.c:1155
#: ../gtk/gtkrecentmanager.c:1207 ../gtk/gtkrecentmanager.c:1216
#: ../gtk/gtkrecentmanager.c:1231
#, c-format
msgid "Unable to find an item with URI '%s'"
msgstr "Не ўдалося адшукаць элемент меню для URI-адрасу \"%s\""
#: ../gtk/gtkrecentmanager.c:2442
#: ../gtk/gtkrecentmanager.c:2431
#, c-format
msgid "No registered application with name '%s' for item with URI '%s' found"
msgstr ""
@@ -2470,12 +2470,12 @@ msgstr "_Файл"
#: ../gtk/gtkstock.c:339
msgctxt "Stock label"
msgid "_Find"
msgstr "З_найсці"
msgstr "_Шукаць"
#: ../gtk/gtkstock.c:340
msgctxt "Stock label"
msgid "Find and _Replace"
msgstr "Знайсці і за_мяніць"
msgstr "Пошук і _замена"
#: ../gtk/gtkstock.c:341
msgctxt "Stock label"
@@ -2714,7 +2714,7 @@ msgstr "Наладка арку_шаў"
#: ../gtk/gtkstock.c:408
msgctxt "Stock label"
msgid "_Paste"
msgstr "_Уклеіць"
msgstr "_Уставіць"
#: ../gtk/gtkstock.c:409
msgctxt "Stock label"
@@ -4527,3 +4527,21 @@ msgstr "тэставы-выдрук.%s"
#: ../modules/printbackends/test/gtkprintbackendtest.c:467
msgid "Print to Test Printer"
msgstr "Тэставы выдрук"
#~ msgid ""
#~ "%s cannot quit at this time:\n"
#~ "\n"
#~ "%s"
#~ msgstr ""
#~ "%s не можа скончыць працу ў гэты момант:\n"
#~ "\n"
#~ "%s"
#~ msgid "Element <%s> not allowed inside <%s>"
#~ msgstr "Элемент <%s> забаронены ўнутры <%s>"
#~ msgid "Element <%s> not allowed at toplevel"
#~ msgstr "Элемент <%s> забаронены на верхнім узроўні"
#~ msgid "text may not appear inside <%s>"
#~ msgstr "тэкст забаронены ўнутры <%s>"

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