Commit Graph

43296 Commits

Author SHA1 Message Date
Georges Basile Stavracas Neto
e51946270a placesview: simplify code
Since we started adding a persistent Computer item,
all the code related to the view modes became obsolete,
since the view is never empty anymore. So, drop this
dead code and use the plain stack to manage the empty
search results view.

Also, this patch fixed a very annoying keyboard navigation
issue where we couldn't go from the On This Computer to Networks
lists, because they were two separate widgets. Merge the two
lists into a single one, and update headers accordingly.
2015-07-28 11:46:25 -03:00
Georges Basile Stavracas Neto
da11404719 placesviewrow: hook up finalize
It is needed to hook up the finalize method, since
it's overriden manually.
2015-07-28 07:41:32 -03:00
Georges Basile Stavracas Neto
c3b6345377 placessidebar: fix ellipsizing glitch
The places sidebar rows' labels were missing a proper
xalign, which caused the labels to keep shaking while
the sidebar was resized.

Fix that by setting the label's xalign to 0.
2015-07-28 07:08:03 -03:00
Georges Basile Stavracas Neto
317ba620e2 placesview: plug some memory leaks
The GFile containing the Computer item was not
properly dereferenced, so plug that leak by both
dereferencing it and adding some reference management
on GtkPlacesViewRow.
2015-07-28 07:03:09 -03:00
Georges Basile Stavracas Neto
a5e762e6a7 placesview: show Computer item
GtkPlacesView widget manages persistent locations,
factoring out GtkPlacesSidebar functionality.

It, however, does not completely shows all sidebar
locations, since Computer is still missing.

Add a Computer item, adjusting some internal behavior
to make that possible.
2015-07-28 07:03:09 -03:00
Georges Basile Stavracas Neto
5134e4b3bd placesview: don't show network addresses
It is distracting, not relevant and too space
consuming.

Remove the network addresses label.
2015-07-28 07:03:09 -03:00
Georges Basile Stavracas Neto
c00f216d92 placesview: fix documentation
The doc for gtk_places_view_get_search_query was being
set twice, while gtk_places_view_set_search_query was
never set.

Fix that by correcting the wrong getter documentation.
2015-07-28 07:03:09 -03:00
Georges Basile Stavracas Neto
ea3a80c19f placessidebar: fix documentation
Use the same explanation of why GtkPlacesSidebar::show-connect-server
was deprecated and its replacements on getter and setter.

Also, fix a mistakenly deprecated function.
2015-07-28 07:03:09 -03:00
Matthias Clasen
df50858dfd inspector: Show monitor information
This is useful to verify the monitor information returned by
other backends.
2015-07-28 01:14:49 -04:00
Matthias Clasen
bc68600cb0 inspector: Show wayland display information
Don't call it "X display" when we show useful information under
Wayland as well.
2015-07-28 00:46:34 -04:00
Matthias Clasen
7d87eebfe7 wayland: Return a display name
Make gdk_screen_make_display_name() return a likely correct
name for the Wayland socket we are using.
2015-07-28 00:43:54 -04:00
Matthias Clasen
55edc81c10 x11: Make selection handling work across screens
When dealing with selection events, we might see windows from
other screens in the requestor field. The current x11 backend
code fails to wrap these in a foreign GdkWindow, since we
don't have the corresponding GdkScreen anymore. Work around
this by creating such 'foreign screens' on demand. We still
maintain the 1:1 relation between the display and the screen
returned by gdk_display_get_default_screen().

https://bugzilla.gnome.org/show_bug.cgi?id=721398
2015-07-27 23:20:53 -04:00
Jordi Mas
1b43c3f493 Update Catalan translation 2015-07-27 23:03:13 +02:00
Matthias Clasen
4050abe2fa Plug a memory leak
GtkCssProvider was using the wrong unref function for GtkCssKeyframe
objects. Funnily, this didn't crash at all, the refcount was at the
same place in the struct - it just didn't free all the memory, causing
valgrind to complain.
2015-07-27 14:54:13 -04:00
Christoph Reiter
048d710d67 quartz app menu: add hidpi support for menu icons
Use the new cairo to NSImage converter function
to set the device scale.

