Commit Graph

33867 Commits

Author SHA1 Message Date
Matthias Clasen
003d9f4225 window: Add a window menu to the titlebar
The menu is triggered by right-click on the titlebar
or with the menu key.
2013-03-17 12:19:50 -04:00
Matthias Clasen
bf03c85e43 window: Allow resizing by clicking on the border
We also change cursors to indicate what interactions
are possible in various window regions.
Double clicking on the titlebar maximizes the window.
2013-03-17 12:19:50 -04:00
Matthias Clasen
037b1435ae window: Allow theme control over window buttons
Add a style property to control the presence and order of
window buttons. We allow buttons at the left and right side,
they can be specified like this: icon,close:minimize,maximize.

Also, change the default button layout back to have just a close
button on the right, use icons in buttons, and set style classes
on the buttons, to allow better theming.
2013-03-17 12:19:50 -04:00
Matthias Clasen
7d71f8888d Add icons for frame buttons
Add window-minimize, window-maximize, window-restore and window-delete
icons to the builtin icon theme. These will be used for icons in
the window buttons, and the expectation is that the icon theme
will provide icons matching the desired decoration style.

window-delete is used instead of window-close, since window-close
is also used for GTK_STOCK_CLOSE, and the two may require different
styles when used inside the application vs in the window frame.
2013-03-17 12:19:50 -04:00
Matthias Clasen
93c345e49f window: Hide frame buttons when appropriate
Hide the close button if the window is not deletable, hide the
maximize button if the window is not resizable, and hide all
buttons if the window is a dialog.

Update buttons when the window state changes.
2013-03-17 12:19:49 -04:00
Matthias Clasen
d05d08a2f3 window: Use same title fallback mechanism as X backend
This looks at the application name or program name and uses that
as the title if gtk_window_set_title has not been called.
2013-03-17 12:19:49 -04:00
Matthias Clasen
b141121ef6 window: Add support for enabling client decorations on non-Wayland
Client side decorations can be enabled on non-Wayland platforms by
setting the GTK_CSD="1" environment variable.

We must ensure we have a GdkVisual that has an alpha channel since
the decorations rely on transparency. If we cannot get a visual with
an alpha channel then we do not enable client side decorations.
2013-03-17 12:19:49 -04:00
Rob Bradford
f17b7136dd window: Hide the decorations on fullscreen
This is expected behaviour for fullscreen windows.
2013-03-17 12:19:31 -04:00
Rob Bradford
4618e0dcc7 window: Don't set a background pattern/colour when client decorated
Otherwise we'll potentially get some background sticking through our rounded
corners in our decorations. The actual background will get drawn as part of
the decoration drawing.
2013-03-17 12:13:35 -04:00
Kristian Høgsberg
6a8362111e window: Add initial support for client-side decorations under Wayland
This change comprises four main parts:
 * the creation of the widgets that form the decorations,
 * implementation of get_preferred_height/width, and the for_width/for_height
   variants,
 * taking the decorations into account when allocating,
 * and drawing the decorations themselves.

Kristian did the bulk of the original work on this but any bugs are almost
certainly mine through the many refactorings and rebasings.
2013-03-17 12:13:35 -04:00
Matthias Clasen
3f9455301e Add GtkHeaderBar
This widget has been developed as GdHeaderBar in libgd.
The copy here has been renamed and changed to use GTK+
internals.
2013-03-17 12:12:53 -04:00
Rob Bradford
55a98da4d4 window: Allow _gtk_window_set_allocation to return a modified allocation
Update the documentation and users of this function to handle
the future case that that we have some internal decorations to the window and
useable allocation is thus smaller.

By having a separate out parameter there is no need to have an in/out function
and allows for greater robustness.

