Commit Graph

21828 Commits

Author SHA1 Message Date
Matthias Clasen
b46cef1809 Trivial formatting fix 2014-10-01 19:52:04 -04:00
Matthias Clasen
09551bf37a Fix a typo 2014-10-01 19:30:12 -04:00
Matthias Clasen
7e9372bafa Fix fonts in context menus
Context menus inherit their style from the widget they are attached
to. This can have unexpected effects in particular for font, as can
be seen in gedit or gnome-calculator. Prevent this by resetting
the font of context-menus to the initial value.
2014-10-01 07:11:43 -04:00
Matthias Clasen
d0fb80d31b Avoid compiler warnings 2014-10-01 00:50:25 -04:00
Matthias Clasen
95d76d0132 Add a few missing include guards 2014-10-01 00:49:59 -04:00
Matthias Clasen
619aeb643f Provisional sidebar theming
needs-attention is not handled yet, here.
2014-10-01 00:46:13 -04:00
Ikey Doherty
cdd2651db0 Add GtkSidebar
GtkSidebar behaves internally much like GtkStackSwitcher, providing a vertical
sidebar like widget. It is virtually identical in appearance to the widget
currently used in GNOME Tweak Tool.

This widget is connected to a GtkStack, and builds its own contents as a
GtkListBox subclass, using the "title" child property to provide a consistent
navigatable widget.

Being a subclass of GtkListBox it benefits immediately from strong keyboard
navigation, and minimal changes are required for theming.

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

Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2014-10-01 00:44:46 -04:00
Jasper St. Pierre
91d9ae1cc4 label: Don't add in the allocation to our clip again
_gtk_widget_set_simple_clip already takes the allocation into account,
so we don't need to do it here.
2014-09-30 13:43:36 -06:00
Matthias Clasen
558c6ea6b5 Better typography for ppd paper names
These often contain a <num>x<num> string, which we can display
nicer by rendering it as <num>×<num>.
2014-09-30 00:55:03 -04:00
Matthias Clasen
63efdca223 Deprecate GtkWidget override APIs
This is better done with css and style classes nowadays.
2014-09-30 00:08:59 -04:00
Matthias Clasen
aa3020a39e GtkContainer: Support focus chain in GtkBuilder
This adds support for a <focus-chain> element which can be
used to specify a custom focus order for the children of
a container.

https://bugzilla.gnome.org/show_bug.cgi?id=582799
2014-09-29 23:59:21 -04:00
Matthias Clasen
6d3c61856b GtkButton: Use GtkLabel:xalign 2014-09-29 23:57:13 -04:00
Matthias Clasen
811c4c699f GtkAssistant: Use GtkLabel:xalign 2014-09-29 23:56:20 -04:00
Matthias Clasen
059e33ecea Keep GtkMisc:xalign working for labels
Set the new label properties when gtk_misc_set_alignment is used,
to keep things working.
2014-09-29 23:56:20 -04:00
Matthias Clasen
a43e0177cf Revert "Undreprecate GtkMisc::x/yalign for now"
This reverts commit 29eae57be4.

We have GtkLabel:xalign now, so deprecate the GtkMisc property again.
2014-09-29 23:56:20 -04:00
Matthias Clasen
d39424fc1c GtkLabel: add x/yalign properties
Since it turns out that x/yalign can't be quite equivalently
replaced by h/valign, bring them back as label properties, so
we can eventually get rid of GtkMisc.

https://bugzilla.gnome.org/show_bug.cgi?id=735841
2014-09-29 23:56:20 -04:00
Matthias Clasen
0192f3fe2d printing: Better typography
Use U+2013 for ranges.

https://bugzilla.gnome.org/show_bug.cgi?id=735192
2014-09-29 23:05:22 -04:00
Matthias Clasen
05a9006715 inspector: Better typography
Use U+201C/U+201D for quoting.

