Commit Graph

37644 Commits

Author SHA1 Message Date
Carlos Garnacho
8e5982ca9d gdkwindow: ignore shape on client-side windows when recomputing visible regions
Rendering doesn't do much about clipping drawing operations to the window shape,
although invalidation applies the shape to every window, leaving possibly trails
of "overrendered" content. So ensure the shape portions get invalidated too when
the window is moved/resized.

https://bugzilla.gnome.org/show_bug.cgi?id=729095
2014-04-28 22:44:59 +02:00
Carlos Garnacho
5b72e0f8cf popover: Always make room for the tail on all sides on size request
Now that popovers may snap to any side with enough space, make enough
room on every side when requesting size, so that there's no w/h differences
at the time of setting the child allocation.

https://bugzilla.gnome.org/show_bug.cgi?id=729097
2014-04-28 22:35:32 +02:00
Juan Pablo Ugarte
d1467c191d GtkRecentChooserMenu: Set current uri before activating an item.
When activating an item using mnemonics GtkRecentChooserMenu does not select a
item before calling the item-activated signal thus
gtk_recent_chooser_get_current_uri() always return the last selected item
instead of the activated one.

Fixes Bug 495105 "Open recent file keyboard shortcuts do not work correctly"
2014-04-28 17:08:12 -03:00
Matthias Clasen
2dcf6c6b71 Raleigh: fix a typo 2014-04-28 15:39:21 -04:00
Matthias Clasen
0af4b71cd1 GtkDialog: protect against show_all
The real reason for the problem that the just reverted change
was supposed to address is that testfilechooser uses show_all
to tease out places where composite dialogs don't properly
protect their internals against unintended showing. Well,
lets do that, then.
2014-04-28 15:39:21 -04:00
Matthias Clasen
26d6eadab7 Revert "GtkFileChooserDialog: Avoid a bottom border in the dialog"
This reverts commit d871105fa8.
2014-04-28 15:39:21 -04:00
Matej Urbančič
ca4a917562 Updated Slovenian translation 2014-04-28 21:09:16 +02:00
Matej Urbančič
1c04d7db8f Updated Slovenian translation 2014-04-28 21:07:38 +02:00
Matthias Clasen
6c3936fb9a Document iconic section support
https://bugzilla.gnome.org/show_bug.cgi?id=727477
2014-04-28 14:21:07 -04:00
Matthias Clasen
7fa1133912 Add an example of iconic rendering
testpopover now shows several examples of icon buttons.

https://bugzilla.gnome.org/show_bug.cgi?id=727477
2014-04-28 14:20:27 -04:00
Matthias Clasen
28a567f5a9 GtkMenuSectionBox: add support for iconic sections
Sections that have the display-hint attribute set to
"horizontal-boxes" will be rendered as a row of icon
buttons, instead of menuitem-like.
2014-04-28 14:20:26 -04:00
Matthias Clasen
8fff8acbac GtkMenuTrackerItem: Add support for display-hint
This commit adds a getter for the display-hint attribute.
2014-04-28 14:20:26 -04:00
Matthias Clasen
6429b33f44 GtkModelButton: Add an iconic mode
In iconic mode, model buttons will be styled like regular icon
buttons, preferring to show only the icon if one is set, falling
back to showing the label.

https://bugzilla.gnome.org/show_bug.cgi?id=727477
2014-04-28 14:20:15 -04:00
Matthias Clasen
038de02574 GtkMenuTrackerItem: Add support for verb-icons
When rendering iconic sections, we want to use icons for verbs,
and we want to differentiate these in the menu model, to keep
the icon attribute reserved for nouns.

https://bugzilla.gnome.org/show_bug.cgi?id=727477
2014-04-28 14:14:43 -04:00
Ryan Lortie
5137e491dc GtkPopover: new approach to menu model binding
Instead of using GtkMenuTracker to flatten the sections into a single
linear menu, handle the sections ourselves by nesting boxes.

Each section gets an inner and outer box.  The inner box numbers its
children in the way that the tracker instructs.  The outer box
containes the inner box and the separator, if appropriate.

Having the two separate boxes will allow us to change the orientation of
the inner box if we want to pack widgets horizontally within a section.
2014-04-28 14:14:42 -04:00
Ryan Lortie
d930716daf GtkMenuTracker: add 'merge_sections' flag
Add the possibility of a GtkMenuTracker that performs no section
merging.  Instead, it will report an item in the form of a separator for
subsections.  It is then possible to get a separate tracker for the
subsection contents by using gtk_menu_tracker_new_for_item_link().
2014-04-28 14:14:42 -04:00
Ryan Lortie
f6ee00769a GtkMenuTracker: don't specialise "submenu" link
We have some API in GtkMenuTracker and GtkMenuTrackerItem that is
specifically designed to deal with submenus.

