Commit Graph

36213 Commits

Author SHA1 Message Date
Benjamin Otte
85b17e778c button: Don't emit a signal on broken grabs
We don't emit one on grab notify, so we don't want one for broken grabs
either.
2013-12-03 01:57:38 +01:00
Philip Withnall
c73bdb21b4 gdkwindow: Remove an unused assignment
The show variable is assigned to in both branches of an if block a
little further down.

Found with scan-build.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2013-12-02 10:51:07 +00:00
Philip Withnall
ad6f4926b6 gdkwindow: Remove an unused assignment
scale is only used if HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE is defined.

Found with scan-build.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2013-12-02 10:51:07 +00:00
Philip Withnall
b37f8b80b4 gtkprintunixdialog: Remove a redundant (GFile != NULL) check
g_file_new_for_uri() is guaranteed to return a non-NULL value, so this
check was redundant, and was confusing the static analyser into
returning a false positive, where it thought the file could be NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2013-12-02 10:36:26 +00:00
Philip Withnall
380150361b gtktreeselection: Eliminate a dead assignment
This is technically a dead assignment, but is nice to retain for
clarity. Moving it to the variable definition shuts scan-build up.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2013-12-02 10:36:26 +00:00
Philip Withnall
1adf0becc2 gtkthemingengine: Eliminate a dead assignment
This is technically a dead assignment, but is nice to retain for
clarity. Moving it to the variable definition shuts scan-build up.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2013-12-02 10:36:26 +00:00
Philip Withnall
5c5390f74b gtkthemingengine: Fix a definite use of an uninitialised variable
At this point, segments[1] is always uninitialised, and is used to
initialise itself. Looking at the code in the branch above, this appears
to have been a typo from segments[0], as segments[1] seems to typically
be 2 * segments[0].

Found by scan-build.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2013-12-02 10:36:26 +00:00
Philip Withnall
99a162c69e gtkpapersize: Reformat #if preprocessor commands
This eliminates some false positive warnings from scan-build, which was
not interpreting the #ifs and hence warning about unbalanced #endifs.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2013-12-02 10:36:26 +00:00
Philip Withnall
a265d8f32d gtkmenu: Fix potential use of uninitialised variables
The child_height out variable is only valid if compute_child_offset()
returns TRUE.

Found by scan-build.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2013-12-02 10:36:26 +00:00
Philip Withnall
480a005039 gtktreeviewaccessible: Fix potential uses of uninitialised variables
Found with scan-build.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2013-12-02 10:36:26 +00:00
Matthias Clasen
087b61f653 GtkRevealer: Fix size allocation with disabled animation
When animation is disabled, we use 'none' as the effective
transition type. So far, this transition type failed to change
the size request, causing the revealer to always take up the
space of the child, even when the child is not shown.

https://bugzilla.gnome.org/show_bug.cgi?id=719568
2013-12-01 21:45:17 -05:00
Matthias Clasen
96c0903799 Fix the AtkImage implementation for GtkIconView items
We were returning uninitialized values for image size and
position.

Found in a pile of patches in
https://bugzilla.gnome.org/review?bug=712760
2013-12-01 18:33:38 -05:00
Matthias Clasen
8377c12b15 Code cleanup
Don't compare booleans to FALSE.
2013-12-01 17:54:00 -05:00
Simon Feltman
af95d6628c annotations: Set GtkTreeModelFilterModifyFunc value argument to out
Use (out caller-allocates) annotation for the "value" argument to
GtkTreeModelFilterModifyFunc. This is needed because GI based language
bindings coerce GValue input args into native types and there is no
opportunity to set the value within the GValue itself.

https://bugzilla.gnome.org/show_bug.cgi?id=719460
2013-12-01 17:22:05 -05:00
Marco Brito
d31f3e5766 Add class toolbar before the style context is created for the widget.
The call to gtk_button_set_relief() in gtk_toolbar_init() indirectly
used the style context of the half-created widget, before we had a
chance to add the "toolbar" style class to it.

Reorder gtk_toolbar_init() to ensure that the proper style class is
set first.

https://bugzilla.gnome.org/show_bug.cgi?id=719595
2013-12-01 17:20:30 -05:00
Christian Persch
cc3c737088 infobar: Fix visibility when enable-animations=false
When enable-animations is false, the revealer's child-revealed property is
notified immediately, so make sure to connect to it before toggling the
revealer.

https://bugzilla.gnome.org/show_bug.cgi?id=719510
2013-12-01 23:17:28 +01:00
Aaron Hamilton
142d3f1d59 Correct the deprecation annotation for gtk_widget_modify_bg
It was pointing to a nonexisting function.

