Commit Graph

18887 Commits

Author SHA1 Message Date
Paolo Borelli
798c2b60ec [headerbar] Do not hardcode title and subtititle style
Let the css theme define them

https://bugzilla.gnome.org/show_bug.cgi?id=707051
2013-08-29 15:59:53 +02:00
Emmanuele Bassi
889e63faed headerbar: Remove hpadding and vpadding properties
We really want these to be set by the theme, not programmatically.

https://bugzilla.gnome.org/show_bug.cgi?id=706929
2013-08-29 14:39:38 +01:00
Stefan Sauer
d4679c0a13 frame: annotate the @label params with (allow-none) 2013-08-29 09:06:31 +02:00
Claudio Saavedra
343a259e4a gtkwindow: fix a critical warning
Do not map the title box if it's not visible.
2013-08-28 20:10:38 +03:00
Matthias Clasen
13f92834f7 Fix a regression in GtkAssistant child property handling
GtkAssistant is bending the rules about child properties
of non-direct children, and the recent fix to accomodate
GtkInfoBar changes broke things. The effect was that child
properties of assistant pages in ui files were just not
applied, so all pages ended up without titles and with
the normal page type, leading to broken assistants all
over the place.

https://bugzilla.gnome.org/show_bug.cgi?id=706756
2013-08-28 11:51:19 -04:00
Jasper St. Pierre
3c2c3ab6f9 gtkwindow: Calculate the opaque window based off of the style
https://bugzilla.gnome.org/show_bug.cgi?id=706922
2013-08-28 10:33:58 -04:00
Jasper St. Pierre
64cf8b731e gtkwindow: Consistently set the style classes for window-frame
In one place, we forgot to remove the BACKGROUND style class before
adding window-frame. Add a helper method so these are all the same.

https://bugzilla.gnome.org/show_bug.cgi?id=706922
2013-08-28 10:33:57 -04:00
Stefano Facchini
b2b8c4d4bc revealer: clamp minimum size to natural one
Instead of just setting them equal.

https://bugzilla.gnome.org/show_bug.cgi?id=706938
2013-08-28 10:34:11 +02:00
Matthias Clasen
a9dae69b51 Fix anonymous assistants
GtkAssistant supports not showing the sidebar with the page
titles (if the page have no titles). Unfortunately, we were
hiding the sidebar in this case, but still rendering the frame
behind it, leading to a broken appearance.
2013-08-27 23:14:14 -04:00
Kristian Høgsberg
459e6a35cd clipboard: Fix text mime type handling on Wayland 2013-08-27 16:03:55 +02:00
Alexander Larsson
de1f551271 GtkTextView: Use *some* extra size for horizontal scrolling
Horizontal scrolling is unusual, but specifying some extra offscreen
space for it in free in the normal case where the viewport is the
same width as the canvas anyway, so lets do it.
2013-08-26 21:17:45 +02:00
Alexander Larsson
2d0bdee075 pixel cache: Allow growing of cache surface
If the new requested surface size is enough larger than the previous
one (but the old is still larger than the absolute minimum),
reallocate it anyway.

This fixes an issue where the text view initially requested a really
small extra size which was then increased but that didn't "take".
2013-08-26 21:17:45 +02:00
Christian Hergert
d96882bc16 textview: use pixelcache to indirectly renderer to widget.
This patch uses GtkPixelCache to render the contents of the widget,
and typically a bit more, to an offscreen surface. The pixel cache in
turn manages rendering to the actual surface for the widget.

The current strategy for the size to render is the size of the widget
plus half the height.

https://bugzilla.gnome.org/show_bug.cgi?id=701125
2013-08-26 21:17:45 +02:00
Christian Hergert
b1745d68cd pixelcache: allow specifying content type and extra size.
Allow forcing the cairo_content_t of the surface as well as the
amount of extra size to render.

https://bugzilla.gnome.org/show_bug.cgi?id=706728
2013-08-26 21:17:45 +02:00
Carlos Garcia Campos
247ebbd17c iconview: Respect the fixed item width when adjusting the wrap width
Restore the code the way it was in GTK2.

