Commit Graph

43150 Commits

Author SHA1 Message Date
Benjamin Otte
b9b17c3c2a headerbar: Remove unused variables in private struct 2015-07-16 06:15:13 +02:00
Benjamin Otte
8e87988179 toolbar: Switch from get_path_for_child() to css node managing 2015-07-16 06:15:13 +02:00
Benjamin Otte
a7680c68de cssnode: Add gtk_css_node_reverse_children() 2015-07-16 06:15:13 +02:00
Benjamin Otte
6e4f42f97e cssnode: Change API of some functions
gtk_css_node_set_after/before() are now called
gtk_css_node_insert_after/before().

This brings them in line with other similar APIs (ie GtkListStore). And
it allows easier usage of the API (see changes to gtkbox.c).
2015-07-16 06:15:13 +02:00
Georges Basile Stavracas Neto
79f2400c0d filechooserwidget: use places view to manage fixed devices
Previous patch modified places sidebar widget to stop handling
fixed devices by adding an "Other Locations..." item. Up to now,
however, these changes are isolated from each other since the
bundled file manager widgets ignore the sidebar requests for
external management of fixed devices and networks.

To fix that, make the file chooser widget be aware of the
GtkPlacesSidebar::show-other-locations signal and, when requested,
show places view to manage the fixed devices and networks.

https://bugzilla.gnome.org/show_bug.cgi?id=752034
2015-07-15 23:11:52 -03:00
Georges Basile Stavracas Neto
7db399d975 placessidebar: add Other Locations item
Places sidebar is a widget that enabled the user to select
XDG directories, bookmarks and mounted network locations,
as well as manages permanent and removable devices.

The new design that aims to look less clutered makes the
sidebar display only removable devices, as well as mounted
networks, bookmarks and XDG directories, and delegates the
management of permanent devices such as hard drive partitions
to GtkPlacesView, a newly introduced widget for this specific
purpose.

To delegate it, add an "Other Locations..." item to notify
when the permanent devices manager is required. Besides that,
don't show these fixes devices on the sidebar itself, as they
are not supposed to be handled by the sidebar anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=752034
2015-07-15 23:11:52 -03:00
Georges Basile Stavracas Neto
7af88d40b1 placesview: add view for fixed drives and networks
Places sidebar shows XDG directories, mounted and unmounted devices,
connected networks, bookmarks and actions like 'Connect to server'
and 'Insert location', which causes the sidebar to grow very quickly
and look cluttered. Because of that, new mockups for the sidebar try
to simplify it.

To make the sidebar simpler, the new mockups propose that it should
only handle connected networks and removable devices such as flash
drives and USB devices, and delegates other devices for external
widgets through the 'Other Locations' item.

To handle fixed devices and manage network connections, add a new
widget named GtkPlacesView, based on Nautilus mockups to keep
consistency between GNOME file management tools - in this case,
between Nautilus and the bundled Gtk's file chooser.

https://bugzilla.gnome.org/show_bug.cgi?id=752034
2015-07-15 23:11:52 -03:00
Carlos Garnacho
72bfb40ccf Revert "x11: Query pointer devices' scroll valuators on toplevel enter events"
This reverts commit 77b8495bc4.

The commit broke more scenarios than fixed, better to go back to square one.
2015-07-15 21:19:25 +02:00
Owen W. Taylor
6504b2e534 GdkDisplayX11: Properly translate server timestamps from _NET_WM_FRAME_* messages
When using frame times from _NET_WM_FRAME_DRAWN and _NET_WM_FRAME_TIMINGS, we
were treating them as local monotonic times, but they are actually extended-precision
versions of the server time, and need to be translated to monotonic times in the
case where the X server and client aren't running on the same system.

This fixes rendering stalls when using X over a remote ssh connection.
https://bugzilla.gnome.org/show_bug.cgi?id=741800
2015-07-15 12:46:06 -04:00
Matthias Clasen
24e1323eb3 places sidebar: Handle menu key
It is good practice to handle the menu key and Shift-F10 to
allow keyboard-driven use of context menus.
2015-07-15 12:46:06 -04:00
William Hua
bd71b801de mir: don't ensure_surface if window not visible 2015-07-15 07:43:55 -04:00
William Hua
064f28fcbc mir: don't warn if transient_for is NULL 2015-07-15 07:43:55 -04:00
William Hua
b32899b98a mir: add more default settings under mir 2015-07-15 07:43:55 -04:00
Pedro Albuquerque
88b278b45c Updated Portuguese translation 2015-07-15 10:02:38 +00:00
Daniel Mustieles
34388d147f Updated Spanish translation 2015-07-15 11:13:29 +02:00
Matthias Clasen
e7c0bb6025 file chooser: Show progess spinner even if not empty
With the previous approach, we could only show the spinner
before we had any results. With the new approach, we can just
leave the timeout in place and always show the spinner until
the search is done.
2015-07-15 00:15:44 -04:00
Matthias Clasen
6d757750f1 file chooser: Stop search when entry is cleared 2015-07-15 00:12:33 -04:00
Matthias Clasen
5bd6013165 file chooser: Refine search progress display
Move the spinner to the search bar, so we can keep it around
until the search is over.
2015-07-15 00:03:09 -04:00
Matthias Clasen
eb67d14551 file chooser: Be more careful with subtitles
We were showing things like "Searching in (null)" if the current
folder is not in the sidebar. Avoid that by falling back to using
current_folder.