https://bugzilla.gnome.org/show_bug.cgi?id=719469
2013-12-01 17:03:48 -05:00
Matthias Clasen
56719c6363 Don't use depeprecated api
GtkPrintUnixDialog and testtitlebar were still using
gtk_widget_set_margin_left/right. Switch them over to
gtk_widget_set_margin_start/end.
2013-12-01 16:55:57 -05:00
Matthias Clasen
b53b5578f3 message dialog: Make labels wrap at a reasonable length
Several labels in GtkMessageDialog were set to wrap, but
did not set max-width-chars. Fix that.
2013-12-01 16:19:17 -05:00
Matthias Clasen
e036028402 about dialog: Make labels wrap at reasonable length
Several labels in GtkAboutDialog are set to wrap, but
don't set a value for max-width-chars. Fix that.
2013-12-01 16:18:07 -05:00
Matthias Clasen
8eeebda1e5 places sidebar: Use a symbolic desktop icon
This was pointed out in

https://bugzilla.gnome.org/show_bug.cgi?id=719505
2013-12-01 13:58:39 -05:00
Chun-wei Fan
dcfa3aa8cd build/win32/vs*/README.txt: Re-word a bit
Use PATH rather than path to make things clearer
2013-11-29 09:53:49 +08:00
Juan Pablo Ugarte
bbd0035625 GtkAboutDialog: fixed calling gtk_about_dialog_set_logo_icon_name()
with a NULL icon_name. Now it will actually use the default
window icon set as mention in the docs
2013-11-28 17:01:18 -03:00
Juan Pablo Ugarte
b5dff5e417 GtkIconCache: find_image_offset() return 0 if icon_name is NULL.
This avoid a crash calling gtk_about_dialog_set_logo_icon_name() with a NULL icon_name.
2013-11-28 16:56:11 -03:00
Manuel Bachmann
e45ea70936 Fix CSD check for Win32
Win32 does not have alpha channel currently ; fix the check
for this, so trying to enable CSDs on this platform will
not "succeed" and crash the app anymore.

Partially fixes gtk3-widget-factory.
2013-11-27 11:24:12 +01:00
Chun-wei Fan
c13c741143 Visual C++ Projects: Add rules to generate GTK DBus sources
Since commit 7c2a5072 the gtkdbusgenerated.[c|h] are not included in the
dist tarball and thus have to be generated, which broke the Visual C++
builds.

This patch adds property sheets and custom build rules for the Visual C++
projects so that gtkdbusgenerated.[c|h] will be generated upon building the
GTK+ DLL sources.

This also tells people building GTK+ from the projects that they need to
have Python 2/3 installed and the Python interpretor needs to be in their
PATH before building GTK+ from the projects.
2013-11-27 18:05:32 +08:00
Chun-wei Fan
fd134d8457 Update GDK-Broadway MSVC Projects
-Improve optimization a bit for broadwayd, by enabling link time code
 generation
-Add PlatformToolset tag for the Visual C++ 2010 projects, to ease
 transition to Visual C++ 2012/2013
2013-11-27 16:46:45 +08:00
Shantha kumar
18676d4e85 Tamil Translations Updated 2013-11-27 13:40:06 +05:30
Matthias Clasen
7c2a50728d Don't distribute gdbus-generated sources
These are supposed to be regenerated at build time,
to avoid dependencies on the dist-systems glib version.
2013-11-26 18:26:36 -05:00
Ryan Lortie
ce2d9b430c defaultvalue test: ignore show-desktop
Ignore the "show-desktop" property on GtkPlacesSidebar for the
defaultvalue test.

Currently, "make check" is passing because it runs the test under a xvfb
with no XSETTINGS provider, so we see the Gtk default value.  No matter
what we set the default value to in Gtk, however, there will be some
desktop environment in which someone running the installed test outside
of an xvfb will get the wrong result.  Best to ignore it.

https://bugzilla.gnome.org/show_bug.cgi?id=712302
2013-11-26 14:27:59 -05:00
Matthias Clasen
21114071ec Change the default for "show-desktop" back to TRUE
Change the GtkSettings default for "shell-shows-desktop" back to TRUE
and also change the default value of the "show-desktop" property on
GtkPlacesSidebar so that the defaultvalue test passes.

https://bugzilla.gnome.org/show_bug.cgi?id=712302
2013-11-26 14:21:01 -05:00
Michael Wood
89f78a718b bindings: Fix stray semicolons in CSS example for bindings
Semicolon shouldn't be at the end of binding set
2013-11-26 12:26:46 +00:00
Benjamin Otte
1d2a070254 x11: Don't crash if a window is on an unmanaged screen
_gdk_x11_display_screen_for_xrootwin() can return NULL. If so, return
NULL from gdk_x11_window_foreign_new_for_display().