Generalise these APIs to take a 'link_name' parameter that we always
give as G_MENU_SUBMENU for now.  In the future, this will allow creating
trackers for other types of links, such as sections.
2014-04-28 14:14:41 -04:00
Ryan Lortie
48db841822 GtkMenuTracker: make "is-visible" a property
Make this a property just like all of the other things and make the APIs
for accessing it non-private (but add a note that they are not intended
to be used).
2014-04-28 14:14:41 -04:00
Ryan Lortie
06ab1d9203 GtkMenuTracker: remove "visible" property
This is in conflict with the "is-visible" pseudo-property which is about
to be promoted to being an actual property.
2014-04-28 14:14:40 -04:00
Руслан Ижбулатов
5432c37d5a W32: Update the css to match the .modelbutton->.button.menuitem transition 2014-04-28 15:51:51 +00:00
Matthias Clasen
baaf201f2a Rename the modelbutton style class
This is not a great name to use in themes; instead, add the
menuitem class, so themes can use .button.menuitem for styles
that are specific to menuitem-like buttons.
2014-04-27 18:49:27 -04:00
Matthias Clasen
f1b423e60f Add a popover menu example to gtk3-widget-factory 2014-04-27 12:13:35 -04:00
Matthias Clasen
6cd3c73f21 Add a paned example to gtk3-widget-factory 2014-04-27 10:30:10 -04:00
Matthias Clasen
37c9a9aafe Fix testmenubutton
The menu model examples was messing up the order of its items.
2014-04-26 17:49:52 -04:00
Matthias Clasen
987b56973c GtkModelButton: improve size allocation
Only reserve size for an indicator if at least one sibling
actually has an indicator.
2014-04-26 17:48:57 -04:00
Matthias Clasen
a5d2778737 Actually set the default for GtkMenuButton::use-popover
The previous commit changed the property declaration, but
omitted the actual change of the default.
2014-04-26 14:40:52 -04:00
Adel Gadllah
b395929a16 gdkscreen-wayland: Emit monitors-changed when the output scale changes
https://bugzilla.gnome.org/show_bug.cgi?id=729013
2014-04-26 17:32:57 +02:00
Matthias Clasen
b6e724e76f Add Adwaita to the list of default icon themes
Hardcode the fallback to Adwaita. I'm leaving gnome in here for
now, since we're in the middle of the transition. It will be
removed before 3.14.
2014-04-26 10:14:38 -04:00
Juan Pablo Ugarte
f2d488dea1 Fixed crash in GtkLockButton if a button with permission set to NULL is clicked.
https://bugzilla.gnome.org/show_bug.cgi?id=728992
2014-04-25 22:13:56 -04:00
Matthias Clasen
063bd57873 GtkWindow: Avoid a critical in F10 handling
The focus widget might be NULL, and we were forgetting to take
that possibility into account in one place.
2014-04-25 22:12:05 -04:00
Matthias Clasen
45735c5b3c tests: add missing files to EXTRA_DIST
https://bugzilla.gnome.org/show_bug.cgi?id=728846
2014-04-25 22:12:04 -04:00
Matthias Clasen
516f1e1808 Add missing templates to testdialog
This makes the template test cases not crash. The templates also
serve to test the new action widget support.

https://bugzilla.gnome.org/show_bug.cgi?id=728846
2014-04-25 22:11:54 -04:00
Matthias Clasen
66b6078ae2 GtkDialog: Update suggested-action more carefully
We were not really handling all cases correctly here. We want
the suggested-action style class to only be set on headerbar
buttons, and it should be set on the default widget. Ensure
this by syncing the suggested-action style class with the
default style class. As a side-effect, setting has-default
on an action widget in ui files will now have the expected
effect.

https://bugzilla.gnome.org/show_bug.cgi?id=728846
2014-04-25 22:11:53 -04:00
Matthias Clasen
90559a3fc5 GtkDialog: Support adding action widgets in ui files
GtkDialog has convenience API for adding action widgets that are
either placed in the action area or the headerbar. This commit
makes the same functionality available from GtkBuilder ui files
by specifying "action" as the child type.

https://bugzilla.gnome.org/show_bug.cgi?id=728846
2014-04-25 22:11:38 -04:00
Antoine Jacoutot
8935d2f123 openbsd: properly set len for gtkmountoperation-x11
sysctl(3) is the correct way to get the lenght for len in this case.
Also drop unused headers and change style to match the rest of the file.
2014-04-25 14:37:59 +02:00
Matthias Clasen
fab2173b31 GtkMenuButton: use popovers by default
When constructing from a menu model, use popovers by default.
This change has the potential to cause some size problems for
applications with big gear menus, so we're doing it early in
the cycle to uncover and fix those.
2014-04-24 23:35:18 -04:00
Marc-André Lureau
4480bf382a gdk/win32: VK_SNAPSHOT maps to GDK_Print
Also, I am not sure the above VK_PRINT -> GDK_Print mapping is
correct, but it doesn't hurt yet.

