Commit Graph

23641 Commits

Author SHA1 Message Date
Paolo Borelli
77658b76ae linkbutton: use the text-decoration-line css
Remove the custom add() implementation and use css to underline the
label.
2015-07-06 00:04:06 +02:00
Paolo Borelli
384df61c90 css: add support for text-decoration-line 2015-07-06 00:04:06 +02:00
Paolo Borelli
9e26fa9a42 entry: add css letter-spacing 2015-07-06 00:04:06 +02:00
Paolo Borelli
a19331f231 label: add support for CSS letter-spacing property
Support letter-spacing CSS property on GtkLabel.
Reftest is included.
2015-07-06 00:04:05 +02:00
Paolo Borelli
b92c530a61 pango: move an utility function from gtklabel
This will be used both by gtklabel and gtkentry
2015-07-06 00:04:05 +02:00
Ting-Wei Lan
5436c74a19 Fix return value error in _gtk_file_system_model_get_directory 2015-07-06 03:27:42 +08:00
Matthias Clasen
39822092f4 file chooser: Allow deleting files
This is another often requestsed feature for save mode.

Based on a patch by John Beard,
https://bugzilla.gnome.org/show_bug.cgi?id=325150
2015-07-04 23:46:11 -04:00
Matthias Clasen
15617a69aa file chooser: Allow renaming files
This has often been requested as a useful feature in save mode.

Based on a patch by John Beard,
https://bugzilla.gnome.org/show_bug.cgi?id=325150
2015-07-04 22:44:30 -04:00
Matthias Clasen
530d295a2e Fix up some whitespace mishap 2015-07-04 22:38:30 -04:00
Matthias Clasen
8379ef3067 file chooser: Redo the trailing space warning
Redo this slightly differently, so we can keep all the simple
checks in one place. This will make it easier to reuse the code
for file renaming.
2015-07-04 22:38:30 -04:00
Matthias Clasen
8b90c79037 places sidebar: Fix memory handling of rename popover
We were freeing the same string twice here, leading to
badness.
2015-07-04 22:38:29 -04:00
Arc Riley
94bcdd3217 Strip leading and trailing whitespace from filechooser save filenames
This makes a local copy of the file part of the entry to strip it transparently
Since this is assumed to be a mistake, the user is not notified.

https://bugzilla.gnome.org/show_bug.cgi?id=593372
2015-07-04 19:21:45 -04:00
Arc Riley
02b5ac9ee4 Warn for whitespace at beginning or end of new folder names
The warning is not intended to disable the Create button and must only be shown
when the folder is not found, so this is implemented in the folder name exists
callback.

A "name" entry was added to FileExistsData to pass the filename to the callback