https://bugzilla.gnome.org/show_bug.cgi?id=680953
2013-08-26 18:23:55 +02:00
Chun-wei Fan
c8cad49108 gtk/gtkwindow.c: Fix build on non-X11
There were some code added to this file that is meant for the X11 backend,
but they are being unconditionally built.  Add build-time checks for the
X11 backend for these to fix the build on non-X11 platforms.
2013-08-26 21:32:09 +08:00
Chun-wei Fan
0e01f9cc9c GDK/GTK on Windows: Fix build
Due to the work on gdk_cursor_new_from_surface (commit b2113b73),
get_cursor_for_pixbuf() in GdkDisplayClass was converted to
get_cursor_for_surface(), which means the GDK Win32 backend needs to be
updated for the code to build and run on Windows, plus some function
prototypes and declarations/calls need to be updated as well.

https://bugzilla.gnome.org/show_bug.cgi?id=705980
2013-08-26 10:29:23 +08:00
Kristian Høgsberg
2ffcc8a453 wayland: Set type for GtkSelectionData for incoming contents
This is set from the incoming property type under X11.  Under Wayland
it will always be what we requested, so we can just set it to the target.
2013-08-23 23:15:54 -07:00
Kristian Høgsberg
8e8951df72 wayland: Only set wayland selection for GDK_SELECTION_CLIPBOARD
Wayland only has one selection, which corresponds to GDK_SELECTION_CLIPBOARD.
2013-08-23 23:15:54 -07:00
Matthias Clasen
7e4bcf9102 Add workspace handling to the window menu
The reimplements the current mutter window menu for
workspace changes.

https://bugzilla.gnome.org/show_bug.cgi?id=706323
2013-08-24 00:53:00 -04:00
Matthias Clasen
8f69721ed4 Add an 'Always on Top' item to the csd window menu
We want to make the csd window menu as similar as possible to the
mutter window menu.

https://bugzilla.gnome.org/show_bug.cgi?id=706323
2013-08-23 22:46:04 -04:00
Cosimo Cecchi
6928aedb2c window: add a style class when we automatically create the titlebar
To distinguish it from custom titlebars added from applications.

https://bugzilla.gnome.org/show_bug.cgi?id=706592
2013-08-23 20:17:24 -04:00
Cosimo Cecchi
fde3d5afe8 window: don't change bottom margin for automatic CSD
We'll use a style class to be able to give this a different appearance,
but for the time being we don't really need to give this such different
margin.

https://bugzilla.gnome.org/show_bug.cgi?id=706592
2013-08-23 20:17:24 -04:00
Benjamin Otte
4787a1ac61 label: Initialize lines value to -1
Fixes defaultvalue test.
2013-08-23 18:27:12 +02:00
Benjamin Otte
64a1f30468 label: Fix gcc warning 2013-08-23 18:24:20 +02:00
Matthias Clasen
eab0ff8e4e Add api to ellipsize labels to multiple lines
When setting the lines property, the label will be ellipsized
to that many lines, with the ellipsis only appearing in the
last line. This is different from how ellipsization of multi-line
labels normally works in GTK+.
2013-08-22 20:38:01 -04:00
David King
4415d087c6 combobox: Add missing Since tags for entry constructors 2013-08-22 20:36:17 +01:00
Jasper St. Pierre
51f229519d gtkwindow: Enable CSD when windows set a titlebar
https://bugzilla.gnome.org/show_bug.cgi?id=706529
2013-08-22 09:33:08 -04:00
Jasper St. Pierre
a2eafe2f57 gtkwindow: Disable CSD if we aren't running under a supported WM
Also, split the checks for CSD out into a separate function.

https://bugzilla.gnome.org/show_bug.cgi?id=706529
2013-08-22 09:33:00 -04:00
Jasper St. Pierre
7462de8fba gtkwindow: Split code that detects if we want CSD out
This will get a bit more complex when we enable CSD for custom headerbars

https://bugzilla.gnome.org/show_bug.cgi?id=706529
2013-08-22 09:25:39 -04:00
Jasper St. Pierre
a95cabd787 gtkwindow: Have a separate "titlebar" pointer for decorations we create ourselves
This cleans up the code a bit.

https://bugzilla.gnome.org/show_bug.cgi?id=706529
2013-08-22 09:25:39 -04:00
Jasper St. Pierre
cae2b697ef gtkwindow: Rename title_icon, etc. to titlebar_icon
"title_box" is used for both a custom header bar and for a titlebar.
Since we want to help differentiate these cases in the code, rename
everything titlebar-internal to use "titlebar_".

