Commit Graph

22800 Commits

Author SHA1 Message Date
Matthias Clasen
01d76b7701 Print dialog: Fix printer icons in HighContrast
We need to make the cell renderer follow the state,
for recoloring to work.
2015-03-08 22:05:37 -04:00
Matthias Clasen
59d12be94f HighContrast: Some formatting fixes 2015-03-08 21:32:38 -04:00
Matthias Clasen
9b18deee1f Add a missing word in the docs 2015-03-08 18:16:11 -04:00
Emmanuele Bassi
6950116678 docs: Reword the deprecation notice for gtk_widget_override_*
They are a bit terse, and they should point to the preferred way of
overriding the theme, i.e. using a GtkStyleProvider for your
application, and custom style classes.
2015-03-08 14:39:18 +00:00
Emmanuele Bassi
247e62390b docs: Clarify replacement for gtk_style_context_get_background_color()
It seems odd that a getter function for the style context state is
replaced by a rendering call, but it makes sense in context.
2015-03-08 14:29:04 +00:00
Matthias Clasen
6b23c44056 GtkFileFilter: Set name from builder id
Suggested in https://bugzilla.gnome.org/show_bug.cgi?id=577862
as a way to make file filters constructed with GtkBuilder more
useful.
2015-03-08 09:12:21 -04:00
Matthias Clasen
1f3328c096 Avoid calling g_object_ref on NULL
gtk_widget_set_visual() allows NULL for the visual, so be
careful ot to ref it unconditionally.
2015-03-07 17:48:11 -05:00
Matthias Clasen
6e7ad732fc scrolled window: Fix size requisition with overlay scrolling
When the scrollbars are overlayed, the size requisition of the
scrolled window should not depend on whether the scrollbars are
visible or not. This was not quite the case, because we forgot
one case where scrollbar size was still added to the requisition.
2015-03-07 14:18:13 -05:00
Matthias Clasen
7fbbf850c3 Improve some GtkStock deprecation notes
Point at edit-delete and edit-paste as available icons.
2015-03-05 16:07:30 -05:00
Carlos Garnacho
40c8d8bcf4 window: Add comment documenting the target widget checks during window drag
Was suggested during review of
https://bugzilla.gnome.org/show_bug.cgi?id=745562#c2
2015-03-05 11:52:24 +01:00
Matthias Clasen
6ac3ec0b53 HighContrast: Make sure selections are visible in infobars
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=745622
2015-03-04 21:56:02 -05:00
Matthias Clasen
2b7eaaf86e Adwaita: Make sure selections are visible in infobars
Pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=745622
2015-03-04 21:55:11 -05:00
Carlos Garnacho
08494f86a0 widget: Improve hack to ignore drags from widgets using motion events
Postpone until the last moment whether the target widget still
potentially uses updates from this sequence, or window dragging
actually applies because all gestures on the target went to denied
state.

This fixes window dragging on empty space in a headerbar that is
contained in a paned (as in e.g. gedit).

https://bugzilla.gnome.org/show_bug.cgi?id=745562
2015-03-04 21:20:29 -05:00
Matthias Clasen
768e6a4579 Ensure print-related types are registered
These types are not covered by g_test_register_all_types,
and having the types registered when a print dialog is used
helps in cases where GTK+ is dlopened.

https://bugzilla.gnome.org/show_bug.cgi?id=745065
2015-03-04 20:37:01 -05:00
Georges Basile Stavracas Neto
ce9a5a3fec places sidebar: compare bookmarks by index
GtkPlacesSidebar applies a sorting function on
the tree model that does not consider the case
of bookmarks, which are sorted by their indexes.

By adding the bookmarks corner case and comparing
then by their indexes, GtkPlacesSidebar can sort
the bookmarks properly in the order they're saved.

