Commit Graph

19586 Commits

Author SHA1 Message Date
Matthias Clasen
b4d9ea1878 GtkModelMenuItem: set initial accessible role
The initial state of GtkModelMenuItem is that of a normal menu
item, but the accessible we are using, GtkCheckMenuItemAccessible,
starts out with a role of 'check menu item'. Fix that up by
explicitly setting the initial accessible role.
2014-01-04 23:15:40 -05:00
Matthias Clasen
8085b41074 GtkCheckMenuItemAccessible: Make work with model menu items
GtkModelMenuItem does not emit the ::toggled signal when a radio
item is activated, so listen for property notification for that
property. We still keep the ::toggled signal handler, in order
to not break other uses of check and radio menu items.

https://bugzilla.gnome.org/show_bug.cgi?id=720983
2014-01-04 21:53:31 -05:00
Matthias Clasen
2a3d5823f4 GtkModelMenuItem: Add some property notification
GtkModelMenuItem emits no property notification, since none of its
properties are readable. But the toggled property is just a proxy
for GtkCheckMenuItem::active, so we should ensure that property
notification is emitted for the ::active property.
2014-01-04 21:52:36 -05:00
Tristan Van Berkom
07d6c69128 bgo #721407 - Fix scrolled window to work with template subclasses.
Ensure the hscrollbar & vscrollbar at gtk_scrolled_window_add() time,
this allows one to subclass GtkScrolledWindow with templates and add
children, as this will happen at instance initialization time before
the construct adjustment properties take effect.
2014-01-04 20:36:17 -05:00
Matthias Clasen
9137b4ed8e GtkColorSwatch: Set an accessible role
And update the colorchooser a11y test to a) use GtkColorChooser
instead of the deprecated GtkColorSelection and b) match this
change. Pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=721045
2014-01-04 18:52:46 -05:00
Matthias Clasen
2f4b577165 GtkInfoBar: Set a more accurate accessible role
And update the a11y tests to match. Pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=721042
2014-01-04 17:44:14 -05:00
Matthias Clasen
e904d1c97d GtkDrawingArea: Set an accessible role
And update the a11y tests to match. Pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=721040
2014-01-04 17:41:23 -05:00
Matthias Clasen
4de1259cd9 Trivial formatting fix 2014-01-04 17:41:23 -05:00
Clayton Walker
568e867dad gtk: remove unused GTK_BUTTONBOX_DEFAULT_STYLE from gtkenums.h tests: remove GTK_BUTTONBOX_DEFAULT_STYLE from testbbox.c and fix crashing
https://bugzilla.gnome.org/show_bug.cgi?id=721317
2014-01-04 13:56:42 -05:00
Matthias Clasen
64855f1295 GtkNotebook: Fix a problem with tab states
When replacing the tab label, we were not adding the
active-page style class. Fix that.
2014-01-04 13:01:49 -05:00
Matthias Clasen
7cd3e7c81b Raleigh: Improve notebook tab theming
The theme was not kept up-to-date when notebook tabs were
recently refactored. Fix it to show some indication of the
active tab.
2014-01-04 12:55:01 -05:00
Matthias Clasen
cda87304d9 Raleigh: Improve scale theming
Add some visual indication for fine adjustment mode in scales
and scrollbars.
2014-01-04 12:12:14 -05:00
Matthias Clasen
8b558e7889 Raleigh: Improve titlebar appearance
The default theme wasn't kept up-to-date as the header bar
and titlebar theming was tweaked. Update it to look non-broken,
at least.
2014-01-04 11:52:02 -05:00
Matthias Clasen
2ebbc724b7 GtkAboutDialog: be consistent about link activation
As pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=721394,
links in the credits part were not going through the
::link-activated signal. Fix that.
2014-01-04 11:08:29 -05:00
Matthias Clasen
08f31006cb Trivial grammar fix 2014-01-04 10:57:46 -05:00
Matthias Clasen
9bf89f2b5e GtkLabelAccessible: reorganize the code
Separate the GtkLabelAccessible, GtkLabelAccessibleLink and
GtkLabelAccessibleLinkImpl implementations more clearly.
2014-01-04 10:54:03 -05:00
Matthias Clasen
b85a8001e0 GtkLabelAccessible: update state of links
This commit makes the LinkImpl children of label accessibles
inherit all their state, except for focused and visited, which
are handled directly.

https://bugzilla.gnome.org/show_bug.cgi?id=721406
2014-01-04 10:54:03 -05:00
Matthias Clasen
5845356d66 GtkLabelAccessible: Implement AtkHypertext
This commit makes the label accessible implement AtkHypertext,
which returns a AtkHyperlink object for each link in the text.
At the same time, add AtkHyperlinkImpl objects as children
to the label accessible.

Also some private API to indicate that links have changed, and
call that from GtkLabel when needed.

Adjust expected output of the affected a11y tests.

https://bugzilla.gnome.org/show_bug.cgi?id=721410
https://bugzilla.gnome.org/show_bug.cgi?id=721421
2014-01-04 10:54:03 -05:00
Matthias Clasen
0d9efde303 GtkLabel: Add private api for links
This exposes enough information to implement the AtkHyperText
interface.

More private link api
2014-01-04 10:54:03 -05:00
Matthias Clasen
c6d9f82916 Add a gtklabelprivate.h header
For now, move the few private functions from gtklabel.h here.
2014-01-04 10:54:03 -05:00
Matthias Clasen
e375b564fb GtkLinkButtonAccessible: fix broken AtkHyperlink implementation
The get_end_index implementation was casting the accessible
to AtkText even though GtkLinkButtonAccessible does not
implement this interface. This did not show up in the a11y
tests because the they were not dumping the affected AtkHyperlinkImpl
properties. Oops.
2014-01-04 10:54:03 -05:00
Matthias Clasen
57d1e6d17d Deprecated the decoration-button-layout style property
This is now done via a setting + regular property, for
better control, and the style property is ignored.
2014-01-04 10:54:03 -05:00
Ryan Lortie
ba09124f9f GtkMenuTracker: tweak separator logic
Ignacio Casal Quinteiro reported a problem whereby an empty section at
the start of a menu has a separator placed after it.  This was caused by
the implementation of the logic that separators should be inserted at
the top of all non-empty sections that are not the first section.  This
logic is obviously incorrect in the case that the first section is empty
(in which case we would not expect to see a separator at the top of the
second section).

Change the logic so that we only insert separators when we see a
non-zero number of actual items in the menu before us.

https://bugzilla.gnome.org/show_bug.cgi?id=721119
2014-01-04 02:31:08 -05:00
Colin Walters
93bcca7f02 window: Document GtkWindow::set-focus
Not sure why this was never documented.
2014-01-02 20:04:47 -05:00
Giovanni Campagna
cecb2fa3ca GtkApplicationX11: read the startup ID from the platform data
If the platform data passed with actions and activations includes
a startup notify ID, we should read it and pass it down to GDK.
This ensures that the right startup notify is completed after the
signal emission, and that the user time of the GdkDisplay is properly
updated (which in turn makes sure the windows are not subjected
to focus-stealing-prevention)

https://bugzilla.gnome.org/show_bug.cgi?id=721304
2014-01-02 21:17:22 +01:00
Benjamin Otte
6d811a67dc treeview: Track area in cell that editable occupies
With multiple renderers per cell, editables shouldn't occupy the whole
cell's area.

https://bugzilla.gnome.org/show_bug.cgi?id=710315
2013-12-28 15:44:19 +01:00
Chun-wei Fan
adb0d2adac gtk/gtkapplication.c: Don't Include unistd.h Unconditionally
This header, which is not universally available, is accidently made to be
included unconditionally during the refactoring of gtkapplication.c,
so restore the #ifdef check.
2013-12-26 16:15:10 +08:00
Matthias Clasen
7e1a4800fa Redo header bar decorations once more
Applications need a way to fix or adapt the decoration layout,
for situations like split header bars. Setting the layout from
the theme with a style property did not offer a good way to do
this, and the ::show-close-button property does not provide
fine-grained control.

To improve the situation, move the layout string to a property of
GtkHeaderBar which is backed by a setting. This allows platforms to
set a default button layout independent of the theme, while applications
can override the default.

The style GtkWindow style property is now deprecated and ignored.
2013-12-21 21:58:24 -05:00
Matthias Clasen
1bfe9d0db9 Fix a few warnings 2013-12-20 15:15:31 -05:00
Matthias Clasen
18d439ee40 Allow close buttons on dialogs
It was a long-standing problem for some users of GtkDialog that
there is no guaranted way to close it. So, lets show a close
button.
2013-12-20 13:31:08 -05:00
Matthias Clasen
f200eebfd6 Improve menubutton a11y
The button now claims its menu as a child for a11y purposes,
which makes it possible for ATs to see it when the navigate
the tree top-down.

Update the a11y test to match.
2013-12-20 13:31:08 -05:00
Matthias Clasen
2c007a8691 Set an accessible name on menu buttons
These commonly have just an image in them, so lets at least
call them 'Menu'.
2013-12-20 13:31:08 -05:00
Matthias Clasen
465d4be3cf GtkPlacesSidebar: Don't show desktop if its home
We go to extra length to set the desktop_uri to NULL when
desktop == home, but then we were adding the (non-functional)
place item anyway. Don't do that.
2013-12-19 11:22:02 -05:00
Matthias Clasen
98bdc9321e GtkPlacesSidebar: avoid a crash
Be more careful when comparing uris during DND - they may
be NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=720264
2013-12-19 11:01:39 -05:00
Jonh Wendell
cc0c521c4c cell-renderer: Check for NULL return in vfunc start_editing()
This virtual function may return NULL, so, let's check if that's
the case and exit the function apropriately.

https://bugzilla.gnome.org/show_bug.cgi?id=720554
2013-12-19 11:06:20 -02:00
Matthias Clasen
3dab856103 GtkColorSelection: Don't leak a context menu
This was pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=720401
2013-12-17 23:26:16 -05:00
Matthias Clasen
47ebd5c6b1 Fix a compiler warning 2013-12-17 23:25:21 -05:00
Matthias Clasen
ad8a97b457 GtkAppChoserWidget: Don't leak the context menu
This was pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=720401
2013-12-17 23:21:54 -05:00
Matthias Clasen
e0b04b39be Remove an unneeded include 2013-12-17 22:41:27 -05:00
Matthias Clasen
c7e6384dbb GtkAppChooserDialog: Add a 'Software' button
Add a simple button that launches GNOME Software.
2013-12-17 22:07:40 -05:00
Matthias Clasen
de947b0ac6 GtkAppChooser: Drop PackageKit integration
This will come back in a simpler form in the next
commit.
2013-12-17 22:07:40 -05:00
Matthias Clasen
7c98d40e94 GtkAppChooserWidget: Monitor installed applications
This uses the new GAppInfoMonitor object in GIO, which provides
change notification when the set of installed applications changes.
2013-12-17 22:07:40 -05:00
Volker Sobek
94e0f1c78d GtkStyleContext: Invalidate contexts with a path
Fixes a tiny typo in commit f51c9d4154
which manifested itself in GtkSpinButton's panels being drawn with an
incorrect, not updated state.

This patch took me more hours than you might think! :P

https://bugzilla.gnome.org/show_bug.cgi?id=709491
2013-12-18 00:23:47 +01:00
Matthias Clasen
ac7c6b25bd Fix extraction of some translatable strings
The reason why some of the strings in gtkprintunixdialog.ui
were missing is that we did not extract translatable string
from <item> elements. Fix that.
2013-12-17 07:35:55 -05:00
Matthias Clasen
1ccbca42d0 GtkHeaderBar: Fix allocation of start and end boxes
We were giving these boxes too much width, consuming what
was supposed to be the spacing between the boxes and the
other content of the header bar.
2013-12-16 20:36:22 -05:00
Ryan Lortie
ced939fc11 gtkapplication: fix inhibit
The big refactor contained a small mistake that broke inhibiting.  Fix it.
2013-12-16 14:39:48 -05:00
Ryan Lortie
7fd81cf111 Refactor GtkApplication
gtkapplication.c has turned into a bit of an #ifdef mess over time, and
many of the current checks are incorrect.  As an example, if you build
Gtk for wayland, and exclude the X11 backend, much of the functionality
required by wayland (such as exporting menu models) will be disabled.

