Commit Graph

21828 Commits

Author SHA1 Message Date
Carlos Garnacho
9629fd07e3 entry: Handle touch events on entry icons
Those used to work indirectly due to GtkEntry not setting GDK_TOUCH_MASK,
so pointer emulation would happen on those, but the event handlers on icons
and its icon-pressed/released signals have never been explicitly touch
aware, and this broke since the GDK_TOUCH_MASK can be set indirectly by
GtkGestures.

So make the icon event handler handle touch events, each icon can get hold
of one GdkEventSequence, reacting exclusively to it. This is still not
ported to GtkGesture due to GdkEvent exposure in these icon signals, as
users might expect GDK_2/3BUTTON_PRESS while GtkGesture ignores those.

Also, unset all icon pressed/sequence state on grab-notify, this used to
happen ad-hoc when initiating icon DnD, but that doesn't cut it for
user-defined reasons to initiate a grab (eg. popovers).

https://bugzilla.gnome.org/show_bug.cgi?id=736004
2014-09-04 16:43:16 +02:00
Lapo Calamandrei
0a9d60cdde Adwaita: big buttons surgey
- cover missing statusses in selection-mode and the like
- button drawing functions cleanup and extension
- remove inline toolbar (ugly) special case not needed anymore
- button selector structure simplification and rationalization
- add back shadow to window control buttons
2014-09-04 15:11:21 +02:00
Carlos Garnacho
bf8f824760 treeview: Run the row dragging gesture on the bubble phase
This is so signal handlers have an opportunity to undo its effect by
returning GDK_EVENT_STOP on ::button-press-event, just like they used
to do pre-gestures.

https://bugzilla.gnome.org/show_bug.cgi?id=735965
2014-09-04 14:59:08 +02:00
Carlos Garnacho
6f538950d4 dnd: Make the drag gesture obey the button mask specified
This was forgotten when making DnD use a GtkGesture in the handlers
attached to the widget in gtk_drag_source_set(). The gesture must obey
the specified button mask, and switch to denied state if the pressed
button isn't part of the given mask.

https://bugzilla.gnome.org/show_bug.cgi?id=735965
2014-09-04 14:59:08 +02:00
Matthias Clasen
768c0c21b5 GtkPlacesSidebar: Cancel async ops when finalized
This is the common practice for objects that start async operations.
https://bugzilla.gnome.org/show_bug.cgi?id=735953
2014-09-03 23:30:43 -04:00
Emmanuele Bassi
c68fc27719 places-sidebar: Use asynchronous API for querying bookmarks
Removes two FIXMEs, and ensures that the places sidebar does not block
while enumerating bookmarks or application shortcuts to remote volumes.

https://bugzilla.gnome.org/show_bug.cgi?id=735953
2014-09-03 23:30:43 -04:00
Matthias Clasen
6efbe745b1 Stop using the deprecated GtkTreeView:rules-hint
This was still used in the file chooser and the font chooser.
2014-09-03 23:30:43 -04:00
Matthias Clasen
bbc7cd2351 GtkEntryCompletion: Treat ::text-column specially
Using the setting for this property conflicts with the documentation
for gtk_entry_completion_set_text_column() which explicitly states
that setting the property directly behaves differently. Concretely,
this caused the file chooser entry completion popup to have two
columns (with identical content).

This partially reverts 331c28b369.
2014-09-03 22:46:38 -04:00
Matthias Clasen
1cc5cf3797 GtkLabel: better treatment for selection with ellipsis
This commit arranges things so that we treat an ellipsized
region like a single character for the purpose of selection
and cursor navigation.

https://bugzilla.gnome.org/show_bug.cgi?id=328449
2014-09-03 22:23:08 -04:00
Matthias Clasen
fc5f7cc138 GtkLabel: Make it possible to get the ellipsis range
This will be used in the next commit to expand the selection.
2014-09-03 22:23:08 -04:00
Matthias Clasen
1cddd14ab4 GtkLabel: better treatment for ellipsized links
When links are entirely hidden in an ellipsis, don't let
them be activated by clicking and skip them when moving
the focus around.

This commit depends on enhancements in pango 1.36.7 which
make it possible to find the ellipsed runs in a PangoLayout.
With older pango, things will work the same way as before.

https://bugzilla.gnome.org/show_bug.cgi?id=668258
2014-09-03 22:23:08 -04:00
Lapo Calamandrei
0ff5cf7daf Adwaita: fix path-bar buttons padding
The padding there previously made the pathbar 1px taller then
buttons, not good in general and specifically not good for
Nautilus.
2014-09-04 00:53:10 +02:00
Cosimo Cecchi
db372382e9 toolitem: set clip on allocation
So that widgets that are children of tool items can render their shadows
too.
2014-09-03 14:45:51 -07:00
Lapo Calamandrei
356e02fc78 Adwaita: more sass functions remixing 2014-09-03 20:40:43 +02:00
Lapo Calamandrei
4570806ad6 Adwaita: more usefull headerbar related functions 2014-09-03 19:41:50 +02:00
Lapo Calamandrei
aa85282bb6 Adwaita: change font-size: 82% to font-size: smaller 2014-09-03 17:01:43 +02:00
Lapo Calamandrei
34de8da7d4 Adwaita: .app-notification istead of .app-notification.frame 2014-09-03 16:02:27 +02:00
Lapo Calamandrei
f8ee954a10 Adwaita: change widget_edge() to _widget_edge()
For consistence with other "private" functions.
2014-09-03 14:27:07 +02:00
Lapo Calamandrei
58bef3a464 Adwaita: parametric bottom edge color for buttons 2014-09-03 14:22:33 +02:00
Lapo Calamandrei
6adaf4b74f Adwaita: parametric bottom edge color for entries
The entry mixin now allows to specify the color of the widget bottom
edge hilight, istead then just enable/disable it, so `$noegde: true`
now is `$egde: none` or `$edge: $somecolor`, not setting it draws
the edge with the default theme color.
2014-09-03 14:22:33 +02:00
Lapo Calamandrei
b4282be76b Adwaita: fix message dialog button linking logic 2014-09-02 23:32:50 +02:00
Lapo Calamandrei
9e8582e371 Adwaita: move %selected_items at the end of the file
To be able to use that all over the place avoiding duplication.
2014-09-02 23:28:21 +02:00
Lapo Calamandrei
d4250eecf7 Adwaita: special case button in selected list rows
Buttons on blue bg needs to have no shadow and, for the light
variant, darker borders.
2014-09-02 22:54:40 +02:00
Lapo Calamandrei
c1e831e595 Adwaita: parametric headerbar_fill highlight 2014-09-02 20:39:25 +02:00
Lapo Calamandrei
c90d8dafd8 Adwaita: turn $widget_edge into a function 2014-09-02 20:36:06 +02:00
Jasper St. Pierre
e6a0378289 gtkcssshadowvalue: Use cairo_surface_create_similar_image
Calling this on an Xlib surface allows us to keep this in SHM memory,
giving it a potential speedup so we don't have to copy it to SHM memory
for the Composite when we mask later.
2014-09-02 11:26:55 -07:00
Matthias Clasen
e742c0447e inspector: Add .ui.h files to git
Tools like damn-lies rely on being able to generate .pot files
from pristine checkouts, so everything that goes into the .pot
file has to be in git. This is not ideal, but we already do
the same for other .ui.h files in GTK+.
2014-09-02 09:53:51 -04:00
Matthias Clasen
29826d5489 Keep .ui.h files out of BUILT_SOURCES AND MAINTAINERCLEANFILES
Otherwise, git.mk will add them to .gitignore, and we want to
add them to source control for the benefit of tools like damn-lies
which rely on being able to generate a .pot file from a pristine
checkout.,
2014-09-02 09:53:51 -04:00
Lapo Calamandrei
fef85f72ee Adwaita: make entry and headerbar gradients sass functions 2014-09-02 15:21:42 +02:00
Andre Heinecke
382d68ff8e Use secrets service for cups auth_info
When a printer requires auth_info (e.g. a printer connected
    over the samba protocol) it is now possible to save the
    credentials necessary for printing if a secrets service
    is available over dbus.
    The auth_info is then stored / loaded from the default
    collection of that secrets service.
    If no such service is available the user is not shown
    the option to remember the password and the behavior
    remains the same as before.

    https://bugzilla.gnome.org/show_bug.cgi?id=674264
