Commit Graph

41465 Commits

Author SHA1 Message Date
Matthias Clasen
a7cf67f201 Formatting fixes 2014-12-23 18:54:11 -05:00
Matthias Clasen
79ada68f8c Formatting fixes 2014-12-23 14:30:10 -05:00
Matthias Clasen
0a54ad1187 GtkRecentManager: Formatting fixes 2014-12-23 14:30:10 -05:00
Stas Solovey
ea9f5e2273 Updated Russian translation 2014-12-23 14:09:52 +00:00
Carlos Garnacho
96f7c11f48 window: Use subsurfaces for popovers on wayland
On the wayland backend, set up GDK_WINDOW_SUBSURFACE windows
for popovers. In the popover code, the popover-relative-to-parent
calculation had to be tweaked, and it's been made to always prefer
the given popover position, since there's no sizing limitations.

https://bugzilla.gnome.org/show_bug.cgi?id=738891
2014-12-23 13:55:24 +01:00
Patrick Welche
5e9bf518a3 GtkApplicationWindow: Documentation fix
gtk_builder_add_from_string takes more than 2 parameters.

https://bugzilla.gnome.org/show_bug.cgi?id=741897
2014-12-23 10:40:51 +00:00
Florian Müllner
3a0ced32bf Adwaita: Special-case server-side window decorations
The WM already adds the window shadow in that case, so just use the
box-shadow to add the border here.
2014-12-22 22:33:22 +01:00
Matthias Clasen
5127136723 GtkNotebook: Be a bit more safe against cur_page being NULL
https://bugzilla.gnome.org/show_bug.cgi?id=477454
2014-12-22 10:52:54 -05:00
Matthias Clasen
ea36b7bfb0 GtkRecentManager: Survive without a filename
We were asserting priv->filename != NULL in various places,
which leads to apps refusing to work when HOME is set to a
nonexisting or nonwritable value. Since it isn't hard, just
make GtkRecentManager survive without a filename. We won't
save or read any recently used files in this state, but
thats ok.
https://bugzilla.gnome.org/show_bug.cgi?id=739038
2014-12-22 08:24:13 -05:00
Daniel Mustieles
84b0b45465 Updated Spanish translation 2014-12-22 13:08:37 +01:00
Daniel Mustieles
cc5a586ceb Updated Spanish translation 2014-12-22 13:08:20 +01:00
Ryan Lortie
6b26664c41 GtkMenuTracker: add hidden-when='macos-menubar'
Provide a mechanism for hiding the "Quit", "About" and "Preferences"
menu items from the normal places in a traditional menubar layout (in
the File and Edit menus) when the menu is being rendered in the Mac OS
menubar.

These items can already be found in the application menu.

With this feature, applications can now define a single menu to use in
all 'traditional' scenarios.

Use this new attribute in Bloatpad.

https://bugzilla.gnome.org/show_bug.cgi?id=741610
2014-12-22 06:22:26 -05:00
Matthias Clasen
4bc3f02d51 GtkRecentManager: Allow instantiating with gtk_init
This apparently used to work, and it doesn't do harm to allow it.

https://bugzilla.gnome.org/show_bug.cgi?id=705582
2014-12-21 23:14:02 -05:00
Matthias Clasen
53c388b724 Some formatting cleanups 2014-12-21 22:58:23 -05:00
Chun-wei Fan
36245b7058 GDK-Win32: Drop Some Unused Items
There were a bit of unused items from the GDK-Win32 work on GL support, so
drop them.
2014-12-22 11:25:49 +08:00
Ting-Wei Lan
ef57ac6bf1 reftests: Fix typo
It causes build failure on MinGW.

https://bugzilla.gnome.org/show_bug.cgi?id=741827
2014-12-22 11:14:17 +08:00
Ryan Lortie
ef2c68462b GtkMenuTracker: add missing documentation fragment
https://bugzilla.gnome.org/show_bug.cgi?id=741610
2014-12-20 21:24:34 -05:00
Matthias Clasen
1e1c5c65d1 inspector: Remove an errant shadow 2014-12-20 19:39:09 -05:00
Matthias Clasen
2b07b6c069 inspector: Add a magnifier
Add a magnifier that shows the selected widget up to 5 times
enlarged.
2014-12-20 19:24:08 -05:00
Matthias Clasen
52b3b4207f GtkTextView: disconnect the magifier on destroy
This prevents warnings that would otherwise happen when
the magifier is finalized.
2014-12-20 19:19:24 -05:00
Matthias Clasen
10d0ca0a3d GtkMagnifier: Add a resizing mode
In addition to the fixed-size mode that is used by the text view,
add a mode in which the magnifier requests enough size to render
the entire inspected widget at the current magnification. In this
mode, the magnifier will update its size when the size of the
inspected widget changes. Also, make the magnifier redraw on its
own whenever the inspected widget draws.
2014-12-20 19:16:46 -05:00
Benjamin Otte
42a6ae6c6c widget: Set the allocation via gtk_widget_set_allocation()
There is no good reason to assign the value directly.