Solve that by introducing a backend mechanism to GtkApplication (named
GtkApplicationImpl) similar to the one in GApplication.  Add backends
for Wayland, X11 and Quartz, with X11 and Wayland sharing a common
'DBus' superclass.

                             GtkApplicationImpl
                                      |
                       /--------------+-------------------\
                       |                                  |
            GtkApplicationImplDBus              GtkApplicationImplQuartz
                       |
           /-----------+-----------------\
           |                             |
  GtkApplicationImplX11      GtkApplicationImplWayland

GtkApplicationImpl itself is essentially a bunch of vfuncs that serve as
hooks for various things that the platform-specific backends may be
interested in doing (startup, shutdown, managing windows, inhibit, etc.)

With this change, all platform specific code has been removed from
gtkapplication.c and gtkapplicationwindow.c (both of which are now free
of #ifdefs, except for a UNIX-specific use of GDesktopAppInfo in
gtkapplicationwindow.c).

Additionally, because of the movement of the property-setting code out
of GtkApplicationWindow, the _GTK_APPLICATION_ID properties (and
friends) will be set on non-GtkApplicationWindows, such as dialogs.

https://bugzilla.gnome.org/show_bug.cgi?id=720550
2013-12-16 13:51:54 -05:00
Matthias Clasen
8bdc3ab4c5 Fix up default csd titlebars
We were forgetting to show close buttons, and the spacing
was wrong, too.
2013-12-16 13:40:54 -05:00
William Jon McCann
bfd27445e6 about dialog: add docs for new GtkLicense values 2013-12-16 11:50:33 -05:00
William Jon McCann
63c9342e30 about dialog: differentiate GPL "or later" versions
https://bugzilla.gnome.org/show_bug.cgi?id=720410
2013-12-16 11:44:35 -05:00
Matthias Clasen
ea8bb7e0ea GtkHeaderBar: Center buttons
Header bars can get taller than the buttons require, and we don't
want them to extend all the way. Center them instead.
2013-12-14 22:32:11 -05:00
Matthias Clasen
269282257d GtkHeaderBar: fix flipping of window controls
We were not keepign the separators at the inside.
2013-12-14 18:30:10 -05:00
Marek Kasik
11d9e5c95c printing: Add missing strings back for translation
There are string in gtkprintunixdialog.ui marked for translation
which are not in gtkprintunixdialog.ui.h.

https://bugzilla.gnome.org/show_bug.cgi?id=708907
2013-12-14 16:41:53 -05:00
Emilio Pozuelo Monfort
4e1b73325d ScaleButton: make the popup transient to the button's window
Fixes the popup positioning on wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=720256
2013-12-14 15:49:38 -05:00
Takao Fujiwara
4d6c509943 GtkIMContextSimple: Update compose table
This adds Multi_key + f + i, as well as other sequences,
mainly Greek.

https://bugzilla.gnome.org/show_bug.cgi?id=710510
2013-12-14 15:34:54 -05:00
Matthias Clasen
9f1159a1a8 Fix a compiler warning
Don't return without a value from a non-void function.
2013-12-13 20:05:03 -05:00
Benjamin Otte
9849b292a9 window: Sanitize size hint computation
We don't want the maximum size to be smaller than the minimum size. Not
just because it's wrong but also because when this happens the rest of
GTK gets mighty confused and infloops resizing to min-size and
max-size in turns causing a flickering window. Well, at least if you
run X without a window manager. Or your window manager hasn't finished
starting up.

Private RHEL bug finding this issue:
https://bugzilla.redhat.com/show_bug.cgi?id=1035409
2013-12-14 01:18:23 +01:00
Benjamin Otte
d4c8f1028a clipboard: Don't crash when data is requested from NULL window
This could happen if data was requested from a separate screen now that
multi-screen is no longer supported.

Ideally, we'd want to support copying to other screens, but that
requires solving in GDK as that's X-specific so cannot be well
abstracted by GDK (without the reintroduction of multiple screens).

https://bugzilla.gnome.org/show_bug.cgi?id=719314
2013-12-13 19:07:42 +01:00
Matthias Clasen
f3d22d2a9b Make app menu fallback a bit more reliable
If the theme has no 'menu' control in the window decorations,
show the menubar after all.
2013-12-13 01:21:06 -05:00
Jasper St. Pierre
cf8fb209e3 headerbar: Don't add hidden widgets
This is a much simpler fix.
2013-12-13 01:11:27 -05:00
Jasper St. Pierre
a3933f96eb Revert "GtkHeaderBar: don't show dangling separators"
This reverts commit a33e5748db.
2013-12-13 01:09:42 -05:00
Matthias Clasen
acdd9c8ed6 Avoid double app menu fallback
Both GtkApplicationWindow and GtkHeaderBar listen for changes
of the gtk-shell-shows-app-menu setting, so they need to somehow
coordinate who is going to take action and show a fallback.
We prefer the menu button in the title over the menubar, so
let GtkApplicationWindow opt out if it finds that the header bar
has been configured to show window controls.
2013-12-13 01:02:36 -05:00
Matthias Clasen
3b8bf01604 Drop a reference to nonexisting API
The GtkApplicationWindow documentation had a reference
to gtk_header_bar_set_show_fallback_app_menu(). That
function no longer exists, so drop it.
2013-12-13 01:02:36 -05:00
Matthias Clasen
a33e5748db GtkHeaderBar: don't show dangling separators
If we don't have a window icon, we hide the titlebar_icon,
we still add it, so we can't simply go by the number of
children when deciding whether to show the separator or
now. Instead, update the separator visibility as we create
the various buttons.
2013-12-13 01:02:36 -05:00
Matthias Clasen
dc073b8020 Make window icons work in GtkHeaderBar 2013-12-13 01:02:36 -05:00
Ryan Lortie
04897e5b09 gdk: add gdk_window_set_shadow_width()
And deprecate the X11-specific version of it.

We call this new API _set_shadow_width() and not _set_frame_extents()
because we already have a gdk_window_get_frame_extents() with a
different meaning and different type of value.

https://bugzilla.gnome.org/show_bug.cgi?id=720374
2013-12-12 23:53:47 -05:00
Jasper St. Pierre
ec61f290dc headerbar: Respect the show-close-button property 2013-12-12 21:55:06 -05:00
Jasper St. Pierre
01f5ff765b window: Update decorations when updating state
This fixes the maximize button not updating...
2013-12-12 21:55:02 -05:00
Jasper St. Pierre
d9f92424b2 headerbar: Support all kinds of CSD decorations
Move the gtkwindow.c CSD code into GtkHeaderBar, and make it triggerable
by the show-close-button property, and remove shows-fallback-app-menu.

https://bugzilla.gnome.org/show_bug.cgi?id=720233
2013-12-12 19:30:59 -05:00
Matthias Clasen
d8401c5f0a GtkHeaderBar: treat "" as 'no subtitle'
This is one of the few cases where it makes some sense to blur
the line between and empty string and NULL: without this, it is
hard to reset the subtitle e.g. from a builder file. And we
have the has-subtitle property now to enforce subtitle size
allocation independently.
2013-12-12 19:29:52 -05:00
Volker Sobek
70eb35d569 GtkFileChooser: Don't fill location_entry if we just populated the file list
Only fill the location entry with the file name of the tree view's
selected file when the selection was done by the user.

When the file chooser's action is GTK_FILE_CHOOSER_ACTION_OPEN, it
selects the first file in the tree view once loading has finished. For
this case we don't want it to insert the file name in the location
entry, as it hinders efficient navigation using the location entry. To
achieve this, use a priv flag to keep track of whether the
selection-changed signal was caused by the file chooser itself.

https://bugzilla.gnome.org/show_bug.cgi?id=386569
2013-12-12 17:42:10 -06:00
Volker Sobek
06091ed457 GtkFileChooserDefault: Remove unused struct field
The field changing_folder is no longer used anywhere.

https://bugzilla.gnome.org/show_bug.cgi?id=720293
2013-12-12 01:33:37 +01:00
Jasper St. Pierre
37baeed66e headerbar: Remove unused private API
Don't remove gtkheaderbarprivate.h, even though it's empty,
since we'll add more to it soon.

https://bugzilla.gnome.org/show_bug.cgi?id=720233
2013-12-11 19:28:30 -05:00
Jehan
57f59010b8 Gettext comment for "default:LTR" must be before the string
https://bugzilla.gnome.org/show_bug.cgi?id=720096
2013-12-10 23:31:47 -05:00
Matthias Clasen
8596a34b8b Simplify a check
Whenever titlebar is set, title_box is pointing to the
same widget, so we can just always use title_box here.
Pointed out by Jasper St. Pierre.
2013-12-10 23:19:36 -05:00
Matthias Clasen
50a206223f Trivial typo fix 2013-12-10 23:03:12 -05:00
Matthias Clasen
05d34f9a5b Use ::has-subtitle when constructing CSD titlebars
GtkWindow was constructing a custom title label to
avoid the size reservation for a subtitle. This is
now easier with the ::has-subtitle property.
2013-12-10 23:03:12 -05:00
Matthias Clasen
1a6a86a867 GtkHeaderBar: Add a ::has-subtitle property
It is a fairly common case to just want a title, and not
reserve extra space for a subtitle. This is much easier
to get right by setting a boolean property than by
constructing a custom title widget.
2013-12-10 23:03:12 -05:00
Matthias Clasen
da08592ea1 Update headerbar title from window title
This removes a possible source of confusion in our API.
The title is now synchronized both ways between the window
and the headerbar.

https://bugzilla.gnome.org/show_bug.cgi?id=720067
2013-12-10 20:45:42 -05:00
Matthias Clasen
5918a4dae8 Sync the window title initially
When setting a custom titlebar that happens to be a GtkHeaderBar,
we connect to notify::title to pick up title changes on the headerbar,
but we forgot to sync the title initially. Fix that.
2013-12-10 18:44:26 -05:00
Matthias Clasen
f08df56211 Disconnect signal handlers
We connect to notify::title on app-provided titlebars, but
we forgot to disconnect the signal handler when unsetting
the titlebar.
2013-12-10 18:21:58 -05:00
Matthias Clasen
73bd03c9ed Add a function to determine the text direction
This function can be used in the rare cases where the locale
has to be changed after gtk_init(). Based on a patch
by Jehan <jehan@girinstud.io>.

https://bugzilla.gnome.org/show_bug.cgi?id=720096
2013-12-10 17:34:23 -05:00
Benjamin Otte
b6f9ce8a73 button: Allow :hover on insensitive buttons
You can still hover a mouse on insensitive elements; it's up to the
theme to disable that.
This is in line with the HTML/CSS interpretation of :hover.

Insensitive elements still cannot be clicked.

https://bugzilla.gnome.org/show_bug.cgi?id=719486
2013-12-07 01:39:38 +01:00
Benjamin Otte
860138b302 filechooser: Don't crash if invalid thumbnails exist
Failing to load a thumbnail returns a NULL pixbuf. Since the hidpi
patches this wasn't checked when creating the surface. Result: assertion
failure.

https://bugzilla.gnome.org/show_bug.cgi?id=719977
2013-12-07 01:39:38 +01:00
Torsten Schönfeld
904bc27250 gtkradio*: add (allow-none) annotations were appropriate
https://bugzilla.gnome.org/show_bug.cgi?id=679563
2013-12-06 23:57:16 +01:00
Matthias Clasen
8d3a91d6ba docs: Add a missing Since: tag 2013-12-05 09:08:35 -05:00
Lars Uebernickel
d736e8baf9 GtkMenuItem: only set 'separator' class on the separator line
To make the separator line distinguishable from the widget's normal
border from css.