2014-09-01 22:39:51 +02:00
Carlos Garnacho
14b4e4d35a gtkdnd: Hardcode the DnD window onto the drag widget window on Wayland
This makes the drag widget use the same window surface that was passed
when starting the drag operation.

https://bugzilla.gnome.org/show_bug.cgi?id=697855
2014-09-01 19:50:12 +02:00
Carlos Garnacho
ee93db1659 window: Add private API to hardcode the main GdkWindow for a GtkWindow
This must be called while the window is not realized yet, and sets the
GdkWindow that will be used for the next GtkWindow's realize/unrealize
cycle. The GtkWindow takes ownership on the GdkWindow, and as such it
will be destroyed when the widget is unrealized.

https://bugzilla.gnome.org/show_bug.cgi?id=697855
2014-09-01 19:17:54 +02:00
Carlos Garnacho
f48b3cce02 wayland: Replace clipboard implementation
The wayland specific clipboard functions have been replaced by something
more similar to the hooking the win32 backend does, which allows for just
using the default GtkClipboard code in GTK+. As a consequence, the
wayland-specific GtkClipboard implementation is now gone.

https://bugzilla.gnome.org/show_bug.cgi?id=697855
2014-09-01 19:17:53 +02:00
Carlos Garnacho
bd410421d8 gtkselection: Ensure the X11 specific message length only applies to X11
Other backends are compilable together with the X11 one, so the message
lenght limit was applying to them all.

https://bugzilla.gnome.org/show_bug.cgi?id=697855
2014-09-01 19:17:53 +02:00
Lapo Calamandrei
7d1d9e26d7 Adwaita: make links on selected bg visible... 2014-09-01 19:10:50 +02:00
Lapo Calamandrei
31a26ef8a9 Adwaita: GtkFlowBox selected child styling 2014-09-01 17:43:14 +02:00
Matthias Clasen
0c417dfc30 inspector: Prevent looping when picking widgets
What was happening that the button press event that we use
to select a widget caused another clicked signal emission of
the inspect button, starting another pick action.
2014-09-01 11:39:08 -04:00
Lapo Calamandrei
87e2b37875 Adwaita: move the header-bar fill in a mixin. 2014-09-01 17:32:16 +02:00
Lapo Calamandrei
85593b2f2b Adwaita: set padding to 0 for tab buttons 2014-09-01 16:27:34 +02:00
Jasper St. Pierre
08f6dceef5 gtkcairoblur: Relicense under LGPL
Both Owen Taylor and I, the originators of this code, allow the code
herein be relicensed to the LGPL, which is what GTK+ ships with. This
prevents GTK+ from being GPL-only.
2014-08-31 19:50:37 -07:00
Jasper St. Pierre
f33eb7a373 cssshadowvalue: Fix whitespace 2014-08-31 19:50:37 -07:00
Lapo Calamandrei
db6f7296e6 Adwaita: special case checks/radios on selected bg
Add yet another set of checks and radios assets used in selected
treeview cells and selected list-rows, the standard dark variant assets
work well in those cases so no need for special casing there.
2014-08-30 14:33:20 +02:00
Matthias Clasen
a822abd308 GtkTreeView: Don't hardcode black for tree lines
Use the left border color for tree lines. This is similar to
our use of top border color for grid lines. As a side-effect,
tree lines now get recolored when they are in a selected row.

https://bugzilla.gnome.org/show_bug.cgi?id=415415
2014-08-30 02:12:41 -04:00
Matthias Clasen
8c5eb9a0d6 GtkTreeModelFilter: Documentation improvement
Clarify in the docs that some functions can only be called
once for a given filter model.

https://bugzilla.gnome.org/show_bug.cgi?id=346886
2014-08-30 01:59:05 -04:00
Matthias Clasen
1c1b51d52d Don't return from a void function
And don't return the value of void functions, either.
2014-08-30 00:53:35 -04:00
Matthias Clasen
e014b89310 Move gtkthemingengine to deprecated directory
This is the place for wholly-deprecated sources.
2014-08-29 16:35:37 -04:00
Matthias Clasen
bdf35e034a GtkAboutDialog: Add formatting examples to the docs
We were not very explicit about the expected format for links
and email addresses in the strings, so give some explicit examples.
2014-08-29 15:11:11 -04:00
Lapo Calamandrei
4d608ad722 Adwaita: no edge hilight for checks and radios in list-rows 2014-08-29 19:48:11 +02:00
Lapo Calamandrei
2de06993d5 Adwaita: titlebutton are flat image-buttons
Hence treat them like those, a bunch of special case styling
removed, which also doesn't override selection mode buttons
styling.
2014-08-29 16:52:21 +02:00
Lapo Calamandrei
c5893e5dc1 Adwaita: style GtkLabel.separator
Fixes gnome-document search popup titles.
2014-08-29 15:32:45 +02:00
Lapo Calamandrei
3407a83c23 Adwaita: avoid text in buttons being overridden by GtkLabel style 2014-08-29 14:49:54 +02:00
Matthias Clasen
992af6c4fe GtkAboutDialog: Support https in links
https://bugzilla.gnome.org/show_bug.cgi?id=680067
2014-08-29 00:51:39 -04:00
Jakub Steiner
c5d4485a63 Adwaita: pathbar whitespace
- optically center icons + labels vertically. It isn't actually
  centered, but feels more balanced
- add some left/right padding

https://bugzilla.gnome.org/show_bug.cgi?id=734753
2014-08-28 23:10:20 -04:00
Matthias Clasen
3404e92312 GtkHeaderBar: Update separator visibility when needed
We need to be a little more forthcoming with showing and hiding
the separators - their visibility now depends on the the visibility
and pack type of the regular headerbar children. This was observed
in gnome-contacts, where headerbar buttons are shown and hidden.
2014-08-28 22:54:18 -04:00
Matthias Clasen
7b3c81f688 GtkDialog: Keep special-casing help buttons
We used to move help buttons to the secondary position regardless
how they were added to the action area. Keep doing that, to avoid
breaking existing dialogs that rely on this behavior.

https://bugzilla.gnome.org/show_bug.cgi?id=735119
2014-08-28 21:29:26 -04:00
Jakub Steiner
ef0280aeda Adwaita: bring the separator back for dialog buttons
- separators got nuked during lapo's border cleanup
2014-08-29 02:14:16 +02:00
Paolo Borelli
d94379183a menubutton: dismiss menu/popover when toggling programmatically
https://bugzilla.gnome.org/show_bug.cgi?id=735545
2014-08-28 21:16:19 +02:00
Lapo Calamandrei
0144cb92ed Adwaita: dim menu checks/radios a bit 2014-08-28 20:33:37 +02:00
Lapo Calamandrei
70e2a1bb22 Adwaita: nicer transition for flat buttons. 2014-08-28 18:38:46 +02:00
Carlos Garnacho
42c41d7bbd scrolledwindow: Be smarter at invalidating overshoot areas
The previous way to invalidate was meant to work on the overshoot window
so it wouldn't be as taxing. Since the overshoot window is gone, this
would invalidate way more than intended. So constrain invalidated areas
to the sides where overshoot is happenning at that moment.

https://bugzilla.gnome.org/show_bug.cgi?id=735223
2014-08-28 16:44:12 +02:00
Carlos Garnacho
3df8b95e0e tooltip: Use subsurfaces on wayland
This places tooltips in the right place, and avoids having those attempt
to steal the focus.

