Compare commits

...

356 Commits

Author SHA1 Message Date
Matthias Clasen 9f43a46b80 Adwaita: Include sources in dist
These things are necessary to work on the Adwaita theme,
so include them in the tarball.
2014-06-13 13:08:29 -04:00
Matthias Clasen 2c62803015 Adwaita: Drop no-longer exising resources
These css files were optimized away a few commits ago.
2014-06-13 12:57:19 -04:00
Matthias Clasen 290e61a9c0 Adwaita: Drop obvious comments 2014-06-13 12:47:41 -04:00
Matthias Clasen e2aa229f1a Adwaita: Drop app-specific css 2014-06-13 12:47:16 -04:00
Matthias Clasen 45cb7fc1e9 Forgotten files 2014-06-13 12:46:29 -04:00
Matthias Clasen f2eeea69e0 Adwaita: Simplify css
Since this is now builtin, we don't need the extra redirection
anymore.
2014-06-13 12:23:40 -04:00
Matthias Clasen fb8b8de721 Adwaita: Drop unused assets
These were imported from gnome-themes-standard, but are not
referenced from the css.
2014-06-13 11:22:05 -04:00
Matthias Clasen a81d871e81 Use Adwaita as the default theme
This ensures that GTK+ applications have a high-quality theme on
all platforms, and look consistent.
2014-06-13 10:39:45 -04:00
Matthias Clasen 4389845bb8 Include the Adwaita theme
This adds the resources for the Adwaita theme, and includes them
in libgtk, on all platforms.
2014-06-13 10:32:44 -04:00
Matthias Clasen 4c95dbb05b Don't include the win32 theme on Linux
No need to carry around these resources when we are not
going to use them.
2014-06-13 10:30:36 -04:00
Matthias Clasen f1cf10fe86 Generate gtk.gresource.xml
This will help when including Adwaita. It will also let us
drop the win32 theme on Linux, hopefully.
2014-06-13 10:24:30 -04:00
Matthias Clasen 6fc65d5b0f Rename cursor pngs to their resource name
This allows us to get rid of some aliases in the .gresource.xml.
2014-06-13 09:28:27 -04:00
Matthias Clasen 6de3741f18 Move theme resources into subdirectories
Preparing for Adwaita to come in here.
2014-06-13 08:40:56 -04:00
Matthias Clasen 2e5cda99f8 inspector: Allow Escape to cancel picking 2014-06-13 06:10:23 -04:00
Matthias Clasen 404149b2bf inspector: Use a better icon for the picker
Recommended by Allan Day.
2014-06-13 06:10:23 -04:00
Matthias Clasen c1270a19c3 Trivial formatting fix 2014-06-13 06:10:23 -04:00
Carlos Garnacho 6d8842ca96 gesturesingle: Implement GtkGesture::cancel better than GtkEventController:reset
The former can be called individually on each sequence, and the latter will
always call the former on all currently active sequences, so only implementing
resetting on cancel() works for both cases. Also, chain up on subclasses
implementing cancel.

This fixes clicking on nautilus' file list after popping up a menu, as broken
grabs are one of those situations where sequences get cancelled individually,
the "current button" wasn't properly reset, and further clicks with button != 3
were ignored.
2014-06-13 01:27:31 +02:00
Carlos Garnacho 05810f80a4 textview: Unobscure the mouse cursor on motion events
This used to be done before the gestures port, and was removed
accidentally, so keep the motion_notify_event handler just for
this, and fallback to having those events handled by gestures
too.
2014-06-12 23:23:43 +02:00
Dieter Verfaillie daa8b48a33 Fix gtk_selection_data_get_data annotations
The annotations were intended for the return
value, not the instance argument.

https://bugzilla.gnome.org/show_bug.cgi?id=731299
2014-06-12 21:01:01 +02:00
Dieter Verfaillie 0c5b5fc053 docs: remove mention of old GtkList and GtkCList
Reported by andlabs in irc://irc.gnome.org/gtk+

https://bugzilla.gnome.org/show_bug.cgi?id=731382
2014-06-12 20:46:21 +02:00
Daniel Mustieles e3af863bcb Updated Spanish translation 2014-06-12 17:53:57 +02:00
Matthias Clasen 9bc07a2634 Add a message-dialog style class
This helps in separating message dialogs from other dialogs,
theming-wise.
2014-06-12 09:22:36 -04:00
Matthias Clasen e97cf2fd0b Add GTK_STYLE_CLASS_POPUP to the docs 2014-06-12 09:22:06 -04:00
Carlos Garnacho 3b636cbeb9 scrolledwindow: Deny scrolling sequences if pressed on the scrollbars
Scrollbars might be a bit too narrow for touch (and generally less useful
besides kinetic scrolling), but those should be functional nevertheless.
2014-06-12 15:17:47 +02:00
Carlos Garnacho 3ef1b387bc window: Only claim a button=1 press sequence when dragging is about to happen
This way plain clicks can be handled in gtkmain through the usual delivery mechanism,
and get possibly handled too by widgets holding a GTK+ grab. If window dragging is to
be started, the sequence will be claimed (and a grab will happen afterwards), notifying
properly the grabbing widget that event delivery was interrupted.

This makes it possible to dismiss popovers by clicking on window headerbars, while
still making it possible to drag the window with the popover opened.
2014-06-12 14:27:35 +02:00
Sjoerd Simons 5b118a9fd7 wayland: Ensure the touch sequence pointer value is non-null
Weston numbers its touch sequences ids starting from 0, thus simply
setting the GtkEvents touch.sequence to the touch id value typically
causes gdk_event_get_event_sequence to return NULL. Unfortunately this
confuses other parts of GDK.

As both weston & mutter keep the sequence id between 0..max_dev_touches
-1 simply use + 1 to keep the id > 0. While this isn't entirely correct
(compositor could send -1 as the touch id), this keeps the touch id in
gtk tied to the touch id from weston which is useful for debugging. A
more thorough solution could be done when it turns out this is an issue
in practise

https://bugzilla.gnome.org/show_bug.cgi?id=731371
2014-06-12 12:35:23 +02:00
Benjamin Otte 45a64cd7d4 testsuite: Add a test for symbolic icons in specific sizes
Check that loading symbolics works, even if the symbolic is only
available in a fixed size.
2014-06-12 12:34:09 +02:00
Matthias Clasen 5ef4d71b15 widget-factory: Add some tooltips 2014-06-12 05:53:31 -04:00
Dieter Verfaillie 072e215ff3 docs: fix link to language bindings page
Reported on irc://irc.gnome.org/gtk+ by Rena.

https://bugzilla.gnome.org/show_bug.cgi?id=731377
2014-06-11 23:03:00 -04:00
Matthias Clasen 5334fb8921 Drop GDK_MULTIHEAD_SAFE
We don't support multiple screens anymore, so there is no need
for marking API as multihead safe any longer.
2014-06-11 21:55:15 -04:00
Matthias Clasen 41fd2ae898 Deprecate outside-border style properties
These should just be replaced by CSS margins, etc.
2014-06-11 19:38:22 -04:00
Matthias Clasen 48db936b70 GtkButton: Don't use a non-zero border by default
The non-zero default default-border was causing buttons to shrink as
the focus moves around them. Themes which want a default-border should
define it explicitly.
2014-06-11 19:06:36 -04:00
Carlos Garnacho 3e65655424 treeview: Check that :row-activated is only emitted on GDK_BUTTON_PRIMARY
It turned out not all code was fully prepared to handle multiple buttons,
this avoids respawning https://bugzilla.gnome.org/show_bug.cgi?id=731020.
2014-06-11 23:18:34 +02:00
Carlos Garnacho f321d3a50a treeview: Make row area multipress gesture react to all buttons
The code is actually prepared for that, the gesture was initially limited
to only handling GDK_BUTTON_PRIMARY because it only used to handle row
activation.
2014-06-11 23:01:31 +02:00
Carlos Garnacho e114717097 treeview: Remove unused variables from priv struct
These variables were last used before moving row activation to being
managed by a gesture.
2014-06-11 17:36:04 +02:00
Carlos Garnacho 89f38b5fc6 treeview: Move all button press/release management to the multipress gesture
The multipress gesture on the bin window now also does all the business related
to row selection. As row selection and activation can't be easily decoupled, this
fixes certain problems around ::row-activated being emitted on NULL paths.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=731455 and
https://bugzilla.gnome.org/show_bug.cgi?id=731018
2014-06-11 17:36:04 +02:00
Carlos Garnacho 3f084e3ab5 treeview: Use drag gesture for rubberband selection/DnD
This gesture acts only on events from the bin window, and checks that
either the pressed row is draggable, or the conditions for rubberband
selection apply.
2014-06-11 17:36:03 +02:00
Carlos Garnacho 50491f15ae treeview: Use gestures for column dragging/resizing
A multipress gesture takes care of autosizing on double click, and
a drag gesture is used for both column dragging/resizing (only one
can happen at a time).
2014-06-11 17:36:03 +02:00
Carlos Garnacho b8886436b3 treeviewcolumn: Avoid a device position query
This happens in an event handler, and the button event should be
expected to have the right coordinates on the event window already.
2014-06-11 17:36:03 +02:00
Carlos Garnacho 20a59985fe gesturesingle: Ensure the current button stays set until after the touch/button release
This makes gtk_gesture_get_current_button() work properly on GtkGesture::end, and signals
spawn from there on subclasses.
2014-06-11 17:36:03 +02:00
Matthias Clasen e7b3d8b414 GtkPaned: Make sure the raise the handle window above children
We need to show child windows and handle in the right order,
otherwise the input-only handle window ends up under the children
where it is useless.
2014-06-11 09:33:30 -04:00
Matthias Clasen 77cb6d8b4a GtkTooltip: Ignore shadow when finding widgets
When placing tooltips, the csd shadow will get 'pushed up' and
may end up underneath the pointer. We don't want this to cause
the tooltip to be hidden, because that leads to flickering, so
ignore the shadow when finding the widget under the pointer.
2014-06-11 00:04:04 -04:00
Matthias Clasen 2d05bf1492 csd: Fix non-resizable windows
For csd override-redirect windows, we don't set up resize handles,
but we were not ignoring the margin in all places, causing some
size calculations to go wrong.
2014-06-11 00:04:04 -04:00
Matthias Clasen a4b0d35649 Don't mention no longer existing widgets in the docs
GtkText, GtkList and GtkCList don't exist anymore.
2014-06-11 00:04:04 -04:00
Benjamin Otte 200bdf1aec stylecontext: Get rid of StyleData struct
It's now just a GtkCssComputedValues + refcount. And
GtkCssComputedValues has its own refcount, so use that one instead.
2014-06-11 01:18:05 +02:00
Benjamin Otte 57c4f01e0d stylecontext: Move property cache
... from per style data to only existing once per style context. This is
technically an API break because it no longer allows getting different
style properties between save()/restore() pairs, but I don't think this
was ever intended to work that way, as the style property API was to be
used and is used via gtk_widget_get_style().

And it simplifies code a lot.
2014-06-11 01:18:05 +02:00
Benjamin Otte 6f2eb1d627 docs: Remove unused variable 2014-06-11 01:18:04 +02:00
Benjamin Otte 6affe29c9a testsuite: Add missing errors file
The file was forgotten in 98954bd1d1 and
caused test failure. Oops.
2014-06-11 01:18:04 +02:00
Benjamin Otte 4a6957f50d stylecontext: Remove state from _peek_style_property()
It evaluates to "current state" in all cases, so no need to special case
it.
2014-06-11 01:18:04 +02:00
Matthias Clasen e51e8a28dd gtk3-demo: Use monospace font for source code 2014-06-10 18:47:49 -04:00
Robert Ancell b95a6c7c62 GdkDisplay: Remove unused GdkKeyboardGrabInfo struct
I can't find anything that uses this struct and it seems to be replaced by GdkDeviceGrabInfo
2014-06-11 08:30:04 +12:00
Benjamin Otte d1dd33d885 css: Fix uninitializaed variable 2014-06-10 15:58:17 +02:00
Matthias Clasen b0c6263f6c inspector: Add combobox popups to the tree 2014-06-10 08:54:12 -04:00
Matthias Clasen ec9cf6d7c3 GtkComboBox: Add private api to get the popup
This will be used to make the popup appear in the inspector.
2014-06-10 08:54:12 -04:00
Matthias Clasen 634972e063 inspector: Add submenus to the tree 2014-06-10 08:54:12 -04:00
Benjamin Otte c906aa7e08 menuitem: Use .arrow style class for submenu indicators
As requested by the Adwaita guys.
2014-06-10 13:47:51 +02:00
Benjamin Otte b21c86f49a treeview: Remove unused variable 2014-06-10 13:47:51 +02:00
Benjamin Otte cdd341ed7d viewport: Remove unused variable 2014-06-10 13:47:51 +02:00
Benjamin Otte 8ea013290b cellrenderertoggle: Remove copy/paste leftovers
Introduced in 2d88a3ae30
2014-06-10 13:47:51 +02:00
Matthias Clasen b355493d12 docs: Add GtkActionBar to the type list
Without this, we don't get object hierarchy, among other things.
2014-06-09 21:41:43 -04:00
Matthias Clasen 5b5cf89a63 Add GtkActionBar and GtkSearchBar to visual index
These were missing.
2014-06-09 21:41:43 -04:00
Benjamin Otte 4b793dd508 a11y: Remove an outdated comment 2014-06-10 01:17:00 +02:00
Benjamin Otte 98954bd1d1 testsuite: Add a test for recent fix 2014-06-10 01:07:57 +02:00
Benjamin Otte 3759190c26 css: Parse text-shadow values properly
We used to accept the same syntax for text-shadow and icon-shadow as
we accept for box-shadow. However, box-shadow does accept a spread and
the inset keyword while the others should not.
2014-06-10 01:07:57 +02:00
Joanmarie Diggs fc00381d30 GtkEntryAccessible: Emit signal after insertion
The signal needs to be emitted after the text insertion as at-spi gets
the text to compute the inserted text due to the AtkText::insert-text
signal not containing it.
Also adjust position to reflect changes to the offsets.

https://bugzilla.gnome.org/show_bug.cgi?id=731429
2014-06-10 01:07:57 +02:00
Matthias Clasen fbc6a0c400 Add some theming for csd popups
Not attempt to make this look good, just to demonstrate
that themes can in fact do it.

https://bugzilla.gnome.org/show_bug.cgi?id=731187
2014-06-09 14:16:12 -04:00
Matthias Clasen a39985a43e Request csd for tooltips
Use the new private GtkWindow api to request
client-side decorations for tooltips.

https://bugzilla.gnome.org/show_bug.cgi?id=731187
2014-06-09 14:15:28 -04:00
Matthias Clasen 179d6a4c7b GtkTooltip: take csd shadows into account for placement
When placing tooltips, we don't want the shadow to influence
our choice.

https://bugzilla.gnome.org/show_bug.cgi?id=731187
2014-06-09 14:15:28 -04:00
Matthias Clasen 49bb39ecf5 GtkTooltip: remove hardcoded tooltip drawing
This is old code from dating back many years. Nowadays, we can
just use css drawing and csd windows to achieve much the same
effect.

Themes will need some adjustment for this change.

https://bugzilla.gnome.org/show_bug.cgi?id=731187
2014-06-09 14:15:27 -04:00
Matthias Clasen dae252e3d2 Request csd for menus
Use the new private GtkWindow api to request
client-side decorations for menus.

https://bugzilla.gnome.org/show_bug.cgi?id=731187
2014-06-09 14:15:24 -04:00
Matthias Clasen 3cf916be8a GtkMenu: Add a separate style class to the toplevel of menus
This is necessary in order to use .window-frame.csd.popup for
styling csd menus.

https://bugzilla.gnome.org/show_bug.cgi?id=731187
2014-06-09 14:14:48 -04:00
Matthias Clasen e9ed210b0b GtkMenu: take csd shadows into account for placement
When placing menus, we don't want the shadow to influence
our choice.

https://bugzilla.gnome.org/show_bug.cgi?id=731187
2014-06-09 14:01:42 -04:00
Matthias Clasen bde4e86357 Allow csd for override-redirect windows
This commit makes it possible to use client-side decorations for
override-redirect windows by calling _gtk_window_request_csd()
before realizing the window. Since the wm won't do interactive
resizing for us in this case anyway, don't bother creating
the border windows we use for this purpose on regular toplevels.

To make this accessible to themes, we set a "csd" style class
on client-side decorated windows. With this, .window-frame.csd.menu
can be used to define the shadow for csd menus, and .menu can be
used to define a border for menus under non-composited wms.

https://bugzilla.gnome.org/show_bug.cgi?id=731187
2014-06-09 14:01:42 -04:00
Matthias Clasen 60cd7076cf Add a csd style class
This will be used for client-side decorated windows.

https://bugzilla.gnome.org/show_bug.cgi?id=731187
2014-06-09 14:01:42 -04:00
Matthias Clasen b22b2298be GtkViewport: Don't do silly things in a setter
Just queue a resize instead of fiddling with the size allocation.
2014-06-09 13:51:58 -04:00
Matthias Clasen ee8a3a4192 Mark GtkStyleContext::direction as deprecated
The setter was deprecated a while ago, do the same for the property.
2014-06-09 13:42:07 -04:00
Matthias Clasen ac2329b842 Mark GtkContainer::resize-mode as deprecated
The setter was deprecated a while ago, do the same for the property.
2014-06-09 13:39:38 -04:00
Matthias Clasen f870a50f1f Add a test for property notification
This tests just a few basic things for now. Mainly, that we don't
emit redundant notifications for enum, flags, int and boolean
properties. It also checks that we do emit the expected notifications
when the value actually changes. This is checked for string, double
and float properties as well.

There is a large number of exceptions in the test, and a lot more
checks that could be done. One class of exceptions is all the places
where we have -set booleans to go along with another property. We
should have a dedicated test for these pairs. Another class of
exceptions is where naked objects created by g_object_new () just
don't have the full functionality - e.g. a tree selection without
a tree view does not work very well. We set up the instance object
better for these situations.
2014-06-09 13:31:14 -04:00
Matthias Clasen 46803aae11 GtkVolumeButton: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:14 -04:00
Matthias Clasen bcd804613f GtkViewport: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:14 -04:00
Matthias Clasen 785e4d376e GtkTreeViewColumn: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:13 -04:00
Matthias Clasen fe31f87bf0 GtkTreeView: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:13 -04:00
Matthias Clasen d169f409b0 GtkTreeSelection: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:13 -04:00
Matthias Clasen 71ac4d626e GtkToolPalette: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:13 -04:00
Matthias Clasen cf6274c979 GtkToolItemGroup: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:13 -04:00
Matthias Clasen 40c3804ecd GtkToolbar: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:12 -04:00
Matthias Clasen 6e64bc13de GtkTextView: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:12 -04:00
Matthias Clasen eed1ae682b GtkSwitch: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:12 -04:00
Matthias Clasen 17059f9c17 GtkToolItem: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:12 -04:00
Matthias Clasen 3074fcf31d GtkToolButton: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:11 -04:00
Matthias Clasen db8101c998 GtkToggleToolButton: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:11 -04:00
Matthias Clasen b73e810613 GtkStyleContext: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:11 -04:00
Matthias Clasen 1208539eff GtkStatusIcon: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:10 -04:00
Matthias Clasen 9321b30b0b GtkSpinner: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:10 -04:00
Matthias Clasen d03752cdcc GtkSpinButton: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:10 -04:00
Matthias Clasen 83669856b2 GtkSizeGroup: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:09 -04:00
Matthias Clasen 4867e95291 GtkSeparatorToolItem: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:09 -04:00
Matthias Clasen 710a5b3a90 GtkSearchBar: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:09 -04:00
Matthias Clasen 115faae371 GtkSearchBar: Handle lack of an entry
We were not dealing with the possibility of priv->entry being
NULL in all places.
2014-06-09 13:31:09 -04:00
Matthias Clasen 0dd1102cc4 GtkSeparator: Explicitly notify orientation 2014-06-09 13:31:08 -04:00
Matthias Clasen ed6f9c1ee9 GtkScrolledWindow: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:08 -04:00
Matthias Clasen 570194640e GtkScrollable: Use G_PARAM_EXPLICIT_NOTIFY
Implementors will have to be adjusted.
2014-06-09 13:31:08 -04:00
Matthias Clasen 0505a189d3 GtkScaleButton: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:08 -04:00
Matthias Clasen 1740663584 GtkScale: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:07 -04:00
Matthias Clasen f80ff85745 GtkRecentChooserMenu: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:07 -04:00
Matthias Clasen e6f413c6a7 GtkRange: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:07 -04:00
Matthias Clasen f446ffdd5d GtkProgressbar: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:07 -04:00
Matthias Clasen e1d1ed863e GtkPrintOperation: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:07 -04:00
Matthias Clasen 8915e9cf42 GtkPopover: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:06 -04:00
Matthias Clasen 22cc9749c9 GtkPaned: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:06 -04:00
Matthias Clasen c93355616f GtkNotebook: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:06 -04:00
Matthias Clasen 47615f32bf GtkMessageDialog: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:06 -04:00
Matthias Clasen c1540464b7 GtkMenuShell: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:06 -04:00
Matthias Clasen cfbfeb1b3c GtkMenuButton: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:06 -04:00
Matthias Clasen 0d528ab391 GtkMenuBar: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:05 -04:00
Matthias Clasen 60fbb2bb89 GtkMenu: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:05 -04:00
Matthias Clasen 3f3f26d8a1 GtkLinkButton: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:05 -04:00
Matthias Clasen 45c84a63a3 GtkLevelBar: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:05 -04:00
Matthias Clasen 46828a41b0 GtkLayout: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:05 -04:00
Matthias Clasen 6ac00a7ff7 GtkInfoBar: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:04 -04:00
Matthias Clasen 726d603f61 GtkIMContext: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:04 -04:00
Matthias Clasen 720561475d GtkIconView: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:04 -04:00
Matthias Clasen 68673963fc GtkImage: Use G_PARAM_EXPLICIT_NOTIFY
And make use of the new icon helper API to avoid
redundant notification.
2014-06-09 13:31:04 -04:00
Matthias Clasen 7e40d74b0b GtkIconHelper: Change setters to return success
This makes it easier to avoid redundant notifications in users.
2014-06-09 13:31:04 -04:00
Matthias Clasen d1f6858b36 GtkHeaderBar: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:04 -04:00
Matthias Clasen efc2166c25 GtkGrid: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:03 -04:00
Matthias Clasen f195322254 GtkGestureSingle: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:03 -04:00
Matthias Clasen 11224f521d GtkGesturePan: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:03 -04:00
Matthias Clasen 372223ac94 GtkRecentChooserDefault: Adapt to explicit notify 2014-06-09 13:31:03 -04:00
Matthias Clasen f6e5f88454 GtkRecentChooser: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:03 -04:00
Matthias Clasen 92e30dadc2 GdkOffscreenWindow: Fill in a few more vfuncs
Mostly to avoid special cases in testcases.
2014-06-09 13:31:03 -04:00
Matthias Clasen 110f859899 GtkEventController: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:02 -04:00
Matthias Clasen eebb73032a GtkFontButton: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:02 -04:00
Matthias Clasen 2a7bed6858 GtkFontButton Trivial cleanup
Replace GTK_PARAM_READABLE|GTK_PARAM_WRITABLE by GTK_PARAM_READWRITE.
2014-06-09 13:31:02 -04:00
Matthias Clasen eb34ff5b48 GtkFontButton: Fix the handling of show-preview-button
We were not storing the value at all, and not notifying.
2014-06-09 13:31:02 -04:00
Matthias Clasen 595a44680a GtkFontChooser: Use G_PARAM_EXPLICIT_NOTIFY for show-preview-entry
Implementors will have to be adjusted.
2014-06-09 13:31:01 -04:00
Matthias Clasen 6877253e14 GtkFlowBox: Explicitly notify orientation 2014-06-09 13:31:01 -04:00
Matthias Clasen 43ba93971c GtkExpander: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:01 -04:00
Matthias Clasen 544b5b0fe6 GtkEventBox: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:01 -04:00
Matthias Clasen e3dc90dc9b GtkToggleButton: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:01 -04:00
Matthias Clasen bce70ca75e GtkMenuItem: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:00 -04:00
Matthias Clasen 3ae562aca2 GtkFrame: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:31:00 -04:00
Matthias Clasen 331c28b369 GtkEntryCompletion: Use G_PARAM_EXPLICIT_NOTIFY
Also, use the setter for text-column, internally.
2014-06-09 13:31:00 -04:00
Matthias Clasen 07af47ce3e GtkEntryBuffer: Use G_PARAM_EXPLICIT_NOTIFY
Also avoid redundant notification for max-length.
2014-06-09 13:31:00 -04:00
Matthias Clasen ec6056a574 GtkEntry: Explicitly notify for populate-all 2014-06-09 13:30:59 -04:00
Matthias Clasen 056acf92ec GtkEntry: Don't forget to notify for the tooltip markup props 2014-06-09 13:30:59 -04:00
Matthias Clasen c411de437a GtkColorChooserWidget: Explicitly notify for use-alpha 2014-06-09 13:30:59 -04:00
Matthias Clasen a215a4c762 GtkColorChooserDialog: Explicitly notify for use-alpha 2014-06-09 13:30:59 -04:00
Matthias Clasen d5a119ae9b GtkColorChooser: Use G_PARAM_EXPLICIT_NOTIFY for use-alpha
Implementors will need to adjust.
2014-06-09 13:30:58 -04:00
Matthias Clasen b28123dd3c GtkColorButton: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:58 -04:00
Matthias Clasen 2f82250cc1 GtkCheckMenuItem: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:58 -04:00
Matthias Clasen bfc1a2118f GtkCellView: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:58 -04:00
Matthias Clasen d33b14bfbe GtkCellView: Explicitly notify for orientation 2014-06-09 13:30:57 -04:00
Matthias Clasen 2d88a3ae30 GtkCellRendererToggle: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:57 -04:00
Matthias Clasen c96f5b953a GtkCellRendererText: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:57 -04:00
Matthias Clasen ce76a47d68 GtkCellRendererSpin: Use G_PARAM_EXPLICIT_NOTIFY
Also avoid redundant notification for ::digits.
2014-06-09 13:30:56 -04:00
Matthias Clasen 31654f4515 GtkCellRendererProgress: Use G_PARAM_EXPLICIT_NOTIFY
Also add explicit notification and avoid redundant notification
for some properties.
2014-06-09 13:30:56 -04:00
Matthias Clasen af4d142df5 GtkCellRendererCombo: Use G_PARAM_EXPLICIT_NOTIFY
And add explicit notification for some properties.
2014-06-09 13:30:56 -04:00
Matthias Clasen da4a1e1594 GtkCellRenderer: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:56 -04:00
Matthias Clasen be25e4ebcb GtkCellAreaBox: Explicitly notify orientation 2014-06-09 13:30:56 -04:00
Matthias Clasen 510c2cdfb6 GtkWindow: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:55 -04:00
Matthias Clasen 05cabd3557 GtkWindow: Trivial cleanup 2014-06-09 13:30:55 -04:00
Matthias Clasen 8677446fe0 GtkLabel: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:55 -04:00
Matthias Clasen 1720eb4713 GtkComboBox: Notify for has-frame and editing-canceled 2014-06-09 13:30:55 -04:00
Matthias Clasen 9722ae0458 GtkCellEditable: Use G_PARAM_EXPLICIT_NOTIFY
This is an interface property, so all implementors will have
to adjust to this.
2014-06-09 13:30:55 -04:00
Matthias Clasen 5ce3d8e74f GtkAppChooserButton: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:54 -04:00
Matthias Clasen d6cae074a6 GtkContainer: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:54 -04:00
Matthias Clasen acad03f77b GtkWidget: Use G_PARAM_EXPLICIT_NOTIFY
A few properties here are special, and can't benefit from it:
those which are just shorthands, like ::margin and ::expand,
and those that have explicit -set properties, like::hexpand
and ::vexpand.
2014-06-09 13:30:54 -04:00
Matthias Clasen 2e04899ee5 GtkOrientable use G_PARAM_EXPLICIT_NOTIFY
This one is a little tricky, since we override this property
in many places, and you cannot add flags when overriding. So,
all places where this is overridden will have to make sure to
notify explicitly.
2014-06-09 13:30:54 -04:00
Matthias Clasen 126942f04c GtkEntry: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:54 -04:00
Matthias Clasen 1139b21997 GtkCellRendererText: Use G_PARAM_EXPLICIT_NOTIFY for 'alignment' 2014-06-09 13:30:54 -04:00
Matthias Clasen 8b1757b6e0 GtkCellAreaBox: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:54 -04:00
Matthias Clasen d5c56ea780 GtkCalendar: Use G_PARAM_EXPLICIT_NOTIFY
And make sure we correctly notify for all properties.
2014-06-09 13:30:53 -04:00
Matthias Clasen c5c3c335a6 GtkAspectFrame: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:53 -04:00
Matthias Clasen b9e7d1e8a6 GtkApplicationWindow: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:53 -04:00
Matthias Clasen 1bb880af36 GtkApplicationWindow: Avoid a crash
In several places, we were not correctly dealing with the
possibility of application not being set.
2014-06-09 13:30:53 -04:00
Matthias Clasen 81c35b5b6e GtkAppChooserWidget: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:53 -04:00
Matthias Clasen ed28a71bf2 GtkAppChooserButton: Fix a possible crash
We were not correctly dealing with content_type being NULL
in one place.
2014-06-09 13:30:53 -04:00
Matthias Clasen 5727a86760 GdkDevice: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:53 -04:00
Matthias Clasen a27ba44331 GtkComboBox: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:53 -04:00
Matthias Clasen 5e04bd04c8 GtkCellRendererSpinner: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:52 -04:00
Matthias Clasen f4e60bc36d GtkCellRendererAccel: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:52 -04:00
Matthias Clasen e423c045d5 GtkButtonBox: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:52 -04:00
Matthias Clasen f531b0757c GtkBox: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:52 -04:00
Matthias Clasen 06564f5df6 GtkBox: Convert to g_object_install_properties 2014-06-09 13:30:52 -04:00
Matthias Clasen e54525729e GtkBox: Move overridden property ids to the end
This will make it easier to convert to g_object_install_properties
in the next commit.
2014-06-09 13:30:52 -04:00
Matthias Clasen d218e17a2a GtkButton: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:52 -04:00
Matthias Clasen 62d591a550 GtkButton: Convert to g_object_class_install_properties 2014-06-09 13:30:51 -04:00
Matthias Clasen fba83da3ee GtkAccelLabel: use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:51 -04:00
Matthias Clasen 10f8ea27bf GtkAccelLabel: Convert to g_object_class_install_properties 2014-06-09 13:30:51 -04:00
Matthias Clasen bc46df34fc GtkAboutDialog: Use a setter for wrap-license
This avoids redundant notification.
2014-06-09 13:30:51 -04:00
Matthias Clasen 09a589b716 GtkAboutDialog: Fix a parameter check
When we expanded the GtkLicense enumeration in 3.12, we forgot
to update the limit check in gtk_about_dialog_set_license_type.
Caught by testing property notification for enum properties.
2014-06-09 13:30:51 -04:00
Matthias Clasen 06ab3e7477 GtkAboutDialog: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:51 -04:00
Matthias Clasen c8acad2816 GtkAboutDialog: Convert to g_object_class_install_properties 2014-06-09 13:30:51 -04:00
Matthias Clasen fae5302eae GtkRevealer: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:51 -04:00
Matthias Clasen 07e180fef0 GtkRevealer: Convert to g_object_class_install_properties 2014-06-09 13:30:51 -04:00
Matthias Clasen 51d17910a1 GtkFlowBox: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:50 -04:00
Matthias Clasen b549e52c2c GtkFlowBox: Convert to g_object_class_install_properties 2014-06-09 13:30:50 -04:00
Matthias Clasen 45801c8f2c GtkFlowBox: Move overridden prop ids to the end
This makes it easier to convert to g_object_class_install_properties
in the next commit.
2014-06-09 13:30:50 -04:00
Matthias Clasen ac08d6a421 GtkFlowBox: Drop unused prop ids
No h/valign properties here.
2014-06-09 13:30:50 -04:00
Matthias Clasen 6e03ac9958 GtkListBox: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:50 -04:00
Matthias Clasen d591341bd1 GtkStack: Avoid a few redundant notify emissions
A few of the property setters were missing the
standard checks.
2014-06-09 13:30:50 -04:00
Matthias Clasen 0a681f9224 GtkStack: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:49 -04:00
Matthias Clasen 1edfc8c372 Bump required GLib version
For G_PARAM_EXPLICIT_NOTIFY.
2014-06-09 13:30:49 -04:00
Benjamin Otte bb3174c913 reftests: Fix random failures of reftest
The reftest is testing "transparent" works as expected by drawing a
purple background once with purple and once with transparent and
expecting the same result. This works fine unless anti-aliasing happens
at rounded corners. The overdraw of the 2nd background changes the
antialiased pixels.