https://bugzilla.gnome.org/show_bug.cgi?id=719861
2013-12-05 12:35:12 +01:00
Jasper St. Pierre
96d2eeb6ba recentchooserdefault: Clean up load_id when we have nothing left to do
Returning FALSE from a GSourceFunc will implicitly remove it, so we need
to do this in order to make the new g_source_remove happy.
2013-12-04 19:29:06 -05:00
Lionel Landwerlin
45216c4f60 window: enable client side decorations deactivation with wayland backend 2013-12-04 17:24:48 +00:00
Benjamin Otte
f765bb8803 treeview: Don't draw a background for the bin window
The bin window's background would have to be drawn in the bin window's
size and inside the pixel cache draw function to not cause transparency
issues.

But because it's unnecessary as the view window draws the same
background, we just skip it.

https://bugzilla.gnome.org/show_bug.cgi?id=709027
2013-12-04 10:40:03 +01:00
William Jon McCann
a34702a61f file-chooser: add a sort-directories-first gsetting
Add an option to sort folders before files in order to be
more constistent with the file manager.
2013-12-03 12:12:54 -05:00
Jonh Wendell
9d8a32b07d toolbar: draw a full box for separators
This allows themes do whatever they want as separators, with
paddings, borders and backgrounds.

If "wide-separators" property is true, then, instead of just draw
a frame, also render its background, and take into account the
padding property for its limits.

https://bugzilla.gnome.org/show_bug.cgi?id=719713
2013-12-03 09:55:58 -02:00
Benjamin Otte
9a0064c684 button: Call the new function
This simplifies a lot of code and doesn't require hacks setting
in_button anymore.
2013-12-03 01:57:38 +01:00
Benjamin Otte
804be65a09 button: Split out function
This is in preparation of the following cleanup commits.
2013-12-03 01:57:38 +01:00
Benjamin Otte
85b17e778c button: Don't emit a signal on broken grabs
We don't emit one on grab notify, so we don't want one for broken grabs
either.
2013-12-03 01:57:38 +01:00
Philip Withnall
b37f8b80b4 gtkprintunixdialog: Remove a redundant (GFile != NULL) check
g_file_new_for_uri() is guaranteed to return a non-NULL value, so this
check was redundant, and was confusing the static analyser into
returning a false positive, where it thought the file could be NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2013-12-02 10:36:26 +00:00
Philip Withnall
380150361b gtktreeselection: Eliminate a dead assignment
This is technically a dead assignment, but is nice to retain for
clarity. Moving it to the variable definition shuts scan-build up.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2013-12-02 10:36:26 +00:00
Philip Withnall
1adf0becc2 gtkthemingengine: Eliminate a dead assignment
This is technically a dead assignment, but is nice to retain for
clarity. Moving it to the variable definition shuts scan-build up.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2013-12-02 10:36:26 +00:00
Philip Withnall
5c5390f74b gtkthemingengine: Fix a definite use of an uninitialised variable
At this point, segments[1] is always uninitialised, and is used to
initialise itself. Looking at the code in the branch above, this appears
to have been a typo from segments[0], as segments[1] seems to typically
be 2 * segments[0].

Found by scan-build.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2013-12-02 10:36:26 +00:00
Philip Withnall
99a162c69e gtkpapersize: Reformat #if preprocessor commands
This eliminates some false positive warnings from scan-build, which was
not interpreting the #ifs and hence warning about unbalanced #endifs.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2013-12-02 10:36:26 +00:00
Philip Withnall
a265d8f32d gtkmenu: Fix potential use of uninitialised variables
The child_height out variable is only valid if compute_child_offset()
returns TRUE.

Found by scan-build.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2013-12-02 10:36:26 +00:00
Philip Withnall
480a005039 gtktreeviewaccessible: Fix potential uses of uninitialised variables
Found with scan-build.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2013-12-02 10:36:26 +00:00
Matthias Clasen
087b61f653 GtkRevealer: Fix size allocation with disabled animation
When animation is disabled, we use 'none' as the effective
transition type. So far, this transition type failed to change
the size request, causing the revealer to always take up the
space of the child, even when the child is not shown.

https://bugzilla.gnome.org/show_bug.cgi?id=719568
2013-12-01 21:45:17 -05:00
Matthias Clasen
96c0903799 Fix the AtkImage implementation for GtkIconView items
We were returning uninitialized values for image size and
position.

Found in a pile of patches in
https://bugzilla.gnome.org/review?bug=712760
2013-12-01 18:33:38 -05:00
Matthias Clasen
8377c12b15 Code cleanup
Don't compare booleans to FALSE.
2013-12-01 17:54:00 -05:00
Simon Feltman
af95d6628c annotations: Set GtkTreeModelFilterModifyFunc value argument to out
Use (out caller-allocates) annotation for the "value" argument to
GtkTreeModelFilterModifyFunc. This is needed because GI based language
bindings coerce GValue input args into native types and there is no
opportunity to set the value within the GValue itself.

https://bugzilla.gnome.org/show_bug.cgi?id=719460
2013-12-01 17:22:05 -05:00
Marco Brito
d31f3e5766 Add class toolbar before the style context is created for the widget.
The call to gtk_button_set_relief() in gtk_toolbar_init() indirectly
used the style context of the half-created widget, before we had a
chance to add the "toolbar" style class to it.

Reorder gtk_toolbar_init() to ensure that the proper style class is
set first.

https://bugzilla.gnome.org/show_bug.cgi?id=719595
2013-12-01 17:20:30 -05:00
Christian Persch
cc3c737088 infobar: Fix visibility when enable-animations=false
When enable-animations is false, the revealer's child-revealed property is
notified immediately, so make sure to connect to it before toggling the
revealer.

https://bugzilla.gnome.org/show_bug.cgi?id=719510
2013-12-01 23:17:28 +01:00
Aaron Hamilton
142d3f1d59 Correct the deprecation annotation for gtk_widget_modify_bg
It was pointing to a nonexisting function.

https://bugzilla.gnome.org/show_bug.cgi?id=719469
2013-12-01 17:03:48 -05:00
Matthias Clasen
56719c6363 Don't use depeprecated api
GtkPrintUnixDialog and testtitlebar were still using
gtk_widget_set_margin_left/right. Switch them over to
gtk_widget_set_margin_start/end.
2013-12-01 16:55:57 -05:00
Matthias Clasen
b53b5578f3 message dialog: Make labels wrap at a reasonable length
Several labels in GtkMessageDialog were set to wrap, but
did not set max-width-chars. Fix that.
2013-12-01 16:19:17 -05:00
Matthias Clasen
e036028402 about dialog: Make labels wrap at reasonable length
Several labels in GtkAboutDialog are set to wrap, but
don't set a value for max-width-chars. Fix that.
2013-12-01 16:18:07 -05:00
Matthias Clasen
8eeebda1e5 places sidebar: Use a symbolic desktop icon
This was pointed out in

https://bugzilla.gnome.org/show_bug.cgi?id=719505
2013-12-01 13:58:39 -05:00
Juan Pablo Ugarte
bbd0035625 GtkAboutDialog: fixed calling gtk_about_dialog_set_logo_icon_name()
with a NULL icon_name. Now it will actually use the default
window icon set as mention in the docs
2013-11-28 17:01:18 -03:00
Juan Pablo Ugarte
b5dff5e417 GtkIconCache: find_image_offset() return 0 if icon_name is NULL.
This avoid a crash calling gtk_about_dialog_set_logo_icon_name() with a NULL icon_name.
2013-11-28 16:56:11 -03:00
Manuel Bachmann
e45ea70936 Fix CSD check for Win32
Win32 does not have alpha channel currently ; fix the check
for this, so trying to enable CSDs on this platform will
not "succeed" and crash the app anymore.

Partially fixes gtk3-widget-factory.
2013-11-27 11:24:12 +01:00
Matthias Clasen
7c2a50728d Don't distribute gdbus-generated sources
These are supposed to be regenerated at build time,
to avoid dependencies on the dist-systems glib version.
2013-11-26 18:26:36 -05:00
Matthias Clasen
21114071ec Change the default for "show-desktop" back to TRUE
Change the GtkSettings default for "shell-shows-desktop" back to TRUE
and also change the default value of the "show-desktop" property on
GtkPlacesSidebar so that the defaultvalue test passes.

https://bugzilla.gnome.org/show_bug.cgi?id=712302
2013-11-26 14:21:01 -05:00
Michael Wood
89f78a718b bindings: Fix stray semicolons in CSS example for bindings
Semicolon shouldn't be at the end of binding set
2013-11-26 12:26:46 +00:00
Benjamin Otte
4e9356f339 menu: Do a proper min height request
The minimum height is the size of one menu item plus the arrows, not the
minimum size of all menu items.

https://bugzilla.gnome.org/show_bug.cgi?id=691974
https://bugzilla.gnome.org/show_bug.cgi?id=694859
2013-11-25 03:54:05 +01:00
Benjamin Otte
f18655c641 window: Don't assume 640x480 max default size
Instead, use the monitor's work area.

This might have unforseen side effects that warrant a later revert, such
as:
- Apparently some WMs assume maximizing when a window is maximum screen
  size.
- WMs might not shrink the window by the decorations' size when it tries
  to be fullscreen.
- Applications might have buggy size request code that causes weirdly
  sized windows.
2013-11-25 03:49:35 +01:00
Benjamin Otte
8308f4c1e9 stack: Fix crash on g_object_get("visible-child")
priv->visible_child is not a GtkWidget but a custom struct holding the
widget. So use the getter instead.
2013-11-25 03:49:35 +01:00
Benjamin Otte
46ed450a29 treemenu: Implement height-for-width properly 2013-11-25 03:49:35 +01:00
Philip Withnall
ada766025f gtktreeviewaccessible: Fix a potential division by zero
Found with scan-build.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2013-11-24 21:21:02 +00:00
Carlos Garnacho
da86918c32 combobox: Set GDK_SCROLL_MASK on the eventbox in appears-as-list mode
This is so the scroll wheel works in both modes, and there's no behavioral
change depending on a style property.

https://bugzilla.gnome.org/show_bug.cgi?id=702663
2013-11-20 13:18:37 +01:00
Jasper St. Pierre
da0ebcb7da Revert "stack: respect gtk-enable-animations setting"
It already respected enable-animations.

This reverts commit fb9ff44299.
2013-11-19 18:38:56 -05:00
Jasper St. Pierre
6f9b2ac805 wayland: Set DBus properties after we've constructed the xdg_surface 2013-11-19 16:37:25 -05:00
Jonh Wendell
7b85d1df50 treeview: Use CSS property "border-top-color" to draw grid lines
This allows themes to customize the grid line colors in treeviews.

https://bugzilla.gnome.org/show_bug.cgi?id=415415
2013-11-19 10:24:28 -02:00
Matthias Clasen
fb9ff44299 stack: respect gtk-enable-animations setting
https://bugzilla.gnome.org/show_bug.cgi?id=712632
2013-11-18 23:19:27 -05:00
Christian Persch
bf9ed44aa6 revealer: Respect gtk-enable-animations setting
https://bugzilla.gnome.org/show_bug.cgi?id=712632
2013-11-18 23:01:11 -05:00
Matthias Clasen
df455db2e3 GtkBuilder: Make IDs optional
One requirement of .ui files is that each object must have an ID,
even if it is never referred to or directly loaded from the code.
This makes editing .ui files much more onerous than it has to be,
due to the frequent need to invent new IDs, while avoiding
clashes.