https://bugzilla.gnome.org/show_bug.cgi?id=735531
2014-08-28 16:41:14 +02:00
Lapo Calamandrei
68d6968955 Adwaita: border rationalization and cleanup
Rely only on border-style for border, take out border-width and
border-style from drawing functions.
2014-08-28 15:44:36 +02:00
Emmanuele Bassi
5ad60caa3c css: Implement font-stretch
The font-stretch CSS property is defined in the Level 3 CSS Fonts
module, available at:

  http://dev.w3.org/csswg/css-fonts/#propdef-font-stretch

It allows defining a normal, condensed, or expanded face to the font
description. Pango already supports it, so this is literally just the
CSS parser machinery needed to bridge our CSS to the FontDescription
API.

https://bugzilla.gnome.org/show_bug.cgi?id=735593
2014-08-28 13:41:40 +01:00
Lapo Calamandrei
f05e9d2612 Adwaita: take named colors out of _colors.scss
To be able to use sass for shipped css, importing _colors.scss
and _drawings.scss.
2014-08-28 13:21:14 +02:00
Lapo Calamandrei
c0ed8e954e Adwaita: rationalize font sizes.
...making GtkSwitch font-size relative in the process.
2014-08-28 12:48:32 +02:00
Emmanuele Bassi
80f4dffa76 theme: Specify the weight, not the font, for header bar titles
Using `font: Bold` will override the font with whatever the system
resolves a `Bold` font name to, including the font's own default size.

We want the font weight to be bold, but we want the default font name
and size to come from the GtkSettings:font-name property, like we do for
the rest of the system.
2014-08-28 11:20:45 +01:00
Matthias Clasen
974807fae9 Adwaita: Make expanders turn again
The theme needed some small adjustments for the recent expander
state changes ACTIVE to CHECKED.
2014-08-27 22:17:29 -04:00
Benjamin Otte
75ac49c475 Use CHECKED instead of ACTIVE for expanded expanders
https://bugzilla.gnome.org/show_bug.cgi?id=733967
2014-08-27 21:27:20 +02:00
Lapo Calamandrei
6b0e4ba789 Adwaita: no edge hilight for popover checks/radios 2014-08-27 18:29:32 +02:00
Benjamin Otte
de061a83a4 modifierstyle: Remove the changed signal
It's been unused since last commit
2014-08-27 17:57:10 +02:00
Benjamin Otte
01d644b7ee widget: Don't connect to GtkModifierStyle::changed
Changes to the modifier style will be picked up by the
GtkStyleProviderPrivate::changed signal. And that signal will actually
invalidate properly.
2014-08-27 17:57:10 +02:00
Carlos Garnacho
e6199af60d treeview: Reset multipress controller after 2nd click
The pre-gestures code used to compare the current button press with the
previous one on !activate_on_single_click, and unset the previous event
data so ::row-activated would be emitted every 2 clicks.

So do the same with the multipress gesture and reset it after every 2nd
click to have ::row-activated emitted multiple times while manic clicking.

https://bugzilla.gnome.org/show_bug.cgi?id=735353
2014-08-27 17:12:52 +02:00
Ikey Doherty
6e1ef76480 Cleanup invalid comments (duplication of words)
https://bugzilla.gnome.org/show_bug.cgi?id=735301

Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2014-08-26 19:55:38 -04:00
Carlos Garnacho
ea830aee5d button: Track gesture point to maintain priv->in_button
This makes the active state work invariably with both mouse/touch, and
regardless of X11 pointer emulation being friendly and sending crossing
events for the emulated pointer events in the latter.

This makes GtkButtons' active state look correct when pressing on
touchscreens on wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=731380
2014-08-26 23:21:24 +02:00
Carlos Garnacho
d04d29f26c entrycompletion: Mark popup window as subsurface on wayland
This will make the completion window use GDK_WINDOW_SUBSURFACE and be
shown relative to the parent window without involving compositor grabs.

https://bugzilla.gnome.org/show_bug.cgi?id=695504
2014-08-26 23:06:02 +02:00
Carlos Garnacho
c38651cac4 gtkwindow: Add private API to mark as subsurface
This is a rather hackish way to let GTK+ widgets declare popup windows
as subsurfaces, so they may work on wayland without the need of xdg_popup,
and without many changes yet on the GTK+ side.

https://bugzilla.gnome.org/show_bug.cgi?id=695504
2014-08-26 23:06:01 +02:00
Lapo Calamandrei
6574d99adf Adwaita: menu checks and radios making sense 2014-08-26 20:32:36 +02:00
Lapo Calamandrei
a02b8e06a4 Adwaita: set a background for GtkTextView
Needed for gedit line numbers, overridden by .view {} normally
2014-08-26 19:54:41 +02:00
Lapo Calamandrei
a65acc7e8d Adwaita: minor fixes to GtkLabel 2014-08-26 19:24:44 +02:00
Lapo Calamandrei
e9a3d42473 Adwaita: take rtl into consideration for GtkAssistant 2014-08-26 18:02:28 +02:00
Lapo Calamandrei
a677205dca Adwaita: GtkAssistant tweakings 2014-08-26 17:51:45 +02:00
Lapo Calamandrei
c942389adb Adwaita: treeview checks/radios minor fix
Superfluous icon shadow in checked hover state removed.
2014-08-26 16:56:22 +02:00
Lapo Calamandrei
9585de7832 Adwaita: in app notification fixes 2014-08-26 16:54:19 +02:00
Carlos Garnacho
bb3a8edb9f scalebutton: Handle smooth scroll events
This has the double effect to make scale button truly smooth, and make
scrolling work on wayland, since all scrolling is "smooth" there.

https://bugzilla.gnome.org/show_bug.cgi?id=720269
2014-08-26 14:54:08 +02:00
Jakub Steiner
dd464513a3 Revert "Adwaita: notebook background"
Not a good solution to the problem at hand (gedit line numbering)

This reverts commit fde03c1f81.
2014-08-26 14:08:47 +02:00
Jakub Steiner
fde03c1f81 Adwaita: notebook background 2014-08-26 12:32:05 +02:00
Paolo Borelli
290a19e93d TextView: clear the background using the default bg color
Try to tidy up how the background is set on the textview:
 *) the .view class should be applied only to the text window, not
    to the margins
 *) when setting the background on the margins we must use .left etc
 *) use context_set_bg instead of manually setting the color

https://bugzilla.gnome.org/show_bug.cgi?id=735368
2014-08-26 09:55:53 +02:00
Matthias Clasen
d5876e99f5 GtkTreeView: Avoid a crash with empty trees
The gesture code was assuming that the rb tree exists, which
will not be the case if the treeview is empty.

https://bugzilla.gnome.org/show_bug.cgi?id=735300
2014-08-26 00:06:23 -04:00
Jakub Steiner
318555ca26 Adwaita: define styling for location-bar toolbars
- same inset style as searchbars
2014-08-25 19:20:49 +02:00
Jakub Steiner
3bad6d1367 Adwaita: legible labels in headerbars in selection mode 2014-08-25 15:24:44 +02:00
Jakub Steiner
514a3c62d7 Adwaita: selection-mode checked togglebuttons
- exposed in gnome-contacts for example.
2014-08-25 15:18:58 +02:00
Jakub Steiner
61d0ea054f Adwaita: selected text in GtkLabel
https://bugzilla.gnome.org/show_bug.cgi?id=735310
2014-08-25 15:08:45 +02:00
Sébastien Wilmet
6525a11b8d inspector: fix a crash in the CSS editor
gtk_css_section_get_end_position() can return a position one byte beyond
the end of the last line.

gtk_text_buffer_get_iter_at_line_index() accepts only valid
line_number/byte_index pairs. Another solution is to make the
GtkTextBuffer function less strict, by returning a boolean if the exact
position was found.

The CSS parser should also be fixed to always return valid positions.
But it's better to have a safety net in the CSS editor, just in case (a
warning could be print).

