Compare commits

...

576 Commits

Author SHA1 Message Date
Matthias Clasen 5dbcf7dc0d Fix an oversight
We must set the construct-only "type" to GTK_WINDOW_POPUP, otherwise
this ends upo being a regular toplevel.
2015-11-10 06:34:15 -05:00
Emmanuele Bassi a938056810 Use CSS node name for GtkTooltipWindow
Instead of a style class.
2015-11-08 17:10:00 +00:00
Emmanuele Bassi 0d9c9e5273 Add GtkTooltipWindow private sub-class
GtkTooltip does a lot of set up on the GtkWindow it uses internally. We
should move that code to a separate class to keep it contained.
2015-11-08 17:03:23 +00:00
Balázs Meskó c33d485d90 Updated Hungarian translation 2015-11-07 14:43:13 +00:00
Balázs Meskó 0253338bf5 Updated Hungarian translation 2015-11-07 14:40:53 +00:00
Matthias Clasen f5af2612f4 Adwaita: Update print dialog styling
Adapt to the changes in the previous commit. With the changes here,
we always render the paper as white, even in the dark theme.
2015-11-07 00:58:00 -05:00
Matthias Clasen 59c1547a48 print dialog: Use an element name for rendering the paper
Use a transient node with name paper instead of a random
collection of style classes for rendering the papers.
2015-11-07 00:57:03 -05:00
Matthias Clasen c63c932a05 Adwaita: Update expander styling
Adapt to the changes in the previous commit.
2015-11-07 00:42:37 -05:00
Matthias Clasen 7ba1368c40 epxander: Port to CSS nodes
Use CSS nodes with name expander and arrow here.
2015-11-07 00:42:24 -05:00
Matthias Clasen cf7f23f4dd scrolledwindow: Document overlay scrolling style classes
Document which style classes are used on scrollbars to
implement overlay scrolling.
2015-11-06 23:35:20 -05:00
Matthias Clasen 353bfb0092 scrolledwindow: Set positional classes on scrollbars
This might be useful for some themes.
2015-11-06 23:28:22 -05:00
Matthias Clasen f900bec4fa scrolled window: Drop unnecessary transient nodes
We already add the .frame style class to the context depending
on the shadow property. No need to save the context and add it
again all the time.
2015-11-06 22:58:08 -05:00
Matthias Clasen e1182ec0e1 window: Don't pass wrong state to context
GtkStyleContext warns nowadays if one queries properties
from a different state. So, don't do that.
2015-11-06 22:47:16 -05:00
Matthias Clasen d25e0657be range: Fixes to the new trough rendering
There was an errant y that caused some troughs to not be drawn.
And also set the state of the fill node.
2015-11-06 22:27:31 -05:00
Matthias Clasen 60c7893c14 scale: Document the new CSS nodes 2015-11-06 22:27:31 -05:00
Benjamin Otte e5ef7dc681 notebook: Fix copy/paste error
This is from the recent commit 2a1a483ede
2015-11-07 03:29:44 +01:00
Matthias Clasen f95a22a3ab Adwaita: Update range styling
Adapt to the new CSS nodes for trough rendering. This commit
also brings back visible fill-level rendering for scales, which
was not working for a while. The styling provided for that
(scale trough fill) is just a placeholder to aid in debugging
the implementation.
2015-11-06 19:28:56 -05:00
Matthias Clasen 11d7f6df7c range: Use CSS nodes for all trough rendering
This replaces the somewhat freewheeling use of style classes to
render a part of the trough highlighted and show a fill level.
2015-11-06 19:25:58 -05:00
Matthias Clasen 50ff2a566a Update mac key theme for css changes
Use the element names for widgets.
2015-11-06 15:20:35 -05:00
Matthias Clasen bc656a3ca5 Update emacs key theme for css changes
Use the element names for widgets.
2015-11-06 15:20:35 -05:00
Benjamin Otte a9814fea7d stylecontext: Always warn on style mismatch
For now, always warn when
gtk_style_context_get()/get_padding()/get_margin()/get_border()
get called with the wrong state.

We used to hide this behind an env var because the warnings were
too frequent, but with the recent refactorings, this warning has become
rather important for detecting bugs.

If it's still problematic, we might want to revert this patch before
3.20.
2015-11-06 18:59:15 +01:00
Benjamin Otte 68ed166c60 range: Use right state when querying margin 2015-11-06 18:59:15 +01:00
Benjamin Otte 2a1a483ede notebook: Query the right node's padding 2015-11-06 18:59:15 +01:00
Benjamin Otte 37b4b60e91 spinbutton: Use right state when querying padding 2015-11-06 18:59:15 +01:00
Matthias Clasen 38cd2c1239 range: Update trough state
It might make sense for the theme to render an insensitive trough
differently.
2015-11-06 11:53:42 -05:00
Matthias Clasen 0bfc7db1fa popover: Don't create transient CSS nodes
There is no need to save the style context here.
2015-11-06 11:50:23 -05:00
Matthias Clasen 8d886f3513 Cosmetic: Use defines for style classes 2015-11-06 11:50:23 -05:00
Matthias Clasen 76fbcc2f26 range: Document fine-tuning style class use 2015-11-06 11:50:23 -05:00
Benjamin Otte 203d8daff4 acccellabel: Use right state when querying font
This was causing permanent invalidations otherwise because drawing
causes the state of the accel node to change.
2015-11-06 16:37:40 +01:00
Matthias Clasen ffd517cc3f Adwaita: Update scale styling
Use :first-child/:last-child on the trough for determining
which slider we need.
2015-11-06 07:04:14 -05:00
Matthias Clasen bfee2d3c61 scale: Stop using style classes for marks
We can use :first/last-child for this now.
2015-11-06 07:01:42 -05:00
Matthias Clasen fd5729baef Adwaita: Fix up filechooser styling
Several details of sidebar and places view styling were lost
along the way. Bring back the circular buttons.
2015-11-05 23:44:16 -05:00
Matthias Clasen 527df17ea3 places view: Remvoe some unused style classes
These style classes were not used in Adwaita, and didn't make
any difference for the appearance.
2015-11-05 23:44:16 -05:00
Matthias Clasen efc7dfd7a7 places view: Add an element name
Use placesview as the element name.
2015-11-05 23:41:42 -05:00
Matthias Clasen 6be2073740 Adwaita: Redo combo box entry styling
Instead of relying on .linked or + (which doesn't work right in rtl),
use :not(:only-child) to select a button that is not alone inside a
combobox.
2015-11-05 21:59:56 -05:00
Matthias Clasen f1b7005ede combobox: Don't add .linked
It interferes with getting the desired styling for combo boxes
with an entry, and is not needed.
2015-11-05 21:59:56 -05:00
Matthias Clasen 7cd177e0d7 Fix a typo 2015-11-05 21:59:56 -05:00
Piotr Drąg 3b9a2a4423 Updated POTFILES.in 2015-11-06 01:05:00 +01:00
Matthias Clasen ad214e1871 window: Add a diagram to the CSS documentation 2015-11-05 16:13:06 -05:00
Matthias Clasen 5d62c808b1 Adwaita: Update window styling
We no longer inherit the style classes on the decoration subnodes,
so we have to adjust some selectors.
2015-11-05 16:07:29 -05:00
Matthias Clasen b4c650ae85 window: Use permanent CSS nodes
gtk_style_context_save_named() has drawbacks that we want to avoid.
2015-11-05 16:06:49 -05:00
Matthias Clasen 948e077f1c tool button: Add element names for tool item subclasses
Add the obvious names to the CSS nodes of GtkRadioToolButton,
GtkToggleToolButton and GtkSeparatorToolItem.
2015-11-05 15:41:37 -05:00
Matthias Clasen ec60bd889c flowbox: Add element names
The names used here are flowbox and flowboxchild.
2015-11-05 15:23:44 -05:00
Matthias Clasen 527f4f44c1 Adwaita: Update listbox styling
Adapt to the changes in the previous commit.
2015-11-05 13:53:43 -05:00
Matthias Clasen 94e675257a placessidebar: Use the same element name for rows
Use row as the element name here too.
2015-11-05 13:51:58 -05:00
Matthias Clasen 4f29b4a348 listbox: Add element names
The names used here are list and row.
2015-11-05 13:48:02 -05:00
Matthias Clasen 92a5eccc3d aspect frame: Use an element name 2015-11-05 12:56:16 -05:00
Matthias Clasen cd798d5aed places sidebar: Document style classes
Document the style classes that GtkPlacesSidebar uses on its rows.
2015-11-05 12:56:16 -05:00
Alexander Larsson 5744c757c2 gtk3-demo: Add open file to the application demo 2015-11-05 16:54:12 +01:00
Alexander Larsson 13c2717d88 docs: Move GtkNativeDialog section to "abstract base classes" 2015-11-05 16:54:12 +01:00
Alexander Larsson 0db50dcea9 Mention native file choosers in NEWS 2015-11-05 16:54:12 +01:00
Alexander Larsson 5e50abf411 testgtk: Add native dialog tests 2015-11-05 16:54:12 +01:00
Alexander Larsson b3d02671ca GtkFileChooserButton: Use native dialogs
Unless you explicitly set the dialog constructor property we use a
native dialog (GtkFileChooserNative).
2015-11-05 16:54:12 +01:00
Alexander Larsson 5094900180 GtkFileChooserNative: Fallback and win32 implementation
This is a subclass on GtkNativeDialog that uses GtkFileChooserDialog
as a fallback, but also has support for the win32 file chooser dialog.
2015-11-05 16:54:07 +01:00
Alexander Larsson 693db082a1 GtkFileFilter: Add private function to represent filter as pattern
This will be needed for the win32 native file chooser which
does not support mimetype sniffing.
2015-11-05 16:52:52 +01:00
Alexander Larsson 81cef0091e Add GtkNativeDialog abstract base class
This is a base class that essentially mirrors GtkDialog, but
it is not a GtkWindow, as the actual implemetation will be using
native code.

The base class has show and hide vfuncs, as well as a helper function
to run the dialog in a modal fashion.

This will be later used by the native file chooser dialog.
2015-11-05 16:52:52 +01:00
Alexander Larsson 0f6c7682b3 Make GtkFileChooser interface require a GObject
Before all GtkFileChooser implementations had to be a GtkWidget,
but we want to introduce one for native implementations that
is not a widget.

This is technically an ABI break, because some code could rely
on the guarantee that GtkFileChoosers are GtkWidgets and do
unchecked GtkWidget calls. However, that does seem unlikely,
and this has not really been documented anywhere.
2015-11-05 16:52:52 +01:00
Alexander Larsson 1c46a02bcb TreeModelFilter: Fix uninitialized memory read.
We were copying an iterator that sometimes was not initialized,
which caused debugger warnings in VS2015.
2015-11-05 16:52:51 +01:00
Matthias Clasen 199e35fa5c HighContrast: Update places sidebar styling
Use the new element name.
2015-11-05 10:43:02 -05:00
Matthias Clasen 35eaca27e4 Adwaita: Update places sidebar styling
Use the new element name.
2015-11-05 10:43:02 -05:00
Matthias Clasen de3ad3781c placessidebar: Use an element name
Set the element name placessidebar.
2015-11-05 10:43:02 -05:00
Matthias Clasen f327ef3cf1 scrolledwindow: Use permanent CSS nodes
This avoids false inheritance due to gtk_style_context_save_named(),
and is generally the right thing to do.
2015-11-05 10:32:04 -05:00
Matthias Clasen 4ed47e757f Fix a crash with steppers
The introduction of the trough node was not properly carried
into the code constructing stepper nodes, and was causing
assertion failures there. This was only showing up on Windows,
since Adwaita and HighContrast don't have steppers.
2015-11-05 09:44:14 -05:00
Matthias Clasen 7b3cda2cd5 gtk3-demo: Drop .sidebar class
This makes no visual difference at all, and the .sidebar class
is causing some complications with the current CSS node transition.
2015-11-05 09:44:14 -05:00
Matthias Clasen 4247e42411 stack sidebar: Remove an unused variable 2015-11-05 09:44:14 -05:00
Benjamin Otte 820a8c2c7f checkmenuitem: Update CSS nodes on set_active()
The function only doesn't notify(). It is supposed to handle CSS
changes.
2015-11-05 15:23:12 +01:00
Benjamin Otte c7491fa144 stack: Store actual widget size, not preferred size
This is just a cleanup commit, no actual bug.
2015-11-05 15:23:12 +01:00
Carlos Garnacho 4d524ab469 widget: Avoid critical warnings when disconnecting plain GtkEventControllers
This signal is only set on GtkGesture objects, so check it's really there
before disconnecting.
2015-11-05 14:32:37 +01:00
Matthias Clasen 66d2c9e6fa Adwaita: Update stack sidebar styling
We no longer use the .sidebar-item style class.
2015-11-05 08:18:38 -05:00
Matthias Clasen 87deb25dc3 stack sidebar: Drop the .sidebar-item style class
It is not needed to achieve the desired theming.
2015-11-05 08:18:06 -05:00
Matthias Clasen c59ef7bf2f stack switcher: Clarify CSS documentation 2015-11-05 08:17:49 -05:00
Matthias Clasen 37c923ad8a HighContrast: Update filechooser styling
Update for changes in previous commit.
2015-11-05 07:45:39 -05:00
Matthias Clasen 87c6ae1c18 Adwaita: Update searchbar styling
Adapt to the changes in the previous commit.
2015-11-05 07:44:29 -05:00
Matthias Clasen bec58dc39e searchbar: Stop adding a style class
We have an element name now.
2015-11-05 07:44:04 -05:00
Matthias Clasen a71bc24184 file chooser: Don't use .search-bar for a box
Just use the more general .view class to avoid special-casing
the file chooser in the theme.
2015-11-05 07:40:48 -05:00
Matthias Clasen 2e314940af range: Redraw when slider visiblity changes
We were not queuing a draw (and not updating the CSS node) when
the slider visibility changed. This was exposed by the Trough
button in tests/testscale.
Fix this by taking slider visibility into account when deciding
whether to queue a draw in response to adjustment changes.
2015-11-05 07:26:10 -05:00
Matthias Clasen 8afb4a69e8 HighContrast: Update scale styling 2015-11-05 07:26:10 -05:00
Matthias Clasen 53ae100e64 Adwaita: Update scale styling
Adapt to the introduction of trough nodes.
2015-11-05 07:26:10 -05:00
Matthias Clasen 07841f269d scale: Split marks node into two
Use separate CSS nodes for the marks above and below the trough.
2015-11-05 07:26:10 -05:00
Matthias Clasen 973836d395 range: Add private api to get the trough node
This will be needed in range subclasses to position their
own subnodes.
2015-11-05 07:26:10 -05:00
Matthias Clasen 9f3deaa496 HighContrast: Update range styling
Adjust to the changes in the previous commit.
2015-11-05 07:26:10 -05:00
Matthias Clasen 1261aa6fdf Adwaita: Update range styling
Adjust to the changes in the previous commit. This partially
undoes the earlier range changes.
2015-11-05 07:26:10 -05:00
Matthias Clasen 2bfb5ad812 range: Add a CSS node for the trough
This is in sync with what we do elsewhere for troughs.
2015-11-05 07:26:10 -05:00
Benjamin Otte b6b00c31d7 stack: Queue a resize/allocate when switching children
We only allocate a size to the currently visible child, so we obviously
need to rerun allocation when the visible child changes.

In the case where the stack is not homogenous, we also need to queue a
resize because our size request just changed.
2015-11-04 19:39:29 +01:00
Benjamin Otte c580a9d01f tests: Make stack expand
This is to test invisible children are actually resized before they are
made visible (which they currrently are not.
2015-11-04 19:39:29 +01:00
Matthias Clasen 894bd13240 HighContrast: Update progressbar styling
Adjust to the chagnes in the previous commit. This partially
undoes the earlier progressbar changes.
2015-11-04 12:43:06 -05:00
Matthias Clasen 48e605b7a4 Adwaita: Update progressbar styling
Adjust to the changes in the previous commit. This partially
undoes the earlier progressbar changes.
2015-11-04 12:33:06 -05:00
Matthias Clasen 9d4c78c2d0 progressbar: Add a CSS node for trough
This is better, since the trough doesn't fill up the allocation
entirely.
2015-11-04 12:32:15 -05:00
Matthias Clasen eade244cac popover: Add the .background style class
This style class indicates that something _requires_ a background,
which is clearly the case for popovers.
2015-11-04 12:05:03 -05:00
Matthias Clasen cca5cac965 paned: Move .wide to CSS subnode
This fits better with our general use of style classes.
2015-11-04 12:05:03 -05:00
Matthias Clasen d40576fb3e revealer: Use an element name 2015-11-04 12:05:03 -05:00
Krzesimir Nowak 4fe04ab54a scrolledwindow: Fix a typo 2015-11-04 14:19:13 +01:00
Matthias Clasen 399ab49fbb HighContrast: Update scrolled window styling
Adapt to the changes in the previous commit.
2015-11-04 07:38:15 -05:00
Matthias Clasen 2ef86c94ed Adwaita: Update scrolledwindow styling
Adapt to the changes in the previous commit.
2015-11-04 07:38:15 -05:00
Matthias Clasen 80af6ff130 scrolledwindow: Port to CSS nodes
Change GtkScrolledWindow to use transient named CSS nodes for
drawing the overshoot, undershoot and scrollbar junction.
2015-11-04 07:38:15 -05:00
Emmanuele Bassi c1ecd1ef9d docs: Point at for_scale() variants
Using lookup_icon() and lookup_by_gicon() with a size multiplied by a
scaling factor is almost certainly going to get worse results than using
their for_scale() variants.
2015-11-04 11:50:37 +00:00
Emmanuele Bassi f959b35064 docs: Clarify gtk_render_icon()'s behaviour
A GdkPixbuf has no scaling factor, so drawing directly from it can only
using a scale of 1, to avoid blurry, fuzzy icons.

You should be using gtk_render_icon_surface() anyway.
2015-11-04 11:45:41 +00:00
Emmanuele Bassi 452e303ec0 docs: Fix typo in gdk_screen_get_scale_factor() 2015-11-04 11:45:19 +00:00
Pedro Albuquerque 9db30bd0d7 Updated Portuguese translation 2015-11-04 07:59:07 +00:00
Pedro Albuquerque 21b545109c Updated Portuguese translation 2015-11-04 07:52:34 +00:00
Matthias Clasen b9613cc416 inspector: Some improvements to the CSS node tree
Set a min-content-height for the property list, and
allow horizontal scrolling.
2015-11-04 00:00:56 -05:00
Matthias Clasen d077f627ef inspector: Really show the selected CSS node
Try harder to scroll the selected CSS node into view.
2015-11-03 23:55:50 -05:00
Matthias Clasen 0024358c91 scale: Fix a crash
We can only free the marks_node if there is one.
2015-11-03 23:35:32 -05:00
Matthias Clasen 099cde5f80 stack sidebar: Use an element name 2015-11-03 23:27:34 -05:00
Matthias Clasen ead35ee12f stack switcher: Use an element name 2015-11-03 23:24:49 -05:00
Matthias Clasen ef1bc737b0 widget-factory: Stop using deprecated API 2015-11-03 23:24:13 -05:00
Matthias Clasen 910f4f72ba stack: Set an element name
And it is...stack.
2015-11-03 23:20:24 -05:00
Matthias Clasen 8dfb0e728c HighContrast: Update range styling
Adapt to changes in the previous commit.
2015-11-03 23:17:09 -05:00
Matthias Clasen 37ad3628a0 Adwaita: Update range styling
Adapt to the changes in the previous commit.
2015-11-03 23:17:09 -05:00
Matthias Clasen 8727c8fe24 range: Convert to CSS nodes
Use CSS nodes for GtkScale and GtkScrollbar. See their documentation
for details on what subnodes with what names exist.
2015-11-03 23:17:09 -05:00
Benjamin Otte 2a6e1498ba testutils: Deprecate a bunch of ugly functions
We've by now disabled and then remved all of the tests that use these
functions because they never worked properly. So let's depecate these
functions before somebody starts using them.
2015-11-04 05:06:31 +01:00
Benjamin Otte 61db7da2ef testsuite: Remove a bunch of broken tests
These tests have either been commented out for way too long or use APIs
that we don't want to support.
2015-11-04 05:06:23 +01:00
Christian Hergert 24391634b5 stack: GtkStack:interpolate-size should be read/write
It looks like the param spec for interpolate-size was
copied from the line above it, which is a read only property.

There is a setter for interpolate-size, and it is implemented in
set_property().
2015-11-03 15:13:51 -08:00
Christian Hergert 5f0a8cf136 headerbar: remove G_PARAM_CONSTRUCT from custom-title
This fixes the ability to sublcass GtkHeaderBar from a UI template which
contains a custom <child type="title"> element.

https://bugzilla.gnome.org/show_bug.cgi?id=757544
2015-11-03 14:50:56 -08:00
Benjamin Otte d65ba7cf97 widget: Queue resize on parent, not self
When setting the parent of a widget, queue_resize() on the widget will
be optimized away if the widget already had a resize queued.

Plus, we do not need to resize the widget as its size request is not
going to change.
2015-11-03 22:55:03 +01:00
Matthias Clasen 8e5c7ac028 menu: Add diagrams to CSS documentation 2015-11-03 14:27:35 -05:00
Matthias Clasen c389511b86 paned: Add diagrams to CSS documentation 2015-11-03 14:27:35 -05:00
Matthias Clasen 92e3655ace combo box: Add diagrams to CSS documentation 2015-11-03 14:27:35 -05:00
Matthias Clasen a7076d1c4c text view: Add diagram to CSS documentation 2015-11-03 14:27:35 -05:00
Matthias Clasen fc0a222350 accel label: Add diagrams to CSS documentation 2015-11-03 14:27:35 -05:00
Matthias Clasen 332ea5f8ec progressbar: Add diagrams to CSS documentation 2015-11-03 14:27:35 -05:00
Matthias Clasen 65d959bbc8 spin button: Add diagrams to CSS documentation 2015-11-03 14:27:35 -05:00
Matthias Clasen 870461475a switch: Add a diagram to CSS node documentation 2015-11-03 14:27:35 -05:00
Benjamin Otte 1f01b8d52a widget: Queue an allocate on hide
This makes sure that hidden widgets always have priv->alloc_needed set
on them.

The constructor sets that flag, so we want to have it back when we
revert to this state.

This fixes GtkWindow skipping a size_allocate() when reshowing a
previously hidden window and thereby not updating its allocation and
clip. And that in turn would lead to draws not happening and us beig
left with a black window.
2015-11-03 18:57:14 +01:00
Matthias Clasen 09f7c8511b model button: Add diagrams to the CSS node documentation 2015-11-03 12:51:52 -05:00
Matthias Clasen 19b34a44b2 model button: Complete the CSS node conversion
There was still style context saving in the draw function,
and the CSS node was not always properly updated and positioned.
Fix these things, and use the same CSS node for the arrow
drawing as well.
2015-11-03 12:20:53 -05:00
Matthias Clasen 6791c1413d list box: Remove an unused static 2015-11-03 10:43:48 -05:00
Matthias Clasen 77e99039fc file chooser button: Remove an unused variable 2015-11-03 10:41:49 -05:00
Matthias Clasen 67b739b58a button: Add diagrams to CSS node docs for buttons 2015-11-03 10:17:41 -05:00
Matthias Clasen 6328cf5ee5 entry: Add a diagram to CSS node docs 2015-11-03 09:53:00 -05:00
Matthias Clasen c711906f8c inspector: Replace a use of gtk_button_set_focus_on_click
It is deprecated now.
2015-11-03 07:44:17 -05:00
Florian Müllner de50012371 listbox: Implement :focus-on-click
Similar to buttons-in-toolbars, it can make sense for listbox rows
to not take away the focus from the main application view, for
instance when used for navigation. Support this by taking the newly
added GtkWidget:focus-on-click property into account.

https://bugzilla.gnome.org/show_bug.cgi?id=757269
2015-11-03 07:44:17 -05:00
Florian Müllner e364ae3ea8 Use gtk_widget_set_focus_on_click() instead of deprecated setters
https://bugzilla.gnome.org/show_bug.cgi?id=757269
2015-11-03 07:44:17 -05:00
Florian Müllner 9a29a2768b Deprecate widget-specific :focus-on-click properties
The differences between the existing properties and the newly added
GtkWidget:focus-on-click property are minimal (different owner_type
in GParamSpec), so it is extremely unlikely that dropping the former
would break anything.

https://bugzilla.gnome.org/show_bug.cgi?id=757269
2015-11-03 07:44:17 -05:00
Florian Müllner ebdf5f581d widget: Add :focus-on-click property
There are currently three widget that implement such a property, and
there are other widgets for which the behavior can make sense. It
seems like a good time to add the property to GtkWidget itself so
subclasses can choose to respect it without adding their own property.

https://bugzilla.gnome.org/show_bug.cgi?id=757269
2015-11-03 07:44:17 -05:00
Carlos Garnacho 7d8a3a52ce GdkDevice: Do not free construct-only properties data on dispose()
Those are not references to other objects, and the device will be mostly
useless if those can't be set again anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=756625
2015-11-03 13:28:07 +01:00
Carlos Garnacho 4f61fd09c5 texthandle: Request raising of text handle popovers.
https://bugzilla.gnome.org/show_bug.cgi?id=756670
2015-11-03 07:25:33 -05:00
Carlos Garnacho 9d1b8dfc61 popover: Request raise on ::show
This way latest shown popovers are ensured to be on top.

https://bugzilla.gnome.org/show_bug.cgi?id=756670
2015-11-03 07:25:33 -05:00
Carlos Garnacho fa3e0be80c GtkWindow: make popover stacking explicit
The list of popovers will specify the stacking order, a
_gtk_window_raise_popover() private call has been added so popover
widgets can request being on top.

Also, the stacking on popovers is ensured on gtk_window_size_allocate(),
after the size/stacking changes on the child widget have finished, this
will ensure popovers are kept on top of window contents.

https://bugzilla.gnome.org/show_bug.cgi?id=756670
2015-11-03 07:14:36 -05:00
Carlos Garnacho 29dd395b7a x11: Detect single-touch touchscreens as GDK_SOURCE_TOUCHSCREEN
Those won't have ABS_MT_* axes, so won't be reported has having
XITouchClassInfo. Fallback on these to checking whether abs x/y axes are
available. After the Wacom checks, any remaining device with absolute axes
should be touchscreens, and GDK_SOURCE_MOUSE does indeed just make sense on
devices with relative axes.

https://bugzilla.gnome.org/show_bug.cgi?id=757358
2015-11-03 07:07:12 -05:00
Dhiru Kholia b3b4282beb Fix a memory leak in gtk-3.0.m4 file
This fix is inspired by,

https://git.gnome.org/browse/glib/tree/m4macros/glib-2.0.m4

https://bugzilla.gnome.org/show_bug.cgi?id=757221
2015-11-03 07:07:00 -05:00
Olivier Fourdan a5b1cdd0c1 GtkWindow: Fix the shadow width logic
Previous commit 305b34a "GtkWindow: fix move/get position with CSD"
introduced a regression because some windows presumably use shadows but
actually don't, resulting in a negative offset being wrongly applied.

Problem is that get_shadow_width() would return non-zero shadows even
for windows that have no shadow, thus causing the negative offset.

Fix the logic in get_shadow_width() and gtk_window_should_use_csd() so
that get_shadow_width() returns accurate values.

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=756618
2015-11-03 09:33:34 +01:00
Matthias Clasen 9f04efd316 Adwaita: Update menubar styling
Adapt to the changes in the previous commit.
2015-11-02 23:49:38 -05:00
Matthias Clasen a0d7b609e3 menubar: Use an element name 2015-11-02 23:49:20 -05:00
Matthias Clasen b6112c6ed6 Adwaita: Update menu item styling
Adapt to the changes in the previous commit.
2015-11-02 23:43:58 -05:00
Matthias Clasen aede5c65d3 menu item: Use CSS nodes
Use the element name menuitem for GtkMenuItem, GtkCheckMenuItem
and GtkRadioMenuItem. GtkSeparatorMenuItem gets the name separator.
Add a subnode with name arrow if a submenu is attached.
Give the radio and check menu items a subnode with name check or
radio.
2015-11-02 23:42:14 -05:00
Matthias Clasen ac553d7e44 check button: Match documented behavior
We were not actually adding the style classes that the
documentation is talking about, for the !draw-indicator case.
Fix that.
2015-11-02 23:06:57 -05:00
Matthias Clasen dd01f2d407 menu item: Remove an unused member
Nobody is reading or writing this field, so we can do without it.
2015-11-02 22:20:04 -05:00
Matthias Clasen 2ba957364d menu: Fix up CSS node ordering
Keep the bottom arrow node at the end, where it belongs.
2015-11-02 21:49:10 -05:00
Matthias Clasen 25e01a3937 menu: Document CSS nodes 2015-11-02 21:40:40 -05:00
Matthias Clasen 0e41ff015c HighContrast: Update menu styling
Support the element names introduced in the previous commit.
2015-11-02 21:34:14 -05:00
Matthias Clasen f8c3e48bd2 Adwaita: Update menu styling
Support the element names introduced in the previous commit.
2015-11-02 20:47:56 -05:00
Matthias Clasen 0b52b29dfc menu: Port to use css nodes
Use the element name menu for the main node, and use two subnodes
with name arrow and style classes .top and .bottom for the arrows
of scrolling menus.
2015-11-02 20:47:55 -05:00
Cosimo Cecchi f6ca908e03 menushell: don't call gtk_render_background()
GtkMenu and GtkMenuBar, the two implementations of GtkMenuShell in GTK,
already draw it.
Furthermore, rendering a background here will overdraw any rendering
that the subclass will do, such as arrows for scrolling menus.
2015-11-02 16:05:07 -08:00
Benjamin Otte 7cdfee71da inspector: Do not show transient nodes
This is kind of a hack the way it's implemented, but it's necessary
for performance to ignore transient nodes as they get created all the
time (via gtk_style_context_save()) and invalidate the whole treeview.
And that causes resizes and redrawing of the treeview and performance of
the inspector would go down the drain now that we display a larger part
of the node tree.
2015-11-02 20:32:12 +01:00
Benjamin Otte 81de33e906 inspector: Always show full CSS node tree
Just select the node of the current widget whenever a new one gets
selected.
2015-11-02 20:32:12 +01:00
Benjamin Otte 96a485d8b2 gdkrgba: Use %g instead of %.17g to print alpha
This way 0.3 isn't printed as 0.29999999999999
2015-11-02 20:32:12 +01:00
Matthias Clasen 5ebb713df5 HighContrast: Update combobox styling
Adapt to the changes in the previous commit.
2015-11-02 14:26:50 -05:00
Matthias Clasen 0d12cc3354 Adwaita: Update combobox styling
Adapt to the changes in the previous commit. Some further fixes will
be necessary here.
2015-11-02 14:22:49 -05:00
Matthias Clasen d229ea3de1 combobox: Use element names
Use combobox as the element name for the main CSS nodes of
GtkComboBox and GtkComboBoxText. Add the .combo style class
to the button and entry. in a GtkComboBox or GtkComboBoxText.
2015-11-02 13:56:25 -05:00
Matthias Clasen e56bb49407 popover: Document differentiating style classes
There's a lot of popover variations out there.
2015-11-02 12:53:57 -05:00
Matthias Clasen 13d091f700 button: Mention differentiating style classes
There's a lot of button variations out there, lets document
the ones we know about.
2015-11-02 12:51:00 -05:00
Matthias Clasen 113c88c2cf HighContrast: Update magnifier styling
Adapt to changes in the previous commit.
2015-11-02 12:47:14 -05:00
Matthias Clasen 85bfe9ee38 Adwaita: Update magnifier styling
Adapt to changes in the previous commit.
2015-11-02 12:46:45 -05:00
Matthias Clasen d5ff9af94e entry, textview: Use a dedicated style class for magnifier
This will free up "osd" as an application-level style class,
and lets us style magnifiers differently.
2015-11-02 12:40:38 -05:00
Matthias Clasen f2434e7cea file chooser button: Add a style class
Unfortunately, GtkFileChooserButton is different from the other
pickers in that it is not a button, but rather has a button.

We ignore the difference for styling purposes, and just add
a .file style class to the button.
2015-11-02 12:27:36 -05:00
Matthias Clasen 957135a57c Adwaita: Fix menu separators
These were inadvertedly broken by the element name conversion
for regular separators.
2015-11-02 12:21:39 -05:00
Cemil Azizoglu 9e2b796e77 mir: Print hscroll and vscroll values when debugging.
Signed-off-by: William Hua <william.hua@canonical.com>
2015-11-02 10:46:37 -05:00
Benjamin Otte 5c53e873b1 inspector: Track updates of node styles
When the CSS style of a node changes, we want to display the new values
in the inspector.

This for example allows to see how styles update on hover or during
animations.
2015-11-01 16:45:11 +01:00
Colomban Wendling f4c30060be cssnode: Fix style updating when the CSS node ID changes
Since 4ebb5781ea ID has a specific value,
while it used to be the same as NAME.  Thus, explicitly list ID as a
radical change just like NAME.

https://bugzilla.gnome.org/show_bug.cgi?id=757397
2015-11-01 02:42:36 +01:00
Colomban Wendling 79a3a7800e cssnode: Fix a typo leading to very poor cache hashing 2015-11-01 02:42:36 +01:00
Colomban Wendling eef5f27fb4 gtkcontainer: Guard internal use of deprecated public API 2015-11-01 02:42:36 +01:00
Benjamin Otte e0f4bf5d35 inspector: Store the current node in the priv struct 2015-11-01 02:42:36 +01:00
Benjamin Otte b89939f5a4 inspector: Split out a function 2015-11-01 02:42:36 +01:00
Matthias Clasen 7568d17a15 toolpalette: Use element names
Give the GtkToolPalette and GtkToolItemGroup the element
names toolpalette and toolitemgroup.
2015-10-31 21:02:36 -04:00
Matthias Clasen cacc63ea4b HighContrast: Update toolbutton styling 2015-10-31 20:55:51 -04:00
Matthias Clasen 1bc2913f52 Adwaita: Update tool button styling 2015-10-31 20:52:41 -04:00
Matthias Clasen 4323dd34f3 tool button: Add an element name
Unsurprisingly, it is toolbutton.
2015-10-31 20:52:09 -04:00
Matthias Clasen dba8eba6db HighContrast: Update toolbar styling
Adapt to the changes in the previous commit.
2015-10-31 20:43:07 -04:00
Matthias Clasen 5ffd54aca8 Adwaita: Update toolbar styling
Adapt to the changes in the previous commit.
2015-10-31 20:42:41 -04:00
Matthias Clasen 7ee7019ca7 toolbar: Use an element name instead of a style class
The element name is ... toolbar.
2015-10-31 20:30:56 -04:00
Matthias Clasen 479d64e89a progress bar: Add CSS documentation 2015-10-31 20:30:15 -04:00
Matthias Clasen ca385af3c4 HighContrast: Update progressbar styling
Adapt to the changes in the previous commit.
2015-10-31 20:24:46 -04:00
Matthias Clasen 71afd762ed Adwaita: Update progressbar styling
Adapt to the changes in the previous commit.
2015-10-31 20:24:19 -04:00
Matthias Clasen 73704d98cc progressbar: Convert to CSS nodes
Use the element names progressbar and progress.
2015-10-31 20:20:13 -04:00
Matthias Clasen bab20f1d10 trivial formatting fix 2015-10-31 19:23:47 -04:00
Matthias Clasen 7ea33d82ed Remove a duplicate include 2015-10-31 19:19:53 -04:00
Matthias Clasen d3abd83330 Adwaita: Fix up color button styling
There was one forgotten instance of the GtkColorSwatch type name.
2015-10-31 19:13:32 -04:00
Matthias Clasen 7465601c1e HighContrast: Update the frame styling
Adapt to the changes in the previous commit.
2015-10-31 19:11:18 -04:00
Matthias Clasen 3de78decd4 Adwaita: Update frame styling
Adapt to the changes in the previous commit.
2015-10-31 19:10:52 -04:00
Matthias Clasen aa5dc38b0d frame: Use an element name instead of a style class
Unsurprisingly, the element name is ... frame.
2015-10-31 19:09:46 -04:00
Matthias Clasen 1f585151fd Load settings.ini from all data dirs
An error in the loading function was making us load the file from
the first data dir repeatedly, instead.

https://bugzilla.gnome.org/show_bug.cgi?id=757377
2015-10-31 18:16:10 -04:00
Paolo Borelli 8606e57910 win32: handle WM_DISPLAYCHANGE globally
Instead of handling WM_DISPLAYCHANGE on every GdkWindow, only handle
it on an ad-hoc hidden window we create when opening the display.
This has two reasons:
1) we want emit the display::size-changed signal even if there are no
   gtk windows currently open
2) we want to emit the signal just once and not once for every window