This commit makes IDs optional in the XML. They only need to
be provided for objects which are referred to or explictly loaded
from the code. Since GtkBuilder needs IDs for its own internal
accounting, we create IDs of the form ___object_N___ if not
specified in the XML.

https://bugzilla.gnome.org/show_bug.cgi?id=712553
2013-11-18 06:00:02 -05:00
Jasper St. Pierre
55605fe685 gtkwindow: Fix cast warning 2013-11-17 18:50:53 -05:00
Jasper St. Pierre
1941f3ff17 gtkwidget: Fix up some deprecation warnings 2013-11-17 18:50:53 -05:00
Matthias Clasen
d297500976 Use window icons for fallback
When the window has an icon, use it for the fallback menu
button.
2013-11-16 17:04:30 -05:00
Matthias Clasen
07d71cf945 Small doc improvements 2013-11-16 15:00:16 -05:00
Matthias Clasen
9e18a52156 Fix fallback menubar size allocation
When the menubar inserted by GtkApplicationWindow is the widest
widget in a csd window, its allocation gets cut short. Fix this
by taking the decoration size into account while calculating
the size request (it is implicitly taken into account in the
size allocation phase by _gtk_window_set_allocation).
2013-11-16 14:52:26 -05:00
Matthias Clasen
73b02933d0 GtkWindow: better app menu fallback for CSD
Do the menubutton for app menu fallback ourselves in GtkWindow
for the csd, non-custom titlebar case. This fits better with
the way we handle other title buttons. Themes have control
over the placement of this button by placing menu in the
decoration-button-layout style property.
2013-11-16 14:52:21 -05:00
Matthias Clasen
cb24305f1b Trivial cleanup 2013-11-16 14:52:21 -05:00
Matthias Clasen
805bf49be9 Trivial whitespace fix 2013-11-16 14:52:21 -05:00
Matthias Clasen
3ee5404772 GtkApplicationWindow: Avoid double fallback for the app menu
If we have a header bar which has the app menu fallback
enabled, don't add the app menu to the fallback menubar.
2013-11-16 01:52:04 -05:00
Matthias Clasen
2863bb287c GtkHeaderBar: Add a fallback app menu implementation
Allow showing the fallback app menu with a menu button
in the header bar. Applications have to explicitly enable
this by calling gtk_header_bar_set_show_fallback_app_menu.
2013-11-16 01:50:39 -05:00
Matthias Clasen
cadef51b3d GtkWindow: Make titlebar widget available privately
This will be used in GtkApplicationWindow in the
following commits.
2013-11-16 01:39:41 -05:00
Matthias Clasen
9a04a27ba6 GtkButton: don't propagate double-clicks
It is basically always unexpected to have a container handle
double-clicks on a widget that handles single-clicks itself.
2013-11-15 23:43:05 -05:00
Matthias Clasen
00be62546f GtkAboutDialog: Fix a corner case of link highlighting
GtkAboutDialog highlights emails written as <...> and
urls written as http://... . gnome-terminal manages to
put <http://...> into its license text, which sadly
confuses the parser into running evolution on http://...

Fix things up far enough that <http://...> is now
recognized as url, and only the part inside the <> is
underlined (for email addresses, we include the <> in
the underline).
2013-11-15 14:42:34 -05:00
Matthias Clasen
df2b534042 GtkSettings: make show-desktop default to FALSE
This broke tests.
2013-11-15 07:49:50 -05:00
Benjamin Otte
06a64ccfcf stylecontext: Revert part of previous commit
Commit 719dd636a9 replaces
margin-left/right with margin-start/end. CSS does not have
margin-start/margin-end properties, the sed script was a bit overeager.

Fwiw, CSS implements RTL margin styling via :dir(rtl) selectors.
2013-11-15 04:33:38 +01:00
Cosimo Cecchi
f4f82e736c GtkPlacesSidebar: don't unref an object we don't own
gtk_settings_get_default() doesn't return a reference, so don't unref it
during dispose.
2013-11-14 18:30:47 -08:00
Yosef Or Boczko
719dd636a9 Replace all margin-left and margin-right with margin-start and margin-end
https://bugzilla.gnome.org/show_bug.cgi?id=710238
2013-11-15 02:54:35 +01:00
Yosef Or Boczko
9921bec63a GtkWidget: Add margin-start and margin-end properties
Add margin-{start,end} and gtk_widget_{get,set}_margin_{start,end}
and drop margin-{left,right} and gtk_widget_{get,set}_margin_{left,right}.

margin-{start,end} handle right also in RTL.

https://bugzilla.gnome.org/show_bug.cgi?id=710238
2013-11-14 21:55:50 +01:00
Ryan Lortie
c4141a2115 GtkPlacesSidebar: use shell-shows-desktop setting
Use the just-added shell-shows-desktop GtkSetting to determine if we
should also show the "Desktop" folder in the places sidebar.

https://bugzilla.gnome.org/show_bug.cgi?id=712302
2013-11-14 15:03:04 -05:00
Ryan Lortie
a90bb7de0e Add a GtkSetting for 'shell-shows-desktop'
Add a GtkSetting for whether the desktop shell is showing the desktop
folder icons.

This is on by default because most desktop shells do show the icons on
the desktop.  We already have a patch in gnome-settings-daemon to bind
this to the org.gnome.desktop.background show-desktop-icons GSettings
key which is off by default on GNOME.

https://bugzilla.gnome.org/show_bug.cgi?id=712302
2013-11-14 15:03:04 -05:00
Bastien Nocera
3f5af532f7 GtkPlacesSidebar: Show unmounted bookmarks
The GtkFileInfo is only used if there's no bookmark name,
or to get the icon for the remote share or local folder.

https://bugzilla.gnome.org/show_bug.cgi?id=711548
2013-11-13 23:23:50 -05:00
Colin Walters
3c6c90086f gtktextattributes: Only use transparent union for g-ir-scanner
https://bugzilla.gnome.org/show_bug.cgi?id=711158
2013-11-13 12:59:57 -05:00
Alexander Larsson
4226f97d54 broadway: Support ipad on-screen keyboard
We add a custom im module for broadway that calls some broadway
specific APIs to show/hide the keyboard on focus in/out. We then forward this
to the browser, and on the ipad we focus an input field to activate
the keyboard.
2013-11-13 12:23:06 +01:00
Matthias Clasen
99fb39460a GtkApplicationWindow: avoid mis-allocation
In the fallback case, we were adding the border width of the
window twice, causing the content to be mis-positioned and
cut off in some cases.

https://bugzilla.gnome.org/show_bug.cgi?id=710909
2013-11-12 21:01:29 -05:00
Lars Uebernickel
255c3a081e GtkMenuTracker: set action namespace correctly
gtk_menu_tracker_add_items() fetched the action-namespace from the menu
item, but didn't pass it into gtk_menu_tracker_section_new() when its
internal namespace was still NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=712164
2013-11-12 15:42:23 -05:00
Xavier Claessens
9223e3c25a GtkStack: add transition-running property
This is useful to know when the transition is done we can
remove the child from the stack.

https://bugzilla.gnome.org/show_bug.cgi?id=711494
2013-11-12 10:27:45 -05:00
Matthias Clasen
0db8aeaad9 treeview: fix dragging of columns in mutter
Don't recurse the mainloop in _gtk_tree_view_column_start_drag().
It doesn't serve any discernible purpose, and recursing the
mainloop from the flush-events phas of the frame clock breaks
frame synchronization with mutter.

https://bugzilla.gnome.org/show_bug.cgi?id=705176
2013-11-11 23:17:14 -05:00
Olivier Brunel
fc8be96163 gtkpixelcache: Fix possibly ignoring queued redraw
If a queue_redraw() (invalidating a region, or the whole widget) was
called from the draw() call, it could get ignored if surface_dirty
existed, as it would then be updated, but destroyed right at the end of
the _gtk_pixel_cache_repaint(), leading the next call to
_gtk_pixel_cache_draw() have its call to repaint() be a no-op
(since there's no surface_dirty) and then simply draw from (non
updated) surface.

Signed-off-by: Olivier Brunel <jjk@jjacky.com>

https://bugzilla.gnome.org/show_bug.cgi?id=711545
2013-11-11 23:17:14 -05:00
Matthias Clasen
10cd226dfe Progress bar: Handle 'no more pulse'
Before smooth animation, stopping the pulse would abruptly stop
the bouncy bar. This change makes it so that we slow down for
a bit, and then stop.
2013-11-11 07:24:35 -05:00
Matthias Clasen
eae9513cbd Make activity mode progress bars animate better
Use a tick callback and move the block each frame, instead
of making it jump only when gtk_progress_bar_pulse() is called.
2013-11-10 01:20:27 -05:00
Matthias Clasen
2b177587e6 Move a function around
_Gtk_file_chooser_label_for_file is not actually
used in gtkfilechooserdefault.c anymore, so move
it to a better place.
2013-11-09 19:27:53 -05:00
Matthias Clasen
8b7940c0b1 Silence a compiler warning 2013-11-09 19:26:22 -05:00
Matthias Clasen
2a6039e47f Filter out duplicate application shortcuts
The file chooser used to do this, the places sidebar
still needs to learn it.

https://bugzilla.gnome.org/show_bug.cgi?id=711636
2013-11-09 19:01:27 -05:00
Matthias Clasen
90c4515678 GtkFileChooser: propagate local-only to sidebar
This fixes a regression from the sidebar merge.
2013-11-09 18:32:51 -05:00
Matthias Clasen
9e5a8b7ae1 GtkPlacesSidebar: Add local-only
This is necessary to implement the filechooser property
of the same name.

https://bugzilla.gnome.org/show_bug.cgi?id=711574
2013-11-09 18:32:51 -05:00
Matthias Clasen
bce6185494 Update coding style
gtkplacessidebar.c was looking foreign.
2013-11-09 18:32:51 -05:00
Matthias Clasen
3abae96740 Properly set drop targets
Pointed out in by Nelson Benitez in bug 707679.
2013-11-09 15:20:02 -05:00
Matthias Clasen
9dac49798e GtkFileChooserDefault: Drop some unused struct members 2013-11-09 14:55:11 -05:00
Matthias Clasen
b2ebebe954 Cosmetic cleanups
Simplify and rename some callbacks.
2013-11-09 14:27:08 -05:00
Lionel Landwerlin
be5b6460e7 menushell/toolbar/window: implement toggle maximize on double click
https://bugzilla.gnome.org/show_bug.cgi?id=700419
2013-11-09 14:19:47 -05:00
Matthias Clasen
9def8c20b8 Slow down about dialog animation a bit 2013-11-09 13:43:54 -05:00
Jonh Wendell
c292401162 toolbar: implement minimum and natural sizes in _get_preferred family
currently it's using the same sizes for natural and minimum, but it
happens that, when it's allowed to use the arrow, the minimum size
can be smaller than natural.

https://bugzilla.gnome.org/show_bug.cgi?id=693227
2013-11-09 13:26:35 -05:00
Timm Bäder
dd6f4fb785 GtkListBox: Expand the placeholder
https://bugzilla.gnome.org/show_bug.cgi?id=711255
2013-11-09 10:50:02 -05:00
David King
468fd38531 stack: Use g_object_notify_by_pspec()
https://bugzilla.gnome.org/show_bug.cgi?id=711611
2013-11-09 10:45:06 -05:00
David King
2454522b26 stack: Use g_object_class_install_properties()
https://bugzilla.gnome.org/show_bug.cgi?id=711611
2013-11-09 10:45:06 -05:00
Alexander Larsson
bbfe7e0e69 broadway: Always use client side decorations 2013-11-07 14:09:53 +01:00
Chenthill Palanisamy
1fd74de214 Do not reset the waiting_for_printer on status change
* gtk/gtkprintunixdialog.c (printer_status_cb): Do not reset the
waiting_for_printer on status change as the default printer might
get added later.