https://bugzilla.gnome.org/show_bug.cgi?id=735337
2014-08-25 14:25:09 +02:00
Garrett Regier
907dae414a Ref the popover before activating the item
Otherwise the item could cause the popover to be destroyed,
for example a Quit item, and cause a warning to be printed.
2014-08-23 07:51:59 -07:00
Matthias Clasen
08066b1009 GtkAboutDialog: Drop visibility-notify-event handler
The signal is deprecated, and the handler is only helping
for a really tiny corner case anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=734961
2014-08-23 01:28:14 -04:00
Jakub Steiner
96dae4b86e Adwaita: use osd style for in-app notifications 2014-08-22 18:19:21 +02:00
Lapo Calamandrei
d0eb69a56c Adwaita: added a workaround to make sass behave 2014-08-22 17:27:07 +02:00
Matthias Clasen
00543f1781 GtkColorChooser: Make color plane react to mouse again
Fallout from changing the defaults for gesture properties.
2014-08-22 11:21:52 -04:00
Lapo Calamandrei
6ece90301e Adwaita: dark active buttons for osd 2014-08-22 16:55:23 +02:00
Lapo Calamandrei
2ad15d1713 Adwaita: @define-color "compatible" with sass 3.4.0 2014-08-22 14:55:04 +02:00
Carlos Garnacho
5bc437d2bc textview: Unset bubble timeout ID right after requesting the clipboard
The timeout ID used to be unset after we got the targets from the
clipboard, but there's still a moment between the clipboard request and
the GDK_SELECTION_NOTIFY event that the ID points to an already gone
timeout.
2014-08-22 13:24:56 +02:00
Lapo Calamandrei
d9ea7cda80 Adwaita: kill a bogus background-color 2014-08-22 13:07:44 +02:00
Lapo Calamandrei
565d65c907 Adwaita: first round at osd revamp
...buttons, gtkscale and toolbars, more to follow...
2014-08-22 12:55:30 +02:00
Matthias Clasen
683a7f1429 GtkFileChooserWidget: Use ratio in formatted times
This matches what we do in other places now.
2014-08-22 02:04:31 -04:00
Matthias Clasen
23fdc45b95 Avoid picking up long description as translator comment
Rearrange a few lines to help xgettext avoid picking up the
long description of GtkFileChooserButton as translator comment.
2014-08-22 02:04:31 -04:00
Matthias Clasen
22db3e57cb Avoid picking up long description as translator comment
Rearrange a few lines to help xgettext avoid picking up the
long description of GtkAboutDialog as translator comment.
2014-08-22 02:04:31 -04:00
Matthias Clasen
792ffb26bc Remove an extraneous translatable string 2014-08-22 02:04:26 -04:00
Matthias Clasen
8061165789 Adwaita: Insensitive labels
There is an insensitive label in widget-factory which was
not getting any different from the sensitive label next
to it. With this patch, it does, again.
2014-08-22 00:42:52 -04:00
Matthias Clasen
975f29f17f Adwaita: Add assistant sidebar theming
This is just enough to draw the sidebar background and
markt he current page as active.
2014-08-21 23:09:14 -04:00
Matthias Clasen
c3755d995f GtkAssistant: Don't use a draw cb for the sidebar
We can do this with css nowadays.
2014-08-21 23:09:14 -04:00
Rico Tzschichholz
a3a6ce1b42 gtk: Fix return-annotation of gtk_get_default_language to "transfer none" 2014-08-21 23:10:32 +02:00
Matthias Clasen
209d2a83c4 GtkPageSetup: Improve formatting of size
Use U+00D7 MULTIPLICATION SIGN and U+200A HAIR SPACE instead of plain
old 'x' and ' ', following https://wiki.gnome.org/Design/OS/Typography.

Sadly, many fonts don't have space variations, so Pango/harfbuzz fall
back to using the regular space glyph anyway.
2014-08-21 17:07:00 -04:00
Matthias Clasen
23fcc5e373 GtkBuilder: Support parsing int64/uin64 values
This was missing; the code to parse these numbers was there,
but the switch didn't have cases for these types.

https://bugzilla.gnome.org/show_bug.cgi?id=602443
2014-08-21 14:22:13 -04:00
Sébastien Wilmet
706c8e9c8d Simplify _gtk_text_buffer_get_line_log_attrs()
NULL was returned in case of an empty last line. Every users needed to
special-case this. Now it will return the expected result: char_len of 0
with one PangoLogAttr.

In compute_log_attrs(), 'paragraph' will be the empty string "" with
'char_len' == 0.
pango_get_log_attrs() works fine with an empty string, it will return
one correct PangoLogAttr (because there is one text position for the
empty string).

It fixes the unit tests for gtk_text_iter_is_cursor_position().

https://bugzilla.gnome.org/show_bug.cgi?id=156164
2014-08-21 18:43:34 +02:00
Matthias Clasen
7645d201d4 GtkPopover: Fix rtl positioning
There was some confusion between unflipped and flipped positions.
Both final_position and current_position are meant to be unflipped,
and get_effective_position() needs to be applied to them to get
a flipped position. _gtk_window_set_popover_position() also expects
an unflipped position.

https://bugzilla.gnome.org/show_bug.cgi?id=735014
2014-08-21 11:59:44 -04:00
Lapo Calamandrei
09286cf968 Adwaita: try to be nicer on performances with entry shadows 2014-08-21 15:39:12 +02:00
Jakub Steiner
5344f99cdb Adwaita: no edge highlight for backdrop check/radios 2014-08-21 15:03:32 +02:00
Jakub Steiner
d72fa9aaa8 Adwaita: remove edge highlight form the assets
- using icon-shadow now, allows to treat special cases
  without introducing assets
2014-08-21 14:32:41 +02:00
Lapo Calamandrei
9a0b9f6378 Adwaita: some separators simplification
Accidentally fixing the backdrop separators in sidebars turning
black
2014-08-21 12:24:01 +02:00
Lapo Calamandrei
cdf5ecada9 Adwaita: inline toolbar buttons fixes
Properly styled single buttons in inline toolbars and fixed
a superflous border chiming in in backdrop.
2014-08-21 11:55:25 +02:00
Simon McVittie
d329544e70 Use AC_USE_SYSTEM_EXTENSIONS to get _GNU_SOURCE, _XOPEN_SOURCE etc.
Similar to Bug #684123 in GLib.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=641638
Bug-Debian: https://bugs.debian.org/756476
Reviewed-by: Matthias Clasen
2014-08-21 09:54:12 +01:00
Benjamin Otte
2737c67cce css: Round shadow extents properly
Otherwise drawing will be clipped.

Testcase included
2014-08-21 00:54:07 +02:00
Benjamin Otte
67456304d4 roundedbox: Only grow border-radius if there is one
This is relevant for shadow spread and goes in line with the web.

Testcase included.
2014-08-21 00:54:07 +02:00
Benjamin Otte
1126a34353 label: Respect box-shadow when computing clip
Testclase included.

Also reorder headers to be alphabetic.
2014-08-21 00:54:07 +02:00
Benjamin Otte
b5a8b7ef3b widget: Make _gtk_set_simple_clip() take an optional content clip 2014-08-21 00:54:07 +02:00
Benjamin Otte
e643ddfd16 stylecontext: Remove GTK_CSS_CHANGE_FORCE_INVALIDATE
This was introduced as a hackish way in 3.6 to make font updates
propagate properly. But since then, font handling has been changed and
this flag is no longer necessary.
2014-08-21 00:54:07 +02:00
Benjamin Otte
665ad8c6f9 stylecontext: Use right invalidation func
gtk_style_context_invalidate_internal() will respect only the current
saved state of the style context, which is wrong when updating the scale.
In that case, the whole style context needs updating.
2014-08-21 00:54:07 +02:00
Sébastien Wilmet
f39d211021 GtkTextView: various code clean-ups
- only one blank line is enough to separate code sections.
- the 'signals' variable was in the middle of function prototypes.
- compare pointers to NULL in some conditions ("if(blah) should be used
  only if blah is a boolean variable). It makes the code clearer.
