Commit Graph

26633 Commits

Author SHA1 Message Date
Lapo Calamandrei
d1d763ce58 Adwaita: remove textview border
see https://bugzilla.gnome.org/show_bug.cgi?id=764203
2016-05-27 11:38:20 +02:00
Thomas Lange
e7765daf64 placesview: Do not mark icon name as translatable
https://bugzilla.gnome.org/show_bug.cgi?id=766878
2016-05-26 22:05:41 -04:00
Matthias Clasen
73a47181fa Teach gtk-builder-tool to leave GtkDialog::border-width alone
This is one of the properties that need to be explicitly set.
2016-05-26 14:41:14 -04:00
Руслан Ижбулатов
fcd3321fa7 GtkFileChooser: don't override already opened folder
When filechooer is re-used (instead of being created and destroyed
every time it's needed), it might happen that the directory the
application wishes to initially show is the same directory that
was shown last time the filechooser was used. In that case, make sure
filechooser knows that it does not need to do its default "select $pwd
or $home" routine.

https://bugzilla.gnome.org/show_bug.cgi?id=766122
2016-05-26 11:44:13 +00:00
Benjamin Otte
b9f55dfd63 window: Unfreeze window on unmap
Make sure to keep parity with the number of times we froze the window
when we unmap it.
Otherwise it will permanently stay frozen after being remapped.

https://bugzilla.gnome.org/show_bug.cgi?id=766643
https://bugzilla.mozilla.org/show_bug.cgi?id=1225044
2016-05-25 01:19:11 +02:00
Bastian Ilsø
5759e2a334 gtktextview: document how to get line space
adds a paragraph to gtk_text_view_get_pixels_below_lines(),
describing how it can be used together with
gtk_text_view_get_pixels_above_lines() to get the total
amount of line spacing between two paragraphs.

https://bugzilla.gnome.org/show_bug.cgi?id=747206
2016-05-23 23:02:37 -04:00
Matthias Clasen
b90ae2cfbf Add a deprecation note
Mark GtkWidget:style property as deprecated in the docs.
2016-05-23 20:40:03 -04:00
Matthias Clasen
46b51e36b4 Trivial typo fix 2016-05-23 19:24:07 -04:00
Matthias Clasen
16bca98305 infobar: Update documentation
Remove explicit reference to color from the
gtk_info_bar_set_message_type() docs.

https://bugzilla.gnome.org/show_bug.cgi?id=759037
2016-05-23 14:19:30 -04:00
Carlos Garnacho
76a5e3fc3c popover: set priv->window before setting doing add_popover() on it
If the popover's relative-to widget is unparented/reparented, we end
up unparenting/reparenting the popover as well. In that case, at the
moment of reparenting, the widget might have been visible (and is
thus mapped again), but priv->window hasn't been set yet.

We must first set priv->window, and then call gtk_window_add_popover(),
that way gtk_popover_map() has its prerequisites straight.

https://bugzilla.gnome.org/show_bug.cgi?id=766323
2016-05-21 20:40:43 +02:00
Florian Müllner
57efcabfd6 stack: Only map children when necessary
gtk_widget_set_parent() will map the widget if the parent is mapped
and the widget is both visible and child-visible. As we currently
only set the child visibility after adding the child, we immediately
map all children that are added to a mapped stack, even when they
are not actually shown. Avoid this by setting the child visibility
before adding the child, so widgets are only mapped when shown.

https://bugzilla.gnome.org/show_bug.cgi?id=766737
2016-05-21 00:56:34 +02:00
Lapo Calamandrei
386ead4243 Adwaita: add vertical margins to switches on a headerbar
See https://bugzilla.gnome.org/show_bug.cgi?id=766642
2016-05-20 15:39:08 +02:00
Lapo Calamandrei
0d5b4779b8 Adwaita: shave 1px from the switch
make the switch height and width 1px smaller.
2016-05-20 15:28:58 +02:00
Ondrej Holy
55751fc6fb Improve external drives detection
Use g_drive_is_removable for external drives detection. Current heuristic
fails in some cases (e.g. when removable drive is attached before login),
see Bug 765457.

Bump GLib version accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=765924
2016-05-20 10:40:14 +02:00
Ignacio Casal Quinteiro
64eca0bb2d gtktextview: fix < public > comment
This was causing problems with the gtk# scanner
2016-05-20 09:08:08 +02:00
Matthias Clasen
d3adf47d9f treeview: Fix a rubberbanding-related crash
When starting a rubberband selection from an empty area, we could run
into crashes if the selection moves over the rows and then back out
to unpopulated area. Handle this case without crashing.

https://bugzilla.gnome.org/show_bug.cgi?id=766336
2016-05-19 16:59:10 -04:00
Matthias Clasen
6293a50501 color scale: Sync style classes with GtkScale
We should use the same style classes here, to avoid theme
confusion.
2016-05-19 18:09:24 +02:00
Lapo Calamandrei
cca2a22b63 color scale: Really sync style classes with GtkScale
sync the alpha scale styleclass too.
2016-05-19 17:32:09 +02:00
Lapo Calamandrei
5ae7f62f25 Adwaita: fix scale theming
rely on toplevel styleclass for scale with marks.

See https://bugzilla.gnome.org/show_bug.cgi?id=766440
2016-05-19 17:31:05 +02:00
Ignacio Casal Quinteiro
fab70d34d4 gtkselectionprivate: minor style fix
This seems to make some issue with the gtk# scanner.
2016-05-19 16:56:57 +02:00
Matthias Clasen
4151cb1202 scale: Use more succinct names for style classes
Use .marks-before/after to indicate the presence of marks.
As Lapo points out, compatibility with the previous names
is not really that important, since everything else changed
around it.

https://bugzilla.gnome.org/show_bug.cgi?id=766440
2016-05-19 09:44:48 -04:00
Matthias Clasen
de7c15636d icon theme: Add a warning
Warn about the situation when we've found a resource or file path,
but gdk-pixbuf fails to give us a pixbuf. This generally means that
either pixbuf loaders are not found or the shared-mime database
is missing.
2016-05-19 09:03:20 -04:00
Matthias Clasen
fa9f22eec4 scale: Bring back marks-related style classes
It turns out that it is too hard (and in some cases, impossible)
to get this information from node positioning, so bring back the
.scale-has-marks-above/below style classes on the main node.

This should allow us to fix the 'pointy sliders'.

https://bugzilla.gnome.org/show_bug.cgi?id=766440
2016-05-18 12:59:39 -04:00
Matthias Clasen
f516faaef8 Revert "scrolledwindow: Better size requisition for GTK_SCROLL_NATURAL children"
This reverts commit 096bea3f0e.

This was accidentally pushed.
2016-05-18 07:52:18 -04:00
Debarshi Ray
096bea3f0e scrolledwindow: Better size requisition for GTK_SCROLL_NATURAL children
GtkScrolledWindow leans towards using the minimum size of its child
widget, unless the scrollbar policy is GTK_POLICY_NEVER. This is
probably fine for most GtkScrollable implementations out there.
Especially when using GTK_SCROLL_MINIMUM, which is the default for all
implementations inside gtk+.

However, this is not good for GTK_SCROLL_NATURAL children. eg.,
VteTerminal's minimum size is 1x1 and natural size is the number of
visible rows and columns requested by the user. We really want to use
the natural size unless the user has resized the window to change that.

https://bugzilla.gnome.org/show_bug.cgi?id=766569
2016-05-17 15:03:51 -04:00
Debarshi Ray
c81cd94b8f scrolledwindow: Remove redundant use of MAX
This code tries to add the minimum content size, if one is set, to the
GtkScrolledWindow's size requisition. This is obvious from the check
for non-negative values of min-content-height and min-content-width.
Using MAX needlessly makes the code harder to read by implying that
there is more to it when there actually isn't.

Fall out from 0d9ebb501d

https://bugzilla.gnome.org/show_bug.cgi?id=766569
2016-05-17 17:04:26 +02:00
Debarshi Ray
df98140e8e scrolledwindow: Fix typo in get_preferred_height calculation
When we are beginning to calculate the height, if the vscrollbar_policy
is not GTK_POLICY_NEVER, and there is no min-content-height, then we
need some small non-zero value to get started. The idea is to always
ask for at least enough to fit the horizontal scrollbar.

Simply put, this should be the mirror image of the corresponding width
calculation code.

Those who got used to the buggy behaviour might notice that their
GtkScrolledWindows are not as tall as they used to be.

Fall out from 55196a705f

https://bugzilla.gnome.org/show_bug.cgi?id=766530
2016-05-17 07:39:24 +02:00
Matt Watson
175cf7e32d stack: always update window position at transition start
Sometimes on wayland we're seeing a frame draw before the first tick
callback, where the window position has not yet been updated.

With this change, the window is properly positioned as soon as
gtk_stack_start_transition returns.

https://bugzilla.gnome.org/show_bug.cgi?id=766405
2016-05-16 13:53:26 -07:00
Javier Jardón
101da71ee3 Use upstream gettext
https://bugzilla.gnome.org/show_bug.cgi?id=373745
2016-05-16 20:46:19 +01:00
Matthias Clasen
38f71172f8 scale: Avoid a crash
gtk_scale_get_layout was not careful enough, leading to a crash
when opening the inspector on a scale.
2016-05-15 14:18:09 -04:00
Alban Browaeys
cd305c1970 widget: fix GtkLabelAccessible NULL links.
Fix testsuite/a11y/about.ui GtkAboutDialog :
"CRITICAL **: atk_hyperlink_get_start_index: assertion 'ATK_IS_HYPERLINK (link)' failed"
That is set widget->priv->accessible as soon as accessible object is generated.

When accessible object is created accessible->priv->widget is set,
if widget->priv->accessible is not , then _gtk_label_accessible_update_links
exits early, thus without creating the links on the accessible side.
(This as it checks for the widget to have the accessible set before proceeding).

https://bugzilla.gnome.org/show_bug.cgi?id=766458
2016-05-15 10:24:34 -04:00
Benjamin Otte
ddcf47026d widget: No longer postpone style-updated on unrealized widgets
GTK used to not emit GtkWidget::style-updated on widgets that weren't
realized. This sped up construction of complex widgetry in the early
days of GTK3 where we instantly invalidated on every change.
We don't do that anymore, so in theory (and in my limited testing with
widget-factory) this shouldn't be a prolem anymore.