https://bugzilla.gnome.org/show_bug.cgi?id=577642
2013-11-05 13:33:40 +01:00
Timm Bäder
dcc9800bc2 GtkAboutDialog: Use :link and :visited for link colors
https://bugzilla.gnome.org/show_bug.cgi?id=709629
2013-11-04 16:36:11 +01:00
Timm Bäder
2ba33adf96 GtkLinkButton: Use :link and :visited for the label's color
https://bugzilla.gnome.org/show_bug.cgi?id=709629
2013-11-04 16:36:11 +01:00
Timm Bäder
5201c876d5 GtkLabel: Use :visited and :link for link colors
https://bugzilla.gnome.org/show_bug.cgi?id=709629
2013-11-04 16:36:11 +01:00
Timm Bäder
9b1c943190 css parser: Add :link and :visited
... which are both to be used for links instead of the current
-GtkWidget-link-color and -GtkWidget-visited-link-color

https://bugzilla.gnome.org/show_bug.cgi?id=709629
2013-11-04 16:36:11 +01:00
Lars Uebernickel
2f0c610c35 GtkEntryCompletion: fix warning 2013-11-03 19:08:41 +01:00
Lars Uebernickel
a9a6fb045a gtk_entry_completion_get_cells: revert returning NULL
Too many applications and libraries depend on accessing the internally
created cell renderer. Allow that again, but print a warning.
2013-11-03 19:02:01 +01:00
Colin Walters
c9892df362 gtktextattributes: Use an anonymous union instead of arch-testing #ifdef
This avoids having Gtk-3.0.gir differ on 32 vs 64 bit, which causes
issues for "multilib" in Fedora/OpenSUSE type systems.

See https://bugzilla.gnome.org/show_bug.cgi?id=711153 for more
information.

https://bugzilla.gnome.org/show_bug.cgi?id=711158
2013-11-03 11:15:43 -05:00
Paolo Borelli
e077660e1e eventbox: also draw css borders if specified
https://bugzilla.gnome.org/show_bug.cgi?id=711324
2013-11-03 14:13:16 +01:00
Paolo Borelli
144a92ef11 grid: draw css background and borders
https://bugzilla.gnome.org/show_bug.cgi?id=711324
2013-11-03 14:13:16 +01:00
Paolo Borelli
ba6128f8af fixed: draw css background and borders
https://bugzilla.gnome.org/show_bug.cgi?id=711324
2013-11-03 14:13:16 +01:00
Lars Uebernickel
3c28297134 GtkEntryCompletion: call cell_area()->clear()
Call gtk_cell_layout_clear() on the area instead of the completion in
gtk_entry_completion_clear_text_column_renderer(), because it is also
called from within gtk_entry_completion_clear().
2013-11-03 14:05:44 +01:00
Lars Uebernickel
f6a0debdd9 gtk_entry_completion_set_text_column: reuse old renderer
gtk_entry_completion_set_text_column() always added a cell renderer,
regardless of whether there was an existing one already installed.  This
patch reuses an old renderer if it exists, but only if it was added by a
previous call to this function.

To avoid conflicts, all renderers that were added manually are removed
when calling this function. Also, the renderer added by this function is
removed when manually adding new renderers. This effectively gives
GtkEntryCompletion two modes (managed and manual cell renderers) and
allows seamless switching between the two.

This is a minor API break. However, this shouldn't be an issue in
practice as applications couldn't call set_text_column() more than once
because of this bug. Also, it is unlikely that many applications mix
set_text_column() and custom cell renderers. The interaction between the
two modes was erratic and not documented well.

https://bugzilla.gnome.org/show_bug.cgi?id=635499
2013-11-02 20:14:22 +01:00
Jasper St. Pierre
1e70ad1cd1 gtksettings: Allow setting the GTK+ theme with an envvar
To test with Raleigh much easier.
2013-11-01 16:04:02 -04:00
Jasper St. Pierre
08053cbbb8 frame: Remove a couple strange casts... 2013-11-01 14:16:18 -04:00
Lars Uebernickel
9761a966d8 GtkEntryCompletion: call setter for "text-column"
Call gtk_entry_completion_set_text_column() when setting the
"text-column" property directly.

The completion appeared empty when setting "text-column" directly (for
example from a GtkBuilder file), because the setter creates and adds the
GtkCellRendererText.

https://bugzilla.gnome.org/show_bug.cgi?id=710533
2013-11-01 08:24:16 -07:00
Jasper St. Pierre
4f7170fd56 stack: Fix the slide animation if the child has a non-zero allocation position
This can happen if the child has a margin, for instance.
2013-11-01 01:53:20 -04:00
Jasper St. Pierre
3e836dd9fc stack: Scope some variables so that the code is clearer
... that the allocation magic here is for the transition of the
last visible child that's sliding out.
2013-11-01 01:53:20 -04:00
Jasper St. Pierre
499b4bb60f gtkoverlay: Remove get_preferred_width / get_preferred_height implementation
GtkBin now handles this for us.
2013-11-01 01:15:25 -04:00
Jasper St. Pierre
698488ddc4 gtkbox: Draw backgrounds and borders 2013-10-31 12:21:08 -04:00
Matthias Clasen
14e3340647 Make treeview cursor handling a bit more robust
Clearing the model in a GtkTreeSelection::changed handler was
crashing. While it is not a 100% kosher thing to do, lets be
more robust here.
2013-10-30 14:08:28 -04:00
Jasper St. Pierre
ad59827ec8 Revert "wayland: Support always-on-top / sticky windows"
This reverts commit b3cffb85f3.

Pushed by accident.
2013-10-29 17:13:03 -04:00
Daniel Svensson
4d41903548 Use g_return_val_if_fail where return value needed.
https://bugzilla.gnome.org/show_bug.cgi?id=710987
2013-10-29 17:12:23 -04:00
Jasper St. Pierre
b3cffb85f3 wayland: Support always-on-top / sticky windows
Use the new gtk-shell APIs available in mutter to add support for this.

https://bugzilla.gnome.org/show_bug.cgi?id=710056
2013-10-28 18:03:26 -04:00
Jasper St. Pierre
baa471ec13 gtkdialog: Allow specifying response IDs by nick in <action-widgets>
This makes it a lot more convenient for developers, as they don't
have to look up the numeric value of response IDs.
2013-10-28 18:03:25 -04:00
Matthias Clasen
0cda29be88 Remove debug spew 2013-10-28 07:17:25 -04:00
Alexander Larsson
864f7f7ebc GtkWidget: Fix clipping to large subwindows
_gtk_widget_draw_internal() was clipping by passing the subwindow
sizes as a path to cairo_clip(). This was breaking for windows
larger than 23 bits in width/height, due to cairo using fixed point
(24.8) for the path coordinates.

We fix this by pre-clipping the subwindow region to the existing
cairo clip region in the full 32bit gdkwindow precision. This fixes
the GooCanvas Large Items test.

https://bugzilla.gnome.org/show_bug.cgi?id=710958
2013-10-28 11:56:52 +01:00
Matthias Clasen
0b726a409e Revert "dialog: Fix docs for GtkDialog"
This reverts commit e4bb02f8ae.

Responses don't have to be negative.
2013-10-28 06:39:30 -04:00
Matthias Clasen
c46aca463a Respect deprecated button images setting
I have been convinced that it is a bad idea to change the behaviour
at the same time as deprecating it, so go back to respecting the
Gtk/ButtonImages xsetting in buttons created with
gtk_button_new_from_stock() when it is set.

The setting as well as the function are still deprecated, and the
default value of the setting will remain FALSE.
2013-10-24 20:35:55 -04:00
Matthias Clasen
627a03683f Respect deprecated menu images setting
I have been convinced that it is a bad idea to change the behaviour
at the same time as deprecating it, so go back to respecting the
Gtk/MenuImages xsetting in GtkImageMenuItem when it is set.

The setting as well as the widget are still deprecated, and the
default value of the setting will remain FALSE.
2013-10-24 20:03:02 -04:00
Matthias Clasen
cf00c43154 Revert "GtkPlacesSidebar: support switching locations for XDS drag types"
This reverts commit 588ffa8c32.
2013-10-23 15:55:14 -04:00
Matthias Clasen
c9f8d22094 Revert "GtkPlacesSidebar: support open locations when dragging text"
This reverts commit 1b839d4b72.
2013-10-23 15:54:52 -04:00
Matthias Clasen
aa7bb22685 Revert "GtkPlacesSidebar: use gtk api to add dnd uri targets"
This reverts commit 7fa27dff25.
2013-10-23 15:54:44 -04:00
Nelson Benítez León
7fa27dff25 GtkPlacesSidebar: use gtk api to add dnd uri targets
Instead of hardcoding it in the dnd drop targets list.

Part of bug 707679
2013-10-23 20:20:33 +02:00
Nelson Benítez León
1b839d4b72 GtkPlacesSidebar: support open locations when dragging text
Make GtkPlacesSidebar also open locations when hovered by
text dnd targets.

Part of bug 707679
2013-10-23 20:20:33 +02:00
Nelson Benítez León
588ffa8c32 GtkPlacesSidebar: support switching locations for XDS drag types
Make GtkPlacesSidebar also change locations when hovered
by XDS dnd targets (eg. dragging a file from file-roller).

Part of bug 707679
2013-10-23 20:20:33 +02:00
Jasper St. Pierre
e4bb02f8ae dialog: Fix docs for GtkDialog
Responses need to be negative
2013-10-23 12:04:13 -04:00
Bastien Nocera
255fafb891 GtkScrolledWindow: Disconnect from frame clock properly
The tick callback IDs from GtkWidget aren't timeouts, so
use the correct function to disconnect from them.

Spotted by Benjamin Otte <otte@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=710666
2013-10-23 15:22:31 +02:00
Bastien Nocera
7c12e6480b GtkWidget: Avoid lingering clock frame updates
For some widgets, like GtkTreeView, which setup a clock frame
update during realize, it was possible to call
gdk_frame_clock_begin_updating() twice, but only ever disconnecting
from it once. This happens because the realized flag is set at an
unpredictable time by the GtkWidget's realize implementation.

Keep the signal handler ID from us connecting to the "update" signal
to avoid connecting to it twice.

This fixes high wake-up count from any application using GtkTreeView,
even idle ones.

https://bugzilla.gnome.org/show_bug.cgi?id=710666
2013-10-23 15:22:27 +02:00
Bastien Nocera
438cd857c4 all: Add names to timeouts
Add names to every timeout we setup, so it's easier to track their
usage, and debug possible misbehaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=710651
2013-10-23 13:31:18 +02:00
Matthias Clasen
a093cd2a22 Icon theme: Hardcode fallback through the 'gnome' icon theme
This is what we used to get through the Net/FallbackIcontheme
setting. Nobody has ever set this setting to a different value,
and people have come to rely on GTK+ applications getting their
icons this way.
2013-10-21 12:58:29 -04:00
Debarshi Ray
bcc6979f89 flowbox: Always return a NULL iter when we are at the end
The objective is simplify the semantics of the code so that we don't
need to check for "(iter != NULL && !g_sequence_iter_is_end (iter))"
in the callers.
2013-10-21 16:33:13 +02:00
Debarshi Ray
65dd26d3f3 flowbox: Be careful when the container is empty
Otherwise, showing an empty GtkFlowBox will lead to:
GLib-CRITICAL **: g_sequence_get: assertion '!is_end (iter)' failed
2013-10-21 16:21:11 +02:00
Jasper St. Pierre
3971ed1779 gtktoolbar: Make the icon-size property actually an enum
As this is what it's interpreted as.
2013-10-18 16:14:26 -04:00
Jasper St. Pierre
0ff2dbd6fc stackswitcher: Only show a button if the stack child is visible 2013-10-17 16:24:00 -04:00
Jasper St. Pierre
fa6f83d89a gtkflowbox: Fix warning when realizing
set_background needs the widget's window to be set.
2013-10-17 15:14:57 -04:00
Matthias Clasen
9bd87b37bc Add docs for new API 2013-10-16 23:45:23 -04:00
Matthias Clasen
85bfbebd08 Fix since tags
Mark 3.12 api as such.
2013-10-16 23:45:23 -04:00
William Jon McCann
05b1ea84b4 notebook: inform the theme whether show-borders was set
So that it can draw a border or not. If show-borders=true then
the notebook will have GTK_STYLE_CLASS_FRAME.
2013-10-16 12:03:33 -04:00
Timothy Arceri
05cc3b6df6 Remove superfluous g_file_test()
https://bugzilla.gnome.org/show_bug.cgi?id=168530
Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
2013-10-15 21:45:59 -04:00
Olivier Brunel
48770fda30 Fix GtkToolButton possibly being empty
With style BOTH_HORIZ the label would not be selected (if not marked
"important") and when there's no icon, it would result in an empty button.