- various other things.
2014-08-20 19:19:10 +02:00
Rico Tzschichholz
0c1cbfed53 gtk: Fix transfer annotations gtk_binding_set_new and *_by_class
Those instances are exclusively handled internally and can not be freed.
2014-08-20 16:23:06 +02:00
Jakub Steiner
045380601a Adwaita: selection mode checks
- add missing hover asset
- have enough contrast for the outline
- :active state isn't supported in libgd/apps yet
2014-08-20 09:29:17 +02:00
Jakub Steiner
35f6738509 Adwaita: keep selectmode checks square
- keep the existing 40x40px nominal size
2014-08-20 09:17:42 +02:00
Rico Tzschichholz
4665b95687 gtk: Fix out-param annotation of gtk_theming_engine_get_style_property 2014-08-20 08:55:53 +02:00
Rico Tzschichholz
e317117f03 gtk: Fix return annotation of gtk_selection_data_get_text 2014-08-20 08:54:12 +02:00
Jakub Steiner
bdaf5c8f8b Adwaita: allow window drag on menubars and toolbars
- reported as regression
2014-08-19 19:07:40 +02:00
Jakub Steiner
f9724d1d34 Adwaita: selection mode checkboxes 2014-08-19 19:07:40 +02:00
Paolo Borelli
db3a01b589 GtkApplication: fix annotation of get_menu_by_id
https://bugzilla.gnome.org/show_bug.cgi?id=735034
2014-08-19 18:28:19 +02:00
Jakub Steiner
763f5d51ed Adwaita: don't increase toolbar padding.
https://bugzilla.gnome.org/show_bug.cgi?id=735012
2014-08-19 17:24:52 +02:00
Rico Tzschichholz
0ef0b9872e gtk: Fix broken docs of GtkTranslateFunc 2014-08-18 14:38:04 +02:00
Jakub Steiner
aec4829d74 Adwaita: have an unchecked state for radio/checks in menus
more background in https://bugzilla.gnome.org/show_bug.cgi?id=734290
2014-08-18 14:20:15 +02:00
Matthias Clasen
c9da8bf2b3 Revert "docs: Fix broken gtk-doc formatting"
This reverts commit a7562dd38f.

I prefer to not confuse gtk-doc with doc comments for private
functions.
2014-08-18 08:18:02 -04:00
Rico Tzschichholz
a7562dd38f docs: Fix broken gtk-doc formatting
Fixes broken introspection of GtkTranslateFunc
2014-08-18 13:27:05 +02:00
Jakub Steiner
9c4af41a59 Adwaita: update the last cases for :checked
- treeviews can now have the same default checkboxes and radios
- only menus are special (but needed :active -> :checked)

https://bugzilla.gnome.org/show_bug.cgi?id=733967
https://bugzilla.gnome.org/show_bug.cgi?id=734290
2014-08-18 10:52:52 +02:00
Benjamin Otte
b520d3b7fb button: Remove unnecessary queue_redraw() calls
Setting a state automatically triggers redraws via the CSS machinery.
2014-08-17 06:47:17 +02:00
Benjamin Otte
442353fa9d checkbutton: Fix redraw issues
This is a hack to get around the optimizations done by the CSS engine.

The CSS engine will notice that no CSS properties changed on the
widget itself when going from one state to another and not queue
a redraw.
And the reason for no properties changing will be that only the
checkmark itself changes, but that is hidden behind a
gtk_style_context_save()/_restore() pair, so it won't be caught.
2014-08-17 06:25:29 +02:00
Matthias Clasen
d83e684b1f Silence compiler warnings 2014-08-16 21:40:40 -04:00
Matthias Clasen
d206d694fd GtkWidget: fix up docs minimally 2014-08-16 21:40:39 -04:00
Matthias Clasen
87ad4ec2c2 GtkListBox: fix up docs 2014-08-16 21:40:39 -04:00
Matthias Clasen
7bec0939a8 Clean up and unify docs and formatting 2014-08-16 21:40:39 -04:00
Benjamin Otte
d36bba293d checkbutton: Don't redundantly update states
States are set properly by GtkButton, there is no need to set them
manually.
2014-08-17 03:19:59 +02:00
Benjamin Otte
c1a063e1a4 checkbutton: Draw background unconditionally
We want to draw backgrounds always, not just on prelight. Themes can
decide to only set a background during prelight themselves.
2014-08-17 00:58:04 +02:00
Benjamin Otte
9adf0bf323 stylecontext: Update docs to reflect theming engines being gone 2014-08-16 19:39:45 +02:00
Benjamin Otte
b59e6f1948 themingengine: Deprecate 2014-08-16 19:39:44 +02:00
Benjamin Otte
9ca04c0f9d themingengine: Remove now unused private API 2014-08-16 19:39:44 +02:00
Benjamin Otte
9e4fc66e9a themingengine: Transition code towards StyleContext
We want to get rid of theming engines, so stop using them as much as
possible.
2014-08-16 19:39:44 +02:00
Benjamin Otte
1a143cd272 borderimage: Use style context as argument
... not the theming engine.
2014-08-16 19:39:44 +02:00
Benjamin Otte
04bf3d1e1f roundedbox: Remove functions that take a GtkThemingEngine
Instead, make the functions use a GtkStyleContext argument.
2014-08-16 19:39:44 +02:00
Benjamin Otte
5e8d3d533f themingbackground: Remove initializer that takes a GtkThemingEngine
With the unification to use style contexts everywhere, make that
initializer the only one to use.