Fix this by explicitly setting the border radius to 0.

Also reindent the file to make it more readable.
2014-06-09 19:18:48 +02:00
Chun-wei Fan 37fbffaa1c Fix MSVC 2008 Projects
...Make up for a missed 
 required for a new line in commands...
2014-06-09 14:39:35 +08:00
Chun-wei Fan e26bdbda9b MSVC Builds: Update Introspection Build
The a11y headers are now listed with the main Makefile.am of GTK, and
GDK introduced deprecated headers, so we need to account for them for the
build of the introspection files.
2014-06-09 12:44:46 +08:00
Chun-wei Fan bdc9d17edc Visual Studio Builds: Update Headers "Installation" 2014-06-09 12:42:56 +08:00
Chun-wei Fan 8e88a2e136 MSVC 2010+ Projects: Update "Installation" Process
Currently, due to the way that Visual Studio 2010+ projects are handled,
the "install" project does not re-build upon changes to the sources, as it
does not believe that its dependencies have changed, although the changed
sources are automatically recompiled.  This means that if a part or more
of the solution does not build, or if the sources need some other fixes
or enhancements, the up-to-date build is not copied automatically, which
can be misleading.

Improve on the situation by forcing the "install" project to trigger its
rebuild, so that the updated binaries can be copied.  This does trigger an
MSBuild warning, but having that warning is way better than not having an
up-to-date build, especially during testing and development.
2014-06-09 11:48:54 +08:00
Juan R. Garcia Blanco 15c34b22d2 inspector: Fix build with quartz backend
Add -xobjective-c to libgtkinspector_la_CFLAGS to handle objc headers.
2014-06-08 11:52:45 +02:00
Matthias Clasen 111b3bca0b docs: Sort style classes alphabetically
Otherwise, it is pretty hard to keep track of what
classes are missing from the list. As a consequence,
several of the existing classes were missing. Add those
at the same time.
2014-06-06 22:07:15 -04:00
Matthias Clasen 3aa1350bd0 GtkWindow: always input-shape csd windows
Even if we don't have border windows, we need to set the input
shape so we ignore clicks in the shadow region.
2014-06-06 22:07:14 -04:00
Matthias Clasen 3266b4dd9b inspector: Make picking more robust
Apparently ClutterOffscreen returns NULL as a window.
While that is not cool, we shouldn't crash.
2014-06-06 13:35:40 -04:00
Matthias Clasen 02a44c454c GtkDialog: Be a little more careful about button placement
We were applying response based heuristics, even if the button
is explicitly put in the headerbar. That broke button placement
in some epiphany dialogs, such as the Cookies one. Therefore,
restrict the heuristics to action widgets that are added through
gtk_widget_add_action_widget() or <child type="action">, where it
is not possible to specify placement explicitly.
2014-06-06 13:00:06 -04:00
Matthias Clasen 9c6c4fdeb8 GtkDialog: avoid a crash
Just because use-header-bar is set, it is not safe to assume
every action widget is in the headerbar, so be careful when
setting child properties.
2014-06-06 12:20:57 -04:00
Florian Müllner add67b516c wayland: Explicitly handle classic mode for now
There are plans to add session-dependent defaults to GSettings
(based on the newly standardized XDG_CURRENT_DESKTOP); until
then, the WM uses a different schema for its button-layout
setting in classic mode. So for the time being, do the same
and pick the alternative schema when XDG_CURRENT_DESKTOP
indicates that we are in a classic session.
(It's not pretty, but hopefully won't be with us for too long ...)

https://bugzilla.gnome.org/show_bug.cgi?id=731273
2014-06-06 15:32:59 +02:00
Florian Müllner f4c963ef74 wayland: Set gtk-decoration-layout
Pick up the setting from the org.gnome.desktop.wm.preferences schema
if available. It is slightly more involved than other settings, as
the actual button names used in the schema differ from the ones we
use, so we need an additional translation step.

https://bugzilla.gnome.org/show_bug.cgi?id=731273
2014-06-06 15:32:59 +02:00
Chun-wei Fan d8de23bef6 gtk/gtkkineticscrolling.c: Include fallback-c89.c
... as round() is being used, which is for C99 and later.  fallback-c89.c
includes math.h as well.
2014-06-06 14:47:19 +08:00
Matthias Clasen 763f0a37c1 inspector: Avoid a crash
An unset action-name should not cause us to crash.
2014-06-05 21:08:56 -04:00
Matthias Clasen 1e63d94a06 widget-factory: Avoid a crash
We want to be able to show the dialogs more than once, so just
hide them on delete.
2014-06-05 18:46:50 -04:00
Matthias Clasen 7aadd6fd2e Remove unintentional addition
Debugging leftovers.
2014-06-05 18:12:42 -04:00
Matthias Clasen fbc3c1494f widget-factory: Show some 'standard' dialog types
Add examples for the types of dialog that are mentioned
in the GNOME HIG: information dialogs, action dialogs and
preference dialogs.
2014-06-05 18:08:45 -04:00
Matthias Clasen d724175e49 GtkDialog: Improve the buildable implementation
When combining action child type with <action-widgets> to assign
response ids, we were not properly updating buttons that ended up
getting added to the headerbar before they have a response id.
Fix this by reapplying the headerbar button setup after parsing
<action-widgets>, and make sure to also update the suggested-action
style class.
2014-06-05 18:08:45 -04:00
Matthias Clasen 85a4b65f11 Trivial string change
Capitalize 'Expander' in the widget-factory UI.
2014-06-05 18:08:44 -04:00
Carlos Garnacho 246e6cd0b9 combobox: Fix reentrancy in gtk_combo_box_popdown()
If called when already popped down, warnings would be issued due
to priv->grab_pointer being unexpectedly NULL, this would happen
in regular operation when selecting items in appears-as-list mode.

So both add a NULL check for priv->grab_pointer, and bail out early
if the popup window is already hidden.
2014-06-05 21:16:05 +02:00
Piotr Drąg 0e8e550187 Updated POTFILES.in and POTFILES.skip 2014-06-05 17:27:15 +02:00
Lieven van der Heide 828594d5bd scrolledwindow: Replace kinetic scrolling with GtkKineticScrolling
Two GtkKineticScrolling helpers are used, one per axis direction.

https://bugzilla.gnome.org/show_bug.cgi?id=729608
2014-06-05 16:49:23 +02:00
Lieven van der Heide c726226825 gtk: Add kinetic scrolling helper
GtkKineticScrolling implements the actual physics laws for friction
and springs. When created, position/velocity/boundaries/constants are
given, so at every gtk_kinetic_scrolling_tick() it returns the current
position, and whether the system is in rest.

https://bugzilla.gnome.org/show_bug.cgi?id=729608
2014-06-05 16:49:23 +02:00
Carlos Garnacho 3ffb4fa699 flowbox: Use gestures for event management
A multipress gesture takes care of item selection/activation, and
a drag gesture is used to manage events when rubberbanding selection
is performed.
2014-06-05 16:15:54 +02:00
Carlos Garnacho 933ff62f66 listbox: Use multipress gesture for row selection/activation
This gesture replaces the button_press/release_event handlers.
2014-06-05 16:15:54 +02:00
Carlos Garnacho 8dcdec58eb label: Use gestures for event management
A multipress gesture takes care of link handling, and char/word/all
selection mode on selectable labels. A drag gesture is used for both
text selection and DnD checks on selectable labels.
2014-06-05 16:15:54 +02:00
Carlos Garnacho 26dff0d783 range: Use GtkGesture for event management
A multipress gesture takes care of clicks, and where those happened.
If the click is meant to move the slider while pressed, the drag gesture
takes over, dragging the slider while active.
2014-06-05 16:15:54 +02:00
Carlos Garnacho fbb3fdda8c expander: Use multipress gesture for event management
This actually acts regardless of the value n_press, alternatively
expanding and collapsing the GtkExpander.
2014-06-05 16:15:54 +02:00
Carlos Garnacho 90424289fb widget: reset all controllers when the widget becomes insensitive
Widgets becoming insensitive won't receive further events, but there
could be chances the controllers don't get properly notified and reset
in those situations.
2014-06-05 16:15:54 +02:00
Matthias Clasen 14d1a5cba4 inspector: Make GMenu content show up
My problem was that all the content is usually hidden away
in sections, so without recursion, nothing shows up. So,
implement the recursion then.
2014-06-05 09:29:18 -04:00
Matthias Clasen af8bd96e6e Forgotten file 2014-06-05 08:35:07 -04:00
Matthias Clasen 2346ccde43 inspector: show GMenus
This does not quite work yet, and I have no idea why.
2014-06-05 08:32:15 -04:00
Ryan Lortie 8011d853e1 GtkMenuTracker: fix signal handler argument list
The signal handler for the visibility of menu items changing had the
wrong signature, resulting in the GParamSpec from the notify signal
being treated as a boolean (which was always true).  This resulted in
items being added over and over and never being removed.

Fix that...
2014-06-05 08:29:59 -04:00
Yosef Or Boczko 797a45bcf9 Updated Hebrew translation 2014-06-05 14:07:46 +03:00
Matthias Clasen 582504cc33 inspector: Actually destroy the property editors
We were never finalizing any of the popovers used for editing
properties. Fix that.
2014-06-05 05:57:50 -04:00
Matthias Clasen 7a8092998a inspector: Fix a memory leak 2014-06-05 05:57:50 -04:00
Matthias Clasen 27f692da2d inspector: Add an initial action editor
Use a popup, like we do for properties. For now, it allows
activating the action (with parameter, if necessary) and
setting the state.
2014-06-05 05:57:49 -04:00
Chun-wei Fan bbed824320 gtk/deprecated/gtkcolorsel.c: Include gtkwindowgroup.h
Since commit 872fbfac the GtkWindowGroup was split out from the GtkWindow
sources, so include gtkwindowgroup.h to avoid C4013 warnings/errors
(implicit declaration of ...) on gtk_window_group_add_window().
2014-06-05 14:45:35 +08:00
Matthias Clasen 2bbea2bc93 Expand GtkWindowGroup docs 2014-06-04 21:25:05 -04:00
Matthias Clasen 23aeb955ce inspector: Lower the inspector window when picking
This avoids the problem  of the inspector window covering the
widget you want to pick.
2014-06-04 20:29:10 -04:00
Matthias Clasen 205e8f7e58 inspector: Show the widget tree when picking
Makes more sense that way.
2014-06-04 20:12:42 -04:00
Matthias Clasen 1c232066b8 inspector: Go to the desired tab
We were setting the next-tab properly, but were trying to
read it off the wrong object. Now, going from a cell renderer
attribute mapping to the model, or from an action-name to the
action actually works.
2014-06-04 19:28:24 -04:00
Carlos Garnacho 524e28a13c tests: Add multitouch gesture tests
So far, gesture behavior on lack/excess of touchpoints is tested, as well
as sequence hand-in between gestures in these situations.
2014-06-04 13:54:41 +02:00
Carlos Garnacho cb059bfc1b widget: Set GDK_BUTTON1_MASK on emulated pointer events
The touch_event handler was missing those when emulating pointer events
for the widgets that get GDK_TOUCH_MASK set, but have no specialized
touch handlers.
2014-06-04 13:44:56 +02:00
Matthias Clasen 7a0642743d Fix up internal function naming
Even if you believe this functionality belongs into gdk, it
is not ok to name internal functions in gtkwindow.c gdk_window...
2014-06-04 06:38:20 -04:00
Matthias Clasen 872fbfacd3 Split GtkWindowGroup into its own file
gtkwindow.c is too big and too messy. This is a small step
towards making it better.
2014-06-04 06:24:05 -04:00
Matthias Clasen d467850af0 Shorten test paths 2014-06-03 14:22:55 -04:00
Matthias Clasen c11b7e44a0 label-sizing reftest: Hardcode ltr
This reftest doesn't work in rtl.
2014-06-03 12:28:06 -04:00
Matthias Clasen ac59f0ac08 reftests: Add a way to hardcode text direction
Some tests don't work in rtl, so add a way to hardcode
the expected text direction. This is in preparation for
running reftests in an rtl locale.
2014-06-03 12:28:06 -04:00
Carlos Garnacho 94f573d8a4 tests: Add tests for grab interaction with gestures
The behavior of gestures that are kept outside/inside a grab is tested,
to ensure the former are cancelled and the latter remain unchanged.
2014-06-03 16:13:25 +02:00
Carlos Garnacho 25f5da5018 widget: Ensure all gestures outside a grab scope are cancelled
This code is a product of early stages in the gestures branch, where
capturing would have an effect outside grab boundaries. But this isn't
really the case, so every gesture outside the grab scope must be reset
to avoid keeping stale data.
2014-06-03 16:13:25 +02:00
Carlos Garnacho 93f72985bf tests: Add gesture tests for early/late sequence claiming
This tests both a sequence being claimed early to be then denied
(and handled deeper in propagation chain), and a sequence being
claimed late in the capture phase (and thus being cancelled deeper
in the propagation chain)
2014-06-03 16:13:25 +02:00
Carlos Garnacho fd1a566d46 tests: Inform of gesture updates during recognition
May be useful to find out which gestures are still being triggered
by a sequence.
2014-06-03 16:13:25 +02:00
Carlos Garnacho fe7215e369 testsuite: Prepare gestures testsuite for mouse/touch events
state is preserved for mouse emulation, and up to 10 touchpoints for touch
emulation.
2014-06-03 15:59:03 +02:00
Carlos Garnacho 26ced6abad widget: Only deny a sequence if it was previously claimed
Before this change, a sequence being claimed deep in the event propagation
chain would make the sequence go denied on every ancestor, regardless of
previous state.

To make things more consistent, only deny the sequence if it was previously
claimed, so the behavior is the same for gesture groups within the widget
than for those outside the widget.

The gestures testsuite has been updated to reflect this new behavior.
2014-06-03 15:59:03 +02:00
Carlos Garnacho c773859c99 gesture: Ensure late gestures handling the sequence get the group state
It might happen that a gesture claims a sequence before any other gesture
in its group even handled a single event from that sequence. In that case,
ensure the state is set accordingly right when the sequence is handled in
those.

The "group" gesture testcase has been updated to observe this behavior.
2014-06-03 15:59:03 +02:00
Matthias Clasen f6cf7fee73 inspector: Parse custom css with a delay
The CSS editor was feeling a little sluggish, because it was
reparsing and reapplying the CSS on every keystroke. Add a small
delay, to make this feel smoother.
2014-06-03 09:44:28 -04:00
Benjamin Otte 45dbd84ff3 reftests: Use "all" property in inherit-and-inital test 2014-06-03 14:35:00 +02:00
Chun-wei Fan 61b9bcf1d5 MSVC Projects: "Generate" the gtk-inspector Projects
Like the GDK and GTK portions, use autotools scripts to generate the
complete projects for gtk-inspector as sources there seem to change from
time to time.

It might be so that this, like the a11y sources, will be referenced from
the main Makefile.am of GTK directly, but just do this so that the
projects can build properly.
2014-06-03 17:03:40 +08:00
Chun-wei Fan dd4bc9fd09 gdk/Makefile.am: Fix MSVC Project Generation
We need to account for the sources that moved to gdk/deprecated/, so the
slashes must be converted here.
2014-06-03 17:00:02 +08:00
Chun-wei Fan ddc3f8eae7 MSVC Builds: Update the gtk-demo Projects
Add the gestures demo sources into the build, so that the build will
complete properly.
2014-06-03 16:55:46 +08:00
Chun-wei Fan 48533b7b60 Update Visual Studio Solution Files
Remove all references to the gtka11y projects as they are all built
together with the GTK DLL.

https://bugzilla.gnome.org/show_bug.cgi?id=730615
2014-06-03 16:46:53 +08:00
Matthias Clasen 42945f0d74 Run reftests repeatedly
Install test files that run the reftests in the
Adwaita:dark and HighConstrast themes. It works,
so why not.
2014-06-02 22:46:23 -04:00
Matthias Clasen 7f8d0552f0 Drop debug spew from installed tests
This is no longer needed, we found the problem.
2014-06-02 22:37:29 -04:00
Matthias Clasen 5bebbb06fa Add an expander reftest
This test check that resizing the window when expanding
the expander yields the same end result as having the
expander expanded to begin with. The test uses the inhibit
mechanism introduced in the previous commit.
2014-06-02 22:36:01 -04:00
Matthias Clasen b86f5a4086 Add a way to delay snapshots in reftests
This adds an inhibit api that code from the reftest module
can use to delay the taking of the snapshot. Also refactor
the code in gtk-reftest to use the inhibit mechanism for
its own delaying of the snapshot until after the first
expose.
2014-06-02 22:35:59 -04:00
Matthias Clasen 16c89eb5f7 Forgotten file 2014-06-02 21:43:04 -04:00
Matthias Clasen 94c065d647 Add a reftest for flipping icons
Taking advantage of our new direction flipping ability.
2014-06-02 21:41:32 -04:00
Carlos Garnacho 3c0ebf65cf window: Only check for the event widget if clicked on the "content" region
Every button press/release event reaching the the multipress gesture in GtkWindow
and happening in the "title" region must be handled, regardless of the event widget.
Children there wanting the event(s) for themselves are (and were always) expected
to stop event propagation.

So the only place to check for the event widget's "window-dragging" style property
is the "content" region, which matches the pre-gestures behavior.

This fixes some issues with sequences being mistakenly claimed (and events not
propagated further) on situations it shouldn't.
2014-06-02 18:38:25 +02:00
Carlos Garnacho 00656ed10b window: Handle manually bubbled events
The multipress gesture must react to either direct events on the
GtkWindow (special cased through _gtk_widget_check_handle_wm_event),
or bubbled events from child widgets. Ensure bubbled events go
through the gesture, those are fed manually to make sure events are
only handled once, in either one or other place. The implicit grab
will ensure that doesn't change mid-action.
2014-06-02 18:38:25 +02:00
Carlos Garnacho 7f33706c12 window: Refactor _gtk_window_check_handle_wm_event()
Separate the event widget check from event handling
2014-06-02 18:38:25 +02:00
Carlos Garnacho e1c425a24d treeview: Ensure the event is consumed on ::row-activate
Otherwise the event is possibly handled, but still propagated further anyway.
Ensure the event is consumed by claiming the current sequence on the
GtkGestureMultiPress::pressed handler.
2014-06-02 18:38:25 +02:00
Carlos Garnacho 541ed65a51 treeview: restrict the multipress gesture to GDK_BUTTON_PRIMARY
::row-activated only used to be triggered by GDK_BUTTON_PRIMARY, so make
the multipress gesture handling this now to be only triggered by that same
button.

https://bugzilla.gnome.org/show_bug.cgi?id=731020
2014-06-01 21:57:15 +02:00
Matthias Clasen a3cd0ee7d8 Revert "Use minimum/natural size semantics"
This reverts commit 6d53c2339f.

https://bugzilla.gnome.org/show_bug.cgi?id=731054 showed some
major regressions caused by this commit.
2014-06-01 10:20:08 -04:00
Matthias Clasen 73ff6a8e0f Revert "Better resize of expandable columns"
This reverts commit 0050d469b5.

Conflicts:
	gtk/gtktreeview.c
2014-06-01 10:19:14 -04:00
Matthias Clasen fd62353e25 Avoid another revert conflict
Moving this bit up a few lines lets the following revert apply
cleanly.
2014-06-01 10:18:38 -04:00
Matthias Clasen 210453b79e Revert "treeview: Remove unneeded checks"
This reverts commit a158a2aa48.

The commit conflicts with a later revert, so move it out of the way.
2014-06-01 10:17:59 -04:00
Matthias Clasen 97930a774b Add more gestures tests
Some of these sequences look wrong/questionable to me.
2014-05-31 18:46:43 -04:00
Matthias Clasen bdf81a7c70 gestures test: make more readable 2014-05-31 12:54:36 -04:00
Matthias Clasen 4298e88f48 gestures: Add a test for grouping
I'm not entirely convinced the test produces the expected
outcome, here.
2014-05-31 12:48:14 -04:00
Matthias Clasen 1c24b288b0 Expand gesture tests a big more
Print out sequence state changes, and cancellation, and verify that
claiming a gestures causes the expected state changes.
2014-05-31 12:26:15 -04:00
Carlos Garnacho 995b6d1fd4 textview: Only trigger drag gesture on GDK_BUTTON_PRIMARY
This gesture was only meant to react on GDK_BUTTON_PRIMARY (either
through real pointer events, or implicitly assumed from touch events),
as it used to behave before gestures. Otherwise the gtk_drag_begin*()
call assumes being triggered by button 1, and the drag misbehaves
because that button isn't really in the state mask.

https://bugzilla.gnome.org/show_bug.cgi?id=731016
2014-05-31 15:11:05 +02:00
Piotr Drąg fc1e274b89 Updated POTFILES.skip 2014-05-31 15:08:21 +02:00
Benjamin Otte 86267fd9bd gtk-reftest: Add GMODULE_CFLAGS/LIBS
They aren't included in GTK_DEP_CFLAGS/LIBS so they need to be added
manually.
2014-05-31 14:40:13 +02:00
Matthias Clasen 98cf67ddba testsuite: put installed tests in the right place
Follow the prevailing practice and put the installed tests
into $libdir/installed-tests/$PACKAGE instead of
$pkglibdir/installed-tests.
2014-05-31 00:16:07 -04:00
Matthias Clasen 921b6519f1 inspector: better type detection for resources
Pass the name to g_content_type_guess. With this, most
CSS gets sniffed as C source code.
2014-05-30 23:45:11 -04:00
Matthias Clasen 5880c9e365 gtk-reftest: Don't warn needlessly
Only warn about the --direction argument if the option was
actually specified.
2014-05-30 23:30:56 -04:00
Matthias Clasen e4ba5b6ab6 inspector: Go to the right tab when changing objects
When going from attribute mapping to model, it makes most sense
to go directly to the data tab, and when going from an action
name to the owner, we want to show the actions tab. Make it so.
2014-05-30 23:22:29 -04:00
Matthias Clasen 5ed6653859 inspector: Allow jumping to actions
The property editor for action-name properties now offers
to go to the object where the action is defined.
2014-05-30 23:22:29 -04:00
Matthias Clasen d33ff810cc inspector: Trivial string change
'Size Groups' looks better than 'Sizegroups'.
2014-05-30 23:22:29 -04:00
Benjamin Otte a18ec83b3b reftests: Add reftest for direction change
This reftest makes use of the new feature to add signal handlers.

It adds a libreftest.so module containing all the code for the reftests.
When adding a test named reftest.ui, please keep code contained in a
source file names reftest.c and add that file to Makefile.am.

https://bugzilla.gnome.org/show_bug.cgi?id=730833
2014-05-31 05:19:41 +02:00
Debarshi Ray 047d2b5f6d Update GtkImage icons when the direction is changed
Don't call gtk_widget_set_state_flags(), it filters the direction flags.
Instead, call gtk_widget_update_state_flags() directly.

https://bugzilla.gnome.org/show_bug.cgi?id=730833
2014-05-31 05:19:41 +02:00
Benjamin Otte 690fb31fb4 gtk-reftest: Clarify --direction argument parameters
... and print a proper error message when the parameter is not
recognized.
2014-05-31 05:19:41 +02:00
Benjamin Otte 8bba9b6a4a gtk-reftest: Allow loading code for reftests
When connecting signal names, gtk-reftest now allows you to use a colon
in the signal handler name like so:
  module:function_name
where module is a module loaded from the same directory (or the .libs
subdirectory for compatibility with uninstalled libtool) as the running
test and the function is resolved in that module. Of course, normal
function names work as before.
2014-05-31 05:19:41 +02:00
Benjamin Otte 030140ccc4 reftests: Add a reftest with signals 2014-05-31 05:19:40 +02:00
Benjamin Otte 1e4fea7ca9 reftests: Automatically connect signals 2014-05-31 05:19:40 +02:00
Benjamin Otte 3df52ae6d5 builder: Cleanup
Use the usual way of providing user data to vfuncs:
- Don't allocate it, use the stack
- Use CamelCase for naming the struct
2014-05-31 05:19:40 +02:00
Matthias Clasen bb9bf4b408 inspector: Handle attribute mapping changes better
When the mapping is changed, notify the property and
queue a draw on the widget. This makes both the inspector
and the app update their display.
2014-05-30 21:56:07 -04:00
Matthias Clasen 2e4c87038e inspector: some code reshuffling 2014-05-30 21:35:39 -04:00
Matthias Clasen 6a9ea3487e inspector: Support saving CSS
We have a file chooser, lets use it.
2014-05-30 20:35:43 -04:00
Matthias Clasen eec1bc7ed1 GtkPrintUnixDialog: Remove some dead code
Automatic template children get cleaned up and NULLed out in destroy,
the g_clear_pointer() calls in finalize never do anything.
2014-05-30 19:33:11 -04:00
Evan Nemerson 54ec42f035 gtk: port many nullability annotation fixes from Vala bindings
https://bugzilla.gnome.org/show_bug.cgi?id=730745
2014-05-30 13:24:20 -07:00
Matthias Clasen 4d1930cf74 Make notebook content redraw during drag
The extra condition here that caused the current child to
not redraw during reordering was introduced in f383e1f1
during the port to ::draw, but was not explained in the
commit message, and removing it has no obvious negative
effect.

https://bugzilla.gnome.org/show_bug.cgi?id=730767
2014-05-30 13:39:27 -04:00
Matthias Clasen 6de6656d1f GtkBuilder: Ensure types are fully initialized
Just calling get_type() does not ensure that the signals, properties
and everything else gets set up properly. Ensure it is, by calling
g_type_class_ref() before using the type. This fixes the testcase
added in the previous commit.
2014-05-30 12:39:07 -04:00
Matthias Clasen 1153ea86ed Add a failing builder testcase
This shows <signal> failing because class_init hasn't been run
yet.
2014-05-30 12:09:43 -04:00
Matthias Clasen 1af5f6d507 GtkActionable: Update the docs
Actionable is no longer restricted to "app" and "win" actions.
2014-05-30 07:05:50 -04:00
Matthias Clasen 8817fa9e3d GtkScrolledWindow: Add some NULL checks back
Turns out these were not quite redundant, gtk_container_forall
may be called very early during construction.

https://bugzilla.gnome.org/show_bug.cgi?id=730924
2014-05-29 21:52:40 -04:00
Matthias Clasen 489b59867c Revert "GtkMisc: Keep gtk_misc_set_alignment working"
This reverts commit aabc356b80.

Labels are back to looking at x/yalign (for now).
2014-05-29 10:32:46 -04:00
Carlos Garnacho 618e3d3157 eventcontroller: Ensure controllers stay alive during event emission
Those might trigger the destruction of some widget that would dispose the
event controller while the event is still being handled, so keep an extra
ref on the controller during event processing.
2014-05-28 19:39:07 +02:00
Carlos Garnacho 8c21b0bee5 docs: Add some more information in the "input handling model" chapter
Grabs/Touch/Gestures are now fairly well covered. Only keyboard handling
is left.
2014-05-28 15:52:14 +02:00
Evan Nemerson 9db729f5a6 gtk: fix several out argument annotations
These mostly just switch from allow-none to optional, nullable, or
both, as necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=730745
2014-05-27 21:10:33 -07:00
Evan Nemerson a77765f172 gtk: add missing ownership annotations ported from Vala
https://bugzilla.gnome.org/show_bug.cgi?id=730745
2014-05-27 21:10:33 -07:00
Evan Nemerson 07d825574f gtk: add missing type annotations ported from Vala bindings
https://bugzilla.gnome.org/show_bug.cgi?id=730745
2014-05-27 21:10:33 -07:00
Evan Nemerson bda145b19f gtk: fix annotation syntax and missing some missing annotations
These changes clean up various errors and omissions resulting from
either slightly incorrect G-I/gtk-doc syntax or missing documentation
blocks.

https://bugzilla.gnome.org/show_bug.cgi?id=730745
2014-05-27 21:10:32 -07:00
Evan Nemerson e596e58c51 gtk: port missing array annotations from Vala bindings
https://bugzilla.gnome.org/show_bug.cgi?id=730745
2014-05-27 21:10:32 -07:00
Evan Nemerson e568903360 gtk: fix many callback annotations to include closure information
Without this information introspection-based consumers don't realize
they can include context information, but instead think that they
receive an extra gpointer argument (which they don't know how to
handle).

https://bugzilla.gnome.org/show_bug.cgi?id=730745
2014-05-27 21:10:32 -07:00
Matthias Clasen 2388c69f0c Add some gesture tests
This test starts to assemble tests related to event propagation,
interaction with traditional event signal handlers, claiming of
events, etc.
2014-05-27 19:15:40 -04:00
Matthias Clasen 4841f8f773 Forgotten file
Oops.
2014-05-27 17:56:39 -04:00
Matthias Clasen 255b877915 Bump version 2014-05-27 17:49:22 -04:00
Matthias Clasen a28d2cb923 Move extract-strings to its own directory
This will hopefully help resolve the circular dependency between
libgtk linking against inspector/libgtkinspector and inspector/
needing extract-strings from gtk/.

I didn't preserve the EXEEXT decorations in this operation -
automake gave me stern warnings about it, so I just dropped them
all. Somebody who cross-builds GTK+ will have to reconstruct this.
2014-05-27 17:28:10 -04:00
Matthias Clasen ea2d20e313 Fix distcheck 2014-05-27 15:14:02 -04:00
Matthias Clasen d51c6af247 3.13.2 2014-05-27 14:33:32 -04:00
Matthias Clasen 3bb404f40c Don't assert in gtk_event_controller_constructed
This prevents some of our generic object implementation tests
from working with gesture objects. Instead, add g_return_if_fail
checks in all the gesture constructors.
2014-05-27 14:33:32 -04:00
Matthias Clasen e4680d64a0 Documentation fixes
Add a few missing symbols, and match up parameters in headers
and doc comments.
2014-05-27 14:33:32 -04:00
Kristian Høgsberg 6cd26e0939 wayland: Use event->key.time for setting key event time
We were using event->button.time before. That works because it's part of
the common event header, but it's wrong.
2014-05-27 10:24:34 -07:00
Kristian Høgsberg 544e1ac1d1 wayland: Remove unused XSERVER_TIME_IS_LATER macro 2014-05-27 10:24:34 -07:00
Matthias Clasen 4ce2f3e769 Silence gtk-doc warnings 2014-05-27 13:17:34 -04:00
Matthias Clasen 7fa0228755 Revert "GtkImage: Drop use of GtkMisc::x/yalign"
This reverts commit 54d5b426fc.

Conflicts:
	gtk/gtkimage.c