Signed-off-by: Olivier Brunel <jjk@jjacky.com>

https://bugzilla.gnome.org/show_bug.cgi?id=710134
2013-10-15 21:44:18 -04:00
Alexander Larsson
07eafbaaa8 GtkBuilder: Fall back to gtk_test_register_all_types if type lookup fails
This is important because the dlsym() approach can fail if gtk was
loaded with RTLD_LOCAL.

https://bugzilla.gnome.org/show_bug.cgi?id=710096
2013-10-15 21:41:35 -04:00
Matthias Clasen
4b7eaee959 Fix an oversight
Followup for 3c41d4865e
2013-10-15 21:30:35 -04:00
Matthias Clasen
6d5cbf16d6 Fall back to non-symbolic icons
When doing fallback for symbolic icons, we first shorten
the name at dashes while preserving the -symbolic suffix.
But after exhausting that, we should also try stripping
the suffix.

https://bugzilla.gnome.org/show_bug.cgi?id=708163
2013-10-15 21:19:17 -04:00
Olivier Brunel
14414d5946 tooltip: Fix possible wrong placement
When showing a tooltip on the edge of a monitor, the tooltip could be wrongly
placed and be shown going from one monitor to the next.

This happened because the current_window wasn't set visible, and when it wasn't
the returned allocated size would be 1, hence wrong calculations.

Signed-off-by: Olivier Brunel <jjk@jjacky.com>

https://bugzilla.gnome.org/show_bug.cgi?id=698730
2013-10-15 21:13:48 -04:00
Yosef Or Boczko
d1e218f4ab Fix a warning
The PangoWrapMode enum has identical layout to GtkWrapMode,
but using the two interchangably causes (justified) compiler
warnings.

https://bugzilla.gnome.org/show_bug.cgi?id=709697
2013-10-15 20:11:30 -04:00
Matthias Clasen
6b7981d2f5 Set an error when loading a GtkIconInfo fails
Failure to do so leads to assertion failures.
https://bugzilla.gnome.org/show_bug.cgi?id=710073
2013-10-15 20:06:24 -04:00
Ryan Lortie
9a6ee36e9c GtkApplication: a new approach to accels
Rework how accels are handled on GtkApplicationWindow.

Instead of having GtkApplication fill the GtkAccelMap which is then used
by GtkApplicationWindow to create a GtkAccelGroup filled with closures
that is then associated with the window, do it directly.

GtkApplication now keeps a list of accels and their actions.
Accelerators on a GtkApplicationWindow ask GtkApplication to execute the
appropriate action.

This saves a fair bit of complexity and memory use (due to not having to
create all those closures and accelmap entries).  The new approach also
supports multiple accels per action (although there is not yet a public
API for it).

This patch (and the ones before) Reviewed and ACK'd by Matthias Clasen.
2013-10-15 09:24:12 -04:00
Ryan Lortie
afa8b0178f GtkMenuTrackerItem: add support for dynamic accels
Add support for pulling the primary accel out of the GtkActionMuxer.

With this change, it is no longer necessary to have the accel=''
attribute hardcoded onto each menu item (and, in fact, it should be left
off if you intend to have support for dynamic accelerator changing).

Specifying accel='' is a good way to force an accelerator not to be
displayed on a menu item.
2013-10-15 09:24:12 -04:00
Ryan Lortie
2074daccf5 GtkMenuTrackerItem: use "action and target" format
Store "action and target" format inside each GtkMenuTrackerItem.  This
makes action invocation more efficient (no hash table lookups or
allocations) and slightly simplifies handling of action namespace.

More importantly, this will be used when we start to get accels from
GtkActionMuxer.
2013-10-15 09:24:11 -04:00
Ryan Lortie
3f8c235593 GtkActionMuxer: store primary accels
Reuse the existing infrastructure in GtkActionMuxer for propagation of
accelerator information: in particular, what accel label ought to appear
on menu items for a particular action and target.

This is a good idea because we want accels to travel along with the
actions that they're tied to and reusing GtkActionMuxer will allow us to
do that without creating another hierarchy of a different class for the
sole purpose of filling in accel labels on menu items.

Doing it this ways also allows those who copy/paste GtkActionMuxer to
insert the accels for themselves.

Add a new method on the GtkActionObserver interface to report changes.

This patch introduces a new concept: "action and target" notation for
actions.  This format looks like so:

  "'target'|app.action"

or for non-targeted actions:

  "|app.action"

and it is used over a number of possible alternative formats for some
good reasons:

 - it's very easy to get a nul-terminated action name out of this format
   when we need it, by using strrchr('|') + 1

 - we can also get the target out of it using g_variant_parse() because
   this function takes a pointer to a 'limit' character that is not
   parsed past: we use the '|' for this

 - it's extremely easy to hash on this format (just use a normal string
   hash) vs. attempting to hash on a string plus a GVariant

A close contender was to use detailed action strings here, but these are
not used for two reasons:

 - it's not possible to easily get the action name or target out of the
   strings without more work than the "action and target" format
   requires

 - we still intend to use detailed action strings on API (since they are
   a lot nicer to look at) but detailed action strings can be given in
   non-canonical forms (eg: 'foo::bar' and 'foo("bar")' are equivalent)
   so we'd have to go through a normalisation step anyway.  Since we're
   doing that already, we may as well convert to a more convenient
   internal format.

This new "action and target" format is going to start appearing in a lot
more places as action descriptions are introduced.

I suspect that nobody is using '|' in their action names, but in case I
am proven wrong, we can always switch to using something more exotic as
a separator character (such as '\x01' or '\xff' or the like).
2013-10-15 09:24:11 -04:00
Ryan Lortie
abcddd3ae0 GtkWindow: change muxer setup with application
Previously, GtkWindow would add the "app" action group to its own
toplevel muxer.

Change the setup so that GtkApplication creates the toplevel muxer and
adds itself to it as "app".  Use this muxer as the parent muxer of any
GtkWindow associated with the application.

This saves a small amount of memory and will allow for accels to be
propagated from the application through to all of the windows.
2013-10-15 09:24:11 -04:00
Ryan Lortie
3f0b9a7574 GtkBuilder: add GtkApplication
Add a GtkApplication (private) field to GtkBuilder
2013-10-15 09:24:11 -04:00
Matthias Clasen
d967266b77 Fix a crash in icon handling
The load_error was freed in two places.
Fix based on a patch in
https://bugzilla.gnome.org/show_bug.cgi?id=709967
2013-10-15 08:04:25 -04:00
Matthias Clasen
f9c8fefeda Restore accessible names for image-only buttons
With the stock system being deprecated now, we should provide
meaningful accessible names for buttons that are constructed
from icon names or GIcons. This commit reuses the existing
translations.

It is possible that some common icon names are not covered
here because they were not present as stock items. These can
be added to the table later.
2013-10-14 10:37:58 -04:00
John Ralls
d0065270ac Fix double-free introduced in f86dc163 2013-10-11 10:54:15 -07:00
William Jon McCann
b33877e173 spinner: don't expand to fill the allocated space
Spinners are essentially animated symbolic icons. We don't really
want them being rendered to arbitrary sizes. Also the current
technique for rendering the activity is not suitable for larger
sizes. Until we have a better technique we should limit the size
to the MENU icon size or exactly twice that size.
2013-10-11 08:38:37 -04:00
Florian Müllner
dd85acbaf1 listbox: Fix keynav_failed() parameter in move_cursor()
The 'direction' parameter to gtk_widget_keynav_failed() is based on
gtk_list_box_move_cursor()'s 'count' parameter. However if the passed
in movement is GTK_MOVEMENT_DISPLAY_LINES, 'count' is modified by
the keynav handling and will always be 0. To avoid messing up the
'direction' parameter, use a local variable for keynav handling and
leave 'count' untouched.

https://bugzilla.gnome.org/show_bug.cgi?id=709687
2013-10-11 13:11:59 +02:00
Murray Cumming
22fe579d37 GMenu docs: Tiny grammar fix 2013-10-11 10:25:24 +02:00
John Ralls
108c20bd51 Suppress cursor theme unsupported warning when there's no theme. 2013-10-10 15:39:25 -07:00
John Ralls
9e0faf6a38 Implement gtk_drag_begin_with_coordinates () for quartz. 2013-10-10 15:37:27 -07:00
John Ralls
f86dc163b9 Quartz: Set the drag context target list
So that gdk_drag_context_list_targets() actually returns something.
2013-10-10 15:37:27 -07:00
Dan Williams
7d0d90ad62 GtkCellRendererToggle: correct "toggled" signal documentation
Previous commit wrongly identified "active" as containing the new
value.  Instead, applications must determine the new value to
update the model with manually based on the value currently in the
model.
2013-10-10 17:07:42 -05:00
Dan Williams
e869399369 GtkCellRendererToggle: update documentation of 'toggled' signal
Clarify that applications are expected to handle updating the model
from the 'active' property, like GtkCellRendererText does for the
'edited' property.
2013-10-10 15:33:36 -05:00
William Jon McCann
2e53f90e07 search-bar: use menu icon size for the close button 2013-10-10 16:06:49 -04:00
William Jon McCann
f2d229e2ce search-bar: make independent of toolbar styling
Don't use a toolbar as an implementation detail of the search bar
to make styling them differently a bit easier.
2013-10-10 16:06:49 -04:00
Xavier Claessens
d5c36c62ed GtkSearchBar: replace incomplete example with a real one
https://bugzilla.gnome.org/show_bug.cgi?id=709745
2013-10-10 14:48:13 -04:00
Xavier Claessens
f979c3d7a2 GtkMenu: Document that gtk_widget_insert_action_group() can be used 2013-10-10 14:07:41 -04:00
Jasper St. Pierre
81538d492e revealer: Use the same transition animation as GtkStack 2013-10-09 18:29:41 -04:00
Jasper St. Pierre
ee8b3efbcf stack: Remove some confusing whitespace 2013-10-09 18:29:41 -04:00
Jasper St. Pierre
ddb4034e8e Fix GI warnings 2013-10-09 14:19:54 -04:00
David King
5f61183158 stack: Warn when setting a visible child which is not in the stack
https://bugzilla.gnome.org/show_bug.cgi?id=709613
2013-10-08 10:55:29 +01:00
Matthias Clasen
1e1c1556f6 Another forgotten a11y header 2013-10-07 16:43:36 -04:00
William Jon McCann
9fc3e59673 range: start autoscrolling near the edges of ranges
If a range goes all the way to the edge of the screen then we don't
have any way to activate autoscrolling. By adding a small region
at the ends of the range we can handle this case. This is the same
approach used in treeviews.
2013-10-07 16:38:49 -04:00
Matthias Clasen
1f4c60256f Install flowbox a11y headers
Pointed out by Jasper St. Pierre.
2013-10-07 16:29:51 -04:00
Chun-wei Fan
d47eac5ba5 gtk/gtkflowbox: Fix build warning/error
The newly-added gtk_flow_box_child_is_selected() needed to return a
gboolean, so use g_return_val_if_fail() to return FALSE when an invalid
GtkFlowBoxChild* is passed in.
2013-10-07 12:13:11 +08:00
Matthias Clasen
98e8505234 Tweak flowbox selection behaviour
Make flowbox selection more orthodox. Control and Shift now
modify the selection behaviour pretty much in the same way
they do in a tree view, and clicking without modifiers will
clear the selection.