The current implementation simply returns the allocation provided.
2013-03-17 11:28:26 -04:00
Matthias Clasen
026d47d909 Add an index for 3.10 api additions 2013-03-17 11:27:53 -04:00
Matthias Clasen
2ca30bf8e8 Define 3.10 version macros 2013-03-17 11:27:53 -04:00
Matthias Clasen
3bc8b2dea4 Bump version to 3.9.0
Needed so that GDK_AVAILABLE_IN_3_10 works.
2013-03-17 11:27:53 -04:00
Ihar Hrachyshka
cd7200fb05 Updated Belarusian translation. 2013-03-17 15:53:08 +03:00
Guido Günther
ece672ab0b gdk_{pointer,keyboard}_grab are deprecated
so mention the non deprecated gdk_device_grab as well
2013-03-17 11:58:21 +01:00
Ask H. Larsen
795e90efcb Updated Danish translation of the properties 2013-03-17 08:37:56 +01:00
Ask H. Larsen
28d288abd2 Updated Danish translation 2013-03-17 08:14:27 +01:00
Sébastien Wilmet
66dfab0b0a Small API doc fixes
For gtk_text_iter_get_char(), due to the "Returns" at the beginning of
the description, the description was not visible. So the first sentence
has been reworded.
2013-03-16 22:18:50 +01:00
Matthias Clasen
5e1a06d1b1 GtkGrid: Tweak size allocation
If there are rows that contain only spanning children,
our algorithm was unnecessarily distributing extra space
to the other rows, even if they contain only non-expanding
children.

We improve the behaviour by treating rows containing only
spanning children as expanding.
2013-03-15 23:38:30 -04:00
Matthias Clasen
e43956141b Add another grid sizing reftest
This test exercises spanning children such that there are
rows which contain only spanning cells.
2013-03-15 23:38:22 -04:00
Benjamin Otte
f9f6c4fa49 stylecontext: Do invalidation on first resize container
... instead of taking the last one we find. This is necessary as
attached widgets (mostly menus) can be attached to an invisible widget,
but we still want to invalidate styles for them.

https://bugzilla.gnome.org/show_bug.cgi?id=695772
2013-03-16 00:06:55 +01:00
Claude Paroz
69eb272e63 Updated po-properties French translation
Forward-port from gtk-3-8 branch.
2013-03-15 23:30:29 +01:00
Christian Persch
af0007d0d8 docs: Typo fix 2013-03-15 18:51:11 +01:00
Benjamin Otte
2ba15221c0 reftests: Add reftest for separator fixes
Reftest for 61c4425161be3146c0c753a766f35442549bfe72.

Includes a workaround for a grid bug which should be removed once
GtkGrid is fixed.
2013-03-15 18:18:40 +01:00
Benjamin Otte
bda5987335 separator: Don't use padding and borders wrongly
Borders for size requests and padding for drawing? Really?

Removed them, as that is the least invasive fix shortly before a
release.
2013-03-15 18:18:40 +01:00
Matthias Clasen
5da58aa71d wayland: Rename GdkDeviceManagerCore to GdkWaylandDeviceManager
The 'core' naming is just an artifact of having several generations
of input extensions in X11, no need to propagate that into other
backends.
2013-03-15 09:19:35 -04:00
Matthias Clasen
469373a1f9 Include config.h in gdkenumtypes.c.template
At the same time, drop the GDK_ENABLE_BROKEN define.
Nothing broken in GDK broken anymore :-)
2013-03-15 09:19:35 -04:00
Fran Diéguez
10a8fe9ebf Updated Galician translations
Conflicts:
	po/gl.po
2013-03-15 11:13:29 +01:00
Nilamdyuti Goswami
7497cdef08 Assamese translation updated for gnome 3.8 2013-03-15 15:12:09 +05:30
Nilamdyuti Goswami
469368c3e8 Assamese translation updated for gnome 3.8 2013-03-15 15:01:04 +05:30
Matthias Clasen
a731cd1ef6 Minor doc cleanup
Remove widget references from interface docs.

https://bugzilla.gnome.org/show_bug.cgi?id=695874
2013-03-14 20:29:00 -04:00
Benjamin Otte
feb64f40b0 a11y: Emit text-changed signals directly
When setting new text on the label, the text-changed::delete signal
needs to be emitted before deleting the text (so that atk-bridge can
query the old text) while the text-changed::insert event needs to happen
afterwards (for the same reason). The old code using the notify signal
was only emitted after changing the text.
2013-03-15 00:58:29 +01:00
Bastien Nocera
ee44ed75ca GtkApplication: Allow passing windows on non-X11 targets
It's not the application's fault that we don't do anything
with the passed GtkWindow on non-X11, so don't try to get an XID
on non-X11.