2014-05-27 13:08:25 -04:00
Matthias Clasen 24863a0b6a Revert "GtkLabel: Drop use of GtkMisc::x/yalign"
This reverts commit b320c198b6.
2014-05-27 13:07:03 -04:00
Matthias Clasen 6ce2a8fb13 Revert "Fix up GtkLabel and GtkImage sizing"
This reverts commit 3b30cfa344.
2014-05-27 13:04:43 -04:00
Matthias Clasen 7c83a71239 Revert "More label and image sizing fixes"
This reverts commit 68c1e83cf0.
2014-05-27 13:04:34 -04:00
Carlos Garnacho d9bdb9a137 window: Do not raise border windows on each size allocation
This prevents these windows from being raised above popovers, which
is about the only child widget that may overlap with those anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=730589
2014-05-27 17:56:59 +02:00
Carlos Garnacho 4cf111aab3 treeview: Make the multipress gesture listen only to bin_window
This gesture is meant to handle row-activated signaling, so make the
gesture ignore events from any other window.
2014-05-27 17:47:13 +02:00
Carlos Garnacho 2012b67c5b button: Claim the sequence on multipress::pressed
In order to avoid the event from bubbling, as it used to (not) do.
2014-05-27 17:47:12 +02:00
Carlos Garnacho e0fd901722 gesture: Fix wrong assert in gtk_gesture_set_window
The window must be part of the event controller widget, so
fix the inverted logic.
2014-05-27 17:47:12 +02:00
Carlos Garnacho 49a6626884 eventcontroller: Hide more details
Signals are left hidden, so the only entry point to handle_event/reset
is API.
2014-05-27 17:47:12 +02:00
Carlos Garnacho 907e9f1946 gtk: Update GtkGesture users to the GtkPropagationPhase semantics change
Mainly doing s/TARGET/BUBBLE/ on the fully ported widgets, but GtkTreeView
where the double click handler has moved to GTK_PHASE_TARGET so it runs
parallelly to the still existing event handlers.
2014-05-27 17:47:12 +02:00
Carlos Garnacho 505efbb3f3 widget: Change GtkCapturePhase behavior in event controllers' handling
Previously, there would be globally just a capture and a bubble phase,
with the event just going down the hierarchy once, and the up once.
GTK_PHASE_TARGET actually meaning "run within event handlers", so in
a hierarchy of 3 widgets, emission would be:

  Capture(C)
  Capture(B)
  Capture(A)
  Target(A) (if event handlers allow)
  Bubble(A)
  Target(B) (if event handlers allow)
  Bubble(B)
  Target(C) (if event handlers allow)
  Bubble(C)

This commit changes this behavior and uses GTK_PHASE_TARGET in a less
misleading way, running only on the widget that was meant to receive
the event. And GTK_PHASE_BUBBLE has taken over the execution place of
GTK_PHASE_TARGET, so the emission remains:

  Capture(C)
  Capture(B)
  Capture(A)
  Target(A)
  Bubble(A) (if event handlers allow)
  Bubble(B) (...)
  Bubble(C) (...)

As it was, GTK_PHASE_BUBBLE was useful for running event controllers
paralelly to event handlers, without modifying a single line in those.
For those mixed scenarios, Any of the other phases will have to be
used at discretion, or the event handlers eventually changed to chain
up and let the default event handlers in GtkWidget to be run.
2014-05-27 17:47:12 +02:00
Carlos Garnacho a8e833dc5c window: Avoid double event processing in the multipress event controller
The events to those are fed outside the regular event propagation scheme,
through _gtk_window_check_handle_wm_event(), so set the controller to
GTK_PHASE_NONE so events aren't processed first manually, and then
automatically.
2014-05-27 17:47:12 +02:00
Carlos Garnacho 9f8bd7a2bc gesturezoom: Just return a double in get_scale_delta()
Checking whether the gesture is active is a responsibility of the caller.
2014-05-27 17:47:12 +02:00
Carlos Garnacho 8f7d5fb2c0 gesturerotate: Just return a double in get_angle_delta()
Whether the gesture is active or recognized should be checked before in
callers, or just not used naively.
2014-05-27 17:47:12 +02:00
Carlos Garnacho d05a9f9a7b gesture: Replace gtk_gesture_attach/detach with event controller API
Event controllers now auto-attach, and the GtkCapturePhase only determines
when are events dispatched, but all controllers are managed by the widget wrt
grabs.