When dealing with touch devices, we treat modifier-less events
as modifying the selection.

This commit also adds a few other selection necessities, such
as catching Escape key presses to cancel rubberband selection,
and handling grab notify.
2013-10-06 23:31:18 -04:00
Matthias Clasen
b937557d95 Make resetting a filter work properly
We need to make sure all children are marked as child-visible
again when the filter func is reset.
2013-10-06 23:31:18 -04:00
Matthias Clasen
f733903334 Fix wording in the docs 2013-10-06 23:31:17 -04:00
Matthias Clasen
943d575ec3 Add GtkFlowBox
GtkFlowBox is a container that its children in a reflowing
grid, which can be oriented horizontally or vertically.

It is similar to GtkListBox in that the children can
be sorted and filtered, and by requiring a dedicated child
widget type, GtkFlowBoxChild. It is similar to GtkTreeView
in that is supports a full set of selection modes, including
rubberband selection.

This is the culmination of work that has happened in the
egg-list-box module, and earlier in libegg. The origins of
this code are the EggSpreadTable in libegg, which was written
by Tristan van Berkom. It was moved to egg-list-box and
renamed EggFlowBox by Jon McCann, and I gave it some finishing
touched in the flowbox-improvements branch of that module.
2013-10-06 23:31:17 -04:00
John Lindgren
17a1f4abad Populate GtkPlacesSidebar at initialization
Previously, the "Places" sidebar was populated by the update_places()
call from within gtk_places_sidebar_style_set(). After
742a2f11a9, update_places() is never called
and the sidebar is never populated unless gtk_places_sidebar_add_shortcut()
happens to be called. This commit fixes this by calling update_places()
at the end of gtk_places_sidebar_init().

https://bugzilla.gnome.org/show_bug.cgi?id=709522
2013-10-06 16:06:14 -04:00
Alexander Larsson
5bdfdcadff Remove opacity-groups
GtkWidget had a hack where if opacity is 0.999 we set up an opacity group when
rendering the widget. This is no longer needed in 3.10, and GtkStack doesn't
use it anymore.

GdStack is using it, so applications should be ported from GdStack to GtkStack
in 3.12.

https://bugzilla.gnome.org/show_bug.cgi?id=703603
2013-10-06 02:56:03 -04:00
Matthias Clasen
605b918b2d a11y: Drop obsolete focus tab handling in notebooks
GtkNotebook lost the concept of a separate 'focus tab' ages ago.
Time for the accessible implementation to follow suit.

https://bugzilla.gnome.org/show_bug.cgi?id=693586
2013-10-06 02:00:31 -04:00
Matthias Clasen
61433f10e4 csd: Keep a maximized flag
This mirrors what we do for fullscreen and tiled.
2013-10-06 00:41:27 -04:00
Matthias Clasen
d6c866b6e5 csd: add style classes for tiled and maximized
This lets us change the border radius when the window is
in one of these states.

https://bugzilla.gnome.org/show_bug.cgi?id=709215
2013-10-06 00:35:43 -04:00
Kjell Ahlstedt
757ae6f163 GtkWindow: Override gtk_container_remove ()
Check which child is being removed, title_box or the GtkBin child.

https://bugzilla.gnome.org/show_bug.cgi?id=709049
2013-10-05 23:22:43 -04:00
Matthias Clasen
9490e7064e csd: properly check titlebar visibility
Now that we are using child-visible to hide titlebars, we need to
adjust the visibility checks in various places to take it into account.

https://bugzilla.gnome.org/show_bug.cgi?id=709323
2013-10-05 23:17:02 -04:00
Matthias Clasen
66445fec1d Fix dark theme issues in the print dialog
The dimensions in the n-up illustration were not using the
color of the style for drawing.

https://bugzilla.gnome.org/show_bug.cgi?id=709420
2013-10-05 23:02:54 -04:00
Benjamin Otte
a4c7f188de icontheme: Use gdk_rgba_to_string()
This gives us valid CSS. And now that librsvg parses valid CSS, that's a
fine thing to use.

And it fixes the problem where %g is locale-dependent.
2013-10-05 21:32:09 +02:00
Benjamin Otte
67260eec22 container: Deprecate resize mode
Resize modes don't work anymore, both because nobody ever uses them and
because the frame clock changed the way things work quite a bit. So we
don't want to advertise them as a good idea.

https://bugzilla.gnome.org/show_bug.cgi?id=708787
2013-10-05 15:09:53 +02:00
Benjamin Otte
303cf53f3f icontheme: Use rgba() when loading symbolic icons
This way, we correctly pass on translucency information. Note: This
currently requires librsvg master.
2013-10-05 13:57:51 +02:00
Benjamin Otte
0e6a9858e1 stylecontext: Deprecate gtk_style_context_invalidate()
Everything is invalidated automatically these days.
2013-10-05 13:57:51 +02:00
Benjamin Otte
7f0c29bcd7 texthandle: Use the parent widget's style context
... instead of creating our own.
2013-10-05 13:57:51 +02:00
Sébastien Wilmet
ab112a2096 Improve doc of gtk_style_context_invalidate()
https://bugzilla.gnome.org/show_bug.cgi?id=708583
2013-10-05 13:57:51 +02:00
William Jon McCann
6f17c408e6 notebook: inform the theme to draw borders when requested
When the show-border property is TRUE ask the theme to draw
borders on the notebook header.
2013-10-04 18:14:25 -04:00
William Jon McCann
053433010b notebook: add style classes for orientation to the header 2013-10-04 18:14:25 -04:00
William Jon McCann
db60046af4 notebook: correctly define the header region
Correctly define the header region to only be the area under the
tabs.
2013-10-04 18:14:25 -04:00
Debarshi Ray
35be1c8b56 places sidebar: Small cleanup 2013-10-03 18:30:39 +02:00
Timm Bäder
01d278a74f gtk_list_box_set_focus: Handle ist_box == NULL
Rows without a parent GtkListBox can happen in Glade and its previewer.
2013-10-03 14:05:12 +02:00
Bastien Nocera
744b790fdb iconhelper: Fix leak when rendering to cairo surface
https://bugzilla.gnome.org/show_bug.cgi?id=709264
2013-10-02 17:21:48 +02:00
Bastien Nocera
e53bb1bf1b iconhelper: Use g_clear_* helpers
https://bugzilla.gnome.org/show_bug.cgi?id=709264
2013-10-02 17:21:48 +02:00
Bastien Nocera
8938f3c47d icon-theme: Fix 2 memory leaks in GtkIconInfo
https://bugzilla.gnome.org/show_bug.cgi?id=709264
2013-10-02 17:21:48 +02:00
Bastien Nocera
7c595bcc53 icon-theme: Use g_clear_* helpers in finalize
https://bugzilla.gnome.org/show_bug.cgi?id=709264
2013-10-02 17:21:48 +02:00
William Jon McCann
e9b9fd20b9 notebook: Add a style property for whether to draw a tab gap
Add a has-tab-gap style property to GtkNotebook so that we can
disable drawing the gap between tabs and the page in the Adwaita
theme without breaking existing themes.

https://bugzilla.gnome.org/show_bug.cgi?id=707920
2013-10-02 10:51:16 -04:00
William Jon McCann
b609377e3e notebook: Fix rounding error in vertical alignment of arrow
https://bugzilla.gnome.org/show_bug.cgi?id=707920
2013-10-02 10:51:16 -04:00
William Jon McCann
e07fec3e83 notebook: Make notebook scroll arrows honor initial gap setting
So that they can be styled so they are not right on the edge.

https://bugzilla.gnome.org/show_bug.cgi?id=707920
2013-10-02 10:51:16 -04:00
William Jon McCann
8dd100d9b0 notebook: Improve the style of the default arrows
https://bugzilla.gnome.org/show_bug.cgi?id=707920
2013-10-02 10:51:15 -04:00
William Jon McCann
81b0808849 notebook: Use initial-gap on both edges of the tab header
https://bugzilla.gnome.org/show_bug.cgi?id=707920
2013-10-02 10:51:15 -04:00
Alexander Larsson
79e5069dff GtkTextView: Fix horizontal scrolling
We didn't properly invalidate when scrolling horizontally.

https://bugzilla.gnome.org/show_bug.cgi?id=708019
2013-10-02 16:23:41 +02:00
Alexander Larsson
1ac13435b7 GtkTextView: Fix regression in GtkSourceView drawing
GtkSourceView draws before chaining upo to GtkTextView and assumes
that this will be visible, but the pixelcache will just overdraw
that with background.

So, we stop drawing the background to the pixel cache and instead
make it an CAIRO_CONTENT_COLOR_ALPHA surface to make the previously
drawn content see through.

This is slower, but more backwards compatible.

https://bugzilla.gnome.org/show_bug.cgi?id=708423
2013-10-02 16:23:41 +02:00
Matthias Clasen
5abff7bd4c Improve gtk_container_add docs
Mention that some containers add intermediate children automatically.
2013-09-30 20:53:19 -04:00
Matthias Clasen
c02a12a746 Make it possible to hide custom titlebars
Previously, we were showing and hiding the custom titlebar
widget in response to state changes such as maximization.
Instead, use gtk_widget_set_child_visible() and leave
show/hide to applications. This makes it possible to set
a custom titlebar and hide it, for a titlebar-less appearance.

https://bugzilla.gnome.org/show_bug.cgi?id=707132
2013-09-30 20:19:08 -04:00
William Jon McCann
41b9a17dfc Fix typo in gtk-win32-base.css 2013-09-30 18:27:13 -04:00
Cosimo Cecchi
3d602f5b0a icontheme: use g_file_load_contents() for symbolic icons
When loading a symbolic icon, g_file_get_contents() is currently used
with the icon pathname, to load its SVG data. This won't work when the
icon is not a local file, for instance when a symbolic icon is loaded
from a GFileIcon with a GResource path.
Fortunately GtkIconInfo already holds a GFile, so we can just use
g_file_load_contents() to load the data instead.

https://bugzilla.gnome.org/show_bug.cgi?id=709056
2013-09-30 09:45:22 -07:00
Tristan Van Berkom
28a3638448 gtk-doc fixup for gtk_widget_class_bind_template_child_full()
Updated documentation to specify that '0' should be specified if
one does not need to automatically assign a bound child to a public
or private instance member (now that negative values are private
structure offsets).
2013-09-30 17:29:22 +02:00
Ryan Lortie
e3b9ea5ab6 GtkTreeViewColumn: start padding at 0
If we start with a padding of -1 then it can leak out of the size
allocation request for the column when the treeview is empty.  The
GtkTreeView will then collect these -1 values and add them together,
returning -n where 'n' is the number of columns.

This is usually not a problem because treeviews tend to be used with a
scrollbar and the width of the scrollbar will be added to this number
bringing it into positive territory again.  On Ubuntu, with overlay
scrollbars, this is not the case, however.