https://bugzilla.gnome.org/show_bug.cgi?id=706529
2013-08-22 09:25:39 -04:00
Federico Mena Quintero
354db1d69d filechooser: Don't use an underline mnemonic in the 'Save in folder' label
This used to point to the GtkPathBar, which doesn't accept mnemonic activation, anyway.
This whole thing was a leftover from when we had a combo box to select a folder, but
this is no longer the case.

https://bugzilla.gnome.org/show_bug.cgi?id=706448

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-08-21 09:50:44 -05:00
Saleem Abdulrasool
ec26a909f6 clipboard: fix build without wayland
Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>
2013-08-20 20:28:01 -07:00
Piotr Drąg
60ec788489 Fix minor typos 2013-08-21 04:15:52 +02:00
Matthias Clasen
9f8514cc06 Fix distcheck
We need to clean up the ui.h files somewhere if they are generated
during the build from tarball. Reuse the existing distclean-local
hack for it.
2013-08-20 18:53:57 -04:00
Matthias Clasen
22378bbab5 GtkHeaderBar: Add the titlebutton style to the close button
This will let the theme unify the appearance of this button with
the window buttons in 'traditional' title bars.
2013-08-20 15:23:36 -04:00
Volker Sobek
112374b4be doc: Fix typos
Fix two typos in gtk/gtktexttag.c.

https://bugzilla.gnome.org/show_bug.cgi?id=706335
2013-08-20 17:35:44 +02:00
Benjamin Otte
e38e47d7d3 clipboard: Reimplement Wayland clipboard using vfuncs
This way, the Wayland and the regular clipboard implementation can both
be compiled in and selected based on the display in use.

One thing potentially broken now is text mime type handling as Wayland
seemed to use different mime types in some places.
2013-08-20 16:34:29 +02:00
Benjamin Otte
aee5bcf9e2 clipboard: Make a bunch of functions vfuncs 2013-08-20 16:34:29 +02:00
Benjamin Otte
4009c8241b clipboard: Split struct definitions into private header 2013-08-20 16:34:29 +02:00
Matthias Clasen
8383f003f3 Avoid deprecation warnings 2013-08-20 00:15:37 -04:00
Cosimo Cecchi
417d6666e5 iconhelper: refactor some code into a single function
https://bugzilla.gnome.org/show_bug.cgi?id=705443
2013-08-20 02:50:40 +02:00
Cosimo Cecchi
19c5a00f3a iconfactory: cache/invalidate pixbufs according to the effect
The state of the widget is not enough now to cache the pixbuf - we also
have to take into consideration the image effect itself, since the state
on the actual GtkStyleContext we use might not change, e.g. because the
change was on a parent context.

https://bugzilla.gnome.org/show_bug.cgi?id=705443
2013-08-20 02:50:40 +02:00
Cosimo Cecchi
b6cf6d52ef themingengine: apply image effects according to GtkCssImageEffect value
Instead of only looking at the state flags.

https://bugzilla.gnome.org/show_bug.cgi?id=705443
2013-08-20 02:50:40 +02:00
Cosimo Cecchi
736b350d7a css: Add a GtkCssValue for GtkCssImageEffect
This will allow us to use the CSS machinery to apply a highlight or dim
effect when images are prelit or insensitive.

https://bugzilla.gnome.org/show_bug.cgi?id=705443
2013-08-20 02:50:40 +02:00
Cosimo Cecchi
723a589bdd themingengine: refactor a conditional branch
Return early when the state is not wildcarded - makes the code more
readable.

https://bugzilla.gnome.org/show_bug.cgi?id=705443
2013-08-20 02:50:40 +02:00
Cosimo Cecchi
844dade070 pathbar: add back GTK_STYLE_CLASS_LINKED
This was accidentally removed in commit
42f53ab58e

https://bugzilla.gnome.org/show_bug.cgi?id=706028
2013-08-20 02:47:07 +02:00
Matthias Clasen
64d0ecaec8 Redo style class handling
We should set the appropriate style classes when we have
constructed the content and know if it is a label, an image,
or both. Doing this in the convenience constructors is
problematic for language bindings, and misses out when the
content is changed after construction.
2013-08-19 14:42:18 -04:00
Matthias Clasen
27cb50b48c Revert "Add the "text-button" style to button created with gtk_button_new_with_{label,mnemonic}"
This reverts commit 8d7bab7d7b.
2013-08-19 14:42:18 -04:00