Also, this fixes d23f3254b7
where widgets that chained up instead of calling
gtk_widget_set_allocation() would not draw becaues of empty clip.
2014-12-20 20:41:18 +01:00
Benjamin Otte
631688cf64 csstransform: Fix comparisons crashing
Transforms of different type are not equal.
2014-12-19 19:20:56 +01:00
Benjamin Otte
d23f3254b7 widget: Handle setting clip differently
(1) Get rid of supports_clip flag. All widgets (implicitly) support
clip.

(2) Don't reset the clip to { 0, 0, 0, 0 } before the "size-allocate"
signal.

(3) Make gtk_widget_set_allocation() set the clip (to the allocation).
This ensures that eveyr widget has a clip set.
Note: It overrides previous calls to gtk_widget_set_clip(), while in
3.14 this didn't happen.

(4) As the clip is set by gtk_widget_set_allocation() now, don't set
it after the "size-allocate" signal anymore.

This fixes calls to gtk_widget_queue_draw() from inside the
size_allocate vfunc.
2014-12-19 19:20:07 +01:00
Benjamin Otte
f0a40b1a23 widget-factory: Don't pulse dead widgets
Causes crashes at cleanup and we don't want those.

Also, code gets simpler.
2014-12-19 19:20:06 +01:00
Matthias Clasen
1dbc6d91f0 Don't initialize GL if it has been disabled
We've observed hangs of mutter when it initializes GTK+, which
are caused by initializing GL, which in turn makes xwayland
call back into mutter. With this change, mutter should just
disable GL support in GDK, and things will work.
2014-12-19 12:27:31 -05:00
Matthias Clasen
ac5ffd847b GtkApplication: Try to cope with ssh situations better
Override the gtk-shell-shows-app-menu and gtk-shell-shows-menubar
settings to FALSE, if we can detect that we are not on the same
session bus as the xsettings provider that we got these settings
from.

We determine this by comparing the bus ID of 'our' session
bus with the one reported in the Gtk/SessionBusId xsetting.
If they are different, then it very likely that we are in an ssh
situation where we see the forwarded X display, but not the
session bus. The D-Bus based menu exporting will not work
in this situation.

https://bugzilla.gnome.org/show_bug.cgi?id=671802
2014-12-18 23:26:23 -05:00
Matthias Clasen
57d034ce9f Add an XSetting for the session bus ID
This will allow us to identify situations where we are not on
the same session bus as the xsettings provider.

https://bugzilla.gnome.org/show_bug.cgi?id=671802
2014-12-18 23:26:11 -05:00
Christian Kirbach
583d612c9f Updated German translation 2014-12-18 22:49:08 +00:00
Carlos Garnacho
51e1e3b416 textview: make magnifier size dependent on text size
The magnifier is now set enough height to show the line being currently
manipulated, which makes it just big enough to show the layout height at
that size and magnification.
2014-12-18 21:21:33 +01:00
Carlos Garnacho
97137da6e5 Adwaita: Make text handles a bit larger
This improves visibility, and interaction, as the invisible rect around is
dependent on the visible handle size
2014-12-18 21:20:18 +01:00
Carlos Garnacho
025340bfc4 textview: Implement friendlier touch selection
- It is not possible anymore to trigger text DnD through touch, pressing
  and dragging from within the selection will instead extend it. Text
  shrinking is still available through the handles
- The selection mode for touch is per-word, char-level manipulation is
  still available through the handles.
- Tapping within the selection will bring in text handles, and toggle
  text selection popover.
2014-12-18 21:20:18 +01:00
Carlos Garnacho
8c091d1484 textview: Make "extend selection" only extend
This mode could also shrink the selection, plus the starting point would
seem somewhat arbitrary (actually dependent on the dragging direction of
the last selection).