All callers have been updated.
2014-05-27 17:47:12 +02:00
Carlos Garnacho ad6606e8af gtk: Update callers of GtkGesturePan orientation 2014-05-27 17:47:12 +02:00
Carlos Garnacho 2e903243c6 eventcontroller: Make the event-mask property and methods private.
This will rarely have any use if no subclassing is allowed, so just make it
private for our own.
2014-05-27 17:47:12 +02:00
Carlos Garnacho ef61c9c58b gtk: Replace GtkPanOrientation with GtkOrientation
And document GtkOrientation to be more generic. There's little added
value in a separate enum for this.
2014-05-27 17:47:12 +02:00
Matthias Clasen 68c1e83cf0 More label and image sizing fixes
Go back to respecting GtkMisc::xpad/ypad. Not doing so breaks
the misc-alignment reftest. As long as we still derive from
GtkMisc, we may as well do this.
2014-05-27 06:00:21 -04:00
Matthias Clasen 3b30cfa344 Fix up GtkLabel and GtkImage sizing
When GtkMisc was removed, I forgot to apply the style context
padding. This caused the info-bar-message-types reftest to fail.
2014-05-27 00:22:40 -04:00
Matthias Clasen 2488b954f2 Don't use hicolor as the default icon-theme
The icontheme lookup code has a special-case that prefers builtin icons
if the theme name is "hicolor". This is problematic for our reftests,
which run in a barebones environment with not settings.
2014-05-26 23:17:32 -04:00
Matthias Clasen 38daabd838 docs: enum cleanup
Move GtkIMPreeditStyle nad GtkIMStatusStyle to the settings where
they are solely used.
2014-05-26 10:37:34 -04:00
Matthias Clasen 0bd0f39576 docs: enum cleanup
Move GtkStateType to the GtkWidget apis where it is used, and
mark the enum as deprecated.
2014-05-26 10:37:06 -04:00
Matthias Clasen 4ae95157ae docs: remove markup
The overview chapters don't go through shorthand processing, so
don't use them there.
2014-05-26 10:17:07 -04:00
480 changed files with 28090 additions and 7359 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
## Makefile.am for GTK+
include $(top_srcdir)/Makefile.decl
SRC_SUBDIRS = gdk gtk libgail-util modules demos tests testsuite examples
SRC_SUBDIRS = util gdk gtk libgail-util modules demos tests testsuite examples
SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros build
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
+3 -1
View File
@@ -14,7 +14,7 @@ def gen_gdk_filelist(srcroot, subdir, dest):
vars = read_vars_from_AM(os.path.join(srcroot, subdir, 'Makefile.am'),
vars = {},
conds = {},
filters = ['gdk_public_h_sources', 'gdk_c_sources'])
filters = ['gdk_h_sources', 'gdk_c_sources'])
vars['gdk_enums'] = 'gdkenumtypes.c gdkenumtypes.h'
@@ -49,6 +49,7 @@ def gen_gtk_filelist(srcroot, subdir, dest):
'USE_X11': False,
'USE_EXTERNAL_ICON_CACHE': False},
filters = ['gtkinclude_HEADERS',
'a11yinclude_HEADERS',
'deprecatedinclude_HEADERS',
'gtk_base_c_sources',
'gtk_clipboard_dnd_c_sources'])
@@ -56,6 +57,7 @@ def gen_gtk_filelist(srcroot, subdir, dest):
vars['gtk_other_src'] = 'gtkprintoperation-win32.c gtktypebuiltins.h gtktypebuiltins.c'
files = vars['gtkinclude_HEADERS'].split() + \
vars['a11yinclude_HEADERS'].split() + \
vars['deprecatedinclude_HEADERS'].split() + \
vars['gtk_base_c_sources'].split() + \
vars['gtk_clipboard_dnd_c_sources'].split() + \
+2
View File
@@ -19,7 +19,9 @@ EXTRA_DIST += \
gtk3-demo-application.vcxproj \
gtk3-demo-application.vcxproj.filters \
gtk-inspector.vcxproj \
gtk-inspector.vcxprojin \
gtk-inspector.vcxproj.filters \
gtk-inspector.vcxproj.filtersin \
gailutil.vcxproj \
gailutil.vcxproj.filters \
install.vcxproj \
-18
View File
@@ -10,8 +10,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "broadwayd", "broadwayd.vcxp
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk", "gdk.vcxproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtka11y", "gtka11y.vcxproj", "{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-inspector", "gtk-inspector.vcxproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk", "gtk.vcxproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}"
@@ -108,22 +106,6 @@ Global
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Release_Broadway|Win32.Build.0 = Release_Broadway|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Release_Broadway|x64.ActiveCfg = Release_Broadway|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}.Release_Broadway|x64.Build.0 = Release_Broadway|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug|Win32.ActiveCfg = Debug|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug|Win32.Build.0 = Debug|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug|x64.ActiveCfg = Debug|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug|x64.Build.0 = Debug|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release|Win32.ActiveCfg = Release|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release|Win32.Build.0 = Release|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release|x64.ActiveCfg = Release|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release|x64.Build.0 = Release|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug_Broadway|Win32.Build.0 = Debug|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug_Broadway|x64.ActiveCfg = Debug|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug_Broadway|x64.Build.0 = Debug|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release_Broadway|Win32.ActiveCfg = Release|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release_Broadway|Win32.Build.0 = Release|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release_Broadway|x64.ActiveCfg = Release|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release_Broadway|x64.Build.0 = Release|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug|Win32.ActiveCfg = Debug|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug|Win32.Build.0 = Debug|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}.Debug|x64.ActiveCfg = Debug|x64
@@ -1,38 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
</Filter>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\gtk\inspector\actions.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\gtk\inspector\button-path.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\gtk\inspector\classes-list.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\gtk\inspector\css-editor.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\gtk\inspector\data-list.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\gtk\inspector\general.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\gtk\inspector\init.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\gtk\inspector\inspect-button.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\gtk\inspector\object-hierarchy.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\gtk\inspector\prop-list.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\gtk\inspector\property-cell-renderer.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\gtk\inspector\python-hooks.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\gtk\inspector\python-shell.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\gtk\inspector\resource-list.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\gtk\inspector\resources.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\gtk\inspector\signals-list.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\gtk\inspector\visual.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\gtk\inspector\widget-tree.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\gtk\inspector\window.c"><Filter>Source Files</Filter></ClCompile>
</ItemGroup>
</Project>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
</Filter>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
#include "libgtk-inspector.vs10.sourcefiles.filters"
</ItemGroup>
</Project>
@@ -117,25 +117,7 @@
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\gtk\inspector\actions.c" />
<ClCompile Include="..\..\..\gtk\inspector\button-path.c" />
<ClCompile Include="..\..\..\gtk\inspector\classes-list.c" />
<ClCompile Include="..\..\..\gtk\inspector\css-editor.c" />
<ClCompile Include="..\..\..\gtk\inspector\data-list.c" />
<ClCompile Include="..\..\..\gtk\inspector\general.c" />
<ClCompile Include="..\..\..\gtk\inspector\init.c" />
<ClCompile Include="..\..\..\gtk\inspector\inspect-button.c" />
<ClCompile Include="..\..\..\gtk\inspector\object-hierarchy.c" />
<ClCompile Include="..\..\..\gtk\inspector\prop-list.c" />
<ClCompile Include="..\..\..\gtk\inspector\property-cell-renderer.c" />
<ClCompile Include="..\..\..\gtk\inspector\python-hooks.c" />
<ClCompile Include="..\..\..\gtk\inspector\python-shell.c" />
<ClCompile Include="..\..\..\gtk\inspector\resource-list.c" />
<ClCompile Include="..\..\..\gtk\inspector\resources.c" />
<ClCompile Include="..\..\..\gtk\inspector\signals-list.c" />
<ClCompile Include="..\..\..\gtk\inspector\visual.c" />
<ClCompile Include="..\..\..\gtk\inspector\widget-tree.c" />
<ClCompile Include="..\..\..\gtk\inspector\window.c" />
#include "libgtk-inspector.vs10.sourcefiles"
</ItemGroup>
<ItemGroup>
<ProjectReference Include="gtk-prebuild.vcxproj">
+56 -14
View File
@@ -4,6 +4,10 @@
<Import Project="gtk-build-defines.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros">
<BinDir>$(SolutionDir)$(Configuration)\$(Platform)\bin</BinDir>
<InstalledDlls>$(BinDir)\$(GtkDllPrefix)gdk(GtkDllSuffix).dll;$(BinDir)\$(GtkDllPrefix)gtk(GtkDllSuffix).dll;$(BinDir)\$(GtkDllPrefix)gailutil(GtkDllSuffix).dll</InstalledDlls>
<InstalledBins>$(BinDir)\gtk3-demo.exe;$(BinDir)\gtk3-demo-application.exe</InstalledBins>
<InstalledBroadwayBins>$(BinDir)\broadwayd.exe</InstalledBroadwayBins>
<GtkDoInstallBin>
mkdir $(CopyDir)\bin
@@ -15,22 +19,22 @@ if "$(Configuration)" == "Release_Broadway" goto DO_BROADWAY_BIN
if "$(Configuration)" == "Debug_Broadway" goto DO_BROADWAY_BIN
copy $(Configuration)\$(Platform)\bin\*.dll $(CopyDir)\bin
copy $(BinDir)\*.dll $(CopyDir)\bin
copy $(Configuration)\$(Platform)\bin\*-$(ApiVersion).lib $(CopyDir)\lib
copy $(BinDir)\*-$(ApiVersion).lib $(CopyDir)\lib
copy $(Configuration)\$(Platform)\bin\*.exe $(CopyDir)\bin
copy $(BinDir)\*.exe $(CopyDir)\bin
goto DONE_BIN
:DO_BROADWAY_BIN
copy $(Configuration)\$(Platform)\bin\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll $(CopyDir)\bin
copy $(BinDir)\$(GtkDllPrefix)gdk$(GtkDllSuffix).dll $(CopyDir)\bin
copy $(Configuration)\$(Platform)\bin\gdk-$(ApiVersion).lib $(CopyDir)\lib
copy $(BinDir)\gdk-$(ApiVersion).lib $(CopyDir)\lib
copy $(Configuration)\$(Platform)\bin\broadwayd.exe $(CopyDir)\bin
copy $(BinDir)\broadwayd.exe $(CopyDir)\bin
if "$(Configuration)" == "Release_Broadway" copy .\Release\$(Platform)\bin\$(GtkDllPrefix)gtk$(GtkDllSuffix).dll $(CopyDir)\bin
@@ -64,6 +68,8 @@ mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\deprecated
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y
@@ -154,6 +160,8 @@ copy ..\..\..\gdk\gdkversionmacros.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk
copy ..\..\..\gdk\gdkconfig.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk
copy ..\..\..\gdk\deprecated\gdkcolor.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\deprecated
copy ..\..\..\gtk\a11y\gtkarrowaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y
copy ..\..\..\gtk\a11y\gtkbooleancellaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y
@@ -276,8 +284,6 @@ copy ..\..\..\gtk\gtkactionbar.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkadjustment.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkalignment.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkappchooser.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkappchooserbutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
@@ -290,8 +296,6 @@ copy ..\..\..\gtk\gtkapplication.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkapplicationwindow.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkarrow.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkaspectframe.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkassistant.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
@@ -390,6 +394,8 @@ copy ..\..\..\gtk\gtkenums.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkeventbox.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkeventcontroller.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkexpander.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkfilechooser.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
@@ -416,6 +422,24 @@ copy ..\..\..\gtk\gtkfontchooserwidget.h $(CopyDir)\include\gtk-$(ApiVersion)\gt
copy ..\..\..\gtk\gtkframe.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkgesture.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkgesturedrag.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkgesturelongpress.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkgesturemultipress.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkgesturepan.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkgesturerotate.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkgesturesingle.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkgestureswipe.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkgesturezoom.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkgrid.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkheaderbar.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
@@ -470,16 +494,12 @@ copy ..\..\..\gtk\gtkmenutoolbutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkmessagedialog.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkmisc.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkmodules.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkmountoperation.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtknotebook.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtknumerableicon.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkoffscreenwindow.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkorientable.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
@@ -654,6 +674,8 @@ copy ..\..\..\gtk\gtkwidgetpath.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkwindow.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtkwindowgroup.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtktextlayout.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
copy ..\..\..\gtk\gtktypebuiltins.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk
@@ -666,6 +688,10 @@ copy ..\..\..\gtk\deprecated\gtkaction.h $(CopyDir)\include\gtk-$(ApiVersion)\gt
copy ..\..\..\gtk\deprecated\gtkactiongroup.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
copy ..\..\..\gtk\deprecated\gtkalignment.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
copy ..\..\..\gtk\deprecated\gtkarrow.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
copy ..\..\..\gtk\deprecated\gtkcolorsel.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
copy ..\..\..\gtk\deprecated\gtkcolorseldialog.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
@@ -694,6 +720,10 @@ copy ..\..\..\gtk\deprecated\gtkiconfactory.h $(CopyDir)\include\gtk-$(ApiVersio
copy ..\..\..\gtk\deprecated\gtkimagemenuitem.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
copy ..\..\..\gtk\deprecated\gtkmisc.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
copy ..\..\..\gtk\deprecated\gtknumerableicon.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
copy ..\..\..\gtk\deprecated\gtkradioaction.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
copy ..\..\..\gtk\deprecated\gtkrc.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated
@@ -800,6 +830,18 @@ copy ..\..\..\gdk\broadway\gdkbroadwayvisual.h $(CopyDir)\include\gtk-$(ApiVersi
<_PropertySheetDisplayName>gtkinstallsprops</_PropertySheetDisplayName>
</PropertyGroup>
<ItemGroup>
<BuildMacro Include="BinDir">
<Value>$(BinDir)</Value>
</BuildMacro>
<BuildMacro Include="InstalledDlls">
<Value>$(InstalledDlls)</Value>
</BuildMacro>
<BuildMacro Include="InstalledBins">
<Value>$(InstalledBins)</Value>
</BuildMacro>
<BuildMacro Include="InstalledBroadwayBins">
<Value>$(InstalledBroadwayBins)</Value>
</BuildMacro>
<BuildMacro Include="GtkDoInstallBin">
<Value>$(GtkDoInstallBin)</Value>
</BuildMacro>
+1
View File
@@ -189,6 +189,7 @@
<ClCompile Include="..\..\..\demos\gtk-demo\entry_completion.c" />
<ClCompile Include="..\..\..\demos\gtk-demo\event_axes.c" />
<ClCompile Include="..\..\..\demos\gtk-demo\expander.c" />
<ClCompile Include="..\..\..\demos\gtk-demo\gestures.c" />
<ClCompile Include="..\..\..\demos\gtk-demo\headerbar.c" />
<ClCompile Include="..\..\..\demos\gtk-demo\hypertext.c" />
<ClCompile Include="..\..\..\demos\gtk-demo\iconview.c" />
@@ -31,6 +31,7 @@
<ClCompile Include="..\..\..\demos\gtk-demo\entry_completion.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\demos\gtk-demo\event_axes.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\demos\gtk-demo\expander.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\demos\gtk-demo\gestures.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\demos\gtk-demo\headerbar.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\demos\gtk-demo\hypertext.c"><Filter>Source Files</Filter></ClCompile>
<ClCompile Include="..\..\..\demos\gtk-demo\iconview.c"><Filter>Source Files</Filter></ClCompile>
+28 -24
View File
@@ -139,45 +139,49 @@
<ExtensionsToDeleteOnClean Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PreBuildEvent>
<Command>$(GtkDoInstallBin)$(GtkDoInstall)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<PreBuildEvent>
<Command>$(GtkDoInstallBin)$(GtkDoInstall)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<PreBuildEvent>
<Command>$(GtkDoInstallBin)$(GtkDoInstall)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<PreBuildEvent>
<Command>$(GtkDoInstallBin)$(GtkDoInstall)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">
<PreBuildEvent>
<Command>$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">
<PreBuildEvent>
<Command>$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">
<PreBuildEvent>
<Command>$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">
<PreBuildEvent>
<Command>$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuild Include="..\..\..\config.h.win32">
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Installing Build Results...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(InstalledDlls);$(InstalledBins);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">Installing Build Results...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|Win32'">$(InstalledDlls);$(InstalledBins);$(InstalledBroadwayBins);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Installing Build Results...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(GtkDoInstallBin)$(GtkDoInstall)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(InstalledDlls);$(InstalledBins);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">Installing Build Results...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug_Broadway|x64'">$(InstalledDlls);$(InstalledBins);$(InstalledBroadwayBins);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Installing Build Results...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(InstalledDlls);$(InstalledBins);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">Installing Build Results...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|Win32'">$(InstalledDlls);$(InstalledBins);$(InstalledBroadwayBins);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Installing Build Results...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(GtkDoInstallBin)$(GtkDoInstall)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(InstalledDlls);$(InstalledBins);%(Outputs)</Outputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">Installing Build Results...</Message>
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(GtkDoInstallBin)$(GtkDoInstall)$(GtkDoInstallBroadwayHeaders)</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Broadway|x64'">$(InstalledDlls);$(InstalledBins);$(InstalledBroadwayBins);%(Outputs)</Outputs>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="gdk.vcxproj">
<Project>{fc5aadb5-95cd-4bf0-ba8b-0c16fe7073f7}</Project>
+1
View File
@@ -12,6 +12,7 @@ EXTRA_DIST += \
gtk3-demo.vcproj \
gtk3-demo-application.vcproj \
gtk-inspector.vcproj \
gtk-inspector.vcprojin \
gailutil.vcproj \
install.vcproj \
broadwayd.vcproj \
-22
View File
@@ -23,11 +23,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdk", "gdk.vcproj", "{FC5AA
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FE} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FE}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtka11y", "gtka11y.vcproj", "{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}"
ProjectSection(ProjectDependencies) = postProject
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FF} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FF}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-inspector", "gtk-inspector.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}"
ProjectSection(ProjectDependencies) = postProject
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FF} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FF}
@@ -36,7 +31,6 @@ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk", "gtk.vcproj", "{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}"
ProjectSection(ProjectDependencies) = postProject
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F7}
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46} = {F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD} = {FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FD}
EndProjectSection
EndProject
@@ -176,22 +170,6 @@ Global
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Release_Broadway|Win32.Build.0 = Release|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Release_Broadway|x64.ActiveCfg = Release|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073F5}.Release_Broadway|x64.Build.0 = Release|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug|Win32.ActiveCfg = Debug|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug|Win32.Build.0 = Debug|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug|x64.ActiveCfg = Debug|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug|x64.Build.0 = Debug|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release|Win32.ActiveCfg = Release|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release|Win32.Build.0 = Release|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release|x64.ActiveCfg = Release|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release|x64.Build.0 = Release|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug_Broadway|Win32.Build.0 = Debug|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug_Broadway|x64.ActiveCfg = Debug|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Debug_Broadway|x64.Build.0 = Debug|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release_Broadway|Win32.ActiveCfg = Release|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release_Broadway|Win32.Build.0 = Release|Win32
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release_Broadway|x64.ActiveCfg = Release|x64
{F756B0DB-40A1-4E9F-BE1F-8F02CB86EA46}.Release_Broadway|x64.Build.0 = Release|x64
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Debug|Win32.ActiveCfg = Debug|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Debug|Win32.Build.0 = Debug|Win32
{FC5AADB5-95CD-4BF0-BA8B-0C16FE7073FB}.Debug|x64.ActiveCfg = Debug|x64
@@ -124,25 +124,7 @@
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File RelativePath="..\..\..\gtk\inspector\actions.c" />
<File RelativePath="..\..\..\gtk\inspector\button-path.c" />
<File RelativePath="..\..\..\gtk\inspector\classes-list.c" />
<File RelativePath="..\..\..\gtk\inspector\css-editor.c" />
<File RelativePath="..\..\..\gtk\inspector\data-list.c" />
<File RelativePath="..\..\..\gtk\inspector\general.c" />
<File RelativePath="..\..\..\gtk\inspector\init.c" />
<File RelativePath="..\..\..\gtk\inspector\inspect-button.c" />
<File RelativePath="..\..\..\gtk\inspector\object-hierarchy.c" />
<File RelativePath="..\..\..\gtk\inspector\prop-list.c" />
<File RelativePath="..\..\..\gtk\inspector\property-cell-renderer.c" />
<File RelativePath="..\..\..\gtk\inspector\python-hooks.c" />
<File RelativePath="..\..\..\gtk\inspector\python-shell.c" />
<File RelativePath="..\..\..\gtk\inspector\resource-list.c" />
<File RelativePath="..\..\..\gtk\inspector\resources.c" />
<File RelativePath="..\..\..\gtk\inspector\signals-list.c" />
<File RelativePath="..\..\..\gtk\inspector\visual.c" />
<File RelativePath="..\..\..\gtk\inspector\widget-tree.c" />
<File RelativePath="..\..\..\gtk\inspector\window.c" />
#include "libgtk-inspector.sourcefiles"
</Filter>
</Files>
</VisualStudioProject>
+17 -5
View File
@@ -45,6 +45,7 @@ echo off&#x0D;&#x0A;
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\win32&#x0D;&#x0A;
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gdk\deprecated&#x0D;&#x0A;
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
mkdir $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
@@ -61,7 +62,6 @@ copy ..\..\..\gdk\win32\gdkwin32window.h $(CopyDir)\include\gtk-$(ApiVersion)\gd
copy ..\..\..\gdk\gdk.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkapplaunchcontext.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkcairo.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkcolor.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkcursor.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkdevice.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkdevicemanager.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
@@ -91,6 +91,7 @@ copy ..\..\..\gdk\gdkwindow.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0
copy ..\..\..\gdk\gdkenumtypes.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkversionmacros.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\gdkconfig.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk&#x0D;&#x0A;
copy ..\..\..\gdk\deprecated\gdkcolor.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkarrowaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkbooleancellaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
copy ..\..\..\gtk\a11y\gtkbuttonaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\a11y&#x0D;&#x0A;
@@ -152,14 +153,12 @@ copy ..\..\..\gtk\gtkaccessible.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;
copy ..\..\..\gtk\gtkactionable.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkactionbar.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkadjustment.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkalignment.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkappchooser.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkappchooserbutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkappchooserdialog.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkappchooserwidget.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkapplication.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkapplicationwindow.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkarrow.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkaspectframe.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkassistant.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkbbox.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
@@ -209,6 +208,7 @@ copy ..\..\..\gtk\gtkentrybuffer.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D
copy ..\..\..\gtk\gtkentrycompletion.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkenums.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkeventbox.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkeventcontroller.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkexpander.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfilechooser.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfilechooserbutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
@@ -222,6 +222,15 @@ copy ..\..\..\gtk\gtkfontchooser.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D
copy ..\..\..\gtk\gtkfontchooserdialog.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkfontchooserwidget.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkframe.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkgesture.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkgesturedrag.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkgesturelongpress.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkgesturemultipress.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkgesturepan.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkgesturerotate.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkgesturesingle.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkgestureswipe.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkgesturezoom.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkgrid.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkheaderbar.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkicontheme.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
@@ -249,11 +258,9 @@ copy ..\..\..\gtk\gtkmenuitem.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#
copy ..\..\..\gtk\gtkmenushell.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmenutoolbutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmessagedialog.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmisc.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmodules.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkmountoperation.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtknotebook.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtknumerableicon.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkoffscreenwindow.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkorientable.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkoverlay.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
@@ -341,12 +348,15 @@ copy ..\..\..\gtk\gtkvolumebutton.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0
copy ..\..\..\gtk\gtkwidget.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkwidgetpath.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkwindow.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkwindowgroup.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktextlayout.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtktypebuiltins.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\gtkversion.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkactivatable.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkaction.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkactiongroup.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkalignment.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkarrow.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkcolorsel.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkcolorseldialog.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkfontsel.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
@@ -361,6 +371,8 @@ copy ..\..\..\gtk\deprecated\gtkhseparator.h $(CopyDir)\include\gtk-$(ApiVersion
copy ..\..\..\gtk\deprecated\gtkhsv.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkiconfactory.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkimagemenuitem.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkmisc.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtknumerableicon.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkradioaction.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkrc.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
copy ..\..\..\gtk\deprecated\gtkrecentaction.h $(CopyDir)\include\gtk-$(ApiVersion)\gtk\deprecated&#x0D;&#x0A;
+1
View File
@@ -180,6 +180,7 @@
<File RelativePath="..\..\..\demos\gtk-demo\entry_completion.c" />
<File RelativePath="..\..\..\demos\gtk-demo\event_axes.c" />
<File RelativePath="..\..\..\demos\gtk-demo\expander.c" />
<File RelativePath="..\..\..\demos\gtk-demo\gestures.c" />
<File RelativePath="..\..\..\demos\gtk-demo\headerbar.c" />
<File RelativePath="..\..\..\demos\gtk-demo\hypertext.c" />
<File RelativePath="..\..\..\demos\gtk-demo\iconview.c" />
+3 -2
View File
@@ -10,7 +10,7 @@
m4_define([gtk_major_version], [3])
m4_define([gtk_minor_version], [13])
m4_define([gtk_micro_version], [1])
m4_define([gtk_micro_version], [3])
m4_define([gtk_interface_age], [0])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
@@ -41,7 +41,7 @@ AC_CANONICAL_HOST
m4_define([gtk_binary_version], [3.0.0])
# required versions of other packages
m4_define([glib_required_version], [2.39.5])
m4_define([glib_required_version], [2.41.0])
m4_define([pango_required_version], [1.32.4])
m4_define([atk_required_version], [2.12.0])
m4_define([cairo_required_version], [1.12.0])
@@ -1888,6 +1888,7 @@ gtk/gtkversion.h
gtk/gtk-win32.rc
gtk/inspector/Makefile
gtk/native/Makefile
util/Makefile
libgail-util/Makefile
modules/Makefile
modules/input/Makefile
+16 -12
View File
@@ -93,11 +93,11 @@ drawing_area_draw (GtkWidget *widget,
cairo_save (cr);
if (gtk_gesture_rotate_get_angle_delta (GTK_GESTURE_ROTATE (rotate), &angle))
cairo_matrix_rotate (&matrix, angle);
angle = gtk_gesture_rotate_get_angle_delta (GTK_GESTURE_ROTATE (rotate));
cairo_matrix_rotate (&matrix, angle);
if (gtk_gesture_zoom_get_scale_delta (GTK_GESTURE_ZOOM (zoom), &scale))
cairo_matrix_scale (&matrix, scale, scale);
scale = gtk_gesture_zoom_get_scale_delta (GTK_GESTURE_ZOOM (zoom));
cairo_matrix_scale (&matrix, scale, scale);
cairo_set_matrix (cr, &matrix);
cairo_rectangle (cr, -100, -100, 200, 200);
@@ -156,8 +156,9 @@ do_gestures (GtkWidget *do_widget)
gesture = gtk_gesture_swipe_new (drawing_area);
g_signal_connect (gesture, "swipe",
G_CALLBACK (swipe_gesture_swept), drawing_area);
gtk_gesture_attach (gesture, GTK_PHASE_BUBBLE);
g_object_unref (gesture);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (gesture),
GTK_PHASE_BUBBLE);
g_object_weak_ref (G_OBJECT (drawing_area), (GWeakNotify) g_object_unref, gesture);
/* Long press */
gesture = gtk_gesture_long_press_new (drawing_area);
@@ -165,22 +166,25 @@ do_gestures (GtkWidget *do_widget)
G_CALLBACK (long_press_gesture_pressed), drawing_area);
g_signal_connect (gesture, "end",
G_CALLBACK (long_press_gesture_end), drawing_area);
gtk_gesture_attach (gesture, GTK_PHASE_BUBBLE);
g_object_unref (gesture);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (gesture),
GTK_PHASE_BUBBLE);
g_object_weak_ref (G_OBJECT (drawing_area), (GWeakNotify) g_object_unref, gesture);
/* Rotate */
rotate = gesture = gtk_gesture_rotate_new (drawing_area);
g_signal_connect (gesture, "angle-changed",
G_CALLBACK (rotation_angle_changed), drawing_area);
gtk_gesture_attach (gesture, GTK_PHASE_BUBBLE);
g_object_unref (gesture);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (gesture),
GTK_PHASE_BUBBLE);
g_object_weak_ref (G_OBJECT (drawing_area), (GWeakNotify) g_object_unref, gesture);
/* Zoom */
zoom = gesture = gtk_gesture_zoom_new (drawing_area);
g_signal_connect (gesture, "scale-changed",
G_CALLBACK (zoom_scale_changed), drawing_area);
gtk_gesture_attach (gesture, GTK_PHASE_BUBBLE);
g_object_unref (gesture);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (gesture),
GTK_PHASE_BUBBLE);
g_object_weak_ref (G_OBJECT (drawing_area), (GWeakNotify) g_object_unref, gesture);
}
if (!gtk_widget_get_visible (window))
+6
View File
@@ -471,6 +471,9 @@ fontify (GtkTextBuffer *source_buffer)
gchar *start_ptr, *end_ptr;
gchar *tag;
gtk_text_buffer_get_bounds (source_buffer, &start_iter, &tmp_iter);
gtk_text_buffer_apply_tag_by_name (source_buffer, "source", &start_iter, &tmp_iter);
state = STATE_NORMAL;
gtk_text_buffer_get_iter_at_offset (source_buffer, &start_iter, 0);
@@ -626,6 +629,9 @@ load_file (const gchar *demoname,
NULL);
source_buffer = gtk_text_buffer_new (NULL);
gtk_text_buffer_create_tag (source_buffer, "source",
"font", "monospace",
NULL);
gtk_text_buffer_create_tag (source_buffer, "comment",
"foreground", "DodgerBlue",
NULL);
+32 -1
View File
@@ -269,12 +269,25 @@ info_bar_response (GtkWidget *infobar, gint response_id)
gtk_widget_hide (infobar);
}
static void
show_dialog (GtkWidget *button, GtkWidget *dialog)
{
gtk_widget_show (dialog);
}
static void
close_dialog (GtkWidget *dialog)
{
gtk_widget_hide (dialog);
}
static void
activate (GApplication *app)
{
GtkBuilder *builder;
GtkWindow *window;
GtkWidget *widget;
GtkWidget *dialog;
GtkAdjustment *adj;
static GActionEntry win_entries[] = {
{ "dark", NULL, NULL, "false", change_theme_state },
@@ -282,9 +295,12 @@ activate (GApplication *app)
{ "search", activate_search, NULL, NULL, NULL },
{ "delete", activate_delete, NULL, NULL, NULL }
};
GError *error = NULL;
builder = gtk_builder_new ();
gtk_builder_add_from_resource (builder, "/ui/widget-factory.ui", NULL);
gtk_builder_add_from_resource (builder, "/ui/widget-factory.ui", &error);
if (error)
g_print ("error: %s\n", error->message);
gtk_builder_add_callback_symbol (builder, "on_entry_icon_release", (GCallback)on_entry_icon_release);
gtk_builder_connect_signals (builder, NULL);
@@ -320,6 +336,21 @@ activate (GApplication *app)
g_signal_connect (widget, "response", G_CALLBACK (info_bar_response), NULL);
g_object_set_data (G_OBJECT (window), "infobar", widget);
dialog = (GtkWidget *)gtk_builder_get_object (builder, "info_dialog");
g_signal_connect (dialog, "response", G_CALLBACK (close_dialog), NULL);
widget = (GtkWidget *)gtk_builder_get_object (builder, "info_dialog_button");
g_signal_connect (widget, "clicked", G_CALLBACK (show_dialog), dialog);
dialog = (GtkWidget *)gtk_builder_get_object (builder, "action_dialog");
g_signal_connect (dialog, "response", G_CALLBACK (close_dialog), NULL);
widget = (GtkWidget *)gtk_builder_get_object (builder, "action_dialog_button");
g_signal_connect (widget, "clicked", G_CALLBACK (show_dialog), dialog);
dialog = (GtkWidget *)gtk_builder_get_object (builder, "preference_dialog");
g_signal_connect (dialog, "response", G_CALLBACK (close_dialog), NULL);
widget = (GtkWidget *)gtk_builder_get_object (builder, "preference_dialog_button");
g_signal_connect (widget, "clicked", G_CALLBACK (show_dialog), dialog);
gtk_widget_show_all (GTK_WIDGET (window));
g_object_unref (builder);
+103 -4
View File
@@ -2465,23 +2465,26 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
<child>
<object class="GtkToolButton">
<property name="visible">True</property>
<property name="label">New</property>
<property name="label" translatable="yes">New</property>
<property name="icon-name">document-new</property>
<property name="tooltip-text" translatable="yes">Create a new document</property>
</object>
</child>
<child>
<object class="GtkToolButton">
<property name="visible">True</property>
<property name="label">Save</property>
<property name="label" translatable="yes">Save</property>
<property name="icon-name">document-save</property>
<property name="tooltip-text" translatable="yes">Save the current document</property>
</object>
</child>
<child>
<object class="GtkToolButton">
<property name="visible">True</property>
<property name="label">Search</property>
<property name="label" translatable="yes">Search</property>
<property name="icon-name">search</property>
<property name="action-name">win.search</property>
<property name="tooltip-text" translatable="yes">Search for it</property>
</object>
</child>
</object>
@@ -2688,11 +2691,29 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
<object class="GtkLabel" id="label19">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">expander</property>
<property name="label" translatable="yes">Expander</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkButton" id="info_dialog_button">
<property name="visible">True</property>
<property name="label" translatable="yes">Inform</property>
</object>
</child>
<child>
<object class="GtkButton" id="action_dialog_button">
<property name="visible">True</property>
<property name="label" translatable="yes">Act</property>
</object>
</child>
<child>
<object class="GtkButton" id="preference_dialog_button">
<property name="visible">True</property>
<property name="label" translatable="yes">Configure</property>
</object>
</child>
</object>
</child>
</object>
@@ -2708,6 +2729,84 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
</object>
</child>
</object>
<object class="GtkMessageDialog" id="info_dialog">
<property name="transient-for">window</property>
<property name="modal">True</property>
<property name="text" translatable="yes">Do something?</property>
<property name="secondary-text" translatable="yes">If you do something,
bad things might happen.</property>
<signal name="delete-event" handler="gtk_widget_hide_on_delete"/>
<child type="action">
<object class="GtkButton" id="cancel_info_dialog">
<property name="visible">True</property>
<property name="label" translatable="yes">Cancel</property>
</object>
</child>
<child type="action">
<object class="GtkButton" id="doit_info_dialog">
<property name="visible">True</property>
<property name="label" translatable="yes">Do It</property>
</object>
</child>
<action-widgets>
<action-widget response="cancel">cancel_info_dialog</action-widget>
<action-widget response="ok">doit_info_dialog</action-widget>
</action-widgets>
</object>
<object class="GtkDialog" id="action_dialog">
<property name="transient-for">window</property>
<property name="modal">True</property>
<property name="use-header-bar">1</property>
<property name="title" translatable="yes">Action</property>
<signal name="delete-event" handler="gtk_widget_hide_on_delete"/>
<child internal-child="vbox">
<object class="GtkBox">
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="margin">20</property>
<property name="label" translatable="yes">Bla bla bla</property>
</object>
</child>
</object>
</child>
<child type="action">
<object class="GtkButton" id="cancel_action_dialog">
<property name="visible">True</property>
<property name="label" translatable="yes">Cancel</property>
</object>
</child>
<child type="action">
<object class="GtkButton" id="act_action_dialog">
<property name="visible">True</property>
<property name="can-default">True</property>
<property name="has-default">True</property>
<property name="label" translatable="yes">Action</property>
</object>
</child>
<action-widgets>
<action-widget response="cancel">cancel_action_dialog</action-widget>
<action-widget response="ok" default="true">act_action_dialog</action-widget>
</action-widgets>
</object>
<object class="GtkDialog" id="preference_dialog">
<property name="transient-for">window</property>
<property name="modal">True</property>
<property name="use-header-bar">1</property>
<property name="title" translatable="yes">Properties</property>
<signal name="delete-event" handler="gtk_widget_hide_on_delete"/>
<child internal-child="vbox">
<object class="GtkBox">
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="margin">20</property>
<property name="label" translatable="yes">Bla bla bla</property>
</object>
</child>
</object>
</child>
</object>
<object class="GtkSizeGroup">
<property name="mode">vertical</property>
<widgets>
+1
View File
@@ -389,6 +389,7 @@ gdk_window_begin_resize_drag
gdk_window_begin_resize_drag_for_device
gdk_window_begin_move_drag
gdk_window_begin_move_drag_for_device
gdk_window_show_window_menu
gdk_window_constrain_size
gdk_window_beep
gdk_window_get_scale_factor
+2
View File
@@ -300,6 +300,7 @@ HTML_IMAGES = \
$(top_srcdir)/gtk/stock-icons/24/gtk-page-setup.png \
$(srcdir)/images/aboutdialog.png \
$(srcdir)/images/accel-label.png \
$(srcdir)/images/action-bar.png \
$(srcdir)/images/appchooserbutton.png \
$(srcdir)/images/appchooserdialog.png \
$(srcdir)/images/assistant.png \
@@ -348,6 +349,7 @@ HTML_IMAGES = \
$(srcdir)/images/scales.png \
$(srcdir)/images/scrollbar.png \
$(srcdir)/images/scrolledwindow.png \
$(srcdir)/images/search-bar.png \
$(srcdir)/images/search-entry.png \
$(srcdir)/images/separator.png \
$(srcdir)/images/spinbutton.png \
-7
View File
@@ -90,13 +90,6 @@ GDK_PIXBUF_DISABLE_DEPRECATED and G_DISABLE_DEPRECATED for GDK, GdkPixbuf and
GLib.
</para>
<para>
If you want to make sure that your program doesn't use any functions which
may be problematic in a multihead setting, you can define the preprocessor
symbol GDK_MULTIHEAD_SAFE by using the command line option
<literal>-DGTK_MULTIHEAD_SAFE=1</literal>.
</para>
<para>
Similarly, if you want to make sure that your program doesn't use any
functions which may be problematic in a multidevice setting, you can
+61 -45
View File
@@ -2615,6 +2615,8 @@ gtk_places_sidebar_get_show_connect_to_server
gtk_places_sidebar_set_show_connect_to_server
gtk_places_sidebar_get_local_only
gtk_places_sidebar_set_local_only
gtk_places_sidebar_get_show_enter_location
gtk_places_sidebar_set_show_enter_location
<SUBSECTION Standard>
GTK_PLACES_SIDEBAR
GTK_IS_PLACES_SIDEBAR
@@ -3244,6 +3246,8 @@ gtk_settings_set_property_value
gtk_settings_set_string_property
gtk_settings_set_long_property
gtk_settings_set_double_property
GtkIMPreeditStyle
GtkIMStatusStyle
<SUBSECTION Standard>
GtkSettingsClass
GTK_IS_SETTINGS
@@ -5487,6 +5491,7 @@ gtk_widget_get_has_window
gtk_widget_set_has_window
gtk_widget_get_sensitive
gtk_widget_is_sensitive
GtkStateType
gtk_widget_get_state
gtk_widget_get_visible
gtk_widget_is_visible
@@ -5952,65 +5957,76 @@ GTK_STYLE_PROPERTY_BORDER_COLOR
GTK_STYLE_PROPERTY_BACKGROUND_IMAGE
GtkBorderStyle
<SUBSECTION>
GTK_STYLE_CLASS_ACCELERATOR
GTK_STYLE_CLASS_ARROW
GTK_STYLE_CLASS_BACKGROUND
GTK_STYLE_CLASS_BOTTOM
GTK_STYLE_CLASS_BUTTON
GTK_STYLE_CLASS_CALENDAR
GTK_STYLE_CLASS_CELL
GTK_STYLE_CLASS_COMBOBOX_ENTRY
GTK_STYLE_CLASS_CHECK
GTK_STYLE_CLASS_CSD
GTK_STYLE_CLASS_CURSOR_HANDLE
GTK_STYLE_CLASS_DEFAULT
GTK_STYLE_CLASS_ENTRY
GTK_STYLE_CLASS_HEADER
GTK_STYLE_CLASS_MENU
GTK_STYLE_CLASS_RADIO
GTK_STYLE_CLASS_RUBBERBAND
GTK_STYLE_CLASS_SCROLLBAR
GTK_STYLE_CLASS_SCROLLBARS_JUNCTION
GTK_STYLE_CLASS_SLIDER
GTK_STYLE_CLASS_TOOLTIP
GTK_STYLE_CLASS_TROUGH
GTK_STYLE_CLASS_ACCELERATOR
GTK_STYLE_CLASS_DOCK
GTK_STYLE_CLASS_GRIP
GTK_STYLE_CLASS_MENUBAR
GTK_STYLE_CLASS_MENUITEM
GTK_STYLE_CLASS_PROGRESSBAR
GTK_STYLE_CLASS_SPINNER
GTK_STYLE_CLASS_TOOLBAR
GTK_STYLE_CLASS_PRIMARY_TOOLBAR
GTK_STYLE_CLASS_INLINE_TOOLBAR
GTK_STYLE_CLASS_PANE_SEPARATOR
GTK_STYLE_CLASS_SEPARATOR
GTK_STYLE_CLASS_SIDEBAR
GTK_STYLE_CLASS_DESTRUCTIVE_ACTION
GTK_STYLE_CLASS_DIM_LABEL
GTK_STYLE_CLASS_DND
GTK_STYLE_CLASS_DOCK
GTK_STYLE_CLASS_ENTRY
GTK_STYLE_CLASS_ERROR
GTK_STYLE_CLASS_EXPANDER
GTK_STYLE_CLASS_FRAME
GTK_STYLE_CLASS_GRIP
GTK_STYLE_CLASS_HEADER
GTK_STYLE_CLASS_HIGHLIGHT
GTK_STYLE_CLASS_HORIZONTAL
GTK_STYLE_CLASS_IMAGE
GTK_STYLE_CLASS_INFO
GTK_STYLE_CLASS_INLINE_TOOLBAR
GTK_STYLE_CLASS_INSERTION_CURSOR
GTK_STYLE_CLASS_LEFT
GTK_STYLE_CLASS_LEVEL_BAR
GTK_STYLE_CLASS_LINKED
GTK_STYLE_CLASS_LIST
GTK_STYLE_CLASS_LIST_ROW
GTK_STYLE_CLASS_MARK
GTK_STYLE_CLASS_MENU
GTK_STYLE_CLASS_MENUBAR
GTK_STYLE_CLASS_MENUITEM
GTK_STYLE_CLASS_MESSAGE_DIALOG
GTK_STYLE_CLASS_NEEDS_ATTENTION
GTK_STYLE_CLASS_NOTEBOOK
GTK_STYLE_CLASS_OSD
GTK_STYLE_CLASS_PANE_SEPARATOR
GTK_STYLE_CLASS_POPUP
GTK_STYLE_CLASS_PRIMARY_TOOLBAR
GTK_STYLE_CLASS_PROGRESSBAR
GTK_STYLE_CLASS_PULSE
GTK_STYLE_CLASS_QUESTION
GTK_STYLE_CLASS_RADIO
GTK_STYLE_CLASS_RAISED
GTK_STYLE_CLASS_RIGHT
GTK_STYLE_CLASS_RUBBERBAND
GTK_STYLE_CLASS_SCALE
GTK_STYLE_CLASS_SCALE_HAS_MARKS_ABOVE
GTK_STYLE_CLASS_SCALE_HAS_MARKS_BELOW
GTK_STYLE_CLASS_SCROLLBAR
GTK_STYLE_CLASS_SCROLLBARS_JUNCTION
GTK_STYLE_CLASS_SEPARATOR
GTK_STYLE_CLASS_SIDEBAR
GTK_STYLE_CLASS_SLIDER
GTK_STYLE_CLASS_SPINBUTTON
GTK_STYLE_CLASS_SPINNER
GTK_STYLE_CLASS_SUGGESTED_ACTION
GTK_STYLE_CLASS_TITLEBAR
GTK_STYLE_CLASS_TOOLBAR
GTK_STYLE_CLASS_TOOLTIP
GTK_STYLE_CLASS_TOP
GTK_STYLE_CLASS_TROUGH
GTK_STYLE_CLASS_VERTICAL
GTK_STYLE_CLASS_VIEW
GTK_STYLE_CLASS_WARNING
GTK_STYLE_CLASS_HORIZONTAL
GTK_STYLE_CLASS_VERTICAL
GTK_STYLE_CLASS_TOP
GTK_STYLE_CLASS_BOTTOM
GTK_STYLE_CLASS_LEFT
GTK_STYLE_CLASS_RIGHT
GTK_STYLE_CLASS_LINKED
GTK_STYLE_CLASS_ARROW
GTK_STYLE_CLASS_OSD
GTK_STYLE_CLASS_LEVEL_BAR
GTK_STYLE_CLASS_CURSOR_HANDLE
GTK_STYLE_CLASS_INSERTION_CURSOR
GTK_STYLE_CLASS_TITLEBAR
GTK_STYLE_REGION_COLUMN
GTK_STYLE_REGION_COLUMN_HEADER
GTK_STYLE_REGION_ROW
@@ -6527,8 +6543,6 @@ gtk_binding_set_add_path
GtkBaselinePosition
GtkDeleteType
GtkDirectionType
GtkIMPreeditStyle
GtkIMStatusStyle
GtkJustification
GtkMovementStep
GtkOrientation
@@ -6539,7 +6553,6 @@ GtkScrollStep
GtkScrollType
GtkSelectionMode
GtkShadowType
GtkStateType
GtkStateFlags
GtkToolbarStyle
GtkSortType
@@ -7801,6 +7814,8 @@ GtkStackTransitionType
gtk_stack_set_transition_type
gtk_stack_get_transition_type
gtk_stack_get_transition_running
<SUBSECTION Private>
gtk_stack_get_type
</SECTION>
<SECTION>
@@ -7810,6 +7825,8 @@ GtkStackSwitcher
gtk_stack_switcher_new
gtk_stack_switcher_set_stack
gtk_stack_switcher_get_stack
<SUBSECTION Private>
gtk_stack_switcher_get_type
</SECTION>
<SECTION>
@@ -7826,6 +7843,8 @@ gtk_revealer_set_transition_duration
GtkRevealerTransitionType
gtk_revealer_get_transition_type
gtk_revealer_set_transition_type
<SUBSECTION Private>
gtk_revealer_get_type
</SECTION>
<SECTION>
@@ -7898,9 +7917,10 @@ gtk_popover_get_modal
<FILE>gtkeventcontroller</FILE>
<TITLE>GtkEventController</TITLE>
GtkEventController
GtkPropagationPhase
gtk_event_controller_get_propagation_phase
gtk_event_controller_set_propagation_phase
gtk_event_controller_handle_event
gtk_event_controller_get_event_mask
gtk_event_controller_set_event_mask
gtk_event_controller_get_widget
gtk_event_controller_reset
@@ -7931,9 +7951,6 @@ gtk_gesture_set_sequence_state
gtk_gesture_set_state
gtk_gesture_get_sequences
gtk_gesture_handles_sequence
GtkPropagationPhase
gtk_gesture_attach
gtk_gesture_detach
<SUBSECTION>
gtk_gesture_get_last_updated_sequence
@@ -8048,7 +8065,6 @@ gtk_gesture_multi_press_get_type
<TITLE>GtkGesturePan</TITLE>
GtkGesturePan
GtkPanDirection
GtkPanOrientation
gtk_gesture_pan_new
gtk_gesture_pan_get_orientation
gtk_gesture_pan_set_orientation
+1
View File
@@ -7,6 +7,7 @@ gtk_accel_label_get_type
gtk_accel_map_get_type
gtk_accessible_get_type
gtk_actionable_get_type
gtk_action_bar_get_type
gtk_action_get_type
gtk_action_group_get_type
gtk_activatable_get_type
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

+160 -11
View File
@@ -72,6 +72,14 @@
<member>GdkEventTouch</member>
</simplelist>
</para>
<para>
Additionally, GDK/GTK synthesizes other signals to let know whether
grabs (system-wide or in-app) are taking input away:
<simplelist>
<member>GdkEventGrabBroken</member>
<member>GtkWidget::grab-notify</member>
</simplelist>
</para>
<para>
When GTK+ is initialized, it sets up an event handler function with
gdk_event_handler_set(), which receives all of these input events
@@ -91,34 +99,107 @@
<para>
The event is then propagated from the toplevel window down to the
target widget. In this phase, which is known as the “capture” phase,
gestures that are attached with %GTK_PHASE_CAPTURE get a chance
gestures that are attached with GTK_PHASE_CAPTURE get a chance
to react to the event.
</para>
<para>
After the “capture” phase, the widget that was intended to be the
destination of the event will let run gestures attached to it with
GTK_PHASE_TARGET. This is known as the “target” phase, and does only
happen on that widget.
</para>
<para>
Next, the appropriate event signal is emitted for the event in question,
e.g. “motion-notify-event”. Handling these signals was the primary
way to handle input in GTK+ widgets before gestures were introduced.
The signals are emitted from the target widget up to the toplevel,
until a signal handler indicates that it has handled the event, by
returning %GDK_EVENT_STOP.
returning GDK_EVENT_STOP.
</para>
<para>
The default handlers for the event signals send the event
to gestures that are attached with %GTK_PHASE_TARGET. Therefore,
gestures in the ”target” phase are only used if the widget does
to gestures that are attached with GTK_PHASE_BUBBLE. Therefore,
gestures in the “bubble” phase are only used if the widget does
not have its own event handlers, or takes care to chain up to the
default handlers.
default GtkWidget handlers.
</para>
<para>
After calling the event handlers, in the so-called ”bubble” phase,
gestures that are attached with %GTK_PHASE_BUBBLE get a chance
to react to the event.
Anytime during the propagation phase, a widget may indicate that a
received event was consumed and propagation should therefore be stopped.
In traditional event handlers, this is hinted by returning GDK_EVENT_STOP,
if gestures are used, this may happen when the widget tells the gesture
to claim the event touch sequence (or the pointer events) for its own. See the
"gesture states" section below to know more of the latter.
</para>
</refsect2>
<refsect2>
<title>Touch events</title>
<para>
Touch events are emitted as events of type GDK_TOUCH_BEGIN, GDK_TOUCH_UPDATE or
GDK_TOUCH_END, those events contain an “event sequence” that univocally identifies
the physical touch until it is lifted from the device.
</para>
<!-- grabs -->
<para>
On some windowing platforms, multitouch devices perform pointer emulation, this works
by granting a “pointer emulating” hint to one of the currently interacting touch
sequences, which will be reported on every GdkEventTouch event from that sequence. By
default, if a widget didn't request touch events by setting GDK_TOUCH_MASK on its
event mask and didn't override GtkWidget::touch-event, GTK+ will transform these
“pointer emulating” events into semantically similar GdkEventButton and GdkEventMotion
events. Depending on GDK_TOUCH_MASK being in the event mask or not, non-pointer-emulating
sequences could still trigger gestures or just get filtered out, regardless of the widget
not handling those directly.
</para>
<para>
If the widget sets GDK_TOUCH_MASK on its event mask and doesn't chain up on
GtkWidget::touch-event, only touch events will be received, and no pointer emulation
will be performed.
</para>
</refsect2>
<refsect2>
<title>Grabs</title>
<para>
Grabs are a method to claim all input events from a device, they happen
either implicitly on pointer and touch devices, or explicitly. Implicit grabs
happen on user interaction, when a GdkEventButtonPress happens, all events from
then on, until after the corresponding GdkEventButtonRelease, will be reported
to the widget that got the first event. Likewise, on touch events, every
GdkEventSequence will deliver only events to the widget that received its
GDK_TOUCH_BEGIN event.
</para>
<para>
Explicit grabs happen programatically (both activation and deactivation),
and can be either system-wide (GDK grabs) or application-wide (GTK grabs).
On the windowing platforms that support it, GDK grabs will prevent any
interaction with any other application/window/widget than the grabbing one,
whereas GTK grabs will be effective only within the application (across all
its windows), still allowing for interaction with other applications.
</para>
<para>
But one important aspect of grabs is that they may potentially happen at any
point somewhere else, even while the pointer/touch device is already grabbed.
This makes it necessary for widgets to handle the cancellation of any ongoing
interaction. Depending on whether a GTK or GDK grab is causing this, the
widget will respectively receive a GtkWidget::grab-notify signal, or a
GdkEventGrabBroken event.
</para>
<para>
On gestures, these signals are handled automatically, causing the gesture
to cancel all tracked pointer/touch events, and signal the end of recognition.
</para>
</refsect2>
<refsect2>
@@ -129,9 +210,77 @@
</refsect2>
<refsect2>
<title>Gestures</title>
<title>Event controllers and gestures</title>
<!-- touch sequences, states, anything else -->
<para>
Event controllers are standalone objects that can perform specific actions
upon received GdkEvents. These are tied to a GtkWidget, and can be told of
the event propagation phase at which they will manage the events.
</para>
<para>
Gestures are a set of specific controllers that are prepared to handle pointer
and/or touch events, each gestures implementation attempts to recognize specific
actions out the received events, notifying of the state/progress accordingly to
let the widget react to those. On multi-touch gestures, every interacting touch
sequence will be tracked independently.
</para>
<para>
Being gestures “simple” units, it is not uncommon to tie several together to
perform higher level actions, grouped gestures handle the same event sequences
simultaneously, and those sequences share a same state across all grouped
gestures. Some examples of grouping may be:
<simplelist>
<member>
A “drag” and a “swipe” gestures may want grouping. The former will report
events as the dragging happens, the latter will tell the swipe X/Y velocities
only after gesture has finished.
</member>
<member>
Grouping a “drag” gesture with a “pan” gesture will only effectively allow
dragging in the panning orientation, as both gestures share state.
</member>
<member>
If “press” and “long press” are wanted simultaneously, those would need grouping.
</member>
</simplelist>
</para>
</refsect2>
<refsect2>
<title>Gesture states</title>
<para>
Gestures have a notion of “state” for each individual touch sequence. When events
from a touch sequence are first received, the touch sequence will have “none” state,
this means the touch sequence is being handled by the gesture to possibly trigger
actions, but the event propagation will not be stopped.
</para>
<para>
When the gesture enters recognition, or at a later point in time, the widget may
choose to claim the touch sequences (individually or as a group), hence stopping
event propagation after the event is run through every gesture in that widget and
propagation phase. Anytime this happens, the touch sequences are cancelled downwards
the propagation chain, to let these know that no further events will be sent.
</para>
<para>
Alternatively, or at a later point in time, the widget may choose to deny the touch
sequences, thus letting those go through again in event propagation. When this happens
in the capture phase, and if there are no other claiming gestures in the widget,
a GDK_TOUCH_BEGIN/GDK_BUTTON_PRESS event will be emulated and
propagated downwards, in order to preserve consistency.
</para>
<para>
Grouped gestures always share the same state for a given touch sequence, so setting
the state on one does transfer the state to the others. They also are mutually exclusive,
within a widget there may be only one gesture group claiming a given sequence. If
another gesture group claims later that same sequence, the first group will deny the
sequence.
</para>
</refsect2>
</refsect1>
+1 -1
View File
@@ -415,7 +415,7 @@ How do I use GTK+ with other non-C languages?
<answer>
<para>
See the <ulink url="http://www.gtk.org/bindings.html">list of language
See the <ulink url="http://www.gtk.org/language-bindings.php">list of language
bindings</ulink> on <ulink
url="http://www.gtk.org">http://www.gtk.org</ulink>.
</para>
-8
View File
@@ -162,10 +162,6 @@ additional environment variables.
<term>keybindings</term>
<listitem><para>Keybindings</para></listitem>
</varlistentry>
<varlistentry>
<term>multihead</term>
<listitem><para>Working on multiple displays</para></listitem>
</varlistentry>
<varlistentry>
<term>modules</term>
<listitem><para>Loading of modules</para></listitem>
@@ -395,10 +391,6 @@ nevertheless.
<term>nograbs</term>
<listitem><para>Turn off all pointer and keyboard grabs</para></listitem>
</varlistentry>
<varlistentry>
<term>multihead</term>
<listitem><para>Information related to multiple screens</para></listitem>
</varlistentry>
<varlistentry>
<term>xinerama</term>
<listitem><para>Simulate a multi-monitor setup</para></listitem>
+6
View File
@@ -123,6 +123,12 @@
<link linkend="GtkHeaderBar">
<inlinegraphic fileref="headerbar.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkSearchBar">
<inlinegraphic fileref="search-bar.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkActionBar">
<inlinegraphic fileref="action-bar.png" format="PNG"></inlinegraphic>
</link>
<link linkend="GtkListBox">
<inlinegraphic fileref="list-box.png" format="PNG"></inlinegraphic>
</link>
+69
View File
@@ -395,6 +395,73 @@ create_info_bar (void)
return info;
}
static WidgetInfo *
create_search_bar (void)
{
GtkWidget *widget;
GtkWidget *entry;
WidgetInfo *info;
GtkWidget *view;
GtkWidget *box;
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
widget = gtk_search_bar_new ();
entry = gtk_search_entry_new ();
gtk_entry_set_text (GTK_ENTRY (entry), "Search Bar");
gtk_container_add (GTK_CONTAINER (widget), entry);
gtk_widget_show (entry);
gtk_search_bar_set_show_close_button (GTK_SEARCH_BAR (widget), TRUE);
gtk_search_bar_set_search_mode (GTK_SEARCH_BAR (widget), TRUE);
gtk_container_add (GTK_CONTAINER (box), widget);
view = gtk_text_view_new ();
gtk_widget_show (view);
gtk_box_pack_start (GTK_BOX (box), view, TRUE, TRUE, 0);
info = new_widget_info ("search-bar", box, SMALL);
gtk_container_set_border_width (GTK_CONTAINER (info->window), 0);
return info;
}
static WidgetInfo *
create_action_bar (void)
{
GtkWidget *widget;
GtkWidget *button;
WidgetInfo *info;
GtkWidget *view;
GtkWidget *box;
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
view = gtk_text_view_new ();
gtk_widget_show (view);
gtk_box_pack_start (GTK_BOX (box), view, TRUE, TRUE, 0);
widget = gtk_action_bar_new ();
button = gtk_button_new_from_icon_name ("object-select-symbolic", GTK_ICON_SIZE_MENU);
gtk_widget_show (button);
gtk_container_add (GTK_CONTAINER (widget), button);
button = gtk_button_new_from_icon_name ("call-start-symbolic", GTK_ICON_SIZE_MENU);
gtk_widget_show (button);
gtk_container_add (GTK_CONTAINER (widget), button);
g_object_set (gtk_widget_get_parent (button), "margin", 6, "spacing", 6, NULL);
gtk_widget_show (widget);
gtk_container_add (GTK_CONTAINER (box), widget);
info = new_widget_info ("action-bar", box, SMALL);
gtk_container_set_border_width (GTK_CONTAINER (info->window), 0);
return info;
}
static WidgetInfo *
create_recent_chooser_dialog (void)
{
@@ -1409,6 +1476,8 @@ get_all_widgets (void)
{
GList *retval = NULL;
retval = g_list_prepend (retval, create_search_bar ());
retval = g_list_prepend (retval, create_action_bar ());
retval = g_list_prepend (retval, create_list_box());
retval = g_list_prepend (retval, create_flow_box());
retval = g_list_prepend (retval, create_headerbar ());
+3 -3
View File
@@ -426,7 +426,7 @@ stamp-gc-h: $(top_builddir)/config.status
dist-hook: ../build/win32/vs9/gdk.vcproj ../build/win32/vs10/gdk.vcxproj ../build/win32/vs10/gdk.vcxproj.filters
../build/win32/vs9/gdk.vcproj: ../build/win32/vs9/gdk.vcprojin
for F in $(libgdk_3_la_SOURCES); do \
for F in `echo $(libgdk_3_la_SOURCES) | tr '/' '\\'`; do \
case $$F in \
*.c) echo ' <File RelativePath="..\..\..\gdk\'$$F'" />' \
;; \
@@ -436,7 +436,7 @@ dist-hook: ../build/win32/vs9/gdk.vcproj ../build/win32/vs10/gdk.vcxproj ../buil
rm libgdk.sourcefiles
../build/win32/vs10/gdk.vcxproj: ../build/win32/vs10/gdk.vcxprojin
for F in $(libgdk_3_la_SOURCES); do \
for F in `echo $(libgdk_3_la_SOURCES) | tr '/' '\\'`; do \
case $$F in \
*.c) echo ' <ClCompile Include="..\..\..\gdk\'$$F'" />' \
;; \
@@ -446,7 +446,7 @@ dist-hook: ../build/win32/vs9/gdk.vcproj ../build/win32/vs10/gdk.vcxproj ../buil
rm libgdk.vs10.sourcefiles
../build/win32/vs10/gdk.vcxproj.filters: ../build/win32/vs10/gdk.vcxproj.filtersin
for F in $(libgdk_3_la_SOURCES); do \
for F in `echo $(libgdk_3_la_SOURCES) | tr '/' '\\'`; do \
case $$F in \
*.c) echo ' <ClCompile Include="..\..\..\gdk\'$$F'"><Filter>Source Files</Filter></ClCompile>' \
;; \
-2
View File
@@ -219,10 +219,8 @@ GType gdk_cursor_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GdkCursor* gdk_cursor_new_for_display (GdkDisplay *display,
GdkCursorType cursor_type);
#ifndef GDK_MULTIHEAD_SAFE
GDK_AVAILABLE_IN_ALL
GdkCursor* gdk_cursor_new (GdkCursorType cursor_type);
#endif
GDK_AVAILABLE_IN_ALL
GdkCursor* gdk_cursor_new_from_pixbuf (GdkDisplay *display,
GdkPixbuf *pixbuf,
+2 -2
View File
@@ -190,7 +190,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
GDK_TYPE_INPUT_SOURCE,
GDK_SOURCE_MOUSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS));
G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY));
/**
* GdkDevice:input-mode:
*
@@ -205,7 +205,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
P_("Input mode for the device"),
GDK_TYPE_INPUT_MODE,
GDK_MODE_DISABLED,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY));
/**
* GdkDevice:has-cursor:
*
+1 -11
View File
@@ -31,17 +31,7 @@ G_BEGIN_DECLS
typedef struct _GdkDisplayClass GdkDisplayClass;
/* Tracks information about the keyboard grab on this display */
typedef struct
{
GdkWindow *window;
GdkWindow *native_window;
gulong serial;
gboolean owner_events;
guint32 time;
} GdkKeyboardGrabInfo;
/* Tracks information about the pointer grab on this display */
/* Tracks information about the device grab on this display */
typedef struct
{
GdkWindow *window;
+1 -5
View File
@@ -479,11 +479,7 @@ gdk_event_put (const GdkEvent *event)
if (event->any.window)
display = gdk_window_get_display (event->any.window);
else
{
GDK_NOTE (MULTIHEAD,
g_message ("Falling back to default display for gdk_event_put()"));
display = gdk_display_get_default ();
}
display = gdk_display_get_default ();
gdk_display_put_event (display, event);
}
-4
View File
@@ -1305,14 +1305,10 @@ void gdk_set_show_events (gboolean show_events);
GDK_AVAILABLE_IN_ALL
gboolean gdk_get_show_events (void);
#ifndef GDK_MULTIHEAD_SAFE
GDK_AVAILABLE_IN_ALL
gboolean gdk_setting_get (const gchar *name,
GValue *value);
#endif /* GDK_MULTIHEAD_SAFE */
G_END_DECLS
#endif /* __GDK_EVENTS_H__ */
-2
View File
@@ -80,10 +80,8 @@ struct _GdkKeymapKey
GDK_AVAILABLE_IN_ALL
GType gdk_keymap_get_type (void) G_GNUC_CONST;
#ifndef GDK_MULTIHEAD_SAFE
GDK_AVAILABLE_IN_ALL
GdkKeymap* gdk_keymap_get_default (void);
#endif
GDK_AVAILABLE_IN_ALL
GdkKeymap* gdk_keymap_get_for_display (GdkDisplay *display);
-4
View File
@@ -95,8 +95,6 @@ GdkGrabStatus gdk_keyboard_grab (GdkWindow *window,
guint32 time_);
#endif /* GDK_MULTIDEVICE_SAFE */
#ifndef GDK_MULTIHEAD_SAFE
#ifndef GDK_MULTIDEVICE_SAFE
GDK_DEPRECATED_IN_3_0_FOR(gdk_device_ungrab)
void gdk_pointer_ungrab (guint32 time_);
@@ -122,8 +120,6 @@ void gdk_set_double_click_time (guint msec);
GDK_AVAILABLE_IN_ALL
void gdk_beep (void);
#endif /* GDK_MULTIHEAD_SAFE */
GDK_AVAILABLE_IN_ALL
void gdk_flush (void);
+2 -2
View File
@@ -735,7 +735,7 @@ gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass)
impl_class->focus = NULL;
impl_class->set_type_hint = NULL;
impl_class->get_type_hint = NULL;
impl_class->set_modal_hint = NULL;
impl_class->set_modal_hint = gdk_offscreen_window_set_boolean;
impl_class->set_skip_taskbar_hint = gdk_offscreen_window_set_boolean;
impl_class->set_skip_pager_hint = gdk_offscreen_window_set_boolean;
impl_class->set_urgency_hint = gdk_offscreen_window_set_boolean;
@@ -746,7 +746,7 @@ gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass)
impl_class->set_transient_for = gdk_offscreen_window_set_transient_for;
impl_class->get_frame_extents = gdk_offscreen_window_get_frame_extents;
impl_class->set_override_redirect = NULL;
impl_class->set_accept_focus = NULL;
impl_class->set_accept_focus = gdk_offscreen_window_set_boolean;
impl_class->set_focus_on_map = gdk_offscreen_window_set_boolean;
impl_class->set_icon_list = gdk_offscreen_window_set_list;
impl_class->set_icon_name = gdk_offscreen_window_set_string;
-2
View File
@@ -31,10 +31,8 @@ G_BEGIN_DECLS
GDK_AVAILABLE_IN_ALL
PangoContext *gdk_pango_context_get_for_screen (GdkScreen *screen);
#ifndef GDK_MULTIHEAD_SAFE
GDK_AVAILABLE_IN_ALL
PangoContext *gdk_pango_context_get (void);
#endif
/* Get a clip region to draw only part of a layout or
-3
View File
@@ -152,7 +152,6 @@ G_BEGIN_DECLS
/* Selections
*/
#ifndef GDK_MULTIHEAD_SAFE
GDK_AVAILABLE_IN_ALL
gboolean gdk_selection_owner_set (GdkWindow *owner,
GdkAtom selection,
@@ -160,8 +159,6 @@ gboolean gdk_selection_owner_set (GdkWindow *owner,
gboolean send_event);
GDK_AVAILABLE_IN_ALL
GdkWindow* gdk_selection_owner_get (GdkAtom selection);
#endif/* GDK_MULTIHEAD_SAFE */
GDK_AVAILABLE_IN_ALL
gboolean gdk_selection_owner_set_for_display (GdkDisplay *display,
GdkWindow *owner,
-2
View File
@@ -82,7 +82,6 @@ typedef enum
GDK_AVAILABLE_IN_ALL
GType gdk_visual_get_type (void) G_GNUC_CONST;
#ifndef GDK_MULTIHEAD_SAFE
GDK_AVAILABLE_IN_ALL
gint gdk_visual_get_best_depth (void);
GDK_AVAILABLE_IN_ALL
@@ -108,7 +107,6 @@ void gdk_query_visual_types (GdkVisualType **visual_types,
GDK_AVAILABLE_IN_ALL
GList* gdk_list_visuals (void);
#endif
GDK_AVAILABLE_IN_ALL
GdkScreen *gdk_visual_get_screen (GdkVisual *visual);
+1 -9
View File
@@ -1243,9 +1243,6 @@ gdk_window_new (GdkWindow *parent,
if (!parent)
{
GDK_NOTE (MULTIHEAD,
g_warning ("gdk_window_new(): no parent specified reverting to parent = default root window"));
screen = gdk_screen_get_default ();
parent = gdk_screen_get_root_window (screen);
}
@@ -6034,12 +6031,7 @@ gdk_window_get_geometry (GdkWindow *window,
GdkWindowImplClass *impl_class;
if (!window)
{
GDK_NOTE (MULTIHEAD,
g_message ("gdk_window_get_geometry(): Window needs "
"to be non-NULL to be multi head safe"));
window = gdk_screen_get_root_window ((gdk_screen_get_default ()));
}
window = gdk_screen_get_root_window ((gdk_screen_get_default ()));
g_return_if_fail (GDK_IS_WINDOW (window));
+3 -1
View File
@@ -44,7 +44,9 @@ libgdk_wayland_la_SOURCES = \
gdkselection-wayland.c \
gdkwindow-wayland.c \
gdkwayland.h \
gdkprivate-wayland.h
gdkprivate-wayland.h \
wm-button-layout-translation.c \
wm-button-layout-translation.h
libgdkinclude_HEADERS = \
gdkwayland.h
+2 -2
View File
@@ -1129,7 +1129,7 @@ deliver_key_event (GdkWaylandDeviceData *device,
event->key.window = device->keyboard_focus ? g_object_ref (device->keyboard_focus) : NULL;
gdk_event_set_device (event, device->master_keyboard);
gdk_event_set_source_device (event, device->keyboard);
event->button.time = time_;
event->key.time = time_;
event->key.state = device->modifiers;
event->key.group = 0;
event->key.hardware_keycode = key;
@@ -1289,7 +1289,7 @@ _create_touch_event (GdkWaylandDeviceData *device,
event->touch.time = time;
event->touch.state = device->modifiers;
gdk_event_set_screen (event, display->screen);
event->touch.sequence = GUINT_TO_POINTER (touch->id);
event->touch.sequence = GUINT_TO_POINTER (touch->id + 1);
if (touch->initial_touch)
{
+46 -1
View File
@@ -29,6 +29,8 @@
#include "gdkwayland.h"
#include "gdkprivate-wayland.h"
#include "wm-button-layout-translation.h"
typedef struct _GdkWaylandScreen GdkWaylandScreen;
typedef struct _GdkWaylandScreenClass GdkWaylandScreenClass;
@@ -480,6 +482,9 @@ update_xft_settings (GdkScreen *screen)
}
}
#define WM_SETTINGS_SCHEMA "org.gnome.desktop.wm.preferences"
#define CLASSIC_WM_SETTINGS_SCHEMA "org.gnome.shell.extensions.classic-overrides"
typedef struct _TranslationEntry TranslationEntry;
struct _TranslationEntry {
const gchar *schema;
@@ -511,6 +516,8 @@ static TranslationEntry translations[] = {
{ "org.gnome.desktop.sound", "input-feedback-sounds", "gtk-enable-input-feedback-sounds", G_TYPE_BOOLEAN, { . b = FALSE } },
{ "org.gnome.desktop.privacy", "recent-files-max-age", "gtk-recent-files-max-age", G_TYPE_INT, { .i = 30 } },
{ "org.gnome.desktop.privacy", "remember-recent-files", "gtk-recent-files-enabled", G_TYPE_BOOLEAN, { .b = TRUE } },
{ WM_SETTINGS_SCHEMA, "button-layout", "gtk-decoration-layout", G_TYPE_STRING, { .s = "menu:close" } },
{ CLASSIC_WM_SETTINGS_SCHEMA, "button-layout", "gtk-decoration-layout", G_TYPE_STRING, { .s = "menu:close" } },
{ "org.gnome.settings-daemon.plugins.xsettings", "antialiasing", "gtk-xft-antialias", G_TYPE_NONE, { .i = 0 } },
{ "org.gnome.settings-daemon.plugins.xsettings", "hinting", "gtk-xft-hinting", G_TYPE_NONE, { .i = 0 } },
{ "org.gnome.settings-daemon.plugins.xsettings", "hinting", "gtk-xft-hintstyle", G_TYPE_NONE, { .i = 0 } },
@@ -681,6 +688,41 @@ set_value_from_entry (GdkScreen *screen,
}
}
static void
set_decoration_layout_from_entry (GdkScreen *screen,
TranslationEntry *entry,
GValue *value)
{
GdkWaylandScreen *screen_wayland = GDK_WAYLAND_SCREEN (screen);
GSettings *settings = NULL;
const char *session;
/* Hack: until we get session-dependent defaults in GSettings,
* swap out the usual schema for the "classic" one when
* running in classic mode
*/
session = g_getenv ("XDG_CURRENT_DESKTOP");
if (session && strstr (session, "GNOME-Classic"))
settings = (GSettings *)g_hash_table_lookup (screen_wayland->settings, CLASSIC_WM_SETTINGS_SCHEMA);
if (settings == NULL)
settings = (GSettings *)g_hash_table_lookup (screen_wayland->settings, WM_SETTINGS_SCHEMA);
if (settings)
{
gchar *s = g_settings_get_string (settings, entry->key);
translate_wm_button_layout_to_gtk (s);
g_value_set_string (value, s);
g_free (s);
}
else
{
g_value_set_static_string (value, entry->fallback.s);
}
}
static gboolean
set_capability_setting (GdkScreen *screen,
GValue *value,
@@ -705,7 +747,10 @@ gdk_wayland_screen_get_setting (GdkScreen *screen,
entry = find_translation_entry_by_setting (name);
if (entry != NULL)
{
set_value_from_entry (screen, entry, value);
if (strcmp (name, "gtk-decoration-layout") == 0)
set_decoration_layout_from_entry (screen, entry, value);
else
set_value_from_entry (screen, entry, value);
return TRUE;
}
-8
View File
@@ -47,14 +47,6 @@
GDK_WINDOW_TYPE (window) != GDK_WINDOW_FOREIGN && \
GDK_WINDOW_TYPE (window) != GDK_WINDOW_OFFSCREEN)
/* Return whether time1 is considered later than time2 as far as xserver
* time is concerned. Accounts for wraparound.
*/
#define XSERVER_TIME_IS_LATER(time1, time2) \
( (( time1 > time2 ) && ( time1 - time2 < ((guint32)-1)/2 )) || \
(( time1 < time2 ) && ( time2 - time1 > ((guint32)-1)/2 )) \
)
typedef struct _GdkWaylandWindow GdkWaylandWindow;
typedef struct _GdkWaylandWindowClass GdkWaylandWindowClass;
@@ -0,0 +1,88 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
*
* Copyright (C) 2014 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*
* Author: Florian Müllner <fmuellner@gnome.org>
*/
#include <stdio.h>
#include <string.h>
#include <glib.h>
#include "wm-button-layout-translation.h"
static void
translate_buttons (char *layout, int *len_p)
{
char *strp = layout, *button;
int len = 0;
if (!layout || !*layout)
goto out;
while ((button = strsep (&strp, ",")))
{
char *gtkbutton;
if (strcmp (button, "menu") == 0)
gtkbutton = "icon";
else if (strcmp (button, "appmenu") == 0)
gtkbutton = "menu";
else if (strcmp (button, "minimize") == 0)
gtkbutton = "minimize";
else if (strcmp (button, "maximize") == 0)
gtkbutton = "maximize";
else if (strcmp (button, "close") == 0)
gtkbutton = "close";
else
continue;
if (len)
layout[len++] = ',';
strcpy (layout + len, gtkbutton);
len += strlen (gtkbutton);
}
layout[len] = '\0';
out:
if (len_p)
*len_p = len;
}
void
translate_wm_button_layout_to_gtk (char *layout)
{
char *strp = layout, *left_buttons, *right_buttons;
int left_len, right_len = 0;
left_buttons = strsep (&strp, ":");
right_buttons = strp;
translate_buttons (left_buttons, &left_len);
memmove (layout, left_buttons, left_len);
if (strp == NULL)
goto out; /* no ":" in layout */
layout[left_len++] = ':';
translate_buttons (right_buttons, &right_len);
memmove (layout + left_len, right_buttons, right_len);
out:
layout[left_len + right_len] = '\0';
}
@@ -0,0 +1,26 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
*
* Copyright (C) 2014 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*
* Author: Florian Müllner <fmuellner@gnome.org>
*/
#ifndef __WM_BUTTON_LAYOUT_TRANSLATION__
#define __WM_BUTTON_LAYOUT_TRANSLATION__
void translate_wm_button_layout_to_gtk (char *layout);
#endif
-7
View File
@@ -469,8 +469,6 @@ _gdk_x11_window_get_property (GdkWindow *window,
{
GdkScreen *screen = gdk_screen_get_default ();
window = gdk_screen_get_root_window (screen);
GDK_NOTE (MULTIHEAD, g_message ("gdk_property_get(): window is NULL\n"));
}
else if (!GDK_WINDOW_IS_X11 (window))
return FALSE;
@@ -607,8 +605,6 @@ _gdk_x11_window_change_property (GdkWindow *window,
screen = gdk_screen_get_default ();
window = gdk_screen_get_root_window (screen);
GDK_NOTE (MULTIHEAD, g_message ("gdk_property_change(): window is NULL\n"));
}
else if (!GDK_WINDOW_IS_X11 (window))
return;
@@ -658,9 +654,6 @@ _gdk_x11_window_delete_property (GdkWindow *window,
{
GdkScreen *screen = gdk_screen_get_default ();
window = gdk_screen_get_root_window (screen);
GDK_NOTE (MULTIHEAD,
g_message ("gdk_property_delete(): window is NULL\n"));
}
else if (!GDK_WINDOW_IS_X11 (window))
return;
-2
View File
@@ -49,7 +49,6 @@ Atom gdk_x11_get_xatom_by_name_for_display (GdkDisplay *displa
GDK_AVAILABLE_IN_ALL
const gchar * gdk_x11_get_xatom_name_for_display (GdkDisplay *display,
Atom xatom);
#ifndef GDK_MULTIHEAD_SAFE
GDK_AVAILABLE_IN_ALL
Atom gdk_x11_atom_to_xatom (GdkAtom atom);
GDK_AVAILABLE_IN_ALL
@@ -58,7 +57,6 @@ GDK_AVAILABLE_IN_ALL
Atom gdk_x11_get_xatom_by_name (const gchar *atom_name);
GDK_AVAILABLE_IN_ALL
const gchar * gdk_x11_get_xatom_name (Atom xatom);
#endif
G_END_DECLS
-2
View File
@@ -61,10 +61,8 @@ int gdk_x11_screen_get_screen_number (GdkScreen *screen);
GDK_AVAILABLE_IN_ALL
const char* gdk_x11_screen_get_window_manager_name (GdkScreen *screen);
#ifndef GDK_MULTIHEAD_SAFE
GDK_AVAILABLE_IN_ALL
gint gdk_x11_get_default_screen (void);
#endif
/**
* GDK_SCREEN_XDISPLAY:
-6
View File
@@ -36,21 +36,17 @@
G_BEGIN_DECLS
#ifndef GDK_MULTIHEAD_SAFE
GDK_AVAILABLE_IN_ALL
Window gdk_x11_get_default_root_xwindow (void);
GDK_AVAILABLE_IN_ALL
Display *gdk_x11_get_default_xdisplay (void);
#endif
#ifndef GDK_MULTIHEAD_SAFE
/**
* GDK_ROOT_WINDOW:
*
* Obtains the Xlib window id of the root window of the current screen.
*/
#define GDK_ROOT_WINDOW() (gdk_x11_get_default_root_xwindow ())
#endif
/**
* GDK_XID_TO_POINTER:
@@ -71,12 +67,10 @@ Display *gdk_x11_get_default_xdisplay (void);
*/
#define GDK_POINTER_TO_XID(pointer) GPOINTER_TO_UINT(pointer)
#ifndef GDK_MULTIHEAD_SAFE
GDK_AVAILABLE_IN_ALL
void gdk_x11_grab_server (void);
GDK_AVAILABLE_IN_ALL
void gdk_x11_ungrab_server (void);
#endif
G_END_DECLS
+55 -14
View File
@@ -471,7 +471,8 @@ gtk_public_h_sources = \
gtkvolumebutton.h \
gtkwidget.h \
gtkwidgetpath.h \
gtkwindow.h
gtkwindow.h \
gtkwindowgroup.h
if OS_UNIX
gtk_unix_print_public_h_sources = \
@@ -520,6 +521,7 @@ gtk_private_h_sources = \
gtkcolorplaneprivate.h \
gtkcolorscaleprivate.h \
gtkcolorchooserprivate.h \
gtkcomboboxprivate.h \
gtkcontainerprivate.h \
gtkcssanimationprivate.h \
gtkcssarrayvalueprivate.h \
@@ -597,6 +599,7 @@ gtk_private_h_sources = \
gtkimcontextsimpleseqs.h \
gtkintl.h \
gtkkeyhash.h \
gtkkineticscrolling.h \
gtklabelprivate.h \
gtklockbuttonprivate.h \
gtkmagnifierprivate.h \
@@ -938,6 +941,7 @@ gtk_base_c_sources = \
gtkinfobar.c \
gtkinvisible.c \
gtkkeyhash.c \
gtkkineticscrolling.c \
gtklabel.c \
gtklayout.c \
gtklevelbar.c \
@@ -1075,6 +1079,7 @@ gtk_base_c_sources = \
gtkwidget.c \
gtkwidgetpath.c \
gtkwindow.c \
gtkwindowgroup.c \
gtkwin32theme.c \
$(gtk_clipboard_dnd_c_sources)
@@ -1321,9 +1326,9 @@ COMPOSITE_TEMPLATES = \
template_headers = $(COMPOSITE_TEMPLATES:.ui=.ui.h)
%.ui.h: %.ui extract-strings$(BUILD_EXEEXT)
%.ui.h: %.ui
$(AM_V_GEN) mkdir -p $(dir $@) \
&& ./extract-strings$(BUILD_EXEEXT) $< > $@
&& $(top_builddir)/util/extract-strings$(BUILD_EXEEXT) $< > $@
#
# rules to generate built sources
@@ -1369,7 +1374,52 @@ gtktypebuiltins.c: $(gtk_public_h_sources) $(a11y_h_sources) $(deprecated_h_sour
&& cp xgen-gtbc gtktypebuiltins.c \
&& rm -f xgen-gtbc
gtk.gresource.xml: Makefile.am
$(AM_V_GEN) echo -e "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > $@; \
echo -e "<gresources>" >> $@; \
echo -e " <gresource prefix=\"/org/gtk/libgtk\">" >> $@; \
for f in $(srcdir)/resources/theme/Raleigh/*.css; do \
n=`basename $$f`; \
echo -e " <file alias=\"theme/Raleigh.css\">theme/Raleigh/$$n</file>" >> $@; \
done; \
echo -e " <file alias=\"theme/Adwaita.css\">theme/Adwaita/gtk.css</file>" >> $@; \
echo -e " <file alias=\"theme/Adwaita-dark.css\">theme/Adwaita/gtk-dark.css</file>" >> $@; \
for f in $(srcdir)/resources/theme/Adwaita/assets/*; do \
n=`basename $$f`; \
echo -e " <file preprocess=\"to-pixdata\">theme/Adwaita/assets/$$n</file>" >> $@; \
done; \
if test "$(win32_theme)" = "yes"; then \
for f in $(srcdir)/resources/theme/win32/*.css; do \
n=`basename $$f`; \
echo -e " <file alias=\"theme/$$n\">theme/win32/$$n</file>" >> $@; \
done; \
fi; \
for f in $(srcdir)/resources/cursor/*.png; do \
n=`basename $$f`; \
echo -e " <file>cursor/$$n</file>" >> $@; \
done; \
for f in $(srcdir)/resources/ui/*.ui; do \
n=`basename $$f`; \
echo -e " <file compressed=\"true\">ui/$$n</file>" >> $@; \
done; \
echo -e " </gresource>" >> $@; \
echo -e "</gresources>" >> $@;
adwaita_sources = \
resources/theme/Adwaita/assets.svg \
resources/theme/Adwaita/_colors.scss \
resources/theme/Adwaita/_common.scss \
resources/theme/Adwaita/_drawing.scss \
resources/theme/Adwaita/gtk.scss \
resources/theme/Adwaita/gtk-dark.scss \
resources/theme/Adwaita/parse-sass.sh \
resources/theme/Adwaita/render-assets.sh \
resources/theme/Adwaita/render-borders.sh \
resources/theme/Adwaita/assets.txt \
resources/theme/Adwaita/borders.txt
resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir)/resources --generate-dependencies $(srcdir)/gtk.gresource.xml)
gtkresources.h: gtk.gresource.xml
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) $(srcdir)/gtk.gresource.xml \
--target=$@ --sourcedir=$(srcdir)/resources --c-name _gtk --generate-header --manual-register
@@ -1424,6 +1474,7 @@ libgtk_3_la_LIBADD = $(libadd)
libgtk_3_la_DEPENDENCIES = $(deps)
if USE_WIN32
win32_theme=yes
libgtk_3_la_LIBADD += -lole32 -lgdi32 -lcomdlg32 -lwinspool -lcomctl32
libgtk_3_la_LDFLAGS += -Wl,-luuid
libgtk_3_la_DEPENDENCIES += $(gtk_def) $(gtk_win32_res) $(deps)
@@ -1616,17 +1667,6 @@ endif
gtk_launch_LDADD = $(LDADDS)
gtk_launch_SOURCES = gtk-launch.c
# The extract_strings tool is a build utility that runs on the build system.
extract_strings_sources = extract-strings.c
extract_strings_cppflags =
extract_strings_cflags = $(GLIB_CFLAGS_FOR_BUILD)
extract_strings_ldadd = $(GLIB_LIBS_FOR_BUILD)
extract-strings$(BUILD_EXEEXT): $(extract_strings_sources)
@rm -f extract-strings$(BUILD_EXEEXT)
$(AM_V_CCLD)$(CC_FOR_BUILD) $(extract_strings_cppflags) $(CPPFLAGS_FOR_BUILD) $(extract_strings_cflags) $(CFLAGS_FOR_BUILD) $^ $(LDFLAGS_FOR_BUILD) $(extract_strings_ldadd) $(LIBS_FOR_BUILD) -o $@
EXTRA_DIST += $(extract_strings_sources)
DISTCLEANFILES += extract-strings
.PHONY: files test test-debug
files:
@@ -1957,6 +1997,7 @@ gsettings_SCHEMAS = \
EXTRA_DIST += \
$(resource_files) \
$(adwaita_sources) \
$(STOCK_ICONS) \
$(GENERATED_ICONS) \
$(gsettings_SCHEMAS) \
+8
View File
@@ -162,6 +162,14 @@ gtk_container_cell_accessible_remove_child (GtkContainerCellAccessible *containe
g_object_unref (child);
}
/**
* gtk_container_cell_accessible_get_children:
* @container: the container
*
* Get a list of children.
*
* Returns: (transfer none) (element-type Gtk.CellAccessible)
*/
GList *
gtk_container_cell_accessible_get_children (GtkContainerCellAccessible *container)
{
+5 -8
View File
@@ -456,7 +456,7 @@ gtk_entry_accessible_initialize (AtkObject *obj,
gtk_entry_accessible->priv->selection_bound = start_pos;
/* Set up signal callbacks */
g_signal_connect (entry, "insert-text", G_CALLBACK (insert_text_cb), NULL);
g_signal_connect_after (entry, "insert-text", G_CALLBACK (insert_text_cb), NULL);
g_signal_connect (entry, "delete-text", G_CALLBACK (delete_text_cb), NULL);
if (gtk_entry_get_visibility (entry))
@@ -1378,11 +1378,6 @@ atk_editable_text_interface_init (AtkEditableTextIface *iface)
iface->set_run_attributes = NULL;
}
/* We connect to GtkEditable::insert-text, since it carries
* the information we need. But we delay emitting our own
* text_changed::insert signal until the entry has update
* all its internal state and emits GtkEntry::changed.
*/
static void
insert_text_cb (GtkEditable *editable,
gchar *new_text,
@@ -1390,16 +1385,18 @@ insert_text_cb (GtkEditable *editable,
gint *position)
{
GtkEntryAccessible *accessible;
gint length;
if (new_text_length == 0)
return;
accessible = GTK_ENTRY_ACCESSIBLE (gtk_widget_get_accessible (GTK_WIDGET (editable)));
length = g_utf8_strlen (new_text, new_text_length);
g_signal_emit_by_name (accessible,
"text-changed::insert",
*position,
g_utf8_strlen (new_text, new_text_length));
*position - length,
length);
}
/* We connect to GtkEditable::delete-text, since it carries
+6
View File
@@ -298,6 +298,12 @@ gtk_toplevel_accessible_init (GtkToplevelAccessible *toplevel)
hide_event_watcher, toplevel, (GDestroyNotify) NULL);
}
/**
* gtk_toplevel_accessible_get_children:
*
* Returns: (transfer none) (element-type Gtk.Window): List of
* children.
*/
GList *
gtk_toplevel_accessible_get_children (GtkToplevelAccessible *accessible)
{
+2 -2
View File
@@ -1154,7 +1154,7 @@ shared_data_unref (gpointer data)
* @entries: (array length=n_entries): an array of action descriptions
* @n_entries: the number of entries
* @user_data: data to pass to the action callbacks
* @destroy: destroy notification callback for @user_data
* @destroy: (nullable): destroy notification callback for @user_data
*
* This variant of gtk_action_group_add_actions() adds a #GDestroyNotify
* callback for @user_data.
@@ -1265,7 +1265,7 @@ gtk_action_group_add_toggle_actions (GtkActionGroup *action_group,
* @entries: (array length=n_entries): an array of toggle action descriptions
* @n_entries: the number of entries
* @user_data: data to pass to the action callbacks
* @destroy: destroy notification callback for @user_data
* @destroy: (nullable): destroy notification callback for @user_data
*
* This variant of gtk_action_group_add_toggle_actions() adds a
* #GDestroyNotify callback for @user_data.
+1 -1
View File
@@ -36,7 +36,7 @@
#include "gtkadjustment.h"
#include "gtkorientable.h"
#include "gtkhsv.h"
#include "gtkwindow.h"
#include "gtkwindowgroup.h"
#include "gtkselection.h"
#include "gtkcolorutils.h"
#include "gtkdnd.h"
+11 -3
View File
@@ -47,16 +47,24 @@ typedef struct _GtkColorSelection GtkColorSelection;
typedef struct _GtkColorSelectionPrivate GtkColorSelectionPrivate;
typedef struct _GtkColorSelectionClass GtkColorSelectionClass;
/**
* GtkColorSelectionChangePaletteFunc:
* @colors: (array length=n_colors): Array of colors
* @n_colors: Number of colors in the array
*
* Deprecated: 3.4
*/
typedef void (* GtkColorSelectionChangePaletteFunc) (const GdkColor *colors,
gint n_colors);
/**
* GtkColorSelectionChangePaletteWithScreenFunc:
* @screen:
* @colors:
* @n_colors:
* @colors: (array length=n_colors): Array of colors
* @n_colors: Number of colors in the array
*
* Since: 2.2
* Deprecated: 3.4
*/
typedef void (* GtkColorSelectionChangePaletteWithScreenFunc) (GdkScreen *screen,
const GdkColor *colors,
@@ -66,7 +74,7 @@ struct _GtkColorSelection
{
GtkBox parent_instance;
/* < private_data > */
/*< private >*/
GtkColorSelectionPrivate *private_data;
};
+2 -1
View File
@@ -68,7 +68,8 @@ gtk_hscale_init (GtkHScale *hscale)
/**
* gtk_hscale_new:
* @adjustment: the #GtkAdjustment which sets the range of the scale.
* @adjustment: (nullable): the #GtkAdjustment which sets the range of
* the scale.
*
* Creates a new #GtkHScale.
*
-24
View File
@@ -27,8 +27,6 @@
#include "gtkmisc.h"
#include "gtkintl.h"
#include "gtkprivate.h"
#include "gtkimage.h"
#include "gtklabel.h"
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
@@ -234,28 +232,6 @@ gtk_misc_set_alignment (GtkMisc *misc,
priv = misc->priv;
if (GTK_IS_LABEL (misc) || GTK_IS_IMAGE (misc))
{
GtkAlign halign, valign;
if (xalign < 0.4)
halign = GTK_ALIGN_START;
else if (xalign > 0.6)
halign = GTK_ALIGN_END;
else
halign = GTK_ALIGN_CENTER;
if (yalign < 0.4)
valign = GTK_ALIGN_START;
else if (yalign > 0.6)
valign = GTK_ALIGN_END;
else
valign = GTK_ALIGN_CENTER;
gtk_widget_set_halign (GTK_WIDGET (misc), halign);
gtk_widget_set_valign (GTK_WIDGET (misc), valign);
}
if (xalign < 0.0)
xalign = 0.0;
else if (xalign > 1.0)
+7 -6
View File
@@ -349,7 +349,7 @@
*
* Sets the color used for the background of widgets displaying
* editable text. This color is used for the background
* of, among others, #GtkText, #GtkEntry, #GtkList, and #GtkCList.
* of, among others, #GtkTextView, #GtkEntry.
*
* * `text[state] =
* color`
@@ -1409,11 +1409,12 @@ gtk_rc_get_style (GtkWidget *widget)
* G_OBJECT_TYPE (widget));
* ]|
*
* Returns: (transfer none): A style created by matching with the
* supplied paths, or %NULL if nothing matching was specified and the
* default style should be used. The returned value is owned by GTK+
* as part of an internal cache, so you must call g_object_ref() on
* the returned value if you want to keep a reference to it.
* Returns: (nullable) (transfer none): A style created by matching
* with the supplied paths, or %NULL if nothing matching was
* specified and the default style should be used. The returned
* value is owned by GTK+ as part of an internal cache, so you
* must call g_object_ref() on the returned value if you want to
* keep a reference to it.
*
* Deprecated:3.0: Use #GtkStyleContext instead
**/
+41 -9
View File
@@ -521,28 +521,60 @@ gtk_recent_action_set_property (GObject *gobject,
switch (prop_id)
{
case PROP_SHOW_NUMBERS:
priv->show_numbers = g_value_get_boolean (value);
if (priv->show_numbers != g_value_get_boolean (value))
{
priv->show_numbers = g_value_get_boolean (value);
g_object_notify_by_pspec (gobject, pspec);
}
break;
case GTK_RECENT_CHOOSER_PROP_SHOW_PRIVATE:
priv->show_private = g_value_get_boolean (value);
if (priv->show_private != g_value_get_boolean (value))
{
priv->show_private = g_value_get_boolean (value);
g_object_notify_by_pspec (gobject, pspec);
}
break;
case GTK_RECENT_CHOOSER_PROP_SHOW_NOT_FOUND:
priv->show_not_found = g_value_get_boolean (value);
if (priv->show_not_found != g_value_get_boolean (value))
{
priv->show_not_found = g_value_get_boolean (value);
g_object_notify_by_pspec (gobject, pspec);
}
break;
case GTK_RECENT_CHOOSER_PROP_SHOW_TIPS:
priv->show_tips = g_value_get_boolean (value);
if (priv->show_tips != g_value_get_boolean (value))
{
priv->show_tips = g_value_get_boolean (value);
g_object_notify_by_pspec (gobject, pspec);
}
break;
case GTK_RECENT_CHOOSER_PROP_SHOW_ICONS:
priv->show_icons = g_value_get_boolean (value);
if (priv->show_icons != g_value_get_boolean (value))
{
priv->show_icons = g_value_get_boolean (value);
g_object_notify_by_pspec (gobject, pspec);
}
break;
case GTK_RECENT_CHOOSER_PROP_LIMIT:
priv->limit = g_value_get_int (value);
if (priv->limit != g_value_get_int (value))
{
priv->limit = g_value_get_int (value);
g_object_notify_by_pspec (gobject, pspec);
}
break;
case GTK_RECENT_CHOOSER_PROP_LOCAL_ONLY:
priv->local_only = g_value_get_boolean (value);
if (priv->local_only != g_value_get_boolean (value))
{
priv->local_only = g_value_get_boolean (value);
g_object_notify_by_pspec (gobject, pspec);
}
break;
case GTK_RECENT_CHOOSER_PROP_SORT_TYPE:
priv->sort_type = g_value_get_enum (value);
if (priv->sort_type != g_value_get_enum (value))
{
priv->sort_type = g_value_get_enum (value);
g_object_notify_by_pspec (gobject, pspec);
}
break;
case GTK_RECENT_CHOOSER_PROP_FILTER:
set_current_filter (action, g_value_get_object (value));
@@ -645,7 +677,7 @@ gtk_recent_action_class_init (GtkRecentActionClass *klass)
P_("Show Numbers"),
P_("Whether the items should be displayed with a number"),
FALSE,
G_PARAM_READWRITE));
G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
}
+2 -1
View File
@@ -38,7 +38,8 @@ G_BEGIN_DECLS
* GtkTranslateFunc:
* @path: The id of the message. In #GtkActionGroup this will be a label
* or tooltip from a #GtkActionEntry.
* @func_data: user data passed in when registering the function
* @func_data: (closure): user data passed in when registering the
* function
*
* The function used to translate messages in e.g. #GtkIconFactory
* and #GtkActionGroup.
+14 -14
View File
@@ -1118,7 +1118,7 @@ gtk_style_real_init_from_rc (GtkStyle *style,
* @style: a #GtkStyle
* @widget_type: the #GType of a descendant of #GtkWidget
* @property_name: the name of the style property to get
* @value: a #GValue where the value of the property being
* @value: (out): a #GValue where the value of the property being
* queried will be stored
*
* Queries the value of a style property corresponding to a
@@ -1153,7 +1153,7 @@ gtk_style_get_style_property (GtkStyle *style,
priv = GTK_STYLE_GET_PRIVATE (style);
peek_value = _gtk_style_context_peek_style_property (priv->context,
widget_type,
0, pspec);
pspec);
if (G_VALUE_TYPE (value) == G_PARAM_SPEC_VALUE_TYPE (pspec))
g_value_copy (peek_value, value);
@@ -1214,7 +1214,7 @@ gtk_style_get_valist (GtkStyle *style,
}
peek_value = _gtk_style_context_peek_style_property (priv->context, widget_type,
0, pspec);
pspec);
G_VALUE_LCOPY (peek_value, var_args, 0, &error);
if (error)
{
@@ -4077,7 +4077,7 @@ gtk_widget_get_default_style (void)
*
* Since: 2.20
*
* Deprecated: 3.0. This step is unnecessary with #GtkStyleContext.
* Deprecated: 3.0: This step is unnecessary with #GtkStyleContext.
**/
void
gtk_widget_style_attach (GtkWidget *widget)
@@ -4498,12 +4498,12 @@ gtk_widget_modify_base (GtkWidget *widget,
/**
* gtk_widget_modify_cursor:
* @widget: a #GtkWidget
* @primary: the color to use for primary cursor (does not need to be
* allocated), or %NULL to undo the effect of previous calls to
* of gtk_widget_modify_cursor().
* @secondary: the color to use for secondary cursor (does not need to be
* allocated), or %NULL to undo the effect of previous calls to
* of gtk_widget_modify_cursor().
* @primary: (nullable): the color to use for primary cursor (does not
* need to be allocated), or %NULL to undo the effect of previous
* calls to of gtk_widget_modify_cursor().
* @secondary: (nullable): the color to use for secondary cursor (does
* not need to be allocated), or %NULL to undo the effect of
* previous calls to of gtk_widget_modify_cursor().
*
* Sets the cursor color to use in a widget, overriding the #GtkWidget
* cursor-color and secondary-cursor-color
@@ -4514,7 +4514,7 @@ gtk_widget_modify_base (GtkWidget *widget,
*
* Since: 2.12
*
* Deprecated: 3.0. Use gtk_widget_override_cursor() instead.
* Deprecated: 3.0: Use gtk_widget_override_cursor() instead.
*/
void
gtk_widget_modify_cursor (GtkWidget *widget,
@@ -4663,11 +4663,11 @@ gtk_widget_path (GtkWidget *widget,
/**
* gtk_widget_class_path:
* @widget: a #GtkWidget
* @path_length: (out) (allow-none): location to store the length of the
* @path_length: (out) (optional): location to store the length of the
* class path, or %NULL
* @path: (out) (allow-none): location to store the class path as an
* @path: (out) (optional): location to store the class path as an
* allocated string, or %NULL
* @path_reversed: (out) (allow-none): location to store the reverse
* @path_reversed: (out) (optional): location to store the reverse
* class path as an allocated string, or %NULL
*
* Same as gtk_widget_path(), but always uses the name of a widgets type,
-41
View File
@@ -1,41 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gtk/libgtk">
<file alias="theme/Raleigh.css">theme/gtk-default.css</file>
<file>theme/gtk-win32.css</file>
<file>theme/gtk-win32-xp.css</file>
<file>theme/gtk-win32-base.css</file>
<file>theme/gtk-win32-classic.css</file>
<file alias="cursor/dnd-ask.png">cursor/cursor_dnd_ask.png</file>
<file alias="cursor/dnd-link.png">cursor/cursor_dnd_link.png</file>
<file alias="cursor/dnd-none.png">cursor/cursor_dnd_none.png</file>
<file alias="cursor/dnd-move.png">cursor/cursor_dnd_move.png</file>
<file alias="cursor/dnd-copy.png">cursor/cursor_dnd_copy.png</file>
<file compressed="true">ui/gtkaboutdialog.ui</file>
<file compressed="true">ui/gtkactionbar.ui</file>
<file compressed="true">ui/gtkappchooserdialog.ui</file>
<file compressed="true">ui/gtkappchooserwidget.ui</file>
<file compressed="true">ui/gtkassistant.ui</file>
<file compressed="true">ui/gtkcolorchooserdialog.ui</file>
<file compressed="true">ui/gtkcoloreditor.ui</file>
<file compressed="true">ui/gtkdialog.ui</file>
<file compressed="true">ui/gtkfilechooserbutton.ui</file>
<file compressed="true">ui/gtkfilechooserwidget.ui</file>
<file compressed="true">ui/gtkfilechooserdialog.ui</file>
<file compressed="true">ui/gtkfontbutton.ui</file>
<file compressed="true">ui/gtkfontchooserdialog.ui</file>
<file compressed="true">ui/gtkfontchooserwidget.ui</file>
<file compressed="true">ui/gtkinfobar.ui</file>
<file compressed="true">ui/gtklockbutton.ui</file>
<file compressed="true">ui/gtkmessagedialog.ui</file>
<file compressed="true">ui/gtkpagesetupunixdialog.ui</file>
<file compressed="true">ui/gtkpathbar.ui</file>
<file compressed="true">ui/gtkprintunixdialog.ui</file>
<file compressed="true">ui/gtkrecentchooserdefault.ui</file>
<file compressed="true">ui/gtksearchbar.ui</file>
<file compressed="true">ui/gtkscalebutton.ui</file>
<file compressed="true">ui/gtkstatusbar.ui</file>
<file compressed="true">ui/gtkvolumebutton.ui</file>
<file compressed="true">ui/gtkapplication-quartz.ui</file>
</gresource>
</gresources>
+1
View File
@@ -229,6 +229,7 @@
#include <gtk/gtkwidget.h>
#include <gtk/gtkwidgetpath.h>
#include <gtk/gtkwindow.h>
#include <gtk/gtkwindowgroup.h>
#ifndef GTK_DISABLE_DEPRECATED
#include <gtk/deprecated/gtkarrow.h>
+120 -133
View File
@@ -197,7 +197,8 @@ enum
PROP_LOGO,
PROP_LOGO_ICON_NAME,
PROP_WRAP_LICENSE,
PROP_LICENSE_TYPE
PROP_LICENSE_TYPE,
LAST_PROP
};
static void gtk_about_dialog_finalize (GObject *object);
@@ -239,13 +240,13 @@ static gboolean text_view_visibility_notify_event(GtkWidget
GdkEventVisibility *event,
GtkAboutDialog *about);
enum {
ACTIVATE_LINK,
LAST_SIGNAL
};
static guint signals[LAST_SIGNAL] = { 0 };
static GParamSpec *props[LAST_PROP] = { NULL, };
G_DEFINE_TYPE_WITH_PRIVATE (GtkAboutDialog, gtk_about_dialog, GTK_TYPE_DIALOG)
@@ -358,13 +359,12 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
*
* Since: 2.12
*/
g_object_class_install_property (object_class,
PROP_NAME,
g_param_spec_string ("program-name",
P_("Program name"),
P_("The name of the program. If this is not set, it defaults to g_get_application_name()"),
NULL,
GTK_PARAM_READWRITE));
props[PROP_NAME] =
g_param_spec_string ("program-name",
P_("Program name"),
P_("The name of the program. If this is not set, it defaults to g_get_application_name()"),
NULL,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkAboutDialog:version:
@@ -373,13 +373,12 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
*
* Since: 2.6
*/
g_object_class_install_property (object_class,
PROP_VERSION,
g_param_spec_string ("version",
P_("Program version"),
P_("The version of the program"),
NULL,
GTK_PARAM_READWRITE));
props[PROP_VERSION] =
g_param_spec_string ("version",
P_("Program version"),
P_("The version of the program"),
NULL,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkAboutDialog:copyright:
@@ -388,13 +387,12 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
*
* Since: 2.6
*/
g_object_class_install_property (object_class,
PROP_COPYRIGHT,
g_param_spec_string ("copyright",
P_("Copyright string"),
P_("Copyright information for the program"),
NULL,
GTK_PARAM_READWRITE));
props[PROP_COPYRIGHT] =
g_param_spec_string ("copyright",
P_("Copyright string"),
P_("Copyright information for the program"),
NULL,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
@@ -406,13 +404,12 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
*
* Since: 2.6
*/
g_object_class_install_property (object_class,
PROP_COMMENTS,
g_param_spec_string ("comments",
P_("Comments string"),
P_("Comments about the program"),
NULL,
GTK_PARAM_READWRITE));
props[PROP_COMMENTS] =
g_param_spec_string ("comments",
P_("Comments string"),
P_("Comments about the program"),
NULL,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkAboutDialog:license:
@@ -428,13 +425,12 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
*
* Since: 2.6
*/
g_object_class_install_property (object_class,
PROP_LICENSE,
g_param_spec_string ("license",
_("License"),
_("The license of the program"),
NULL,
GTK_PARAM_READWRITE));
props[PROP_LICENSE] =
g_param_spec_string ("license",
_("License"),
_("The license of the program"),
NULL,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkAboutDialog:license-type:
@@ -457,14 +453,13 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
*
* Since: 3.0
*/
g_object_class_install_property (object_class,
PROP_LICENSE_TYPE,
g_param_spec_enum ("license-type",
P_("License Type"),
P_("The license type of the program"),
GTK_TYPE_LICENSE,
GTK_LICENSE_UNKNOWN,
GTK_PARAM_READWRITE));
props[PROP_LICENSE_TYPE] =
g_param_spec_enum ("license-type",
P_("License Type"),
P_("The license type of the program"),
GTK_TYPE_LICENSE,
GTK_LICENSE_UNKNOWN,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkAboutDialog:website:
@@ -474,13 +469,12 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
*
* Since: 2.6
*/
g_object_class_install_property (object_class,
PROP_WEBSITE,
g_param_spec_string ("website",
P_("Website URL"),
P_("The URL for the link to the website of the program"),
NULL,
GTK_PARAM_READWRITE));
props[PROP_WEBSITE] =
g_param_spec_string ("website",
P_("Website URL"),
P_("The URL for the link to the website of the program"),
NULL,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkAboutDialog:website-label:
@@ -489,13 +483,12 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
*
* Since: 2.6
*/
g_object_class_install_property (object_class,
PROP_WEBSITE_LABEL,
g_param_spec_string ("website-label",
P_("Website label"),
P_("The label for the link to the website of the program"),
NULL,
GTK_PARAM_READWRITE));
props[PROP_WEBSITE_LABEL] =
g_param_spec_string ("website-label",
P_("Website label"),
P_("The label for the link to the website of the program"),
NULL,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkAboutDialog:authors:
@@ -506,13 +499,12 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
*
* Since: 2.6
*/
g_object_class_install_property (object_class,
PROP_AUTHORS,
g_param_spec_boxed ("authors",
P_("Authors"),
P_("List of authors of the program"),
G_TYPE_STRV,
GTK_PARAM_READWRITE));
props[PROP_AUTHORS] =
g_param_spec_boxed ("authors",
P_("Authors"),
P_("List of authors of the program"),
G_TYPE_STRV,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkAboutDialog:documenters:
@@ -523,13 +515,12 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
*
* Since: 2.6
*/
g_object_class_install_property (object_class,
PROP_DOCUMENTERS,
g_param_spec_boxed ("documenters",
P_("Documenters"),
P_("List of people documenting the program"),
G_TYPE_STRV,
GTK_PARAM_READWRITE));
props[PROP_DOCUMENTERS] =
g_param_spec_boxed ("documenters",
P_("Documenters"),
P_("List of people documenting the program"),
G_TYPE_STRV,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkAboutDialog:artists:
@@ -540,14 +531,12 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
*
* Since: 2.6
*/
g_object_class_install_property (object_class,
PROP_ARTISTS,
g_param_spec_boxed ("artists",
P_("Artists"),
P_("List of people who have contributed artwork to the program"),
G_TYPE_STRV,
GTK_PARAM_READWRITE));
props[PROP_ARTISTS] =
g_param_spec_boxed ("artists",
P_("Artists"),
P_("List of people who have contributed artwork to the program"),
G_TYPE_STRV,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkAboutDialog:translator-credits:
@@ -558,14 +547,13 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
*
* Since: 2.6
*/
g_object_class_install_property (object_class,
PROP_TRANSLATOR_CREDITS,
g_param_spec_string ("translator-credits",
P_("Translator credits"),
P_("Credits to the translators. This string should be marked as translatable"),
NULL,
GTK_PARAM_READWRITE));
props[PROP_TRANSLATOR_CREDITS] =
g_param_spec_string ("translator-credits",
P_("Translator credits"),
P_("Credits to the translators. This string should be marked as translatable"),
NULL,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkAboutDialog:logo:
*
@@ -574,13 +562,12 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
*
* Since: 2.6
*/
g_object_class_install_property (object_class,
PROP_LOGO,
g_param_spec_object ("logo",
P_("Logo"),
P_("A logo for the about box. If this is not set, it defaults to gtk_window_get_default_icon_list()"),
GDK_TYPE_PIXBUF,
GTK_PARAM_READWRITE));
props[PROP_LOGO] =
g_param_spec_object ("logo",
P_("Logo"),
P_("A logo for the about box. If this is not set, it defaults to gtk_window_get_default_icon_list()"),
GDK_TYPE_PIXBUF,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkAboutDialog:logo-icon-name:
@@ -590,13 +577,13 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
*
* Since: 2.6
*/
g_object_class_install_property (object_class,
PROP_LOGO_ICON_NAME,
g_param_spec_string ("logo-icon-name",
P_("Logo Icon Name"),
P_("A named icon to use as the logo for the about box."),
"image-missing",
GTK_PARAM_READWRITE));
props[PROP_LOGO_ICON_NAME] =
g_param_spec_string ("logo-icon-name",
P_("Logo Icon Name"),
P_("A named icon to use as the logo for the about box."),
"image-missing",
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkAboutDialog:wrap-license:
*
@@ -604,13 +591,14 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
*
* Since: 2.8
*/
g_object_class_install_property (object_class,
PROP_WRAP_LICENSE,
g_param_spec_boolean ("wrap-license",
P_("Wrap license"),
P_("Whether to wrap the license text."),
FALSE,
GTK_PARAM_READWRITE));
props[PROP_WRAP_LICENSE] =
g_param_spec_boolean ("wrap-license",
P_("Wrap license"),
P_("Whether to wrap the license text."),
FALSE,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_properties (object_class, LAST_PROP, props);
/* Bind class to template
*/
@@ -791,7 +779,6 @@ gtk_about_dialog_set_property (GObject *object,
GParamSpec *pspec)
{
GtkAboutDialog *about = GTK_ABOUT_DIALOG (object);
GtkAboutDialogPrivate *priv = about->priv;
switch (prop_id)
{
@@ -838,7 +825,7 @@ gtk_about_dialog_set_property (GObject *object,
gtk_about_dialog_set_logo_icon_name (about, g_value_get_string (value));
break;
case PROP_WRAP_LICENSE:
priv->wrap_license = g_value_get_boolean (value);
gtk_about_dialog_set_wrap_license (about, g_value_get_boolean (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -1073,7 +1060,7 @@ gtk_about_dialog_set_program_name (GtkAboutDialog *about,
update_name_version (about);
g_object_notify (G_OBJECT (about), "program-name");
g_object_notify_by_pspec (G_OBJECT (about), props[PROP_NAME]);
}
@@ -1122,7 +1109,7 @@ gtk_about_dialog_set_version (GtkAboutDialog *about,
update_name_version (about);
g_object_notify (G_OBJECT (about), "version");
g_object_notify_by_pspec (G_OBJECT (about), props[PROP_VERSION]);
}
/**
@@ -1181,7 +1168,7 @@ gtk_about_dialog_set_copyright (GtkAboutDialog *about,
else
gtk_widget_hide (priv->copyright_label);
g_object_notify (G_OBJECT (about), "copyright");
g_object_notify_by_pspec (G_OBJECT (about), props[PROP_COPYRIGHT]);
}
/**
@@ -1238,7 +1225,7 @@ gtk_about_dialog_set_comments (GtkAboutDialog *about,
}
g_free (tmp);
g_object_notify (G_OBJECT (about), "comments");
g_object_notify_by_pspec (G_OBJECT (about), props[PROP_COMMENTS]);
}
/**
@@ -1299,8 +1286,8 @@ gtk_about_dialog_set_license (GtkAboutDialog *about,
update_license_button_visibility (about);
g_object_notify (G_OBJECT (about), "license");
g_object_notify (G_OBJECT (about), "license-type");
g_object_notify_by_pspec (G_OBJECT (about), props[PROP_LICENSE]);
g_object_notify_by_pspec (G_OBJECT (about), props[PROP_LICENSE_TYPE]);
}
/**
@@ -1348,7 +1335,7 @@ gtk_about_dialog_set_wrap_license (GtkAboutDialog *about,
{
priv->wrap_license = wrap_license;
g_object_notify (G_OBJECT (about), "wrap-license");
g_object_notify_by_pspec (G_OBJECT (about), props[PROP_WRAP_LICENSE]);
}
}
@@ -1401,7 +1388,7 @@ gtk_about_dialog_set_website (GtkAboutDialog *about,
update_website (about);
g_object_notify (G_OBJECT (about), "website");
g_object_notify_by_pspec (G_OBJECT (about), props[PROP_WEBSITE]);
}
/**
@@ -1453,7 +1440,7 @@ gtk_about_dialog_set_website_label (GtkAboutDialog *about,
update_website (about);
g_object_notify (G_OBJECT (about), "website-label");
g_object_notify_by_pspec (G_OBJECT (about), props[PROP_WEBSITE_LABEL]);
}
/**
@@ -1508,7 +1495,7 @@ gtk_about_dialog_set_authors (GtkAboutDialog *about,
update_credits_button_visibility (about);
g_object_notify (G_OBJECT (about), "authors");
g_object_notify_by_pspec (G_OBJECT (about), props[PROP_AUTHORS]);
}
/**
@@ -1563,7 +1550,7 @@ gtk_about_dialog_set_documenters (GtkAboutDialog *about,
update_credits_button_visibility (about);
g_object_notify (G_OBJECT (about), "documenters");
g_object_notify_by_pspec (G_OBJECT (about), props[PROP_DOCUMENTERS]);
}
/**
@@ -1618,7 +1605,7 @@ gtk_about_dialog_set_artists (GtkAboutDialog *about,
update_credits_button_visibility (about);
g_object_notify (G_OBJECT (about), "artists");
g_object_notify_by_pspec (G_OBJECT (about), props[PROP_ARTISTS]);
}
/**
@@ -1681,7 +1668,7 @@ gtk_about_dialog_set_translator_credits (GtkAboutDialog *about,
update_credits_button_visibility (about);
g_object_notify (G_OBJECT (about), "translator-credits");
g_object_notify_by_pspec (G_OBJECT (about), props[PROP_TRANSLATOR_CREDITS]);
}
/**
@@ -1735,7 +1722,7 @@ gtk_about_dialog_set_logo (GtkAboutDialog *about,
g_object_freeze_notify (G_OBJECT (about));
if (gtk_image_get_storage_type (GTK_IMAGE (priv->logo_image)) == GTK_IMAGE_ICON_NAME)
g_object_notify (G_OBJECT (about), "logo-icon-name");
g_object_notify_by_pspec (G_OBJECT (about), props[PROP_LOGO_ICON_NAME]);
if (logo != NULL)
gtk_image_set_from_pixbuf (GTK_IMAGE (priv->logo_image), logo);
@@ -1752,7 +1739,7 @@ gtk_about_dialog_set_logo (GtkAboutDialog *about,
}
}
g_object_notify (G_OBJECT (about), "logo");
g_object_notify_by_pspec (G_OBJECT (about), props[PROP_LOGO]);
g_object_thaw_notify (G_OBJECT (about));
}
@@ -1810,7 +1797,7 @@ gtk_about_dialog_set_logo_icon_name (GtkAboutDialog *about,
g_object_freeze_notify (G_OBJECT (about));
if (gtk_image_get_storage_type (GTK_IMAGE (priv->logo_image)) == GTK_IMAGE_PIXBUF)
g_object_notify (G_OBJECT (about), "logo");
g_object_notify_by_pspec (G_OBJECT (about), props[PROP_LOGO]);
if (icon_name)
{
@@ -1854,7 +1841,7 @@ gtk_about_dialog_set_logo_icon_name (GtkAboutDialog *about,
gtk_image_clear (GTK_IMAGE (priv->logo_image));
}
g_object_notify (G_OBJECT (about), "logo-icon-name");
g_object_notify_by_pspec (G_OBJECT (about), props[PROP_LOGO_ICON_NAME]);
g_object_thaw_notify (G_OBJECT (about));
}
@@ -2454,7 +2441,7 @@ gtk_about_dialog_set_license_type (GtkAboutDialog *about,
g_return_if_fail (GTK_IS_ABOUT_DIALOG (about));
g_return_if_fail (license_type >= GTK_LICENSE_UNKNOWN &&
license_type <= GTK_LICENSE_ARTISTIC);
license_type <= GTK_LICENSE_LGPL_3_0_ONLY);
priv = about->priv;
@@ -2492,15 +2479,15 @@ gtk_about_dialog_set_license_type (GtkAboutDialog *about,
update_license_button_visibility (about);
g_object_notify (G_OBJECT (about), "wrap-license");
g_object_notify (G_OBJECT (about), "license");
g_object_notify_by_pspec (G_OBJECT (about), props[PROP_WRAP_LICENSE]);
g_object_notify_by_pspec (G_OBJECT (about), props[PROP_LICENSE]);
}
else
{
gtk_widget_show (priv->license_label);
}
g_object_notify (G_OBJECT (about), "license-type");
g_object_notify_by_pspec (G_OBJECT (about), props[PROP_LICENSE_TYPE]);
g_object_thaw_notify (G_OBJECT (about));
}
+22 -18
View File
@@ -94,7 +94,8 @@
enum {
PROP_0,
PROP_ACCEL_CLOSURE,
PROP_ACCEL_WIDGET
PROP_ACCEL_WIDGET,
LAST_PROP
};
struct _GtkAccelLabelPrivate
@@ -110,6 +111,8 @@ struct _GtkAccelLabelPrivate
GdkModifierType accel_mods;
};
GParamSpec *props[LAST_PROP] = { NULL, };
static void gtk_accel_label_set_property (GObject *object,
guint prop_id,
const GValue *value,
@@ -183,20 +186,21 @@ gtk_accel_label_class_init (GtkAccelLabelClass *class)
#endif /* GDK_WINDOWING_QUARTZ */
g_object_class_install_property (gobject_class,
PROP_ACCEL_CLOSURE,
g_param_spec_boxed ("accel-closure",
P_("Accelerator Closure"),
P_("The closure to be monitored for accelerator changes"),
G_TYPE_CLOSURE,
GTK_PARAM_READWRITE));
g_object_class_install_property (gobject_class,
PROP_ACCEL_WIDGET,
g_param_spec_object ("accel-widget",
P_("Accelerator Widget"),
P_("The widget to be monitored for accelerator changes"),
GTK_TYPE_WIDGET,
GTK_PARAM_READWRITE));
props[PROP_ACCEL_CLOSURE] =
g_param_spec_boxed ("accel-closure",
P_("Accelerator Closure"),
P_("The closure to be monitored for accelerator changes"),
G_TYPE_CLOSURE,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
props[PROP_ACCEL_WIDGET] =
g_param_spec_object ("accel-widget",
P_("Accelerator Widget"),
P_("The widget to be monitored for accelerator changes"),
GTK_TYPE_WIDGET,
GTK_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_properties (gobject_class, LAST_PROP, props);
}
static void
@@ -485,7 +489,7 @@ accel_widget_weak_ref_cb (GtkAccelLabel *accel_label,
refetch_widget_accel_closure,
accel_label);
accel_label->priv->accel_widget = NULL;
g_object_notify (G_OBJECT (accel_label), "accel-widget");
g_object_notify_by_pspec (G_OBJECT (accel_label), props[PROP_ACCEL_WIDGET]);
}
/**
@@ -524,7 +528,7 @@ gtk_accel_label_set_accel_widget (GtkAccelLabel *accel_label,
accel_label, G_CONNECT_SWAPPED);
refetch_widget_accel_closure (accel_label);
}
g_object_notify (G_OBJECT (accel_label), "accel-widget");
g_object_notify_by_pspec (G_OBJECT (accel_label), props[PROP_ACCEL_WIDGET]);
}
}
@@ -587,7 +591,7 @@ gtk_accel_label_set_accel_closure (GtkAccelLabel *accel_label,
accel_label, 0);
}
gtk_accel_label_reset (accel_label);
g_object_notify (G_OBJECT (accel_label), "accel-closure");
g_object_notify_by_pspec (G_OBJECT (accel_label), props[PROP_ACCEL_CLOSURE]);
}
}
+5 -4
View File
@@ -37,10 +37,11 @@
* and #GtkActionable:action-target. There are also some convenience APIs
* for setting these properties.
*
* This interface is presently only meaningful if used on a widget that
* is (or will be) located inside of a #GtkApplicationWindow and can
* only be used to associate the widget with actions on that window, or
* its associated #GtkApplication.
* The action will be looked up in action groups that are found among
* the widgets ancestors. Most commonly, these will be the actions with
* the "win" or "app" prefix that are associated with the #GtkApplicationWindow
* or "GtkApplication, but other action groups that are added with
* gtk_widget_insert_action_group() will be consulted as well.
*
* Since: 3.4
**/
+5 -4
View File
@@ -332,7 +332,8 @@ gtk_app_chooser_button_populate (GtkAppChooserButton *self)
if (self->priv->show_default_item)
{
default_app = g_app_info_get_default_for_type (self->priv->content_type, FALSE);
if (self->priv->content_type)
default_app = g_app_info_get_default_for_type (self->priv->content_type, FALSE);
if (default_app != NULL)
{
@@ -615,7 +616,7 @@ gtk_app_chooser_button_class_init (GtkAppChooserButtonClass *klass)
P_("Include an 'Other…' item"),
P_("Whether the combobox should include an item that triggers a GtkAppChooserDialog"),
FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
G_PARAM_READWRITE|G_PARAM_CONSTRUCT|G_PARAM_STATIC_STRINGS|G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_property (oclass, PROP_SHOW_DIALOG_ITEM, pspec);
/**
@@ -632,7 +633,7 @@ gtk_app_chooser_button_class_init (GtkAppChooserButtonClass *klass)
P_("Show default item"),
P_("Whether the combobox should show the default application on top"),
FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
G_PARAM_READWRITE|G_PARAM_CONSTRUCT|G_PARAM_STATIC_STRINGS|G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_property (oclass, PROP_SHOW_DEFAULT_ITEM, pspec);
@@ -646,7 +647,7 @@ gtk_app_chooser_button_class_init (GtkAppChooserButtonClass *klass)
P_("Heading"),
P_("The text to show at the top of the dialog"),
NULL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS|G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_property (oclass, PROP_HEADING, pspec);
+6 -6
View File
@@ -966,7 +966,7 @@ gtk_app_chooser_widget_class_init (GtkAppChooserWidgetClass *klass)
P_("Show default app"),
P_("Whether the widget should show the default application"),
FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_property (gobject_class, PROP_SHOW_DEFAULT, pspec);
/**
@@ -981,7 +981,7 @@ gtk_app_chooser_widget_class_init (GtkAppChooserWidgetClass *klass)
P_("Show recommended apps"),
P_("Whether the widget should show recommended applications"),
TRUE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_property (gobject_class, PROP_SHOW_RECOMMENDED, pspec);
/**
@@ -996,7 +996,7 @@ gtk_app_chooser_widget_class_init (GtkAppChooserWidgetClass *klass)
P_("Show fallback apps"),
P_("Whether the widget should show fallback applications"),
FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_property (gobject_class, PROP_SHOW_FALLBACK, pspec);
/**
@@ -1009,7 +1009,7 @@ gtk_app_chooser_widget_class_init (GtkAppChooserWidgetClass *klass)
P_("Show other apps"),
P_("Whether the widget should show other applications"),
FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_property (gobject_class, PROP_SHOW_OTHER, pspec);
/**
@@ -1023,7 +1023,7 @@ gtk_app_chooser_widget_class_init (GtkAppChooserWidgetClass *klass)
P_("Show all apps"),
P_("Whether the widget should show all applications"),
FALSE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_property (gobject_class, PROP_SHOW_ALL, pspec);
/**
@@ -1038,7 +1038,7 @@ gtk_app_chooser_widget_class_init (GtkAppChooserWidgetClass *klass)
P_("Widget's default text"),
P_("The default text appearing when there are no applications"),
NULL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_property (gobject_class, PROP_DEFAULT_TEXT, pspec);
/**
+7 -5
View File
@@ -298,9 +298,10 @@ gtk_application_window_update_shell_shows_app_menu (GtkApplicationWindow *window
/* the shell does not show it, so make sure we show it */
if (g_menu_model_get_n_items (G_MENU_MODEL (window->priv->app_menu_section)) == 0)
{
GMenuModel *app_menu;
GMenuModel *app_menu = NULL;
app_menu = gtk_application_get_app_menu (gtk_window_get_application (GTK_WINDOW (window)));
if (gtk_window_get_application (GTK_WINDOW (window)) != NULL)
app_menu = gtk_application_get_app_menu (gtk_window_get_application (GTK_WINDOW (window)));
if (app_menu != NULL)
{
@@ -347,9 +348,10 @@ gtk_application_window_update_shell_shows_menubar (GtkApplicationWindow *window,
/* the shell does not show it, so make sure we show it */
if (g_menu_model_get_n_items (G_MENU_MODEL (window->priv->menubar_section)) == 0)
{
GMenuModel *menubar;
GMenuModel *menubar = NULL;
menubar = gtk_application_get_menubar (gtk_window_get_application (GTK_WINDOW (window)));
if (gtk_window_get_application (GTK_WINDOW (window)) != NULL)
menubar = gtk_application_get_menubar (gtk_window_get_application (GTK_WINDOW (window)));
if (menubar != NULL)
g_menu_append_section (window->priv->menubar_section, NULL, menubar);
@@ -844,7 +846,7 @@ gtk_application_window_class_init (GtkApplicationWindowClass *class)
P_("Show a menubar"),
P_("TRUE if the window should show a "
"menubar at the top of the window"),
TRUE, G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE);
TRUE, G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_properties (object_class, N_PROPS, gtk_application_window_properties);
}
+4 -4
View File
@@ -107,28 +107,28 @@ gtk_aspect_frame_class_init (GtkAspectFrameClass *class)
P_("Horizontal Alignment"),
P_("X alignment of the child"),
0.0, 1.0, 0.5,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (gobject_class,
PROP_YALIGN,
g_param_spec_float ("yalign",
P_("Vertical Alignment"),
P_("Y alignment of the child"),
0.0, 1.0, 0.5,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (gobject_class,
PROP_RATIO,
g_param_spec_float ("ratio",
P_("Ratio"),
P_("Aspect ratio if obey_child is FALSE"),
MIN_RATIO, MAX_RATIO, 1.0,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (gobject_class,
PROP_OBEY_CHILD,
g_param_spec_boolean ("obey-child",
P_("Obey child"),
P_("Force aspect ratio to match that of the frame's child"),
TRUE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
}
static void
+1 -1
View File
@@ -209,7 +209,7 @@ gtk_button_box_class_init (GtkButtonBoxClass *class)
P_("How to lay out the buttons in the box. Possible values are: spread, edge, start and end"),
GTK_TYPE_BUTTON_BOX_STYLE,
DEFAULT_LAYOUT_STYLE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
gtk_container_class_install_child_property (container_class,
CHILD_PROP_SECONDARY,
+1 -1
View File
@@ -126,7 +126,7 @@ struct _GtkBindingArg
* @next: implementation detail
* @signal_name: the action signal to be emitted
* @n_args: number of arguments specified for the signal
* @args: the arguments specified for the signal
* @args: (array length=n_args): the arguments specified for the signal
*
* A GtkBindingSignal stores the necessary information to
* activate a widget in response to a key press via a signal
+48 -37
View File
@@ -90,10 +90,13 @@
enum {
PROP_0,
PROP_ORIENTATION,
PROP_SPACING,
PROP_HOMOGENEOUS,
PROP_BASELINE_POSITION
PROP_BASELINE_POSITION,
/* orientable */
PROP_ORIENTATION,
LAST_PROP = PROP_ORIENTATION
};
enum {
@@ -121,6 +124,8 @@ struct _GtkBoxPrivate
guint baseline_pos : 2;
};
static GParamSpec *props[LAST_PROP] = { NULL, };
/*
* GtkBoxChild:
* @widget: the child widget, packed into the GtkBox.
@@ -246,32 +251,29 @@ gtk_box_class_init (GtkBoxClass *class)
PROP_ORIENTATION,
"orientation");
g_object_class_install_property (object_class,
PROP_SPACING,
g_param_spec_int ("spacing",
P_("Spacing"),
P_("The amount of space between children"),
0,
G_MAXINT,
0,
GTK_PARAM_READWRITE));
props[PROP_SPACING] =
g_param_spec_int ("spacing",
P_("Spacing"),
P_("The amount of space between children"),
0, G_MAXINT, 0,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_property (object_class,
PROP_HOMOGENEOUS,
g_param_spec_boolean ("homogeneous",
P_("Homogeneous"),
P_("Whether the children should all be the same size"),
FALSE,
GTK_PARAM_READWRITE));
props[PROP_HOMOGENEOUS] =
g_param_spec_boolean ("homogeneous",
P_("Homogeneous"),
P_("Whether the children should all be the same size"),
FALSE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_property (object_class,
PROP_BASELINE_POSITION,
g_param_spec_enum ("baseline-position",
P_("Baseline position"),
P_("The position of the baseline aligned widgets if extra space is available"),
GTK_TYPE_BASELINE_POSITION,
GTK_BASELINE_POSITION_CENTER,
GTK_PARAM_READWRITE));
props[PROP_BASELINE_POSITION] =
g_param_spec_enum ("baseline-position",
P_("Baseline position"),
P_("The position of the baseline aligned widgets if extra space is available"),
GTK_TYPE_BASELINE_POSITION,
GTK_BASELINE_POSITION_CENTER,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_properties (object_class, LAST_PROP, props);
/**
* GtkBox:expand:
@@ -372,9 +374,16 @@ gtk_box_set_property (GObject *object,
switch (prop_id)
{
case PROP_ORIENTATION:
private->orientation = g_value_get_enum (value);
_gtk_orientable_set_style_classes (GTK_ORIENTABLE (box));
gtk_widget_queue_resize (GTK_WIDGET (box));
{
GtkOrientation orientation = g_value_get_enum (value);
if (private->orientation != orientation)
{
private->orientation = orientation;
_gtk_orientable_set_style_classes (GTK_ORIENTABLE (box));
gtk_widget_queue_resize (GTK_WIDGET (box));
g_object_notify (object, "orientation");
}
}
break;
case PROP_SPACING:
gtk_box_set_spacing (box, g_value_get_int (value));
@@ -2102,10 +2111,12 @@ gtk_box_set_homogeneous (GtkBox *box,
private = box->priv;
if ((homogeneous ? TRUE : FALSE) != private->homogeneous)
homogeneous = homogeneous != FALSE;
if (private->homogeneous != homogeneous)
{
private->homogeneous = homogeneous ? TRUE : FALSE;
g_object_notify (G_OBJECT (box), "homogeneous");
private->homogeneous = homogeneous;
g_object_notify_by_pspec (G_OBJECT (box), props[PROP_HOMOGENEOUS]);
gtk_widget_queue_resize (GTK_WIDGET (box));
}
}
@@ -2145,12 +2156,12 @@ gtk_box_set_spacing (GtkBox *box,
private = box->priv;
if (spacing != private->spacing)
if (private->spacing != spacing)
{
private->spacing = spacing;
_gtk_box_set_spacing_set (box, TRUE);
g_object_notify (G_OBJECT (box), "spacing");
g_object_notify_by_pspec (G_OBJECT (box), props[PROP_SPACING]);
gtk_widget_queue_resize (GTK_WIDGET (box));
}
@@ -2196,11 +2207,11 @@ gtk_box_set_baseline_position (GtkBox *box,
private = box->priv;
if (position != private->baseline_pos)
if (private->baseline_pos != position)
{
private->baseline_pos = position;
g_object_notify (G_OBJECT (box), "baseline-position");
g_object_notify_by_pspec (G_OBJECT (box), props[PROP_BASELINE_POSITION]);
gtk_widget_queue_resize (GTK_WIDGET (box));
}
@@ -2217,7 +2228,7 @@ gtk_box_set_baseline_position (GtkBox *box,
* Since: 3.10
**/
GtkBaselinePosition
gtk_box_get_baseline_position (GtkBox *box)
gtk_box_get_baseline_position (GtkBox *box)
{
g_return_val_if_fail (GTK_IS_BOX (box), GTK_BASELINE_POSITION_CENTER);
+17 -13
View File
@@ -1547,7 +1547,7 @@ gtk_builder_expose_object (GtkBuilder *builder,
typedef struct {
GModule *module;
gpointer data;
} connect_args;
} ConnectArgs;
static void
gtk_builder_connect_signals_default (GtkBuilder *builder,
@@ -1559,7 +1559,7 @@ gtk_builder_connect_signals_default (GtkBuilder *builder,
gpointer user_data)
{
GCallback func;
connect_args *args = (connect_args*)user_data;
ConnectArgs *args = (ConnectArgs*) user_data;
func = gtk_builder_lookup_callback_symbol (builder, handler_name);
@@ -1618,23 +1618,20 @@ void
gtk_builder_connect_signals (GtkBuilder *builder,
gpointer user_data)
{
connect_args *args;
ConnectArgs args;
g_return_if_fail (GTK_IS_BUILDER (builder));
args = g_slice_new0 (connect_args);
args->data = user_data;
args.data = user_data;
if (g_module_supported ())
args->module = g_module_open (NULL, G_MODULE_BIND_LAZY);
args.module = g_module_open (NULL, G_MODULE_BIND_LAZY);
gtk_builder_connect_signals_full (builder,
gtk_builder_connect_signals_default,
args);
if (args->module)
g_module_close (args->module);
g_slice_free (connect_args, args);
&args);
if (args.module)
g_module_close (args.module);
}
/**
@@ -1643,7 +1640,7 @@ gtk_builder_connect_signals (GtkBuilder *builder,
* @object: object to connect a signal to
* @signal_name: name of the signal
* @handler_name: name of the handler
* @connect_object: a #GObject, if non-%NULL, use g_signal_connect_object()
* @connect_object: (nullable): a #GObject, if non-%NULL, use g_signal_connect_object()
* @flags: #GConnectFlags to use
* @user_data: user data
*
@@ -2275,10 +2272,17 @@ GType
gtk_builder_get_type_from_name (GtkBuilder *builder,
const gchar *type_name)
{
GType type;
g_return_val_if_fail (GTK_IS_BUILDER (builder), G_TYPE_INVALID);
g_return_val_if_fail (type_name != NULL, G_TYPE_INVALID);
return GTK_BUILDER_GET_CLASS (builder)->get_type_from_name (builder, type_name);
type = GTK_BUILDER_GET_CLASS (builder)->get_type_from_name (builder, type_name);
if (G_TYPE_IS_CLASSED (type))
g_type_class_unref (g_type_class_ref (type));
return type;
}
GQuark
+90 -98
View File
@@ -59,7 +59,7 @@
#include "gtkapplicationprivate.h"
#include "gtkactionhelper.h"
static const GtkBorder default_default_border = { 1, 1, 1, 1 };
static const GtkBorder default_default_border = { 0, 0, 0, 0 };
static const GtkBorder default_default_outside_border = { 0, 0, 0, 0 };
/* Time out before giving up on getting a key release when animating
@@ -89,13 +89,16 @@ enum {
PROP_XALIGN,
PROP_YALIGN,
PROP_IMAGE_POSITION,
PROP_ALWAYS_SHOW_IMAGE,
/* actionable properties */
PROP_ACTION_NAME,
PROP_ACTION_TARGET,
PROP_ALWAYS_SHOW_IMAGE,
/* activatable properties */
PROP_ACTIVATABLE_RELATED_ACTION,
PROP_ACTIVATABLE_USE_ACTION_APPEARANCE
PROP_ACTIVATABLE_USE_ACTION_APPEARANCE,
LAST_PROP = PROP_ACTION_NAME
};
@@ -179,6 +182,7 @@ static void gtk_button_get_preferred_height_and_baseline_for_width (GtkWidget *w
gint *minimum_baseline,
gint *natural_baseline);
static GParamSpec *props[LAST_PROP] = { NULL, };
static guint button_signals[LAST_SIGNAL] = { 0 };
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
@@ -237,51 +241,46 @@ gtk_button_class_init (GtkButtonClass *klass)
klass->leave = gtk_button_update_state;
klass->activate = gtk_real_button_activate;
g_object_class_install_property (gobject_class,
PROP_LABEL,
g_param_spec_string ("label",
P_("Label"),
P_("Text of the label widget inside the button, if the button contains a label widget"),
NULL,
GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT));
props[PROP_LABEL] =
g_param_spec_string ("label",
P_("Label"),
P_("Text of the label widget inside the button, if the button contains a label widget"),
NULL,
GTK_PARAM_READWRITE|G_PARAM_CONSTRUCT|G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_property (gobject_class,
PROP_USE_UNDERLINE,
g_param_spec_boolean ("use-underline",
P_("Use underline"),
P_("If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key"),
FALSE,
GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT));
props[PROP_USE_UNDERLINE] =
g_param_spec_boolean ("use-underline",
P_("Use underline"),
P_("If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key"),
FALSE,
GTK_PARAM_READWRITE|G_PARAM_CONSTRUCT|G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkButton:use-stock:
*
* Deprecated: 3.10
*/
g_object_class_install_property (gobject_class,
PROP_USE_STOCK,
g_param_spec_boolean ("use-stock",
P_("Use stock"),
P_("If set, the label is used to pick a stock item instead of being displayed"),
FALSE,
GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_DEPRECATED));
props[PROP_USE_STOCK] =
g_param_spec_boolean ("use-stock",
P_("Use stock"),
P_("If set, the label is used to pick a stock item instead of being displayed"),
FALSE,
GTK_PARAM_READWRITE|G_PARAM_CONSTRUCT|G_PARAM_EXPLICIT_NOTIFY|G_PARAM_DEPRECATED);
g_object_class_install_property (gobject_class,
PROP_FOCUS_ON_CLICK,
g_param_spec_boolean ("focus-on-click",
P_("Focus on click"),
P_("Whether the button grabs focus when it is clicked with the mouse"),
TRUE,
GTK_PARAM_READWRITE));
props[PROP_FOCUS_ON_CLICK] =
g_param_spec_boolean ("focus-on-click",
P_("Focus on click"),
P_("Whether the button grabs focus when it is clicked with the mouse"),
TRUE,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_property (gobject_class,
PROP_RELIEF,
g_param_spec_enum ("relief",
P_("Border relief"),
P_("The border relief style"),
GTK_TYPE_RELIEF_STYLE,
GTK_RELIEF_NORMAL,
GTK_PARAM_READWRITE));
props[PROP_RELIEF] =
g_param_spec_enum ("relief",
P_("Border relief"),
P_("The border relief style"),
GTK_TYPE_RELIEF_STYLE,
GTK_RELIEF_NORMAL,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkButton:xalign:
@@ -295,15 +294,12 @@ gtk_button_class_init (GtkButtonClass *klass)
* Deprecated: 3.14: Access the child widget directly if you need to control
* its alignment.
*/
g_object_class_install_property (gobject_class,
PROP_XALIGN,
g_param_spec_float ("xalign",
P_("Horizontal alignment for child"),
P_("Horizontal position of child in available space. 0.0 is left aligned, 1.0 is right aligned"),
0.0,
1.0,
0.5,
GTK_PARAM_READWRITE|G_PARAM_DEPRECATED));
props[PROP_XALIGN] =
g_param_spec_float ("xalign",
P_("Horizontal alignment for child"),
P_("Horizontal position of child in available space. 0.0 is left aligned, 1.0 is right aligned"),
0.0, 1.0, 0.5,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY|G_PARAM_DEPRECATED);
/**
* GtkButton:yalign:
@@ -317,15 +313,12 @@ gtk_button_class_init (GtkButtonClass *klass)
* Deprecated: 3.14: Access the child widget directly if you need to control
* its alignment.
*/
g_object_class_install_property (gobject_class,
PROP_YALIGN,
g_param_spec_float ("yalign",
P_("Vertical alignment for child"),
P_("Vertical position of child in available space. 0.0 is top aligned, 1.0 is bottom aligned"),
0.0,
1.0,
0.5,
GTK_PARAM_READWRITE|G_PARAM_DEPRECATED));
props[PROP_YALIGN] =
g_param_spec_float ("yalign",
P_("Vertical alignment for child"),
P_("Vertical position of child in available space. 0.0 is top aligned, 1.0 is bottom aligned"),
0.0, 1.0, 0.5,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY|G_PARAM_DEPRECATED);
/**
* GtkButton:image:
@@ -334,13 +327,12 @@ gtk_button_class_init (GtkButtonClass *klass)
*
* Since: 2.6
*/
g_object_class_install_property (gobject_class,
PROP_IMAGE,
g_param_spec_object ("image",
P_("Image widget"),
P_("Child widget to appear next to the button text"),
GTK_TYPE_WIDGET,
GTK_PARAM_READWRITE));
props[PROP_IMAGE] =
g_param_spec_object ("image",
P_("Image widget"),
P_("Child widget to appear next to the button text"),
GTK_TYPE_WIDGET,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkButton:image-position:
@@ -349,14 +341,13 @@ gtk_button_class_init (GtkButtonClass *klass)
*
* Since: 2.10
*/
g_object_class_install_property (gobject_class,
PROP_IMAGE_POSITION,
g_param_spec_enum ("image-position",
P_("Image position"),
P_("The position of the image relative to the text"),
GTK_TYPE_POSITION_TYPE,
GTK_POS_LEFT,
GTK_PARAM_READWRITE));
props[PROP_IMAGE_POSITION] =
g_param_spec_enum ("image-position",
P_("Image position"),
P_("The position of the image relative to the text"),
GTK_TYPE_POSITION_TYPE,
GTK_POS_LEFT,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
* GtkButton:always-show-image:
@@ -369,13 +360,14 @@ gtk_button_class_init (GtkButtonClass *klass)
*
* Since: 3.6
*/
g_object_class_install_property (gobject_class,
PROP_ALWAYS_SHOW_IMAGE,
g_param_spec_boolean ("always-show-image",
P_("Always show image"),
P_("Whether the image will always be shown"),
FALSE,
GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT));
props[PROP_ALWAYS_SHOW_IMAGE] =
g_param_spec_boolean ("always-show-image",
P_("Always show image"),
P_("Whether the image will always be shown"),
FALSE,
GTK_PARAM_READWRITE|G_PARAM_CONSTRUCT|G_PARAM_EXPLICIT_NOTIFY);
g_object_class_install_properties (gobject_class, LAST_PROP, props);
g_object_class_override_property (gobject_class, PROP_ACTION_NAME, "action-name");
g_object_class_override_property (gobject_class, PROP_ACTION_TARGET, "action-target");
@@ -493,6 +485,8 @@ gtk_button_class_init (GtkButtonClass *klass)
* The "default-border" style property defines the extra space to add
* around a button that can become the default widget of its window.
* For more information about default widgets, see gtk_widget_grab_default().
*
* Deprecated: 3.14: use CSS margins and padding instead.
*/
gtk_widget_class_install_style_property (widget_class,
@@ -500,7 +494,7 @@ gtk_button_class_init (GtkButtonClass *klass)
P_("Default Spacing"),
P_("Extra space to add for GTK_CAN_DEFAULT buttons"),
GTK_TYPE_BORDER,
GTK_PARAM_READABLE));
GTK_PARAM_READABLE|G_PARAM_DEPRECATED));
/**
* GtkButton:default-outside-border:
@@ -509,13 +503,15 @@ gtk_button_class_init (GtkButtonClass *klass)
* space to add around a button that can become the default widget of its
* window. Extra outside space is always drawn outside the button border.
* For more information about default widgets, see gtk_widget_grab_default().
*
* Deprecated: 3.14: use CSS margins and padding instead.
*/
gtk_widget_class_install_style_property (widget_class,
g_param_spec_boxed ("default-outside-border",
P_("Default Outside Spacing"),
P_("Extra space to add for GTK_CAN_DEFAULT buttons that is always drawn outside the border"),
GTK_TYPE_BORDER,
GTK_PARAM_READABLE));
GTK_PARAM_READABLE|G_PARAM_DEPRECATED));
gtk_widget_class_install_style_property (widget_class,
g_param_spec_int ("child-displacement-x",
P_("Child X Displacement"),
@@ -598,6 +594,7 @@ multipress_pressed_cb (GtkGestureMultiPress *gesture,
gtk_widget_grab_focus (widget);
g_signal_emit (button, button_signals[PRESSED], 0);
gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
}
static void
@@ -653,7 +650,7 @@ gtk_button_init (GtkButton *button)
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (priv->gesture), GDK_BUTTON_PRIMARY);
g_signal_connect (priv->gesture, "pressed", G_CALLBACK (multipress_pressed_cb), button);
g_signal_connect (priv->gesture, "released", G_CALLBACK (multipress_released_cb), button);
gtk_gesture_attach (priv->gesture, GTK_PHASE_TARGET);
gtk_event_controller_set_propagation_phase (GTK_EVENT_CONTROLLER (priv->gesture), GTK_PHASE_BUBBLE);
}
static void
@@ -668,12 +665,7 @@ gtk_button_destroy (GtkWidget *widget)
priv->label_text = NULL;
}
if (priv->gesture)
{
gtk_gesture_detach (priv->gesture);
g_object_unref (priv->gesture);
priv->gesture = NULL;
}
g_clear_object (&priv->gesture);
GTK_WIDGET_CLASS (gtk_button_parent_class)->destroy (widget);
}
@@ -1516,7 +1508,7 @@ gtk_button_set_relief (GtkButton *button,
if (newrelief != priv->relief)
{
priv->relief = newrelief;
g_object_notify (G_OBJECT (button), "relief");
g_object_notify_by_pspec (G_OBJECT (button), props[PROP_RELIEF]);
gtk_widget_queue_draw (GTK_WIDGET (button));
}
}
@@ -2244,7 +2236,7 @@ gtk_button_set_label (GtkButton *button,
gtk_button_construct_child (button);
g_object_notify (G_OBJECT (button), "label");
g_object_notify_by_pspec (G_OBJECT (button), props[PROP_LABEL]);
}
/**
@@ -2294,7 +2286,7 @@ gtk_button_set_use_underline (GtkButton *button,
gtk_button_construct_child (button);
g_object_notify (G_OBJECT (button), "use-underline");
g_object_notify_by_pspec (G_OBJECT (button), props[PROP_USE_UNDERLINE]);
}
}
@@ -2344,7 +2336,7 @@ gtk_button_set_use_stock (GtkButton *button,
gtk_button_construct_child (button);
g_object_notify (G_OBJECT (button), "use-stock");
g_object_notify_by_pspec (G_OBJECT (button), props[PROP_USE_STOCK]);
}
}
@@ -2396,7 +2388,7 @@ gtk_button_set_focus_on_click (GtkButton *button,
{
priv->focus_on_click = focus_on_click;
g_object_notify (G_OBJECT (button), "focus-on-click");
g_object_notify_by_pspec (G_OBJECT (button), props[PROP_FOCUS_ON_CLICK]);
}
}
@@ -2454,8 +2446,8 @@ gtk_button_set_alignment (GtkButton *button,
maybe_set_alignment (button, gtk_bin_get_child (GTK_BIN (button)));
g_object_freeze_notify (G_OBJECT (button));
g_object_notify (G_OBJECT (button), "xalign");
g_object_notify (G_OBJECT (button), "yalign");
g_object_notify_by_pspec (G_OBJECT (button), props[PROP_XALIGN]);
g_object_notify_by_pspec (G_OBJECT (button), props[PROP_YALIGN]);
g_object_thaw_notify (G_OBJECT (button));
}
@@ -2678,7 +2670,7 @@ gtk_button_set_image (GtkButton *button,
gtk_button_construct_child (button);
g_object_notify (G_OBJECT (button), "image");
g_object_notify_by_pspec (G_OBJECT (button), props[PROP_IMAGE]);
}
/**
@@ -2728,7 +2720,7 @@ gtk_button_set_image_position (GtkButton *button,
gtk_button_construct_child (button);
g_object_notify (G_OBJECT (button), "image-position");
g_object_notify_by_pspec (G_OBJECT (button), props[PROP_IMAGE_POSITION]);
}
}
@@ -2786,7 +2778,7 @@ gtk_button_set_always_show_image (GtkButton *button,
gtk_widget_hide (priv->image);
}
g_object_notify (G_OBJECT (button), "always-show-image");
g_object_notify_by_pspec (G_OBJECT (button), props[PROP_ALWAYS_SHOW_IMAGE]);
}
}
+71 -56
View File
@@ -471,7 +471,7 @@ gtk_calendar_class_init (GtkCalendarClass *class)
P_("Year"),
P_("The selected year"),
0, G_MAXINT >> 9, 0,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkCalendar:month:
@@ -485,7 +485,7 @@ gtk_calendar_class_init (GtkCalendarClass *class)
P_("Month"),
P_("The selected month (as a number between 0 and 11)"),
0, 11, 0,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkCalendar:day:
@@ -500,7 +500,7 @@ gtk_calendar_class_init (GtkCalendarClass *class)
P_("Day"),
P_("The selected day (as a number between 1 and 31, or 0 to unselect the currently selected day)"),
0, 31, 0,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkCalendar:show-heading:
@@ -515,7 +515,7 @@ gtk_calendar_class_init (GtkCalendarClass *class)
P_("Show Heading"),
P_("If TRUE, a heading is displayed"),
TRUE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkCalendar:show-day-names:
@@ -530,7 +530,7 @@ gtk_calendar_class_init (GtkCalendarClass *class)
P_("Show Day Names"),
P_("If TRUE, day names are displayed"),
TRUE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkCalendar:no-month-change:
*
@@ -544,7 +544,7 @@ gtk_calendar_class_init (GtkCalendarClass *class)
P_("No Month Change"),
P_("If TRUE, the selected month cannot be changed"),
FALSE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkCalendar:show-week-numbers:
@@ -559,7 +559,7 @@ gtk_calendar_class_init (GtkCalendarClass *class)
P_("Show Week Numbers"),
P_("If TRUE, week numbers are displayed"),
FALSE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkCalendar:detail-width-chars:
@@ -575,7 +575,7 @@ gtk_calendar_class_init (GtkCalendarClass *class)
P_("Details Width"),
P_("Details width in characters"),
0, 127, 0,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkCalendar:detail-height-rows:
@@ -591,7 +591,7 @@ gtk_calendar_class_init (GtkCalendarClass *class)
P_("Details Height"),
P_("Details height in rows"),
0, 127, 0,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkCalendar:show-details:
@@ -608,7 +608,7 @@ gtk_calendar_class_init (GtkCalendarClass *class)
P_("Show Details"),
P_("If TRUE, details are shown"),
TRUE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
@@ -1439,20 +1439,27 @@ gtk_calendar_destroy (GtkWidget *widget)
GTK_WIDGET_CLASS (gtk_calendar_parent_class)->destroy (widget);
}
static void
static gboolean
calendar_set_display_option (GtkCalendar *calendar,
GtkCalendarDisplayOptions flag,
gboolean setting)
{
GtkCalendarPrivate *priv = calendar->priv;
GtkCalendarDisplayOptions flags;
gboolean old_setting;
old_setting = (priv->display_flags & flag) != 0;
if (old_setting == setting)
return FALSE;
if (setting)
flags = priv->display_flags | flag;
else
flags = priv->display_flags & ~flag;
gtk_calendar_set_display_options (calendar, flags);
return TRUE;
}
static gboolean
@@ -1490,29 +1497,34 @@ gtk_calendar_set_property (GObject *object,
g_value_get_int (value));
break;
case PROP_SHOW_HEADING:
calendar_set_display_option (calendar,
GTK_CALENDAR_SHOW_HEADING,
g_value_get_boolean (value));
if (calendar_set_display_option (calendar,
GTK_CALENDAR_SHOW_HEADING,
g_value_get_boolean (value)))
g_object_notify (object, "show-heading");
break;
case PROP_SHOW_DAY_NAMES:
calendar_set_display_option (calendar,
GTK_CALENDAR_SHOW_DAY_NAMES,
g_value_get_boolean (value));
if (calendar_set_display_option (calendar,
GTK_CALENDAR_SHOW_DAY_NAMES,
g_value_get_boolean (value)))
g_object_notify (object, "show-day-names");
break;
case PROP_NO_MONTH_CHANGE:
calendar_set_display_option (calendar,
GTK_CALENDAR_NO_MONTH_CHANGE,
g_value_get_boolean (value));
if (calendar_set_display_option (calendar,
GTK_CALENDAR_NO_MONTH_CHANGE,
g_value_get_boolean (value)))
g_object_notify (object, "no-month-change");
break;
case PROP_SHOW_WEEK_NUMBERS:
calendar_set_display_option (calendar,
GTK_CALENDAR_SHOW_WEEK_NUMBERS,
g_value_get_boolean (value));
if (calendar_set_display_option (calendar,
GTK_CALENDAR_SHOW_WEEK_NUMBERS,
g_value_get_boolean (value)))
g_object_notify (object, "show-week-numbers");
break;
case PROP_SHOW_DETAILS:
calendar_set_display_option (calendar,
GTK_CALENDAR_SHOW_DETAILS,
g_value_get_boolean (value));
if (calendar_set_display_option (calendar,
GTK_CALENDAR_SHOW_DETAILS,
g_value_get_boolean (value)))
g_object_notify (object, "show-details");
break;
case PROP_DETAIL_WIDTH_CHARS:
gtk_calendar_set_detail_width_chars (calendar,
@@ -3682,20 +3694,25 @@ gtk_calendar_select_month (GtkCalendar *calendar,
priv = calendar->priv;
priv->month = month;
priv->year = year;
g_object_freeze_notify (G_OBJECT (calendar));
if (priv->month != month)
{
priv->month = month;
g_object_notify (G_OBJECT (calendar), "month");
}
if (priv->year != year)
{
priv->year = year;
g_object_notify (G_OBJECT (calendar), "year");
}
calendar_compute_days (calendar);
calendar_queue_refresh (calendar);
g_object_freeze_notify (G_OBJECT (calendar));
g_object_notify (G_OBJECT (calendar), "month");
g_object_notify (G_OBJECT (calendar), "year");
g_object_thaw_notify (G_OBJECT (calendar));
g_signal_emit (calendar,
gtk_calendar_signals[MONTH_CHANGED_SIGNAL],
0);
g_signal_emit (calendar, gtk_calendar_signals[MONTH_CHANGED_SIGNAL], 0);
}
/**
@@ -3717,31 +3734,29 @@ gtk_calendar_select_day (GtkCalendar *calendar,
priv = calendar->priv;
/* Deselect the old day */
if (priv->selected_day > 0)
if (priv->selected_day != day)
{
gint selected_day;
/* Deselect the old day */
if (priv->selected_day > 0)
{
if (gtk_widget_is_drawable (GTK_WIDGET (calendar)))
calendar_invalidate_day_num (calendar, priv->selected_day);
priv->selected_day = 0;
}
selected_day = priv->selected_day;
priv->selected_day = 0;
if (gtk_widget_is_drawable (GTK_WIDGET (calendar)))
calendar_invalidate_day_num (calendar, selected_day);
priv->selected_day = day;
/* Select the new day */
if (priv->selected_day > 0)
{
if (gtk_widget_is_drawable (GTK_WIDGET (calendar)))
calendar_invalidate_day_num (calendar, priv->selected_day);
}
g_object_notify (G_OBJECT (calendar), "day");
}
priv->selected_day = day;
/* Select the new day */
if (day != 0)
{
if (gtk_widget_is_drawable (GTK_WIDGET (calendar)))
calendar_invalidate_day_num (calendar, day);
}
g_object_notify (G_OBJECT (calendar), "day");
g_signal_emit (calendar,
gtk_calendar_signals[DAY_SELECTED_SIGNAL],
0);
g_signal_emit (calendar, gtk_calendar_signals[DAY_SELECTED_SIGNAL], 0);
}
/**
+8 -6
View File
@@ -312,7 +312,7 @@ gtk_cell_area_box_class_init (GtkCellAreaBoxClass *class)
0,
G_MAXINT,
0,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/* Cell Properties */
/**
@@ -1050,11 +1050,13 @@ gtk_cell_area_box_set_property (GObject *object,
switch (prop_id)
{
case PROP_ORIENTATION:
box->priv->orientation = g_value_get_enum (value);
/* Notify that size needs to be requested again */
reset_contexts (box);
if (box->priv->orientation != g_value_get_enum (value))
{
box->priv->orientation = g_value_get_enum (value);
/* Notify that size needs to be requested again */
reset_contexts (box);
g_object_notify_by_pspec (object, pspec);
}
break;
case PROP_SPACING:
gtk_cell_area_box_set_spacing (box, g_value_get_int (value));
+1 -1
View File
@@ -51,7 +51,7 @@ gtk_cell_editable_default_init (GtkCellEditableInterface *iface)
P_("Editing Canceled"),
P_("Indicates that editing has been canceled"),
FALSE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkCellEditable::editing-done:
+1 -1
View File
@@ -500,7 +500,7 @@ gtk_cell_layout_add_attribute (GtkCellLayout *cell_layout,
* @cell_layout: a #GtkCellLayout
* @cell: a #GtkCellRenderer
* @func: (allow-none): the #GtkCellLayoutDataFunc to use, or %NULL
* @func_data: user data for @func
* @func_data: (closure): user data for @func
* @destroy: destroy notify for @func_data
*
* Sets the #GtkCellLayoutDataFunc to use for @cell_layout.
+1 -1
View File
@@ -44,7 +44,7 @@ typedef struct _GtkCellLayoutIface GtkCellLayoutIface;
* @cell: the cell renderer whose value is to be set
* @tree_model: the model
* @iter: a #GtkTreeIter indicating the row to set the value for
* @data: user data passed to gtk_cell_layout_set_cell_data_func()
* @data: (closure): user data passed to gtk_cell_layout_set_cell_data_func()
*
* A function which should set the value of @cell_layouts cell renderer(s)
* as appropriate.
+76 -29
View File
@@ -286,7 +286,7 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class)
P_("Editable mode of the CellRenderer"),
GTK_TYPE_CELL_RENDERER_MODE,
GTK_CELL_RENDERER_MODE_INERT,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (object_class,
PROP_VISIBLE,
@@ -294,14 +294,14 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class)
P_("visible"),
P_("Display the cell"),
TRUE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (object_class,
PROP_SENSITIVE,
g_param_spec_boolean ("sensitive",
P_("Sensitive"),
P_("Display the cell sensitive"),
TRUE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (object_class,
PROP_XALIGN,
@@ -311,7 +311,7 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class)
0.0,
1.0,
0.5,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (object_class,
PROP_YALIGN,
@@ -321,7 +321,7 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class)
0.0,
1.0,
0.5,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (object_class,
PROP_XPAD,
@@ -331,7 +331,7 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class)
0,
G_MAXUINT,
0,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (object_class,
PROP_YPAD,
@@ -341,7 +341,7 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class)
0,
G_MAXUINT,
0,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (object_class,
PROP_WIDTH,
@@ -351,7 +351,7 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class)
-1,
G_MAXINT,
-1,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (object_class,
PROP_HEIGHT,
@@ -361,7 +361,7 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class)
-1,
G_MAXINT,
-1,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (object_class,
PROP_IS_EXPANDER,
@@ -369,7 +369,7 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class)
P_("Is Expander"),
P_("Row has children"),
FALSE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (object_class,
@@ -378,7 +378,7 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class)
P_("Is Expanded"),
P_("Row is an expander row, and is expanded"),
FALSE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (object_class,
PROP_CELL_BACKGROUND,
@@ -402,7 +402,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
P_("Cell background color"),
P_("Cell background color as a GdkColor"),
GDK_TYPE_COLOR,
GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
GTK_PARAM_READWRITE|G_PARAM_DEPRECATED));
G_GNUC_END_IGNORE_DEPRECATIONS
/**
* GtkCellRenderer:cell-background-rgba:
@@ -428,7 +428,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
GTK_PARAM_READABLE));
#define ADD_SET_PROP(propname, propval, nick, blurb) g_object_class_install_property (object_class, propval, g_param_spec_boolean (propname, nick, blurb, FALSE, GTK_PARAM_READWRITE))
#define ADD_SET_PROP(propname, propval, nick, blurb) g_object_class_install_property (object_class, propval, g_param_spec_boolean (propname, nick, blurb, FALSE, GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY))
ADD_SET_PROP ("cell-background-set", PROP_CELL_BACKGROUND_SET,
P_("Cell background set"),
@@ -563,40 +563,81 @@ gtk_cell_renderer_set_property (GObject *object,
switch (param_id)
{
case PROP_MODE:
priv->mode = g_value_get_enum (value);
if (priv->mode != g_value_get_enum (value))
{
priv->mode = g_value_get_enum (value);
g_object_notify_by_pspec (object, pspec);
}
break;
case PROP_VISIBLE:
priv->visible = g_value_get_boolean (value);
if (priv->visible != g_value_get_boolean (value))
{
priv->visible = g_value_get_boolean (value);
g_object_notify_by_pspec (object, pspec);
}
break;
case PROP_SENSITIVE:
priv->sensitive = g_value_get_boolean (value);
break;
case PROP_EDITING:
priv->editing = g_value_get_boolean (value);
if (priv->sensitive != g_value_get_boolean (value))
{
priv->sensitive = g_value_get_boolean (value);
g_object_notify_by_pspec (object, pspec);
}
break;
case PROP_XALIGN:
priv->xalign = g_value_get_float (value);
if (priv->xalign != g_value_get_float (value))
{
priv->xalign = g_value_get_float (value);
g_object_notify_by_pspec (object, pspec);
}
break;
case PROP_YALIGN:
priv->yalign = g_value_get_float (value);
if (priv->yalign != g_value_get_float (value))
{
priv->yalign = g_value_get_float (value);
g_object_notify_by_pspec (object, pspec);
}
break;
case PROP_XPAD:
priv->xpad = g_value_get_uint (value);
if (priv->xpad != g_value_get_uint (value))
{
priv->xpad = g_value_get_uint (value);
g_object_notify_by_pspec (object, pspec);
}
break;
case PROP_YPAD:
priv->ypad = g_value_get_uint (value);
if (priv->ypad != g_value_get_uint (value))
{
priv->ypad = g_value_get_uint (value);
g_object_notify_by_pspec (object, pspec);
}
break;
case PROP_WIDTH:
priv->width = g_value_get_int (value);
if (priv->width != g_value_get_int (value))
{
priv->width = g_value_get_int (value);
g_object_notify_by_pspec (object, pspec);
}
break;
case PROP_HEIGHT:
priv->height = g_value_get_int (value);
if (priv->height != g_value_get_int (value))
{
priv->height = g_value_get_int (value);
g_object_notify_by_pspec (object, pspec);
}
break;
case PROP_IS_EXPANDER:
priv->is_expander = g_value_get_boolean (value);
if (priv->is_expander != g_value_get_boolean (value))
{
priv->is_expander = g_value_get_boolean (value);
g_object_notify_by_pspec (object, pspec);
}
break;
case PROP_IS_EXPANDED:
priv->is_expanded = g_value_get_boolean (value);
if (priv->is_expanded != g_value_get_boolean (value))
{
priv->is_expanded = g_value_get_boolean (value);
g_object_notify_by_pspec (object, pspec);
}
break;
case PROP_CELL_BACKGROUND:
{
@@ -609,7 +650,7 @@ gtk_cell_renderer_set_property (GObject *object,
else
g_warning ("Don't know color `%s'", g_value_get_string (value));
g_object_notify (object, "cell-background-gdk");
g_object_notify (object, "cell-background");
}
break;
case PROP_CELL_BACKGROUND_GDK:
@@ -632,13 +673,18 @@ gtk_cell_renderer_set_property (GObject *object,
{
set_cell_bg_color (cell, NULL);
}
g_object_notify (object, "cell-background-gdk");
}
break;
case PROP_CELL_BACKGROUND_RGBA:
set_cell_bg_color (cell, g_value_get_boxed (value));
break;
case PROP_CELL_BACKGROUND_SET:
priv->cell_background_set = g_value_get_boolean (value);
if (priv->cell_background_set != g_value_get_boolean (value))
{
priv->cell_background_set = g_value_get_boolean (value);
g_object_notify (object, "cell-background-set");
}
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
@@ -670,6 +716,7 @@ set_cell_bg_color (GtkCellRenderer *cell,
g_object_notify (G_OBJECT (cell), "cell-background-set");
}
}
g_object_notify (G_OBJECT (cell), "cell-background-rgba");
}
/**
+12 -5
View File
@@ -148,7 +148,7 @@ gtk_cell_renderer_accel_class_init (GtkCellRendererAccelClass *cell_accel_class)
0,
G_MAXINT,
0,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkCellRendererAccel:accel-mods:
@@ -164,7 +164,7 @@ gtk_cell_renderer_accel_class_init (GtkCellRendererAccelClass *cell_accel_class)
P_("The modifier mask of the accelerator"),
GDK_TYPE_MODIFIER_TYPE,
0,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkCellRendererAccel:keycode:
@@ -183,7 +183,7 @@ gtk_cell_renderer_accel_class_init (GtkCellRendererAccelClass *cell_accel_class)
0,
G_MAXINT,
0,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkCellRendererAccel:accel-mode:
@@ -202,7 +202,7 @@ gtk_cell_renderer_accel_class_init (GtkCellRendererAccelClass *cell_accel_class)
P_("The type of accelerators"),
GTK_TYPE_CELL_RENDERER_ACCEL_MODE,
GTK_CELL_RENDERER_ACCEL_MODE_GTK,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkCellRendererAccel::accel-edited:
@@ -353,6 +353,7 @@ gtk_cell_renderer_accel_set_property (GObject *object,
{
priv->accel_key = accel_key;
changed = TRUE;
g_object_notify (object, "accel-key");
}
}
break;
@@ -365,6 +366,7 @@ gtk_cell_renderer_accel_set_property (GObject *object,
{
priv->accel_mods = accel_mods;
changed = TRUE;
g_object_notify (object, "accel-mods");
}
}
break;
@@ -376,12 +378,17 @@ gtk_cell_renderer_accel_set_property (GObject *object,
{
priv->keycode = keycode;
changed = TRUE;
g_object_notify (object, "keycode");
}
}
break;
case PROP_ACCEL_MODE:
priv->accel_mode = g_value_get_enum (value);
if (priv->accel_mode != g_value_get_enum (value))
{
priv->accel_mode = g_value_get_enum (value);
g_object_notify (object, "accel-mode");
}
break;
default:
+12 -4
View File
@@ -153,7 +153,7 @@ gtk_cell_renderer_combo_class_init (GtkCellRendererComboClass *klass)
-1,
G_MAXINT,
-1,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkCellRendererCombo:has-entry:
@@ -169,7 +169,7 @@ gtk_cell_renderer_combo_class_init (GtkCellRendererComboClass *klass)
P_("Has Entry"),
P_("If FALSE, don't allow to enter strings other than the chosen ones"),
TRUE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
@@ -303,10 +303,18 @@ gtk_cell_renderer_combo_set_property (GObject *object,
break;
}
case PROP_TEXT_COLUMN:
priv->text_column = g_value_get_int (value);
if (priv->text_column != g_value_get_int (value))
{
priv->text_column = g_value_get_int (value);
g_object_notify_by_pspec (object, pspec);
}
break;
case PROP_HAS_ENTRY:
priv->has_entry = g_value_get_boolean (value);
if (priv->has_entry != g_value_get_boolean (value))
{
priv->has_entry = g_value_get_boolean (value);
g_object_notify_by_pspec (object, pspec);
}
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+36 -25
View File
@@ -137,7 +137,7 @@ gtk_cell_renderer_progress_class_init (GtkCellRendererProgressClass *klass)
P_("Value"),
P_("Value of the progress bar"),
0, 100, 0,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkCellRendererProgress:text:
@@ -179,7 +179,7 @@ gtk_cell_renderer_progress_class_init (GtkCellRendererProgressClass *klass)
P_("Pulse"),
P_("Set this to positive values to indicate that some progress is made, but you don't know how much."),
-1, G_MAXINT, -1,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkCellRendererProgress:text-xalign:
@@ -225,7 +225,7 @@ gtk_cell_renderer_progress_class_init (GtkCellRendererProgressClass *klass)
P_("Inverted"),
P_("Invert the direction in which the progress bar grows"),
FALSE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
}
static void
@@ -280,9 +280,9 @@ gtk_cell_renderer_progress_finalize (GObject *object)
}
static void
gtk_cell_renderer_progress_get_property (GObject *object,
guint param_id,
GValue *value,
gtk_cell_renderer_progress_get_property (GObject *object,
guint param_id,
GValue *value,
GParamSpec *pspec)
{
GtkCellRendererProgress *cellprogress = GTK_CELL_RENDERER_PROGRESS (object);
@@ -317,8 +317,8 @@ gtk_cell_renderer_progress_get_property (GObject *object,
}
static void
gtk_cell_renderer_progress_set_property (GObject *object,
guint param_id,
gtk_cell_renderer_progress_set_property (GObject *object,
guint param_id,
const GValue *value,
GParamSpec *pspec)
{
@@ -346,10 +346,18 @@ gtk_cell_renderer_progress_set_property (GObject *object,
priv->text_yalign = g_value_get_float (value);
break;
case PROP_ORIENTATION:
priv->orientation = g_value_get_enum (value);
if (priv->orientation != g_value_get_enum (value))
{
priv->orientation = g_value_get_enum (value);
g_object_notify_by_pspec (object, pspec);
}
break;
case PROP_INVERTED:
priv->inverted = g_value_get_boolean (value);
if (priv->inverted != g_value_get_boolean (value))
{
priv->inverted = g_value_get_boolean (value);
g_object_notify_by_pspec (object, pspec);
}
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
@@ -377,9 +385,12 @@ static void
gtk_cell_renderer_progress_set_value (GtkCellRendererProgress *cellprogress,
gint value)
{
cellprogress->priv->value = value;
recompute_label (cellprogress);
if (cellprogress->priv->value != value)
{
cellprogress->priv->value = value;
recompute_label (cellprogress);
g_object_notify (G_OBJECT (cellprogress), "value");
}
}
static void
@@ -391,27 +402,27 @@ gtk_cell_renderer_progress_set_text (GtkCellRendererProgress *cellprogress,
new_text = g_strdup (text);
g_free (cellprogress->priv->text);
cellprogress->priv->text = new_text;
recompute_label (cellprogress);
g_object_notify (G_OBJECT (cellprogress), "text");
}
static void
gtk_cell_renderer_progress_set_pulse (GtkCellRendererProgress *cellprogress,
gint pulse)
{
GtkCellRendererProgressPrivate *priv = cellprogress->priv;
GtkCellRendererProgressPrivate *priv = cellprogress->priv;
if (pulse != priv->pulse)
{
if (pulse <= 0)
priv->offset = 0;
else
priv->offset = pulse;
}
if (pulse != priv->pulse)
{
if (pulse <= 0)
priv->offset = 0;
else
priv->offset = pulse;
g_object_notify (G_OBJECT (cellprogress), "pulse");
}
priv->pulse = pulse;
recompute_label (cellprogress);
priv->pulse = pulse;
recompute_label (cellprogress);
}
static void
+6 -2
View File
@@ -143,7 +143,7 @@ gtk_cell_renderer_spin_class_init (GtkCellRendererSpinClass *klass)
P_("Digits"),
P_("The number of decimal places to display"),
0, 20, 0,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
}
static void
@@ -232,7 +232,11 @@ gtk_cell_renderer_spin_set_property (GObject *object,
priv->climb_rate = g_value_get_double (value);
break;
case PROP_DIGITS:
priv->digits = g_value_get_uint (value);
if (priv->digits != g_value_get_uint (value))
{
priv->digits = g_value_get_uint (value);
g_object_notify_by_pspec (object, pspec);
}
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+21 -7
View File
@@ -125,7 +125,8 @@ gtk_cell_renderer_spinner_class_init (GtkCellRendererSpinnerClass *klass)
P_("Active"),
P_("Whether the spinner is active (ie. shown) in the cell"),
FALSE,
G_PARAM_READWRITE));
G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkCellRendererSpinner:pulse:
*
@@ -143,7 +144,8 @@ gtk_cell_renderer_spinner_class_init (GtkCellRendererSpinnerClass *klass)
P_("Pulse"),
P_("Pulse of the spinner"),
0, G_MAXUINT, 0,
G_PARAM_READWRITE));
G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkCellRendererSpinner:size:
*
@@ -157,7 +159,7 @@ gtk_cell_renderer_spinner_class_init (GtkCellRendererSpinnerClass *klass)
P_("Size"),
P_("The GtkIconSize value that specifies the size of the rendered spinner"),
GTK_TYPE_ICON_SIZE, GTK_ICON_SIZE_MENU,
G_PARAM_READWRITE));
G_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
}
@@ -239,14 +241,26 @@ gtk_cell_renderer_spinner_set_property (GObject *object,
switch (param_id)
{
case PROP_ACTIVE:
priv->active = g_value_get_boolean (value);
if (priv->active != g_value_get_boolean (value))
{
priv->active = g_value_get_boolean (value);
g_object_notify (object, "active");
}
break;
case PROP_PULSE:
priv->pulse = g_value_get_uint (value);
if (priv->pulse != g_value_get_uint (value))
{
priv->pulse = g_value_get_uint (value);
g_object_notify (object, "pulse");
}
break;
case PROP_SIZE:
priv->old_icon_size = priv->icon_size;
priv->icon_size = g_value_get_enum (value);
if (priv->icon_size != g_value_get_enum (value))
{
priv->old_icon_size = priv->icon_size;
priv->icon_size = g_value_get_enum (value);
g_object_notify (object, "size");
}
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
+37 -13
View File
@@ -277,7 +277,7 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
P_("Single Paragraph Mode"),
P_("Whether to keep all text in a single paragraph"),
FALSE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (object_class,
@@ -519,7 +519,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
"to display the entire string"),
PANGO_TYPE_ELLIPSIZE_MODE,
PANGO_ELLIPSIZE_NONE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkCellRendererText:width-chars:
@@ -538,7 +538,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
-1,
G_MAXINT,
-1,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
@@ -563,7 +563,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
-1,
G_MAXINT,
-1,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkCellRendererText:wrap-mode:
@@ -583,7 +583,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
"to display the entire string"),
PANGO_TYPE_WRAP_MODE,
PANGO_WRAP_CHAR,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkCellRendererText:wrap-width:
@@ -602,7 +602,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
-1,
G_MAXINT,
-1,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkCellRendererText:alignment:
@@ -622,7 +622,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
P_("How to align the lines"),
PANGO_TYPE_ALIGNMENT,
PANGO_ALIGN_LEFT,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkCellRendererText:placeholder-text:
@@ -1230,7 +1230,11 @@ gtk_cell_renderer_text_set_property (GObject *object,
break;
case PROP_SINGLE_PARAGRAPH_MODE:
priv->single_paragraph = g_value_get_boolean (value);
if (priv->single_paragraph != g_value_get_boolean (value))
{
priv->single_paragraph = g_value_get_boolean (value);
g_object_notify_by_pspec (object, pspec);
}
break;
case PROP_BACKGROUND:
@@ -1453,23 +1457,43 @@ gtk_cell_renderer_text_set_property (GObject *object,
break;
case PROP_WRAP_MODE:
priv->wrap_mode = g_value_get_enum (value);
if (priv->wrap_mode != g_value_get_enum (value))
{
priv->wrap_mode = g_value_get_enum (value);
g_object_notify_by_pspec (object, pspec);
}
break;
case PROP_WRAP_WIDTH:
priv->wrap_width = g_value_get_int (value);
if (priv->wrap_width != g_value_get_int (value))
{
priv->wrap_width = g_value_get_int (value);
g_object_notify_by_pspec (object, pspec);
}
break;
case PROP_WIDTH_CHARS:
priv->width_chars = g_value_get_int (value);
if (priv->width_chars != g_value_get_int (value))
{
priv->width_chars = g_value_get_int (value);
g_object_notify_by_pspec (object, pspec);
}
break;
case PROP_MAX_WIDTH_CHARS:
priv->max_width_chars = g_value_get_int (value);
if (priv->max_width_chars != g_value_get_int (value))
{
priv->max_width_chars = g_value_get_int (value);
g_object_notify_by_pspec (object, pspec);
}
break;
case PROP_ALIGN:
priv->align = g_value_get_enum (value);
if (priv->align != g_value_get_enum (value))
{
priv->align = g_value_get_enum (value);
g_object_notify (object, "alignment");
}
priv->align_set = TRUE;
g_object_notify (object, "align-set");
break;
+30 -10
View File
@@ -137,7 +137,7 @@ gtk_cell_renderer_toggle_class_init (GtkCellRendererToggleClass *class)
P_("Toggle state"),
P_("The toggle state of the button"),
FALSE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (object_class,
PROP_INCONSISTENT,
@@ -145,7 +145,7 @@ gtk_cell_renderer_toggle_class_init (GtkCellRendererToggleClass *class)
P_("Inconsistent state"),
P_("The inconsistent state of the button"),
FALSE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (object_class,
PROP_ACTIVATABLE,
@@ -153,7 +153,7 @@ gtk_cell_renderer_toggle_class_init (GtkCellRendererToggleClass *class)
P_("Activatable"),
P_("The toggle button can be activated"),
TRUE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (object_class,
PROP_RADIO,
@@ -161,7 +161,7 @@ gtk_cell_renderer_toggle_class_init (GtkCellRendererToggleClass *class)
P_("Radio state"),
P_("Draw the toggle button as a radio button"),
FALSE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (object_class,
PROP_INDICATOR_SIZE,
@@ -171,7 +171,7 @@ gtk_cell_renderer_toggle_class_init (GtkCellRendererToggleClass *class)
0,
G_MAXINT,
TOGGLE_WIDTH,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
@@ -244,19 +244,39 @@ gtk_cell_renderer_toggle_set_property (GObject *object,
switch (param_id)
{
case PROP_ACTIVE:
priv->active = g_value_get_boolean (value);
if (priv->active != g_value_get_boolean (value))
{
priv->active = g_value_get_boolean (value);
g_object_notify_by_pspec (object, pspec);
}
break;
case PROP_INCONSISTENT:
priv->inconsistent = g_value_get_boolean (value);
if (priv->inconsistent != g_value_get_boolean (value))
{
priv->inconsistent = g_value_get_boolean (value);
g_object_notify_by_pspec (object, pspec);
}
break;
case PROP_ACTIVATABLE:
priv->activatable = g_value_get_boolean (value);
if (priv->activatable != g_value_get_boolean (value))
{
priv->activatable = g_value_get_boolean (value);
g_object_notify_by_pspec (object, pspec);
}
break;
case PROP_RADIO:
priv->radio = g_value_get_boolean (value);
if (priv->radio != g_value_get_boolean (value))
{
priv->radio = g_value_get_boolean (value);
g_object_notify_by_pspec (object, pspec);
}
break;
case PROP_INDICATOR_SIZE:
priv->indicator_size = g_value_get_int (value);
if (priv->indicator_size != g_value_get_int (value))
{
priv->indicator_size = g_value_get_int (value);
g_object_notify_by_pspec (object, pspec);
}
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
+10 -7
View File
@@ -298,7 +298,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
P_("Whether to force cells to be drawn in a "
"sensitive state"),
FALSE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
/**
* GtkCellView:fit-model:
@@ -317,7 +317,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
P_("Whether to request enough space for "
"every row in the model"),
FALSE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
#define ADD_SET_PROP(propname, propval, nick, blurb) g_object_class_install_property (gobject_class, propval, g_param_spec_boolean (propname, nick, blurb, FALSE, GTK_PARAM_READWRITE))
@@ -439,11 +439,14 @@ gtk_cell_view_set_property (GObject *object,
switch (param_id)
{
case PROP_ORIENTATION:
priv->orientation = g_value_get_enum (value);
if (priv->context)
gtk_cell_area_context_reset (priv->context);
_gtk_orientable_set_style_classes (GTK_ORIENTABLE (object));
if (priv->orientation != g_value_get_enum (value))
{
priv->orientation = g_value_get_enum (value);
if (priv->context)
gtk_cell_area_context_reset (priv->context);
_gtk_orientable_set_style_classes (GTK_ORIENTABLE (object));
g_object_notify_by_pspec (object, pspec);
}
break;
case PROP_BACKGROUND:
{
+3 -4
View File
@@ -122,7 +122,7 @@ gtk_check_menu_item_class_init (GtkCheckMenuItemClass *klass)
P_("Active"),
P_("Whether the menu item is checked"),
FALSE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (gobject_class,
PROP_INCONSISTENT,
@@ -130,7 +130,7 @@ gtk_check_menu_item_class_init (GtkCheckMenuItemClass *klass)
P_("Inconsistent"),
P_("Whether to display an \"inconsistent\" state"),
FALSE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (gobject_class,
PROP_DRAW_AS_RADIO,
@@ -138,7 +138,7 @@ gtk_check_menu_item_class_init (GtkCheckMenuItemClass *klass)
P_("Draw as radio menu item"),
P_("Whether the menu item looks like a radio menu item"),
FALSE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
gtk_widget_class_install_style_property (widget_class,
g_param_spec_int ("indicator-size",
@@ -650,7 +650,6 @@ gtk_check_menu_item_set_property (GObject *object,
}
}
/* Private */
/*
+10 -11
View File
@@ -1385,7 +1385,7 @@ clipboard_received_func (GtkClipboard *clipboard,
* This function waits for the data to be received using the main
* loop, so events, timeouts, etc, may be dispatched during the wait.
*
* Returns: a newly-allocated #GtkSelectionData object or %NULL
* Returns: (nullable): a newly-allocated #GtkSelectionData object or %NULL
* if retrieving the given target failed. If non-%NULL,
* this value must be freed with gtk_selection_data_free()
* when you are finished with it.
@@ -1438,7 +1438,7 @@ clipboard_text_received_func (GtkClipboard *clipboard,
* the data to be received using the main loop, so events,
* timeouts, etc, may be dispatched during the wait.
*
* Returns: a newly-allocated UTF-8 string which must
* Returns: (nullable): a newly-allocated UTF-8 string which must
* be freed with g_free(), or %NULL if retrieving
* the selection data failed. (This could happen
* for various reasons, in particular if the
@@ -1497,7 +1497,7 @@ clipboard_rich_text_received_func (GtkClipboard *clipboard,
* waits for the data to be received using the main loop, so events,
* timeouts, etc, may be dispatched during the wait.
*
* Returns: (array length=length) (transfer full): a
* Returns: (nullable) (array length=length) (transfer full): a
* newly-allocated binary block of data which must be
* freed with g_free(), or %NULL if retrieving the
* selection data failed. (This could happen for various
@@ -1564,7 +1564,7 @@ clipboard_image_received_func (GtkClipboard *clipboard,
* the data to be received using the main loop, so events,
* timeouts, etc, may be dispatched during the wait.
*
* Returns: (transfer full): a newly-allocated #GdkPixbuf
* Returns: (nullable) (transfer full): a newly-allocated #GdkPixbuf
* object which must be disposed with g_object_unref(), or
* %NULL if retrieving the selection data failed. (This could
* happen for various reasons, in particular if the clipboard
@@ -1618,13 +1618,12 @@ clipboard_uris_received_func (GtkClipboard *clipboard,
* for the data to be received using the main loop, so events,
* timeouts, etc, may be dispatched during the wait.
*
* Returns: (array zero-terminated=1) (element-type utf8) (transfer full): a newly-allocated
* %NULL-terminated array of strings which must
* be freed with g_strfreev(), or %NULL if
* retrieving the selection data failed. (This
* could happen for various reasons, in particular
* if the clipboard was empty or if the contents of
* the clipboard could not be converted into URI form.)
* Returns: (nullable) (array zero-terminated=1) (element-type utf8) (transfer full):
* a newly-allocated %NULL-terminated array of strings which must
* be freed with g_strfreev(), or %NULL if retrieving the
* selection data failed. (This could happen for various reasons,
* in particular if the clipboard was empty or if the contents of
* the clipboard could not be converted into URI form.)
*
* Since: 2.14
**/
+41 -10
View File
@@ -38,7 +38,8 @@ G_BEGIN_DECLS
* @selection_data: a #GtkSelectionData containing the data was received.
* If retrieving the data failed, then then length field
* of @selection_data will be negative.
* @data: the @user_data supplied to gtk_clipboard_request_contents().
* @data: (closure): the @user_data supplied to
* gtk_clipboard_request_contents().
*
* A function to be called when the results of gtk_clipboard_request_contents()
* are received, or when the request fails.
@@ -50,9 +51,10 @@ typedef void (* GtkClipboardReceivedFunc) (GtkClipboard *clipboard,
/**
* GtkClipboardTextReceivedFunc:
* @clipboard: the #GtkClipboard
* @text: the text received, as a UTF-8 encoded string, or %NULL
* if retrieving the data failed.
* @data: the @user_data supplied to gtk_clipboard_request_text().
* @text: (nullable): the text received, as a UTF-8 encoded string, or
* %NULL if retrieving the data failed.
* @data: (closure): the @user_data supplied to
* gtk_clipboard_request_text().
*
* A function to be called when the results of gtk_clipboard_request_text()
* are received, or when the request fails.
@@ -61,6 +63,22 @@ typedef void (* GtkClipboardTextReceivedFunc) (GtkClipboard *clipboard,
const gchar *text,
gpointer data);
/**
* GtkClipboardRichTextReceivedFunc:
* @clipboard: the #GtkClipboard
* @format: The format of the rich text
* @text: (nullable) (type utf8): the rich text received, as
* a UTF-8 encoded string, or %NULL if retrieving the data failed.
* @length: Length of the text.
* @data: (closure): the @user_data supplied to
* gtk_clipboard_request_rich_text().
*
* A function to be called when the results of
* gtk_clipboard_request_rich_text() are received, or when the request
* fails.
*
* Since: 2.10
*/
typedef void (* GtkClipboardRichTextReceivedFunc) (GtkClipboard *clipboard,
GdkAtom format,
const guint8 *text,
@@ -71,7 +89,8 @@ typedef void (* GtkClipboardRichTextReceivedFunc) (GtkClipboard *clipboard,
* GtkClipboardImageReceivedFunc:
* @clipboard: the #GtkClipboard
* @pixbuf: the received image
* @data: the @user_data supplied to gtk_clipboard_request_image().
* @data: (closure): the @user_data supplied to
* gtk_clipboard_request_image().
*
* A function to be called when the results of gtk_clipboard_request_image()
* are received, or when the request fails.
@@ -82,6 +101,19 @@ typedef void (* GtkClipboardImageReceivedFunc) (GtkClipboard *clipboard,
GdkPixbuf *pixbuf,
gpointer data);
/**
* GtkClipboardURIReceivedFunc:
* @clipboard: the #GtkClipboard
* @uris: (array zero-terminated=1): the received URIs
* @data: (closure): the @user_data supplied to
* gtk_clipboard_request_uris().
*
* A function to be called when the results of
* gtk_clipboard_request_uris() are received, or when the request
* fails.
*
* Since: 2.14
*/
typedef void (* GtkClipboardURIReceivedFunc) (GtkClipboard *clipboard,
gchar **uris,
gpointer data);
@@ -89,10 +121,11 @@ typedef void (* GtkClipboardURIReceivedFunc) (GtkClipboard *clipboard,
/**
* GtkClipboardTargetsReceivedFunc:
* @clipboard: the #GtkClipboard
* @atoms: the supported targets, as array of #GdkAtom, or %NULL
* if retrieving the data failed.
* @atoms: (nullable) (array length=n_atoms): the supported targets,
* as array of #GdkAtom, or %NULL if retrieving the data failed.
* @n_atoms: the length of the @atoms array.
* @data: the @user_data supplied to gtk_clipboard_request_targets().
* @data: (closure): the @user_data supplied to
* gtk_clipboard_request_targets().
*
* A function to be called when the results of gtk_clipboard_request_targets()
* are received, or when the request fails.
@@ -153,10 +186,8 @@ GType gtk_clipboard_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GtkClipboard *gtk_clipboard_get_for_display (GdkDisplay *display,
GdkAtom selection);
#ifndef GDK_MULTIHEAD_SAFE
GDK_AVAILABLE_IN_ALL
GtkClipboard *gtk_clipboard_get (GdkAtom selection);
#endif
GDK_AVAILABLE_IN_ALL
GdkDisplay *gtk_clipboard_get_display (GtkClipboard *clipboard);

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