https://bugzilla.gnome.org/show_bug.cgi?id=735192
2014-09-29 23:05:22 -04:00
Matthias Clasen
0403d94d43 GtkRecentChooserMenu: Better typography
Avoid `' quoting.

https://bugzilla.gnome.org/show_bug.cgi?id=735192
2014-09-29 23:05:22 -04:00
Matthias Clasen
4866f0cec4 GtkPlacesSidebar: Be consistent in messages
Always quote drive/volume names.

https://bugzilla.gnome.org/show_bug.cgi?id=735192
2014-09-29 23:05:22 -04:00
Matthias Clasen
faa1909474 GtkFileChooserWidget: Better typography
No double space after .

https://bugzilla.gnome.org/show_bug.cgi?id=735192
2014-09-29 23:05:22 -04:00
Matthias Clasen
3fc0c2a8ea GtkVolumeButton: Better typography
Use a small space before %. This matches what we do for percentages
elsewhere.

https://bugzilla.gnome.org/show_bug.cgi?id=735192
2014-09-29 23:05:22 -04:00
Matthias Clasen
67b4f8ea75 GtkProgressBar: Mark the default text for translation
At the same time, use a small space before %.
This matches what is done in GtkCellRendererProgress.

https://bugzilla.gnome.org/show_bug.cgi?id=735192
2014-09-29 23:05:22 -04:00
Matthias Clasen
b3e1bb1654 Progress widgets: Better typography
Use a small space before %.

https://bugzilla.gnome.org/show_bug.cgi?id=735192
2014-09-29 23:05:22 -04:00
Matthias Clasen
e356841957 GtkBuilder: Improve error messages
No `' looks just terrible. For quoting in non-UI contexts, we
prefer either '' or "".

https://bugzilla.gnome.org/show_bug.cgi?id=735192
2014-09-29 23:05:21 -04:00
Matthias Clasen
c7930417b4 GtkColorSelection: Better typography
Use U+201C/U+201D for quoting, and use U+2019 instead of apostrophe.

https://bugzilla.gnome.org/show_bug.cgi?id=735192
2014-09-29 23:05:21 -04:00
Matthias Clasen
972136803a GtkPrintUnixDialog: Better typography
Use U+2236 RATIO instead of ':' for times.

https://bugzilla.gnome.org/show_bug.cgi?id=735192
2014-09-29 23:05:20 -04:00
Matthias Clasen
60c7f22310 Use better typography for paper names
Use U+00D7 MULTIPLICATION SIGN instead of a plain old x in
paper names, following https://wiki.gnome.org/Design/OS/Typography.

This is a string change.

https://bugzilla.gnome.org/show_bug.cgi?id=735192
2014-09-29 23:05:20 -04:00
Matthias Clasen
5720cf8144 Update file lists
We were forgetting to include some theme files.
2014-09-29 21:28:25 -04:00
Jesse van den Kieboom
de96cea732 quartz: Add availability check for >= 10.7 API
This adds both a compile time check for the SDK version being
compiled against, as well as a runtime check in the case the
resulting binary is run against an older SDK.

https://bugzilla.gnome.org/show_bug.cgi?id=735054
2014-09-29 15:25:06 -04:00
Lapo Calamandrei
74e71495c2 Adwaita: draw the trough on progressbars in treeviews
See https://bugzilla.gnome.org/show_bug.cgi?id=737517
2014-09-29 14:59:07 -04:00
Lapo Calamandrei
7e1673d0b7 Adwaita: make links readable in the dark variant
And fix the messy style we have for *:link in the process.
https://bugzilla.gnome.org/show_bug.cgi?id=737386
2014-09-29 14:41:49 -04:00
Carlos Garnacho
3985d69735 gesture: Document pitfalls on foreign gesture state changes
Add some docs/example about the possible event handling ordering issues
that may appear on GtkGesture::begin between multiple gesture groups.
Mostly relevant for state changes.
2014-09-29 16:20:54 +02:00
Jakub Steiner
30149dabcf Adwaita: provide simple guidelines for theming
- Some simple instructions for future SASS/ruby lovers
2014-09-29 14:07:10 +02:00
Jakub Steiner
088206b267 depend on particular version of sass 2014-09-29 13:46:32 +02:00
Rui Matos
d05730db49 GtkFontButton: Make sure the dialog isn't destroyed on delete-event
The remaining code assumes that the dialog doesn't get destroyed, but
it actually does on delete-event.

In particular, the filter function and the preview text are lost as
soon as the dialog is created and thus when we create a new dialog we
don't have those properties to set on it anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=719936
2014-09-28 22:07:48 -04:00
Matthias Clasen
459bdbb143 Revert "Make Ctrl-u and Ctrl-k work in GtkTextView too"
This reverts commit 5744bb3cf1.