Made this mode more consistent by only allowing it to extend the selection,
only in one direction for each operation, and so it keeps the current
selection as a minimum.
2014-12-18 21:20:18 +01:00
Carlos Garnacho
a2e71203c2 textview: Pass a boolean telling whether a selection drag should extend
Instead of passing a GdkEvent and let the function figure out whether the
selection should be extended, let that to the caller and just pass a
boolean here.
2014-12-18 21:20:17 +01:00
Carlos Garnacho
ccdebb6aa0 textview: Show magnifier on top of current line
The X coordinate is dependent on touch position, but Y is stepped.
2014-12-18 21:20:17 +01:00
Carlos Garnacho
79f8db1c0d texthandle: Use active state when handles are being dragged
The active state flags is set on both handles when this happens.
2014-12-18 21:20:17 +01:00
Carlos Garnacho
e0b9330880 texthandle: Use the handle widget style context for rendering
Using the parent widget context is a leftover of the pre-popover
implementation, which used GdkWindows directly. This will make the context
reflect widget state, at the expense of changing the selector paths
that used to match the handles.
2014-12-18 21:20:17 +01:00
Carlos Garnacho
dca2f4386d gesturesingle: check for the sequence being handled, not just the event
Checking the return value was valid for most gestures, but
GtkGestureLongPress, where the first press triggers internally an action,
but does nothing for the sequence to be claimed/denied, FALSE was eventually
returned, and the button/sequence functions would be incorrect when
::pressed is emitted.

So check that the sequence is being handled by the gesture, this is more
desirable than the return value as it's independent of sequence state,
and still will be FALSE for the cases we want to catch here.
2014-12-18 21:20:17 +01:00
Sebastien Lafargue
ce8dc51861 gtktextlayout: fix to quiet a warning
Gcc complains about a possible use of a not initialised
widget ref ( which can't happen in reality )

https://bugzilla.gnome.org/show_bug.cgi?id=741702
2014-12-18 21:00:45 +01:00
Sebastien Lafargue
73c8f30928 gtktextlayout: fix for right margin with RTL text
When a RTL paragraph is not set to wrap, the right margin is not respected
because of the margins counted twice so we replace
display->width by PIXEL_BOUND (extents.width), the same quantity
without the margins.

https://bugzilla.gnome.org/show_bug.cgi?id=741702
2014-12-18 20:52:58 +01:00
Erick Pérez Castellanos
ed1fb8d2af Minor documentation fix 2014-12-18 10:43:13 -05:00
Marek Kasik
779faafa22 printing: Translate context to correct position
Use correct margins of given page setup when translating context
to imageable area.

https://bugzilla.gnome.org/show_bug.cgi?id=671895
2014-12-18 16:29:48 +01:00
Marek Kasik
9ac9769f36 printing: Return correct width and height of page setup
Use correct margins when computing width and height returned by
gtk_page_setup_get_page_width() and
gtk_page_setup_get_page_height().

https://bugzilla.gnome.org/show_bug.cgi?id=671895
2014-12-18 16:29:44 +01:00
Daniel Mustieles
307ce2f9bd Updated Spanish translation 2014-12-18 13:21:10 +01:00
Yosef Or Boczko
e21786138a Updated Hebrew translation 2014-12-18 13:28:44 +02:00
Chun-wei Fan
14e5ca584b Visual Studio Builds: Update Header "Installation"
The list of headers became a bit out-of-date as development went on, so
make it up-to-date.
2014-12-18 15:31:58 +08:00
Matthias Clasen
fe82dc5fb2 GtkMenuButton: Don't leak popovers
Detach the previous popover from the toplevel when a new one
is set. This should fix

https://bugzilla.gnome.org/show_bug.cgi?id=741652
2014-12-17 22:56:30 -05:00
Lapo Calamandrei
fdc8c6103a Adwaita: another stab at the undershoot 2014-12-17 19:42:11 +01:00
Lapo Calamandrei
bf383acd5d Adwaita: fix treeview progressbar issue
See https://bugzilla.gnome.org/show_bug.cgi?id=741569
2014-12-17 18:30:14 +01:00
Lars Uebernickel
b44df22895 Menu items: force loading 16x16 icons
GtkIconTheme doesn't scale icons beyond the size specified in the theme
anymore. This can result in arbitrarily large menu items when a theme
only provides large icons.

Force icons to always be 16x16 to ensure that menu items always have the
same height.

https://bugzilla.gnome.org/show_bug.cgi?id=741259
2014-12-17 17:52:03 +01:00