Also rename it appropriately.
2014-08-16 19:39:44 +02:00
Benjamin Otte
7e5b58c727 stylecontext: Move private a11y function to private header 2014-08-16 19:39:44 +02:00
Benjamin Otte
eecbe5416e togglebutton: Remove unneeded code
The state is completely handled by gtkbutton.c so no need to do anything
in the togglebutton.
2014-08-16 16:34:16 +02:00
Benjamin Otte
1febbdb499 togglebutton: Don't duplicate button code
It's the same code, so no need to write the same vfunc twice.
2014-08-16 16:34:15 +02:00
Benjamin Otte
0f7c90ac62 radiobutton: :hover on hover
No special cases, those go in the theme.
2014-08-16 16:34:15 +02:00
Benjamin Otte
db1ab7ddf8 button: Handle :inconsistent in GtkToggleButton 2014-08-16 16:34:15 +02:00
Benjamin Otte
cd349dcd48 button: Handle :checked in gtktogglebutton.c
Don't try to handle it elsewhere.
2014-08-16 16:34:15 +02:00
Benjamin Otte
65cc3630c8 widget: Add checks for setting state flags
This is more for GTK developers to catch when they forgot to change
GTK_STATE_FLAGS_BITS after adding a new state flag than to prevent
widget developers from using the wrong flags.
2014-08-16 16:34:15 +02:00
Benjamin Otte
e5d0d5f9e6 themingengine: Remove hack to draw backgrounds instead of checks
This was a hack we added in early 3.x to allow themes to customize their
checkmarks.
Now that we want to properly support real backgrounds everywhere,
supporting this feature would cause double draws of backgrounds.
2014-08-16 16:34:15 +02:00
Benjamin Otte
97a6e692ce stylecontext: Update docs for gtk_render_activity() 2014-08-16 16:34:15 +02:00
Benjamin Otte
6c06bd55da gtk: Don't use gtk_render_activity()
... in places where we draw a background. This was changed for GTK 3.0.0
to allow animations, but these days it doesn't make sense anymore to use
gtk_render_activity() for backgrounds.
2014-08-16 16:34:14 +02:00
Benjamin Otte
b675a13233 button: Remove depressed_on_activate
All buttons should always be marked as :active when they are pressed.
That includes checkboxes (which are never activated in real code anyway,
so this change pretty much doesn't matter).
2014-08-16 16:34:14 +02:00
Benjamin Otte
1abe923740 css: Do inconsistent checked states right
In HTML5, both pseudoclasses apply. So we do the same thing in our
widgets.

https://bugzilla.gnome.org/show_bug.cgi?id=733967
2014-08-16 16:34:14 +02:00
Benjamin Otte
bb069b781b button: Remove depressed variable
It is not used anymore.
2014-08-16 16:34:14 +02:00
Benjamin Otte
e9f1d6d85c button: Don't honor child-displacement anymore
It doesn't make sense to support child displacement in a world where
pseudoclasses behave different from the actual displacement states.
Nobody would ever understand why a widget is displaced.

It is easily possible to simulate child displacement by using padding
CSS properties.
2014-08-16 16:34:14 +02:00
Benjamin Otte
4e077d4638 gtk: Use new :checked state
on:
- GtkToggleButton
- GtkCheckButton
- GtkRadioButton
- GtkModelButton
- GtkCellRendererToggle
- GtkCheckMenuItem

also update themes:
- Adwaita
- Raleigh
but not the win32 theme.

The new :checked state replaces :active for the actual checkedness of
the widgets and :active is now used exclusively while the button is being
pressed.

https://bugzilla.gnome.org/show_bug.cgi?id=733967
2014-08-16 16:34:14 +02:00
Benjamin Otte
36a2e7ca8e css: Add a :checked pseudoclass
https://bugzilla.gnome.org/show_bug.cgi?id=733967
2014-08-16 16:34:14 +02:00
Sébastien Wilmet
3f4b9d8164 Replace uses of g_memmove() by memmove()
g_memmove() is deprecated, it is a simple macro that just calls
memmove() with the same parameters.

Reviewed by Paolo Borelli on IRC.
2014-08-16 15:50:17 +02:00
Matthias Clasen
0f9fc277c2 GtkFontChooser: Prevent font fallback in the preview
We don't want to preview the fallback fonts, after all.
https://bugzilla.gnome.org/show_bug.cgi?id=570414
2014-08-15 17:29:34 -04:00
Matthias Clasen
59fc2f0ac1 GtkFontButton: Avoid criticals
The font_family and font_face members may be NULL, and we
shouldn't cause critical warnings in that case.
2014-08-15 15:15:45 -04:00
Matthias Clasen
1815790bd3 GtkFontButton: Limit the decimals shown for size
It doesn't make sense to show a font size with 6 digits. Use
the same formatting we use in the font chooser widget now.

https://bugzilla.gnome.org/show_bug.cgi?id=724996
2014-08-15 15:09:45 -04:00
Matthias Clasen
a8ed0dd4ee GtkFontChooserWidget: Allow fractional font sizes
With this change, we let users enter up to 2 decimals in the entry,
to specify font sizes exactly. The slider still rounds to whole
numbers.

https://bugzilla.gnome.org/show_bug.cgi?id=665711
2014-08-15 14:57:31 -04:00
Matthias Clasen
e23f7c13b0 GtkFontButton: Use the same font name as the font chooser
The font chooser constructs the display name for the font from
the family and face names. Do the same in the font button, so
we don't end up calling the same font by different names, which
would be confusing.
2014-08-15 14:15:23 -04:00
Behdad Esfahbod
dd6c2391d2 GtkFontChooserWidget: Use a better display name for the font
Instead of reconstructing a display name from the
PangoFontDescription, use the font family and face
objects, which have the original font. This lets us
get the names of fonts like Noto Sans CJK DemiLight
right, which would be shown as Noto Sans CJK SemiLight
when mangled via PangoFontDescription, since Pango
treats 'DemiLight' as an alias for the SemiLight weight.

https://bugzilla.gnome.org/show_bug.cgi?id=733832
2014-08-15 14:12:10 -04:00
Matthias Clasen
e0af2ba7c7 GtkGestureSingle: Update declared defaults of properties
These should match the initial values, which were changed a
few commits ago. The defaultvalue test fails if there is a
mismatch, like here.
2014-08-15 13:12:15 -04:00
Matthias Clasen
cab7dcde1b Deprecate GtkStatusIcon
GtkStatusIcon is using a problematic, XEmbed-based protocol under X,
and we want to get rid of it eventually. Document our intentions by
marking GtkStatusIcon as deprecated.

https://bugzilla.gnome.org/show_bug.cgi?id=734826
2014-08-15 13:02:31 -04:00
Rico Tzschichholz
62254ca306 util/extract-strings: Use autotools syntax for building
Always refer to it as "extract-strings$(EXEEXT)" where needed to take
cross-compilation into account.

https://bugzilla.gnome.org/show_bug.cgi?id=731013
2014-08-15 12:09:54 -04:00
Rico Tzschichholz
f4a29fbfc2 Revert "Bug 731013 - cross-compilation broken when building extract-strings"
This reverts commit 651d9e90e7.

The commit broke 'make dist' - the extract-strings sources are no
longer included in the tarball.
2014-08-15 12:09:44 -04:00
Ryan Lortie
49ccb23743 GtkMenuItemAccessible: use "insert" signal
Use the "insert" rather than the "add" signal to reliably detect
additions of menu items.

https://bugzilla.gnome.org/show_bug.cgi?id=372545
2014-08-15 10:29:48 -04:00
Carlos Garnacho
91afc0ea4f treeview: Make multipress gesture accept all buttons
That gesture is meant to handle clicks on multiple buttons, so unset
the GDK_BUTTON_PRIMARY default. Also, remove unnecessary boilerplate
with the new GtkGestureSingle/GtkEventController defaults.

https://bugzilla.gnome.org/show_bug.cgi?id=734285
2014-08-15 13:53:40 +02:00
Carlos Garnacho
c5839708cc textview: Make multipress gesture accept all buttons
That gesture is meant to handle clicks on multiple buttons, so unset
the GDK_BUTTON_PRIMARY default. Also, remove unnecessary boilerplate
with the new GtkGestureSingle/GtkEventController defaults.

https://bugzilla.gnome.org/show_bug.cgi?id=734285
2014-08-15 13:53:40 +02:00
Carlos Garnacho
af5a03c841 range: Make multipress gesture accept all buttons
That gesture is meant to handle clicks from several buttons, so unset
the new GDK_BUTTON_PRIMARY default. Also, remove unnecessary boilerplate
with the new default values.

https://bugzilla.gnome.org/show_bug.cgi?id=734285
2014-08-15 13:53:40 +02:00
Carlos Garnacho
c17d3ee8fe window: Set GtkGestureSingle::button to 0 on multipress gesture
This gesture handles events from multiple buttons, so ensure the
gesture still does so after the default value change.

https://bugzilla.gnome.org/show_bug.cgi?id=734285
2014-08-15 13:53:40 +02:00
Carlos Garnacho
e3a281be13 scrolledwindow: Make kinetic scrolling only work on touch devices
This code was relying on the previous GtkGestureSingle::touch-only default
value, so restore the behavior back.

https://bugzilla.gnome.org/show_bug.cgi?id=734285
2014-08-15 13:53:40 +02:00
Carlos Garnacho
b7412a1d9b spinbutton: Make the swipe gesture only work on touch devices
This code was relying on the previous GtkGestureSingle::touch-only default
value.

https://bugzilla.gnome.org/show_bug.cgi?id=734285
2014-08-15 13:53:39 +02:00
Carlos Garnacho
261bbd8d8e label: Update to new GtkGestureSingle/GtkEventController defaults
GtkGestureSingle::button is set to 0 on the multipress gesture, as several
buttons are managed by that gesture. Also avoid some extra lines of code
setting what nowadays are default values.

https://bugzilla.gnome.org/show_bug.cgi?id=734285
2014-08-15 13:53:39 +02:00
Carlos Garnacho
0c2da16c0e entry: Update to new GtkGestureSingle/GtkEventController defaults
GtkGestureSingle::button is set to 0 on the drag/multipress gestures, as several
buttons are managed by these gestures. Also, avoid some extra lines of code
setting what nowadays are default values.

https://bugzilla.gnome.org/show_bug.cgi?id=734285
2014-08-15 13:53:39 +02:00
Carlos Garnacho
8ca205af5d dnd: Set explicitly GtkGestureSingle::button to 0 on the drag gesture
This gesture handles drags done with any button, so unset the current button=1
default.

https://bugzilla.gnome.org/show_bug.cgi?id=734285
2014-08-15 13:53:39 +02:00
Carlos Garnacho
1c23ab5a7e colorswatch: Update to new GtkGestureSingle/GtkEventController defaults
GtkGestureSingle::button is set to 0 on the multipress gesture, as several
buttons are managed by that gesture. Also avoid some extra lines of code
setting what nowadays are default values.

https://bugzilla.gnome.org/show_bug.cgi?id=734285
2014-08-15 13:49:40 +02:00
Carlos Garnacho
9e89640b0b colorplane: Update to new GtkGestureSingle/GtkEventController defaults
GtkGestureSingle::button is set to 0, as multiple buttons are managed by
the same gesture. Also avoid some extra lines of code setting what nowadays
are default values.

https://bugzilla.gnome.org/show_bug.cgi?id=734285
2014-08-15 13:49:39 +02:00
Carlos Garnacho
9ad4f1e62c gesturesingle: Change default values of button and touch-only properties
This now defaults to sane values on mice, so touch-only is set to FALSE,
and button is set to GDK_BUTTON_PRIMARY;

https://bugzilla.gnome.org/show_bug.cgi?id=734285
2014-08-15 13:49:39 +02:00
Carlos Garnacho
131123c71a window: Set multipress gesture phase to be GTK_PHASE_NONE explicitly
This used to rely on the default value, which has changed to a saner default.

https://bugzilla.gnome.org/show_bug.cgi?id=734285
2014-08-15 13:49:39 +02:00
Carlos Garnacho
dd9166c435 dnd: Set drag gesture propagation phase to GTK_PHASE_NONE explicitly
This used to rely on the default phase value.

https://bugzilla.gnome.org/show_bug.cgi?id=734285
2014-08-15 13:49:39 +02:00
Carlos Garnacho
a050b017ed eventcontroller: Default to GTK_PHASE_BUBBLE
This is in practice the most common value, so make that the default

https://bugzilla.gnome.org/show_bug.cgi?id=734285
2014-08-15 13:49:39 +02:00
Phillip Wood
e853007cd0 Statusbar: Remove matching messages before popping
gtk_statusbar_remove_all() was popping the top message if its
context_id matched before removing other matching messages from the
stack. This meant that if the context_id of the second top message
matched it was still displayed when the top message was popped and
then removed from the list of messages without updating the display.
Fix this by removing all the matching messages below the top one
before popping it if it matches.

https://bugzilla.gnome.org/show_bug.cgi?id=724281
2014-08-14 19:52:59 +02:00
Timm Bäder
f09573757d GtkListBoxRow: Set clip
https://bugzilla.gnome.org/show_bug.cgi?id=734709
2014-08-14 00:13:18 -04:00
Debarshi Ray
137abd6f70 GtkSpinButton: Prevent public API from unsetting the adjustment
A spin button really needs an adjustment to work. So don't let the
user unset the adjustment by passing NULL to
gtk_spin_button_set_adjustment.

https://bugzilla.gnome.org/show_bug.cgi?id=734660
2014-08-13 23:42:11 -04:00
Debarshi Ray
1e304e6deb GtkSpinButton: Always emit value-changed when the adjustment is changed
Changing adjustment via the property setter would not emit
value-changed, however changing it via gtk_spin_button_configure would.

This inconsistency had the following side-effects:

  - Setting an adjustment with a different value would not update the
    value shown by the spin button.

  - Creating a spin button like this (common in GtkBuilder XML) will
    not show the initial value:
      g_object_new (GTK_TYPE_SPIN_BUTTON, "adjustment", adj, NULL);

Let's use the same code path (ie. gtk_spin_button_configure) for all
public facing API for setting adjustment. The code that handled the
details of swapping out the old adjustment with the new has been split
into an unset_adjustment method and the rest has been folded into
gtk_spin_button_configure.

A spin button really needs an adjustment to work, so we don't need
most of the NULL checks. However we do need to check in
unset_adjustment because setting a new adjustment during object
creation might try to unset a non-existent one.

https://bugzilla.gnome.org/show_bug.cgi?id=734660
2014-08-13 23:42:11 -04:00
Руслан Ижбулатов
a0faf5a51c Fix various warnings
https://bugzilla.gnome.org/show_bug.cgi?id=734737
2014-08-13 23:41:56 +00:00
Руслан Ижбулатов
1b9fa975af Fix some print format warnings
https://bugzilla.gnome.org/show_bug.cgi?id=734736
2014-08-13 23:40:59 +00:00
Руслан Ижбулатов
694c8d32d5 Fix various warnings about unused things
https://bugzilla.gnome.org/show_bug.cgi?id=734735
2014-08-13 23:38:47 +00:00
Jehan
4376b4f705 Fix the build of the native gtk-update-icon-cache when cross-compiling.
As a noinst_PROGRAMS, the libtool generated for cross-compiling will be
used, which will mess up the linking. Create a all-local target instead.
Also ensure that building uses always a native version of the tool by
specifying a GTK_UPDATE_ICON_CACHE automake variable.
Finally "config.h" has been created to work for the target platform and
causes problem when cross-compiling. So we temporarily generate a basic
config.h which contains only the strict minimum.
2014-08-13 21:06:51 +00:00
Jehan
651d9e90e7 Bug 731013 - cross-compilation broken when building extract-strings
It is actually a bad idea to use noinst_PROGRAMS for build tools,
because it adds a $(EXEEXT). It is best to override the all target
with all-local to trigger the tool build.
2014-08-13 21:03:51 +00:00
Yosef Or Boczko
40b50083ee places-sidebar: Refine the spacing
Based on a patch by Yosef Or Boczko,
https://bugzilla.gnome.org/show_bug.cgi?id=731443
2014-08-13 14:34:57 -04:00
Lapo Calamandrei
f561ee34d2 Adwaita: check/radio icon source override fix 2014-08-13 18:44:17 +02:00
Lapo Calamandrei
c7d8edd4ca Adwaita: app-notification revert erroneusly committed changes 2014-08-13 17:28:55 +02:00
Benjamin Otte
ce2f621302 Adwaita: Use -gtk-icon-source for checkmarks
instead of using background-image
2014-08-13 16:51:16 +02:00
Benjamin Otte
dff52f7a04 css: Match state in siblings properly
Previously, we always returned the state flags of the original widget
and did not consider the siblings' pseudoclasses.

Testcase is attached.
2014-08-13 16:51:16 +02:00
Benjamin Otte
b276b6198f widgetpath: Use CSS-like syntax in to_string()
Print pseudo-classes using ':' sign.
2014-08-13 16:51:16 +02:00
Lapo Calamandrei
de19fa4bb3 Adwaita: path-bar home button spacing 2014-08-13 16:41:36 +02:00
Lapo Calamandrei
cf7a5401b2 Adwaita: saner backdrop switch for the dark variant 2014-08-13 16:36:15 +02:00
Lapo Calamandrei
913d6c8061 Adwaita: saner menubar 2014-08-13 16:19:32 +02:00
Matthias Clasen
f72bcc5c01 GtkPathBar: Don't hardcode spacing in buttons
The theme will be changed to provide padding.
2014-08-13 09:31:34 -04:00
Matthias Clasen
9ce968ffb2 GtkPathBar: Make recoloring symbolics work
We were only recreating the icons the very first time the theme
changed, and not every time as was intended.
2014-08-13 09:29:40 -04:00
Matthias Clasen
7d55355d4d GtkTextView: Preserve the cairo context around draw_layer
Otherwise, draw_layer might unintentionally wreak havoc on the
regular drawing that happens between the two draw_layer calls.
2014-08-13 09:18:08 -04:00
Matthias Clasen
7450277708 GtkTextView: Change draw_layer signature
Vfuncs should really take 'this' of the right type - the type
that the vfunc is added in.
2014-08-13 09:18:08 -04:00
Lapo Calamandrei
fc09560d13 Adwaita: widget edge for inline toolbars 2014-08-13 14:27:31 +02:00
Alexander Larsson
afeb50009d Change way alpha is used when recoloring symbolics
If the foreground color has an alpha != 1 we used to just pass that into
the svg. This is useful to e.g. render an insensitive icon. However,
that is not an ideal model for symbolics. For instance, if the icon uses
overlapping areas when drawing, expecting these to be opaque then the
transparent color will result in a different alpha value for the overlapping
area. Also, non-foreground symbolic colors are still rendered opaque, and
the recoloring of pngs can't handle transparent colors.

So, instead we extract any alpha from the foreground, render using the
opaque colors and then apply the foreground alpha to the entire result.
This means we get an even transparency, even for other colors, and we
can apply alpha for the pngs too.

https://bugzilla.gnome.org/show_bug.cgi?id=734668
2014-08-12 15:51:36 +02:00
Alexander Larsson
928822f1a5 GtkIconHelper: Short circuit _gtk_icon_helper_get_size in some cases
_gtk_icon_helper_get_size() is often used during size request and may
not necessary mean that the icon will be displayed immediately. In
many common cases we know the size without having to ensure a surface.
In many cases this means we can avoid loading an icon until needed, and
in the case of stateless IconHelpers such as GtkCellRendererPixbuf this
is very important as otherwise it will constantly be reloading icons
if the displayed set is larger than the in-memory icon cache.

https://bugzilla.gnome.org/show_bug.cgi?id=734651
2014-08-12 15:47:42 +02:00
Carlos Garnacho
8ff47570af stack: Ensure the bin window has an evmask suitable to windowless children
If a child has set_has_window == FALSE, it purely relies on the events set on
the parent window, for which the bin window used to just ensure the exposure
mask, eating all input events.

https://bugzilla.gnome.org/show_bug.cgi?id=734357
2014-08-12 14:28:34 +02:00
Carlos Garnacho
62507776fe widget: Include event controllers' event mask on gtk_widget_get_events()
gtk_widget_get_events() must indeed tell about events enabled purely through
a GtkEventController, those events will most surely trigger event handlers.

https://bugzilla.gnome.org/show_bug.cgi?id=734357
2014-08-12 14:28:34 +02:00
Debarshi Ray
225bb95795 GtkSpinButton: Only notify 'adjustment' if the property changed
https://bugzilla.gnome.org/show_bug.cgi?id=734649
2014-08-12 11:54:29 +02:00
Carlos Garnacho
b56f5cec3e treeview: Check the selected node active flag before maybe starting rubberband
This check used to be present in the pre-gestures code, but was unintentionally
removed when splitting code into drag/multiclick gestures. The policy used to
be that if clicking happened on an already selected node, DnD would happen
instead of rubberband selection, so this behavior is resuscitated.

https://bugzilla.gnome.org/show_bug.cgi?id=734143
2014-08-11 18:09:16 +02:00
Matthias Clasen
cb60da5f6b GtkToolbar: Set clip
This allows outset box shadows to work on toolbars.

https://bugzilla.gnome.org/show_bug.cgi?id=734526
2014-08-10 07:53:59 -04:00
Matthias Clasen
327b097725 Trivial: Use g_clear_object more
It no longer has atomic overhead, so we can use it everywhere.
2014-08-09 10:16:27 +02:00
Lapo Calamandrei
9c7e31fc1c Adwaita: GtkSwitch size reduction and tweaks
See https://bugzilla.gnome.org/show_bug.cgi?id=734485
2014-08-08 23:36:55 +02:00
Nikita Churaev
684b981fb5 Only show title button separator when there is something to separate
https://bugzilla.gnome.org/show_bug.cgi?id=729636
2014-08-08 23:02:14 +02:00
Matthias Clasen
1a11515118 Revert "Adwaita: comment out the header-bar separator"
This reverts commit b4e7ada6ac.
2014-08-08 22:35:48 +02:00
Lapo Calamandrei
f1a9273844 Adwaita: pushed button shadows tweakings 2014-08-08 10:11:11 +02:00
Руслан Ижбулатов
3b916e4405 Handle ERROR_SXS_PROCESS_DEFAULT_ALREADY_SET
https://bugzilla.gnome.org/show_bug.cgi?id=733773
2014-08-07 15:55:27 +00:00
Lapo Calamandrei
a13761ceb4 Adwaita: progressbar background in scale highlight 2014-08-07 14:17:50 +02:00
Руслан Ижбулатов
ae149285ea Add missing include to gtk-win32.rc
Otherwise ISOLATIONAWARE_MANIFEST_RESOURCE_ID and RT_MANIFEST constants
can't be expanded.

https://bugzilla.gnome.org/show_bug.cgi?id=733773
2014-08-06 15:38:14 +00:00
Ray Strode
08b17ab344 drag: add missing introspection annotations
gtk_gesture_drag_get_start_point and gtk_gesture_drag_get_offset
have out args that need to be annotated.

This commit adds the (out) and (nullable) annotations as appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=734292
2014-08-06 10:14:47 -04:00
Lapo Calamandrei
b4e7ada6ac Adwaita: comment out the header-bar separator 2014-08-06 13:33:17 +02:00
Lapo Calamandrei
f8c1a4fed8 Adwaita: linked logic surgery 2014-08-06 13:20:45 +02:00
Lapo Calamandrei
cfff562069 Adwaita: linked combos 2014-08-06 12:23:47 +02:00
Chun-wei Fan
7a3bc9a5ff gtk/gtkprintoperation-win32.c: Fix Missed Include
We need to include gtkprivate.h for _gtk_load_dll_with_libgtk3_manifest().
2014-08-06 12:55:09 +08:00
Руслан Ижбулатов
0d02cc8203 Make sure native W32 print dialog uses visual styles
For that to happen the libgtk3 is embedded with a manifest that requests
common controls library 6.x, and GTK lazily calls InitCommonControlsEx()
to initialize those. Then this manifest is used to temporarily override
the process activation contest when loading comdlg32 (which contains the
code for the print dialog), ensuring that it too depends on common
controls 6.x, even if the application that uses GTK does not.

https://bugzilla.gnome.org/show_bug.cgi?id=733773
2014-08-05 06:41:31 +00:00
Matthias Clasen
f0632d5ced inspector: Add a switch to turn off animations
This may be useful in some places to check that application-specific
animations respect this setting.
2014-08-05 00:03:37 +02:00
Matthias Clasen
5131472984 GtkSwitch: Initialize offset when beginning animation
handle_x always corresponds to the visible position of the handle,
which is where we want to start the animation. Without this, repeated
keyboard activation will not always animate.
2014-08-04 14:36:42 +02:00
Matthias Clasen
1569952d0e GtkSwitch: Update handle_x in size-allocate
Since we are storing positions here that depend on the allocation,
we need to update them in size-allocate. This fixes incorrect
positioning of the handle if the switch is active initially.

https://bugzilla.gnome.org/show_bug.cgi?id=734213
2014-08-04 14:36:42 +02:00
Matthias Clasen
2e85046b8f GtkSwitch: Don't store dest_offset
Instead, calculate it on the spot in the tick callback, and
update handle_x in gtk_switch_set_active, based on the new
active property.
2014-08-04 14:36:42 +02:00
Matthias Clasen
d4bd9e9c46 GtkSwitch: End animations on finalize
Handle the unlikely case that a switch gets finalized while its
toggle animation is running.
2014-08-04 14:36:42 +02:00
Matthias Clasen
007ba3bc14 GtkSwitch: End animation in set_active
End any running toggle animation before setting the set,
otherwise things get confused.
2014-08-04 14:36:42 +02:00