https://bugzilla.gnome.org/show_bug.cgi?id=757324
2015-10-31 15:31:11 +01:00
Matthias Clasen e2e198aae4 model button: Propagate state
Propagate the state to the CSS node for the indicator.
2015-10-31 00:08:00 -04:00
Matthias Clasen b6fda5dc0a inspector: Show CSS node state
This is useful when debugging state propagation issues between
CSS nodes.
2015-10-31 00:07:19 -04:00
Matthias Clasen c265b58181 HighContrast: adjust message dialog styling 2015-10-30 23:49:44 -04:00
Matthias Clasen d70d5ea6ec adwaita: Adjust message dialog styling 2015-10-30 23:49:17 -04:00
Matthias Clasen 4fe1b9589e message dialog: Use an element name 2015-10-30 23:48:46 -04:00
Matthias Clasen dfedda3dee color editor: Redo the non-activatable color swatch
Use a .activatable style class on the color swatch and tie the
hover effect to it. The color editor simply removes this class
now to get an inert color swatch.

This is more flexible and lets us avoid referring to the
GtkColorEditor type in the theme.
2015-10-30 22:19:07 -04:00
Matthias Clasen 42a231a61c HighContrast: Adapt to color swatch changes
This needs more work and simplification.
2015-10-30 21:46:36 -04:00
Matthias Clasen 4e8aea012e Adwaita: Adapt to color swatch changes
This needs more work and simplification.
2015-10-30 21:44:19 -04:00
Matthias Clasen 5ec9b330b3 swatch fixup 2015-10-30 21:43:50 -04:00
Matthias Clasen e5d3c8dbae color swatch: Convert to CSS nodes
Convert GtkColorSwatch to use the two elements colorswatch and
image.
2015-10-30 21:29:46 -04:00
Matthias Clasen e3ef2c48d5 text view: Add css node docs 2015-10-30 21:00:01 -04:00
Matthias Clasen a4a3736461 HighContrast: Update textview styling
Some updates to make text appear as usual.
2015-10-30 19:58:11 -04:00
Matthias Clasen b39601bcc1 Adwaita: Update textview styling
Some updates to make text appear as usual. The border windows
probably need some more work.
2015-10-30 19:55:42 -04:00
Matthias Clasen 844f60f1f2 text view: Convert to CSS nodes
Use subnodes for the border windows, and add children to the right
subnodes.
2015-10-30 19:49:02 -04:00
Matthias Clasen 2b998aaad7 text view: Set an element name
And it will be...drumroll...textview.
2015-10-30 18:11:13 -04:00
Matthias Clasen ee3799f151 icon view: Add an element name
Not surprising anybody, I decided to call it iconview.
2015-10-30 17:44:36 -04:00
Matthias Clasen f97e2599e3 HighContrast: Adapt to changed treeview names 2015-10-30 17:38:04 -04:00
Matthias Clasen 739e0c17a1 Adwaita: Adapt to changed treeview names 2015-10-30 17:37:32 -04:00
Matthias Clasen 5b360a479d tree view: Rename and document element names
The names are now treeview and header.
2015-10-30 17:25:43 -04:00
Matthias Clasen a24dba28ae HighContrast: Update font button styling
Use the new element name and style class.
2015-10-30 17:18:06 -04:00
Matthias Clasen 2cff7a68f2 Adwaita: Update font button styling
Use the new element name and style class.
2015-10-30 17:17:41 -04:00
Matthias Clasen bd456ac67b font button: Add an element name
Give this GtkButton subclass element name button and style class .font.
2015-10-30 17:09:59 -04:00
Matthias Clasen 85d971b40b HighContrast: Update paned styling
Adapt to the new element names.
2015-10-30 15:53:28 -04:00
Matthias Clasen 828faaba64 Adwaita: Update paned styling
Adapt to the new element names in the previous commit.

This also adds back a selected state which gets used
for when the focus is placed on the separator with F8,
just so this functionality is not forgotten.
2015-10-30 15:53:28 -04:00
Matthias Clasen 0f2ce2bb1c paned: Convert to CSS nodes
Add a subnode for the separator, and use it for drawing.
2015-10-30 15:53:28 -04:00
Piotr Drąg cc872f3c08 Updated POTFILES.in and POTFILES.skip 2015-10-30 19:53:08 +01:00
Matthias Clasen 97c1782246 Update the generated css for the previous commit 2015-10-30 14:51:41 -04:00
Timm Bäder 33ac663b13 popover: Use element name
Pick "popover" and add .menu for popover menus
2015-10-30 15:10:35 +01:00
Georges Basile Stavracas Neto 50c6a11b05 placesview: vertically align path labels
The current situation is somewhat sad, with the path
label totally misaligned throughout the rows.

This is fixed by using a size group for the path labels,
so they all have the same allocated size (with the max
of 15 chars). Also, instead of hiding the eject button,
set it child-invisible, so it is hidden and yet it's size
is allocated by GtkBox.

https://bugzilla.gnome.org/show_bug.cgi?id=757303
2015-10-30 11:35:43 -02:00
Lapo Calamandrei 84380b345d Adwaita: fix vertical switch styling 2015-10-30 13:17:52 +01:00
Lapo Calamandrei 0a845fb563 Adwaita: fix switch sizing
moving -GtkSwitch-slider-width and -GtkSwitch-slider-height from
the GtkSwitch selector to the * wildcard selector as other style
props.
2015-10-30 12:53:44 +01:00
Matthias Clasen af3789bb87 inspector: Drop the style property list
Style properties are now shown for each CSS node in the
CSS node tab, so we don't need a separate per-widget tab
for this.
2015-10-30 06:51:43 -04:00
Matthias Clasen 91af42263b inspector: Drop the style classes list
Style classes can now be added/removed for each CSS node in
the CSS node tab, so we don't need a separate per-widget tab
for this.
2015-10-30 06:51:43 -04:00
Yosef Or Boczko 3eec0876ab Updated Hebrew translation 2015-10-30 12:26:52 +02:00
Matthias Clasen aa6e0ad3f2 menu button: Revisit style class one more time
Use .popup, which is already in use elsewhere, fits better with
the other button differentiating style classes, and does not
interfere with menus.
2015-10-30 06:16:10 -04:00
Matthias Clasen c925a840b2 HighContrast: Update color button styling
Adapt to the previous commit.
2015-10-30 06:16:10 -04:00
Matthias Clasen e148876dd4 Adwaita: Update color button styling
Adapt to the previous commit.
2015-10-30 06:16:10 -04:00
Matthias Clasen 7d18398eeb color button: Add a style class
Add a .color style class to differentiate this button from the
normal ones.
2015-10-30 06:16:10 -04:00
Marek Černocký 908e046cbd Updated Czech translation 2015-10-30 07:12:33 +01:00
Matthias Clasen 43e2ee31bc HighContrast: Update headerbar styling
Adapt to the previous commit.
2015-10-30 01:09:18 -04:00
Matthias Clasen 40f9a0fe69 Adwaita: Update headerbar styling
Adapt to the previous commit.
2015-10-30 01:08:30 -04:00
Matthias Clasen 8c0c0f9c07 headerbar: Use an element name instead of a style class
Use the element name headerbar.
2015-10-30 01:07:58 -04:00
Matthias Clasen b9c565b06c Revisit menu button style
Change the style class to .menubutton, to avoid interference
from GtkMenu theming.
2015-10-30 01:07:27 -04:00
Matthias Clasen ee81f3ee2f menu button: Add a style class
Add a .menu style class to differentiate menu buttons from normal
ones.
2015-10-30 00:56:00 -04:00
Matthias Clasen 2c5e25a5c7 scale button: Add a style class
Add a .scale style class to differentiate scale buttons from normal
ones.
2015-10-30 00:51:13 -04:00
Matthias Clasen 4cd408e8d0 link button: Add a style class
Add a .link style class to differentiate link buttons from normal
buttons.
2015-10-30 00:50:48 -04:00
Matthias Clasen 9e5914ebde HighContrast: Updates for recent changes
This is bit of a grab-bag, it includes fixes for spin buttons,
entries, buttons.
2015-10-30 00:40:50 -04:00
Matthias Clasen d0e91ec088 Adwaita: Adapt to the button changes
The updates here cover the various button variants.
2015-10-30 00:40:50 -04:00
Matthias Clasen 8894e46183 model button: Convert to CSS nodes
Follow the same approach as used for the toggle button family:
Keep the button element name for button-like rendering, and
use a distinct modelbutton name otherwise, and add a subnode
for the indicator with name check or radio.
2015-10-30 00:40:50 -04:00
Matthias Clasen c631656f0c toggle button: Convert to css nodes
Convert GtkToggleButton and its subclasses to CSS nodes.
Keep the button element name for when we want to render
these button-like (but with .toggle, .check and .radio
style classes for differentiation).

When we want to render them with an indicator, use distinct
element names checkbutton and radiobutton, and add a subnode
for the indicator with name check or radio.
2015-10-30 00:40:50 -04:00
Matthias Clasen 826633b5b7 lockbutton: Revisit element name
Instead of a separate element name, keep button, and just
add a .lock style class, to inherit the button theming.
2015-10-30 00:26:04 -04:00
Matthias Clasen cc2f189144 Adwaita: button fixes 2015-10-29 23:17:41 -04:00
Matthias Clasen b350779a6f togglebutton: Add a style class
This lets us differentiate toggle buttons from plain buttons
with button.toggle, without having to redo all the styling.
2015-10-29 23:04:47 -04:00
Matthias Clasen a953e37735 button: Use an element name instead of a style class 2015-10-29 22:55:29 -04:00
Benjamin Otte e39b8611bd widget: Queue redraw on gtk_widget_queue_allocate()
Mirror the behavior of gtk_widget_queue_resize() and always queue a
redraw. If we ever want to cause allocates without redraws we can add
gtk_widget_queue_allocate_no_redraw() then.

I had initially assumed gtk_widget_size_allocate() would take care of
queueing redraws, but it does not do that when neither size nor position
change. And that is obviously what's happening after
gtk_widget_queue_allocate().

Fixes buttons sometimes not redrawing (the record button in
widget-factory after locking it, all buttons when switching to the dark
theme).
2015-10-30 02:09:17 +01:00
Matthias Clasen 32de7edf1d Assistant: Fix page rmoval
We have to remove the page itself from the intermediate box
first, before removing the box from the notebook. Otherwise,
reffing the page to keep it alive is ineffective: the box
gets destroyed, and that destruction recurses over the page.

This fixes the problem in
https://bugzilla.gnome.org/show_bug.cgi?id=756385
2015-10-29 19:21:47 -04:00
Sébastien Granjoux ffaaa1e66e Add a more complex widget in the flipping assistant
This reproduces the problem from bug
https://bugzilla.gnome.org/show_bug.cgi?id=756385
2015-10-29 19:21:20 -04:00
Florian Müllner a0a78a8973 Adwaita: Update double-border tweak for scrolled windows
Since commit b6dbfc791f, GtkViewPort uses an element name.
2015-10-29 18:24:40 +01:00
Dominique Leuenberger 4f24c8569c placessidebar: do not crash if uris is NULL
On Drag'n'Drop actions across system boundaries (VM host to guest), the
happen to be null.

https://bugzilla.gnome.org/show_bug.cgi?id=757298
2015-10-29 17:32:13 +01:00
Benjamin Otte fc6f41c751 spinbutton: Don't set .entry
Also fix Adwaita to not use .entry anymore
2015-10-29 16:03:15 +01:00
Benjamin Otte 63f2fc752a searchentry: Fix includes 2015-10-29 15:55:28 +01:00
Matthias Clasen b6dbfc791f viewport: Add an element name to the css node
This lets us avoid hardcoding the type in CSS.
2015-10-29 07:47:31 -04:00
Matthias Clasen ea5f16fd2d searchbar: Add an element name to the css node
This lets us avoid hardcoding the type in CSS.
2015-10-29 07:43:30 -04:00
Matthias Clasen d634403d91 actionbar: Add an element name to the css node
This lets us avoid hardcoding the type in CSS.
2015-10-29 07:08:15 -04:00
Matthias Clasen 2936d7bae8 statusbar: Add an element name to the css node
This lets us avoid hardcoding the type in CSS.
2015-10-29 07:01:57 -04:00
Matthias Clasen 56d3e42a00 search entry: Add a style class
There should be little need to have separate styling for search
entries, so a separate name would be a bit overkill.
2015-10-28 23:58:39 -04:00
Matthias Clasen a840a6d597 lock button: Add an element name 2015-10-28 23:57:57 -04:00
Matthias Clasen bb7d7851ac entry, spinbutton: Finish css node conversion
This commit creates entry and button subnodes for the buttons
in GtkSpinButton. The nodes are ordered like this for horizontal

  spinbutton
  + entry
    + image.left
    + image.right
    + progress
  + button.down
  + button.up

and like this for vertical ones:

  spinbutton
  + button.down
  + entry
  + button.up

This arrangement requires cooperation from GtkEntry to place
the entry subnodes correctly, and some small changes in the theme.

This commit also fixes progress rendering in vertical spin buttons.
2015-10-28 23:43:32 -04:00
Matthias Clasen ebcad63e31 wip: spinbutton 2015-10-28 21:55:13 -04:00
Matthias Clasen 811c1c9484 spinbutton: Trivial cleanup
Use g_clear_object in a few places.
2015-10-28 21:55:13 -04:00
Benjamin Otte 4483636016 widget: Queue resize on parent on show/hide
When gtk_widget_show() or gtk_widget_hide() is called, don't queue a
resize on the widget itself but on the parent.

The widget itself may already be marked as in need of a resize and
the call would be optimized out and never reach the parent.
The parent size will change though because a child widget just changed
its visibility.

Fixes a bunch of issues with menus appearing black, toolbas not hiding
in widget-factory and also various reftests.
2015-10-29 01:03:09 +01:00
Benjamin Otte cd20ae8fe1 container: Don't keep our own variable trying to track need for resize
Insteaad, introduce gtk_widget_needs_allocate() and use that.
2015-10-28 19:44:29 +01:00
Benjamin Otte e07ff714b9 widget: Make invisible widgets not propagate resizes
Do not queue a resize on the parent if the widget is not visible.
Invisible widgets do not influence the parents size.
2015-10-28 19:44:29 +01:00
Benjamin Otte bef44ab294 window: Don't queue resizes when inhibiting resizes
Since the frame clock, the inhibit happens on the GDK level, so this
code is no longer necessary.
2015-10-28 19:44:29 +01:00
Benjamin Otte 6866d1c06e widget: Make gtk_widget_queue_allocate() not resize
This commit toggles the big switch. We now don't run size_allocate()
from the toplevel up anymore in cases where we don't need to.

Things might be broken in subtle ways as a result of this commit. We'll
have to find them and fix them.
2015-10-28 19:44:28 +01:00
Benjamin Otte 299600a7d4 widget: Track if a child needs an allocation
This is not used so far.
2015-10-28 19:44:28 +01:00
Benjamin Otte f706891dd3 widget: Refactor function
Turn it from a loop into tail-calling itself.
2015-10-28 19:44:28 +01:00
Benjamin Otte ab7e901cfd widget: Move resize function into gtkwidget.c
There's no sizegroup specific code left in it, but lots of
widget-specifics.
2015-10-28 19:44:28 +01:00
Benjamin Otte 4fa74e68e9 sizegroup: Merge function into only caller 2015-10-28 19:44:28 +01:00
Benjamin Otte b5dfe9b833 sizegroup: Simplify widget's size group invalidation
Since we do not queue resizes twice anymore, we can just walk the list
of groups without deduplication.
2015-10-28 19:44:28 +01:00
Benjamin Otte a31123e9f0 sizegroup: Skip resizes on widgets that have resize queued
Widgets that already have a resize queued don't need to walk the whole
parent chain and queue another resize. It's enough to do it once per
resize.

This also means that sizegroups cannot use the shortcut of just
invalidating the first widget in the group anymore. That widget might
already have a resize queued while others don't.
2015-10-28 19:44:28 +01:00
Benjamin Otte a4587ef4a0 widget: Warn on calls to queue_resize() during size_allocate()
This happens way too much, so it's disabled unless GTK_DEBUG=geometry is
on.

Also, we can't detect it in the call to queue_resize() yet, only during
size_allocate(), so the warning comes after the signal emission.
2015-10-28 19:44:28 +01:00
Benjamin Otte 4d631a9144 widget: Clear pending resizes after size_allocate()
This catches the cases where widgets call gtk_widget_queue_resize()
in their size_allocate() callback.
2015-10-28 19:44:28 +01:00
Benjamin Otte 3e3f17576e widget: Warn if size-unqueried widgets get allocated
Widgets should have gtk_widget_get_preferred_width/height() called
on them before gtk_widget_size_allocate() gets called.
Add a check for this.
2015-10-28 19:44:28 +01:00
Benjamin Otte 6cc2615b63 widget: Add a resize_needed flag
... and API to set and unset it.

It is set when gtk_widget_queue_resize() is called.
It is unset when gtk_widget_get_preferred_width/height() is called.

So far it is not used.
2015-10-28 19:44:28 +01:00
Benjamin Otte 3ff894c201 widget: Add a function that does actual resize
It's just shuffling code around.
2015-10-28 19:44:28 +01:00
Benjamin Otte 58d506fb11 sizegroup: Merge function into only caller
Both functions were running the same loop. Just running the loop once
seems advantageous.
2015-10-28 19:44:28 +01:00
Benjamin Otte 85ab8ad001 sizegroup: Don't invalidate over resize containers.
Before this commit, a widget tree like this:
  Window
    AnyContainer (part of SizeGroup1)
      GtkClutterEmbed
        SomeWidget
when calling gtk_widget_queue_resize(SomeWidget), would invalidate
SizeGroup1, when it should have stopped at the GtkClutterEmbed (which is
a RESIZE_IMMEDIATE child).
2015-10-28 19:44:28 +01:00
Benjamin Otte 1f2e21ab9a sizegroup: Refactor function
Get rid of continues in loop. This allows doing more complex things in
future commits.
2015-10-28 19:44:27 +01:00
Benjamin Otte 0721d964e4 sizegroup: Refactor function 2015-10-28 19:44:27 +01:00
Benjamin Otte dd0e5cfce6 sizegroup: Remove special case before loop
The loop actually does the right thing already. There's no need to
complicate things.
2015-10-28 19:44:27 +01:00
Benjamin Otte 8fea3b02c9 sizegroup: refactor
The code looks a lot less dangerous if it doesn't look like we're
casting a random widget to a container.
2015-10-28 19:44:27 +01:00
Benjamin Otte e19818359a sizegroup: Fold function into only caller 2015-10-28 19:44:27 +01:00
Benjamin Otte 690e015ed1 sizegroup: Move container function into its only caller 2015-10-28 19:44:27 +01:00
Benjamin Otte 0912a6c2f5 widget: Use gtk_widget_queue_allocate() when clip changes
There's no need to queue a full resize there.
2015-10-28 19:44:27 +01:00
Benjamin Otte 195397e87a API: widget: Add gtk_widget_queue_allocate()
This is so widgets can queue a rerun of their allocation logic, but
without triggering resizes everywhere.

For now, it just calls gtk_widget_queue_resize().
2015-10-28 19:44:27 +01:00
Benjamin Otte 798a288405 container: Use correct allocation for calling size_allocate() 2015-10-28 19:44:27 +01:00
Benjamin Otte d3d9f52365 API: widget: Add gtk_widget_get_allocated_size()
See docs for what this is.
2015-10-28 19:44:27 +01:00
Benjamin Otte ab2d236d3d sizegroup: Remove GtkQueueResizeFlags
They were only used with geometry widgets.
2015-10-28 19:44:27 +01:00
Benjamin Otte 5dd2087d19 widget: Remove _gtk_widget_override_size_request()
The function was only used by the geometry widget.
2015-10-28 19:44:27 +01:00
Benjamin Otte 08974a1e9a window: Ignore geometry widget
Ignore the geometry widget passed to gtk_window_set_geometry_hints().
Usind the widget itself was a hack that complicates the size request
machinery.

It is also incorrect in that it doesn't respect height-for-width.

Last but not least, it was only used by gnome-terminal and that
application can easily work without it.
2015-10-28 19:44:27 +01:00
Benjamin Otte e422ccefe1 container: Don't randomly call gtk_widget_set_allocation()
gtk_widget_size_allocate() does that already.
2015-10-28 19:44:27 +01:00
Benjamin Otte 624fb8b360 entry: Always render like with is_cellrenderer
And remove the API to set that variable.
If you want the entry to not fill its whole allocated area,
  gtk_widget_set_valign (entry, GTK_ALIGN_FILL);
will give you the old behavior.
2015-10-28 19:44:26 +01:00
Benjamin Otte 8ec2362d81 icontheme: Clarify GENERIC_FALLBACK flag handling
- Add docs explaining that it doesn't work everywhere
- g_warn_if_fail() in the APIs where it doesn't work
2015-10-28 19:44:26 +01:00
Benjamin Otte 5cffbed165 iconhelper: Don't pass GENERIC_FALLBACK flag
It's not used when looking up with a GIcon.
2015-10-28 19:44:26 +01:00
Benjamin Otte a58d8bdcbc cssprovider: Have a section when parsing style properties
Signal handlers expect a section to be present, so provide them with
one.

New testcase included.

https://bugzilla.gnome.org/show_bug.cgi?id=757240
2015-10-28 19:37:27 +01:00
Matthias Clasen c4eb14eb01 Revert "tooltip: Use an element name"
This reverts commit efc8dc63e3.

This change broke tooltip positioning in a way that I don't
fully understand, so take it back for now.
2015-10-28 11:53:36 -04:00
Matthias Clasen 854c7d1f0f Revert "HighContrast: Update tooltip styling"
This reverts commit 93d80380ee.
2015-10-28 11:53:33 -04:00
Matthias Clasen cab40f0743 Revert "Adwaita: Update tooltip theming"
This reverts commit d974610741.
2015-10-28 11:48:52 -04:00
Matthias Clasen b4d49c36ce Fix key themes for GtkEntry -> entry
This was pointed out in

https://bugzilla.gnome.org/show_bug.cgi?id=757252
2015-10-28 10:19:00 -04:00
Matthias Clasen 20e46ce8ae shortcuts: Redo the stack switcher theming
Use style classes on the button instead of the stack switcher,
this makes it easier to reuse elsewhere.
2015-10-28 10:19:00 -04:00
Matthias Clasen 62ec4a2415 shortcuts label: Redo the keycap theming
Use a style class directly on the frame. This is easier to reuse.
2015-10-28 10:19:00 -04:00
Matthias Clasen 4e950da4d1 Adwaita: Update shortcuts window theming
Use the newly added element name.
2015-10-28 10:19:00 -04:00
Matthias Clasen 0dffc8c9d3 shortcuts: Use predefined style classes
Lets use the defines we have.
2015-10-28 07:10:55 -04:00
Matthias Clasen b3619f9050 HighContrast: Update calendar theming
Use the newly introduced element name instead of hardcoding the type.
2015-10-28 06:45:37 -04:00
Matthias Clasen 085edf0212 Adwaita: Update calendar theming
Use the newly introduced element name instead of hardcoding the type.
2015-10-28 06:45:25 -04:00
Matthias Clasen 2c2fd5c8c5 calendar: Add an element name
This will allow us to drop hardcoded type names in the theme.
2015-10-28 06:35:33 -04:00
Olivier Fourdan 3058c3e6a9 wayland: configure clients that resize themselves
Make sure the wayland backend sets a new geometry when the client
resizes itself, otherwise the compositor won't be notified and may
revert to the old size on state changes.

Thanks to Jasper St. Pierre <jstpierre@mecheye.net> who pointed out the
problem in gtk+.

bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=755051
2015-10-28 08:41:17 +01:00
Matthias Clasen 37eb5c08a4 inspector: Cosmetic changes to the hierarchy tab
Put the interfaces below GInterface.
2015-10-28 00:41:13 -04:00
Matthias Clasen 3869bdbc2b inspector: Add css node style properties
Add a per-cssnode view of style properties.
2015-10-28 00:33:14 -04:00
Matthias Clasen 0d8444d067 Drop some no-longer existing headers 2015-10-27 20:29:43 -04:00
Matthias Clasen 85a6f3c13e 3.19.1 2015-10-27 20:06:24 -04:00
Matthias Clasen 339cb1fe6b Fix reftests
Multiple reftests were damaged by the element name transition.
Repair them. The region reftests are no longer needed, since
we no longer do regions.
2015-10-27 20:06:24 -04:00
Matthias Clasen 93d80380ee HighContrast: Update tooltip styling
Use the newly added element name instead of hardcoding the type.
2015-10-27 20:06:24 -04:00
Matthias Clasen d974610741 Adwaita: Update tooltip theming
Use the newly introduced element name instead of hardcoding the type.
2015-10-27 20:06:24 -04:00
Matthias Clasen efc8dc63e3 tooltip: Use an element name
This will allow us to drop hardcoded type names in the theme.
2015-10-27 20:06:24 -04:00
William Hua 1760ada1ff mir: emulate pointer for all touch events 2015-10-27 16:37:21 -04:00
Benjamin Otte e3ddbc544c cssselector: Print name and any selector first
When printing a "compound selector", make sure the name and universal
selectors are printed at the beginning and class, id, etc. selectors are
printed last.
2015-10-27 20:12:38 +01:00
Matthias Clasen 9848fe006e Adwaita: Update GtkAssistant theming
Use the new element name, instead of hardcoding the type.
2015-10-27 14:37:58 -04:00
Matthias Clasen 5b0208f890 assistant: Use an element name
This will allow us to drop hardcoded type names in the theme.
2015-10-27 14:37:58 -04:00
Matthias Clasen 5ee39befb8 Fix make check
Don't try setting GtkShortcutsShortcut::accelerator to a
random value, it only accepts strings that it can parse.
2015-10-27 13:27:43 -04:00
Matthias Clasen 0f4663728e toolitemgroup: Fix the previous change
dispose can be called more than once.
2015-10-27 12:54:19 -04:00
Matthias Clasen 9753bea6a4 tool item group: Don't leak a button
This causes a hickup in the new css node machinery, causing
the default-value test to fail.
2015-10-27 11:09:00 -04:00
Matthias Clasen 270e900f55 icon theme: Ensure to propagate an error
If the svg pixbuf loader is not available, we end up with criticals
from gtk_css_image_icon_theme_draw because gtk_icon_info_load_symbolic
returns NULL without setting an error.

Avoid this by propagating the load error.
2015-10-27 11:09:00 -04:00
William Hua 6f340d4384 mir: warning clean-up 2015-10-27 10:50:18 -04:00
William Hua c3b0b8a360 mir: allow logging touch events 2015-10-27 10:11:43 -04:00
Matthias Clasen bb5b711d4b shortcuts: Some property hygiene
Bring property notification for some of the new shortcuts widgets
up to the standards of our testsuite.
2015-10-27 09:25:17 -04:00
Lars Uebernickel 71b31c84c0 gdkpixbuf-drawable: reinstate accidentally removed line 2015-10-27 13:38:14 +01:00
Lars Uebernickel 657a43e54e gdk_pixbuf_get_from_window: honor device scale
gdk_pixbuf_get_from_window() paints the given window onto a new cairo
surface. Create that new surface with the same device scale as the
window so that the result is not scaled down on hidpi screens.

https://bugzilla.gnome.org/show_bug.cgi?id=757147
2015-10-27 09:38:52 +01:00
Marek Černocký 46e834cf3e Updated Czech translation 2015-10-27 07:38:21 +01:00
Matthias Clasen ed00d86496 inspector: Allow editing css node properties
This reuses the property editor infrastructure from the
property list pages. Good that css nodes are objects.
2015-10-26 23:39:51 -04:00
Matthias Clasen 6852a1eef9 inspector: Support editing interned string properties
Sadly, interned string properties cannot be handled generically
at all - GObject insists on inserting a strcpy in any attempt
to set a string property with generic api, destroying the
internedness of the string.