https://bugzilla.gnome.org/show_bug.cgi?id=695783
2013-03-14 17:48:20 +01:00
Andika Triwidada
64397962e8 Updated Indonesian translation 2013-03-14 18:22:04 +07:00
Changwoo Ryu
370c759e65 Updated Korean translation 2013-03-13 23:55:21 +09:00
Marek Kasik
05901bdbbd printing: Use DBus calls instead of Avahi API
Converts usage of Avahi API to DBus calls. This change allows
us to remove dependency on avahi-gobject and avoids of possible
circular dependency.
Lists printers if Gtk+ is compiled with CUPS 1.6 or newer.
2013-03-13 15:33:56 +01:00
Marek Kasik
a727117acf printing: Remove usage of GError in connection test
Really remove usage of error in previous commit.

Related to
https://bugzilla.gnome.org/show_bug.cgi?id=695714
2013-03-13 15:25:45 +01:00
Marek Kasik
7529b95fab printing: Don't hang when getting info for Avahi printer
Asynchronously create testing connection to address returned
by GaServiceResolver. Don't request info for such printer if
the connection fails.

https://bugzilla.gnome.org/show_bug.cgi?id=695714
2013-03-13 14:59:10 +01:00
Matthias Clasen
7dd2539e1b Add a missing runtime check
The cursor theme and size settting code was ifdefed to only
be compiled with the X11 backend, but it didn't check for
running under X at runtime. Fix that.
http://bugzilla.gnome.org/695495
2013-03-13 06:04:58 -04:00
Marek Kasik
36d2324891 printing: Show Avahi printers on IPv6 network
Create correct URIs for printers on IPv6 networks.
2013-03-13 10:54:44 +01:00
Chun-wei Fan
b9e189150b gdk/gdkwindow.c, gtk/gtkwidget.c: Include fallback-c89.c
Both of them started to make use of round(), a C99 function.  So, include
fallback-c89.c to provide a fallback implementation for round() for
compilers that don't have round()

https://bugzilla.gnome.org/show_bug.cgi?id=694339
2013-03-13 13:22:48 +08:00
Chun-wei Fan
9b7c7ae614 gdk/fallback-c89.c: Add fallback for round()
This is essentially done by simply copying from gtk/fallback-c89.c

https://bugzilla.gnome.org/show_bug.cgi?id=694339
2013-03-13 13:22:46 +08:00
John Lindgren
5e2c232145 treeview: Don't emit cursor-changed in destruction
This is a workaround until we have a good idea on how we want to handle
signal disconnection before/during/after dispose and destroy vfunc
calls.

https://bugzilla.gnome.org/show_bug.cgi?id=671939
2013-03-13 02:06:29 +01:00
Benjamin Otte
b7aa15f505 reftests: Add animation loading test
XPM files weren't loaded properly.

https://bugzilla.gnome.org/show_bug.cgi?id=695228
2013-03-13 02:06:29 +01:00
Matthias Clasen
0cc688aa92 Drop the Motif DND protocol
The implementation is not working and unused, since XDND is the
de-facto standard under X nowadays.

https://bugzilla.gnome.org/show_bug.cgi?id=695476
2013-03-12 20:03:19 -04:00
Federico Mena Quintero
563eb60666 filechooserbutton: Duh, remove all the timeouts after tests
Otherwise tests may start failing if they start after an old timeout triggers.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-12 14:31:48 -06:00
Federico Mena Quintero
d84f5ae17e filechooserbutton: Add a description string to assertions about emitted signals
On failed tests, this lets us more easily see see which assertion failed.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-12 14:31:48 -06:00
Federico Mena Quintero
aaedf5a352 filechooserbutton: Give proper names to the SELECT_FOLDER tests with cancelled dialog
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-03-12 14:31:48 -06:00