https://bugzilla.gnome.org/show_bug.cgi?id=703062
2013-09-30 09:23:00 -04:00
Behdad Esfahbod
b0e168d58f Bug 467720 - Useless use of const qualifier 2013-09-28 14:14:31 -04:00
John Ralls
124e814f47 Bug 651224 - Potential NULL display ptr from quartz gtk_clipboard_wait_for_contents 2013-09-28 10:55:22 -07:00
John Ralls
133a0c7426 Clarify Cursor Theme GDK Warning 2013-09-28 10:05:29 -07:00
Matthias Clasen
3f6a1dc9a9 More formatting style adjustments
Lose a whole bunch of unnecessary 'real', shortening
excessively long function names.
2013-09-27 22:00:38 -04:00
Matthias Clasen
c31a34d5ee Some coding style improvements
Use g_return_if_fail in GTK+ style in all public APIs,
avoid dereferencing variables early, shorten some
function names.
2013-09-27 21:39:10 -04:00
Matthias Clasen
58621b00de Trivial: remove an unused declaration
_gtk_list_box_accessible_update_selected is not used and
does not exist.
2013-09-27 20:32:39 -04:00
Bastien Nocera
f5291660e0 Fix possible crash in header bar
When the header bar's top-level widget is not a GtkWindow,
don't try to get the inexistant "decoration-button-layout"
property.
2013-09-27 17:27:31 +02:00
Matthias Clasen
377c124446 csd: Avoid jumping windows
The size of the shadow and invisible borders can (and usually
will) change between backdrop and focused windows, while the
overall window size remains unchanged. This causes the visible
window to visually 'jump'. We can avoid this by always reserving
the maximum of the focused and unfocused border sizes. The code
for positioning the input-only windows making up the invisible
border is adjusted to deal with this. We now always place the
invisible border right outside the visible content, even if the
shadow extends out much farther.

https://bugzilla.gnome.org/show_bug.cgi?id=707524
2013-09-26 23:19:29 -04:00
Cosimo Cecchi
71ad9a8fdd notebook: render a frame and background in the header
And use the "header" style class to do that.
This allows themes to set e.g. the background of the tab header
differently.

Themes will need slight adjustment to make things appear
as before.

https://bugzilla.gnome.org/show_bug.cgi?id=643914
2013-09-26 19:27:54 -04:00
Cosimo Cecchi
a2ed88b3ee Allow active tab children to be styled
This allows one to style the children of an active
tab label from CSS.

https://bugzilla.gnome.org/show_bug.cgi?id=691163
2013-09-26 19:19:53 -04:00
Matthias Clasen
bd1df33798 Trivial: correct vfunc signatures
Harmless confusion between gint and gboolean
https://bugzilla.gnome.org/show_bug.cgi?id=697031
2013-09-26 19:16:14 -04:00
Sébastien Wilmet
f75aa5fdb4 GtkTextView: add create_buffer virtual method pointer
This allows subclasses of GtkTextView that require a corresponding
subclass of GtkTextBuffer to automatically do the right thing when
constructed with a NULL buffer. An example of this is GtkSourceView
which requires a GtkSourceBuffer.

https://bugzilla.gnome.org/show_bug.cgi?id=708584
2013-09-26 18:36:20 +02:00
Matthias Clasen
7439e03f3d Fixups to GtkStack
The GtkStack and GtkStackSwitcher code did not really
follow GTK+ conventions for includes. Fix that, and also
fix up a case of gpointer vs gpointer* confusion
in gtkstack.c.
2013-09-25 23:54:31 -04:00
Matthias Clasen
5315661721 Use a stack in GtkAboutDialog
This lets us slide the credits and license sections up and down,
instead of just popping them into existence abruptly.
2013-09-25 23:54:31 -04:00
Matthias Clasen
98b78ed5da GtkStack: Add more transition types
This adds new 'over' and 'under' transitions which work by moving
the new page over the previous one, or moving the previous page off
to reveal the new one. We also add an over/under combination that
is going to be used in GtkAboutDialog.

https://bugzilla.gnome.org/show_bug.cgi?id=707187
2013-09-25 23:54:12 -04:00
Matthias Clasen
17aae0477f GtkAboutDialog: prevent unintended visibility
Some of the labels were not marked as no-show-all. But the
code clearly tries to manage their visibility, so gtk_widget_show_all()
should not affect them.

https://bugzilla.gnome.org/show_bug.cgi?id=681484
2013-09-25 22:51:33 -04:00
Paolo Borelli
e59c28743a Add a needs-attention child property to GtkStack
The child property is watched by the StackSwicther which in turns sets a
needs-attention css class on the corresponding button, so that the theme
can for instance show a throbbing animation if one of the hidden pages
needs the user attention.

https://bugzilla.gnome.org/show_bug.cgi?id=707153
2013-09-25 22:34:22 -04:00
Mario Sanchez Prada
8d83d989bb a11y: don't shutdown accessibility, so the atk bridge is always valid
This will fix issues in applications that for some reason make
several and not nested calls to gtk_main() during their lifetime,
effectively initializing a11y when the first, top most, main loop
is being run and shutting it down then that loop is quit.

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

https://bugzilla.gnome.org/show_bug.cgi?id=684076
2013-09-25 20:14:04 -04:00
Cosimo Cecchi
6f9fed45ef entrycompletion: set the GtkWindow as attached to the GtkEntry
This way themes can easily select that window to apply custom styles.

https://bugzilla.gnome.org/show_bug.cgi?id=708414
2013-09-25 20:06:43 -04:00
Alexander Larsson
68c450468e icon-theme: Better handling of unscaled icon directories
If an icon is in a Fixed or Threshold directory we normally don't
scale it. However, in the case of HiDPI scaling we *do* want to
scale it, to avoid different layouts in Lo/HiDPI. We look up whatever
the size of the icon would have been in LoDPI and scale to that
in the no-scaling case, thus getting the same layout as the
unscaled case.

https://bugzilla.gnome.org/show_bug.cgi?id=708384
2013-09-23 12:45:34 +02:00
Alexander Larsson
a001dc0ec7 icon-theme: Make icon_info_new() have some args
This gets rid of a bunch of duplicated code.
2013-09-23 12:45:34 +02:00
Matthias Clasen
e5317f0f9a Improve struct packing in various places 2013-09-21 23:50:55 -04:00
Matthias Clasen
d137f74fe9 Remove priv pointer from GtkStackSwitcher
This is a new widget, so lets avoid the unnecessary
priv pointer while we still can.
2013-09-21 23:50:55 -04:00
Matthias Clasen
f0aba21fd2 Small cleanup for the previous commit
When setting an accessible type, we don't need to
set an accessible row anymore.
2013-09-21 20:56:46 -04:00
Matthias Clasen
c22e27f986 Add a GtkListBoxRow accessible
This lets us do two things:
1. Set the list-item role
2. Set selectable and selected states as appropriate

https://bugzilla.gnome.org/show_bug.cgi?id=692258
2013-09-21 20:51:22 -04:00
Matthias Clasen
bdd4d65e85 Small improvement to GtkLinkButton a11y
ATK has a visited state, so propagate the visited property
of GtkLinkButton to that state.
2013-09-21 20:51:21 -04:00
Federico Mena Quintero
1e5dde7eab places sidebar: Don't activate the bookmark if Eject was clicked
This should really fix https://bugzilla.gnome.org/show_bug.cgi?id=704087 ...

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
2013-09-20 21:14:00 -05:00
Matthias Clasen
9f3627cd7c Trivial typo fix 2013-09-20 20:17:25 -04:00
Matthias Clasen
dab146fe30 Add accessible names to csd buttons
Its the right thing to do.
2013-09-20 15:02:17 -04:00
Florian Müllner
f081552da1 icontheme: Make sure icon_info->scale doesn't end up 0
GdkPixbuf will fail returning %NULL if we try to scale a pixbuf to (0, 0),
which will then trigger an assertion in gtk_icon_info_load_icon_finish();
we never want a scale of 0, so ensure it is at least 1.

https://bugzilla.gnome.org/show_bug.cgi?id=708384
2013-09-20 14:42:41 +02:00
Joshua Lock
24751cba8e places sidebar: don't open a bookmark when clicking eject
Trying to open a bookmark which is being ejected is at best confusing.

https://bugzilla.gnome.org/show_bug.cgi?id=704087
2013-09-19 18:05:49 -05:00
Alexander Larsson
7b7b8eaaff listbox: Don't crash if cursor_row is NULL in real_focus
https://bugzilla.gnome.org/show_bug.cgi?id=708320
2013-09-19 22:38:41 +02:00
Timm Bäder
e6ac9b0862 ListBox: Update docs of GtkListBoxUpdateHeaderFunc
before is always NULL for the first row.
2013-09-19 22:05:08 +02:00
Benjamin Otte
20696b1057 cssimage: Report filename of file failing to load 2013-09-18 17:07:41 +02:00
Cosimo Cecchi
fd581236d2 Revert "appchooserwidget: check for g_app_info_should_show()"
This reverts commit 84922d3317.

https://bugzilla.gnome.org/show_bug.cgi?id=702681
2013-09-17 11:01:36 -07:00
Cosimo Cecchi
b561e176fb Revert "appchooserbutton: filter out applications not supposed to be visible"
This reverts commit 5568dcb53c.

https://bugzilla.gnome.org/show_bug.cgi?id=702681
2013-09-17 11:01:30 -07:00
Benjamin Otte
8c0516a5f1 window: Fix child wfh size request
We need to subtract border_width from the size we're passing to the
children hfw functions as those are added by ourselves.

Fixes the window-border-width.ui reftest.
2013-09-17 15:52:27 +02:00
Matthias Clasen
6aa56979dc More documentation fixes 2013-09-17 01:28:39 -04:00
Matthias Clasen
dbbb9c8f8f Plug a memory leak in the css parser
color_value_parse was leaking a GtkCssSymbolicValue.
Reported in

https://bugzilla.gnome.org/show_bug.cgi?id=702034
2013-09-16 23:30:57 -04:00
Philip Chimento
c298c7acce Don't activate GtkExpander if mouse dragged away
Previously, when you clicked and held the button down on a
GtkExpander's label or disclosure triangle, then moved the mouse
away and released the button, the expander would still activate.
This brings the behavior in line with the more generally expected
behavior, as exhibited by GtkButton for example.

https://bugzilla.gnome.org/show_bug.cgi?id=706345
2013-09-16 22:43:02 -04:00
Matthias Clasen
f503d4debd Clarify GtkH/VBox documentation
Make it clearer that GtkBox still has uses.

https://bugzilla.gnome.org/show_bug.cgi?id=706269
2013-09-16 22:38:49 -04:00
Matthias Clasen
58e9e9d316 Improve gtk_widget_insert_action_group docs
Mention that group can be NULL. Related to

https://bugzilla.gnome.org/show_bug.cgi?id=708150
2013-09-16 21:13:00 -04:00
Matthias Clasen
eab0b3a59c Improve headerbar docs slightly
Explain how to achieve the same title lable style when using
a custom title.
2013-09-16 20:24:48 -04:00
Matthias Clasen
54773ba45b Allow theme to set close button position in headerbars
This allows GTK+ applications with headerbars to fit in
better in platforms that have window controls on the left.

To use this, set -GtkWindow-decoration-button-layout: 'close:'
in the theme.

https://bugzilla.gnome.org/show_bug.cgi?id=706708
2013-09-16 16:13:07 -04:00
Matthias Clasen
aa1435b741 Include CSD titlebar in focus chain
At least for header bars, there's often application controls
in this area, which should be included in the focus chain.
We make it so that the initial focus avoids the titlebar,
but tabbing around will eventually get there.

https://bugzilla.gnome.org/show_bug.cgi?id=708067
2013-09-16 14:38:38 -04:00
Matthias Clasen
d632474b74 Don't pass NULL to gdk_window_set_title
That is not allowed. This is fallout from a recent change
that makes GtkWindow listen for title changes in its
headerbar.
2013-09-16 13:07:18 -04:00
Benjamin Otte
45d896a6b5 Revert "a11y: Remove AtkSelection implementation from combobox"
This reverts commit 7cecc8e524.

It is impossible to use the selection object of the menu while it is
collapsed (collapsed menus deselect everything for a start), so even
though the original patch was correct, the followup issues are too big
to solve this quickly to a release.

https://bugzilla.gnome.org/show_bug.cgi?id=707786
2013-09-16 15:41:15 +02:00