Commit Graph

23683 Commits

Author SHA1 Message Date
Stefan Sauer
0076b943ad toolbutton: linkify properties 2015-07-22 21:48:06 +02:00
Stefan Sauer
71b278fb4d toolbutton: fix misleading docs
First only label-widget clashes with icon-name and not the label property. In
addtion fix the propertyname to use '-' instead of '_'.
2015-07-22 19:13:07 +02:00
Benjamin Otte
31191d5566 fontchooserwidget: Refactor code so we actually optimize
Previously, we would pango_font_describe() every time the code ran and
we wouldn't ever hit the optimized quick exit.

The code now is a lot more complex because the
compute-actual-value-when-required-the-first-time approach is not
supported out of the box in GtkTreeModel (or GValue).
2015-07-22 16:01:21 +02:00
Matthias Clasen
a56bd1c490 GtkImage: Plug a memory leak 2015-07-21 23:04:30 -04:00
Matthias Clasen
3243ae6e08 places sidebar: Don't leak shortcuts
Poined out by valgrind.
2015-07-21 21:00:12 -04:00
Matthias Clasen
fbee8c5ba3 GtkSearchEngine: Be more robust in cancellation cases
When the search is cancelled, we may end up with a tracker
dbus reply coming in after the GtkSearchEngine object is
already gone, and bad things happen. Prevent this by
using g_signal_connect_object instead of g_signal_connect.
2015-07-21 20:40:46 -04:00
Matthias Clasen
38a5db8f83 GtkQuery: Make API follow GTK+ conversions
We generally have const getters for strings, and the two users
of this API were promptly leaking the (unexpected) copy they
got from gtk_query_get_location and gtk_query_get_text.
2015-07-21 20:39:29 -04:00
Matthias Clasen
9418712782 places sidebar: Always chain up in finalize
The GtkSidebarRow class was forgetting to do this. The visible
symptom of this in valgrind is that you notice GObject data
being leaked.
2015-07-21 19:52:54 -04:00
Matthias Clasen
3e6177d2dd places sidebar: Plug a memory leak 2015-07-21 19:52:54 -04:00
Matthias Clasen
1e981790de places sidebar: Improve docs
Clarify the deprecation note for ::show-connect-to-server.
https://bugzilla.gnome.org/show_bug.cgi?id=752633
2015-07-21 15:07:37 -04:00
Matthias Clasen
7a84c26d0b places sidebar: Improve the docs
Reword the docs of gtk_places_sidebar_set_drop_targets_visible().
2015-07-21 15:07:37 -04:00
Matthias Clasen
b4b46b74e5 places sidebar: Fix a copy-paste leftover
The ::populate-all nick and blurb where not referrering to this
property at all.
https://bugzilla.gnome.org/show_bug.cgi?id=752633
2015-07-21 15:07:37 -04:00
Stefan Sauer
658a1ef069 toolbutton: improve docs wrt stock deprecation
Docuemnt where to get the images from.
2015-07-21 20:17:16 +02:00
Matthias Clasen
8102425f03 places view: Disconnect from volume monitor
Just unreffing the volume monitor object won't stop it from emitting
signals that we are connected to. Disconnect from the signals in
finalize.
2015-07-20 21:23:06 -04:00
Benjamin Otte
ceab99ff2f treeview: Don't underallocate editing widgets that are too big 2015-07-21 02:28:53 +02:00
Benjamin Otte
3402363684 combobox: Unconditionally draw background and border 2015-07-21 02:28:53 +02:00
Benjamin Otte
5f6db9a182 combobox: Remove autoscroll timer on popdown 2015-07-21 02:28:53 +02:00
Benjamin Otte
19726a5a0e combobox: Remove cell_view_frame
Cell views can draw their own frames now.
2015-07-21 02:28:53 +02:00
Benjamin Otte
7b57221522 cellview: Implement border and background drawing 2015-07-21 02:28:52 +02:00
Stefan Sauer
6f4518ab4b gtkimagemenuitem: improve the replacement docs even more
Since the stock strings usually have menmosics suggest
gtk_menu_item_new_with_mnemonic().
2015-07-20 21:04:28 +02:00
Stefan Sauer
8a6bad7faf gtkimagemenuitem: fix suggestion for replacement
gtk_menu_item_new(9 would create an empty menu item. While the stock deprecation
aims to unclutter the menus, I feel this goes too far.
2015-07-20 20:54:52 +02:00
Cosimo Cecchi
62af1cbb1d drawingarea: use same background approach as GtkLayout
Call gtk_style_context_set_background() every time the style is updated
and add a comment as to why we still need to do it here.

https://bugzilla.gnome.org/show_bug.cgi?id=752599
2015-07-20 08:43:08 -07:00
Cosimo Cecchi
90d237ced4 Revert "drawingarea: don't call gtk_style_context_set_background()"
This reverts commit 6786c9d724.

https://bugzilla.gnome.org/show_bug.cgi?id=752599
2015-07-20 08:43:08 -07:00
Cosimo Cecchi
11ce41d9c4 Revert "drawingarea: checks parent's draw() before call it"
This reverts commit b3166b745f.

https://bugzilla.gnome.org/show_bug.cgi?id=752599
2015-07-20 08:43:08 -07:00
Matthias Clasen
2dfad2b0d1 file chooser: Memory handling fixes
I forgot to clean up the long press gesture, and in additon, creating
the rename popover from the ui template was causing the tree view
to not be disposed when the file chooser goes away. Work around this
by manually unsetting the relative-to widget of the popover in dispose.
2015-07-20 11:12:49 -04:00
Ting-Wei Lan
50a2428739 Fix return value error in gtk_stack_get_interpolate_size 2015-07-20 21:55:40 +08:00
Timm Bäder
ddcb309b5b GtkPopover: Set interpolate-size on the stack...
... in gtk_popover_bind_model
and gtk_popover_menu_init
2015-07-20 10:26:06 +02:00
Timm Bäder
469db13b81 GtkStack: Add interpolate-size property
And use it to determine whether we should actually interpolate between
stack sizes or not.
2015-07-20 10:26:06 +02:00
Matthias Clasen
1da92c2800 GtkListBox: Improve focus scrolling
We are trying to scroll the header in view together with the
focus row. The way this is implemented works fine when scrolling
up, but falls short when scrolling down. Fix this by making sure
that both the row and the header bar visible.
2015-07-19 22:18:58 -04:00
Matthias Clasen
52c4955d21 GtkListBox: Listen for adjustment changes
We automatically pick up an adjustment from our parent
scrollable, but we failed to update it when it changes.
This is happening in the places sidebar, and it was causing
the focus-tracking to fail there, letting the focus move
out of view. With this change, the focus remains visible.
2015-07-19 22:08:36 -04:00
Matthias Clasen
55652b6b09 places sidebar: Improve keynav
Remove the code in the sidebar keypress handler that imperfectly
reproduces what GtkListBox already does: moving selection and
focus in response to arrow keys.
2015-07-19 22:07:21 -04:00
Matthias Clasen
bd41c92b28 trivial: Some reformatting 2015-07-19 17:39:23 -04:00
Matthias Clasen
5b5b4de495 places sidebar: Remove pointless code
No need to set or unset adjustments explicitly.
2015-07-19 17:37:39 -04:00
Matthias Clasen
f263c11ce8 spin button: Add Home and End as key bindings
Make these go to the lower/upper boundary of the adjustment, like
Ctrl-PageUp/PageDown already do.
https://bugzilla.gnome.org/show_bug.cgi?id=309300
2015-07-19 17:17:53 -04:00
Matthias Clasen
e7fe194b2d GtkWidget: Add custom font map support
This allows to use a custom font map for parts of the widget
hierarchy - this can be used for application-specific fonts.

https://bugzilla.gnome.org/show_bug.cgi?id=751812
2015-07-19 16:58:43 -04:00
Matthias Clasen
c9a2e4c0a3 font chooser: Add placeholder text to preview entry
This will make things more understandable if an application
sets an empty preview text.
https://bugzilla.gnome.org/show_bug.cgi?id=725551
2015-07-19 16:52:03 -04:00
Matthias Clasen
defc3d8cbc builder-tool: Don't strip border-width
Strictly speaking, this would only have to be special-cased inside
GtkDialog, but lets just skip it altogether.
2015-07-19 13:18:30 -04:00
Matthias Clasen
f881f37789 Fix csd decorations
By accident, commit b9b17c3c2a removed one line
that wasn't unused, but important for hiding close buttons on
dialogs. Bring it back.
2015-07-19 09:59:18 -04:00
Benjamin Otte
04883e72fa window: Set the type hint when it changes, not just on map()
There is no reason to wait until map() to reset a type hint on the GDK
window. Just set it when it changes.
2015-07-19 04:45:25 +02:00
Benjamin Otte
b0ac837271 window: g_object_notify() on type-hint change 2015-07-19 04:45:25 +02:00
Benjamin Otte
38a07cde75 window: Don't update type hint when it didn't change 2015-07-19 04:45:25 +02:00
Benjamin Otte
7a16039c2d window: Allow setting type hint on mapped windows 2015-07-19 04:45:25 +02:00
Benjamin Otte
8a238c7886 window: Don't keep 2 type hints
1. This confuses the code as it's using the old type hint with the new
type hint on GDK window creation

2. It only existed as a workaround for old code that directly accessed
window->type_hint which hasn't been possible since 3.0.
2015-07-19 04:45:25 +02:00
Benjamin Otte
8d3bcb6ef8 combobox: Simplify code
We don't add new children to the child's parent, we add them to ourself.
Because guess who a child's parent is?
2015-07-18 05:39:01 +02:00
Benjamin Otte
d071415d56 combobox: Remove unused header function functionality 2015-07-18 05:18:19 +02:00
Benjamin Otte
1ec7f435d8 combobox: Remove unused argument from private function 2015-07-18 05:18:19 +02:00
Matthias Clasen
c27b90cc79 Fix the build 2015-07-17 20:45:28 -04:00
Matthias Clasen
7fd307f881 Revert "GtkGrid: Add a few NULL checks"
This reverts commit e215db6da2.

We are actually requiring non-NULL out arguments here now.
2015-07-17 20:18:34 -04:00
Matthias Clasen
d8a40c4587 inspector: Avoid a NULL deref
Coverity pointed out that getting a class name requires
dereferencing the pointer, so only don't do it if it is NULL.
2015-07-17 19:52:52 -04:00
Matthias Clasen
0bb2567ff5 GtkWindow: Fix a use-after-free
We were printing a string in a warning after freeing it.
Also, fix an x/y typo that might cause popovers to be
mispositioned.
2015-07-17 19:19:24 -04:00