Commit Graph

43159 Commits

Author SHA1 Message Date
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
Pedro Albuquerque
fbbc203f23 Updated Portuguese translation 2015-07-18 10:24:02 +00:00
Pedro Albuquerque
4354b0598a Updated Portuguese translation 2015-07-18 10:19:20 +00:00
Marek Černocký
c7202b975f Updated Czech translation 2015-07-18 09:42: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
ccfacb383c testgtk: Remove pointless code
The display is getting overwritten immediately. Pointed out by
coverity.
2015-07-17 19:54:09 -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
Matthias Clasen
a9ee745dc1 file chooser: remove an unused GError variable
Pointed out by coverity
2015-07-17 19:19:03 -04:00
Matthias Clasen
2eb39a3b7a inspector: Remove some dead code
Not sure what I was thinking here. Coverity pointed this out.
2015-07-17 18:47:39 -04:00
Matthias Clasen
ff86433ea1 inspector: Avoid a NULL deref 2015-07-17 18:42:24 -04:00
Matthias Clasen
ee43462d74 treeview: Add an explicit return for clarity
I believe that first_column can only ever be NULL here if
last_column is NULL too, in which case we'd exited already.
But coverity doesn't see that, so add an explicit exit.
2015-07-17 18:41:14 -04:00
Matthias Clasen
0ebcc56a77 tooltip: Remove unnecessary checks
Coverity uses these as clues to complain.
2015-07-17 18:40:37 -04:00
Matthias Clasen
361915628d list box: Remove unnecessary checks
Again, coverity takes these as clues to complain.
2015-07-17 18:40:11 -04:00
Matthias Clasen
6a9944cbc5 GtkLabel: Remove an unnecessary check
Coverity has the annoying habit of guessing backwards that
if we check the value here, it might be NULL earlier.
2015-07-17 18:39:14 -04:00
Matthias Clasen
e215db6da2 GtkGrid: Add a few NULL checks
Coverity complained about these.
2015-07-17 18:38:59 -04:00
Matthias Clasen
363e791d08 GtkActionHelper: Avoid null deref in debug code 2015-07-17 18:38:01 -04:00
Matthias Clasen
bb29c1fcc5 gdk: Add some parameter checking
This may help coverity recognize that we're not called with
invalid combinations.
2015-07-17 18:37:20 -04:00
Matthias Clasen
2b105dc3d9 testdialog: Error out if templates are missing
Coverity complained about us ignoring the return value
here, and it is nicer to get an error message about this.
2015-07-17 16:11:17 -04:00
Matthias Clasen
0ee14211b1 cups: Annotate a call whose return value we don't care about
We're closing this fd, but we're not going to do anything else
if that fails. Annotate to let coverity see this.
2015-07-17 16:11:17 -04:00
Matthias Clasen
1b8d06da2d inspector: Check a return value
We don't care about the error here, but we were relying on
g_resources_get_info to zero the size even in case of error.
No need to do that, we can just check the return value. Plus,
it makes coverity happy.
2015-07-17 16:11:16 -04:00
Matthias Clasen
f960d4f486 inspector: Annotate a call whose return value we don't need
The way this code is written, we know that there is an item in
the hash table and the iter_next call will give it to us, so
no need to check the return value. Annotate the call to tell
coverity.
2015-07-17 16:11:16 -04:00
Matthias Clasen
8ba55d80fc gtkicontheme: Check a return value
We were already looking at the error anyway, but rewriting things
this way lets coverity see the light.
2015-07-17 16:11:16 -04:00
Matthias Clasen
91b147622b gtkbuilderparser: Add some assertions
Add some assertions that things are non-NULL when we know they
are, so that coverity gets it.
2015-07-17 16:11:16 -04:00
Matthias Clasen
770fc90e7c gtk-demo: Check a return value
Found by coverity.
2015-07-17 16:11:16 -04:00
Benjamin Otte
6c862f229f css: Fix GtkCssChange enum
Previously, the (1<<31) value evaluated to the 64bit value
  0xFFFFFFFF80000000
instead of
  0x0000000080000000
Avoid this by explicitly casting the value to unsigned long long.