https://bugzilla.gnome.org/show_bug.cgi?id=744589
2015-03-04 17:20:40 -03:00
Matthias Clasen
71bd1c7e2c file chooser: Really stop typeahead search popups
GtkTreeView is a bad widget and constantly resets the search-column
behind our back. We need to re-unset it every time a model is set :-(
2015-03-03 18:03:26 -05:00
Carlos Garnacho
5751d4f66e filechooser: Only do search_start_query() while we are in search mode
This signal can be emitted by GtkSearchEntry after search has been
cancelled, and other operation mode is set. It doesn't make sense to
populate the search model in that state anymore, so just avoid doing it.

https://bugzilla.gnome.org/show_bug.cgi?id=745479
2015-03-03 17:57:08 +01:00
Carlos Garnacho
b2f3b67494 searchenginetracker: Keep a reference on the search engine while querying
The object might be destroyed when mid operation, causing crashes as the
query callback still expects the object pointer to be valid. Also, remove
the gdk_threads_enter/leave pairs, the callback will be executed on the
caller (UI) thread, so this is not necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=745479
2015-03-03 17:57:08 +01:00
Carlos Garnacho
a994f4edfb filechooser: Disconnect signal handlers from search engine before destroying
The search engine might stay alive longer due to extra temporary refs, so
the signal handlers should be removed for the filechooser to ignore these
properly.

https://bugzilla.gnome.org/show_bug.cgi?id=745479
2015-03-03 17:57:08 +01:00
Stefan Sauer
bb78a39103 tooltip: remove unused variable and related g_object_set
We never use the value of has_tooltip. This is a left-over from the refactoring
of gtk_tooltip_run_requery().
2015-03-03 09:59:53 +01:00
Chun-wei Fan
e31a936e3e gtkswitch.c: Fix Build on C89 Compilers
This file now uses round(), which was not available until C99, so include
fallback-c89.c instead of math.h, which includes math.h and does a fallback
implementation of round().
2015-03-03 12:14:24 +08:00
Matthias Clasen
3569d373a2 Fix 7c4bf742e8
The objects-finalize test constructs gestures with NULL as
a widget. The recent addition of weak references was not
ready for that.
2015-03-02 20:18:15 -05:00
Matthias Clasen
209c5c37f3 file chooser: Avoid animated scrolling for editing
Avoid scrolling animation when scrolling to where we want
to insert the new folder, since adding the entry doesn't
do the right thing if the treeview is still scrolling.

An alternative would be to wait for the animated scrolling
to reach its target before starting the editing, but this
is easier.

https://bugzilla.gnome.org/show_bug.cgi?id=729366
2015-03-02 16:25:30 -05:00
Matthias Clasen
18de5e6547 file chooser: Avoid triggering assertions
cairo surfaces are boxed types, so don't try to set them
with g_value_set_object().
2015-03-02 16:25:30 -05:00
Matthias Clasen
d2fe45ab57 file chooser: Avoid warnings from the location column
Avoid criticals that would come out of this code if file is / or NULL.
2015-03-02 16:25:30 -05:00
Carlos Garnacho
3ccfcf5b9f scrolledwindow: Cancel kinetic/overshoot animation on captured scroll events
This ensures the animation is cancelled if the child widget happens to
GDK_EVENT_STOP scroll events.

https://bugzilla.gnome.org/show_bug.cgi?id=745315
2015-03-02 17:42:04 +01:00
Carlos Garnacho
1feaa6f301 scrolledwindow: Add motion mask to the widget window
This is not specified specifically by the attached controllers, so let
the scrolledwindow set the mask, as motion events with no buttons pressed
are interesting to it.

https://bugzilla.gnome.org/show_bug.cgi?id=745344
2015-03-02 15:49:40 +01:00
Carlos Garnacho
d070e4c742 gtkwindow: Do not show subsurface windows for hidden popover widgets
This is really just necessary when we have a visible widget, otherwise
the window would temporarily linger with odd size and surface.

https://bugzilla.gnome.org/show_bug.cgi?id=743427
2015-03-02 12:11:59 +01:00
Carlos Garnacho
13e22e2030 gtkwindow: Move window dragging to a standalone drag gesture
The gesture is hooked to the capture phase, so it works for buttons in
header bars and whatnot. In order to be friendly to the widget it is
capturing events from, an ugly hack is in place to avoid capturing
events when the target widget has a gesture that would consume motion
events.
2015-03-02 12:03:39 +01:00
Carlos Garnacho
0796d7b6ff gtkmenubutton: Popup menu/popover on GtkButton:clicked
This happens on button release, which is more convenient if the gesture
can be consumed by something else (eg. window dragging), and already behaves
correctly wrt cancelled gestures, broken grabs, etc.

This also allows us to unify pointer and keyboard behavior, popping up the
menu widget in a single place.
2015-03-02 12:01:07 +01:00
Carlos Garnacho
2e52e9964b gesture: On cancel, remove touchpoint before checking the recognized state
Otherwise the touch being removed doesn't account in recognition.
2015-03-02 12:01:07 +01:00
Carlos Garnacho
a4e0de1839 button: Ensure the button is "left" when a gesture is cancelled
This prevents from stale widget states if the gesture happens to be
cancelled mid-press.
2015-03-02 12:01:07 +01:00
Debarshi Ray
0910eaf6fe eventcontroller: Chain up on constructed
https://bugzilla.gnome.org/show_bug.cgi?id=745225
2015-03-02 11:53:56 +01:00
Debarshi Ray
7c4bf742e8 eventcontroller, widget: Don't crash if destroyed before the other
There are two scenarios. A widget sub-class owns a GtkEventController
and passes itself to it, or a controller owned by something else is
passed a widget.

In the second case, if the widget is destroyed before the controller,
we will have a crash when destructing the controller because we will
be accessing invalid memory. Adding a weak reference on the widget
addresses that problem.

This leads to a crash in the first case. When the widget is getting
destroyed, it will drop the reference to its own controller. The
controller will skip touching the widget because the weak reference
would have turned it to NULL. However, when the widget sub-class chains
up to GtkWidget it will try to free all the controllers in its list.
Unfortunately, all these controllers have already been destroyed. So
we need to guard against this too.

https://bugzilla.gnome.org/show_bug.cgi?id=745225
2015-03-02 11:53:52 +01:00
Murray Cumming
66d25c4a06 gtk_label_set_yalign(): Fix xalign/yalign typo in parameter name. 2015-03-02 10:58:53 +01:00
Murray Cumming
bc77408e3c gtk_misc_set_alignment(): Improve the deprecation documenation.
To link to GtkWidget.halign/valign and to mention
GtkLabel.xalign/yalign.
2015-03-02 09:46:49 +01:00
Carlos Garnacho
fc838cefbf searchenginetracker: Unify fts/non-fts query
This makes sure we use location_uri for both types of query, and the fts
query has been made more similar to the one used by nautilus.
2015-02-28 21:19:47 -05:00
Matthias Clasen
d87041bfe3 tracker: Turn on fts
We want to match what nautilus does, and the non-fts query
ignores the location, which yields somewhat broken UI in
the file chooser.
2015-02-28 16:44:21 -05:00
Matthias Clasen
8a0d02c548 Formatting fixes 2015-02-28 16:44:21 -05:00
Matthias Clasen
f126157bfa file chooser: Don't start search too eagerly
We were trying to start search when the user types anything,
but this is annoying more often than helpful, and interferes
with the location entry. So, stick with explicitly enabled
search (via the search button or Alt-S) for now.
2015-02-28 16:44:21 -05:00
Peter Bloomfield
5611cf2096 Do not return NULL AtkStateSet
https://bugzilla.gnome.org/show_bug.cgi?id=741511
2015-02-28 13:52:22 -05:00
Rafal Luzynski
3ce3593ebf GtkListBoxRow: add g_return_if_fail to grab_focus, don't crash
Although gtk_list_box_row_grab_focus() is not a public function
it can be easily called by gtk_widget_grab_focus() with a row argument
which has been removed from the list box and has box == NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=744879
2015-02-27 06:31:06 -05:00
Matthias Clasen
f96f69996a file chooser dialog: Prevent uneven button heights
The height of the text buttons depends on the font height,
whereas the search button has a fixed-size icon in it...
Prevent unevent heights by putting them all in a size group.

https://bugzilla.gnome.org/show_bug.cgi?id=745263
2015-02-26 21:17:06 -05:00
Matthias Clasen
6855e1eec3 app chooser dialog: Prevent uneven button heights
The height of the text buttons depends on the font height,
whereas the search button has a fixed-size icon in it...
Prevent unevent heights by putting them all in a size group.
2015-02-26 21:16:58 -05:00
Matthias Clasen
b08015371b Stop using extract-headers
Since 0.18.3, xgettext can extract strings from ui files.
2015-02-26 16:54:16 -05:00
Benjamin Otte
0ab48fcc42 css: Fix _gtk_bitmask_subtract()
We were doing the wrong thing *and* writing uninitialized memory while
doing so. BAD.

Also added tests exposing these.

https://bugzilla.redhat.com/show_bug.cgi?id=1185585
2015-02-25 01:55:28 +01:00
Carlos Garnacho
0c903156ef scrolledwindow: Only start fade animation on "visible" scrollbars
If a scrollbar is not shown (because of policies, or because it isn't
necessary), it doesn't make sense to start fade animations on its window
on captured motion events.
2015-02-24 14:55:23 +01:00
Matthias Clasen
913e10fe3b Fix the previous commit
The C_() macro only takes string literals.
Use g_dpgettext2() instead
2015-02-23 22:25:11 -05:00
Matthias Clasen
b0b38c106d Make gtk-im-context-none work
This was added a few years ago, as a way to have _no_ im context
at all. But it didn't actually work. Make it work, and streamline
the handling of none by moving it all to gtkimmodule.c.

As part of this, add context to the translated names of all
im modules we ship.
2015-02-23 22:06:02 -05:00
Daniel Drake
aba2de3443 icontheme: allow directories with mtime 0
In order to provide a constant mtime between OS build and deploy time,
while also maintaining a hardlink content-addressed model independent of
timestamps, ostree sets all mtimes to 0.

The icon cache code currently ignores directories with mtime 0, assuming
they don't exist.

Track directory existence in a more precise way.

https://bugzilla.gnome.org/show_bug.cgi?id=745052
2015-02-23 15:09:15 -06:00