https://bugzilla.gnome.org/show_bug.cgi?id=709716
2013-11-25 21:14:34 +01:00
Carlos Garnacho
d1414211bf x11: keep track of the screen pixel size by calculating the bounding box of monitors
This is so we always have the latest information given by XRandR (or other), and not
rely on Core protocol information that might not have been updated yet.

This is specially visible when a monitor is connected (less frequent) or disconnected
(much more frequent), callbacks on GdkScreen::monitors-changed that call
gdk_screen_get_width/height() could get the screen size previous to the monitor
rearrangement.

So in order to fix this, keep track of the latest monitors information, and calculate
the bounding box in order to know the screen size.

https://bugzilla.gnome.org/show_bug.cgi?id=715029
2013-11-25 17:19:46 +01:00
Marek Kasik
118b09c68c printing: Fix memory leak when listing Avahi printers
Return values of g_variant_get_child_value() were not unreffed
correctly together with one value returned by g_variant_get().
Use g_variant_get_data() instead of copying each byte separately.

https://bugzilla.gnome.org/show_bug.cgi?id=712799
2013-11-25 10:27:39 +01:00
Manuel Bachmann
543b840a80 Broadway - Fix UNIX/Win32 detection
Finally fix this check so unnecessary headers aren't needed.
2013-11-25 04:51:29 +01:00
Benjamin Otte
8765269478 tests: Add max-width-chars to testwindowsize test 2013-11-25 03:56:21 +01:00
Benjamin Otte
4e9356f339 menu: Do a proper min height request
The minimum height is the size of one menu item plus the arrows, not the
minimum size of all menu items.

https://bugzilla.gnome.org/show_bug.cgi?id=691974
https://bugzilla.gnome.org/show_bug.cgi?id=694859
2013-11-25 03:54:05 +01:00
Benjamin Otte
f18655c641 window: Don't assume 640x480 max default size
Instead, use the monitor's work area.

This might have unforseen side effects that warrant a later revert, such
as:
- Apparently some WMs assume maximizing when a window is maximum screen
  size.
- WMs might not shrink the window by the decorations' size when it tries
  to be fullscreen.
- Applications might have buggy size request code that causes weirdly
  sized windows.
2013-11-25 03:49:35 +01:00
Benjamin Otte
8308f4c1e9 stack: Fix crash on g_object_get("visible-child")
priv->visible_child is not a GtkWidget but a custom struct holding the
widget. So use the getter instead.
2013-11-25 03:49:35 +01:00
Benjamin Otte
46ed450a29 treemenu: Implement height-for-width properly 2013-11-25 03:49:35 +01:00
Philip Withnall
9d7a442b8b testsuite: Fix potential strcmp() against NULL
Use g_strcmp0() instead.

Found by scan-build.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2013-11-24 21:21:46 +00:00
Philip Withnall
ada766025f gtktreeviewaccessible: Fix a potential division by zero
Found with scan-build.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2013-11-24 21:21:02 +00:00
Philip Withnall
86b6170940 gdkwindow: Fix potential uses of uninitialised variables
Found with scan-build.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2013-11-24 21:20:44 +00:00
Emmanuele Bassi
34fd1234a6 pixbuf-engine: Clean up error conditions and destructors
Simplify the error checks and move all common behaviour into a utility
function.

https://bugzilla.gnome.org/show_bug.cgi?id=712536
2013-11-22 22:17:07 -05:00
Emmanuele Bassi
01dfd8bb6e pixbuf-engine: Improve ThemePixbuf clean up functions
Make theme_pixbuf_destroy() NULL-safe like g_free(), and add a clear
function in the spirit of the g_clear_* family of functions.

https://bugzilla.gnome.org/show_bug.cgi?id=712536
2013-11-22 22:17:07 -05:00
Jehan
0d396abf22 Themes with specified gap images but no actual file crash.
https://bugzilla.gnome.org/show_bug.cgi?id=712536
2013-11-22 22:17:07 -05:00
Carlos Garnacho
a53a931755 x11: Unset GdkX11DeviceXI2 scroll valuators on device change
Scroll valuators were being just appended again and again, leading
to 1) a growing memory issue anytime a device changed 2) the first
scroll valuators to stay permanent on the application lifetime, as
the first stored valuators would always match.

https://bugzilla.gnome.org/show_bug.cgi?id=705203
2013-11-22 12:49:32 +01:00
Tim Lunn
189b9c643d build: bump requirement on gobject-introspection to 1.39.0
https://bugzilla.gnome.org/show_bug.cgi?id=713044
2013-11-22 07:18:54 +11:00
Jasper St. Pierre
aa02b5b909 wayland: Sync transient-for on xdg-surface show as well... 2013-11-21 13:04:00 -05:00