Also cast all values to unsigned long long to achieve consistency
and hopefully in the future get new values added the same way.
2015-07-17 22:06:16 +02:00
Benjamin Otte
dbb1830728 headerbar: Switch css positions on direction change 2015-07-17 19:13:09 +02:00
Balázs Úr
0480517886 Updated Hungarian translation 2015-07-17 14:25:22 +00:00
Matthias Clasen
9b81372ad9 file chooser: Improve popover positioning
We keep the popover vertically tied to the selected row, but pick
up the horizontal position from the click / touch.
2015-07-17 08:57:40 -04:00
Matthias Clasen
7627ed8000 places sidebar: Preserve ::populate-popup functionality
We "fix" this signal the same way we did for GtkEntry and
GtkTextView: slightly change the signature so that the passed
widget may be a container other than a GtkMenu, and add a
property to explicitly opt in to receiving the signal in
this case.
2015-07-17 08:57:39 -04:00
Matthias Clasen
33cc51d994 file chooser: Use a popover for the context menu
Use a popover for the context menu, and add a long press gesture
to allow opening it with touch.
2015-07-17 08:57:39 -04:00
Matthias Clasen
e08c5262b7 places sidebar: Use a popover for the context menu
Use a popover for the context menu, and add a long press gesture
to allow opening it with touch.
2015-07-17 08:57:39 -04:00
Ignacio Casal Quinteiro
186c8f5254 gdk: fix crash if visual is NULL
cairo_xlib_surface_get_visual might return NULL so we need to
check for NULL before trying to use it.

https://bugzilla.gnome.org/show_bug.cgi?id=752520
2015-07-17 14:26:11 +02:00
Matthias Clasen
02577ddb06 inspector: Avoid a gratitious use of g_strv_length
No need to count the strings first before iterating over them.
2015-07-16 23:42:55 -04:00
Matthias Clasen
1fb075dbca file chooser: Make bindings work in save entry
With the name entry being in the header bar now, we no longer
get bindings working by just letting the key event bubble up,
we have to explicitly apply them on key events that the save
entry is not handling.
2015-07-16 23:38:47 -04:00
Timm Bäder
c53bed3b39 GtkFileChooserButton: Don't update icon/label so often
They were updated in style-changed, causing the label to get set to
(None), then to the actual file name again a frame later, both of the
updates cause the GtkFileChooserButton to resize, possibly to the
minimal width, causing the layout to jump. Fix this by only updating
icon/label in style-updated when the icon theme actually changed, which
is the only case we care about here.

https://bugzilla.gnome.org/show_bug.cgi?id=752509
2015-07-17 05:36:44 +02:00
Timm Bäder
2902585518 gtkprintunixdialog: Set border_width to 0 2015-07-16 18:37:13 +02:00
Emmanuele Bassi
e259b2f30d Avoid O(n²) walking of string arrays
"Yo, we heard you like traversing NULL-terminated arrays to operate on
them, so we called g_strv_length() as the for condition, so you can
iterate the array while iterating the array."

Instead of making famed rapper and television producer Xzibit proud, we
should avoid calling g_strv_length() on an array while looping on the
array, to avoid quadratic complexity.

We do this in various places that deal with arrays of strings that we
cannot really guess are short enough not to matter — e.g. the list of
CSS selectors in the inspector, or the required authentication
information for printing.
2015-07-16 16:19:55 +01:00
Georges Basile Stavracas Neto
3b41daca78 placessidebar: show persistent drives when not showing Other Locations
Previous commits changes the behavior of GtkPlacesSidebar, as it stops
handling persistent devices and only manages mounted networks, XDG
directories and bookmarks.

By radically breaking the previous behavior, we may have trouble
since we provide no alternatives to that besides the private widget
GtkPlacesView.

Fix that by showing the persistent devices when not showing Other
Locations item.
2015-07-16 11:41:03 -03:00
Emmanuele Bassi
b274a2656d tests/gears: Ensure we don't use unavailable GL resources
We need to check on realize if we have access to a GL context, before
calling GL functions. We use gtk_gl_area_get_error() for that.

We also need to tear down the resources during unrealization, instead
of leaking them.
2015-07-16 14:55:25 +01:00
Georges Basile Stavracas Neto
a39b8f67ba placessidebar: fix Connect to Server position
Commit 7db399d975 introduces
the Other Locations item, as well as some behavioral changes
to GtkPlacesSidebar. It, howevers, wrongly changes the section
of code that handles the Connect to Server item, with various
side effects depending on the environment setup.

Fix that by adding the Connect to Server at the right section
of code.
2015-07-16 09:37:56 -03:00
Yosef Or Boczko
40efaf67bf Updated Hebrew po-properties translation 2015-07-16 12:59:49 +03:00
Yosef Or Boczko
0916b58d02 Updated Hebrew translation 2015-07-16 12:54:42 +03:00