This causes conflicts with already existing shortcuts e.g.
in gedit.
2014-09-28 11:43:08 -04:00
Matthias Clasen
f35dff334f Factor out a function
Factor out the typename-to-get-type mangling as a separate
function, for easier testing.

Also fix some cases where it doesn't, currently, like
GString -> g_string_get_type and
GdkRGB -> gdk_rgb_get_type
2014-09-26 23:30:29 -04:00
Matthias Clasen
0c2f3402c3 GtkBuilder: Mention more error domains
This has been requested in
https://bugzilla.gnome.org/show_bug.cgi?id=708206
2014-09-26 22:37:21 -04:00
Matthias Clasen
cfd2d6d2e7 Typo fix 2014-09-26 22:30:20 -04:00
Matthias Clasen
e586dd2571 GtkRange: Fix an event propagation issue
The scale in the selectable listbox in page 2 of gtk3-widget-factory
has the flaw that the row is getting selected even when one only
interacts with the scale - unlike e.g. the checkbutton and button
further down in the listbox.

The problem is that GtkRange is trying to claim the sequence for
the drag gesture from the ::pressed handler of a multipress
gesture. Since the drag gesture hasn't seen the sequence at this
point, that is ineffective.

The fix here is to rearrange the gestures so that the multipress
gesture sees the sequence before the drag gesture, and then
claim the sequence from the ::drag-begin handler.
2014-09-26 22:21:11 -04:00
Matthias Clasen
fd49340edb Trivial: reword docs a bit 2014-09-26 19:24:00 -04:00
Matthias Clasen
b333d5ea4e GtkRange: claim sequence when popping up menu
This was clearly an oversight - the function claims the sequence
at the end, and for the popup menu case, we have an early exit
that misses this.
2014-09-26 19:18:57 -04:00
Matthias Clasen
92e52fd188 Add a style class to fullscreened windows
This will let us tweak stuff that gets shown in fullscreen windows,
https://bugzilla.gnome.org/show_bug.cgi?id=654051
2014-09-26 18:08:46 -04:00
Matthias Clasen
8e1878bc32 Fix a memory leak in gtk_test_find_label
Pointed out by Garrett Regier in
https://bugzilla.gnome.org/show_bug.cgi?id=737439
2014-09-26 18:00:19 -04:00
Matthias Clasen
5744bb3cf1 Make Ctrl-u and Ctrl-k work in GtkTextView too
It doesn't make sense to have them work in entries, but not here.
2014-09-26 17:53:07 -04:00
Matthias Clasen
5da91504da inspector: Drop an unused variable 2014-09-26 11:15:25 -04:00
Matthias Clasen
423868b408 entry: Revisit Ctrl-u one more time
Add a Ctrl-k binding too, and make them match their traditional
commandline meaning or 'erase line to the beginning/end'.
2014-09-26 11:14:28 -04:00
Matthias Clasen
414bc202e7 GtkEntry: Add a key binding for clearing the entry
Ctrl-u is a fine, well-established keybinding for this purpose,
lets just use it.
2014-09-26 10:29:10 -04:00
Matthias Clasen
e7bd73f2b0 inspector: Simplify populating the tree
No need to loop toplevels in two places.
2014-09-26 09:50:33 -04:00
Matthias Clasen
2cb31edf6f inspector: Show the warning dialog without delay
The delay was a mistaken attempt to work around a problem that
is now better understood, see
https://bugzilla.gnome.org/show_bug.cgi?id=735338
2014-09-26 09:50:33 -04:00
Matthias Clasen
3214122fbd Remove some redundant code
No need to check the same widget twice in a row for being a window.
2014-09-26 09:50:33 -04:00
Matthias Clasen
3b62f2f01d GtkWindow: improve the inspector keybinding
Binding signals can return a boolean indicating whether they
handled the event. Use that here and return FALSE if the
inspector keybinding is disabled.
2014-09-26 09:50:33 -04:00
Matthias Clasen
1041f93f7f inspector: life-cycle fixes
When closing the inspector before the main window, we must take
care to sever all signal connections and weak refs, otherwise
things will go bad when the window is closed later.
2014-09-25 23:05:15 -04:00
Carlos Garnacho
d17fd81d9b button: Fix ::clicked emission on touchscreens sending pointer events
When GtkGestureMultiPress::released happens, in_button should be unset
after emitting GtkButton::released, whose default implementation uses it.
Moreover, in_button should only be unset there for real touch events, not
guaranteed to trigger crossing events, as opposed to every pointer/touch
events from touchscreens.