What is a problem though is that postponing style-updated leads to 2
problems:
(1) Unrealized widgets will not emit style-updated which may cause them
    to not properly update their state and return wrong values from
    get_preferred_width/height() etc
(2) Emitting style-updated during realize can happen too late.
    When a widget is not made child-visible by its parent (common
    examples: notebook, paned) it will also not be realized when the
    parent is initially shown. However, when they get realized later
    (after a resize of the parent), they will emit style-updated (and
    potentially queue a resize) during size-allocate.

https://bugzilla.gnome.org/show_bug.cgi?id=765700
2016-05-14 18:48:22 +02:00
Benjamin Otte
30d2dc49a8 scrolledwindow: destroy children in destroy()
If we don't do that, testsuite/gtk/templates starts failing.
2016-05-14 17:13:52 +02:00
Timm Bäder
d4f0c9877d query-settings: Indicate deprecated settings 2016-05-12 20:40:13 +02:00
Timm Bäder
0d8993fb24 stack: Don't underallocate the last_child 2016-05-12 20:40:06 +02:00
Timm Bäder
292e0c2663 stack: Remove some code duplication 2016-05-12 20:40:00 +02:00
Timm Bäder
301652de1f Remove useless casts from gdk_event_triggers_context_menu calls 2016-05-12 20:39:51 +02:00
Timm Bäder
c34bb3b994 query-settings: Don't compare int to uint 2016-05-12 20:39:45 +02:00
Timm Bäder
a99213100d listbox: Don't compare int to uint 2016-05-12 20:39:39 +02:00
Timm Bäder
4cce90d1e2 colorbutton: Stop using state-changed 2016-05-12 18:27:14 +02:00
Timm Bäder
63be0deb0f toolbar: Limit item position to number of contained elements
Greater values don't make much sense.