Pointed out by Carlos Soriano.
2015-07-14 23:50:40 -04:00
Ryan Lortie
a00a5ed210 GtkApplication: avoid using stale timestamps
Avoid using a stale timestamp (from the last user interaction with the
application) when a message arrives from D-Bus requesting that a new
window be created.

In this case the most-correct thing that we can do is to use no
timestamp at all.

We modify gdk_x11_display_set_startup_notification_id() to allow a NULL
value to mean "reset everything" and then call this function
unconditionally on receipt of D-Bus activation requests.  The result
will be that a missing desktop-startup-id in the platform-data struct
will reset the timestamp.

Under their default configuration metacity and mutter will both map
windows presented with no timestamp in the foreground.  This could
result in false-positive, but there is very little we can do about that
without the original timestamp from the user event.

https://bugzilla.gnome.org/show_bug.cgi?id=752000
2015-07-14 18:34:09 -07:00
Jasper St. Pierre
18dbe181fb gtkframe: Don't queue a redraw on the entire widget every size allocate
Lots of applications often use GtkFrame as a giant toplevel container,
and that means that they get size allocated often. When frames get size
allocated, they invalidate their entire widget tree, even if they
haven't changed size or anything like that happens at all. This is
because the shadow / label needs to be redrawn if the child changes
size. We can optimize this out and only mark ourselves for a redraw if
the child has actually changed its size.
2015-07-14 18:32:45 -07:00
Lars Uebernickel
2dda89cbd5 GtkButtonBox: remove spacing when buttons are linked
GtkButtonBox adds the "linked" class to its style context when its
layout is set to GTK_BUTTONBOX_EXPAND. It shouldn't ever make sense to
have spacing between buttons in that case, as themes generally draw
linked elements with a continuous border.

Thus, always set spacing to 0 and ignore GtkDialog's button-spacing
style property when the layout is set to EXPAND.

Also remove the now-redundant css rules which set button-spacing to 0
for message dialogs.

https://bugzilla.gnome.org/show_bug.cgi?id=752131
2015-07-14 15:12:56 +02:00
Matthias Clasen
0f479deb5e range: Tweak button bindings
Change things around so that warp-to-click and jump-by-pages are
bound to left-click and shift-left-click, depending on the value
of gtk-primary-button-warps-slider. Autoscrolling is bound to
right-click.

To achieve this, reorganize gtk_range_multipress_gesture_pressed
so that the functions are clearly separated.
2015-07-13 22:40:43 -04:00
Daniel Mustieles
437254d20f Updated Spanish translation 2015-07-13 10:51:18 +02:00
Daniel Mustieles
c459413005 Updated Spanish translation 2015-07-13 10:51:05 +02:00
Kalev Lember
6b05a686dc GtkSettings: Fix a documentation typo 2015-07-12 20:18:17 +02:00
Matthias Clasen
1ca6d8b1b5 range: Trivial field ordering 2015-07-12 01:53:36 -04:00
Matthias Clasen
1c780beb8b range: Add a stepper alternative
Make shift right-click on the trough start autoscrolling. The
autoscrolling is similar to the way steppers operate now, with
the difference that we vary the scrolling speed based on the
distance of the pointer from the widget.
2015-07-12 01:42:03 -04:00
Matthias Clasen
6e280d2478 range: switch secondary and middle button on steppers
Clicking on steppers does different things depending on which
button you use. We used to scroll to the end on secondary click
and use high-speed autoscrolling on middle-click. Switch these
two around, since the scroll-to-end functionality is less likely
to be useful, and the seconary button makes the autoscrolling
more easily available.
2015-07-12 00:23:32 -04:00
Matthias Clasen
f35c7b83d9 font chooser: Remove a stray notify
This was forgotten when I changed to font map to not be a
property.
2015-07-11 00:15:42 -05:00
Matthias Clasen
301cf24b33 file chooser: Clean up unused includes 2015-07-11 00:15:42 -05:00
Matthias Clasen
995e87322c file chooser: Remove some obsoltete code
We no longer have editable rows in the list, so no need to
check for them anymore.
2015-07-11 00:15:42 -05:00
Matthias Clasen
0c7237f15e file chooser: Fix multi-selection
Even if we only ever hit the code with a singleton selection,
calling gtk_tree_selection_get_selected is not ok if the tree
selection mode allows multi-selection. Replace all calls to
gtk_tree_selection_get_selected in the file chooser code with
callback loops iterating over the selection. This problem
was introduced with the recently added rename and delete
menuitems.
2015-07-11 00:15:42 -05:00
Matthias Clasen
24dc6f8771 file chooser: Do less work
We only need to update the sensitivity of the context menu
items rihgt before we are going to pop it up. Everything else
is pointless work.
2015-07-11 00:15:42 -05:00
Matthias Clasen
201d4c1101 file chooser: Avoid doing excess work
Whenever we change directories, we unset the model, and then
we set a new model. This causes several emissions of
GtkTreeSelection::changed, for each of which we do a bunch
of work to update the path bar, the location entry, etc.