https://bugzilla.gnome.org/show_bug.cgi?id=737297
2014-09-25 21:25:52 +02:00
Matthias Clasen
fcec9b9812 Use titlebar action settings for CSD windows
Instead of hardcoding these actions, consult the settings.
Note that not all of the actions supported by gnome-shell are
implemented here, only maximize, minimize, lower, and menu.

https://bugzilla.gnome.org/show_bug.cgi?id=729782
2014-09-25 14:54:49 -04:00
Matthias Clasen
d20fdd18eb Factor out titlebar click actions
So they can be made configurable.

https://bugzilla.gnome.org/show_bug.cgi?id=729782
2014-09-25 14:54:49 -04:00
Matthias Clasen
1d8a1a04f6 Add settings for titlebar actions
These match the GSettings that mutter/metacity/gnome-shell have
for this. We change the default for the middle-click action to
none, since lower is just a terrible default.

We're slightly bending the rules here, since we're adding new
settings after .0, but a) it is just barely after .0, and b) settings
are not really application API.

https://bugzilla.gnome.org/show_bug.cgi?id=729782
2014-09-25 14:54:02 -04:00
Matthias Clasen
96fd15454b Make GtkModelButton work with touch
Some recent refactoring changed things so that in_button is no
longer TRUE when released() is called for touch events. As a minimal
fix, let GtkButton do more of the work by chaining up to its
pressed and released handlers, which know how to handle touch
events. This could be further improved by leaving more of the
state handling to GtkButton, like it was done for GtkToggleButton.
2014-09-24 23:33:23 -04:00
Matthias Clasen
c0685c0f58 Fix comment typo 2014-09-24 20:31:11 -04:00
Matthias Clasen
7a81aaf3c8 GtkSwitch: Use gtk_widget_add_tick_callback
This api automatically takes care of dealing with disappearing
frame clocks, which we currently forget to and pay with crashes.
2014-09-23 11:23:20 -04:00
Carlos Garnacho
0285a255bc popover: Don't run full dispose() when unmanaging the widget
A popover can go unmanaged for 2 reasons, when the widget it points to
gets destroyed, or transitionally in gtk_popover_set_relative_to(). In
both of these cases it makes sense to only unset popover information
about the previous widget managing it, if the popover is meant to
survive the unmanaging through extra refs.

Also, the focus widget prior to a modal popover being shown is considered
information about the relative_to widget, unset it on
gtk_popover_update_relative_to() with the rest.

https://bugzilla.gnome.org/show_bug.cgi?id=736193
2014-09-22 20:59:09 -04:00
Carlos Garnacho
6b7b55f9b2 gtkwindow: run ::event and specific handlers for EWMH action triggering events
This gives an opportunity for implementations to handle these events
differently, instead of hardcoding the WM-triggering behavior.

gtk_window_event() only forwards events for WM management if the event
widget is not the window (ie. caught when bubbling), so is safe to be
called here without triggering gtk_window_handle_wm_event() twice.

This commit is an adaption to master of
https://bugzilla.gnome.org/show_bug.cgi?id=736702#c1 by Cosimo Cecchi.
2014-09-22 20:51:24 -04:00
Carlos Garnacho
f8f74b59e3 scalebutton: Invert smooth scroll dy when adding to the current value
On regular scrolling (ie. not natural scrolling), positive deltas in the
Y axis (downwards) should actually move the value towards the adjustment
minimum value to be more intuitive. This also makes the scrolling
directions match between the button and the popped up scale.

https://bugzilla.gnome.org/show_bug.cgi?id=736830
2014-09-22 20:28:27 -04:00
Matthias Clasen
eb96a7f832 inspector: Show the source of settings
This can be useful at times to see if a setting is coming
from an XSetting, or overridden by the application.