https://bugzilla.gnome.org/show_bug.cgi?id=751800
2015-07-04 18:57:13 -04:00
Emmanuele Bassi
d2569a3860 docs: Drop deprecated symbolic icon names
Do not suggest using icons that do not exist.
2015-07-04 19:34:23 +01:00
Emmanuele Bassi
c5a250ce37 container: Update the add() warning
Now that gtk_widget_reparent() has been deprecated, we should not
suggest it.
2015-07-04 19:34:23 +01:00
Matthias Clasen
309c845e69 file chooser: Make Ctrl-L work in search mode
There is no real reason to not allow this. The transition is
not quite as smooth as it should be, currently, but at least
it works.
2015-07-04 00:29:27 -04:00
Matthias Clasen
a453212591 file chooser dialog: Make button not take focus
Things work smoother, keynav-wise, if the search button does not
take focus on click.
2015-07-04 00:29:27 -04:00
Matthias Clasen
4dafcf9c8b file chooser: Make unsetting save entry work
Fix an overzealous assertion.
2015-07-04 00:29:27 -04:00
Matthias Clasen
017025c1a7 file chooser dialog: Make action changes work
We were not listening for action changes to update the
save entry.
2015-07-04 00:29:26 -04:00
Matthias Clasen
bb6f698abe file chooser: Cleanups 2015-07-04 00:29:26 -04:00
Matthias Clasen
29abbdd3e3 file chooser: Don't show Trash in save mode
You can't save there...
2015-07-04 00:29:26 -04:00
Matthias Clasen
78db92df7e GtkPlacesSidebar: Allow hiding Trash
We will use this in the filechooser in save mode.
2015-07-04 00:29:26 -04:00
Matthias Clasen
fa3ff773be GtkTreeViewColumn: Fix a documentation typo 2015-07-04 00:29:26 -04:00
Matthias Clasen
22294a4a0d file chooser: Improve column sizing
Allow the name and location columns to be resized, but arrange
for their sizing to be reset when the column layout changes (either
by the location column appearing/disappearing, or by the time
column changing between mtime and atime. This gives a decent
compromise between good automatic sizing and user control.
2015-07-04 00:29:26 -04:00
Matthias Clasen
ed1c349e0b file chooser: Remove a wrong assumption
The code for getting the selected files was assuming that
we are always in browse mode, and was causing warnings when
hitting Ctrl-L twice, right after opening the file chooser.

The fix is to simple use the model that is passed into the
callback.
2015-07-04 00:29:26 -04:00
Matthias Clasen
17a860cea2 file chooser: Don't show Enter Location in sidebar
Following the file chooser mockups.
2015-07-04 00:29:26 -04:00
Matthias Clasen
c7bc902093 file chooser: Update empty state for search
Follow the mockups more.
2015-07-04 00:29:26 -04:00
Matthias Clasen
191bccebf3 file chooser: Add search progress
Show a spinner if no search reasults have shown up yet and
the search is still going, after 2 seconds.
2015-07-04 00:29:26 -04:00
Matthias Clasen
31a022175f file chooser: Set fixed sort functions for recent and search 2015-07-04 00:29:26 -04:00
Matthias Clasen
0ac17418dd file chooser: Improve location column formatting 2015-07-04 00:29:26 -04:00
Matthias Clasen
39c2d12330 file chooser: Improve the mode switching operation
Avoid reloading models unnecessarily, e.g. when the user
switches to search and back without starting a search.
Keep the current list contents visible until a search is
actually started. Also, synchronize any changes in the
column layout with the corresponding model changes.
2015-07-04 00:29:26 -04:00
Matthias Clasen
9a44467318 Add a getter for the directory to file system model
This will allow us to aovid reloading if the directory is
unchanged.
2015-07-04 00:29:26 -04:00
Matthias Clasen
5763199e43 file chooser: Clean up enum handling
Use g_settings_get_set_enum to handle the clock and date format
settings.
2015-07-04 00:29:25 -04:00
Matthias Clasen
f690167b0d file chooser: Code cleanups
Shorten excessively long field names.
2015-07-04 00:29:25 -04:00
Matthias Clasen
443601addc file chooser: Consistently clear model caches
This was not done for all models in all places, leading to e.g.
icon theme updates not applying correctly to search results.
2015-07-04 00:29:25 -04:00
Matthias Clasen
2cd6d1a351 file chooser: Add a way to toggle time display 2015-07-04 00:29:25 -04:00
Matthias Clasen
215a9a1b08 file chooser: remove a stale comment 2015-07-04 00:29:25 -04:00
Matthias Clasen
8974ec7413 file chooser: Improve time and date formatting
Use the same formats as nautilus, and put date and time in
separate cells, so they are neatly aligned.
2015-07-04 00:29:25 -04:00
Matthias Clasen
1c82a533ed file chooser: Don't allow resorting recent files
They are inherently sorted by access time.
2015-07-04 00:29:25 -04:00
Matthias Clasen
412e33da16 file chooser: Use access time for recent files
Use access time for sorting the recent files, and show it in
the list instead of mtime.
2015-07-04 00:29:25 -04:00
Matthias Clasen
33b5c26f41 file chooser: Add and use a model search engine
This search engine reuses the GFileInfo that is already loaded
for the file list, to ensure that hits from the current directory
always appear promptly.
2015-07-04 00:29:25 -04:00
Matthias Clasen
fe128b5b4d file chooser: Don't show recent in save mode
Don't show Recent in the sidebar when we are in save mode.
We also ignore the startup-mode = recent in save mode now - we
don't want to populate the file list with recent files if Recent
is not on the sidebar. If you really want to go there, you can
still enter recent:// in the location entry.

https://bugzilla.gnome.org/show_bug.cgi?id=751653
2015-07-04 00:29:25 -04:00
Matthias Clasen
648e4a7ea9 file chooser: Add Ctrl-F as search shortcut
This is what nautilus uses, and is more discoverable than the
somewhat easter-egg Alt-S, which is still supported.
2015-07-04 00:29:25 -04:00
Matthias Clasen
5bc88bdc67 file chooser: Make search shortcut toggle
This is more in line with having a toggle button for search,
and it matches what we do e.g. in nautilus.
2015-07-04 00:29:25 -04:00
Matthias Clasen
75411efa48 file chooser: Tweak bindings in save mode
In save modes, the entry is really more for entering a name than
entering a full location, so don't go there eagerly when '.', '/'
or '~' are pressed. Make Ctrl-L work better in this mode too.
2015-07-04 00:29:25 -04:00
Matthias Clasen
1c3ccb39c7 file chooser: Trigger location entry not just from file list
Use the same code that brings up the location entry on '/',
'~' or '.' also when the focus is not on the file list. This
prevents those key presses on the sidebar from ending up in
the search entry.
2015-07-04 00:29:25 -04:00
Matthias Clasen
5825965027 file chooser: Open location entry on '.'
Typing ./ is a fairly common practice to enter a location
relative to the cwd, so make this open the location entry.
2015-07-04 00:29:25 -04:00
Matthias Clasen
a3470521ae Revert "file chooser: Open location entry more easily"
This reverts commit e6c1cbc88e.
2015-07-04 00:29:24 -04:00
Matthias Clasen
c0afb891c8 Revert "file chooser: Don't start search too eagerly"
This reverts commit f126157bfa.
2015-07-04 00:29:24 -04:00
Matthias Clasen
1883c5fb28 file chooser: Improve keynav
Some internal containers were erroneously taking focus, interrupting
the flow of tab keynav, and using arrow keynav to go from the file
list to the sidebar did not work anymore, after the recent sidebar
rewrite.
2015-07-04 00:29:24 -04:00
Matthias Clasen
710d193f91 file chooser: Give the location column more space
Giving it 15 characters makes it at least fit "Documents" without
ellipsizing.
2015-07-04 00:29:24 -04:00
Matthias Clasen
356f507059 file chooser: Sort search results better
Set a default sort function that sorts results from the
current folder first.
2015-07-04 00:29:24 -04:00
Matthias Clasen
9b5e00b3c4 file chooser entry: Capture Escape and emit :hide-entry
Make the file chooser entry optionally capture Escape
and emit a signal. Make the file chooser widget hide the
entry on that signal and go back to the path bar.
This gives us a two-level undo:
location entry -> path bar -> dialog close.
When the location entry is permanently displayed in the
header for save mode, we still let the first Escape close
the dialog.
2015-07-04 00:29:24 -04:00
Matthias Clasen
e0b81faade file chooser: Make Escape work in search entry
Arrange things so that hitting Escape during a running
search stops the search, but leaves the search results
around, and hitting Escape again leaves the search mode.
2015-07-04 00:29:24 -04:00
Matthias Clasen
0f9b87cfeb file chooser: Make location column work better
The location column did not work for search results in recent://.
Fix that by looking at the target uri in this case. Show the location
column in recent mode. And make it more similar to nautilus by
showing the full path if it is not below $HOME.
2015-07-04 00:29:24 -04:00
Matthias Clasen
f968199b02 file chooser: Make search in recent work
All that was needed here was to set the query location.
2015-07-04 00:29:24 -04:00
Matthias Clasen
0b11d8c115 file chooser dialog: Put save entry into header
When we have a header bar, put a save entry there and
make the file chooser use it.
2015-07-04 00:29:24 -04:00
Matthias Clasen
4f3f61bf5f file chooser widget: Allow external save entry
Prepare the file chooser to use an external entry in
save mode, instead of the builtin one.
2015-07-04 00:29:24 -04:00
Matthias Clasen
140a157d47 file chooser: Update sidsebar when entry goes away 2015-07-04 00:29:24 -04:00
Matthias Clasen
6516437353 file chooser: Use icon for create folder button
This follows the latest mockups.
2015-07-04 00:29:24 -04:00
Matthias Clasen
e9e4ed5f7f file chooser dialog: Show a subtitle
Use the new "subtitle" property of the file chooser widget
to display a subtitle in the headerbar, if we have one.
2015-07-04 00:29:24 -04:00
Matthias Clasen
10f5076bb5 file chooser widget: Expose a "subtitle" property
Give the file chooser widget a "subtitle" property, which
contains a short string that explains the current mode.
2015-07-04 00:29:24 -04:00
Matthias Clasen
715aba650e places sidebar: Add private api to get title
The places sidebar already does all the work to determine the
right label to use for the current location of the filechooser.
We want to use the same label in the headerbar subtitle, so
add some private API to get it.
2015-07-04 00:29:24 -04:00
Matthias Clasen
7e45b09c8e file chooser: More search rework
Drop the radio buttons for current location vs everywhere, and
always search in the current location.
2015-07-04 00:29:23 -04:00
Georges Basile Stavracas Neto
1f96f351e0 entrycompletion: no need to return boolean
The boolean _gtk_entry_completion_resize_popup's return
value is not used anywhere, and only adds more complexity
for the method.

https://bugzilla.gnome.org/show_bug.cgi?id=751913
2015-07-03 15:51:06 -03:00
Olivier Fourdan
c806f9b709 ignore size inc when maximized/fullscreen
Under Wayland, fullscreen/maximized windows may not cover the entire
area when a size increment is specified.

Ignore size increments for fullscreen/maximized windows just like most
window managers do under X11 so that windows with size increments can
still be fullscreen or fully maximized under Wayland as well.

https://bugzilla.gnome.org/show_bug.cgi?id=751368
2015-07-03 16:21:13 +02:00
Víctor Manuel Jáquez Leal
b3166b745f drawingarea: checks parent's draw() before call it
commit 6786c9d7 introduced a bug when a drawing area is used for
rendering videos, since GtkWidgetClass doesn't set a draw()
method by itself.

https://bugzilla.gnome.org/show_bug.cgi?id=751877
2015-07-03 14:21:30 +01:00
Matthias Clasen
28e1ed4f2a Fix warnings in the font options code
This code gets called before a screen is set.
2015-07-01 23:36:29 -07:00
Matthias Clasen
a0e8d8db0b Improve the font options support
Instead of just overwriting the default options, merge the per-widget
font options with the defaults.

https://bugzilla.gnome.org/show_bug.cgi?id=751811
2015-07-01 19:15:56 -07:00
Matthias Clasen
1be338fd44 GtkSwitch: fix a reentry issue
The introduction of state broke some users which relied on
being able to set active in a notify::active handler.

https://bugzilla.gnome.org/show_bug.cgi?id=751754
2015-07-01 18:04:56 -07:00
Jasper St. Pierre
862e0dab03 gtkwindow: Reset maximize / fullscreen_initially on state changes
Since 740bcf5, we use these properties to properly compute shadow widths
for unmapped windows. If a client calls gtk_window_maximize and a window
manager unmaximizes a window, we should draw borders, so we need to
reset these when we get the property notification.
2015-07-01 17:50:23 -07:00
Cosimo Cecchi
e67b4874eb window: don't override background every style_updated()
This queues an unnecessary resize on the toplevel, and is not needed
anymore, now that GtkWidget does not call
gtk_style_context_set_background() on the window's GdkWindow anymore.
2015-07-01 16:09:23 -07:00
Cosimo Cecchi
a1e80d99d2 stylecontext: deprecate gtk_style_context_set_background()
Nothing in GTK calls it anymore.
2015-07-01 16:09:23 -07:00
Cosimo Cecchi
d6b8261622 widget: don't call gtk_style_context_set_background()
We don't need to do this here anymore, since widgets typically render
their backgrounds now.
2015-07-01 16:09:23 -07:00
Cosimo Cecchi
a9b45e7c3c layout: add a comment for gtk_style_context_set_background()
And wrap it with G_GNUC_IGNORE_DEPRECATIONS.
Unfortunately we can't stop rendering the background altogether here.
Also, refactor some common code in a single function.
2015-07-01 16:09:23 -07:00
Cosimo Cecchi
380ebbf76d fixed: add a comment for gtk_style_context_set_background()
And wrap it with G_GNUC_IGNORE_DEPRECATIONS.
Unfortunately we can't stop rendering the background altogether here.
Also, gtk_style_context_set_background() should really be called every
time the style is updated. Fix that.
2015-07-01 16:09:23 -07:00
Cosimo Cecchi
74f2d9448f window: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
Cosimo Cecchi
8832648846 socket: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
Cosimo Cecchi
06b943fec9 toolitemgroup: don't use gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
Cosimo Cecchi
e6f97f10dd textview: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
Cosimo Cecchi
f89c86df52 revealer: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
Cosimo Cecchi
6b0f202bf3 toolpalette: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
Cosimo Cecchi
d4ecdbd300 viewport: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
Cosimo Cecchi
15908cfdf9 treeview: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
Cosimo Cecchi
18be2d697c plug: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
Cosimo Cecchi
b4ee73a291 paned: don't call gtk_style_context_set_background() 2015-07-01 16:09:23 -07:00
Cosimo Cecchi
9230143bbf overlay: don't call gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
Cosimo Cecchi
aab3d4679f offscreenwindow: don't call gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
Cosimo Cecchi
b7be29390f menushell: don't call gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
Cosimo Cecchi
828db3eca9 menu: don't call gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
Cosimo Cecchi
db76eae41a listbox: don't call gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
Cosimo Cecchi
ba2f479aa0 iconview: don't call gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
Cosimo Cecchi
9696d1b4bb flowbox: don't set gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
Cosimo Cecchi
1c9468c81b eventbox: don't call gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
Cosimo Cecchi
6786c9d724 drawingarea: don't call gtk_style_context_set_background() 2015-07-01 16:09:22 -07:00
Carlos Garnacho
8c9e426dc5 placessidebar: Do not set as a "track motion" DnD site
It has the unintended effect of picking the suggested action from the
context, which conflicts with the (possibly 0) status we set on our
::drag-motion handler.

Given this widget is not interested in listening to DnD from every
possible target, it is safe to just disable it.
2015-07-01 19:37:42 +02:00
Christoph Reiter
5d17b0af54 GtkWindow: don't increase the preferred size for empty windows if there is a size request set.
This fixes a reftest broken by commit 84e99b20ac

https://bugzilla.gnome.org/show_bug.cgi?id=751341
2015-07-01 09:32:19 -07:00
Arc Riley
15c73a2b1a Add gtk_widget_set_font_options and gtk_widget_get_font_options
This allows a widget to override global font_options, such as hinting and
subpixel order. The widget's PangoContext is updated when this is set.

Some update code from gtk_widget_update_pango_context was moved to
update_pango_context so that gtk_widget_update_pango_context runs it.

http://bugzilla.gnome.org/show_bug.cgi?id=751677
2015-07-01 07:34:32 -07:00
Cosimo Cecchi
9913b02e3b switch: add a style property for the switch height
Instead of hardcoding an aspect ratio.
This will be replaced by min-height/max-height when we have them.

https://bugzilla.gnome.org/show_bug.cgi?id=751689
2015-06-30 13:28:26 -07:00
Jasper St. Pierre
04e727709d window: Don't send startup notifications for offscreen / popup windows
The WM isn't aware of O-R (popup) or offscreen windows. If somebody
maps an offscreen or a popup GTK+ window before the main window, we'll
complete the sequence before a "real" window is mapped. Make sure to
ignore these for startup notifies.
2015-06-29 14:26:45 -07:00
nick
802b006b37 settings: Include pangofc-fontmap.h header on Wayland
In case the X11 backend is not enabled, we still need to include the
pangofc-fontmap.h header file, as we use the Pango/FontConfig API in
both the X11 and Wayland case.

https://bugzilla.gnome.org/show_bug.cgi?id=751625
2015-06-29 20:41:04 +01:00
Benjamin Otte
cd3f24d579 cssvalue: Change color transitions to run premultiplied
Previously, the unpremultiplied values from the GdkRGBA were taken. Now
we premultiply the color values as specified by the CSS specs.
This is only relevant when transitioning with translucent colors.

An example is the halfway transition between transparent (0, 0, 0, 0)
and white (1, 1, 1, 1). Previously, all 4 values where transitioned
separately and the result was semi-transparent gray (0.5, 0.5, 0.5,
0.5).
By depending on the alpha value, the result is now semi-transparent
white (1, 1, 1, 0.5) which is what one would naively expect.

New reftest: color-transition
2015-06-26 21:12:50 +02:00
Benjamin Otte
142abce46a cssvalue: Special case resulting color for transparency
Again, preparation for using premultiplied color transitions.
2015-06-26 20:54:57 +02:00
Benjamin Otte
e3d8f03b3a cssvalue: Restructure RGBA transitions
Split out a function to make the code clearer for the changes ahead.
2015-06-26 19:06:02 +02:00
Lapo Calamandrei
029800c426 Adwaita: entry linking fixes
Set the right border color on the linked entry after the focused
one.
2015-06-25 20:04:32 +02:00
Lapo Calamandrei
56a3fd888a Adwaita: rubberbands!
Darken the rubberband a bit to make it visible on the selected
color background, fix treeview rubberband border issue.
2015-06-25 19:57:07 +02:00
Carlos Garnacho
0606b525b4 gtkdnd: Plug a leak
We create a cairo_t in order to find out the surface extents, but it
was being leaked, dragging the whole drag surface with it through
extra refs.
2015-06-25 15:09:56 +02:00
Carlos Garnacho
33f9cbafcd gtkmodelbutton: Plug a leak
The private struct had some data that needed freeing, but this widget
didn't have any destroy/dispose/finalize handlers.
2015-06-25 15:09:56 +02:00
Carlos Garnacho
6de82c9be3 gtkmenusectionbox: plug a leak
The list returned by gtk_container_get_children() wasn't being freed.
2015-06-25 15:09:56 +02:00
Matthias Clasen
f8b7623b3c builder-tool: Don't strip h/vexpand
Setting these properties has the side-effect of setting the
corresponding -set properties, which makes GTK+ behave subtly
different. So don't mess with these.
2015-06-25 07:01:26 -04:00
Matthias Clasen
e9e9dfade6 GtkSearchBar: Don't vexpand
It turns out that setting vexpand to its default value has
side-effects that we need.

https://bugzilla.gnome.org/show_bug.cgi?id=751447
2015-06-25 07:00:13 -04:00
cedlemo
d31e1fbef0 GtkImage: Make resource property work properly
gtk_image_set_from_resource was setting the resource_path,
only to have it overwritten again before returning. That
is not as it should be, so change things to set the resource
path late.

https://bugzilla.gnome.org/show_bug.cgi?id=751443
2015-06-25 06:50:44 -04:00
Christoph Reiter
48ea0cbe4b GtkWindow: some min/nat size corrections.
Don't add the container border to the title request size; it
is only used for the child widget.

Don't call gtk_widget_get_preferred_width_for_height() for
the title bar with an unrelated height and subtract the title
bar height before querying the child widget width.

Guard against negative size requests after substracting the
borders/shadows and the title bar.

https://bugzilla.gnome.org/show_bug.cgi?id=751341
2015-06-24 10:58:30 +02:00
Matthias Clasen
3b97a0b940 Fix an oversight 2015-06-23 16:46:26 -04:00
Matthias Clasen
7f0606509d GtkPlacesSidebar: Simplify sidebar code
Make this code follow GTK+ styles and conventions better.
2015-06-23 16:35:17 -04:00
Matthias Clasen
ae8c07c67c GktPlacesSidebar: Plug a ton of leaks
If you don't keep in mind that g_object_get() returns references to
objects and copies fo strings, things leak all over the place.
2015-06-23 16:35:17 -04:00
Matthias Clasen
f2a8ddfecf sidebarrow: Avoid object-valued properties
They tend to leak...as these do.
2015-06-23 16:35:17 -04:00
Benjamin Otte
9f27ee7f5a render: Fix ridge/groove border rendering
The typo strikes again!
2015-06-23 22:33:40 +02:00
Christoph Reiter
335c070f9b GtkHeaderBar: reduce minimum title width
The minimum title width affects the minimum window width
for CSD windows. To allow smaller windows like without
CSD reduce it a bit (276px vs 156px min width)

https://bugzilla.gnome.org/show_bug.cgi?id=751341
2015-06-23 21:16:37 +02:00
Christoph Reiter
84e99b20ac GtkWindow: fix default empty window size with CSD
In the non-CSD case we checked for 0x0 window size requisition
and replaced it with 200x200 so the window was still visible.
This no longer works in case of CSD as the shadow and title bar
are always added to the requisition resulting in a titlebar/shadow
only window in case there is no child widget (this is currently
visible under wayland or when setting GTK_CSD=1).

Instead of special casing the final window size, special case
the child requisition paths instead. This gives us the same
requisition in both, CSD and non-CSD cases (the header bar
has a too large minimum width atm so the resulting window is
still not the same)

https://bugzilla.gnome.org/show_bug.cgi?id=751341
2015-06-23 21:16:14 +02:00
Lapo Calamandrei
ec9a39977a Adwaita: scale marks visible on the dark variant 2015-06-23 19:11:15 +02:00
Matthias Clasen
1ed21ad3d4 GtkScale: More work on mark spacing
Try harder not to push the scale out of balance by marks. With
this change, the remaining difference in the drawing is down
to asymmetric assets and margins coming out of the theme.
To fully support such asymmetric rendering, we need implement
baseline alignment for scales.

https://bugzilla.gnome.org/show_bug.cgi?id=749650
2015-06-23 09:36:14 -04:00
Matthias Clasen
7ce96cb6ac GtkStack: Avoid some unnecessary complication
We already have an in-destruction flag, so use it.
2015-06-23 06:45:07 -04:00
Christoph Reiter
3c9cca596f Fix calculation of edge input window size in case the real window is too small.
This error resulted in warnings like
"pixman_region32_init_rect: Invalid rectangle passed"

In case the window is smaller than handle_size * 2 the resulting
edge window got a negative size. Prevent that by limiting the
handle size to half the respective edge length. This also
prevents the corner windows from overlapping in case the window
is too small.
2015-06-22 14:22:50 +01:00
Emmanuele Bassi
97e728580c Revert "window: Check if we can use CSD before enabling them"
This reverts commit c5e5ee6749.

It turns out that this commit breaks the default sizing of GtkWindow,
which in turn causes the window to be smaller than the handle size,
which ends up sending invalid rectangles to Cairo.

We'll have to find another way to fix the CSD issue.

See also: https://bugzilla.gnome.org/show_bug.cgi?id=751140

https://bugzilla.gnome.org/show_bug.cgi?id=750343
2015-06-22 14:21:47 +01:00
Paolo Borelli
4e155d784d Avoid spurious operations on destroy
When the stack is destroyed we do not want to waste time running
animations and notifying listeners about which is our current
visible child.

This is not only an optimization, but it is important for the stack
switcher widgets: since they are in another branch of the hieratchy
we do not want to get notifications while the stack is being destroyed.

Based on a patch by Paolo Borelli
https://bugzilla.gnome.org/show_bug.cgi?id=724506
2015-06-21 11:32:31 -04:00
Matthias Clasen
3b43951ba4 Pacify gobject-introspection
gobject-introspection complains about the parameter names of
vfuncs. Why, you ask ? No idea.
2015-06-20 20:29:18 -04:00
Matthias Clasen
93f9a81ac5 GtkRange: Improve zoom handling a bit
The calculation to update the initial slider position on zoom
changes was not working correctly when using keys to toggle
zoom on and off for scales. Avoid it by updating the position
beforehand.
2015-06-20 20:26:42 -04:00
Matthias Clasen
27dabaefa6 GtkRange: Make drag gesture less agressive
Moving the mouse while pressing one of the steppers was making
the slider jump to the end, unexpectedly. This was caused by the
drag gesture kicking in when it shouldn't. Fix this by making
all drag gesture signal handlers only do something if we are in
a drag thats started on the slider.

https://bugzilla.gnome.org/show_bug.cgi?id=751050
2015-06-20 18:37:15 -04:00
Caolán McNamara
b4a88c7287 file chooser: Avoid tall combos
The filter combo box in the file chooser was stretching to match
the height of the extra widgets next to it. Since, stretched combo
boxes are not a pretty sight, make it stick to the top instead.

Patch by Caolán McNamara,

https://bugzilla.gnome.org/show_bug.cgi?id=751227
2015-06-20 10:55:02 -04:00
Matthias Clasen
b684e70dd5 GtkOverlay: Sync up parameter names
gtk-doc gets confused if the parameter names between header,
source and doc comment don't match up.
2015-06-20 10:52:44 -04:00
Matthias Clasen
3c711cc98a Fix a typo
gtk-doc complained about a multi-line Since: tag, but the
real culprit was a typo in the Deprecated: tag.
2015-06-20 10:52:01 -04:00
Matthias Clasen
d642ae78fc GtkWindow: Small documentation addition 2015-06-20 10:36:09 -04:00
Matthias Clasen
5981e15115 GtkTextView: Small documentation addition 2015-06-20 10:33:56 -04:00
Matthias Clasen
2caa1deb5b Fix up index for some 3.14 symbols
Marking these as "Since: 3.14.1" may be more accurate, but
it causes gtk-doc to not put these symbols in any versioned
index at all (it generates an unused index for 3.14.1). So,
lets lie a little, and say these symbols were added in 3.14.
2015-06-20 10:28:03 -04:00
Matthias Clasen
2f8e4f2685 GtkAssistant: Fix criticals on dispose
After the recent change thta introduced boxes between the pages
and the notebook, we were no longer careful enough when disposing
the assistant. Fix that up.
2015-06-19 21:56:29 -04:00
Matthias Clasen
a4dcc6bc52 file chooser: Small cleanup
Ask the search model if it is empty, instead of maintaining this
information manually in the file chooser widget.
2015-06-19 01:04:42 -04:00
Matthias Clasen
66b5d2e523 GtkSearchEngineTracker: Fix SPARQL syntax
The function is called tracker:uri-is-descendant, not
tracker-uri-is-descendant.
2015-06-19 01:04:18 -04:00
Matthias Clasen
489b48d0b5 Forgotten file 2015-06-19 01:03:28 -04:00
Matthias Clasen
9426fb08ce GtkSearchEngineSimple: Avoid a private struct
We can just make this type final, and avoid the private struct.
2015-06-19 00:48:29 -04:00
Matthias Clasen
ca31662630 GtkSearchEngineTracker: Avoid a private struct
We can just make this type final, and avoid the private struct.
2015-06-19 00:41:10 -04:00
Matthias Clasen
d9a22e7e30 Avoid an unnecessary check
We create the indexed_locations array unconditionally.
2015-06-19 00:34:28 -04:00
Matthias Clasen
ed50772b41 GtkSearchEngine: Avoid a crash
Add a destroy notify for the data of the callback, so we don't
end up leaving a dangling pointer behind for a short while if
the native engine is finalized before the simple one. This
was showing up as crash when typing and backspacing in the
search entry of the file chooser.
2015-06-19 00:32:49 -04:00
Matthias Clasen
d12c7186b6 GtkSearchEngine: Avoid crawling indexed locations
Implement the IsIndexed callback for tracker. This requires
reading settings of the tracker file miner. We are careful
to avoid a hard dependency on the tracker schemas.
2015-06-19 00:12:46 -04:00
Matthias Clasen
c7d86ef4e4 GtkSearchEngine: Avoid crawling indexed locations
Add a framework to the simple engine that allows to skip
locations which are indexed by the native engine.
2015-06-19 00:11:01 -04:00
Matthias Clasen
33e2d12e90 GtkSearchEngine: Initialize recursive flag
Otherwise all our searches become non-recursive, which was not
the intention.
2015-06-19 00:06:51 -04:00
Matthias Clasen
a3a58fa7d9 GtkSearchEngine: Add recursive flag
Add a flag for recursive search, and implement non-recursive
search in both the tracker and simple search engines.

This is not currently used in the file chooser.
2015-06-18 22:59:44 -04:00
Matthias Clasen
15a41e0bf5 Remove an unused field 2015-06-18 22:40:49 -04:00
Matthias Clasen
d260d2c466 GtkSearchEngine: Remove unused code
Nothing ever uses or emits the hits-subtracted signal.
Nautilus dropped it a few years ago. Time to follow suit.
2015-06-18 17:08:09 -04:00
Matthias Clasen
1d63335c8e Use infos from search engine instead of getting them again
When the search engine provides hits with GFileInfo, use that
to add the hits to the model directly, without going through
another round of async get_info calls.

To do this, we add a batched variant of the
_gtk_file_system_model_update_file call that takes lists of
GFiles and GFileInfos. Again, we can avoid repeated resorting
that happens when the files are updated individually.
2015-06-18 15:20:06 -04:00