https://bugzilla.gnome.org/show_bug.cgi?id=682080
2016-05-12 18:27:08 +02:00
Lapo Calamandrei
46b789b0f4 Adwaita: brighter pushed button background
providing more contrast with the text color.
2016-05-12 11:50:13 +02:00
Lapo Calamandrei
16afc59f04 Adwaita: bold size label on font button
looks more consistent with other special buttons with icons.
2016-05-12 11:45:34 +02:00
Lapo Calamandrei
b5146317bb Adwaita: hide separator on button.font and button.file
we used to do that, got missed at some point during 3.20 cycle.
2016-05-12 11:40:28 +02:00
Matthias Clasen
c891ceb31d Docs: Clarify life cycle issue
gtk_gesture_get_last_event() wasn't very clear about how long
it is safe to use the returned pointer.
2016-05-11 13:25:15 -04:00
Matthias Clasen
358eec2972 DND: Avoid a use-after-free
Cancelling the gesture causes the last_event pointer to become
invalid. Make a copy of the event so we can keep using it
regardless of the gesture state.
2016-05-11 13:24:04 -04:00
Matthias Clasen
7c21a32b28 places sidebar: Avoid markup confusion in tooltips
At one point, the sidebar was using gtk_treeview_set_tooltip_column,
which expects tooltips to be markup. With the listbox-based sidebar,
we don't do that anymore. So don't escape the tooltip text.

https://bugzilla.gnome.org/show_bug.cgi?id=766175
2016-05-10 21:47:20 -04:00
Timm Bäder
327777a291 Scale: Set the correct value alignment
We're measuring both the width of the minimal and the maximal value for
the value gadget, but only give the value the minimal width for its
current value, resultnig in an always left-aligned value.

Fix this by assigning the width of the value gadget to the value layout
and letting pango align the text inside the layout.

https://bugzilla.gnome.org/show_bug.cgi?id=766120
2016-05-10 21:24:50 +02:00
Matthias Clasen
0f476590fb Make gdk_event_get_pointer_emulated public
There is not strong reason to keep the getter private.
At the same time, strip _-prefixes from a few other GdkEvent
APIs. Update all callers.
2016-05-10 15:16:45 -04:00
Olivier Fourdan
126156e820 gtkmenu: ignore left/right scroll events
Menus are placed vertically by definition, it does not make much sense
to support horizontal axis for scrolling.

Use GDK_EVENT_STOP/GDK_EVENT_PROPAGATE instead of TRUE/FALSE and add a
default case to return GDK_EVENT_PROPAGATE for unhandled events.

https://bugzilla.gnome.org/show_bug.cgi?id=765939
2016-05-10 15:58:02 +02:00