Remove the pixbuf converter function as this was
the last user.
2015-07-27 17:28:36 +02:00
Christoph Reiter
4b23ba53c5 quartz dnd: add hidpi support for gtk_drag_set_icon_surface()
Instead of storing the dnd icon as a pixbuf store it
as a cairo surface and transfer the device scale
when converting it to a NSImage. In the pixbuf/stock/named
setters convert to a surface instead (no hidpi support yet)
2015-07-27 17:28:14 +02:00
Christoph Reiter
5003b5873a quartz dnd: fix drag icon position relative to cursor position
The y axis is reversed on osx
2015-07-27 17:27:51 +02:00
Christoph Reiter
2c329f5b3a quartz: disable system shadows if a GdkWindow shadow is set.
The shadow will be drawn in the wrong place in those cases so all we can
do is disable it. This fixes double shadows drawn around menus, popups
and tooltips.

https://bugzilla.gnome.org/show_bug.cgi?id=734984
2015-07-27 17:26:46 +02:00
Georges Basile Stavracas Neto
e0339c5244 placessidebar: show Computer item when not in Other Locations
Previous commits removed from places sidebar the code related
to displaying the Computer item, which should be shown when
the sidebar is not displaying the Other Locations item.

Add back the item when the sidebar is not in Other Locations'
mode.
2015-07-27 12:21:36 -03:00
Patrick Griffis
ee73e27fd7 quartz: Fix building
Broken by 6d04183c5d and 6ac07a2e85
2015-07-27 09:33:32 -04:00
Matthias Clasen
49a596aa52 file chooser: Note when searching remote locations
Inform the user that we won't search recursively when searching
in remote locations.
2015-07-27 08:07:39 -04:00
Matthias Clasen
eee85d39e5 Avoid more GFile<>uri roundtrips
Make GtkSearchHit carry a GFile instead of an uri. Most of the
search engines already have the object around, and converting
to an uri and back is unnecessary extra work.
2015-07-27 08:07:39 -04:00
Matthias Clasen
f7bba525fc search engine: Don't crawl remote locations
This is slow, and causes too much network I/O.
So skip locations that look like they are remote.
2015-07-27 08:07:39 -04:00
Matthias Clasen
93bfec3ac5 Add a helper function for remote locations
Add a helper function that says whether a location should be
considered remote. To determine this, we look at the filesystem
type reported by gvfs, and say 'remote' for sftp, webdav, ftp,
nfs and cifs.
2015-07-27 08:07:39 -04:00
Matthias Clasen
30de4cc7bb Actually use search results from the model
We didn't connect to the signals, so we never picked up
any search results from the model engine. Good thing, since
it was returning the wrong thing.
2015-07-27 08:07:39 -04:00
Matthias Clasen
1069e2b9cc Port to GtkSearchHit
GtkSearchEngineModel was still trying to return uris as hits.
This is not working anymore, we are expected to return GtkSearchHit
structs.
2015-07-27 08:07:38 -04:00
Matthias Clasen
48c172f4e0 Always pass a location into the query
Failure to do so was causing search to start from the home dir
when the current folder is not represented on the sidebar.
2015-07-27 08:07:38 -04:00
Matthias Clasen
71b3e0b66b Store locations as GFile
It is a bit pointless to have the file chooser get a uri from an
existing GFile to put in the query, only to have some of the search
engines reconstruct a GFile from it.
2015-07-27 08:07:38 -04:00
Matthias Clasen
859db92183 Remove a redundant assignment 2015-07-27 08:07:27 -04:00
Dušan Kazik
48815d2c7d Updated Slovak translation 2015-07-27 08:21:37 +00:00
Dimitris Spingos
0a6b624440 Updated Greek translation 2015-07-27 12:36:37 +03:00
Benjamin Otte
5e2ab6db7f combobox: Use ui file to construct internal button child 2015-07-26 17:18:42 +02:00
Benjamin Otte
5ad5431cb7 combobox: Create button on init() and destroy in destroy()
The button is the same in both menu and list mode, so there's no need to
destroy and recreate it.
2015-07-26 17:18:42 +02:00
Benjamin Otte
e0572212bc combobox: Add scroll support in list mode 2015-07-26 17:18:42 +02:00
Benjamin Otte
8243140731 combobox: Remove unused argument
The visible check is always FALSE, so no need to keep the code around.
2015-07-26 17:18:42 +02:00
Benjamin Otte
63c219b8e7 combobox: Remove the box from the button
... when in menu mode.