Therefore, we have to special-case GtkCssNode in the property
editor code :-(
2015-10-26 23:39:51 -04:00
Matthias Clasen b7d001e613 Add some api annotations
Nothing is using the /*interned*/ annotations currently,
but if we are doing this, we should be consistent.
2015-10-26 23:39:50 -04:00
Benjamin Otte a648afae12 widget: Add name to widget paths
This changes widget paths for widgets with a CSS name to return that CSS
name, now that we have added API for it.
This means that style properties are now matches using the CSS name.

Also fix the theme to use the correct name when matching style properties.
2015-10-27 03:13:42 +01:00
Benjamin Otte 517cea36ed cssmatcher: Actually match names for widget paths
The type is always 0 when we use names. So this would always return
FALSE. Oops.
2015-10-27 03:13:42 +01:00
Matthias Clasen d717afd4d4 entry: properly update css subnode state
Update the state of the css subnodes for icons when
appropriate, and avoid calling set_state after save_to_node.
2015-10-26 22:09:07 -04:00
Matthias Clasen c72d094ae0 entry: Use better element name for progress
Change the name of the CSS subnode for progress rendering from
progressbar to progress. This will align better with GtkProgressBar.
2015-10-26 21:34:16 -04:00
Robert Ancell aefa1ba611 gdk: Deprecate gdk_display_get_screen 2015-10-27 14:17:52 +13:00
Jonas Ådahl db04c1eda7 wayland: Don't use GTK symbols from GDK
GTK_WINDOW_POPUP sets the GdkWindow type to GDK_WINDOW_TEMP, so use
that in GDK, not the GTK symbol which doesn't exist there.
2015-10-27 09:02:35 +08:00
Benjamin Otte 101df329ae API: Add gtk_widget_path_iter_set_object_name()
... and gtk_widget_path_iter_get_object_name(). This allows applications
that still use widget paths to use the new object names to get the
correct styling.

Mutter and webkit-gtk are examples here.
2015-10-27 01:44:50 +01:00
Jonas Ådahl aedd193c69 GtkTreeView: Rework the search window hack so it also works on Wayland
The search window of a tree view was implemented by showing without
making it visible by by positioning it outside the screen edge. This is
not possible on Wayland, so implement another method for being able to
enter text into a non-visible entry.

The new method is implemented by, before showing the window, pass the
key event directly to the IM context backing the entry. If the key
event triggered the context to commit new text or change the preedit
content, the search window is shown, and from that point the key events
are forwarded directly to the entry widget.

https://bugzilla.gnome.org/show_bug.cgi?id=756780
2015-10-27 08:41:02 +08:00
Jonas Ådahl bcb28adba3 wayland: Map UTILITY hinted popup windows as subsurfaces
Currently used by GtkTreeView to map windows without changing focus. We
can't map this as a popup, because popup implies focus change.

https://bugzilla.gnome.org/show_bug.cgi?id=756780
2015-10-27 08:41:02 +08:00
Jonas Ådahl 97dbef451e GtkTreeView: Make a search window destroy helper
https://bugzilla.gnome.org/show_bug.cgi?id=756780
2015-10-27 08:41:02 +08:00
Jonas Ådahl e25ea62f22 wayland: Don't try to use subsurfaces as popup parents
If a GtkMenu (or something else that is mapped as a xdg_popup) tries to
use a subsurface window as a parent, it will be terminated by the
compositor due to protocol violation. So to avoid this, if a parent
window is not a xdg_popup or xdg_surface, i.e. a wl_subsurface, then
traverse up the transient parents until we find the right popup parent.

https://bugzilla.gnome.org/show_bug.cgi?id=756780
2015-10-27 08:41:02 +08:00
Jonas Ådahl 49798754e6 wayland: Make window type conditions switches
In order to make it easier to add/remove in future commits.

https://bugzilla.gnome.org/show_bug.cgi?id=756780
2015-10-27 08:41:02 +08:00
Jonas Ådahl 2eb7d7476b GtkTreeView: Use more consistent search window naming
Instead of alternating between search dialog and search window, use
search window everywhere.

https://bugzilla.gnome.org/show_bug.cgi?id=756780
2015-10-27 08:41:02 +08:00
Matthias Clasen 76619cf1ae entry: Bring back icon padding
Not sure why this is necessary now, but it is.
2015-10-26 16:51:28 -04:00
Matthias Clasen ed8641ff26 entry: Only set one of the .left, .right style classes
We were not removing the old style class when adding a new one.
2015-10-26 15:28:50 -04:00
Matthias Clasen 8db30aa9a0 testassistant: Add another example
This adds a test involving removing and re-adding pages, to
help with
https://bugzilla.gnome.org/show_bug.cgi?id=756385
2015-10-26 09:16:38 -04:00
Matthias Clasen e28b3d1296 assistant: Handle page-type and title changes properly
We need to update our state when a pages' type or title changes.
2015-10-26 09:01:07 -04:00
Matthias Clasen 6efbf329c3 shortcuts: Cosmetic change
The .flat style class is controlled by the relief property,
so just use that instead of manually setting style classes.
2015-10-26 07:23:07 -04:00
Matthias Clasen 953aa45c04 label docs: Mention common style classes
Mention some of the style classes that are commonly used
with labels.
2015-10-26 07:23:07 -04:00
Olivier Fourdan 305b34aa15 GtkWindow: fix move/get position with CSD
Take into account and compensate for the size of the client side
decorations widgets in gtk_window_move() and gtk_window_get_pos()
including gravity.

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=756618
2015-10-26 08:40:36 +01:00
Olivier Fourdan 3450f53907 GtkWindow: add up CSD size in gtk_window_resize()
When client side decoration is used, the size passed to
gtk_window_resize() or retrieved from gtk_window_get_size() for top-
level windows also accounts for the client side decorations widgets
such as the title bar or the shadow borders.

Add up the size of these additional controls to the given size to get
the size expected.

Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=756618
2015-10-26 08:40:36 +01:00
Marek Černocký 2258fe576f Updated Czech translation 2015-10-26 07:56:07 +01:00
Matthias Clasen bf65b06781 HighContrast: Don't use GtkInfoBar type name
We have a proper element name for it now.
2015-10-25 17:19:34 -04:00
Matthias Clasen 91ec104dd3 Adwaita: Don't use GtkInfoBar type name
We have a proper element name for it now.
2015-10-25 17:19:01 -04:00
Matthias Clasen f1248ccea4 infobar: Add a name to the css node
This lets us avoid the type name in css.
2015-10-25 17:18:20 -04:00
Matthias Clasen 2de0f06af9 HighContrast: Update separator rendering
Adapt HighContrast t othe changes in the pre-previous commit.
2015-10-25 16:29:11 -04:00
Matthias Clasen 0ba03aac16 Adwaita: Update separator styling
Adapt Adwaita to the changes in the previous commit.
2015-10-25 16:28:38 -04:00
Matthias Clasen 2eb6599b29 separator: Use the element name separator
Switch GtkSeparator from using the .separator style class to
using the element name separator for its css node.
2015-10-25 16:27:44 -04:00
Matthias Clasen aa67ad0011 Adwaita: Update accel label styling
Adapt Adwaita to the changes in the previous commit.
2015-10-25 15:45:13 -04:00
Matthias Clasen caa6fb0732 accel label: Use a css node for the accelerator
Use a permanent subnode with name accelerator instead of the
.accelerator style class.
2015-10-25 15:45:13 -04:00
Matthias Clasen 2b20bd54c5 HighContrast: Update spinner rendering
Adapt HighContrast to the changes in the pre-previous commit.
2015-10-25 15:45:13 -04:00
Matthias Clasen bd80b1d037 Adwaita: Update spinner styling
Adapt Adwaita to the changes in the previous commit.
2015-10-25 15:45:13 -04:00
Matthias Clasen 9269525f07 spinner: Use the element name spinner
Switch GtkSpinner from using the .spinner style class to
using the element name spinner for its css node.
2015-10-25 15:45:13 -04:00
Rico Tzschichholz 3011820485 docs: Add index for 3.20 api 2015-10-25 19:36:38 +01:00
Matthias Clasen 7c7fde136e Translate GDK_KEY_KP_Decimal according to locale
It makes sense that you should be able to type numbers that are
correctly formatted and parsable according to the current locale,
using just the keypad. This patch makes it so by translating
GDK_KEY_KP_Decimal to the decimal separator for the current locale,
instead of hardcoding a '.'.

https://bugzilla.gnome.org/show_bug.cgi?id=756751
2015-10-25 13:59:48 -04:00
Matthias Clasen 64c5b97be8 quartz: Don't use the instancetype keyword
gdkcursor-quartz.c uses the instancetype keyword, which doesn't seem to
be supported in the version of Objective C that Snow Leopard uses.
Replacing that keyword with the thing it represents makes it build.

Patch by Ryan Hendrickson,
http://bugzilla.gnome.org/show_bug.cgi?id=756770
2015-10-25 13:26:01 -04:00
Matthias Clasen f55e3f7eda inspector: Be more careful with dead objects
gtk_inspector_object_tree_find_object accesses the type information
of the object, so we can't safely use it on an already decaying
object when we get a weak notify. Instead just walk the tree and
compare pointers, that is safe.

https://bugzilla.gnome.org/show_bug.cgi?id=756852
2015-10-25 13:11:17 -04:00
Matthias Clasen 4305aa1def inspector: Improve css node UI
All the other object pages have a title, this one was missing it.
Add one, so the page fits in with the rest.
2015-10-25 09:20:43 -04:00
Matthias Clasen 1e112ca75e inspector: Allow editing strv-valued properties
These do occur in some places, and we can easily allow editing
them.
2015-10-25 02:14:04 -04:00
Marek Černocký 9d81f3f6f1 Updated Czech translation 2015-10-25 00:19:25 +02:00
Matthias Clasen e440050134 Fix the build 2015-10-24 17:04:38 -04:00
Matthias Clasen f1b7560938 notebook: Document css nodes and style class
This will have to be updates as we do further changes to the
way GtkNotebook does its rendering.
2015-10-24 10:54:56 -04:00
Matthias Clasen 8917ee5373 notebook: Drop unneeded code
We no longer need to set the position classes on the main css node,
since they are already set on the per-tab subnodes.
2015-10-24 10:39:18 -04:00
Matthias Clasen 9f738da11b HighContrast: Update notebook styling
The switch from .notebook to notebook requires minor changes,
such as moving the style properties into a separate selector.
2015-10-24 10:39:18 -04:00
Matthias Clasen a22e07f374 Adwaita: Update notebook styling
The switch from .notebook to notebook requires minor changes,
such as moving the style properties into a separate selector.
2015-10-24 10:39:18 -04:00
Matthias Clasen f194b9608a notebook: Use the element name notebook
Switch GtkNotebook from using the .notebook style class to
using the element name notebook for its main css node.
2015-10-24 10:39:18 -04:00
Matthias Clasen e2bfe9e95a notebook: Cosmetic cleanup 2015-10-24 10:39:17 -04:00
Matthias Clasen 431089f769 entry: Add css node documentation
List the css names and the typical style classes that can be
expected to occur with entries.
2015-10-23 16:22:25 -04:00
Matthias Clasen 78309d8b00 HighContrast: Update entry progress rendering
Adapt HighContrast to the changes in the pre-previous commit.
2015-10-23 16:16:55 -04:00
Matthias Clasen d8a3a4e7aa Adwaita: Update entry progress rendering
Adapt Adwaita to the changes in the previous commit.
2015-10-23 16:13:43 -04:00
Matthias Clasen 6a768ba218 entry: Use a permanent css node for progress
Create a css node with name progressbar when we start showing progress
in the entry. The node gets the style class .pulse added when we
do pulse mode.
2015-10-23 16:11:08 -04:00
Matthias Clasen e39ca899ad Adwaita: Update for entry icon changes 2015-10-23 15:41:05 -04:00
Matthias Clasen f5e77d0c67 entry: Use css nodes for icons
Create css nodes for icons in entries, with name image, and use
gtk_style_context_save_to_node() for them. We still set the
style classes .left and .right on them.
2015-10-23 15:39:29 -04:00
Matthias Clasen 8a8518ed40 HighContrast: Update entry styling
Use the new element name instead of the style class.
2015-10-23 14:53:06 -04:00
Matthias Clasen c6a7ceedc9 Adwaita: Update entry styling
Use the new element name instead of the style class.
There is some minor fallout for vertical spin buttons that
will need a second look.
2015-10-23 14:52:27 -04:00
Matthias Clasen b2dd9cbc59 entry: Use the element name entry
Set the element name on the css node and drop the .entry class.
2015-10-23 14:51:35 -04:00
Lapo Calamandrei 5b0a26f8a3 Adwaita: fix switch styling
looks like switch stare are not passed to the slider anymore so
rewrite selectors accordingly.
2015-10-23 17:12:01 +02:00
Lapo Calamandrei 4959fe3267 Adwaita: generalize .has-open-popup
so it works for any list-row istead of just the ones in a sidebar.
2015-10-23 16:58:17 +02:00
Matthias Clasen 71b79f3329 shortcut: Improve formatting of ranges
Use a centered ellipsis, to make it look nicer.
2015-10-23 07:46:31 -04:00
Matthias Clasen 57057f73e4 HighContrast: Update image styling
Use the new element name instead of the type name.
2015-10-23 00:05:46 -04:00
Matthias Clasen 6f90b3ca31 Adwaita: Update image styling
Use the new element name instead of the type name.
2015-10-23 00:05:18 -04:00
Matthias Clasen 34be4de1ad image: Use the element name image
Set hte element name on the CSS node.
2015-10-23 00:04:47 -04:00
Matthias Clasen a8b5c04694 HighContrast: Update label styling
Use the new element name instead of the style class.
2015-10-22 23:27:43 -04:00
Matthias Clasen bacc9d4edd Adwaita: Update label styling
Use the new element name instead of the style class.
2015-10-22 23:27:43 -04:00
Matthias Clasen 7d98c7f1ae label: Use the element name label
Set the element name on the CSS node, and drop the .label style
class.
2015-10-22 23:27:43 -04:00
Matthias Clasen 506d5b5b48 switch: Document css names a bit
This is still provisional. Better gtk-doc support will be needed
to do better here.
2015-10-22 23:27:43 -04:00
Chun-wei Fan de16a4e07c MSVC release builds: Ensure that /LTCG is used
MSVC 2015 changed its default link-time code generation setting to
/LTCG:incremental, which causes problems if /opt:noref is to be used,
meaning that some code will be optimized out by the linker.

Avoid this situtation here by enforcing the use of /LTCG for MSVC 2010+
builds.
2015-10-23 10:33:41 +08:00
Matthias Clasen b5e1fd5b7f HighContrast: Update switch styling
Use the new element names instead of the type name and style
classes, just like we did for Adwaita in the previous commit.
2015-10-22 21:44:03 -04:00
Matthias Clasen 99d7648517 Adwaita: Update switch styling
Use the new element names instead of the type name and style
classes.

Note that there is one problem with moving away from type names
here: it turns out that style properties only work if the selector
uses the type name.
2015-10-22 21:42:20 -04:00
Matthias Clasen 48b30e8e91 switch: Convert to element names
Use the element names switch and slider for the two css nodes,
and drop the .trough and .slider classes.
2015-10-22 21:40:31 -04:00
Matthias Clasen 203742b188 widget: Always set the type on css nodes
See the previous commit for why this is necessary.

Also make gtk_widget_class_set_css_name work by looking at
the correct class for the name.

Note for future reference: GTK_WIDGET_GET_CLASS() does not
work in the instance init function.
2015-10-22 21:01:06 -04:00
Matthias Clasen d1a85fc9e4 css node declaration: Allow both name and type to be set
The widget path machinery assumes that we always have types,
and without this change, it will start spewing warnings when
we start to introduce node names.
2015-10-22 20:58:52 -04:00
Matthias Clasen e0d9250a07 inspector: Show names for css nodes
Currently, we don't have any css nodes with names, but we will soon.
2015-10-22 20:58:08 -04:00
Matthias Clasen 7cf3eec85b Add since tags to new api
gtk_widget_class_set/get_css_name were missing it.
2015-10-22 19:43:32 -04:00
Timm Bäder 5a0a870d89 GtkApplicationWindow: Add missing annotations 2015-10-22 21:02:28 +02:00
Matthias Clasen defd3146eb gtk-demo: Add a range example to the shortcuts demo
This shows off the new range display capability that I just added.
2015-10-22 14:32:50 -04:00
Matthias Clasen 67a54bf4ef shortcuts: Support ranges in the display of shortcuts
Repeating Alt-1 to Alt-9 as individual shortcuts looks really boring,
so allow compressing such ranges by specifying <Alt>1...9.
2015-10-22 14:32:50 -04:00
Benjamin Otte 6cf7c03334 notebook: On drag window hide, fix css nodes 2015-10-22 20:29:10 +02:00
Benjamin Otte 1f1c7547da switch: Use the right state when querying padding
We were using the state of the widget node, not the state of the slider
node.

This caused layout loops due to invalidations.
2015-10-22 18:43:55 +02:00
Matthias Clasen f703ea6599 win32: Fix introspection syntax 2015-10-22 11:50:49 -04:00
Owen W. Taylor 26d8a56506 testgtk/Alpha Window: fix the drawn area when we are drawing decorations
A GtkWindow's allocation includes the titlebar, borders, and shadows; we
only want to draw our custom alpha content over the child allocation of
the GtkWindow.

https://bugzilla.gnome.org/show_bug.cgi?id=756886
2015-10-22 11:05:04 -04:00
Owen W. Taylor 1571d2872f GtkWindow: draw the frame and shadow even for app-paintable windows
If a window is decorated, we need to draw the frame and shadow, even if
it is app-paintable - it's just nonsense to have a frame that we handle
events on, but expect the app to paint it. (We paint the titlebar in
any case.) If a client wants to handle all painting, it should use an
undecorated window.

https://bugzilla.gnome.org/show_bug.cgi?id=756886
2015-10-22 11:05:03 -04:00
Owen W. Taylor 01136618b8 Guard against selection requestor disappearing
We made a number of unchecked accesses to the selection requestor,
which could cause X errors if the selection requestor vanished
(or we were sent invalid events). Add error traps around all of them.

See https://bugzilla.redhat.com/show_bug.cgi?id=1210814 for an
example of a crash that could be caused by this. (There are about
1000 instances of such a crash in http://retrace.fedoraproject.org
though no linked bug reports specifically talk about cut-and-paste
or DND.)

https://bugzilla.gnome.org/show_bug.cgi?id=756881
2015-10-22 11:05:03 -04:00
Benjamin Otte d3bf602c60 iconcache: Remove unused function 2015-10-22 16:42:49 +02:00
Benjamin Otte 371f501632 window: Name the decoration style 2015-10-22 16:42:48 +02:00
Benjamin Otte 408920d438 window: Add gtk_widget_class_set_css_name()
This is to replace using class names as CSS names.
2015-10-22 16:42:48 +02:00
Benjamin Otte 244d9ffeee window: Refactor function
Move gtk_style_context_save() into the function that sets up the
decoration rendering.
2015-10-22 16:42:48 +02:00
Benjamin Otte ed574408f2 notebook: Remove "prelight-page" class
Instead, just use the "tab:hover" selector
2015-10-22 16:42:48 +02:00
Benjamin Otte 182f9a7f39 notebook: Remove "active-page" class
Instead, just use the "tab:active" selector
2015-10-22 16:42:48 +02:00
Benjamin Otte 2720d97db3 notebook: Remove funciton by folding it into callers 2015-10-22 16:42:48 +02:00
Benjamin Otte acd63a6019 notebook: Refactor internal function
Don't return the state anymore as the function doesn't even look at the
state. Instead, make the callers that need the state query it manually.
2015-10-22 16:42:48 +02:00
Benjamin Otte 7b9844288a notebook: Make tab positions permanent
... on the tab CssNodes.
2015-10-22 16:42:48 +02:00
Benjamin Otte dd3f2ec987 notebook: Remove last traces of regions
Now that we don't use regions anymore, there's no need to update
anything when the regions change.
2015-10-22 16:42:47 +02:00
Benjamin Otte f713bcd742 notebook: Set reorderable-page style class properly
Set it when the reorderable state changes, not just when rendering.
2015-10-22 16:42:47 +02:00
Benjamin Otte a4e86341e4 notebook: Set active state properly
Don't update it on save/restore, actually set it when it changes.
2015-10-22 16:42:47 +02:00
Benjamin Otte 541926089a notebook: Set prelight state properly
Don't update it on save/restore, actually set it when it changes.
2015-10-22 16:42:47 +02:00
Benjamin Otte 3392d53f61 notebook: Use CssNodes instead of regions
This almost makes CSS work again with notebooks.
2015-10-22 16:42:47 +02:00
Benjamin Otte 01f7711307 notebook: Move style_context_save() into function
This is for future changes.
2015-10-22 16:42:47 +02:00
Benjamin Otte 601fe8f502 css: Remove macros that were used only with regions 2015-10-22 16:42:47 +02:00
Benjamin Otte 55d496e917 cssmatcher: Remove matching API for regions 2015-10-22 16:42:47 +02:00
Benjamin Otte 983de6f4a0 treeview: Use a cssnode instead of regions
This makes Treeview headers work again like before region support was
removed.
2015-10-22 16:42:47 +02:00
Benjamin Otte 24dde6346a API: cssselector: Stop supporting regions
The namespace that belonged to regions is supposed to be used for
CssNode names.
2015-10-22 16:42:46 +02:00
Benjamin Otte 20ce0588b1 treeviewcolumn: Create button on init
This way, the button is always available and the code doesn't have to
special case this condition.
2015-10-22 16:42:46 +02:00
Benjamin Otte 950b1fb65c switch: Port to GtkCssNode
This is a simple port, no code modifications so far other than replacing
gtk_style_context_save() with gtk_style_context_save_to_node().
2015-10-22 16:42:46 +02:00
Benjamin Otte c075c14bf4 stylecontext: Add gtk_style_context_save_to_node()
To be used instead of gtk_style_context_save() with persistent nodes.
2015-10-22 16:35:14 +02:00
Benjamin Otte 72615a1b16 stylecontext: Add gtk_style_context_add_named()
This is an intermediate step for cssnode introduction. It gives a name
for the node created by saving the style context.
2015-10-22 16:35:14 +02:00
Benjamin Otte 385fda80b4 cssmatcher: Marshal name to matcher
... and use it in the node matcher.

Also rename function from _gtk_css_matcher_get_type() to
_gtk_css_matcher_get_name().
2015-10-22 16:35:14 +02:00
Benjamin Otte efff9c8edb cssnode: Add setters/getters for name 2015-10-22 16:35:14 +02:00
Benjamin Otte 26450a661e cssnodedeclaration: Add possibility to set the name
This is supposed to be a replacement for setting the type. So far, both
options are possible - either will unset the other.
2015-10-22 16:35:14 +02:00
Benjamin Otte b65f400d56 treeview: Remove "row" and "col" regions
They aren't used by the theme and we want to get rid of regions.
2015-10-22 16:35:13 +02:00
Piotr Drąg 92a136ffde Updated POTFILES.in and POTFILES.skip 2015-10-22 02:01:05 +02:00
Matthias Clasen 1a2cdad220 Update NEWS to mention help overlays 2015-10-21 17:15:17 -04:00
Matthias Clasen a2e581d54c Update POTFILES.in 2015-10-21 15:48:20 -04:00
Matthias Clasen 3306ce6819 widget-factory: Add an automatic help overlay
This commit add some more keyboard shortcuts to gtk3-widget-factory,
and adds a help overlay documenting them. This examle uses the
automatic resource loading support in GtkApplication.
2015-10-21 15:33:22 -04:00
Matthias Clasen f6d9f9f93d Add automatic help overlay support to GtkApplication
When the $(resource_prefix)/gtk/help-overlay.ui resource exists,
load a GtkShortcutsWindow from it for each GtkApplicationWindow,
and set up a win.show-help-overlay action with accels <Primary>F1
and <Primary>? to show it.
2015-10-21 15:33:09 -04:00
Matthias Clasen 310781ecdd gtk-demo: Add a GtkShortcutsWindow demo
This example implements the mockups from the help overlay design,
showing off the various features of GtkShortcutsWindow.
2015-10-21 15:32:33 -04:00
Matthias Clasen d1c81446d7 Add some styling for GtkShortcutsWindow
Add some keycap frame around keysyms, and make the stack switcher
buttons rounds. This is very provisional.
2015-10-21 15:32:33 -04:00
Matthias Clasen 1dfbae1aa4 Add GtkShortcutsWindow
This is a toplevel window that is tailored towards showing
help for shortcuts in an application. The implementation closely
follows this design: https://wiki.gnome.org/Design/OS/HelpOverlay

This implementation is inspired by earlier work in gnome-builder,
thanks to Christian Hergert.

https://bugzilla.gnome.org/show_bug.cgi?id=756428
2015-10-21 15:19:34 -04:00
Matthias Clasen f254a4b67f builder: Support creating GFile objects
This is useful, e.g. when creating GFileIcon objects.
2015-10-21 13:42:15 -04:00
Matthias Clasen e9aa33527f Don't use g_slist_next in the testsuite
We generally use ->next directly.
2015-10-20 06:14:57 -04:00
Matthias Clasen 2dc63dad34 Don't use g_slist_next in gtktreeview.c
We generally use ->next directly.
2015-10-20 06:14:57 -04:00
Matthias Clasen 05717fe2df Don't use g_slist_next in gtktreemodel.c
We generally use ->next directly.
2015-10-20 06:14:57 -04:00
Matthias Clasen 95c7a539bf Don't use g_slist_next in gtktextview.c
We generally use ->next directly.
2015-10-20 06:14:57 -04:00
Matthias Clasen 55bd936b73 Don't use g_slist_next in gtktextlayout.c
We generally use ->next directly.
2015-10-20 06:14:57 -04:00
Matthias Clasen b65668a251 Don't use g_slist_next in gtktextdisplay.c
We generally use ->next directly.
2015-10-20 06:14:57 -04:00
Matthias Clasen 060948d806 Don't use g_slist_next in gtktextchild.c
We generally use ->next directly.
2015-10-20 06:14:57 -04:00
Matthias Clasen 5dd78f74e0 Don't use g_slist_next in gtktextbufferrichtext.c
We generally use ->next directly.
2015-10-20 06:14:57 -04:00
Matthias Clasen 50c269f846 Don't use g_slist_next in gtktextbuffer.c
We generally use ->next directly.
2015-10-20 06:14:57 -04:00
Matthias Clasen a863b06576 Don't use g_slist_next in gtkstock.c
We generally use ->next directly.
2015-10-20 06:14:57 -04:00
Matthias Clasen 9727a4c4bf Don't use g_slist_next in gtkiconfactory.c
We generally use ->next directly.
2015-10-20 06:14:57 -04:00
Matthias Clasen 4d59233ba9 Don't use g_slist_next in the x11 backend
We generally use ->next directly.
2015-10-20 06:14:57 -04:00
Matthias Clasen 364d1a574b Don't use g_slist_next in the windows backend
We generally use ->next directly.
2015-10-20 06:14:57 -04:00
Matthias Clasen ffa98cbfa5 Don't use g_slist_next in gdk
We generally just use ->next directly.
2015-10-20 06:14:57 -04:00
Matthias Clasen ecf5c5ff6e Don't use g_list_next in gtk3-demo
We generally just use ->next directly.
2015-10-20 06:14:57 -04:00
Matthias Clasen b5d3bebae3 Don't use g_list_next in gtkselection.c
We generally access ->next directly.
2015-10-20 06:14:57 -04:00
Matthias Clasen ea91670c11 Don't use g_list_next in gtkmain.c
We generally access ->next directly.
2015-10-20 06:14:57 -04:00
Matthias Clasen 8422633311 Don't use g_list_next in gtkdialog.c
We generall access ->next directly.
2015-10-20 06:14:57 -04:00
Matthias Clasen b84797a2c6 Don't use g_list_next in gtkcontainer.c
We generally access ->next directory.
2015-10-20 06:14:57 -04:00
Matthias Clasen a0379d5424 Don't use g_slist_next in gtktextbtree.c
We generally access ->next directly.
2015-10-20 06:14:57 -04:00
Matthias Clasen d0e30994d0 builder: Don't use g_slist_next
We just use direct access to list->next all over the place.
2015-10-20 06:14:57 -04:00
Matthias Clasen 45fa145034 builder: Cosmetic changes
Use an iter instead of g_hash_table_forall.
2015-10-20 06:14:57 -04:00
Matthias Clasen eec75ee9d6 Cosmetic changes
Line up struct-filling code with the order in the declaration.
2015-10-20 06:14:57 -04:00
Matthias Clasen 65aa367029 Add some more builder parser tests
These tests contain non-canonical and non-existing property names.
2015-10-20 06:14:57 -04:00
Matthias Clasen 019078364e builder: Avoid some unnecessary overhead
Only get the class once per object, not once per property.
And don't canonicalize the property name, g_object_class_find_property
does that already.
2015-10-20 06:14:57 -04:00
Inaki Larranaga Murgoitio eb0b096963 Updated Basque language 2015-10-20 10:50:10 +02:00
Inaki Larranaga Murgoitio 3bbd8bd1c3 Updated Basque language 2015-10-20 10:03:39 +02:00
Paolo Borelli 4447cf2419 widget: fix typo in warning message 2015-10-19 11:42:39 +02:00
Jonas Ådahl f838743bc0 wayland: Map windows with tooltip hint as subsurfaces
Tooltips tend to be placed on top of a parent surface with a given
relative coordinate, and without any input focus. So lets map them as
subsurfaces.

https://bugzilla.gnome.org/show_bug.cgi?id=756496
2015-10-18 21:32:22 +08:00
Jonas Ådahl 9fe40f9a46 wayland: Clean up code determining how to map a window
Restructure the mapping procedure so that its known up front what the
expected way mapping is to be done (subsurface, popup or stand alone),
and warn if it fails to actually map in such a way (for example a popup
without a parent or device grab, a tooltip without a parent).

https://bugzilla.gnome.org/show_bug.cgi?id=756496
2015-10-18 21:32:22 +08:00
Matthias Clasen 25483304cd Minor cleanup
Replace a unref-and-unset combination with g_clear_object.
2015-10-17 12:48:55 -04:00
Matthias Clasen c860492359 Clean up handling of _gdk_win32_grab_cursor
This is a variable holding a ref to an object, so it is
a great case to use g_set_object and g_clear_object.

 # Please enter the commit message for your changes. Lines starting
2015-10-17 12:45:25 -04:00
Руслан Ижбулатов 00b39e4a82 W32: Add missing reference taking in gdk_device_virtual_grab()
https://bugzilla.gnome.org/show_bug.cgi?id=756160
2015-10-17 16:39:58 +00:00
Kjartan Maraas a397324d19 Updated Norwegian bokmål translation. 2015-10-17 11:13:04 +02:00
Kjartan Maraas 73b21d680c Fixes from Einar Ulvsløkk. 2015-10-17 11:11:57 +02:00
Timm Bäder 944ef8bb0b GtkPaned: Fix gtk_paned_set_child_visible calls
Use CHILD1/CHILD2 instead of 0 and 1, always use the same order and
don't check for child NULL-ness, because it will be done in
gtk_paned_set_child_visible anyways.
2015-10-16 15:07:53 +02:00
Timm Bäder d0779db1e1 GtkRevealer: Remove useless _start_animation call
The call just passed priv->target_pos, but _start_animation directly
returns if the given target is priv->target_pos (see line 627).
2015-10-16 15:07:49 +02:00
William Hua 027b02a371 mir: send touch events 2015-10-16 10:51:36 +01:00
Ignacio Casal Quinteiro c888a927e7 win32: fix warnings about signed/unsigned mismatch 2015-10-16 09:22:39 +02:00
Ignacio Casal Quinteiro 342b620223 win32: use the same type as the prototype 2015-10-16 09:07:32 +02:00
Sébastien Wilmet 9d3e9c9375 inspector: remove gtk_text_buffer_get_iter_at_line_index() workaround
The function is now safe to use.

https://bugzilla.gnome.org/show_bug.cgi?id=735341
2015-10-16 08:43:27 +02:00
Sébastien Wilmet a9a1c00cc9 textbuffer: nicer get_iter functions
Avoid crashes when passing an invalid location to a
gtk_text_buffer_get_iter_at_*() function.

A boolean is returned to know if @iter has been set to the exact
location.

Unit tests are added.

https://bugzilla.gnome.org/show_bug.cgi?id=735341
2015-10-16 08:43:27 +02:00
Dušan Kazik a712d1fd76 Updated Slovak translation 2015-10-16 06:31:32 +00:00
Dušan Kazik ce2c89c6ed Updated Slovak translation 2015-10-16 06:26:53 +00:00
Matthias Clasen c264cd6785 Split off a private header for GtkTextBuffer
This avoids polluting the installed header with private symbols.
2015-10-15 23:04:44 -04:00
Matthias Clasen af8c2d2f7b Improve text a11y test
Test appending text as well as replacing the entire text.
Insert non-ASCII text to verify offsets are correct.
2015-10-15 22:35:38 -04:00
Matthias Clasen 3c217e6954 file chooser: Avoid search interruption
When the search entry is shown, the 'special' nature of
., ~ and / should not trigger the location entry, because
that interrupts the search and is likely not what the
user intended.

https://bugzilla.gnome.org/show_bug.cgi?id=756505
2015-10-15 20:53:43 -04:00
Matthias Clasen 0731c50262 entry completion: Only grab the device if we have one
When the entry completion is popped up from a timeout, we may
not have a device. In that case, don't call gdk_device_grab,
do avoid criticals.
2015-10-15 20:18:26 -04:00
Matthias Clasen dd3f4f2904 scrolled window: Protect against nameless devices
It seems that gdk_device_get_name() can return NULL.
We should not crash if that happens.

https://bugzilla.gnome.org/show_bug.cgi?id=756625
2015-10-15 16:06:15 -04:00
Carlos Soriano c3686838ea gtkplacesview: align spinner with header label
Use the box margin top instead of the label margin top,
so the spinner remains aligned with the header label.

https://bugzilla.gnome.org/show_bug.cgi?id=756568
2015-10-15 19:22:40 +02:00
Carlos Soriano 9cc3e63045 gtkplacesview: plug leak
https://bugzilla.gnome.org/show_bug.cgi?id=756568
2015-10-15 19:22:40 +02:00
Carlos Soriano d29d54a97b gtkplacesview: remove hover color from rows
Since other views are not using hover neither

https://bugzilla.gnome.org/show_bug.cgi?id=756568
2015-10-15 19:18:54 +02:00
Carlos Soriano 9341f64c19 gtkplacesview: add a clear button to address entry
So it allows a quick way to clear the entry.

https://bugzilla.gnome.org/show_bug.cgi?id=756568
2015-10-15 19:18:54 +02:00
Carlos Soriano f9b6c07c8a gtkplacesview: rotate server list icon on toggled
Disclosure triangles are usually used pointing down, however
in this case the popover spawns in the upper direction, which
makes it odd looking.
Instead of pointing always down or up, point down when not toggled and
animate a rotation when toggled.

https://bugzilla.gnome.org/show_bug.cgi?id=756568
2015-10-15 19:18:54 +02:00
Carlos Soriano 831509f6aa gtkplacesview: tweak ui to allow more server rows
Following design guidance, reduce row height and increase
popover height so the user is allowed to see more than 3
rows.

https://bugzilla.gnome.org/show_bug.cgi?id=756568
2015-10-15 19:18:54 +02:00
Carlos Soriano 1dbcce785e gtkplacesview: improve heuristics for external drives
Following the sidebar on commit b0989b190df, improve the way
we check when a drive is external or not.

https://bugzilla.gnome.org/show_bug.cgi?id=756589
2015-10-15 19:16:56 +02:00
Carlos Soriano 569be9f111 gtkplacesview: remove dead code
This is checked on add_volume inside the loop.

https://bugzilla.gnome.org/show_bug.cgi?id=756589
2015-10-15 19:16:56 +02:00
Carlos Soriano 983c61826b gtkplacesview: remove dead code
This is checked on is_removable_volume

https://bugzilla.gnome.org/show_bug.cgi?id=756589
2015-10-15 19:16:56 +02:00
Carlos Soriano 0cd4e7ec43 gtkplacessidebar: improve heuristics for external drives
Since the change to use GtkPlacesView we don't want to show
internal storage on the sidebar.

In our case we were checking for drive_can_eject and
drive_is_media_removable.

However for some external hard drives it's reported that they
are not ejectable nor the have removable media. So the only
attribute that they have different from internal drives is that
they can be stopped.
So check for if the drive can be stopped to decide if it is
external or internal.

On the way realized we don't need to check for the mounts associated
with the volume to know if the volume can be ejected or not. So remove
that code.

https://bugzilla.gnome.org/show_bug.cgi?id=756589
2015-10-15 19:16:56 +02:00
William Hua 11ee4b40af mir: add mircookie as a dependency 2015-10-15 16:20:32 +01:00
Carlos Garnacho 8147f12eca texthandle: Ensure handles are invalidated on mode changes
Otherwise the "cursor" handle stays with "cursor" appearance instead of
"selection end" when a text selection is started.
2015-10-14 18:44:34 +02:00
Carlos Garnacho 14dde08e33 texthandle: small refactor
These long enums are used too often, shorten things a bit with temp vars.
2015-10-14 18:44:34 +02:00
Carlos Garnacho cfaa421433 texthandle: Fix Y positioning of text handles
It is assumed that border.top is the same than pointing_to.height (which
equals the strong cursor position), which is not since some time ago.

The border calculation has been move on top too, it is now used in the
Y position one, and doesn't depend on anything we calculate later.
2015-10-14 18:44:34 +02:00
Carlos Garnacho 73bf16b3b0 texthandle: Fix handle dragging on wayland
Text handles are subsurfaces on wayland, so sort of their own toplevel.
This made gtk_widget_translate_coordinates() to bail out there, resulting
in text handles being mispositioned and jumpy. To fix this, translate to
toplevel GtkWindow coordinates manually, and translate coordinates from
there.

Along the way, the coordinates reported in ::handle-dragged have been
fixed so there is no small jumps in either axis (most noticeable in the
X axis when you started dragging, and in the Y axis when moving between
lines of different heights.
2015-10-14 18:44:34 +02:00
Ross Lagerwall f2b848a531 gtkplacessidebar: Show drives with removable media
Some drives have removable media that is not ejectable (e.g. a laptop's
SD card reader). Show volumes on these drives in the sidebar.

https://bugzilla.gnome.org/show_bug.cgi?id=755654
2015-10-14 17:38:25 +01:00
Inaki Larranaga Murgoitio 6f6f13a7d8 Updated Basque language 2015-10-14 12:43:51 +02:00
William Hua af5792f141 mir: support more pixel formats 2015-10-14 09:21:41 +01:00
Jonas Ådahl 364732f2e6 GtkWindow: Enlarge the type hint private field
Make it what it is - the enum - so that that it is sure that the hint
will fit in the field. Without this, any hint that doesn't fit in 3
bits will be truncated to the 3 least significant bits, causing
unexpected behaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=756496
2015-10-14 10:32:31 +08:00
Marek Černocký d4699cf51d Updated Czech translation 2015-10-13 12:02:56 +02:00
Olivier Fourdan 4398e12469 GdkAppLaunchContext: Use the display name for X11
Using a NULL GAppInfo with g_app_launch_context_get_display() will
generate a critical warning in gio.

Use the display name instead as we don't have any valid GAppInfo to pass
to g_app_launch_context_get_display().

bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=756439
2015-10-13 08:39:05 +02:00
Carlos Garnacho ab001d01c8 textview: Ensure magnifier popover points within widget area
Otherwise the popopver will be automatically unmapped in
_gtk_popover_update_child_visible() when the X axis (coming more
or less directly from events) goes outside the textview.
2015-10-13 02:07:24 +02:00
Carlos Garnacho d8e41e1308 popover: Invalidate borders on tail position changes
There's nothing doing this explicitly, so tail position changes may
leave trails of older positions.

https://bugzilla.gnome.org/show_bug.cgi?id=756449
2015-10-13 02:07:24 +02:00
Carlos Garnacho 7ab250c10c wayland: Set a more believable crossing detail on pointer enter/leave
GDK_NOTIFY_ANCESTOR would happen when the pointer crosses across a direct
parent/child. However nonlinear events are more likely, specially when
the pointer moves across toplevels (either different apps, or menus being
popped up over the pointer position).

This makes popping up comboboxes and other menus that fall over the pointer
position possible. With the previous detail the GtkMenu code misinterpreted
the crossing event, making it think the button release coming right after
should dismiss the popup, which made menus just flash on the screen unless
you kept the button pressed.
2015-10-13 02:07:23 +02:00
Timm Bäder c05dc28952 gtk-query-settings: Add license header 2015-10-12 20:49:05 +02:00
Chun-wei Fan 6f7029bb67 MSVC builds: Fix "install"
Use $(GlibEtcInstallRoot) when invoking glib-compile-schemas, as CopyDir
is not GlibInstallRoot for GTK+ (due to quoting issues), meaning that the
glib-compile-schemas tool may not be found in certain cases.

Issue pointed out by Ignacio Casal Quinteiro.
2015-10-12 23:22:35 +08:00
Timm Bäder 7aa2bfdc77 Add gtk-query-settings
A small utility binary to query all properties of GtkSettings.

https://bugzilla.gnome.org/show_bug.cgi?id=756174
2015-10-10 17:29:15 -04:00
Benjamin Otte bddc524cd8 stylecontext: Make sure style is valid when looking up style properties
Otherwise, the validation may happen vey automatically some time during
the style property and that will most likely cause a crash.

https://bugzilla.gnome.org/show_bug.cgi?id=756338
2015-10-10 23:23:34 +02:00
Lapo Calamandrei 74e02842bb Adwaita: osd spinbutton fixes 2015-10-10 17:42:40 +02:00
Lapo Calamandrei b2d379a340 Adwaita: stop consider buttons on osd 'linked'
we used to consider every button inside osd containers linked,
this is not true anymore, now those buttons behave normally.
This will clearly cause breakage in applications.
2015-10-09 16:30:54 +02:00
Felipe Borges 70f577251f gtkprintoperation: job names must not exceed 255 chars
According to http://datatracker.ietf.org/doc/rfc2911/, The 'name'
attribute syntax is essentially the same as 'text', including the
REQUIRED support of UTF-8 except that the sequence of characters
is limited so that its encoded form MUST NOT exceed 255 (MAX) octets.

CUPS will not print jobs with names exceeding 255 characters.

https://bugzilla.gnome.org/show_bug.cgi?id=755988
2015-10-09 10:51:26 +02:00
Matthias Clasen 5548665351 im context simple: Add documentation
Document that GtkIMContextSimple is loading additional compose
tables. Also document Ctrl-Shift-u.
2015-10-09 00:19:41 -04:00
Takao Fujiwara a41f02f9b1 GtkIMContextSimple: Load locale compose tables dynamically.
Load /usr/share/X11/locale/$LOCALE/Compose and $HOME/.XCompose
dynamically.

https://bugzilla.gnome.org/show_bug.cgi?id=721120
2015-10-09 00:19:41 -04:00
Takao Fujiwara 138187755f Add gtk_compose_table_new_with_file() to create GtkComposeTable
https://bugzilla.gnome.org/show_bug.cgi?id=721120
2015-10-09 00:19:41 -04:00
Takao Fujiwara 4535d09bea GtkIMContextSimple: Change guint to guint16 in gtkimcontextsimple.c
GtkComposeTable and GtkComposeTableCompact use guint16 for the data.

https://bugzilla.gnome.org/show_bug.cgi?id=721120
2015-10-08 22:35:52 -04:00
Takao Fujiwara 48a2477f2d GtkIMContextSimple: export _gtk_check_compact_table() and GtkComposeTable
Some functions need to be exported if X11 compose files are loaded.

https://bugzilla.gnome.org/show_bug.cgi?id=721120
2015-10-08 22:35:52 -04:00
Ignacio Casal Quinteiro 22b0ed6807 win32: use the same parameter name as the implementation 2015-10-08 18:07:49 +02:00
Lapo Calamandrei f45e26885c Adwaita: simplify spibutton styling a bit 2015-10-08 17:18:50 +02:00
Benjamin Otte b6bf982289 iconhelper: Track icon-name fallback usage in the GIcon
Passing GTK_ICON_LOOKUP_GENERIC_FALLBACK to the icon lookup doesn't work
for GIcons, so we have to make sure we use the right GThemedIcon.

Fixes image-icon-name-use-fallback reftest.
2015-10-08 14:44:38 +02:00
Bastien Nocera 3df565cbf7 reftests: Rename reftest
After figuring out what the actual problem is, name the reftest
properly.
The actual problem is that the use-fallback property is ignored when
using an icon-name on GtkImage.
2015-10-08 14:44:19 +02:00
Bastien Nocera 8bd98c08aa reftests: Add test for GtkImage use-fallback property
Fallback seems to be working in the GtkIconTheme test suite, but fails
in GtkImage itself.

This is a test for a bug in the Bluetooth settings. An icon named
"phone-apple-iphone" should fallback to "phone" if the
gnome-icon-theme-extras package isn't installed.
2015-10-08 14:05:35 +02:00
Matthias Clasen 1e51398e9a Small cleanup
Use g_clear_object in gtkdnd.c.
2015-10-08 07:20:26 -04:00
Matthias Clasen d3475f7a72 color chooser: Render icons sharp at scale 2
We need to load the icons at the right scale, and render them
to a surface with the right scale too.

https://bugzilla.gnome.org/show_bug.cgi?id=756195
2015-10-07 23:19:32 -04:00
Carlos Soriano c929e98fba gtkfilesystem: protect against null filesystem type
The filesystem:type attribute could be NULL, then g_strv_contains
will crash if that happens.
Just don't call it if the attribute is not set.
2015-10-08 01:21:28 +02:00
Emmanuele Bassi f10c0da36c wayland: Allow falling back to compatibility EGL contexts
If the shared context is in legacy mode, or if the creation of a core
profile context failed, we fall back to an EGL context in compatibility
mode.

Since we're relying on a fairly new EGL implementation for Wayland, we
don't fall back to the older EGL API, and instead we always require the
EGL_KHR_create_context extension.

https://bugzilla.gnome.org/show_bug.cgi?id=756142
2015-10-07 16:21:57 +01:00
Emmanuele Bassi 59d02afec0 docs: Improve description of gdk_gl_context_is_legacy()
Explain why this function is available, and why you may need it.

https://bugzilla.gnome.org/show_bug.cgi?id=756142
2015-10-07 16:21:57 +01:00
Emmanuele Bassi 9601479f0c Allow testglarea to work with legacy GL contexts
Use the 1.30 GLSL shading language for the fragment and vertex shaders.

https://bugzilla.gnome.org/show_bug.cgi?id=756142
2015-10-07 16:21:57 +01:00
Emmanuele Bassi 105f1c9fd3 Control legacy GL context via environment variable
For testing purposes, we may want to force the creation of legacy GL
contexts via an environment variable.

https://bugzilla.gnome.org/show_bug.cgi?id=756142
2015-10-07 16:21:57 +01:00
Emmanuele Bassi 18cae47e17 x11: Create legacy GLX contexts
If GLX has support for the GLX_ARB_create_context_profile extension,
then we use the GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB; if it does
not, we fall back to the old glXCreateNewContext() API.

We use the shared GdkGLContext to decide whether the GLX context should
use the legacy bit or not.

https://bugzilla.gnome.org/show_bug.cgi?id=756142
2015-10-07 16:21:57 +01:00
Emmanuele Bassi e636c316a6 gl: Use older GLSL shaders with legacy contexts
If we're using modern GLSL, then we should stop using deprecated
modifiers, like 'varying' and 'attribute', as well as deprecated global
variables, like 'gl_FragColor'.

On the other hand, with legacy contexts we should be using older GLSL
shaders, to maximize compatibility.

https://bugzilla.gnome.org/show_bug.cgi?id=756142
2015-10-07 16:21:57 +01:00
Emmanuele Bassi 24230ca783 gl: Store the legacy bit in the GL program data
We need to know if we're using a legacy GL context in various places.

https://bugzilla.gnome.org/show_bug.cgi?id=756142
2015-10-07 16:21:57 +01:00
Emmanuele Bassi 2dfca143bb gdk: Allow querying if a GL context is in legacy mode
We want to have the ability to fall back to legacy GL contexts when
creating them. In order to do so, we need to store the legacy bit on the
GdkGLContext, as well as being able to query it.

Setting the legacy bit from outside GDK is not possible; we cannot
create GL contexts in 3.2 core profile *and* compatibility modes at the
same time, and if we allowed users to select the legacy mode themselves,
it would break the creation of the GdkWindow's paint GL context.

What we do allow is falling back to legacy GL context if the platform
does not support 3.2 core profiles — for instance, on older GPUs or
inside virtualized environments.

We are also going to use the legacy bit internally, to choose which GL
API we can use when drawing GL content.

https://bugzilla.gnome.org/show_bug.cgi?id=756142
2015-10-07 16:21:57 +01:00
Sébastien Wilmet b23eabbd64 textiter: fix bug in _gtk_text_btree_get_iter_at_last_toggle()
If the last tag toggle is the end iter, the function returned the wrong
tag toggle.

This resulted in some bugs where the view wasn't relayout/redrawn
correctly.

The function also always returned TRUE, probably because the return
value is used nowhere. But for consistency with
_gtk_text_btree_get_iter_at_first_toggle(), it's better to keep the
return value, and also because otherwise the function would be wrong (it
doesn't always return a tag toggle, if there is none).

https://bugzilla.gnome.org/show_bug.cgi?id=755413
2015-10-07 16:41:37 +02:00
Timm Bäder d8856f1b61 GtkPopover: Don't apply shape on wayland
Popovers are subsurfaces on wayland so we don't need that, and the shape
messed up hidpi popovers there.
2015-10-07 09:49:51 +02:00
Jonas Ådahl dad1931b5f wayland: Don't ignore wl_keyboard.leave if surface is gone
keyboard_handle_leave() might be called with a NULL surface resource
(for example if the surface was destroyed after the event was sent). If
so, we should still deal with the keyboard focus lost event, otherwise
we will both leak (the keyboard_focus GdkWindow reference) and miss
stopping the key repeat timer.

https://bugzilla.gnome.org/show_bug.cgi?id=755927
2015-10-07 12:28:39 +08:00
Christoph Reiter 263cbd90a0 Fix accessibility not getting initialized in gtk_init() if a default display is already set
_gtk_accessibility_init() only gets called if the default
display changes, but in case gdk_init() is called before gtk_init()
the default display is already set and no property notification occurs.

This can happen quite easily in pygobject where
"from gi.repository import Gdk, Gtk"
will call gdk_init() followed by gtk_init() in the Python overrides.

This fixes it by checking for a default display in all cases.
2015-10-07 00:19:32 +02:00
Olivier Fourdan ecb0e777fa GdkAppLaunchContext: Set DISPLAY variable for X11
The environment variable DISPLAY makes sense only for X11, so set its
value in the X11 backend.

https://bugzilla.gnome.org/show_bug.cgi?id=754983
2015-10-05 23:40:56 -04:00
Matthias Clasen 35b088459e assistant: Deal with spontaneous page disappearance
Removing pages from the assistant with gtk_widget_destroy() used
to work. It broke with the recent interposition of a box between
each page and the notebook. Fix this by cleaning up when the box
child is removed.

https://bugzilla.gnome.org/show_bug.cgi?id=756042
2015-10-05 08:21:55 -04:00
Wolfgang Stöggl 1ae98e72f7 Updated German translation 2015-10-04 09:04:15 +00:00
Rafal Luzynski 3c253c46a5 flowbox: correct the behavior with "can-focus"==FALSE
In fact there were two issues:

1. GtkFlowBoxChild with "can-focus"==FALSE should pass the focus
to its child immediately.
2. GtkFlowBox with "can-focus"==FALSE should cease its custom keynav
implementation and fall back to the default GtkContainer behavior
which is more natural.

Thanks to these changes the flow box can act as a better replacement
for GtkGrid and similar containers.

https://bugzilla.gnome.org/show_bug.cgi?id=753371
2015-10-03 22:48:15 -04:00
Matthias Clasen 896f911ea1 Bump version to 3.19.0
Otherwise, internal use of new API causes deprecation warnings.
2015-10-03 22:42:12 -04:00
Matthias Clasen 47237ddd94 inspector: Add a reset button for settings
This is exercising the new gtk_settings_reset_property api.

https://bugzilla.gnome.org/show_bug.cgi?id=755008
2015-10-03 22:42:12 -04:00
Matthias Clasen 2f0d4b6868 Add gtk_settings_reset_property
This api undoes an application-specific override and makes the
setting follow the system-wide values again.

https://bugzilla.gnome.org/show_bug.cgi?id=755008
2015-10-03 22:42:12 -04:00
Matthias Clasen d930ea7c1f style context: Avoid a compiler warning 2015-10-03 22:42:12 -04:00
John Ralls 571704824f Bug 753992 - im-quartz discard_preedit segmentation fault
Replace checking if the NSView is really a GdkWindow, which will crash
in the likely event it's not a GObject, with ensuring that the parent
GdkWindow is really a GdkWindowQuartz.
2015-10-03 22:28:36 -04:00
Benjamin Otte 2dad7c1319 gdk: Add gdk_rectangle_equal()
There's enough users inside GTK to warrant this convenience function.
2015-10-03 22:26:27 -04:00
Sébastien Wilmet 5a561a8ddb texttag: add gtk_text_tag_changed()
The function is useful for a GtkTextTag subclass that adds new
properties.

https://bugzilla.gnome.org/show_bug.cgi?id=755416
2015-10-03 22:24:17 -04:00
Benjamin Otte cc2224cc62 gdk: Add version macros for 3.20 2015-10-03 22:24:17 -04:00
Matthias Clasen 598e17018c style context: Formatting fixes 2015-10-03 21:38:20 -04:00
Matthias Clasen 40190c295c Add a test for gtk_style_context_list_classes
This test failed before the previous commit.
2015-10-03 17:38:36 -04:00
Matthias Clasen 506fe61938 Fix gtk_style_context_list_classes
The function was always returning NULL.
2015-10-03 17:37:34 -04:00
Matthias Clasen 83b8bcb63a switch: Unclip the slider shadow
This commit arranges things so the shadow of the slider can
extend outside the widget, even if the switch itself has no
shadow.

https://bugzilla.gnome.org/show_bug.cgi?id=755791
2015-10-03 16:20:50 -04:00
375 changed files with 40795 additions and 37531 deletions
+93
View File
@@ -1,3 +1,96 @@
Overview of Changes in GTK+ 3.19.2
==================================
* Support for native file chooser on Win32 when using the new
GtkFileChooserNative API, and when using GtkFileChooserButton.
* The GtkFileChooser interface prerequisite was changed from GtkWidget
to GObject to allow non-widget filechooser implementations.
Overview of Changes in GTK+ 3.19.1
==================================
* Support for help overlays to document keyboard shortcuts and gestures
has been added
* GdkAppLaunchContext is now setting the DISPLAY environment variable
for X11
* Support for GL legacy profiles has been added back
* GTK+ now loads compose tables in the format used by XLib from
~/.config/gtk-3.0/Compose, ~/.XCompose and the X11 locale information
* GtkBuilder can now create GFile objects, for use in e.g. GFileIcons.
* New APIs:
- GtkShortcutsWindow
- gtk_text_tag_changed
- gtk_settings_reset_property
- gdk_rectangle_equal
- gdk_gl_context_is_legacy
* A new commandline utility, gtk-query-settings, to query GTK+ settings,
has been added
* Theming: Element names are now supported.
A number of widgets have already been changed to use element names for
the widget itself and its various subelements. This effort will continue
in next development releases.
This change will require adjustments in themes and custom css - as part of
this transition, the element names and style classes in use are documented
and will be stable going forward.
* Debugging: GtkInspector can now edit string-array-valued properties
* Wayland:
- Fix transparent terminals
- Fix treeview search popups
- Fix CSD window resizing / moving
* Bugs fixed:
721120 GtkIMContextSimple needs locale compose tables similar with X11.
735341 Fix/improve gtk_text_buffer_get_iter_at_*() functions
753371 Bad focus order in GtkFlowBox
753992 im-quartz discard_preedit segmentation fault
754983 Wayland: g_desktop_app_info_launch_uris_with_spawn() forces DISPLAY...
755008 API to reset a gtksettings property
755413 Bug in _gtk_text_btree_get_iter_at_last_toggle()
755416 Be able to subclass GtkTextTag cleanly
755654 mmc/sd drive does not appear in Nautilus
755791 GtkSwitch: unclip css box-shadow on the slider
755927 Occasional "stuck key" after closing window using keyboard shortcut...
755988 gtk printer dialog won't print jobs with names exceeding 255 charac...
756042 GtkAssistant: Segfault after g_object_run_dispose(page)
756142 Bring back support for legacy OpenGL contexts
756160 Crash/segfault when dragging tabs (after 2nd/3rd/4th+ drag)
756174 Add a tool to inspect all xsettings from the command line
756195 GtkColorChooser: Plus/checkmark icons are blurry in hidpi
756338 applications segfaults on 3.18.1 when using external themes
756428 Add a help overlay widget
756439 Regression: Critical warning "g_app_launch_context_get_display: ass...
756449 GtkTextHandle artifacts under Wayland
756496 wayland: Make it possible to use a window type hint to map as a sub...
756505 Entering a dot removes all other characters from input
756568 Some improvements to gtkplacesview
756589 Improve the heuristics for external drives
756618 GtkWindow CSD: gtk_window_resize() also includes client side decora...
756625 segfault in captured_event_cb
756751 Keypad decimal point patch prevents entry of comma in german keypad...
756770 GTK+ 3.18.2 doesn't compile on OS X 10.6 (but so close!)
756852 GtkInspector segfaults when you respond to a GtkFileChooserDialog
756881 Guard against selection requestor disappearing
756886 The GtkWindow patch here is necessary to make transparent terminals...
756780 wayland: Fix GtkTreeView's search window
757147 gdk_pixbuf_get_from_window: honor device scale
* Translation updates:
Basque
Czech
German
Norwegian bokmål
Slovak
Overview of Changes in GTK+ 3.18.1
==================================
+9
View File
@@ -72,6 +72,15 @@ and attach the patch to that bug report.
Patches should be in unified diff form. (The -up option to GNU diff)
Even better are git-formatted patches. (Use git format-patch)
Release notes for 3.20
======================
* The GtkFileChooser interface pre-requisite changed from GtkWidget
to GObject, allowing non-widget implementations of this interface.
This is a minor change in ABI, as apps are no longer guaranteed
that a GtkFileChooser interface also supports all GtkWidget methods.
However, all previously existing objects still derive from GtkWidget,
so no existing code should break.
Release notes for 3.18
======================
+2
View File
@@ -111,6 +111,7 @@
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -159,6 +160,7 @@
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
+32 -30
View File
@@ -88,14 +88,41 @@
<Link>
<AdditionalDependencies>atk-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<ModuleDefinitionFile>..\..\..\libgail-util\gailutil.def</ModuleDefinitionFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\..\gtk;..\..\..\gdk;..\..\..\gdk\win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>GTK_DISABLE_DEPRECATED;GDK_DISABLE_DEPRECATED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>atk-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ModuleDefinitionFile>..\..\..\libgail-util\gailutil.def</ModuleDefinitionFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
@@ -113,39 +140,13 @@
<AdditionalDependencies>atk-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ModuleDefinitionFile>..\..\..\libgail-util\gailutil.def</ModuleDefinitionFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\..\gtk;..\..\..\gdk;..\..\..\gdk\win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>GTK_DISABLE_DEPRECATED;GDK_DISABLE_DEPRECATED;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>atk-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<ModuleDefinitionFile>..\..\..\libgail-util\gailutil.def</ModuleDefinitionFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\gtk;..\..\..\gdk;..\..\..\gdk\win32;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@@ -160,12 +161,13 @@
<AdditionalDependencies>atk-1.0.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ModuleDefinitionFile>..\..\..\libgail-util\gailutil.def</ModuleDefinitionFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
+11 -7
View File
@@ -169,10 +169,10 @@
<Link>
<AdditionalDependencies>imm32.lib;winmm.lib;ws2_32.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -189,12 +189,13 @@
<Link>
<AdditionalDependencies>imm32.lib;winmm.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -211,12 +212,13 @@
<Link>
<AdditionalDependencies>imm32.lib;winmm.lib;ws2_32.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -236,10 +238,10 @@
<Link>
<AdditionalDependencies>imm32.lib;winmm.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -259,10 +261,10 @@
<Link>
<AdditionalDependencies>imm32.lib;winmm.lib;ws2_32.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -279,12 +281,13 @@
<Link>
<AdditionalDependencies>imm32.lib;winmm.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -301,12 +304,13 @@
<Link>
<AdditionalDependencies>imm32.lib;winmm.lib;ws2_32.lib;dwmapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
+6 -4
View File
@@ -88,10 +88,10 @@
<Link>
<AdditionalDependencies>atk-1.0.lib;pangowin32-1.0.lib;imm32.lib;winspool.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -108,12 +108,13 @@
<Link>
<AdditionalDependencies>atk-1.0.lib;pangowin32-1.0.lib;imm32.lib;winspool.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -133,10 +134,10 @@
<Link>
<AdditionalDependencies>atk-1.0.lib;pangowin32-1.0.lib;imm32.lib;winspool.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -153,12 +154,13 @@
<Link>
<AdditionalDependencies>atk-1.0.lib;pangowin32-1.0.lib;imm32.lib;winspool.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).dll</OutputFile>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(GtkDllPrefix)$(ProjectName)$(GtkDllSuffix).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<ImportLibrary>$(TargetDir)$(ProjectName).0.lib</ImportLibrary>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -111,6 +111,7 @@
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -159,6 +160,7 @@
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -107,6 +107,7 @@
<SubSystem>Console</SubSystem>
<OptimizeReferences>false</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -151,6 +152,7 @@
<SubSystem>Console</SubSystem>
<OptimizeReferences>false</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
+26 -24
View File
@@ -96,6 +96,31 @@
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\gdk;..\..\..\gtk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>$(GtkPrefixDefine);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<FunctionLevelLinking>false</FunctionLevelLinking>
<OptimizeReferences>false</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
@@ -120,30 +145,6 @@
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\gdk;..\..\..\gtk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>$(GtkPrefixDefine);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<FunctionLevelLinking>false</FunctionLevelLinking>
<OptimizeReferences>false</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\gdk;..\..\..\gtk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@@ -165,6 +166,7 @@
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -109,6 +109,7 @@
<SubSystem>Console</SubSystem>
<OptimizeReferences>false</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -155,6 +156,7 @@
<SubSystem>Console</SubSystem>
<OptimizeReferences>false</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
+1 -1
View File
@@ -109,7 +109,7 @@ copy ..\..\..\gtk\org.gtk.Settings.ColorChooser.gschema.xml $(CopyDir)\share\gli
copy ..\..\..\gtk\org.gtk.Settings.Debug.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\demos\gtk-demo\org.gtk.Demo.gschema.xml $(CopyDir)\share\glib-2.0\schemas
echo "Compiling gsettings XML Files..."
$(CopyDir)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas
$(GlibEtcInstallRoot)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas
</GtkDoInstall>
<GtkDoInstallBroadwayHeaders>
copy ..\..\..\gdk\broadway\gdkbroadway.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk
+1 -1
View File
@@ -112,7 +112,7 @@ copy ..\..\..\gtk\org.gtk.Settings.Debug.gschema.xml $(CopyDir)\share\glib-2.0\s
copy ..\..\..\demos\gtk-demo\org.gtk.Demo.gschema.xml $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
echo &quot;Compiling gsettings XML Files...&quot;&#x0D;&#x0A;
$(CopyDir)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
$(GlibEtcInstallRoot)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
"
/>
<UserMacro
+13 -3
View File
@@ -9,9 +9,9 @@
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
m4_define([gtk_major_version], [3])
m4_define([gtk_minor_version], [18])
m4_define([gtk_minor_version], [19])
m4_define([gtk_micro_version], [1])
m4_define([gtk_interface_age], [1])
m4_define([gtk_interface_age], [0])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
m4_define([gtk_version],
@@ -61,6 +61,7 @@ m4_define([gdk_pixbuf_required_version], [2.30.0])
m4_define([introspection_required_version], [1.39.0])
m4_define([wayland_required_version], [1.5.91])
m4_define([mirclient_required_version], [0.11.0])
m4_define([mircookie_required_version], [0.17.0])
m4_define([epoxy_required_version], [1.0])
GLIB_REQUIRED_VERSION=glib_required_version
PANGO_REQUIRED_VERSION=pango_required_version
@@ -457,7 +458,7 @@ else
AM_CONDITIONAL(USE_WAYLAND, false)
fi
MIR_DEPENDENCIES="mirclient >= mirclient_required_version"
MIR_DEPENDENCIES="mirclient >= mirclient_required_version mircookie >= mircookie_required_version"
if test "$enable_mir_backend" = "maybe" ; then
PKG_CHECK_EXISTS($MIR_DEPENDENCIES, [have_mir_deps=yes], [have_mir_deps=no])
AC_MSG_CHECKING([for MIR_DEPENDENCIES])
@@ -1375,6 +1376,14 @@ if test x"$os_win32" = xyes; then
GTK_EXTRA_CFLAGS="$msnative_struct"
fi
if $PKG_CONFIG --exists x11; then
X11_PREFIX="`$PKG_CONFIG --variable=prefix x11`"
elif test x"$prefix" != xNONE; then
X11_PREFIX="$prefix"
else
X11_PREFIX="$ac_default_prefix"
fi
GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
ATK_PREFIX="`$PKG_CONFIG --variable=prefix atk`"
PANGO_PREFIX="`$PKG_CONFIG --variable=prefix pango`"
@@ -1387,6 +1396,7 @@ AC_SUBST(GTK_EXTRA_CFLAGS)
AC_SUBST(GTK_DEP_LIBS)
AC_SUBST(GTK_DEP_CFLAGS)
AC_SUBST(X11_PREFIX)
AC_SUBST(GLIB_PREFIX)
AC_SUBST(ATK_PREFIX)
AC_SUBST(PANGO_PREFIX)
+1
View File
@@ -56,6 +56,7 @@ demos_base = \
scale.c \
search_entry.c \
search_entry2.c \
shortcuts.c \
sidebar.c \
sizegroup.c \
spinbutton.c \
+87 -3
View File
@@ -13,6 +13,8 @@
#ifdef STANDALONE
static void create_window (GApplication *app, const char *contents);
static void
show_action_dialog (GSimpleAction *action)
{
@@ -65,6 +67,79 @@ activate_action (GSimpleAction *action,
show_action_dialog (action);
}
static void
activate_new (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
{
GApplication *app = user_data;
create_window (app, NULL);
}
static void
open_response_cb (GtkNativeDialog *dialog,
gint response_id,
gpointer user_data)
{
GtkFileChooserNative *native = user_data;
GApplication *app = g_object_get_data (G_OBJECT (native), "app");
GtkWidget *message_dialog;
GFile *file;
char *contents;
GError *error = NULL;
if (response_id == GTK_RESPONSE_ACCEPT)
{
file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (native));
if (g_file_load_contents (file, NULL, &contents, NULL, NULL, &error))
{
create_window (app, contents);
g_free (contents);
}
else
{
message_dialog = gtk_message_dialog_new (NULL,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,
GTK_BUTTONS_CLOSE,
"Error loading file: \"%s\"",
error->message);
g_signal_connect (message_dialog, "response",
G_CALLBACK (gtk_widget_destroy), NULL);
gtk_widget_show (message_dialog);
g_error_free (error);
}
}
g_object_unref (native);
}
static void
activate_open (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
{
GApplication *app = user_data;
GtkFileChooserNative *native;
native = gtk_file_chooser_native_new ("Open File",
NULL,
GTK_FILE_CHOOSER_ACTION_OPEN,
"_Open",
"_Cancel");
g_object_set_data_full (G_OBJECT (native), "app", g_object_ref (app), g_object_unref);
g_signal_connect (native,
"response",
G_CALLBACK (open_response_cb),
native);
gtk_native_dialog_show (GTK_NATIVE_DIALOG (native));
}
static void
activate_toggle (GSimpleAction *action,
GVariant *parameter,
@@ -226,8 +301,8 @@ change_radio_state (GSimpleAction *action,
}
static GActionEntry app_entries[] = {
{ "new", activate_action, NULL, NULL, NULL },
{ "open", activate_action, NULL, NULL, NULL },
{ "new", activate_new, NULL, NULL, NULL },
{ "open", activate_open, NULL, NULL, NULL },
{ "save", activate_action, NULL, NULL, NULL },
{ "save-as", activate_action, NULL, NULL, NULL },
{ "quit", activate_quit, NULL, NULL, NULL },
@@ -269,7 +344,8 @@ startup (GApplication *app)
}
static void
activate (GApplication *app)
create_window (GApplication *app,
const char *content_text)
{
GtkBuilder *builder;
GtkWidget *window;
@@ -317,6 +393,8 @@ activate (GApplication *app)
/* Show text widget info in the statusbar */
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (contents));
if (content_text)
gtk_text_buffer_set_text (buffer, content_text, -1);
g_signal_connect_object (buffer, "changed",
G_CALLBACK (update_statusbar), status, 0);
g_signal_connect_object (buffer, "mark-set",
@@ -329,6 +407,12 @@ activate (GApplication *app)
g_object_unref (builder);
}
static void
activate (GApplication *app)
{
create_window (app, NULL);
}
int
main (int argc, char *argv[])
{
+1 -1
View File
@@ -171,7 +171,7 @@ query_change_display (ChangeDisplayInfo *info)
"to move to the new screen");
if (toplevel)
gtk_window_set_screen (GTK_WINDOW (toplevel), gdk_display_get_screen (info->current_display, 0));
gtk_window_set_screen (GTK_WINDOW (toplevel), gdk_display_get_default_screen (info->current_display));
else
gdk_display_beep (gdk_screen_get_display (screen));
}
+11
View File
@@ -91,6 +91,12 @@
<gresource prefix="/stack">
<file>stack.ui</file>
</gresource>
<gresource prefix="/shortcuts">
<file>shortcuts.ui</file>
<file>shortcuts-builder.ui</file>
<file>shortcuts-gedit.ui</file>
<file>shortcuts-clocks.ui</file>
</gresource>
<gresource prefix="/revealer">
<file>revealer.ui</file>
</gresource>
@@ -163,6 +169,7 @@
<file>scale.c</file>
<file>search_entry.c</file>
<file>search_entry2.c</file>
<file>shortcuts.c</file>
<file>sizegroup.c</file>
<file>sidebar.c</file>
<file>stack.c</file>
@@ -213,4 +220,8 @@
<gresource prefix="/modelbutton">
<file>modelbutton.ui</file>
</gresource>
<gresource prefix="/icons">
<file>gesture-two-finger-swipe-right.svg</file>
<file>gesture-two-finger-swipe-left.svg</file>
</gresource>
</gresources>
@@ -0,0 +1,173 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="80"
height="54"
viewBox="0 0 80.000001 54"
id="svg6660"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="two-finger-swipe-left.svg"
inkscape:export-filename="/home/aday/Scratch/two-finger-swipe-left.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs6662" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="-26.486277"
inkscape:cy="27.97415"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:showpageshadow="false"
units="px"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1920"
inkscape:window-height="1016"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1" />
<metadata
id="metadata6665">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(1077.1429,-651.07582)">
<g
style="display:inline"
transform="translate(-753.14285,209.07579)"
id="g6613">
<g
id="g6615">
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#4a90d9;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect6617"
width="7.99999"
height="24.999994"
x="-288"
y="471"
ry="4.1854858"
rx="3.999995" />
<rect
rx="3.999995"
ry="4.1854858"
y="452.00003"
x="-279"
height="43.999989"
width="7.99999"
id="rect6619"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#4a90d9;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#4a90d9;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect6621"
width="7.99999"
height="49.000015"
x="-270"
y="447"
ry="4.1854858"
rx="3.999995" />
<rect
rx="3.999995"
ry="4.1854858"
y="460"
x="-261"
height="36.000011"
width="7.99999"
id="rect6623"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#4a90d9;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#4a90d9;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect6625"
width="7.99999"
height="30.000006"
x="-252"
y="466"
ry="4.1854858"
rx="3.999995" />
<rect
y="483"
x="-288"
height="12.99999"
width="28.999994"
id="rect6627"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#4a90d9;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<rect
rx="3.999995"
ry="4.1854858"
y="475"
x="-279"
height="21"
width="34.999985"
id="rect6629"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#4a90d9;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<path
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
id="path6631"
sodipodi:type="arc"
sodipodi:cx="-266"
sodipodi:cy="451"
sodipodi:rx="7.4999938"
sodipodi:ry="7.5000024"
sodipodi:start="3.4953343"
sodipodi:end="1.8407347"
d="m -273.03562,448.40192 a 7.4999938,7.5000024 0 0 1 9.43617,-4.50737 7.4999938,7.5000024 0 0 1 4.76917,9.30661 7.4999938,7.5000024 0 0 1 -9.16976,5.02725"
sodipodi:open="true" />
<path
d="m -268.10552,458.34925 a 7.4999938,7.5000024 0 0 1 -9.38146,4.80209 7.4999938,7.5000024 0 0 1 -4.92078,-9.31976 7.4999938,7.5000024 0 0 1 9.25653,-5.03869"
sodipodi:end="4.9929531"
sodipodi:start="0.31864739"
sodipodi:ry="7.5000024"
sodipodi:rx="7.4999938"
sodipodi:cy="455.99963"
sodipodi:cx="-275.22797"
sodipodi:type="arc"
id="path6633"
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
sodipodi:open="true" />
<path
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:6;marker:none;enable-background:accumulate"
d="m -314,465 -10,-9.5 10,-9.5 z"
id="path6635"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<rect
transform="scale(-1,-1)"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#4a90d9;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect6637"
width="31.999987"
height="4.99999"
x="283"
y="-458" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 9.8 KiB

@@ -0,0 +1,169 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="80.000008"
height="55.000023"
viewBox="0 0 80.000008 55.000024"
id="svg6535"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="two-finger-swipe-right.svg">
<defs
id="defs6537" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2"
inkscape:cx="-59.169932"
inkscape:cy="48.63391"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:showpageshadow="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1920"
inkscape:window-height="1016"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1" />
<metadata
id="metadata6540">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(180,-479.14791)">
<g
style="display:inline"
transform="translate(144,118.14791)"
id="g6509">
<g
id="g6511">
<rect
rx="3.999995"
ry="4.1854858"
y="391"
x="-324"
height="24.999994"
width="7.99999"
id="rect6513"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#4a90d9;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#4a90d9;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect6515"
width="7.99999"
height="43.999989"
x="-315"
y="372.00003"
ry="4.1854858"
rx="3.999995" />
<rect
rx="3.999995"
ry="4.1854858"
y="367"
x="-306"
height="49.000015"
width="7.99999"
id="rect6517"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#4a90d9;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#4a90d9;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect6519"
width="7.99999"
height="36.000011"
x="-297"
y="380"
ry="4.1854858"
rx="3.999995" />
<rect
rx="3.999995"
ry="4.1854858"
y="386"
x="-288"
height="30.000006"
width="7.99999"
id="rect6521"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#4a90d9;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#4a90d9;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect6523"
width="28.999994"
height="12.99999"
x="-324"
y="403" />
<rect
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#4a90d9;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
id="rect6525"
width="34.999985"
height="21"
x="-315"
y="395"
ry="4.1854858"
rx="3.999995" />
<path
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path6527"
d="m -254,361 10,9.5 -10,9.5 z"
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:6;marker:none;enable-background:accumulate" />
<path
sodipodi:open="true"
d="m -309.03562,368.40192 a 7.4999938,7.5000024 0 0 1 9.43617,-4.50737 7.4999938,7.5000024 0 0 1 4.76917,9.30661 7.4999938,7.5000024 0 0 1 -9.16976,5.02725"
sodipodi:end="1.8407347"
sodipodi:start="3.4953343"
sodipodi:ry="7.5000024"
sodipodi:rx="7.4999938"
sodipodi:cy="371"
sodipodi:cx="-302"
sodipodi:type="arc"
id="path6529"
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" />
<path
sodipodi:open="true"
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"
id="path6531"
sodipodi:type="arc"
sodipodi:cx="-311.22797"
sodipodi:cy="375.99963"
sodipodi:rx="7.4999938"
sodipodi:ry="7.5000024"
sodipodi:start="0.31864739"
sodipodi:end="4.9929531"
d="m -304.10552,378.34925 a 7.4999938,7.5000024 0 0 1 -9.38146,4.80209 7.4999938,7.5000024 0 0 1 -4.92078,-9.31976 7.4999938,7.5000024 0 0 1 9.25653,-5.03869" />
<rect
y="368"
x="-295"
height="4.99999"
width="41.999992"
id="rect6533"
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#4a90d9;stroke-width:0;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 9.6 KiB

-3
View File
@@ -72,9 +72,6 @@
<property name="can_focus">1</property>
<property name="hscrollbar_policy">never</property>
<property name="min_content_width">150</property>
<style>
<class name="sidebar"/>
</style>
<child>
<object class="GtkTreeView" id="treeview">
<property name="visible">1</property>
+467
View File
@@ -0,0 +1,467 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.17 -->
<object class="GFileIcon" id="left-swipe-icon">
<property name="file">resource:///icons/gesture-two-finger-swipe-left.svg</property>
</object>
<object class="GFileIcon" id="right-swipe-icon">
<property name="file">resource:///icons/gesture-two-finger-swipe-right.svg</property>
</object>
<object class="GtkShortcutsWindow" id="shortcuts-builder">
<property name="modal">1</property>
<child>
<object class="GtkShortcutsSection">
<property name="visible">1</property>
<property name="section-name">editor</property>
<property name="title" translatable="yes">Editor Shortcuts</property>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title" translatable="yes">General</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="title" translatable="yes">Global Search</property>
<property name="accelerator">&lt;ctrl&gt;period</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="title" translatable="yes">Preferences</property>
<property name="accelerator">&lt;ctrl&gt;comma</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="title" translatable="yes">Command Bar</property>
<property name="accelerator">&lt;ctrl&gt;Return</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="title" translatable="yes">Terminal</property>
<property name="accelerator">&lt;ctrl&gt;&lt;shift&gt;t</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="title" translatable="yes">Keyboard Shortcuts</property>
<property name="accelerator">&lt;ctrl&gt;&lt;shift&gt;question</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title" translatable="yes">Panels</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="title" translatable="yes">Toggle left panel</property>
<property name="accelerator">F9</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="title" translatable="yes">Toggle right panel</property>
<property name="accelerator">&lt;shift&gt;F9</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="title" translatable="yes">Toggle bottom panel</property>
<property name="accelerator">&lt;ctrl&gt;F9</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title" translatable="yes">Touchpad gestures</property>
<child>
<object class="GtkShortcutsGesture">
<property name="visible">1</property>
<property name="title" translatable="yes">Switch to the next document</property>
<property name="subtitle" translatable="yes">Two finger swipe right</property>
<property name="icon">right-swipe-icon</property>
</object>
</child>
<child>
<object class="GtkShortcutsGesture">
<property name="visible">1</property>
<property name="title" translatable="yes">Switch to the previous document</property>
<property name="subtitle" translatable="yes">Two finger swipe left</property>
<property name="icon">left-swipe-icon</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title" translatable="yes">Files</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;n</property>
<property name="title" translatable="yes">Create new document</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;o</property>
<property name="title" translatable="yes">Open a document</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;s</property>
<property name="title" translatable="yes">Save the document</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;w</property>
<property name="title" translatable="yes">Close the document</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;&lt;alt&gt;Page_Down</property>
<property name="title" translatable="yes">Switch to the next document</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;&lt;alt&gt;Page_Up</property>
<property name="title" translatable="yes">Switch to the previous document</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title" translatable="yes">Find and replace</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;f</property>
<property name="title" translatable="yes">Find</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;g</property>
<property name="title" translatable="yes">Find the next match</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;&lt;shift&gt;g</property>
<property name="title" translatable="yes">Find the previous match</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;&lt;shift&gt;k</property>
<property name="title" translatable="yes">Clear highlight</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title" translatable="yes">Copy and Paste</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;c</property>
<property name="title" translatable="yes">Copy selected text to clipboard</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;x</property>
<property name="title" translatable="yes">Cut selected text to clipboard</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;v</property>
<property name="title" translatable="yes">Paste text from clipboard</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title" translatable="yes">Undo and Redo</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;z</property>
<property name="title" translatable="yes">Undo previous command</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;&lt;shift&gt;z</property>
<property name="title" translatable="yes">Redo previous command</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title" translatable="yes">Editing</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;&lt;shift&gt;a</property>
<property name="title" translatable="yes">Increment number at cursor</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;&lt;shift&gt;x</property>
<property name="title" translatable="yes">Decrement number at cursor</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;j</property>
<property name="title" translatable="yes">Join selected lines</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;space</property>
<property name="title" translatable="yes">Show completion window</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">Insert</property>
<property name="title" translatable="yes">Toggle overwrite</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;&lt;alt&gt;i</property>
<property name="title" translatable="yes">Reindent line</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title" translatable="yes">Navigation</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;alt&gt;n</property>
<property name="title" translatable="yes">Move to next error in file</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;alt&gt;p</property>
<property name="title" translatable="yes">Move to previous error in file</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;shift&gt;&lt;alt&gt;Left</property>
<property name="title" translatable="yes">Move to previous edit location</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;shift&gt;&lt;alt&gt;Right</property>
<property name="title" translatable="yes">Move to next edit location</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;alt&gt;period</property>
<property name="title" translatable="yes">Jump to definition of symbol</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;alt&gt;&lt;shift&gt;Up</property>
<property name="title" translatable="yes">Move sectionport up within the file</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;alt&gt;&lt;shift&gt;Down</property>
<property name="title" translatable="yes">Move sectionport down within the file</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;alt&gt;&lt;shift&gt;End</property>
<property name="title" translatable="yes">Move sectionport to end of file</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;alt&gt;&lt;shift&gt;Home</property>
<property name="title" translatable="yes">Move sectionport to beginning of file</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;percent</property>
<property name="title" translatable="yes">Move to matching bracket</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title" translatable="yes">Selections</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;a</property>
<property name="title" translatable="yes">Select all</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;backslash</property>
<property name="title" translatable="yes">Unselect all</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsSection">
<property name="visible">1</property>
<property name="section-name">terminal</property>
<property name="title" translatable="yes">Terminal Shortcuts</property>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title" translatable="yes">General</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="title" translatable="yes">Global Search</property>
<property name="accelerator">&lt;ctrl&gt;period</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="title" translatable="yes">Preferences</property>
<property name="accelerator">&lt;ctrl&gt;comma</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="title" translatable="yes">Command Bar</property>
<property name="accelerator">&lt;ctrl&gt;Return</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="title" translatable="yes">Terminal</property>
<property name="accelerator">&lt;ctrl&gt;&lt;shift&gt;t</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="title" translatable="yes">Keyboard Shortcuts</property>
<property name="accelerator">&lt;ctrl&gt;&lt;shift&gt;question</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title" translatable="yes">Copy and Paste</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;&lt;shift&gt;c</property>
<property name="title" translatable="yes">Copy selected text to clipboard</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;&lt;shift&gt;v</property>
<property name="title" translatable="yes">Paste text from clipboard</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title" translatable="yes">Switching</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;alt&gt;1...9</property>
<property name="title" translatable="yes">Switch to n-th tab</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>
+148
View File
@@ -0,0 +1,148 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.17 -->
<object class="GtkShortcutsWindow" id="shortcuts-clocks">
<property name="modal">1</property>
<child>
<object class="GtkShortcutsSection">
<property name="visible">1</property>
<property name="section-name">shortcuts</property>
<property name="max-height">10</property>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title" translatable="yes">General</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;Page_Down</property>
<property name="title" translatable="yes">Go to the next section</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;Page_Up</property>
<property name="title" translatable="yes">Go to the previous section</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;alt&gt;Q</property>
<property name="title" translatable="yes">Quit</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;alt&gt;Left</property>
<property name="title" translatable="yes">Forward</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;Right</property>
<property name="title" translatable="yes">Back</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="view">world</property>
<property name="title" translatable="yes">World Clocks</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;N</property>
<property name="title" translatable="yes">Add a world clock</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;S</property>
<property name="title" translatable="yes">Select world clocks</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="view">alarm</property>
<property name="title" translatable="yes">Alarm</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;N</property>
<property name="title" translatable="yes">Add an alarm</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;S</property>
<property name="title" translatable="yes">Select alarms</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="view">stopwatch</property>
<property name="title" translatable="yes">Stopwatch</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">Return space</property>
<property name="title" translatable="yes">Start / Stop / Continue</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">L</property>
<property name="title" translatable="yes">Lap</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">Delete</property>
<property name="title" translatable="yes">Reset</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="view">timer</property>
<property name="title" translatable="yes">Timer</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">Return space</property>
<property name="title" translatable="yes">Start / Stop / Pause</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">Delete</property>
<property name="title" translatable="yes">Reset</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>
+181
View File
@@ -0,0 +1,181 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.17 -->
<object class="GFileIcon" id="left-swipe-icon">
<property name="file">resource:///icons/gesture-two-finger-swipe-left.svg</property>
</object>
<object class="GFileIcon" id="right-swipe-icon">
<property name="file">resource:///icons/gesture-two-finger-swipe-right.svg</property>
</object>
<object class="GtkShortcutsWindow" id="shortcuts-gedit">
<property name="modal">1</property>
<child>
<object class="GtkShortcutsSection">
<property name="visible">1</property>
<property name="section-name">shortcuts</property>
<property name="max-height">12</property>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title" translatable="yes">Touchpad gestures</property>
<child>
<object class="GtkShortcutsGesture">
<property name="visible">1</property>
<property name="title" translatable="yes">Switch to the next document</property>
<property name="subtitle" translatable="yes">Two finger swipe right</property>
<property name="icon">right-swipe-icon</property>
</object>
</child>
<child>
<object class="GtkShortcutsGesture">
<property name="visible">1</property>
<property name="title" translatable="yes">Switch to the previous document</property>
<property name="subtitle" translatable="yes">Two finger swipe left</property>
<property name="icon">left-swipe-icon</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title" translatable="yes">Documents</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;N</property>
<property name="title" translatable="yes">Create new document</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;O</property>
<property name="title" translatable="yes">Open a document</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;S</property>
<property name="title" translatable="yes">Save the document</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;W</property>
<property name="title" translatable="yes">Close the document</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;&lt;Alt&gt;Page_Down</property>
<property name="title" translatable="yes">Switch to the next document</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;&lt;Alt&gt;Page_Up</property>
<property name="title" translatable="yes">Switch to the previous document</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title" translatable="yes">Find and Replace</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;F</property>
<property name="title" translatable="yes">Find</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;G</property>
<property name="title" translatable="yes">Find the next match</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;&lt;Shift&gt;G</property>
<property name="title" translatable="yes">Find the previous match</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;H</property>
<property name="title" translatable="yes">Find and Replace</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;&lt;Shift&gt;K</property>
<property name="title" translatable="yes">Clear highlight</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;I</property>
<property name="title" translatable="yes">Go to line</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title" translatable="yes">Tools</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;shift&gt;F7</property>
<property name="title" translatable="yes">Check spelling</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title" translatable="yes">Miscellaneous</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">F11</property>
<property name="title" translatable="yes">Fullscreen on / off</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;ctrl&gt;P</property>
<property name="title" translatable="yes">Print the document</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">Insert</property>
<property name="title" translatable="yes">Toggle insert / overwrite</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>
+92
View File
@@ -0,0 +1,92 @@
/* Shortcuts Window
*
* GtkShortcutsWindow is a window that provides a help overlay
* for shortcuts and gestures in an application.
*/
#include <gtk/gtk.h>
static void
show_shortcuts (GtkWidget *window,
const gchar *id,
const gchar *view)
{
GtkBuilder *builder;
GtkWidget *overlay;
gchar *path;
path = g_strdup_printf ("/shortcuts/%s.ui", id);
builder = gtk_builder_new_from_resource (path);
g_free (path);
overlay = GTK_WIDGET (gtk_builder_get_object (builder, id));
gtk_window_set_transient_for (GTK_WINDOW (overlay), GTK_WINDOW (window));
g_object_set (overlay, "view-name", view, NULL);
gtk_widget_show (overlay);
}
static void
builder_shortcuts (GtkWidget *window)
{
show_shortcuts (window, "shortcuts-builder", NULL);
}
static void
gedit_shortcuts (GtkWidget *window)
{
show_shortcuts (window, "shortcuts-gedit", NULL);
}
static void
clocks_shortcuts (GtkWidget *window)
{
show_shortcuts (window, "shortcuts-clocks", NULL);
}
static void
clocks_shortcuts_stopwatch (GtkWidget *window)
{
show_shortcuts (window, "shortcuts-clocks", "stopwatch");
}
GtkWidget *
do_shortcuts (GtkWidget *do_widget)
{
static GtkWidget *window = NULL;
static gboolean icons_added = FALSE;
if (!icons_added)
{
icons_added = TRUE;
gtk_icon_theme_add_resource_path (gtk_icon_theme_get_default (), "/icons");
}
g_type_ensure (G_TYPE_FILE_ICON);
if (!window)
{
GtkBuilder *builder;
builder = gtk_builder_new_from_resource ("/shortcuts/shortcuts.ui");
gtk_builder_add_callback_symbols (builder,
"builder_shortcuts", G_CALLBACK (builder_shortcuts),
"gedit_shortcuts", G_CALLBACK (gedit_shortcuts),
"clocks_shortcuts", G_CALLBACK (clocks_shortcuts),
"clocks_shortcuts_stopwatch", G_CALLBACK (clocks_shortcuts_stopwatch),
NULL);
gtk_builder_connect_signals (builder, NULL);
window = GTK_WIDGET (gtk_builder_get_object (builder, "window1"));
gtk_window_set_screen (GTK_WINDOW (window),
gtk_widget_get_screen (do_widget));
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
g_object_unref (builder);
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
else
gtk_widget_destroy (window);
return window;
}
+44
View File
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.17 -->
<object class="GtkWindow" id="window1">
<property name="title" translatable="yes">Shortcuts</property>
<child>
<object class="GtkBox">
<property name="visible">1</property>
<property name="orientation">vertical</property>
<property name="margin">50</property>
<property name="spacing">10</property>
<child>
<object class="GtkButton">
<property name="visible">1</property>
<property name="label">Builder</property>
<signal name="clicked" handler="builder_shortcuts" swapped="1" object="window1"/>
</object>
</child>
<child>
<object class="GtkButton">
<property name="visible">1</property>
<property name="label">GEdit</property>
<signal name="clicked" handler="gedit_shortcuts" swapped="1" object="window1"/>
</object>
</child>
<child>
<object class="GtkButton">
<property name="visible">1</property>
<property name="label">Clocks - All</property>
<signal name="clicked" handler="clocks_shortcuts" swapped="1" object="window1"/>
</object>
</child>
<child>
<object class="GtkButton">
<property name="visible">1</property>
<property name="label">Clocks - Stopwatch</property>
<signal name="clicked" handler="clocks_shortcuts_stopwatch" swapped="1" object="window1"/>
</object>
</child>
</object>
</child>
</object>
</interface>
+2 -2
View File
@@ -645,7 +645,7 @@ load_icon_items (GtkToolPalette *palette)
icon_theme = gtk_icon_theme_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (palette)));
contexts = gtk_icon_theme_list_contexts (icon_theme);
for (l = contexts; l; l = g_list_next (l))
for (l = contexts; l; l = l->next)
{
gchar *context = l->data;
GList *icon_names;
@@ -663,7 +663,7 @@ load_icon_items (GtkToolPalette *palette)
icon_names = gtk_icon_theme_list_icons (icon_theme, context);
icon_names = g_list_sort (icon_names, (GCompareFunc) strcmp);
for (ll = icon_names; ll; ll = g_list_next (ll))
for (ll = icon_names; ll; ll = ll->next)
{
GtkToolItem *item;
gchar *id = ll->data;
+1
View File
@@ -64,6 +64,7 @@ EXTRA_DIST += \
widget-factory.ui \
widget-factory.css \
menus.ui \
help-overlay.ui \
widget-factory.gresource.xml \
data/source.svg \
data/symbolic-source.svg
+92
View File
@@ -0,0 +1,92 @@
<interface>
<object class="GtkShortcutsWindow" id="help_overlay">
<child>
<object class="GtkShortcutsSection">
<property name="visible">1</property>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title">General</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">F1</property>
<property name="title">Show About Dialog</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;Primary&gt;q</property>
<property name="title">Quit</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;Primary&gt;d</property>
<property name="title">Switch to dark theme</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title">Traditional</property>
<property name="view">page2</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;Primary&gt;s</property>
<property name="title">Search</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">Delete</property>
<property name="title">Delete</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;Primary&gt;b</property>
<property name="title">Set background</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkShortcutsGroup">
<property name="visible">1</property>
<property name="title">Modern</property>
<property name="view">page3</property>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;Primary&gt;o</property>
<property name="title">Open a file</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;Primary&gt;r</property>
<property name="title">Start recording</property>
</object>
</child>
<child>
<object class="GtkShortcutsShortcut">
<property name="visible">1</property>
<property name="accelerator">&lt;Primary&gt;l</property>
<property name="title">Lock or unlock</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>
+126 -6
View File
@@ -69,6 +69,13 @@ get_busy (GSimpleAction *action,
gtk_widget_set_sensitive (window, FALSE);
}
static gint current_page = 0;
static gboolean
on_page (gint i)
{
return current_page == i;
}
static void
activate_search (GSimpleAction *action,
GVariant *parameter,
@@ -77,6 +84,9 @@ activate_search (GSimpleAction *action,
GtkWidget *window = user_data;
GtkWidget *searchbar;
if (!on_page (2))
return;
searchbar = GTK_WIDGET (g_object_get_data (G_OBJECT (window), "searchbar"));
gtk_search_bar_set_search_mode (GTK_SEARCH_BAR (searchbar), TRUE);
}
@@ -89,10 +99,79 @@ activate_delete (GSimpleAction *action,
GtkWidget *window = user_data;
GtkWidget *infobar;
if (!on_page (2))
return;
infobar = GTK_WIDGET (g_object_get_data (G_OBJECT (window), "infobar"));
gtk_widget_show (infobar);
}
static void populate_flowbox (GtkWidget *flowbox);
static void
activate_background (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
{
GtkWidget *window = user_data;
GtkWidget *dialog;
GtkWidget *flowbox;
if (!on_page (2))
return;
dialog = GTK_WIDGET (g_object_get_data (G_OBJECT (window), "selection_dialog"));
flowbox = GTK_WIDGET (g_object_get_data (G_OBJECT (window), "selection_flowbox"));
gtk_widget_show (dialog);
populate_flowbox (flowbox);
}
static void
activate_open (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
{
GtkWidget *window = user_data;
GtkWidget *button;
if (!on_page (3))
return;
button = GTK_WIDGET (g_object_get_data (G_OBJECT (window), "open_menubutton"));
gtk_button_clicked (GTK_BUTTON (button));
}
static void
activate_record (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
{
GtkWidget *window = user_data;
GtkWidget *button;
if (!on_page (3))
return;
button = GTK_WIDGET (g_object_get_data (G_OBJECT (window), "record_button"));
gtk_button_clicked (GTK_BUTTON (button));
}
static void
activate_lock (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
{
GtkWidget *window = user_data;
GtkWidget *button;
if (!on_page (3))
return;
button = GTK_WIDGET (g_object_get_data (G_OBJECT (window), "lockbutton"));
gtk_button_clicked (GTK_BUTTON (button));
}
static void
activate_about (GSimpleAction *action,
GVariant *parameter,
@@ -469,14 +548,26 @@ static void
page_changed_cb (GtkWidget *stack, GParamSpec *pspec, gpointer data)
{
const gchar *name;
GtkWidget *window;
GtkWidget *page;
if (gtk_widget_in_destruction (stack))
return;
name = gtk_stack_get_visible_child_name (GTK_STACK (stack));
window = gtk_widget_get_ancestor (stack, GTK_TYPE_APPLICATION_WINDOW);
g_object_set (gtk_application_window_get_help_overlay (GTK_APPLICATION_WINDOW (window)),
"view-name", name,
NULL);
if (g_str_equal (name, "page1"))
current_page = 1;
else if (g_str_equal (name, "page2"))
current_page = 2;
if (g_str_equal (name, "page3"))
{
current_page = 3;
page = gtk_stack_get_visible_child (GTK_STACK (stack));
set_needs_attention (GTK_WIDGET (page), FALSE);
}
@@ -818,7 +909,7 @@ background_loaded_cb (GObject *source,
}
static void
populate_flowbox (GtkWidget *button, GtkWidget *flowbox)
populate_flowbox (GtkWidget *flowbox)
{
const gchar *location;
GDir *dir;
@@ -831,7 +922,10 @@ populate_flowbox (GtkWidget *button, GtkWidget *flowbox)
GdkPixbuf *pixbuf;
GtkWidget *child;
g_signal_handlers_disconnect_by_func (button, populate_flowbox, flowbox);
if (GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (flowbox), "populated")))
return;
g_object_set_data (G_OBJECT (flowbox), "populated", GUINT_TO_POINTER (1));
pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, 110, 70);
gdk_pixbuf_fill (pixbuf, 0xffffffff);
@@ -1179,7 +1273,7 @@ add_item (GtkTextView *tv,
{
item = gtk_check_button_new ();
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (item), set);
gtk_button_set_focus_on_click (GTK_BUTTON (item), FALSE);
gtk_widget_set_focus_on_click (item, FALSE);
g_signal_connect (item, "clicked", G_CALLBACK (activate_item), tv);
}
@@ -1379,7 +1473,11 @@ activate (GApplication *app)
{ "dark", NULL, NULL, "false", change_theme_state },
{ "search", activate_search, NULL, NULL, NULL },
{ "delete", activate_delete, NULL, NULL, NULL },
{ "busy", get_busy, NULL, NULL, NULL }
{ "busy", get_busy, NULL, NULL, NULL },
{ "background", activate_background, NULL, NULL, NULL },
{ "open", activate_open, NULL, NULL, NULL },
{ "record", activate_record, NULL, NULL, NULL },
{ "lock", activate_lock, NULL, NULL, NULL },
};
struct {
const gchar *action_and_target;
@@ -1389,10 +1487,15 @@ activate (GApplication *app)
{ "app.quit", { "<Primary>q", NULL } },
{ "win.dark", { "<Primary>d", NULL } },
{ "win.search", { "<Primary>s", NULL } },
{ "win.delete", { "Delete", NULL } }
{ "win.delete", { "Delete", NULL } },
{ "win.background", { "<Primary>b", NULL } },
{ "win.open", { "<Primary>o", NULL } },
{ "win.record", { "<Primary>r", NULL } },
{ "win.lock", { "<Primary>l", NULL } },
};
gint i;
GPermission *permission;
GAction *action;
g_type_ensure (my_text_view_get_type ());
@@ -1498,6 +1601,7 @@ activate (GApplication *app)
stack = (GtkWidget *)gtk_builder_get_object (builder, "toplevel_stack");
g_signal_connect (widget, "clicked", G_CALLBACK (action_dialog_button_clicked), stack);
g_signal_connect (stack, "notify::visible-child-name", G_CALLBACK (page_changed_cb), NULL);
page_changed_cb (stack, NULL, NULL);
dialog = (GtkWidget *)gtk_builder_get_object (builder, "preference_dialog");
g_signal_connect (dialog, "response", G_CALLBACK (close_dialog), NULL);
@@ -1507,13 +1611,15 @@ activate (GApplication *app)
g_signal_connect (widget, "clicked", G_CALLBACK (show_dialog), dialog);
dialog = (GtkWidget *)gtk_builder_get_object (builder, "selection_dialog");
g_object_set_data (G_OBJECT (window), "selection_dialog", dialog);
widget = (GtkWidget *)gtk_builder_get_object (builder, "text3");
g_signal_connect (dialog, "response", G_CALLBACK (close_selection_dialog), widget);
widget = (GtkWidget *)gtk_builder_get_object (builder, "selection_dialog_button");
g_signal_connect (widget, "clicked", G_CALLBACK (show_dialog), dialog);
widget2 = (GtkWidget *)gtk_builder_get_object (builder, "selection_flowbox");
g_signal_connect (widget, "clicked", G_CALLBACK (populate_flowbox), widget2);
g_object_set_data (G_OBJECT (window), "selection_flowbox", widget2);
g_signal_connect_swapped (widget, "clicked", G_CALLBACK (populate_flowbox), widget2);
widget = (GtkWidget *)gtk_builder_get_object (builder, "charletree");
populate_model ((GtkTreeStore *)gtk_tree_view_get_model (GTK_TREE_VIEW (widget)));
@@ -1538,6 +1644,7 @@ activate (GApplication *app)
set_accel (GTK_APPLICATION (app), GTK_WIDGET (gtk_builder_get_object (builder, "searchmenuitem")));
set_accel (GTK_APPLICATION (app), GTK_WIDGET (gtk_builder_get_object (builder, "darkmenuitem")));
set_accel (GTK_APPLICATION (app), GTK_WIDGET (gtk_builder_get_object (builder, "aboutmenuitem")));
set_accel (GTK_APPLICATION (app), GTK_WIDGET (gtk_builder_get_object (builder, "bgmenuitem")));
widget2 = (GtkWidget *)gtk_builder_get_object (builder, "tooltextview");
@@ -1580,13 +1687,26 @@ activate (GApplication *app)
gtk_popover_set_default_widget (GTK_POPOVER (widget), widget3);
g_signal_connect (widget2, "notify::text", G_CALLBACK (open_popover_text_changed), widget3);
g_signal_connect_swapped (widget3, "clicked", G_CALLBACK (gtk_widget_hide), widget);
widget = (GtkWidget *)gtk_builder_get_object (builder, "open_menubutton");
g_object_set_data (G_OBJECT (window), "open_menubutton", widget);
widget = (GtkWidget *)gtk_builder_get_object (builder, "record_button");
g_object_set_data (G_OBJECT (window), "record_button", widget);
widget = (GtkWidget *)gtk_builder_get_object (builder, "lockbox");
widget2 = (GtkWidget *)gtk_builder_get_object (builder, "lockbutton");
g_object_set_data (G_OBJECT (window), "lockbutton", widget2);
permission = g_object_new (g_test_permission_get_type (), NULL);
g_object_bind_property (permission, "allowed",
widget, "sensitive",
G_BINDING_SYNC_CREATE);
action = g_action_map_lookup_action (G_ACTION_MAP (window), "open");
g_object_bind_property (permission, "allowed",
action, "enabled",
G_BINDING_SYNC_CREATE);
action = g_action_map_lookup_action (G_ACTION_MAP (window), "record");
g_object_bind_property (permission, "allowed",
action, "enabled",
G_BINDING_SYNC_CREATE);
gtk_lock_button_set_permission (GTK_LOCK_BUTTON (widget2), permission);
g_object_unref (permission);
@@ -9,4 +9,7 @@
<gresource prefix="/org/gtk/WidgetFactory/gtk">
<file preprocess="xml-stripblanks">menus.ui</file>
</gresource>
<gresource prefix="/org/gtk/WidgetFactory/gtk">
<file preprocess="xml-stripblanks">help-overlay.ui</file>
</gresource>
</gresources>
+10 -1
View File
@@ -2485,6 +2485,15 @@ microphone-sensitivity-medium-symbolic</property>
<property name="action_name">win.statusbar</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="bgmenuitem">
<property name="label">_Select Background</property>
<property name="visible">1</property>
<property name="use_action_appearance">0</property>
<property name="use_underline">1</property>
<property name="action_name">win.background</property>
</object>
</child>
</object>
</child>
</object>
@@ -2902,7 +2911,7 @@ microphone-sensitivity-medium-symbolic</property>
<property name="halign">start</property>
<property name="spacing">6</property>
<child>
<object class="GtkMenuButton">
<object class="GtkMenuButton" id="open_menubutton">
<property name="visible">1</property>
<property name="halign">center</property>
<property name="popover">open_popover</property>
+4
View File
@@ -101,6 +101,10 @@
<title>Index of new symbols in 3.18</title>
<xi:include href="xml/api-index-3.18.xml"><xi:fallback /></xi:include>
</index>
<index id="api-index-3-20" role="3.20">
<title>Index of new symbols in 3.20</title>
<xi:include href="xml/api-index-3.20.xml"><xi:fallback /></xi:include>
</index>
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
+1
View File
@@ -631,6 +631,7 @@ GdkPoint
GdkRectangle
gdk_rectangle_intersect
gdk_rectangle_union
gdk_rectangle_equal
<SUBSECTION Private>
gdk_rectangle_get_type
+8 -3
View File
@@ -315,7 +315,8 @@ content_files = \
input-handling.xml \
visual_index.xml \
getting_started.xml \
overview.xml
overview.xml \
gtk-query-settings.xml
expand_content_files = \
compiling.sgml \
@@ -469,7 +470,10 @@ HTML_IMAGES = \
$(srcdir)/images/getting-started-app10.png \
$(srcdir)/images/exampleapp.png \
$(srcdir)/images/flow-box.png \
$(srcdir)/images/inspector.png
$(srcdir)/images/inspector.png \
$(srcdir)/images/gedit-shortcuts.png \
$(srcdir)/images/clocks-shortcuts.png \
$(srcdir)/images/builder-shortcuts.png
if ENABLE_DOC_CROSS_REFERENCES
# Extra options to supply to gtkdoc-fixref
@@ -499,7 +503,8 @@ man_MANS = \
gtk3-widget-factory.1 \
gtk3-icon-browser.1 \
broadwayd.1 \
gtk-builder-tool.1
gtk-builder-tool.1 \
gtk-query-settings.1
if ENABLE_MAN
+16
View File
@@ -203,6 +203,7 @@
<xi:include href="xml/gtkcolorchooserdialog.xml" />
<xi:include href="xml/gtkfilechooser.xml" />
<xi:include href="xml/gtkfilechooserbutton.xml" />
<xi:include href="xml/gtkfilechoosernative.xml" />
<xi:include href="xml/gtkfilechooserdialog.xml" />
<xi:include href="xml/gtkfilechooserwidget.xml" />
<xi:include href="xml/gtkfilefilter.xml" />
@@ -239,6 +240,15 @@
<xi:include href="xml/gtkpagesetupunixdialog.xml" />
</chapter>
<chapter id="ShortcutsOverview">
<title>Shortcuts Overview</title>
<xi:include href="xml/gtkshortcutswindow.xml" />
<xi:include href="xml/gtkshortcutssection.xml" />
<xi:include href="xml/gtkshortcutsgroup.xml" />
<xi:include href="xml/gtkshortcutsshortcut.xml" />
<xi:include href="xml/gtkshortcutsgesture.xml" />
</chapter>
<chapter id="MiscObjects">
<title>Miscellaneous</title>
<xi:include href="xml/gtkadjustment.xml" />
@@ -263,6 +273,7 @@
<xi:include href="xml/gtkmenushell.xml" />
<xi:include href="xml/gtkrange.xml" />
<xi:include href="xml/gtkimcontext.xml" />
<xi:include href="xml/gtknativedialog.xml" />
</chapter>
<chapter id="PlugSocket">
@@ -406,6 +417,7 @@
<xi:include href="gtk-encode-symbolic-svg.xml" />
<xi:include href="gtk-builder-tool.xml" />
<xi:include href="gtk-launch.xml" />
<xi:include href="gtk-query-settings.xml" />
<xi:include href="broadwayd.xml" />
</part>
@@ -472,6 +484,10 @@
<title>Index of new symbols in 3.18</title>
<xi:include href="xml/api-index-3.18.xml"><xi:fallback /></xi:include>
</index>
<index id="api-index-3-20" role="3.20">
<title>Index of new symbols in 3.20</title>
<xi:include href="xml/api-index-3.20.xml"><xi:fallback /></xi:include>
</index>
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
+45
View File
@@ -0,0 +1,45 @@
<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
]>
<refentry id="gtk-query-settings">
<refentryinfo>
<title>gtk-query-settings</title>
<productname>GTK+</productname>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Timm</firstname>
<surname>Bäder</surname>
</author>
</authorgroup>
</refentryinfo>
<refmeta>
<refentrytitle>gtk-query-settings</refentrytitle>
<manvolnum>1</manvolnum>
<refmiscinfo class="manual">User Commands</refmiscinfo>
</refmeta>
<refnamediv>
<refname>gtk-query-settings</refname>
<refpurpose>Utility to print name and value of all GtkSettings properties</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>gtk-query-settings</command>
<arg choice="opt"><replaceable>PATTERN</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1><title>Description</title>
<para>
<command>gtk-query-settings</command> prints both name and value of all properties
available in the GtkSettings class. Optionally, you can filter which properties
to list by specifying a PATTERN.
</para>
</refsect1>
</refentry>
+120
View File
@@ -1432,6 +1432,25 @@ gtk_file_chooser_error_quark
gtk_file_chooser_get_type
</SECTION>
<SECTION>
<FILE>gtkfilechoosernative</FILE>
<TITLE>GtkFileChooserNative</TITLE>
gtk_file_chooser_native_new
gtk_file_chooser_native_get_accept_label
gtk_file_chooser_native_set_accept_label
gtk_file_chooser_native_get_cancel_label
gtk_file_chooser_native_set_cancel_label
<SUBSECTION Standard>
GTK_FILE_CHOOSER_NATIVE
GTK_IS_FILE_CHOOSER_NATIVE
GTK_TYPE_FILE_CHOOSER_NATIVE
GTK_FILE_CHOOSER_NATIVE_CLASS
GTK_IS_FILE_CHOOSER_NATIVE_CLASS
GTK_FILE_CHOOSER_NATIVE_GET_CLASS
<SUBSECTION Private>
gtk_file_chooser_native_get_type
</SECTION>
<SECTION>
<FILE>gtkfilechooserdialog</FILE>
<TITLE>GtkFileChooserDialog</TITLE>
@@ -2493,6 +2512,27 @@ GtkMiscPrivate
gtk_misc_get_type
</SECTION>
<SECTION>
<FILE>gtknativedialog</FILE>
<TITLE>GtkNativeDialog</TITLE>
GTK_TYPE_NATIVE_DIALOG
GtkNativeDialogClass
gtk_native_dialog_show
gtk_native_dialog_hide
gtk_native_dialog_get_visible
gtk_native_dialog_set_modal
gtk_native_dialog_get_modal
gtk_native_dialog_set_title
gtk_native_dialog_get_title
gtk_native_dialog_set_transient_for
gtk_native_dialog_get_transient_for
gtk_native_dialog_run
<SUBSECTION Standard>
GtkNativeDialog
<SUBSECTION Private>
gtk_native_dialog_get_type
</SECTION>
<SECTION>
<FILE>gtknotebook</FILE>
<TITLE>GtkNotebook</TITLE>
@@ -3294,6 +3334,7 @@ gtk_settings_set_property_value
gtk_settings_set_string_property
gtk_settings_set_long_property
gtk_settings_set_double_property
gtk_settings_reset_property
GtkIMPreeditStyle
GtkIMStatusStyle
<SUBSECTION Standard>
@@ -3809,6 +3850,7 @@ gtk_text_tag_new
gtk_text_tag_get_priority
gtk_text_tag_set_priority
gtk_text_tag_event
gtk_text_tag_changed
GtkTextAttributes
GtkTextAppearance
gtk_text_attributes_new
@@ -5551,6 +5593,7 @@ gtk_widget_get_allocated_height
gtk_widget_get_allocation
gtk_widget_set_allocation
gtk_widget_get_allocated_baseline
gtk_widget_get_allocated_size
gtk_widget_get_clip
gtk_widget_set_clip
gtk_widget_get_app_paintable
@@ -5600,6 +5643,8 @@ gtk_widget_get_action_group
gtk_widget_get_path
gtk_widget_get_style_context
gtk_widget_reset_style
gtk_widget_class_get_css_name
gtk_widget_class_set_css_name
<SUBSECTION>
gtk_requisition_new
@@ -5945,6 +5990,7 @@ gtk_widget_path_iter_add_region
gtk_widget_path_iter_clear_classes
gtk_widget_path_iter_clear_regions
gtk_widget_path_iter_get_name
gtk_widget_path_iter_get_object_name
gtk_widget_path_iter_get_object_type
gtk_widget_path_iter_get_siblings
gtk_widget_path_iter_get_sibling_index
@@ -5960,6 +6006,7 @@ gtk_widget_path_iter_list_regions
gtk_widget_path_iter_remove_class
gtk_widget_path_iter_remove_region
gtk_widget_path_iter_set_name
gtk_widget_path_iter_set_object_name
gtk_widget_path_iter_set_object_type
gtk_widget_path_iter_set_state
gtk_widget_path_length
@@ -7543,6 +7590,8 @@ gtk_application_window_new
gtk_application_window_set_show_menubar
gtk_application_window_get_show_menubar
gtk_application_window_get_id
gtk_application_window_set_help_overlay
gtk_application_window_get_help_overlay
<SUBSECTION Standard>
GTK_TYPE_APPLICATION_WINDOW
@@ -8420,3 +8469,74 @@ GTK_IS_GL_AREA_CLASS
<SUBSECTION Private>
gtk_gl_area_get_type
</SECTION>
<SECTION>
<FILE>gtkshortcutswindow</FILE>
GtkShortcutsWindow
<SUBSECTION Standard>
GTK_TYPE_SHORTCUTS_WINDOW
GTK_SHORTCUTS_WINDOW
GTK_IS_SHORTCUTS_WINDOW
GTK_SHORTCUTS_WINDOW_CLASS
GTK_IS_SHORTCUTS_WINDOW_CLASS
GTK_GET_SHORTCUTS_WINDOW_CLASS
<SUBSECTION Private>
gtk_shortcuts_window_get_type
</SECTION>
<SECTION>
<FILE>gtkshortcutssection</FILE>
GtkShortcutsSection
<SUBSECTION Standard>
GTK_TYPE_SHORTCUTS_SECTION
GTK_SHORTCUTS_SECTION
GTK_IS_SHORTCUTS_SECTION
GTK_SHORTCUTS_SECTION_CLASS
GTK_IS_SHORTCUTS_SECTION_CLASS
GTK_GET_SHORTCUTS_SECTION_CLASS
<SUBSECTION Private>
gtk_shortcuts_section_get_type
</SECTION>
<SECTION>
<FILE>gtkshortcutsgroup</FILE>
GtkShortcutsGroup
<SUBSECTION Standard>
GTK_TYPE_SHORTCUTS_GROUP
GTK_SHORTCUTS_GROUP
GTK_IS_SHORTCUTS_GROUP
GTK_SHORTCUTS_GROUP_CLASS
GTK_IS_SHORTCUTS_GROUP_CLASS
GTK_GET_SHORTCUTS_GROUP_CLASS
<SUBSECTION Private>
gtk_shortcuts_group_get_type
</SECTION>
<SECTION>
<FILE>gtkshortcutsshortcut</FILE>
GtkShortcutsShortcut
<SUBSECTION Standard>
GTK_TYPE_SHORTCUTS_SHORTCUT
GTK_SHORTCUTS_SHORTCUT
GTK_IS_SHORTCUTS_SHORTCUT
GTK_SHORTCUTS_SHORTCUT_CLASS
GTK_IS_SHORTCUTS_SHORTCUT_CLASS
GTK_GET_SHORTCUTS_SHORTCUT_CLASS
<SUBSECTION Private>
<SUBSECTION Private>
gtk_shortcuts_shortcut_get_type
</SECTION>
<SECTION>
<FILE>gtkshortcutsgesture</FILE>
GtkShortcutsGesture
<SUBSECTION Standard>
GTK_TYPE_SHORTCUTS_GESTURE
GTK_SHORTCUTS_GESTURE
GTK_IS_SHORTCUTS_GESTURE
GTK_SHORTCUTS_GESTURE_CLASS
GTK_IS_SHORTCUTS_GESTURE_CLASS
GTK_GET_SHORTCUTS_GESTURE_CLASS
<SUBSECTION Private>
gtk_shortcuts_gesture_get_type
</SECTION>
+6 -1
View File
@@ -173,12 +173,17 @@ gtk_separator_get_type
gtk_separator_menu_item_get_type
gtk_separator_tool_item_get_type
gtk_settings_get_type
gtk_stack_sidebar_get_type
gtk_shortcuts_window_get_type
gtk_shortcuts_section_get_type
gtk_shortcuts_group_get_type
gtk_shortcuts_shortcut_get_type
gtk_shortcuts_gesture_get_type
gtk_size_group_get_type
@ENABLE_ON_X11@gtk_socket_get_type
gtk_spin_button_get_type
gtk_spinner_get_type
gtk_stack_get_type
gtk_stack_sidebar_get_type
gtk_stack_switcher_get_type
gtk_statusbar_get_type
gtk_status_icon_get_type
Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

+1
View File
@@ -144,6 +144,7 @@ static const GDebugKey gdk_gl_keys[] = {
{"software-draw-gl", GDK_GL_SOFTWARE_DRAW_GL},
{"software-draw-surface", GDK_GL_SOFTWARE_DRAW_SURFACE},
{"texture-rectangle", GDK_GL_TEXTURE_RECTANGLE},
{"legacy", GDK_GL_LEGACY},
};
#ifdef G_ENABLE_DEBUG
+21 -15
View File
@@ -63,6 +63,7 @@ enum {
static guint signals [LAST_SIGNAL] = { 0 };
static void gdk_device_finalize (GObject *object);
static void gdk_device_dispose (GObject *object);
static void gdk_device_set_property (GObject *object,
guint prop_id,
@@ -99,6 +100,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = gdk_device_finalize;
object_class->dispose = gdk_device_dispose;
object_class->set_property = gdk_device_set_property;
object_class->get_property = gdk_device_get_property;
@@ -298,6 +300,25 @@ gdk_device_init (GdkDevice *device)
device->axes = g_array_new (FALSE, TRUE, sizeof (GdkAxisInfo));
}
static void
gdk_device_finalize (GObject *object)
{
GdkDevice *device = GDK_DEVICE (object);
if (device->axes)
{
g_array_free (device->axes, TRUE);
device->axes = NULL;
}
g_clear_pointer (&device->name, g_free);
g_clear_pointer (&device->keys, g_free);
g_clear_pointer (&device->vendor_id, g_free);
g_clear_pointer (&device->product_id, g_free);
G_OBJECT_CLASS (gdk_device_parent_class)->finalize (object);
}
static void
gdk_device_dispose (GObject *object)
{
@@ -315,21 +336,6 @@ gdk_device_dispose (GObject *object)
device->associated = NULL;
}
if (device->axes)
{
g_array_free (device->axes, TRUE);
device->axes = NULL;
}
g_free (device->name);
g_free (device->keys);
device->name = NULL;
device->keys = NULL;
g_clear_pointer (&device->vendor_id, g_free);
g_clear_pointer (&device->product_id, g_free);
G_OBJECT_CLASS (gdk_device_parent_class)->dispose (object);
}
+1
View File
@@ -1501,6 +1501,7 @@ gdk_display_get_n_screens (GdkDisplay *display)
* Returns: (transfer none): the #GdkScreen object
*
* Since: 2.2
* Deprecated: 3.20: There is only one screen; use gdk_display_get_default_screen() to get it.
*/
GdkScreen *
gdk_display_get_screen (GdkDisplay *display,
+1 -1
View File
@@ -108,7 +108,7 @@ _gdk_event_queue_find_first (GdkDisplay *display)
return tmp_list;
}
tmp_list = g_list_next (tmp_list);
tmp_list = tmp_list->next;
}
return NULL;
+55 -6
View File
@@ -147,9 +147,27 @@ bind_vao (GdkGLContextPaintData *paint_data)
static void
use_texture_2d_program (GdkGLContextPaintData *paint_data)
{
static const char *vertex_shader_code =
static const char *vertex_shader_code_150 =
"#version 150\n"
"uniform sampler2D map;"
"in vec2 position;\n"
"in vec2 uv;\n"
"out vec2 vUv;\n"
"void main() {\n"
" gl_Position = vec4(position, 0, 1);\n"
" vUv = uv;\n"
"}\n";
static const char *fragment_shader_code_150 =
"#version 150\n"
"in vec2 vUv;\n"
"out vec4 vertexColor;\n"
"uniform sampler2D map;\n"
"void main() {\n"
" vertexColor = texture2D (map, vUv);\n"
"}\n";
static const char *vertex_shader_code_130 =
"#version 130\n"
"uniform sampler2D map;"
"attribute vec2 position;\n"
"attribute vec2 uv;\n"
"varying vec2 vUv;\n"
@@ -157,14 +175,21 @@ use_texture_2d_program (GdkGLContextPaintData *paint_data)
" gl_Position = vec4(position, 0, 1);\n"
" vUv = uv;\n"
"}\n";
static const char *fragment_shader_code =
"#version 150\n"
static const char *fragment_shader_code_130 =
"#version 130\n"
"varying vec2 vUv;\n"
"uniform sampler2D map;\n"
"void main() {\n"
" gl_FragColor = texture2D (map, vUv);\n"
"}\n";
const char *vertex_shader_code = paint_data->is_legacy
? vertex_shader_code_130
: vertex_shader_code_150;
const char *fragment_shader_code = paint_data->is_legacy
? fragment_shader_code_130
: fragment_shader_code_150;
if (paint_data->texture_2d_quad_program.program == 0)
make_program (&paint_data->texture_2d_quad_program, vertex_shader_code, fragment_shader_code);
@@ -178,9 +203,9 @@ use_texture_2d_program (GdkGLContextPaintData *paint_data)
static void
use_texture_rect_program (GdkGLContextPaintData *paint_data)
{
static const char *vertex_shader_code =
static const char *vertex_shader_code_150 =
"#version 150\n"
"uniform sampler2DRect map;"
"uniform sampler2DRect map;\n"
"attribute vec2 position;\n"
"attribute vec2 uv;\n"
"varying vec2 vUv;\n"
@@ -188,13 +213,37 @@ use_texture_rect_program (GdkGLContextPaintData *paint_data)
" gl_Position = vec4(position, 0, 1);\n"
" vUv = uv;\n"
"}\n";
static const char *fragment_shader_code =
static const char *fragment_shader_code_150 =
"#version 150\n"
"varying vec2 vUv;\n"
"uniform sampler2DRect map;\n"
"void main() {\n"
" gl_FragColor = texture2DRect (map, vUv);\n"
"}\n";
static const char *vertex_shader_code_130 =
"#version 130\n"
"uniform sampler2DRect map;\n"
"attribute vec2 position;\n"
"attribute vec2 uv;\n"
"varying vec2 vUv;\n"
"void main() {\n"
" gl_Position = vec4(position, 0, 1);\n"
" vUv = uv;\n"
"}\n";
static const char *fragment_shader_code_130 =
"#version 130\n"
"varying vec2 vUv;\n"
"uniform sampler2DRect map;\n"
"void main() {\n"
" gl_FragColor = texture2DRect (map, vUv);\n"
"}\n";
const char *vertex_shader_code = paint_data->is_legacy
? vertex_shader_code_130
: vertex_shader_code_150;
const char *fragment_shader_code = paint_data->is_legacy
? fragment_shader_code_130
: fragment_shader_code_150;
if (paint_data->texture_rect_quad_program.program == 0)
make_program (&paint_data->texture_rect_quad_program, vertex_shader_code, fragment_shader_code);
+50 -1
View File
@@ -103,6 +103,7 @@ typedef struct {
guint extensions_checked : 1;
guint debug_enabled : 1;
guint forward_compatible : 1;
guint is_legacy : 1;
GdkGLContextPaintData *paint_data;
} GdkGLContextPrivate;
@@ -344,7 +345,10 @@ gdk_gl_context_get_paint_data (GdkGLContext *context)
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
if (priv->paint_data == NULL)
priv->paint_data = g_new0 (GdkGLContextPaintData, 1);
{
priv->paint_data = g_new0 (GdkGLContextPaintData, 1);
priv->paint_data->is_legacy = priv->is_legacy;
}
return priv->paint_data;
}
@@ -554,6 +558,51 @@ gdk_gl_context_get_required_version (GdkGLContext *context,
*minor = min;
}
/**
* gdk_gl_context_is_legacy:
* @context: a #GdkGLContext
*
* Whether the #GdkGLContext is in legacy mode or not.
*
* The #GdkGLContext must be realized before calling this function.
*
* When realizing a GL context, GDK will try to use the OpenGL 3.2 core
* profile; this profile removes all the OpenGL API that was deprecated
* prior to the 3.2 version of the specification. If the realization is
* successful, this function will return %FALSE.
*
* If the underlying OpenGL implementation does not support core profiles,
* GDK will fall back to a pre-3.2 compatibility profile, and this function
* will return %TRUE.
*
* You can use the value returned by this function to decide which kind
* of OpenGL API to use, or whether to do extension discovery, or what
* kind of shader programs to load.
*
* Returns: %TRUE if the GL context is in legacy mode
*
* Since: 3.20
*/
gboolean
gdk_gl_context_is_legacy (GdkGLContext *context)
{
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
g_return_val_if_fail (GDK_IS_GL_CONTEXT (context), FALSE);
g_return_val_if_fail (priv->realized, FALSE);
return priv->is_legacy;
}
void
gdk_gl_context_set_is_legacy (GdkGLContext *context,
gboolean is_legacy)
{
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
priv->is_legacy = !!is_legacy;
}
/**
* gdk_gl_context_realize:
* @context: a #GdkGLContext
+2
View File
@@ -52,6 +52,8 @@ GDK_AVAILABLE_IN_3_16
void gdk_gl_context_get_version (GdkGLContext *context,
int *major,
int *minor);
GDK_AVAILABLE_IN_3_20
gboolean gdk_gl_context_is_legacy (GdkGLContext *context);
GDK_AVAILABLE_IN_3_16
void gdk_gl_context_set_required_version (GdkGLContext *context,
+5
View File
@@ -67,8 +67,13 @@ typedef struct {
GdkGLContextProgram texture_rect_quad_program;
GdkGLContextProgram *current_program;
guint is_legacy : 1;
} GdkGLContextPaintData;
void gdk_gl_context_set_is_legacy (GdkGLContext *context,
gboolean is_legacy);
void gdk_gl_context_upload_texture (GdkGLContext *context,
cairo_surface_t *image_surface,
int width,
+2 -1
View File
@@ -99,7 +99,8 @@ typedef enum {
GDK_GL_ALWAYS = 1 << 1,
GDK_GL_SOFTWARE_DRAW_GL = 1 << 2,
GDK_GL_SOFTWARE_DRAW_SURFACE = 1 << 3,
GDK_GL_TEXTURE_RECTANGLE = 1 << 4
GDK_GL_TEXTURE_RECTANGLE = 1 << 4,
GDK_GL_LEGACY = 1 << 5
} GdkGLFlags;
extern GList *_gdk_default_filters;
+21
View File
@@ -27,6 +27,7 @@
#include "gdkkeys.h"
#include "gdktypes.h"
#include <locale.h>
/* Thanks to Markus G. Kuhn <mkuhn@acm.org> for the ksysym<->Unicode
* mapping functions, from the xterm sources.
@@ -872,6 +873,23 @@ static const struct {
#endif
};
static gunichar
get_decimal_point (void)
{
struct lconv *locale_data;
const gchar *decimal_point;
gunichar ret;
locale_data = localeconv ();
decimal_point = locale_data->decimal_point;
ret = g_utf8_get_char_validated (decimal_point, -1);
if (ret != (gunichar)-2 && ret != (gunichar)-1)
return ret;
return (gunichar) '.';
}
/**
* gdk_keyval_to_unicode:
* @keyval: a GDK key symbol
@@ -899,6 +917,9 @@ gdk_keyval_to_unicode (guint keyval)
if ((keyval & 0xff000000) == 0x01000000)
return keyval & 0x00ffffff;
if (keyval == 0xffae)
return (guint32) get_decimal_point ();
/* binary search in table */
while (max >= min) {
mid = (min + max) / 2;
+12 -4
View File
@@ -47,8 +47,8 @@
* @window: Source window
* @src_x: Source X coordinate within @window
* @src_y: Source Y coordinate within @window
* @width: Width in pixels of region to get
* @height: Height in pixels of region to get
* @width: Width in logical pixels of region to get
* @height: Height in logical pixels of region to get
*
* Transfers image data from a #GdkWindow and converts it to an RGB(A)
* representation inside a #GdkPixbuf. In other words, copies
@@ -88,10 +88,13 @@ gdk_pixbuf_get_from_window (GdkWindow *src,
{
cairo_surface_t *surface;
GdkPixbuf *dest;
gint scale;
g_return_val_if_fail (GDK_IS_WINDOW (src), NULL);
g_return_val_if_fail (gdk_window_is_viewable (src), NULL);
scale = gdk_window_get_scale_factor (src);
surface = _gdk_window_ref_cairo_surface (src);
/* We do not know what happened to this surface outside of GDK.
@@ -102,8 +105,8 @@ gdk_pixbuf_get_from_window (GdkWindow *src,
cairo_surface_mark_dirty (surface);
dest = gdk_pixbuf_get_from_surface (surface,
src_x, src_y,
width, height);
scale * src_x, scale * src_y,
scale * width, scale * height);
cairo_surface_destroy (surface);
return dest;
@@ -134,11 +137,16 @@ gdk_cairo_surface_coerce_to_image (cairo_surface_t *surface,
{
cairo_surface_t *copy;
cairo_t *cr;
double sx, sy;
cairo_surface_get_device_scale (surface, &sx, &sy);
copy = cairo_image_surface_create (gdk_cairo_format_for_content (content),
width,
height);
cairo_surface_set_device_scale (copy, sx, sy);
cr = cairo_create (copy);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
cairo_set_source_surface (cr, surface, -src_x, -src_y);
+21
View File
@@ -133,6 +133,27 @@ gdk_rectangle_intersect (const GdkRectangle *src1,
return return_val;
}
/**
* gdk_rectangle_equal:
* @rect1: a #GdkRectangle
* @rect2: a #GdkRectangle
*
* Checks if the two given rectangles are equal.
*
* Returns: %TRUE if the rectangles are equal.
*
* Since: 3.20
*/
gboolean
gdk_rectangle_equal (const GdkRectangle *rect1,
const GdkRectangle *rect2)
{
return rect1->x == rect2->x
&& rect1->y == rect2->y
&& rect1->width == rect2->width
&& rect1->height == rect2->height;
}
static GdkRectangle *
gdk_rectangle_copy (const GdkRectangle *rectangle)
{
+4
View File
@@ -45,6 +45,10 @@ void gdk_rectangle_union (const GdkRectangle *src1,
const GdkRectangle *src2,
GdkRectangle *dest);
GDK_AVAILABLE_IN_3_20
gboolean gdk_rectangle_equal (const GdkRectangle *rect1,
const GdkRectangle *rect2);
GDK_AVAILABLE_IN_ALL
GType gdk_rectangle_get_type (void) G_GNUC_CONST;
+1 -1
View File
@@ -366,7 +366,7 @@ gdk_rgba_to_string (const GdkRGBA *rgba)
{
gchar alpha[G_ASCII_DTOSTR_BUF_SIZE];
g_ascii_dtostr (alpha, G_ASCII_DTOSTR_BUF_SIZE, CLAMP (rgba->alpha, 0, 1));
g_ascii_formatd (alpha, G_ASCII_DTOSTR_BUF_SIZE, "%g", CLAMP (rgba->alpha, 0, 1));
return g_strdup_printf ("rgba(%d,%d,%d,%s)",
(int)(0.5 + CLAMP (rgba->red, 0., 1.) * 255.),
+1 -1
View File
@@ -1095,7 +1095,7 @@ gdk_screen_get_setting (GdkScreen *screen,
* on very high density outputs this can be a higher value (often 2).
*
* This can be used if you want to create pixel based data for a
* particula monitor, but most of the time youre drawing to a window
* particular monitor, but most of the time youre drawing to a window
* where it is better to use gdk_window_get_scale_factor() instead.
*
* Since: 3.10
+24
View File
@@ -152,6 +152,16 @@
*/
#define GDK_VERSION_3_18 (G_ENCODE_VERSION (3, 18))
/**
* GDK_VERSION_3_20:
*
* A macro that evaluates to the 3.20 version of GDK, in a format
* that can be used by the C pre-processor.
*
* Since: 3.18
*/
#define GDK_VERSION_3_20 (G_ENCODE_VERSION (3, 20))
/* evaluates to the current stable version; for development cycles,
* this means the next stable target
*/
@@ -364,5 +374,19 @@
# define GDK_AVAILABLE_IN_3_18 _GDK_EXTERN
#endif
#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_20
# define GDK_DEPRECATED_IN_3_20 GDK_DEPRECATED
# define GDK_DEPRECATED_IN_3_20_FOR(f) GDK_DEPRECATED_FOR(f)
#else
# define GDK_DEPRECATED_IN_3_20 _GDK_EXTERN
# define GDK_DEPRECATED_IN_3_20_FOR(f) _GDK_EXTERN
#endif
#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_20
# define GDK_AVAILABLE_IN_3_20 GDK_UNAVAILABLE(3, 20)
#else
# define GDK_AVAILABLE_IN_3_20 _GDK_EXTERN
#endif
#endif /* __GDK_VERSION_MACROS_H__ */
+3 -3
View File
@@ -7712,8 +7712,8 @@ find_common_ancestor (GdkWindow *win1,
while (list1 && list2 && (list1->data == list2->data))
{
tmp = list1->data;
list1 = g_list_next (list1);
list2 = g_list_next (list2);
list1 = list1->next;
list2 = list2->next;
}
g_list_free (path1);
g_list_free (path2);
@@ -8083,7 +8083,7 @@ _gdk_synthesize_crossing_events (GdkDisplay *display,
while (list)
{
win = list->data;
list = g_list_next (list);
list = list->next;
if (list)
next = list->data;
else
+60 -1
View File
@@ -91,6 +91,63 @@ _gdk_mir_print_key_event (const MirInputEvent *event)
g_printerr (" Event Time %lli\n", (long long int) mir_input_event_get_event_time (event));
}
static void
_gdk_mir_print_touch_event (const MirInputEvent *event)
{
const MirTouchEvent *touch_event = mir_input_event_get_touch_event (event);
guint i;
guint n;
if (!touch_event)
return;
g_printerr ("TOUCH\n");
g_printerr (" Device %lld\n", (long long int) mir_input_event_get_device_id (event));
g_printerr (" Cookie %lu %lu\n", mir_touch_event_get_cookie (touch_event).timestamp, mir_touch_event_get_cookie (touch_event).mac);
g_printerr (" Event Time %lld\n", (long long int) mir_input_event_get_event_time (event));
_gdk_mir_print_modifiers (mir_touch_event_modifiers (touch_event));
n = mir_touch_event_point_count (touch_event);
for (i = 0; i < n; i++)
{
g_printerr (" [%u] (%u/%u) ", mir_touch_event_id (touch_event, i), i + 1, n);
switch (mir_touch_event_action (touch_event, i))
{
case mir_touch_action_down:
g_printerr ("Down");
break;
case mir_touch_action_up:
g_printerr ("Up");
break;
case mir_touch_action_change:
g_printerr ("Change");
break;
default:
g_printerr ("%u", mir_touch_event_action (touch_event, i));
break;
}
switch (mir_touch_event_tooltype (touch_event, i))
{
case mir_touch_tooltype_unknown:
g_printerr (" ? ");
break;
case mir_touch_tooltype_finger:
g_printerr (" finger ");
break;
case mir_touch_tooltype_stylus:
g_printerr (" stylus ");
break;
}
g_printerr ("\n x: %f y: %f P: %f A: %f B: %f d: %f\n",
mir_touch_event_axis_value (touch_event, i, mir_touch_axis_x),
mir_touch_event_axis_value (touch_event, i, mir_touch_axis_y),
mir_touch_event_axis_value (touch_event, i, mir_touch_axis_pressure),
mir_touch_event_axis_value (touch_event, i, mir_touch_axis_touch_major),
mir_touch_event_axis_value (touch_event, i, mir_touch_axis_touch_minor),
mir_touch_event_axis_value (touch_event, i, mir_touch_axis_size));
}
}
void
_gdk_mir_print_motion_event (const MirInputEvent *event)
{
@@ -138,6 +195,8 @@ _gdk_mir_print_motion_event (const MirInputEvent *event)
g_printerr ("\n");
g_printerr (" Offset (%f, %f)\n", mir_pointer_event_axis_value (pointer_event, mir_pointer_axis_x),
mir_pointer_event_axis_value (pointer_event, mir_pointer_axis_y));
g_printerr (" Scroll (%f, %f)\n", mir_pointer_event_axis_value (pointer_event, mir_pointer_axis_hscroll),
mir_pointer_event_axis_value (pointer_event, mir_pointer_axis_vscroll));
g_printerr (" Event Time %lli\n", (long long int) mir_input_event_get_event_time (event));
}
@@ -197,7 +256,7 @@ _gdk_mir_print_event (const MirEvent *event)
_gdk_mir_print_key_event (mir_event_get_input_event (event));
break;
case mir_input_event_type_touch:
_gdk_mir_print_motion_event (mir_event_get_input_event (event));
_gdk_mir_print_touch_event (mir_event_get_input_event (event));
break;
case mir_input_event_type_pointer:
_gdk_mir_print_motion_event (mir_event_get_input_event (event));
+14 -9
View File
@@ -539,12 +539,19 @@ get_pixel_formats (MirConnection *connection,
{
*sw_pixel_format = mir_pixel_format_invalid;
for (i = 0; i < n_formats; i++)
for (i = 0; i < n_formats && *sw_pixel_format == mir_pixel_format_invalid; i++)
{
if (formats[i] == mir_pixel_format_argb_8888)
switch (formats[i])
{
case mir_pixel_format_abgr_8888:
case mir_pixel_format_xbgr_8888:
case mir_pixel_format_argb_8888:
case mir_pixel_format_xrgb_8888:
case mir_pixel_format_rgb_565:
*sw_pixel_format = formats[i];
break;
default:
break;
}
}
}
@@ -553,22 +560,20 @@ get_pixel_formats (MirConnection *connection,
{
*hw_pixel_format = mir_pixel_format_invalid;
for (i = 0; i < n_formats; i++)
for (i = 0; i < n_formats && *hw_pixel_format == mir_pixel_format_invalid; i++)
{
switch (formats[i])
{
{
case mir_pixel_format_abgr_8888:
case mir_pixel_format_xbgr_8888:
case mir_pixel_format_argb_8888:
case mir_pixel_format_xrgb_8888:
case mir_pixel_format_rgb_565:
*hw_pixel_format = formats[i];
break;
default:
continue;
}
if (*hw_pixel_format != mir_pixel_format_invalid)
break;
break;
}
}
}
}
+41 -2
View File
@@ -54,7 +54,7 @@ send_event (GdkWindow *window, GdkDevice *device, GdkEvent *event)
gdk_event_set_device (event, device);
gdk_event_set_source_device (event, device);
gdk_event_set_screen (event, gdk_display_get_screen (gdk_window_get_display (window), 0));
gdk_event_set_screen (event, gdk_display_get_default_screen (gdk_window_get_display (window)));
event->any.window = g_object_ref (window);
display = gdk_window_get_display (window);
@@ -298,6 +298,45 @@ handle_key_event (GdkWindow *window, const MirInputEvent *event)
}
}
static void
handle_touch_event (GdkWindow *window,
const MirTouchEvent *mir_touch_event)
{
const MirInputEvent *mir_input_event = mir_touch_event_input_event (mir_touch_event);
guint n = mir_touch_event_point_count (mir_touch_event);
GdkEvent *gdk_event;
guint i;
for (i = 0; i < n; i++)
{
switch (mir_touch_event_action (mir_touch_event, i))
{
case mir_touch_action_up:
gdk_event = gdk_event_new (GDK_TOUCH_END);
break;
case mir_touch_action_down:
gdk_event = gdk_event_new (GDK_TOUCH_BEGIN);
break;
case mir_touch_action_change:
gdk_event = gdk_event_new (GDK_TOUCH_UPDATE);
break;
}
gdk_event->touch.window = window;
gdk_event->touch.sequence = GINT_TO_POINTER (mir_touch_event_id (mir_touch_event, i));
gdk_event->touch.time = mir_input_event_get_event_time (mir_input_event);
gdk_event->touch.state = get_modifier_state (mir_touch_event_modifiers (mir_touch_event), 0);
gdk_event->touch.x = mir_touch_event_axis_value (mir_touch_event, i, mir_touch_axis_x);
gdk_event->touch.y = mir_touch_event_axis_value (mir_touch_event, i, mir_touch_axis_y);
gdk_event->touch.x_root = mir_touch_event_axis_value (mir_touch_event, i, mir_touch_axis_x);
gdk_event->touch.y_root = mir_touch_event_axis_value (mir_touch_event, i, mir_touch_axis_y);
gdk_event->touch.emulating_pointer = TRUE;
_gdk_event_set_pointer_emulated (gdk_event, TRUE);
send_event (window, get_pointer (window), gdk_event);
}
}
static guint
get_button_state (const MirPointerEvent *event)
{
@@ -515,7 +554,7 @@ gdk_mir_event_source_queue_event (GdkDisplay *display,
handle_key_event (window, input_event);
break;
case mir_input_event_type_touch:
handle_motion_event (window, input_event);
handle_touch_event (window, mir_input_event_get_touch_event (input_event));
break;
case mir_input_event_type_pointer:
handle_motion_event (window, input_event);
+38 -3
View File
@@ -280,12 +280,12 @@ send_event (GdkWindow *window, GdkDevice *device, GdkEvent *event)
GdkDisplay *display;
GList *node;
display = gdk_window_get_display (window);
gdk_event_set_device (event, device);
gdk_event_set_source_device (event, device);
gdk_event_set_screen (event, gdk_display_get_screen (gdk_window_get_display (window), 0));
gdk_event_set_screen (event, gdk_display_get_default_screen (display));
event->any.window = g_object_ref (window);
display = gdk_window_get_display (window);
node = _gdk_event_queue_append (display, event);
_gdk_windowing_got_event (display, node, event, _gdk_display_get_next_serial (display));
}
@@ -423,7 +423,42 @@ gdk_mir_window_impl_ref_cairo_surface (GdkWindow *window)
ensure_surface (window);
mir_buffer_stream_get_graphics_region (mir_surface_get_buffer_stream (impl->surface), &region);
g_assert (region.pixel_format == mir_pixel_format_argb_8888);
switch (region.pixel_format)
{
case mir_pixel_format_abgr_8888:
g_warning ("pixel format ABGR 8888 not supported, using ARGB 8888");
pixel_format = CAIRO_FORMAT_ARGB32;
break;
case mir_pixel_format_xbgr_8888:
g_warning ("pixel format XBGR 8888 not supported, using XRGB 8888");
pixel_format = CAIRO_FORMAT_RGB24;
break;
case mir_pixel_format_argb_8888:
pixel_format = CAIRO_FORMAT_ARGB32;
break;
case mir_pixel_format_xrgb_8888:
pixel_format = CAIRO_FORMAT_RGB24;
break;
case mir_pixel_format_bgr_888:
g_error ("pixel format BGR 888 not supported");
break;
case mir_pixel_format_rgb_888:
g_error ("pixel format RGB 888 not supported");
break;
case mir_pixel_format_rgb_565:
pixel_format = CAIRO_FORMAT_RGB16_565;
break;
case mir_pixel_format_rgba_5551:
g_error ("pixel format RGBA 5551 not supported");
break;
case mir_pixel_format_rgba_4444:
g_error ("pixel format RGBA 4444 not supported");
break;
default:
g_error ("unknown pixel format");
break;
}
cairo_surface = cairo_image_surface_create_for_data ((unsigned char *) region.vaddr,
pixel_format,
+1 -1
View File
@@ -300,7 +300,7 @@ _gdk_quartz_display_get_cursor_for_surface (GdkDisplay *display,
}
#define CUSTOM_CURSOR_CTOR(name, id) \
+ (instancetype)name \
+ (gdkCoreCursor *)name \
{ \
gdkCoreCursor *obj; \
obj = [self new]; \
+7 -8
View File
@@ -881,7 +881,7 @@ pointer_handle_enter (void *data,
event->crossing.subwindow = NULL;
event->crossing.time = (guint32)(g_get_monotonic_time () / 1000);
event->crossing.mode = GDK_CROSSING_NORMAL;
event->crossing.detail = GDK_NOTIFY_ANCESTOR;
event->crossing.detail = GDK_NOTIFY_NONLINEAR;
event->crossing.focus = TRUE;
event->crossing.state = 0;
@@ -928,7 +928,7 @@ pointer_handle_leave (void *data,
event->crossing.subwindow = NULL;
event->crossing.time = (guint32)(g_get_monotonic_time () / 1000);
event->crossing.mode = GDK_CROSSING_NORMAL;
event->crossing.detail = GDK_NOTIFY_ANCESTOR;
event->crossing.detail = GDK_NOTIFY_NONLINEAR;
event->crossing.focus = TRUE;
event->crossing.state = 0;
@@ -1191,15 +1191,14 @@ keyboard_handle_leave (void *data,
GdkEvent *event;
GdkWaylandDisplay *display = GDK_WAYLAND_DISPLAY (device->display);
if (!surface)
return;
if (!GDK_IS_WINDOW (wl_surface_get_user_data (surface)))
return;
if (!device->keyboard_focus)
return;
/* gdk_window_is_destroyed() might already return TRUE for
* device->keyboard_focus here, which would happen if we destroyed the
* window before loosing keyboard focus.
*/
stop_key_repeat (device);
_gdk_wayland_display_update_serial (display, serial);
+30 -5
View File
@@ -114,12 +114,14 @@ gdk_wayland_gl_context_realize (GdkGLContext *context,
EGLContext ctx;
EGLint context_attribs[N_EGL_ATTRS];
int major, minor, flags;
gboolean debug_bit, forward_bit;
gboolean debug_bit, forward_bit, legacy_bit;
int i = 0;
gdk_gl_context_get_required_version (context, &major, &minor);
debug_bit = gdk_gl_context_get_debug_enabled (context);
forward_bit = gdk_gl_context_get_forward_compatible (context);
legacy_bit = (_gdk_gl_flags & GDK_GL_LEGACY) != 0 ||
(share != NULL && gdk_gl_context_is_legacy (share));
flags = 0;
@@ -128,15 +130,17 @@ gdk_wayland_gl_context_realize (GdkGLContext *context,
if (forward_bit)
flags |= EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR;
/* We want a core profile */
/* We want a core profile, unless in legacy mode */
context_attribs[i++] = EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR;
context_attribs[i++] = EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR;
context_attribs[i++] = legacy_bit
? EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR
: EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR;
/* Specify the version */
context_attribs[i++] = EGL_CONTEXT_MAJOR_VERSION_KHR;
context_attribs[i++] = major;
context_attribs[i++] = legacy_bit ? 3 : major;
context_attribs[i++] = EGL_CONTEXT_MINOR_VERSION_KHR;
context_attribs[i++] = minor;
context_attribs[i++] = legacy_bit ? 0 : minor;
/* Specify the flags */
context_attribs[i++] = EGL_CONTEXT_FLAGS_KHR;
@@ -150,6 +154,25 @@ gdk_wayland_gl_context_realize (GdkGLContext *context,
share != NULL ? GDK_WAYLAND_GL_CONTEXT (share)->egl_context
: EGL_NO_CONTEXT,
context_attribs);
/* If context creation failed without the legacy bit, let's try again with it */
if (ctx == NULL && !legacy_bit)
{
/* Ensure that re-ordering does not break the offsets */
g_assert (context_attribs[0] == EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR);
context_attribs[1] = EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR;
context_attribs[3] = 3;
context_attribs[5] = 0;
legacy_bit = TRUE;
ctx = eglCreateContext (display_wayland->egl_display,
context_wayland->egl_config,
share != NULL ? GDK_WAYLAND_GL_CONTEXT (share)->egl_context
: EGL_NO_CONTEXT,
context_attribs);
}
if (ctx == NULL)
{
g_set_error_literal (error, GDK_GL_ERROR,
@@ -162,6 +185,8 @@ gdk_wayland_gl_context_realize (GdkGLContext *context,
context_wayland->egl_context = ctx;
gdk_gl_context_set_is_legacy (context, legacy_bit);
return TRUE;
}
+125 -30
View File
@@ -888,9 +888,6 @@ gdk_wayland_window_create_subsurface (GdkWindow *window)
GdkWindowImplWayland *impl, *parent_impl = NULL;
GdkWaylandDisplay *display_wayland;
if (GDK_WINDOW_TYPE (window) != GDK_WINDOW_SUBSURFACE)
return;
impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
if (!impl->surface)
@@ -1209,13 +1206,88 @@ find_grab_input_seat (GdkWindow *window, GdkWindow *transient_for)
static gboolean
should_be_mapped (GdkWindow *window)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
/* Don't map crazy temp that GTK+ uses for internal X11 shenanigans. */
if (window->window_type == GDK_WINDOW_TEMP && window->x < 0 && window->y < 0)
return FALSE;
if (impl->hint == GDK_WINDOW_TYPE_HINT_DND)
return FALSE;
return TRUE;
}
static gboolean
should_map_as_subsurface (GdkWindow *window)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_SUBSURFACE)
return TRUE;
switch (impl->hint)
{
case GDK_WINDOW_TYPE_HINT_TOOLTIP:
return TRUE;
case GDK_WINDOW_TYPE_HINT_UTILITY:
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP)
return TRUE;
break;
default:
break;
}
return FALSE;
}
static gboolean
should_map_as_popup (GdkWindow *window)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
switch (impl->hint)
{
case GDK_WINDOW_TYPE_HINT_POPUP_MENU:
case GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU:
case GDK_WINDOW_TYPE_HINT_COMBO:
return TRUE;
case GDK_WINDOW_TYPE_HINT_UTILITY:
if (GDK_WINDOW_TYPE (window) != GDK_WINDOW_TEMP)
return TRUE;
break;
default:
break;
}
return FALSE;
}
/* Get the window that can be used as a parent for a popup, i.e. a xdg_surface
* or xdg_popup. If the window is not, traverse up the transiency parents until
* we find one.
*/
static GdkWindow *
get_popup_parent (GdkWindow *window)
{
do
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
if (impl->xdg_popup || impl->xdg_surface)
return window;
window = impl->transient_for;
}
while (window);
return NULL;
}
static void
gdk_wayland_window_map (GdkWindow *window)
{
@@ -1225,8 +1297,22 @@ gdk_wayland_window_map (GdkWindow *window)
if (!should_be_mapped (window))
return;
if (!impl->mapped && !impl->use_custom_surface)
if (impl->mapped || impl->use_custom_surface)
return;
if (should_map_as_subsurface (window))
{
if (impl->transient_for)
gdk_wayland_window_create_subsurface (window);
else
g_warning ("Couldn't map as window %p as susburface yet because it doesn't have a parent",
window);
}
else if (should_map_as_popup (window))
{
gboolean create_fallback = FALSE;
struct wl_seat *grab_input_seat;
/* Popup menus can appear without a transient parent, which means they
* cannot be positioned properly on Wayland. This attempts to guess the
* surface they should be positioned with by finding the surface beneath
@@ -1266,6 +1352,8 @@ gdk_wayland_window_map (GdkWindow *window)
if (transient_for)
transient_for = gdk_window_get_toplevel (transient_for);
if (transient_for)
transient_for = get_popup_parent (transient_for);
/* If the position was not explicitly set, start the popup at the
* position of the device that holds the grab.
@@ -1276,31 +1364,45 @@ gdk_wayland_window_map (GdkWindow *window)
&window->x, &window->y, NULL);
}
else
transient_for = impl->transient_for;
transient_for = get_popup_parent (impl->transient_for);
if (transient_for &&
GDK_WINDOW_TYPE (window) != GDK_WINDOW_SUBSURFACE)
if (!transient_for)
{
struct wl_seat *grab_input_seat = find_grab_input_seat (window, transient_for);
if (grab_input_seat &&
(impl->hint == GDK_WINDOW_TYPE_HINT_POPUP_MENU ||
impl->hint == GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU ||
impl->hint == GDK_WINDOW_TYPE_HINT_COMBO))
g_warning ("Couldn't map as window %p as popup because it doesn't have a parent",
window);
create_fallback = TRUE;
}
else
{
grab_input_seat = find_grab_input_seat (window, transient_for);
if (!grab_input_seat)
{
gdk_wayland_window_create_xdg_popup (window,
transient_for,
grab_input_seat);
goto mapped;
g_warning ("Couldn't map window %p as popup because no grabbed seat found",
window);
create_fallback = TRUE;
}
}
if (impl->hint != GDK_WINDOW_TYPE_HINT_DND &&
GDK_WINDOW_TYPE (window) != GDK_WINDOW_SUBSURFACE)
gdk_wayland_window_create_xdg_surface (window);
mapped:
impl->mapped = TRUE;
if (!create_fallback)
{
gdk_wayland_window_create_xdg_popup (window,
transient_for,
grab_input_seat);
}
else
{
gdk_wayland_window_create_xdg_surface (window);
}
}
else
{
gdk_wayland_window_create_xdg_surface (window);
}
impl->mapped = TRUE;
}
static void
@@ -1312,9 +1414,6 @@ gdk_wayland_window_show (GdkWindow *window,
if (!impl->surface)
gdk_wayland_window_create_surface (window);
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_SUBSURFACE)
gdk_wayland_window_create_subsurface (window);
gdk_wayland_window_map (window);
_gdk_make_event (window, GDK_MAP, NULL, FALSE);
@@ -1846,7 +1945,7 @@ gdk_wayland_window_set_transient_for (GdkWindow *window,
gdk_wayland_window_sync_parent (window);
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_SUBSURFACE &&
if (should_map_as_subsurface (window) &&
parent && gdk_window_is_visible (window))
gdk_wayland_window_create_subsurface (window);
}
@@ -2288,10 +2387,6 @@ gdk_wayland_window_set_shadow_width (GdkWindow *window,
if (GDK_WINDOW_DESTROYED (window))
return;
if (left == impl->margin_left && right == impl->margin_right &&
top == impl->margin_top && bottom == impl->margin_bottom)
return;
/* Reconfigure window to keep the same window geometry */
new_width = window->width -
(impl->margin_left + impl->margin_right) + (left + right);
+2 -4
View File
@@ -266,10 +266,9 @@ gdk_device_virtual_grab (GdkDevice *device,
{
if (GetCursor () == GDK_WIN32_CURSOR (_gdk_win32_grab_cursor)->hcursor)
SetCursor (NULL);
g_clear_object (&_gdk_win32_grab_cursor);
}
_gdk_win32_grab_cursor = cursor;
g_set_object (&_gdk_win32_grab_cursor, cursor);
if (_gdk_win32_grab_cursor != NULL)
SetCursor (GDK_WIN32_CURSOR (_gdk_win32_grab_cursor)->hcursor);
@@ -303,9 +302,8 @@ gdk_device_virtual_ungrab (GdkDevice *device,
{
if (GetCursor () == GDK_WIN32_CURSOR (_gdk_win32_grab_cursor)->hcursor)
SetCursor (NULL);
g_clear_object (&_gdk_win32_grab_cursor);
}
_gdk_win32_grab_cursor = NULL;
g_clear_object (&_gdk_win32_grab_cursor);
ReleaseCapture ();
}
+8 -7
View File
@@ -382,7 +382,8 @@ _gdk_input_wintab_init_check (GdkDeviceManager *_device_manager)
BOOL active;
DWORD physid;
AXIS axis_x, axis_y, axis_npressure, axis_or[3];
int i, devix, cursorix, num_axes = 0;
UINT devix, cursorix;
int i, num_axes = 0;
wchar_t devname[100], csrname[100];
gchar *devname_utf8, *csrname_utf8, *device_name;
BOOL defcontext_done;
@@ -481,7 +482,7 @@ _gdk_input_wintab_init_check (GdkDeviceManager *_device_manager)
(*p_WTInfoW) (WTI_DEVICES + devix, DVC_NAME, devname);
devname_utf8 = g_utf16_to_utf8 (devname, -1, NULL, NULL, NULL);
#ifdef DEBUG_WINTAB
GDK_NOTE (INPUT, (g_print("Device %d: %s\n", devix, devname_utf8)));
GDK_NOTE (INPUT, (g_print("Device %u: %s\n", devix, devname_utf8)));
#endif
(*p_WTInfoA) (WTI_DEVICES + devix, DVC_NCSRTYPES, &ncsrtypes);
(*p_WTInfoA) (WTI_DEVICES + devix, DVC_FIRSTCSR, &firstcsr);
@@ -525,7 +526,7 @@ _gdk_input_wintab_init_check (GdkDeviceManager *_device_manager)
lc.lcOutExtY = axis_y.axMax - axis_y.axMin + 1;
lc.lcOutExtY = -lc.lcOutExtY; /* We want Y growing downward */
#if DEBUG_WINTAB
GDK_NOTE (INPUT, (g_print("context for device %d:\n", devix),
GDK_NOTE (INPUT, (g_print("context for device %u:\n", devix),
print_lc(&lc)));
#endif
hctx = g_new (HCTX, 1);
@@ -534,7 +535,7 @@ _gdk_input_wintab_init_check (GdkDeviceManager *_device_manager)
g_warning ("gdk_input_wintab_init: WTOpen failed");
return;
}
GDK_NOTE (INPUT, g_print ("opened Wintab device %d %p\n",
GDK_NOTE (INPUT, g_print ("opened Wintab device %u %p\n",
devix, *hctx));
wintab_contexts = g_list_append (wintab_contexts, hctx);
@@ -544,7 +545,7 @@ _gdk_input_wintab_init_check (GdkDeviceManager *_device_manager)
(*p_WTOverlap) (*hctx, TRUE);
#if DEBUG_WINTAB
GDK_NOTE (INPUT, (g_print("context for device %d after WTOpen:\n", devix),
GDK_NOTE (INPUT, (g_print("context for device %u after WTOpen:\n", devix),
print_lc(&lc)));
#endif
/* Increase packet queue size to reduce the risk of lost packets.
@@ -565,7 +566,7 @@ _gdk_input_wintab_init_check (GdkDeviceManager *_device_manager)
for (cursorix = firstcsr; cursorix < firstcsr + ncsrtypes; cursorix++)
{
#ifdef DEBUG_WINTAB
GDK_NOTE (INPUT, (g_print("Cursor %d:\n", cursorix), print_cursor (cursorix)));
GDK_NOTE (INPUT, (g_print("Cursor %u:\n", cursorix), print_cursor (cursorix)));
#endif
active = FALSE;
(*p_WTInfoA) (WTI_CURSORS + cursorix, CSR_ACTIVE, &active);
@@ -676,7 +677,7 @@ _gdk_input_wintab_init_check (GdkDeviceManager *_device_manager)
device->last_axis_data = g_new (gint, num_axes);
GDK_NOTE (INPUT, g_print ("device: (%d) %s axes: %d\n",
GDK_NOTE (INPUT, g_print ("device: (%u) %s axes: %d\n",
cursorix,
device_name,
num_axes));
+84 -4
View File
@@ -26,10 +26,12 @@
#include "gdkwin32window.h"
#include "gdkwin32.h"
static int debug_indent = 0;
/**
* gdk_win32_display_set_cursor_theme:
* @display: (type GdkWin32Display): a #GdkDisplay
* @theme: (allow-none) the name of the cursor theme to use, or %NULL to unset
* @name: (allow-none): the name of the cursor theme to use, or %NULL to unset
* a previously set value
* @size: the cursor size to use, or 0 to keep the previous size
*
@@ -50,7 +52,7 @@
void
gdk_win32_display_set_cursor_theme (GdkDisplay *display,
const gchar *name,
const gint size)
gint size)
{
gint cursor_size;
gint w, h;
@@ -242,6 +244,81 @@ _gdk_monitor_init (void)
}
}
static LRESULT CALLBACK
inner_display_change_window_procedure (HWND hwnd,
UINT message,
WPARAM wparam,
LPARAM lparam)
{
switch (message)
{
case WM_DESTROY:
{
PostQuitMessage (0);
return 0;
}
case WM_DISPLAYCHANGE:
{
_gdk_monitor_init ();
_gdk_root_window_size_init ();
g_signal_emit_by_name (_gdk_screen, "size_changed");
return 0;
}
default:
/* Otherwise call DefWindowProcW(). */
GDK_NOTE (EVENTS, g_print (" DefWindowProcW"));
return DefWindowProc (hwnd, message, wparam, lparam);
}
}
static LRESULT CALLBACK
display_change_window_procedure (HWND hwnd,
UINT message,
WPARAM wparam,
LPARAM lparam)
{
LRESULT retval;
GDK_NOTE (EVENTS, g_print ("%s%*s%s %p",
(debug_indent > 0 ? "\n" : ""),
debug_indent, "",
_gdk_win32_message_to_string (message), hwnd));
debug_indent += 2;
retval = inner_display_change_window_procedure (hwnd, message, wparam, lparam);
debug_indent -= 2;
GDK_NOTE (EVENTS, g_print (" => %" G_GINT64_FORMAT "%s", (gint64) retval, (debug_indent == 0 ? "\n" : "")));
return retval;
}
/* Use a hidden window to be notified about display changes */
static void
register_display_change_notification (GdkDisplay *display)
{
GdkWin32Display *display_win32 = GDK_WIN32_DISPLAY (display);
WNDCLASS wclass = { 0, };
ATOM klass;
wclass.lpszClassName = "GdkDisplayChange";
wclass.lpfnWndProc = display_change_window_procedure;
wclass.hInstance = _gdk_app_hmodule;
klass = RegisterClass (&wclass);
if (klass)
{
display_win32->hwnd = CreateWindow (MAKEINTRESOURCE (klass),
NULL, WS_POPUP,
0, 0, 0, 0, NULL, NULL,
_gdk_app_hmodule, NULL);
if (!display_win32->hwnd)
{
UnregisterClass (MAKEINTRESOURCE (klass), _gdk_app_hmodule);
}
}
}
GdkDisplay *
_gdk_win32_display_open (const gchar *display_name)
{
@@ -276,6 +353,8 @@ _gdk_win32_display_open (const gchar *display_name)
/* Precalculate display name */
(void) gdk_display_get_name (_gdk_display);
register_display_change_notification (_gdk_display);
g_signal_emit_by_name (_gdk_display, "opened");
GDK_NOTE (MISC, g_print ("... _gdk_display now set up\n"));
@@ -376,7 +455,6 @@ gdk_win32_display_supports_selection_notification (GdkDisplay *display)
}
static HWND _hwnd_next_viewer = NULL;
static int debug_indent = 0;
/*
* maybe this should be integrated with the default message loop - or maybe not ;-)
@@ -619,7 +697,6 @@ gdk_win32_display_flush (GdkDisplay * display)
GdiFlush ();
}
static void
gdk_win32_display_sync (GdkDisplay * display)
{
@@ -631,6 +708,9 @@ gdk_win32_display_sync (GdkDisplay * display)
static void
gdk_win32_display_dispose (GObject *object)
{
GdkWin32Display *display_win32 = GDK_WIN32_DISPLAY (object);
g_clear_pointer(&display_win32->hwnd, (GDestroyNotify)DestroyWindow);
}
static void
+2
View File
@@ -31,6 +31,8 @@ struct _GdkWin32Display
int cursor_theme_size;
GHashTable *cursor_cache;
HWND hwnd;
/* WGL/OpenGL Items */
guint have_wgl : 1;
guint gl_version;
+1 -1
View File
@@ -1043,7 +1043,7 @@ ienumformatetc_next (LPENUMFORMATETC This,
ULONG *nelt)
{
enum_formats *en = (enum_formats *) This;
int i, n;
ULONG i, n;
GDK_NOTE (DND, g_print ("ienumformatetc_next %p %d %ld ", This, en->ix, celt));
+4 -16
View File
@@ -1034,7 +1034,7 @@ show_window_recurse (GdkWindow *window, gboolean hide_window)
child = children->data;
show_window_recurse (child, hide_window);
children = g_slist_next (children);
children = children->next;
}
}
@@ -1181,8 +1181,8 @@ find_common_ancestor (GdkWindow *win1,
while (list1 && list2 && (list1->data == list2->data))
{
tmp = (GdkWindow *)list1->data;
list1 = g_list_next (list1);
list2 = g_list_next (list2);
list1 = list1->next;
list2 = list2->next;
}
g_list_free (path1);
g_list_free (path2);
@@ -1280,7 +1280,7 @@ synthesize_crossing_events (GdkDisplay *display,
while (list)
{
win = (GdkWindow *)list->data;
list = g_list_next (list);
list = list->next;
if (list)
next = (GdkWindow *)list->data;
else
@@ -1611,14 +1611,6 @@ sync_timer_proc (HWND hwnd,
KillTimer (hwnd, sync_timer);
}
static void
handle_display_change (void)
{
_gdk_monitor_init ();
_gdk_root_window_size_init ();
g_signal_emit_by_name (_gdk_screen, "size_changed");
}
static gboolean
handle_nchittest (HWND hwnd,
GdkWindow *window,
@@ -3202,10 +3194,6 @@ gdk_event_translate (MSG *msg,
return_val = TRUE;
break;
case WM_DISPLAYCHANGE:
handle_display_change ();
break;
case WM_DWMCOMPOSITIONCHANGED:
_gdk_win32_window_enable_transparency (window);
break;
+1 -1
View File
@@ -618,7 +618,7 @@ gdk_win32_keymap_get_entries_for_keyval (GdkKeymap *keymap,
#ifdef G_ENABLE_DEBUG
if (_gdk_debug_flags & GDK_DEBUG_EVENTS)
{
gint i;
guint i;
g_print ("gdk_keymap_get_entries_for_keyval: %#.04x (%s):",
keyval, gdk_keyval_name (keyval));
+1 -1
View File
@@ -664,7 +664,7 @@ _gdk_win32_display_convert_selection (GdkDisplay *display,
{
BITMAPV5HEADER *bV5 = (BITMAPV5HEADER *) ((char *) data + sizeof (BITMAPFILEHEADER));
guchar *p;
int i;
guint i;
bV5->bV5Size = sizeof (BITMAPV5HEADER);
bV5->bV5Width = bi->biWidth;
+1 -1
View File
@@ -52,7 +52,7 @@ GType gdk_win32_display_get_type (void);
GDK_AVAILABLE_IN_3_18
void gdk_win32_display_set_cursor_theme (GdkDisplay *display,
const gchar *theme,
const gchar *name,
gint size);
G_END_DECLS
+2 -2
View File
@@ -826,7 +826,7 @@ gdk_win32_window_destroy (GdkWindow *window,
GdkWindowImplWin32 *child_impl = GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW (child)->impl);
child_impl->transient_owner = NULL;
tmp = g_slist_next (tmp);
tmp = tmp->next;
}
g_slist_free (window_impl->transient_children);
window_impl->transient_children = NULL;
@@ -2299,7 +2299,7 @@ gdk_win32_window_set_icon_list (GdkWindow *window,
small_diff = diff;
}
pixbufs = g_list_next (pixbufs);
pixbufs = pixbufs->next;
}
/* Create the icons */
+6
View File
@@ -463,10 +463,16 @@ GdkAppLaunchContext *
_gdk_x11_display_get_app_launch_context (GdkDisplay *display)
{
GdkAppLaunchContext *ctx;
const gchar *display_name;
ctx = g_object_new (GDK_TYPE_X11_APP_LAUNCH_CONTEXT,
"display", display,
NULL);
display_name = gdk_display_get_name (display);
if (display_name)
g_app_launch_context_setenv (G_APP_LAUNCH_CONTEXT (ctx),
"DISPLAY", display_name);
return ctx;
}
+4 -4
View File
@@ -155,13 +155,13 @@ _gdk_x11_cursor_display_finalize (GdkDisplay *display)
/* Remove this item from the list */
*(itemp) = item->next;
olditem = item;
item = g_slist_next (item);
item = item->next;
g_slist_free_1 (olditem);
}
else
}
else
{
itemp = &(item->next);
item = g_slist_next (item);
item = item->next;
}
}
}
+2 -2
View File
@@ -472,9 +472,9 @@ gdk_x11_device_core_window_at_position (GdkDevice *device,
/* FIXME: untrusted clients case not multidevice-safe */
pointer_window = None;
screen = gdk_display_get_screen (display, 0);
screen = gdk_display_get_default_screen (display);
toplevels = gdk_screen_get_toplevel_windows (screen);
for (list = toplevels; list != NULL; list = g_list_next (list))
for (list = toplevels; list != NULL; list = list->next)
{
window = GDK_WINDOW (list->data);
impl = GDK_WINDOW_IMPL_X11 (window->impl);
+2 -2
View File
@@ -542,9 +542,9 @@ gdk_x11_device_xi2_window_at_position (GdkDevice *device,
/* FIXME: untrusted clients case not multidevice-safe */
pointer_window = None;
screen = gdk_display_get_screen (display, 0);
screen = gdk_display_get_default_screen (display);
toplevels = gdk_screen_get_toplevel_windows (screen);
for (list = toplevels; list != NULL; list = g_list_next (list))
for (list = toplevels; list != NULL; list = list->next)
{
window = GDK_WINDOW (list->data);
xwindow = GDK_WINDOW_XID (window);
+35
View File
@@ -301,6 +301,39 @@ is_touch_device (XIAnyClassInfo **classes,
return FALSE;
}
static gboolean
has_abs_axes (GdkDisplay *display,
XIAnyClassInfo **classes,
guint n_classes)
{
gboolean has_x = FALSE, has_y = FALSE;
Atom abs_x, abs_y;
guint i;
abs_x = gdk_x11_get_xatom_by_name_for_display (display, "Abs X");
abs_y = gdk_x11_get_xatom_by_name_for_display (display, "Abs Y");
for (i = 0; i < n_classes; i++)
{
XIValuatorClassInfo *class = (XIValuatorClassInfo *) classes[i];
if (class->type != XIValuatorClass)
continue;
if (class->mode != XIModeAbsolute)
continue;
if (class->label == abs_x)
has_x = TRUE;
else if (class->label == abs_y)
has_y = TRUE;
if (has_x && has_y)
break;
}
return (has_x && has_y);
}
static gboolean
get_device_ids (GdkDisplay *display,
XIDeviceInfo *info,
@@ -393,6 +426,8 @@ create_device (GdkDeviceManager *device_manager,
else if (strstr (tmp_name, "wacom") ||
strstr (tmp_name, "pen"))
input_source = GDK_SOURCE_PEN;
else if (has_abs_axes (display, dev->classes, dev->num_classes))
input_source = GDK_SOURCE_TOUCHSCREEN;
else
input_source = GDK_SOURCE_MOUSE;
+84 -17
View File
@@ -554,12 +554,13 @@ static GLXContext
create_gl3_context (GdkDisplay *display,
GLXFBConfig config,
GdkGLContext *share,
int profile,
int flags,
int major,
int minor)
{
int attrib_list[] = {
GLX_CONTEXT_PROFILE_MASK_ARB, GLX_CONTEXT_CORE_PROFILE_BIT_ARB,
GLX_CONTEXT_PROFILE_MASK_ARB, profile,
GLX_CONTEXT_MAJOR_VERSION_ARB, major,
GLX_CONTEXT_MINOR_VERSION_ARB, minor,
GLX_CONTEXT_FLAGS_ARB, flags,
@@ -586,6 +587,31 @@ create_gl3_context (GdkDisplay *display,
return res;
}
static GLXContext
create_legacy_context (GdkDisplay *display,
GLXFBConfig config,
GdkGLContext *share)
{
GdkX11GLContext *share_x11 = NULL;
GLXContext res;
if (share != NULL)
share_x11 = GDK_X11_GL_CONTEXT (share);
gdk_x11_display_error_trap_push (display);
res = glXCreateNewContext (gdk_x11_display_get_xdisplay (display),
config,
GLX_RGBA_TYPE,
share_x11 != NULL ? share_x11->glx_context : NULL,
TRUE);
if (gdk_x11_display_error_trap_pop (display))
return NULL;
return res;
}
static gboolean
gdk_x11_gl_context_realize (GdkGLContext *context,
GError **error)
@@ -598,7 +624,7 @@ gdk_x11_gl_context_realize (GdkGLContext *context,
DrawableInfo *info;
GdkGLContext *share;
GdkWindow *window;
gboolean debug_bit, compat_bit;
gboolean debug_bit, compat_bit, legacy_bit;
int major, minor, flags;
window = gdk_gl_context_get_window (context);
@@ -611,6 +637,17 @@ gdk_x11_gl_context_realize (GdkGLContext *context,
debug_bit = gdk_gl_context_get_debug_enabled (context);
compat_bit = gdk_gl_context_get_forward_compatible (context);
/* If there is no glXCreateContextAttribsARB() then we default to legacy */
legacy_bit = !GDK_X11_DISPLAY (display)->has_glx_create_context ||
(_gdk_gl_flags & GDK_GL_LEGACY) != 0;
/* We cannot share legacy contexts with core profile ones, so the
* shared context is the one that decides if we're going to create
* a legacy context or not.
*/
if (share != NULL && gdk_gl_context_is_legacy (share))
legacy_bit = TRUE;
flags = 0;
if (debug_bit)
flags |= GLX_CONTEXT_DEBUG_BIT_ARB;
@@ -618,15 +655,51 @@ gdk_x11_gl_context_realize (GdkGLContext *context,
flags |= GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
GDK_NOTE (OPENGL,
g_print ("Creating core GLX context (version:%d.%d, debug:%s, forward:%s)\n",
g_print ("Creating core GLX context (version:%d.%d, debug:%s, forward:%s, legacy:%s)\n",
major, minor,
debug_bit ? "yes" : "no",
compat_bit ? "yes" : "no"));
compat_bit ? "yes" : "no",
legacy_bit ? "yes" : "no"));
/* If we have access to GLX_ARB_create_context_profile then we can ask for
* a compatibility profile; if we don't, then we have to fall back to the
* old GLX 1.3 API.
*/
if (legacy_bit && !GDK_X11_DISPLAY (display)->has_glx_create_context)
{
GDK_NOTE (OPENGL, g_print ("Creating legacy GL context on request\n"));
context_x11->glx_context = create_legacy_context (display, context_x11->glx_config, share);
}
else
{
int profile = legacy_bit ? GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB
: GLX_CONTEXT_CORE_PROFILE_BIT_ARB;
/* We need to tweak the version, otherwise we may end up requesting
* a compatibility context with a minimum version of 3.2, which is
* an error
*/
if (legacy_bit)
{
major = 3;
minor = 0;
}
GDK_NOTE (OPENGL, g_print ("Creating GL3 context\n"));
context_x11->glx_context = create_gl3_context (display,
context_x11->glx_config,
share,
profile, flags, major, minor);
/* Fall back to legacy in case the GL3 context creation failed */
if (context_x11->glx_context == NULL)
{
GDK_NOTE (OPENGL, g_print ("Creating fallback legacy context\n"));
context_x11->glx_context = create_legacy_context (display, context_x11->glx_config, share);
legacy_bit = TRUE;
}
}
context_x11->glx_context = create_gl3_context (display,
context_x11->glx_config,
share,
flags, major, minor);
if (context_x11->glx_context == NULL)
{
g_set_error_literal (error, GDK_GL_ERROR,
@@ -635,6 +708,9 @@ gdk_x11_gl_context_realize (GdkGLContext *context,
return FALSE;
}
/* Ensure that any other context is created with a legacy bit set */
gdk_gl_context_set_is_legacy (context, legacy_bit);
xvisinfo = find_xvisinfo_for_fbconfig (display, context_x11->glx_config);
info = get_glx_drawable_info (window->impl_window);
@@ -1179,15 +1255,6 @@ gdk_x11_window_create_gl_context (GdkWindow *window,
return NULL;
}
if (!GDK_X11_DISPLAY (display)->has_glx_create_context)
{
g_set_error_literal (error, GDK_GL_ERROR,
GDK_GL_ERROR_UNSUPPORTED_PROFILE,
_("The GLX_ARB_create_context_profile extension "
"needed to create core profiles is not available"));
return NULL;
}
visual = gdk_window_get_visual (window);
if (!find_fbconfig_for_visual (display, visual, &config, error))
return NULL;
+3 -4
View File
@@ -3864,7 +3864,7 @@ gdk_x11_window_set_icon_list (GdkWindow *window,
n++;
size += 2 + width * height;
l = g_list_next (l);
l = l->next;
}
data = g_malloc (size * sizeof (gulong));
@@ -3903,7 +3903,7 @@ gdk_x11_window_set_icon_list (GdkWindow *window,
}
}
l = g_list_next (l);
l = l->next;
n--;
}
@@ -4933,8 +4933,7 @@ finish_drag (MoveResizeData *mv_resize)
{
gdk_window_destroy (mv_resize->moveresize_emulation_window);
mv_resize->moveresize_emulation_window = NULL;
g_object_unref (mv_resize->moveresize_window);
mv_resize->moveresize_window = NULL;
g_clear_object (&mv_resize->moveresize_window);
g_clear_pointer (&mv_resize->moveresize_pending_event, g_free);
}
+36 -1
View File
@@ -14,6 +14,7 @@ AM_CPPFLAGS = \
-DGTK_COMPILATION \
-DGTK_PRINT_BACKENDS=\"$(GTK_PRINT_BACKENDS)\" \
-DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED \
-DX11_DATA_PREFIX=\"$(X11_PREFIX)\" \
-I$(top_builddir) \
-I$(top_builddir)/gtk \
-I$(top_srcdir) \
@@ -179,6 +180,7 @@ gtk_public_h_sources = \
gtkfilechooser.h \
gtkfilechooserbutton.h \
gtkfilechooserdialog.h \
gtkfilechoosernative.h \
gtkfilechooserwidget.h \
gtkfilefilter.h \
gtkfixed.h \
@@ -228,6 +230,7 @@ gtk_public_h_sources = \
gtkmodelbutton.h \
gtkmodules.h \
gtkmountoperation.h \
gtknativedialog.h \
gtknotebook.h \
gtkoffscreenwindow.h \
gtkorientable.h \
@@ -268,6 +271,11 @@ gtk_public_h_sources = \
gtkseparatormenuitem.h \
gtkseparatortoolitem.h \
gtksettings.h \
gtkshortcutsgesture.h \
gtkshortcutsgroup.h \
gtkshortcutssection.h \
gtkshortcutsshortcut.h \
gtkshortcutswindow.h \
gtkshow.h \
gtkstacksidebar.h \
gtksizegroup.h \
@@ -361,6 +369,7 @@ gtk_private_h_sources = \
gtkbuttonprivate.h \
gtkcairoblurprivate.h \
gtkcellareaboxcontextprivate.h \
gtkcheckbuttonprivate.h \
gtkclipboardprivate.h \
gtkcolorswatchprivate.h \
gtkcoloreditorprivate.h \
@@ -368,6 +377,7 @@ gtk_private_h_sources = \
gtkcolorscaleprivate.h \
gtkcolorchooserprivate.h \
gtkcomboboxprivate.h \
gtkcomposetable.h \
gtkcontainerprivate.h \
gtkcssanimationprivate.h \
gtkcssanimatedstyleprivate.h \
@@ -431,8 +441,10 @@ gtk_private_h_sources = \
gtkfilechooserembed.h \
gtkfilechooserentry.h \
gtkfilechooserprivate.h \
gtkfilechoosernativeprivate.h \
gtkfilechooserwidgetprivate.h \
gtkfilechooserutils.h \
gtkfilefilterprivate.h \
gtkfilesystem.h \
gtkfilesystemmodel.h \
gtkfontchooserprivate.h \
@@ -452,6 +464,7 @@ gtk_private_h_sources = \
gtkiconhelperprivate.h \
gtkiconviewprivate.h \
gtkimageprivate.h \
gtkimcontextsimpleprivate.h \
gtkimmoduleprivate.h \
gtkimcontextsimpleseqs.h \
gtkintl.h \
@@ -472,6 +485,7 @@ gtk_private_h_sources = \
gtkmodifierstyle.h \
gtkmodulesprivate.h \
gtkmountoperationprivate.h \
gtknativedialogprivate.h \
gtkorientableprivate.h \
gtkpango.h \
gtkpathbar.h \
@@ -500,8 +514,9 @@ gtk_private_h_sources = \
gtksearchenginemodel.h \
gtksearchentryprivate.h \
gtkselectionprivate.h \
gtksidebarrowprivate.h \
gtksettingsprivate.h \
gtkshortcutlabelprivate.h \
gtksidebarrowprivate.h \
gtksizegroup-private.h \
gtksizerequestcacheprivate.h \
gtksocketprivate.h \
@@ -512,6 +527,7 @@ gtk_private_h_sources = \
gtkstyleproviderprivate.h \
gtktextattributesprivate.h \
gtktextbtree.h \
gtktextbufferprivate.h \
gtktextbufferserialize.h \
gtktextchildprivate.h \
gtktexthandleprivate.h \
@@ -526,6 +542,7 @@ gtk_private_h_sources = \
gtktoolbarprivate.h \
gtktoolpaletteprivate.h \
gtktooltipprivate.h \
gtktooltipwindowprivate.h \
gtktreedatalist.h \
gtktreeprivate.h \
gtkwidgetprivate.h \
@@ -609,6 +626,7 @@ gtk_base_c_sources = \
gtkcolorutils.c \
gtkcombobox.c \
gtkcomboboxtext.c \
gtkcomposetable.c \
gtkcontainer.c \
gtkcssanimation.c \
gtkcssanimatedstyle.c \
@@ -681,6 +699,7 @@ gtk_base_c_sources = \
gtkfilechooserdialog.c \
gtkfilechooserembed.c \
gtkfilechooserentry.c \
gtkfilechoosernative.c \
gtkfilechooserutils.c \
gtkfilechooserwidget.c \
gtkfilefilter.c \
@@ -748,6 +767,7 @@ gtk_base_c_sources = \
gtkmodifierstyle.c \
gtkmodules.c \
gtkmountoperation.c \
gtknativedialog.c \
gtknotebook.c \
gtkoffscreenwindow.c \
gtkorientable.c \
@@ -801,6 +821,12 @@ gtk_base_c_sources = \
gtkseparatormenuitem.c \
gtkseparatortoolitem.c \
gtksettings.c \
gtkshortcutsgesture.c \
gtkshortcutsgroup.c \
gtkshortcutlabel.c \
gtkshortcutsshortcut.c \
gtkshortcutssection.c \
gtkshortcutswindow.c \
gtksidebarrow.c \
gtksizegroup.c \
gtksizerequest.c \
@@ -846,6 +872,7 @@ gtk_base_c_sources = \
gtktoolpalette.c \
gtktoolshell.c \
gtktooltip.c \
gtktooltipwindow.c \
gtktrashmonitor.c \
gtktreedatalist.c \
gtktreednd.c \
@@ -918,6 +945,7 @@ endif
gtk_os_win32_c_sources = \
gtkprint-win32.c \
gtkprintoperation-win32.c \
gtkfilechoosernativewin32.c \
gtkwin32.c
if OS_WIN32
gtk_private_h_sources += gtkprint-win32.h
@@ -1400,6 +1428,7 @@ bin_PROGRAMS = \
gtk-update-icon-cache \
gtk-encode-symbolic-svg \
gtk-builder-tool \
gtk-query-settings \
gtk-launch
gtk_query_immodules_3_0_SOURCES = queryimmodules.c
@@ -1424,6 +1453,12 @@ gtk_builder_tool_LDADD = \
$(top_builddir)/gdk/libgdk-3.la \
$(GTK_DEP_LIBS)
gtk_query_settings_SOURCES = gtk-query-settings.c
gtk_query_settings_LDADD= \
libgtk-3.la \
$(top_builddir)/gdk/libgdk-3.la \
$(GTK_DEP_LIBS)
gtk_launch_SOURCES = gtk-launch.c
gtk_launch_LDADD = \
libgtk-3.la \
+1
View File
@@ -29,6 +29,7 @@
#include <glib/gstdio.h>
#include <gtk/gtk.h>
#include "gtktextviewaccessibleprivate.h"
#include "gtktextbufferprivate.h"
#include "gtk/gtkwidgetprivate.h"
struct _GtkTextViewAccessiblePrivate
+10 -10
View File
@@ -457,7 +457,7 @@ gtk_icon_factory_lookup_default (const gchar *stock_id)
if (icon_set)
return icon_set;
tmp_list = g_slist_next (tmp_list);
tmp_list = tmp_list->next;
}
default_icons = _gtk_icon_factory_get_default_icons ();
@@ -1125,7 +1125,7 @@ gtk_icon_set_unref (GtkIconSet *icon_set)
{
gtk_icon_source_free (tmp_list->data);
tmp_list = g_slist_next (tmp_list);
tmp_list = tmp_list->next;
}
g_slist_free (icon_set->sources);
@@ -1163,7 +1163,7 @@ gtk_icon_set_copy (GtkIconSet *icon_set)
copy->sources = g_slist_prepend (copy->sources,
gtk_icon_source_copy (tmp_list->data));
tmp_list = g_slist_next (tmp_list);
tmp_list = tmp_list->next;
}
copy->sources = g_slist_reverse (copy->sources);
@@ -1233,7 +1233,7 @@ find_best_matching_source (GtkIconSet *icon_set,
}
}
tmp_list = g_slist_next (tmp_list);
tmp_list = tmp_list->next;
}
return source;
@@ -1798,7 +1798,7 @@ gtk_icon_set_get_sizes (GtkIconSet *icon_set,
else
specifics = g_slist_prepend (specifics, GINT_TO_POINTER (source->size));
tmp_list = g_slist_next (tmp_list);
tmp_list = tmp_list->next;
}
if (all_sizes)
@@ -1832,7 +1832,7 @@ gtk_icon_set_get_sizes (GtkIconSet *icon_set,
(*sizes)[i] = GPOINTER_TO_INT (tmp_list->data);
++i;
tmp_list = g_slist_next (tmp_list);
tmp_list = tmp_list->next;
}
}
@@ -2504,7 +2504,7 @@ find_in_cache (GtkIconSet *icon_set,
}
prev = tmp_list;
tmp_list = g_slist_next (tmp_list);
tmp_list = tmp_list->next;
}
return NULL;
@@ -2596,7 +2596,7 @@ clear_cache (GtkIconSet *icon_set,
cached_icon_free (icon);
tmp_list = g_slist_next (tmp_list);
tmp_list = tmp_list->next;
}
g_slist_free (cache);
@@ -2628,7 +2628,7 @@ copy_cache (GtkIconSet *icon_set,
copy = g_slist_prepend (copy, icon_copy);
tmp_list = g_slist_next (tmp_list);
tmp_list = tmp_list->next;
}
return g_slist_reverse (copy);
@@ -2734,7 +2734,7 @@ _gtk_icon_factory_list_ids (void)
ids = g_list_concat (ids, these_ids);
tmp_list = g_slist_next (tmp_list);
tmp_list = tmp_list->next;
}
return ids;
+2 -2
View File
@@ -255,7 +255,7 @@ gtk_stock_list_ids (void)
{
GList *next;
next = g_list_next (ids);
next = ids->next;
if (last_id && strcmp (ids->data, last_id) == 0)
{
@@ -268,7 +268,7 @@ gtk_stock_list_ids (void)
}
g_list_free_1 (ids);
ids = next;
}
+3 -3
View File
@@ -104,15 +104,15 @@
bind "<ctrl>b" { "move-current" (parent) };
}
GtkEntry {
entry {
gtk-key-bindings: gtk-emacs-text-entry;
}
GtkTextView {
textview {
gtk-key-bindings: gtk-emacs-text-entry, gtk-emacs-text-view;
}
GtkTreeView {
treeview {
gtk-key-bindings: gtk-emacs-tree-view;
}
+5 -5
View File
@@ -180,19 +180,19 @@
unbind "<shift><ctrl>a";
}
GtkIconView {
iconview {
gtk-key-bindings: gtk-mac-icon-view;
}
GtkTextView {
textview {
gtk-key-bindings: gtk-mac-alt-arrows, gtk-mac-alt-delete, gtk-mac-cmd-c, gtk-mac-text-view;
}
GtkEntry {
entry {
gtk-key-bindings: gtk-mac-alt-arrows, gtk-mac-alt-delete, gtk-mac-cmd-c, gtk-mac-entry;
}
GtkLabel {
label {
gtk-key-bindings: gtk-mac-alt-arrows, gtk-mac-label;
}
@@ -200,6 +200,6 @@ GtkFileChooserWidget {
gtk-key-bindings: gtk-mac-file-chooser;
}
GtkTreeView {
treeview {
gtk-key-bindings: gtk-mac-tree-view;
}
+87
View File
@@ -0,0 +1,87 @@
/* Copyright 2015 Timm Bäder
*
* GTK+ is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* GLib is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with GTK+; see the file COPYING. If not,
* see <http://www.gnu.org/licenses/>.
*/
#include <glib.h>
#include <gtk/gtk.h>
#include <string.h>
int
main (int argc, char **argv)
{
GtkSettings *settings;
GParamSpec **props;
guint n_properties;
int i;
int max_prop_name_length = 0;
gchar *pattern = NULL;
gtk_init (&argc, &argv);
if (argc > 1)
pattern = argv[1];
settings = gtk_settings_get_default ();
props = g_object_class_list_properties (G_OBJECT_GET_CLASS (settings), &n_properties);
for (i = 0; i < n_properties; i ++)
{
int len = strlen (props[i]->name);
if (len > max_prop_name_length)
max_prop_name_length = len;
}
for (i = 0; i < n_properties; i ++)
{
GValue value = {0};
GParamSpec *prop = props[i];
gchar *value_str;
int spacing = max_prop_name_length - strlen (prop->name);
if (pattern && !g_strrstr (prop->name, pattern))
continue;
g_value_init (&value, prop->value_type);
g_object_get_property (G_OBJECT (settings), prop->name, &value);
if (G_VALUE_HOLDS_ENUM (&value))
{
GEnumClass *enum_class = G_PARAM_SPEC_ENUM (prop)->enum_class;
GEnumValue *enum_value = g_enum_get_value (enum_class, g_value_get_enum (&value));
value_str = g_strdup (enum_value->value_name);
}
else
{
value_str = g_strdup_value_contents (&value);
}
for (; spacing >= 0; spacing --)
printf (" ");
printf ("%s: %s\n", prop->name, value_str);
g_free (value_str);
g_value_unset (&value);
}
g_free (props);
return 0;
}
+7
View File
@@ -97,6 +97,7 @@
#include <gtk/gtkfilechooser.h>
#include <gtk/gtkfilechooserbutton.h>
#include <gtk/gtkfilechooserdialog.h>
#include <gtk/gtkfilechoosernative.h>
#include <gtk/gtkfilechooserwidget.h>
#include <gtk/gtkfilefilter.h>
#include <gtk/gtkflowbox.h>
@@ -144,6 +145,7 @@
#include <gtk/gtkmodelbutton.h>
#include <gtk/gtkmodules.h>
#include <gtk/gtkmountoperation.h>
#include <gtk/gtknativedialog.h>
#include <gtk/gtknotebook.h>
#include <gtk/gtkoffscreenwindow.h>
#include <gtk/gtkorientable.h>
@@ -183,6 +185,11 @@
#include <gtk/gtkseparatormenuitem.h>
#include <gtk/gtkseparatortoolitem.h>
#include <gtk/gtksettings.h>
#include <gtk/gtkshortcutsgesture.h>
#include <gtk/gtkshortcutsgroup.h>
#include <gtk/gtkshortcutssection.h>
#include <gtk/gtkshortcutsshortcut.h>
#include <gtk/gtkshortcutswindow.h>
#include <gtk/gtkshow.h>
#include <gtk/gtkstacksidebar.h>
#include <gtk/gtksizegroup.h>
+49 -5
View File
@@ -36,6 +36,9 @@
#include "gtkrender.h"
#include "gtksizerequest.h"
#include "gtkstylecontextprivate.h"
#include "gtkwidgetprivate.h"
#include "gtkcssnodeprivate.h"
#include "gtkcssstylepropertyprivate.h"
/**
* SECTION:gtkaccellabel
@@ -91,6 +94,16 @@
* gtk_widget_add_accelerator (save_item, "activate", accel_group,
* GDK_KEY_s, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE);
* ]|
*
* # CSS nodes
*
* |[<!-- language="plain" -->
* label
* accelerator
* ]|
*
* Like #GtkLabel, GtkAccelLabel has a main CSS node with the name label.
* It adds a subnode with name accelerator.
*/
enum {
@@ -106,6 +119,7 @@ struct _GtkAccelLabelPrivate
GClosure *accel_closure; /* has set function */
GtkAccelGroup *accel_group; /* set by set_accel_closure() */
gchar *accel_string; /* has set function */
GtkCssNode *accel_node;
guint accel_padding; /* should be style property? */
guint16 accel_string_width; /* seems to be private */
@@ -253,10 +267,34 @@ gtk_accel_label_get_property (GObject *object,
}
}
static void
node_style_changed_cb (GtkCssNode *node,
GtkCssStyle *old_style,
GtkCssStyle *new_style,
GtkWidget *widget)
{
GtkBitmask *changes;
static GtkBitmask *affects_size = NULL;
if (G_UNLIKELY (affects_size == NULL))
affects_size = _gtk_css_style_property_get_mask_affecting (GTK_CSS_AFFECTS_SIZE | GTK_CSS_AFFECTS_CLIP);
changes = _gtk_bitmask_new ();
changes = gtk_css_style_add_difference (changes, old_style, new_style);
if (_gtk_bitmask_intersects (changes, affects_size))
gtk_widget_queue_resize (widget);
else
gtk_widget_queue_draw (widget);
_gtk_bitmask_free (changes);
}
static void
gtk_accel_label_init (GtkAccelLabel *accel_label)
{
GtkAccelLabelPrivate *priv;
GtkCssNode *widget_node;
accel_label->priv = gtk_accel_label_get_instance_private (accel_label);
priv = accel_label->priv;
@@ -266,6 +304,14 @@ gtk_accel_label_init (GtkAccelLabel *accel_label)
priv->accel_closure = NULL;
priv->accel_group = NULL;
priv->accel_string = NULL;
widget_node = gtk_widget_get_css_node (GTK_WIDGET (accel_label));
priv->accel_node = gtk_css_node_new ();
gtk_css_node_set_name (priv->accel_node, I_("accelerator"));
gtk_css_node_set_parent (priv->accel_node, widget_node);
gtk_css_node_set_state (priv->accel_node, gtk_css_node_get_state (widget_node));
g_signal_connect_object (priv->accel_node, "style-changed", G_CALLBACK (node_style_changed_cb), accel_label, 0);
g_object_unref (priv->accel_node);
}
/**
@@ -358,8 +404,7 @@ gtk_accel_label_get_accel_layout (GtkAccelLabel *accel_label)
context = gtk_widget_get_style_context (widget);
gtk_style_context_save (context);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_ACCELERATOR);
gtk_style_context_save_to_node (context, accel_label->priv->accel_node);
layout = gtk_widget_create_pango_layout (widget, gtk_accel_label_get_string (accel_label));
@@ -367,7 +412,7 @@ gtk_accel_label_get_accel_layout (GtkAccelLabel *accel_label)
if (!attrs)
attrs = pango_attr_list_new ();
gtk_style_context_get (context,
gtk_widget_get_state_flags (widget),
gtk_style_context_get_state (context),
"font", &font_desc,
NULL);
pango_attr_list_change (attrs, pango_attr_font_desc_new (font_desc));
@@ -473,8 +518,7 @@ gtk_accel_label_draw (GtkWidget *widget,
accel_layout = gtk_accel_label_get_accel_layout (accel_label);
y += get_first_baseline (label_layout) - get_first_baseline (accel_layout) - allocation.y;
gtk_style_context_save (context);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_ACCELERATOR);
gtk_style_context_save_to_node (context, accel_label->priv->accel_node);
gtk_render_layout (context, cr, x, y, accel_layout);
gtk_style_context_restore (context);
+5
View File
@@ -43,6 +43,10 @@
* contains an internal centered box which is centered with respect to
* the full width of the box, even if the children at either side take
* up different amounts of space.
*
* # CSS nodes
*
* GtkActionBar has a single CSS node with name actionbar.
*/
struct _GtkActionBarPrivate
@@ -251,6 +255,7 @@ gtk_action_bar_class_init (GtkActionBarClass *klass)
gtk_widget_class_bind_template_child_internal_private (widget_class, GtkActionBar, revealer);
gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_PANEL);
gtk_widget_class_set_css_name (widget_class, "actionbar");
}
static void
+48 -8
View File
@@ -38,6 +38,7 @@
#include "gtkaccelmapprivate.h"
#include "gtkicontheme.h"
#include "gtkbuilder.h"
#include "gtkshortcutswindow.h"
#include "gtkintl.h"
/* NB: please do not add backend-specific GDK headers here. This should
@@ -74,7 +75,7 @@
* ## Automatic resources ## {#automatic-resources}
*
* #GtkApplication will automatically load menus from the #GtkBuilder
* file located at "gtk/menus.ui", relative to the application's
* resource located at "gtk/menus.ui", relative to the application's
* resource base path (see g_application_set_resource_base_path()). The
* menu with the ID "app-menu" is taken as the application's app menu
* and the menu with the ID "menubar" is taken as the application's
@@ -82,7 +83,7 @@
* and accessed via gtk_application_get_menu_by_id() which allows for
* dynamic population of a part of the menu structure.
*
* If the files "gtk/menus-appmenu.ui" or "gtk/menus-traditional.ui" are
* If the resources "gtk/menus-appmenu.ui" or "gtk/menus-traditional.ui" are
* present then these files will be used in preference, depending on the
* value of gtk_application_prefers_app_menu().
*
@@ -95,6 +96,12 @@
* resources. See gtk_icon_theme_add_resource_path() for more
* information.
*
* If there is a resource located at "gtk/help-overlay.ui" which is
* defining a #GtkShortcutsWindow with ID "help_overlay" then GtkApplication
* associates an instance of this shortcuts window with each
* #GtkApplicationWindow and sets up keyboard accelerators (Control-F1
* and Control-?) to open it.
*
* ## A simple application ## {#gtkapplication}
*
* [A simple example](https://git.gnome.org/browse/gtk+/tree/examples/bp/bloatpad.c)
@@ -485,9 +492,10 @@ struct _GtkApplicationPrivate
Accels accels;
guint last_window_id;
gboolean register_session;
gboolean register_session;
GtkActionMuxer *muxer;
GtkBuilder *menus_builder;
gchar *help_overlay_path;
};
G_DEFINE_TYPE_WITH_PRIVATE (GtkApplication, gtk_application, G_TYPE_APPLICATION)
@@ -588,6 +596,22 @@ gtk_application_load_resources (GtkApplication *application)
gtk_application_set_menubar (application, G_MENU_MODEL (menu));
}
}
/* Help overlay */
{
gchar *path;
path = g_strconcat (base_path, "/gtk/help-overlay.ui", NULL);
if (g_resources_get_info (path, G_RESOURCE_LOOKUP_FLAGS_NONE, NULL, NULL, NULL))
{
const gchar * const accels[] = { "<Primary>F1", "<Primary>question", NULL };
application->priv->help_overlay_path = path;
gtk_application_set_accels_for_action (application, "win.show-help-overlay", accels);
}
else
g_free (path);
}
}
@@ -698,7 +722,21 @@ gtk_application_window_added (GtkApplication *application,
GtkApplicationPrivate *priv = application->priv;
if (GTK_IS_APPLICATION_WINDOW (window))
gtk_application_window_set_id (GTK_APPLICATION_WINDOW (window), ++application->priv->last_window_id);
{
gtk_application_window_set_id (GTK_APPLICATION_WINDOW (window), ++priv->last_window_id);
if (priv->help_overlay_path)
{
GtkBuilder *builder;
GtkWidget *help_overlay;
builder = gtk_builder_new_from_resource (priv->help_overlay_path);
help_overlay = GTK_WIDGET (gtk_builder_get_object (builder, "help_overlay"));
if (GTK_IS_SHORTCUTS_WINDOW (help_overlay))
gtk_application_window_set_help_overlay (GTK_APPLICATION_WINDOW (window),
GTK_SHORTCUTS_WINDOW (help_overlay));
g_object_unref (builder);
}
}
priv->windows = g_list_prepend (priv->windows, window);
gtk_window_set_application (window, application);
@@ -708,9 +746,10 @@ gtk_application_window_added (GtkApplication *application,
G_CALLBACK (gtk_application_focus_in_event_cb),
application);
gtk_application_impl_window_added (application->priv->impl, window);
gtk_application_impl_window_added (priv->impl, window);
gtk_application_impl_active_window_changed (priv->impl, window);
gtk_application_impl_active_window_changed (application->priv->impl, window);
g_object_notify_by_pspec (G_OBJECT (application), gtk_application_props[PROP_ACTIVE_WINDOW]);
}
@@ -870,8 +909,9 @@ gtk_application_finalize (GObject *object)
accels_finalize (&application->priv->accels);
G_OBJECT_CLASS (gtk_application_parent_class)
->finalize (object);
g_free (application->priv->help_overlay_path);
G_OBJECT_CLASS (gtk_application_parent_class)->finalize (object);
}
static void
+76 -2
View File
@@ -228,6 +228,8 @@ struct _GtkApplicationWindowPrivate
GMenu *menubar_section;
guint id;
GtkShortcutsWindow *help_overlay;
};
static void
@@ -788,9 +790,9 @@ gtk_application_window_dispose (GObject *object)
g_clear_object (&window->priv->app_menu_section);
g_clear_object (&window->priv->menubar_section);
g_clear_object (&window->priv->help_overlay);
G_OBJECT_CLASS (gtk_application_window_parent_class)
->dispose (object);
G_OBJECT_CLASS (gtk_application_window_parent_class)->dispose (object);
/* We do this below the chain-up above to give us a chance to be
* removed from the GtkApplication (which is done in the dispose
@@ -959,3 +961,75 @@ gtk_application_window_set_id (GtkApplicationWindow *window,
g_return_if_fail (GTK_IS_APPLICATION_WINDOW (window));
window->priv->id = id;
}
static void
show_help_overlay (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
{
GtkApplicationWindow *window = user_data;
if (window->priv->help_overlay)
gtk_widget_show (GTK_WIDGET (window->priv->help_overlay));
}
/**
* gtk_application_window_set_help_overlay:
* @window: a #GtkApplicationWindow
* @help_overlay: a #GtkShortcutsWindow
*
* Associates a shortcuts window with the application window, and
* sets up a action with the name win.show-help-overay to present
* it.
*
* Since: 3.20
*/
void
gtk_application_window_set_help_overlay (GtkApplicationWindow *window,
GtkShortcutsWindow *help_overlay)
{
g_return_if_fail (GTK_IS_APPLICATION_WINDOW (window));
g_return_if_fail (help_overlay == NULL || GTK_IS_SHORTCUTS_WINDOW (help_overlay));
if (window->priv->help_overlay)
g_signal_handlers_disconnect_by_func (window->priv->help_overlay,
G_CALLBACK (gtk_widget_hide_on_delete), NULL);
g_set_object (&window->priv->help_overlay, help_overlay);
if (!window->priv->help_overlay)
return;
gtk_window_set_modal (GTK_WINDOW (help_overlay), TRUE);
gtk_window_set_transient_for (GTK_WINDOW (help_overlay), GTK_WINDOW (window));
g_signal_connect (help_overlay, "delete-event",
G_CALLBACK (gtk_widget_hide_on_delete), NULL);
if (!g_action_map_lookup_action (G_ACTION_MAP (window->priv->actions), "show-help-overlay"))
{
GSimpleAction *action;
action = g_simple_action_new ("show-help-overlay", NULL);
g_signal_connect (action, "activate", G_CALLBACK (show_help_overlay), window);
g_action_map_add_action (G_ACTION_MAP (window->priv->actions), G_ACTION (action));
}
}
/**
* gtk_application_window_get_help_overlay:
* @window: a #GtkApplicationWindow
*
* Gets the #GtkShortcutsWindow that has been set up with
* a prior call to gtk_application_window_set_help_overlay().
*
* Returns: (transfer none) (nullable): the help overlay associated with @window, or %NULL
*
* Since: 3.20
*/
GtkShortcutsWindow *
gtk_application_window_get_help_overlay (GtkApplicationWindow *window)
{
g_return_val_if_fail (GTK_IS_APPLICATION_WINDOW (window), NULL);
return window->priv->help_overlay;
}
+8
View File
@@ -25,6 +25,7 @@
#endif
#include <gtk/gtkwindow.h>
#include <gtk/gtkshortcutswindow.h>
G_BEGIN_DECLS
@@ -78,6 +79,13 @@ gboolean gtk_application_window_get_show_menubar (GtkApplicationWindow *windo
GDK_AVAILABLE_IN_3_6
guint gtk_application_window_get_id (GtkApplicationWindow *window);
GDK_AVAILABLE_IN_3_20
void gtk_application_window_set_help_overlay (GtkApplicationWindow *window,
GtkShortcutsWindow *help_overlay);
GDK_AVAILABLE_IN_3_20
GtkShortcutsWindow *
gtk_application_window_get_help_overlay (GtkApplicationWindow *window);
G_END_DECLS
#endif /* __GTK_APPLICATION_WINDOW_H__ */
+6
View File
@@ -39,6 +39,10 @@
* derives from #GtkFrame, so it can draw a label and
* a frame around the child. The frame will be
* shrink-wrapped to the size of the child.
*
* # CSS nodes
*
* GtkAspectFrame uses a CSS node with name frame.
*/
#include "config.h"
@@ -129,6 +133,8 @@ gtk_aspect_frame_class_init (GtkAspectFrameClass *class)
P_("Force aspect ratio to match that of the frame's child"),
TRUE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
gtk_widget_class_set_css_name (GTK_WIDGET_CLASS (class), "frame");
}
static void
+29 -20
View File
@@ -50,6 +50,10 @@
* To add pages to an assistant in #GtkBuilder, simply add it as a
* child to the GtkAssistant object, and set its child properties
* as necessary.
*
* # CSS nodes
*
* GtkAssistant has a single CSS node with the name assistant.
*/
#include "config.h"
@@ -88,6 +92,7 @@ struct _GtkAssistantPage
gchar *title;
GtkWidget *box;
GtkWidget *page;
GtkWidget *regular_title;
GtkWidget *current_title;
@@ -184,7 +189,7 @@ static void on_assistant_cancel (GtkWidget *wid
GtkAssistant *assistant);
static void on_assistant_last (GtkWidget *widget,
GtkAssistant *assistant);
static void assistant_remove_page_cb (GtkNotebook *notebook,
static void assistant_remove_page_cb (GtkContainer *container,
GtkWidget *page,
GtkAssistant *assistant);
@@ -654,6 +659,8 @@ gtk_assistant_class_init (GtkAssistantClass *class)
gtk_widget_class_bind_template_callback (widget_class, on_assistant_back);
gtk_widget_class_bind_template_callback (widget_class, on_assistant_cancel);
gtk_widget_class_bind_template_callback (widget_class, on_assistant_last);
gtk_widget_class_set_css_name (widget_class, "assistant");
}
static gint
@@ -1099,9 +1106,9 @@ alternative_button_order (GtkAssistant *assistant)
}
static void
on_page_notify_visibility (GtkWidget *widget,
GParamSpec *arg,
gpointer data)
on_page_notify (GtkWidget *widget,
GParamSpec *arg,
gpointer data)
{
GtkAssistant *assistant = GTK_ASSISTANT (data);
@@ -1113,7 +1120,7 @@ on_page_notify_visibility (GtkWidget *widget,
}
static void
assistant_remove_page_cb (GtkNotebook *notebook,
assistant_remove_page_cb (GtkContainer *container,
GtkWidget *page,
GtkAssistant *assistant)
{
@@ -1122,15 +1129,6 @@ assistant_remove_page_cb (GtkNotebook *notebook,
GList *page_node;
GList *element;
if (GTK_IS_BOX (page))
{
GList *children;
children = gtk_container_get_children (GTK_CONTAINER (page));
page = GTK_WIDGET (children->data);
g_list_free (children);
}
element = find_page (assistant, page);
if (!element)
return;
@@ -1161,7 +1159,7 @@ assistant_remove_page_cb (GtkNotebook *notebook,
}
}
g_signal_handlers_disconnect_by_func (page_info->page, on_page_notify_visibility, assistant);
g_signal_handlers_disconnect_by_func (page_info->page, on_page_notify, assistant);
gtk_size_group_remove_widget (priv->title_size_group, page_info->regular_title);
gtk_size_group_remove_widget (priv->title_size_group, page_info->current_title);
@@ -1367,7 +1365,7 @@ find_page (GtkAssistant *assistant,
while (child)
{
GtkAssistantPage *page_info = child->data;
if (page_info->page == page)
if (page_info->page == page || page_info->box == page)
return child;
child = child->next;
@@ -1474,8 +1472,8 @@ gtk_assistant_remove (GtkContainer *container,
assistant->priv->content != NULL &&
gtk_widget_get_parent (box) == assistant->priv->content)
{
container = (GtkContainer *) assistant->priv->content;
gtk_container_remove (container, box);
gtk_container_remove (GTK_CONTAINER (box), page);
gtk_container_remove (GTK_CONTAINER (assistant->priv->content), box);
}
}
@@ -1798,7 +1796,13 @@ gtk_assistant_insert_page (GtkAssistant *assistant,
gtk_size_group_add_widget (priv->title_size_group, page_info->current_title);
g_signal_connect (G_OBJECT (page), "notify::visible",
G_CALLBACK (on_page_notify_visibility), assistant);
G_CALLBACK (on_page_notify), assistant);
g_signal_connect (G_OBJECT (page), "child-notify::page-title",
G_CALLBACK (on_page_notify), assistant);
g_signal_connect (G_OBJECT (page), "child-notify::page-type",
G_CALLBACK (on_page_notify), assistant);
n_pages = g_list_length (priv->pages);
@@ -1816,9 +1820,12 @@ gtk_assistant_insert_page (GtkAssistant *assistant,
gtk_widget_show (box);
gtk_box_pack_start (GTK_BOX (box), page, TRUE, TRUE, 0);
g_object_set (box, "margin", 12, NULL);
g_signal_connect (box, "remove", G_CALLBACK (assistant_remove_page_cb), assistant);
gtk_notebook_insert_page (GTK_NOTEBOOK (priv->content), box, NULL, position);
page_info->box = box;
if (gtk_widget_get_mapped (GTK_WIDGET (assistant)))
{
update_buttons_state (assistant);
@@ -2018,6 +2025,8 @@ gtk_assistant_set_page_title (GtkAssistant *assistant,
gtk_label_set_text ((GtkLabel*) page_info->regular_title, title);
gtk_label_set_text ((GtkLabel*) page_info->current_title, title);
update_title_state (assistant);
gtk_container_child_notify (GTK_CONTAINER (assistant), page, "title");
}
@@ -2415,7 +2424,7 @@ gtk_assistant_set_page_has_padding (GtkAssistant *assistant,
{
page_info->has_padding = has_padding;
g_object_set (gtk_widget_get_parent (page),
g_object_set (page_info->box,
"margin", has_padding ? 12 : 0,
NULL);
+32 -13
View File
@@ -478,7 +478,8 @@ gtk_builder_get_parameters (GtkBuilder *builder,
parameter.name = prop->pspec->name;
if (G_IS_PARAM_SPEC_OBJECT (prop->pspec) &&
(G_PARAM_SPEC_VALUE_TYPE (prop->pspec) != GDK_TYPE_PIXBUF))
(G_PARAM_SPEC_VALUE_TYPE (prop->pspec) != GDK_TYPE_PIXBUF) &&
(G_PARAM_SPEC_VALUE_TYPE (prop->pspec) != G_TYPE_FILE))
{
GObject *object = g_hash_table_lookup (builder->priv->objects,
prop->text->str);
@@ -597,14 +598,14 @@ _gtk_builder_add_object (GtkBuilder *builder,
g_hash_table_insert (builder->priv->objects, g_strdup (id), g_object_ref (object));
}
static inline void
static void
gtk_builder_take_bindings (GtkBuilder *builder,
GObject *target,
GSList *bindings)
{
GSList *l;
for (l = bindings; l; l = g_slist_next (l))
for (l = bindings; l; l = l->next)
{
BindingInfo *info = l->data;
info->target = target;
@@ -926,7 +927,7 @@ gtk_builder_create_bindings (GtkBuilder *builder)
{
GSList *l;
for (l = builder->priv->bindings; l; l = g_slist_next (l))
for (l = builder->priv->bindings; l; l = l->next)
{
BindingInfo *info = l->data;
GObject *source;
@@ -1445,14 +1446,6 @@ gtk_builder_get_object (GtkBuilder *builder,
return g_hash_table_lookup (builder->priv->objects, name);
}
static void
object_add_to_list (gchar *object_id,
GObject *object,
GSList **list)
{
*list = g_slist_prepend (*list, object);
}
/**
* gtk_builder_get_objects:
* @builder: a #GtkBuilder
@@ -1471,10 +1464,14 @@ GSList *
gtk_builder_get_objects (GtkBuilder *builder)
{
GSList *objects = NULL;
GObject *object;
GHashTableIter iter;
g_return_val_if_fail (GTK_IS_BUILDER (builder), NULL);
g_hash_table_foreach (builder->priv->objects, (GHFunc)object_add_to_list, &objects);
g_hash_table_iter_init (&iter, builder->priv->objects);
while (g_hash_table_iter_next (&iter, NULL, (gpointer *)&object))
objects = g_slist_prepend (objects, object);
return g_slist_reverse (objects);
}
@@ -2035,6 +2032,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
}
break;
case G_TYPE_OBJECT:
case G_TYPE_INTERFACE:
if (G_VALUE_HOLDS (value, GDK_TYPE_PIXBUF))
{
gchar *filename;
@@ -2093,6 +2091,27 @@ G_GNUC_END_IGNORE_DEPRECATIONS
g_free (filename);
ret = TRUE;
}
else if (G_VALUE_HOLDS (value, G_TYPE_FILE))
{
GFile *file;
if (g_hash_table_contains (builder->priv->objects, string))
{
g_set_error (error,
GTK_BUILDER_ERROR,
GTK_BUILDER_ERROR_INVALID_VALUE,
"Could not create file '%s': "
" '%s' is already used as object id",
string, string);
return FALSE;
}
file = g_file_new_for_uri (string);
g_value_set_object (value, file);
g_object_unref (G_OBJECT (file));
ret = TRUE;
}
else
+29 -30
View File
@@ -279,7 +279,7 @@ parse_object (GMarkupParseContext *context,
"Invalid object type '%s'", object_class);
_gtk_builder_prefix_error (data->builder, context, error);
return;
}
}
}
else if (type_func)
{
@@ -297,8 +297,7 @@ parse_object (GMarkupParseContext *context,
return;
}
}
if (object_type == G_TYPE_INVALID)
else
{
error_missing_attribute (data, element_name, "class", error);
return;
@@ -332,14 +331,13 @@ parse_object (GMarkupParseContext *context,
}
object_info = g_slice_new0 (ObjectInfo);
object_info->tag.name = element_name;
object_info->type = object_type;
object_info->oclass = g_type_class_ref (object_type);
object_info->id = (internal_id) ? internal_id : g_strdup (object_id);
object_info->constructor = g_strdup (constructor);
object_info->parent = (CommonInfo*)child_info;
state_push (data, object_info);
object_info->tag.name = element_name;
if (child_info)
object_info->parent = (CommonInfo*)child_info;
line = GPOINTER_TO_INT (g_hash_table_lookup (data->object_ids, object_id));
if (line != 0)
@@ -438,11 +436,12 @@ parse_template (GMarkupParseContext *context,
++data->cur_object_level;
object_info = g_slice_new0 (ObjectInfo);
object_info->tag.name = element_name;
object_info->type = parsed_type;
object_info->oclass = g_type_class_ref (parsed_type);
object_info->id = g_strdup (object_class);
object_info->object = gtk_builder_get_object (data->builder, object_class);
state_push (data, object_info);
object_info->tag.name = element_name;
line = GPOINTER_TO_INT (g_hash_table_lookup (data->object_ids, object_class));
if (line != 0)
@@ -465,6 +464,7 @@ static void
free_object_info (ObjectInfo *info)
{
/* Do not free the signal items, which GtkBuilder takes ownership of */
g_type_class_unref (info->oclass);
g_slist_free (info->signals);
g_slist_free_full (info->properties, (GDestroyNotify)free_property_info);
g_free (info->constructor);
@@ -512,11 +512,11 @@ parse_child (ParserData *data,
}
child_info = g_slice_new0 (ChildInfo);
state_push (data, child_info);
child_info->tag.name = element_name;
child_info->type = g_strdup (type);
child_info->internal_child = g_strdup (internal_child);
child_info->parent = (CommonInfo*)object_info;
state_push (data, child_info);
object_info->object = builder_construct (data, object_info, error);
}
@@ -546,8 +546,7 @@ parse_property (ParserData *data,
gboolean translatable = FALSE;
ObjectInfo *object_info;
GParamSpec *pspec = NULL;
GObjectClass *oclass;
gchar *canonical;
gint line, col;
object_info = state_peek_info (data, ObjectInfo);
if (!object_info ||
@@ -572,13 +571,7 @@ parse_property (ParserData *data,
return;
}
oclass = g_type_class_ref (object_info->type);
canonical = g_strdelimit (g_strdup (name), "_", '-');
g_assert (oclass != NULL);
pspec = g_object_class_find_property (oclass, canonical);
g_type_class_unref (oclass);
g_free (canonical);
pspec = g_object_class_find_property (object_info->oclass, name);
if (!pspec)
{
@@ -600,15 +593,20 @@ parse_property (ParserData *data,
}
}
g_markup_parse_context_get_position (data->ctx, &line, &col);
if (bind_source && bind_property)
{
BindingInfo *binfo = g_slice_new0 (BindingInfo);
BindingInfo *binfo;
binfo = g_slice_new (BindingInfo);
binfo->target = NULL;
binfo->target_pspec = pspec;
binfo->source = g_strdup (bind_source);
binfo->source_property = g_strdup (bind_property);
binfo->flags = bind_flags;
g_markup_parse_context_get_position (data->ctx, &binfo->line, &binfo->col);
binfo->line = line;
binfo->col = col;
object_info->bindings = g_slist_prepend (object_info->bindings, binfo);
}
@@ -620,16 +618,17 @@ parse_property (ParserData *data,
return;
}
info = g_slice_new0 (PropertyInfo);
info = g_slice_new (PropertyInfo);
info->tag.name = element_name;
info->pspec = pspec;
info->text = g_string_new ("");
info->translatable = translatable;
info->bound = (bind_source && bind_property);
info->context = g_strdup (context);
info->text = g_string_new ("");
state_push (data, info);
info->line = line;
info->col = col;
info->tag.name = element_name;
g_markup_parse_context_get_position (data->ctx, &info->line, &info->col);
state_push (data, info);
}
static void
@@ -1147,11 +1146,11 @@ end_element (GMarkupParseContext *context,
/* Called for character data */
/* text is not nul-terminated */
static void
text (GMarkupParseContext *context,
const gchar *text,
gsize text_len,
gpointer user_data,
GError **error)
text (GMarkupParseContext *context,
const gchar *text,
gsize text_len,
gpointer user_data,
GError **error)
{
ParserData *data = (ParserData*)user_data;
CommonInfo *info;

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