https://bugzilla.gnome.org/show_bug.cgi?id=686170
2014-04-24 16:31:09 +02:00
Marc-André Lureau
2230fea0b6 win32: add more clipboard data checks to avoid crash
It may happen that the received clipboard data is empty, but
if it's of type image/bmp, gtk+ will crash:

gdk_property_change: 00030AD4 GDK_SELECTION image/bmp REPLACE 8*0 bits:
... delayed rendering
gdk_selection_send_notify_for_display: 00030AD4 CLIPBOARD image/bmp
GDK_SELECTION (no-op)
_gdk_win32_selection_convert_to_dib: 1252003C image/bmp

Program received signal SIGSEGV, Segmentation fault.
0x749a9f40 in msvcrt!memmove () from C:\Windows\syswow64\msvcrt.dll

Thread 1 (Thread 2248.0x1b34):
target=0xc07b) at gdkselection-win32.c:1292
at gdkevents-win32.c:3498
wparam=8, lparam=0) at gdkevents-win32.c:232
message=773, wparam=8, lparam=0)
    at gdkevents-win32.c:263
C:\Windows\syswow64\user32.dll
C:\Users\rugoosse\AppData\Local\virt-viewer\bin\libpangocairo-1.0-0.dll
wparam=0, lparam=-1687549457)
    at gdkevents-win32.c:248
C:\Users\rugoosse\AppData\Local\virt-viewer\bin\libpangocairo-1.0-0.dll

https://bugzilla.gnome.org/show_bug.cgi?id=728745
2014-04-24 16:12:07 +02:00
Руслан Ижбулатов
37aa840e89 W32: Add modelbutton styles
According to what i've been told, modelbuttons are supposed to look
flat, like menu items.

This is basically an improved copy of the menuitem styles.

https://bugzilla.gnome.org/show_bug.cgi?id=728810
2014-04-24 03:35:50 +00:00
Руслан Ижбулатов
1bcd7c40bd W32: Add a set of "focused" styles to checkmarks
This prevents checkmarks in modelbuttons from being styled as buttons
(apparently, modelbuttons apply "focused" to their children, unlike
normal buttons).

https://bugzilla.gnome.org/show_bug.cgi?id=728808
2014-04-24 03:35:50 +00:00
Руслан Ижбулатов
5309149f75 W32: Fix dummy prelight style for check/radio buttons
Use a dummy transparent gradient instead of actual color (which screws up
focus rectangle on prelight), and apply to non-prelight state as well.

https://bugzilla.gnome.org/show_bug.cgi?id=728807
2014-04-24 03:35:49 +00:00
Руслан Ижбулатов
f4b61e92f6 W32: remove the blue "selected" rectangle when activating a checkbutton
https://bugzilla.gnome.org/show_bug.cgi?id=728806
2014-04-24 03:35:49 +00:00
Matthias Clasen
93177f7bf0 Add all version macros to the docs 2014-04-23 23:25:30 -04:00
Matthias Clasen
ea61bdf1a0 Add GDK_VERSION_3_14
https://bugzilla.gnome.org/show_bug.cgi?id=728814
2014-04-23 23:25:07 -04:00
Yosef Or Boczko
60f49c097a Updated Hebrew translation 2014-04-23 12:50:51 +03:00
Matthias Clasen
6e5191f6b6 dialog: keep action area stretched out
Adding an extra box in between had the side effect of
making the action area no longer go all across the dialog.
Setting hexpand compensates for this.
2014-04-23 00:05:15 -04:00
Carlos Garnacho
1a2a5a44bd wayland: handle the wl_touch interface
The events are routed through a new slave device with type
GDK_SOURCE_TOUCHSCREEN, minimal tracking of touches is done
to keep the state for each of those.

https://bugzilla.gnome.org/show_bug.cgi?id=728426
2014-04-22 23:54:43 -04:00
Carlos Garnacho
af8d6e6549 wayland: Separate master devices from seat capabilities
The master pointer/keyboard pair should never disappear or be
inconsistent. The seat capabilities are now reflected through
slave devices, those may come and go freely as the seat
capabilities change. This also enables adding further capabilities
to handle eg. touch.

https://bugzilla.gnome.org/show_bug.cgi?id=728426
2014-04-22 23:50:55 -04:00
Matthias Clasen
aab1610d40 DND: go back to a timeout for cancel animation
Using a tick callback does not really make sense here, since we
are not drawing in a window, but moving a toplevel around.
https://bugzilla.gnome.org/show_bug.cgi?id=728183
2014-04-22 23:45:59 -04:00
Matthias Clasen
d871105fa8 GtkFileChooserDialog: Avoid a bottom border in the dialog
We recently started to respect border-width on the action_area
again, so set its border-width to 0 so it doesn't get in the way.

https://bugzilla.gnome.org/show_bug.cgi?id=722211
2014-04-22 23:10:01 -04:00