Now that we don't have a separator anymore, the box is not needed
anymore.
2015-07-26 17:18:42 +02:00
Benjamin Otte
fcb26376df combobox: Remove the separator
It was a special case and it's not used by themes anymore.

Plus, in the CSS world, if a theme wants a separator, it can just
style the button's border to create one.
2015-07-26 17:18:42 +02:00
Matthias Clasen
93a4030c45 Remove a duplicate string
dialog-information was twice in the list of accessible labels
for icon names.
2015-07-26 02:57:39 -04:00
Matthias Clasen
58fa3d96a8 listbox: Fix shift-selection
Selecting a range of rows with Shift-click was accidentally broken
in e6e511eb46. Make it work again.
2015-07-26 02:40:26 -04:00
Matthias Clasen
6ac07a2e85 quartz: Implement NO_TARGET drag result
This is necessary to make notebook tab DND work.

https://bugzilla.gnome.org/show_bug.cgi?id=752638
2015-07-26 02:10:47 -04:00
Matthias Clasen
6d04183c5d quartz: Check if a drag ends inside a known window
If a drag ends inside a known window, set the dest_window field
in the drag context. This information is needed to implemented
notebook tab dragging.

https://bugzilla.gnome.org/show_bug.cgi?id=752638
2015-07-26 02:05:47 -04:00
Jonas Ådahl
955c1c7734 GtkMenu: Properly detach menu when the window is detached
Without properly cleaning up GtkMenu private attach state
(GtkMenuAttachData) when the attached widget is freed, we would end up
with an invalid pointer to a freed widget. Trying to detach from that
widget would cause a segmentation fault.

https://bugzilla.gnome.org/show_bug.cgi?id=752761
2015-07-26 01:57:26 -04:00
Giovanni Campagna
83b7a0f0e5 wayland: Fix initial fullscreen monitor support
-1 means that we have no specific preference for an initial
fullscreen monitor, and -1 is less than the number of monitors,
so we would end up accessing invalid memory. Prevent that.

https://bugzilla.gnome.org/show_bug.cgi?id=752875
2015-07-26 01:55:56 -04:00
Matthias Clasen
b2b4a3bb0a Fix a warning 2015-07-26 01:49:19 -04:00
Matthias Clasen
5c2759af3c Use standard cursor names
This changes GTK+ to use gdk_cursor_new_from_name() with the
'standard' css names, instead of GdkCursorType.

https://bugzilla.gnome.org/show_bug.cgi?id=652085
2015-07-26 01:45:06 -04:00
Matthias Clasen
b3fb1aefd8 win32: Support all css cursor names
Approximate some of the resize cursors with similar cursors.
2015-07-26 01:43:56 -04:00
Peter Wu
fffbe61c23 broadway: fix use-after-free on read errors
Call chain:
 - input_data_cb
   - broadway_server_read_all_input_nonblocking (input)
     - broadway_input_free (input)
       (now input is invalid)
     attempt to use input->active -> use-after-free

Make broadway_server_read_all_input_nonblocking return a boolean, TRUE
if the input was valid, FALSE otherwise. This allows input_data_cb to
detect whether the input was gone or not.

https://bugzilla.gnome.org/show_bug.cgi?id=741685
2015-07-26 00:46:13 -04:00
Matthias Clasen
030aa540ef Fix x11-less build
We don't use pangoft2 at all in libgdk, but we are using it in libgtk
both under X and Wayland.
2015-07-26 00:35:25 -04:00
Matthias Clasen
62d785a6b7 Don't use libcanberra without X
libcanberra calls x11 backend functions, so we can't use it
when the x11 backend is disabled.
2015-07-25 23:22:04 -04:00
Matthias Clasen
69d90d4f50 places view: Documentation fixups
Rewrite gtk_places_sidebar_set_show_enter_location docs, add
references to the relevant signals, remove mentions of
GtkPlacesView from the docs, since it is not public at this point.

https://bugzilla.gnome.org/show_bug.cgi?id=752633
2015-07-25 12:11:05 -04:00