https://bugzilla.gnome.org/show_bug.cgi?id=736971
2014-09-22 19:40:49 -04:00
Matthias Clasen
18931cf0db GtkSettings: Add a private getter for the source
Settings have a little more metadata than plain properties. They
can come from different sources. Make this information available
so we can show it in the inspector.

https://bugzilla.gnome.org/show_bug.cgi?id=736971
2014-09-22 19:40:49 -04:00
Sébastien Wilmet
2ebe813c98 inspector: remove g_message()
It was probably added for debugging purposes.

https://bugzilla.gnome.org/show_bug.cgi?id=736557
2014-09-22 15:51:41 +02:00
Matthias Clasen
61de42a731 Make gtk-undelete work again as icon name
The convention we use now is to not append any suffix for ltr icons,
and append -rtl for rtl. Make gtk-undelete follow this pattern.
2014-09-21 23:13:29 -04:00
Matthias Clasen
964c202c38 GtkIconTheme: Repair symbolic fallback with rtl/ltr
For symbolic icons, we prefer symbolics in inherited themes over
generic icons in the theme itself. So far this was implemented
by looking at icon_name[0] and looking that up in inherited themes
if it is symbolic. But with automatic rtl/ltr handling, the first
icon  name will always have an -rtl or -ltr suffix, and an icon
with that suffix is not going to exist in most cases. To fix this,
look for shorter icon names too, as long as they are still symbolic.

https://bugzilla.gnome.org/show_bug.cgi?id=737000
2014-09-21 14:49:22 -04:00
Matthias Clasen
1b858e4212 Trivial: clarify a comment
Using 'highcolor' here seems confusing, since there is a theme
by that name. Just say full-color.
2014-09-21 14:29:36 -04:00
Matthias Clasen
3c96ea0ae7 inspector: Look up the schema recursively
This is the recommended way to use this function. It should
also fix problems with the inspector when GSETTINGS_SCHEMA_DIR
is set.

https://bugzilla.gnome.org/show_bug.cgi?id=737027
2014-09-20 19:52:23 -04:00
Matthias Clasen
fb126586ed inspector: Avoid a crash
We were forgetting to free the hash table, which then gave
us weak ref notifies at an unexpected time.

https://bugzilla.gnome.org/show_bug.cgi?id=737026
2014-09-20 19:30:45 -04:00
Jasper St. Pierre
df236fba58 gtkwindow: Make sure to update the shadow width, opaque region and border windows when realizing
Otherwise, they might not be properly set before the window is mapped.

For the opaque region and border window, it means that they won't get
set before the next size allocation, which tends to not be a bit deal.

For the shadow width, though, _GTK_FRAME_EXTENTS has a different meaning
when it's set before the window is mapped, so we need to make sure that
it's properly set when the window is mapped.
2014-09-19 17:39:46 -06:00
Matthias Clasen
9603754f7d Fix warning grammar 2014-09-18 21:57:20 -04:00
Matthias Clasen
c75793ee17 Fix parse-sass.sh script
The script runs into this error here:
OptionParser::NeedlessArgument: needless argument: --sourcemap=none
2014-09-18 21:53:20 -04:00
Matthias Clasen
eb6fb7326d Raleigh: Drop decoration-layout style property
This is not used anymore.
2014-09-17 15:11:25 -04:00
Sébastien Wilmet
c104c64436 Better mark GtkAlignment as deprecated
- Move the class to the Deprecated section.
- Warning at the bottom of the class description.
- A missing property was not marked as deprecated.
- Update doc of gtk_container_set_border_width() to not mention
  GtkAlignment.

https://bugzilla.gnome.org/show_bug.cgi?id=736622
2014-09-17 15:02:50 +02:00
Sébastien Wilmet
21e0a114e0 docs: GtkStatusIcon is deprecated since 3.14, not 3.16 2014-09-17 15:02:50 +02:00
Matthias Clasen
29eae57be4 Undreprecate GtkMisc::x/yalign for now
These can't quite be replaced by h/valign, so keep the properties
undeprecated for 3.14.
2014-09-15 23:22:54 -04:00
Benjamin Otte
6b16c795ba iconview: Unset prelit item in leave-notify
We don't want to keep a prelit item when the mouse cursor is elsewhere.
2014-09-16 04:30:01 +02:00
Benjamin Otte
072c417416 iconview: Remove iterm->prelight
item->prelight
is always equal to
  iconview->priv->last_prelight == item