We can savely ignore some of these signals, and do less work.
2015-07-11 00:15:42 -05:00
Matthias Clasen
72a8064c7d Trivial code cleanup 2015-07-11 00:15:41 -05:00
Matthias Clasen
410d180b45 file chooser: Avoid animations when setting up
There is no need to animate things when we are just setting up
the startup mode, so disable transitions in the revealer and
the stack. Pointed out by Carlos Soriano
2015-07-11 00:15:41 -05:00
Matthias Clasen
e43ba9d726 file chooser: Ensure we update subtitles
Notify the ::subtitle property when modes change that may
affect it. Also ensure that we update the location mode when
we switch back to the pathbar.
2015-07-11 00:15:41 -05:00
Benjamin Otte
190f025f74 cssnode: Only queue_validate() when node is visible
This avoids running animations in hidden toplevels.
2015-07-10 21:44:32 +02:00
Benjamin Otte
adcb52e82b cssnode: Only invalidate sibling nodes if changed node is visible 2015-07-10 21:44:32 +02:00
Pedro Albuquerque
c05cd611e6 Updated Portuguese translation 2015-07-10 08:37:25 +00:00
Eric Williams
6038474060 Added an additional explanation and code snippet for GtkImageMenuItem.c
https://bugzilla.gnome.org/show_bug.cgi?id=752093
2015-07-08 13:53:07 -04:00
Eric Williams
a74a3da745 Added a more meaningful description for /deprecated/gtkimagemenuitem.c
https://bugzilla.gnome.org/show_bug.cgi?id=752088
2015-07-08 06:10:00 -04:00
Matthias Clasen
8e53a01188 places sidebar: Fix rows getting 'lost' when dnd fails
There was some code that lead to the places sidebar loosing track
of the row being dragged if a motion event came in between letting
go of the button and the drag snap-back animation ending. This would
cause us to not show the row again, giving the appearance that it
was 'lost'.

https://bugzilla.gnome.org/show_bug.cgi?id=751448
2015-07-08 06:10:00 -04:00
Benjamin Otte
8756c03885 testtoolbar: Don't expand rows that shouldn't be expanded 2015-07-08 05:48:59 +02:00
Benjamin Otte
0f6c955795 frame: Remove get_path_for_child implementation
As far as I can read the code it added the .frame style class to the
GtkFrame element. But GtKFrame already has a .frame style class these
days.
2015-07-08 05:48:59 +02:00
Benjamin Otte
6379a425b0 actionbar: Remove get_path_for_child implementation
It wasn't used because CSS walks the widget->parent chain, so it'd only
ever call this func for priv->revealer.
2015-07-08 05:48:59 +02:00
Benjamin Otte
7f8de66c0a css: text-decoration-style is not inherited 2015-07-08 05:48:59 +02:00
Matthias Clasen
bdf0820c50 Simplify Xft setting fallback
If we don't find Xft values in the X resource db, simply fall
back to the values that are hardcoded in /etc/X11/Xresources
anyway. Extra trickery with likely-made-up screen dimensions
is not going to yield better results, and only makes for a
deeper rabbit hole when debugging.
2015-07-07 20:54:16 -04:00
Carlos Soriano
3fb1d1806d gtksidebarrow: remove unused property
The sensitive property was a workaround which commit
3f8982a0cd fixed.
Just remove it now that is not necessary.
2015-07-07 23:01:47 +02:00