so there is no need to track it separately.
2014-09-16 04:30:00 +02:00
Benjamin Otte
48d56c4077 iconview: always draw a cell background
Don't just draw it for selected cells.
2014-09-16 04:30:00 +02:00
Matthias Clasen
fdb13b6ef5 Revert "GtkAssistant: Drop use of GtkMisc"
This reverts commit 687eae4b51.

Still not a solved problem.
2014-09-15 21:11:06 -04:00
Benjamin Otte
86607c0f21 iconview: Don't queue redraws when nothing changes
We were queueing redraws for the old and the new prelit item, even when
they were the same item.
2014-09-15 16:35:40 +02:00
Руслан Ижбулатов
45ab4ae09b build: Set no_undefined in Makefile.decl
This simplifies the code and - more importantly - fixes the cases like
in testsuite/reftests where the no_undefined definition was missing.

https://bugzilla.gnome.org/show_bug.cgi?id=736382
2014-09-15 16:35:40 +02:00
Benjamin Otte
1741de47db treeview: Apply column-header region always
... so that invisible columns get it, too.

Works around weird effects seen when buttons are animated and columns
get hidden/shown.
2014-09-15 16:35:40 +02:00
Benjamin Otte
e9ce9a814b label: Clear layout after setting GtkLabel::lines property
Otherwise the label will not pick up the property.
2014-09-15 16:35:40 +02:00
Chun-wei Fan
15a9f1bdf5 gtk/gtkgladecatalog.c: Fix Visual Studio Builds
The _GDK_EXTERN decoration needs to be with the function prototype, if one
exists, so move the _GDK_EXTERN decoration up.
2014-09-15 12:26:32 +08:00
Bastien Nocera
355afc8f56 inspector: Show hidden windows in the inspector
This allows us to access otherwise hidden windows, which can be
useful to provide better debug information than would be available
through other means.

https://bugzilla.gnome.org/show_bug.cgi?id=736557
2014-09-14 08:47:05 -04:00
Matthias Clasen
3ad8bae1c4 inspector: Fix initial state of dark switch
Noticed while debugging a totem problem.
2014-09-14 08:38:28 -04:00
Lapo Calamandrei
76019fad0e Adwaita: osd progressbar fixes
See https://bugzilla.gnome.org/show_bug.cgi?id=735959
2014-09-13 16:21:37 +02:00
Lapo Calamandrei
dcffe0e2e3 Adwaita: uneven paddings on .text-button.image-button
We want buttons with an icon and text to have the padding of the
text-button on the label side and on the image-button on the icon
side.
2014-09-13 12:27:38 +02:00
Matthias Clasen
6064fc343e Drop unused code
Not worth keeping this around.
2014-09-12 22:31:25 -04:00
Matthias Clasen
76b1361902 Drop two pointless lines
These return statements weren't making any difference.
2014-09-12 22:31:10 -04:00
Matthias Clasen
45369d506b GtkDnd: Move X11-specific code out of generic code path
There was some X11-specific code before an early exit
in the functions that grab and ungrab keys during DND.
It seems to not cause a problem under Wayland, but moving
it out of the way seems right anyway.
2014-09-12 22:31:04 -04:00
Lapo Calamandrei
8c6b2fb94b Revert "Adwaita: theme active-menu buttons"
This is app specific, doesn't belongs here.
2014-09-12 19:12:25 +02:00
Lapo Calamandrei
961b7a9210 Adwaita: theme active-menu buttons 2014-09-12 18:01:58 +02:00
Jakub Steiner
eb9dcc1636 Adwaita: keep pathbar the same height as imagebuttons
- the previous patch introduced uneven height on the toolbar
2014-09-12 14:03:04 +02:00
Lapo Calamandrei
3d2e8ed1d8 Adwaita: better stack switcher logic
Now the stack switcher buttons look right even when not in the
header-bar.
2014-09-12 13:48:52 +02:00
Jakub Steiner
0060f84477 Adwaita: space pathbar better
https://bugzilla.gnome.org/show_bug.cgi?id=736535
2014-09-12 12:57:52 +02:00