Commit Graph

21584 Commits

Author SHA1 Message Date
b79cb3974c Updated Polish translation 2014-06-17 19:29:24 +02:00
30f2428671 gtk-update-icon-cache: Add an --include-image-data option
Now that we don't include the image data by default anymore,
lets add an option that  does it.

Conflicts:
	docs/reference/gtk/gtk-update-icon-cache.xml
2014-06-17 12:59:37 -04:00
85fe78ed21 updateiconcache: Don't include image data by default anymore
Since large images are in the icon cache, and apps don't tend to use that
many icons anymore, simply don't include image data and instead make apps
load files from disk. Additionally, since they're stored in GdkPixbuf data,
that means that we have to first convert them either to a cairo_surface_t,
which requires converting pixel data to be premulitplied, or an OpenGL
texture, which requires a whole GPU upload anyway.

So, even with the icon cache, the goal of icons through zero-copy, mmap()'d
data from disk just isn't doable with the icon cache format we have. The
icon cache on my disk is nearing 100MB, since we include a bunch of
high-resolution application icons, that I doubt would be used by apps at all.
Removing this inefficient pixel data makes memory usage for all applications
go down, with no speed loss.

The icon cache also, however, has an index of what icons are in each folder,
which prevents a readdir() and allows GTK+ to know what icon is where without
having to do a bunch of stat(); calls. Keeping this data is good for GTK+,
so we should still keep the index.

It doesn't make sense to remove any code for mapping pixel data from the icon
cache. There's a plan in the works to have a symbolic icon cache that does
pixel math on 16x16 icons to prevent slow SVG rendering. 16x16 pixels are
fairly small, and such images are flat colors, which should compress easily,
so the icon cache would be worthwhile here. So let's keep the code around
in preparation for that case.

https://bugzilla.gnome.org/show_bug.cgi?id=721895
2014-06-17 12:58:33 -04:00
a3d672a415 MSVC 2010+ Projects: Update "Installation" Process
Currently, due to the way that Visual Studio 2010+ projects are handled,
the "install" project does not re-build upon changes to the sources, as it
does not believe that its dependencies have changed, although the changed
sources are automatically recompiled.  This means that if a part or more
of the solution does not build, or if the sources need some other fixes
or enhancements, the up-to-date build is not copied automatically, which
can be misleading.

Improve on the situation by forcing the "install" project to trigger its
rebuild, so that the updated binaries can be copied.  This does trigger an
MSBuild warning, but having that warning is way better than not having an
up-to-date build, especially during testing and development.
2014-06-09 12:21:55 +08:00
46b0c29382 pixbuf-engine: Fix the build with -Werror=format-security 2014-05-23 11:19:53 +02:00
7eb1c7701c gdkselection-win32.c: Declare Variables At Top Of Block
...so that builds on Visual C++ can be fixed.
2014-05-16 12:07:01 +08:00
c9da8bddca GtkMountOperation: Clean up a dangling signal handler
Based on a patch by Eugene Shatokhin,
https://bugzilla.gnome.org/show_bug.cgi?id=723366
2014-05-06 13:38:50 -04:00
fd44b53a39 gdk/win32: VK_SNAPSHOT maps to GDK_Print
Also, I am not sure the above VK_PRINT -> GDK_Print mapping is
correct, but it doesn't hurt yet.

https://bugzilla.gnome.org/show_bug.cgi?id=686170
2014-04-24 16:29:10 +02:00
ed081e30b6 win32: do not crash on invalid utf8 conversion
g_utf8_to_utf16() is not guaranteed to succeed. Check the error
and return if it failed.

https://bugzilla.gnome.org/show_bug.cgi?id=696232
2014-04-24 16:18:09 +02:00
10430feb8d gdk/win32: remove extra allocation for \r removal
Although I can't find explicit documentation for clipboard pointer, it
seems to be possible to modify clibpoard memory without side-effects.

According to MSDN,
http://msdn.microsoft.com/en-us/library/windows/desktop/aa366596%28v=vs.85%29.aspx

"The global and local functions are supported for porting from 16-bit
code, or for maintaining source code compatibility with 16-bit
Windows. Starting with 32-bit Windows, the global and local functions
are implemented as wrapper functions that call the corresponding heap
functions using a handle to the process's default heap."

"Memory objects allocated by GlobalAlloc and LocalAlloc are in private,
committed pages with read/write access that cannot be accessed by other
processes. Memory allocated by using GlobalAlloc with GMEM_DDESHARE is
not actually shared globally as it is in 16-bit Windows. This value has
no effect and is available only for compatibility. "

https://bugzilla.gnome.org/show_bug.cgi?id=711553
2014-04-24 16:16:19 +02:00
dd37429b51 win32: add more clipboard data checks to avoid crash
It may happen that the received clipboard data is empty, but
if it's of type image/bmp, gtk+ will crash:

gdk_property_change: 00030AD4 GDK_SELECTION image/bmp REPLACE 8*0 bits:
... delayed rendering
gdk_selection_send_notify_for_display: 00030AD4 CLIPBOARD image/bmp
GDK_SELECTION (no-op)
_gdk_win32_selection_convert_to_dib: 1252003C image/bmp

Program received signal SIGSEGV, Segmentation fault.
0x749a9f40 in msvcrt!memmove () from C:\Windows\syswow64\msvcrt.dll

Thread 1 (Thread 2248.0x1b34):
target=0xc07b) at gdkselection-win32.c:1292
at gdkevents-win32.c:3498
wparam=8, lparam=0) at gdkevents-win32.c:232
message=773, wparam=8, lparam=0)
    at gdkevents-win32.c:263
C:\Windows\syswow64\user32.dll
C:\Users\rugoosse\AppData\Local\virt-viewer\bin\libpangocairo-1.0-0.dll
wparam=0, lparam=-1687549457)
    at gdkevents-win32.c:248
C:\Users\rugoosse\AppData\Local\virt-viewer\bin\libpangocairo-1.0-0.dll

https://bugzilla.gnome.org/show_bug.cgi?id=728745
2014-04-24 16:07:58 +02:00
a533c83e8d Visual Studio 2010 Projects: Revamp the Projects
As we are likely to have GTK+-2.x around for some time, revamp the Visual
Studio 2010 projects like what was done for rest of the GTK+ stack, namely:

-Split the property sheets, in a way like what was done for the rest of the
 stack.  Also clean up the resulting property sheets a bit, and update the
 projects to use these property sheets.
-Use UNIX line endings for all projects and property sheets, to ease future
 application of patches.
-Make the copying of config.h.win32 and gdkconfig.h.win32 into custom build
 rules, so that they may be removed properly and re-copied during change
 and update.
-Add a PlatformToolset tag, so if we want to support building with Visual
 Studio 2012/2013, the transition can be done quite easily with a script,
 such as what is now being done for the Visual Studio 2012 projects for
 GLib.
2014-04-02 22:05:03 +08:00
8ef1cff3bb Visual Studio 2008 Projects: Revamp the Projects
As we are likely to have GTK+-2.x around for some time, revamp the Visual
Studio 2008 projects like what was done for rest of the GTK+ stack, namely:

-Split the property sheets, in a way like what was done for the rest of the
 stack.  Also clean up the resulting property sheets a bit, and update the
 projects to use these property sheets.
-Use UNIX line endings for all projects and property sheets, to ease future
 application of patches.
-Make the copying of config.h.win32 and gdkconfig.h.win32 into custom build
 rules, so that they may be removed properly and re-copied during change
 and update.

Similar updates will be applied for the Visual Studio 2010 projects ASAP.
2014-04-02 17:57:13 +08:00
1f8d021d30 treeview: properly remove the timeout in expand_collapse_timeout()
or it will later warn about removing a source that doesn't exist.
2014-04-02 00:04:50 +02:00
60189143a4 Print to a file in the current directory by default
When printing to a file, the filename was not being propagated if a
directory was not specified.

https://bugzilla.gnome.org/show_bug.cgi?id=711177
2014-03-18 10:34:21 -05:00
378ea9029f printing: Fail nicely when /tmp is not writable
Don't crash when /tmp is not writable when printing to file.
Show that getting of printer details failed for CUPS printers.

https://bugzilla.gnome.org/show_bug.cgi?id=693200
2014-03-18 16:02:04 +01:00
03014aa9c7 2.24.23 2014-03-17 21:34:01 -04:00
82310d48a8 Bug 634146 - Check g_win32_get_package_installation_directory_of_module() return value
Remaining part of patch from Joshua Element Green.

https://bugzilla.gnome.org/show_bug.cgi?id=634146
2014-03-16 13:59:06 +01:00
95985a2181 win32: free allocated gdi objects in 16bpp
In 16bpp, Gdk is creating hbitmap with CreateDIBSection() and a hdc with
CreateCompatibleDC(). Those 2 objects need to be released when the
pixmap is finalized.

https://bugzilla.gnome.org/show_bug.cgi?id=671538

Signed-off-by: Hans Breuer <hans@breuer.org>
2014-03-16 13:46:32 +01:00
7ff6e601c3 exstyle changed after the window size adjustment
Originaly the size of the window based on the client area size has
been calculated first and then variables dwStyle and dwExStyle have
been changed. Thus the window size has been calculated for different
windows type then eventually used when calling CreateWindowEx. This
caused for example the Gimp tool windows to have different size than
formerly saved in session. The whole code calculating the window size
is moved after the last adjustment of dwExStyle variable in this patch.

Signed-off-by: Hans Breuer <hans@breuer.org>
2014-03-16 13:46:30 +01:00
6d329406ae Bug 665507 - Pixmap via cairo DIB breaks gdk_gc_set_stipple() use
Only one bitmap can be selected into a device context. Using the
DIB created by cairo consumes the one opportunity, so every further
SelectObject into the same DC in GDK code will fail.
2014-03-16 13:46:29 +01:00
479bc6e550 win32: restore effect of _gdk_selection_property_delete
Can not find in the changelog entry why it was disabled at all,
see: http://git.gnome.org/browse/gtk+/commit/?id=3f4c73

The ill effect is somewhat hidden: if you try to copy images
via clipboard only the first one is pastable, i.e. Gdk keeps
the reference to the first image and provides it for later
paste.
2014-03-16 13:46:27 +01:00
e84bb08ded printing: Don't crash because of missing g_clear_pointer()
g_clear_pointer() is not available in glib-2.28 which is minimal
required version for gtk+-2.24.

https://bugzilla.gnome.org/show_bug.cgi?id=708783
2014-03-12 23:47:28 -04:00
c5561f7e8c Bug 711298 - "Edit Scheduled Transaction" window way too modal
Put dialogs and utility windows in the same level as normal and
toolbar windows so that Gtk can control their stacking instead of
forcing them, rather unnaturally, to be on top of all other windows,
even other application windows, even when another application has
focus.
2014-01-24 14:00:26 -08:00
ba2dc98760 Update docs for GtkEntry::activate
Remove the 'you shall not connect' message from this signal.
While it is a keybinding signal, using it from applications is
fine and, in fact, expected.
2014-01-22 01:39:27 -05:00
8e721922f1 docs: Fix gdk_pixmap_new arguments in tutorial
https://bugzilla.gnome.org/show_bug.cgi?id=708119
2014-01-22 01:08:39 -05:00
b7c6954f6f GtkFileChooser: fix documentation
https://bugzilla.gnome.org/show_bug.cgi?id=722496
2014-01-18 16:14:17 +01:00
a0a005def7 filechooser: Document the settings keys
This is so people can modify gnome-tweak-tool or whatever without directly diving into
the source.
2014-01-06 15:05:44 -06:00
4a61ca28b1 Fixed GtkLabel documentation on links
An escaped '&lt;' wasn't complete, the 'lt' part was missing.
2013-12-21 15:54:29 +01:00
090159cec9 gdkwindow: Don't add the same window to "update_windows" twice
This prevents passing of such window to another GMainLoop.

https://bugzilla.gnome.org/show_bug.cgi?id=711552
2013-12-18 18:29:33 +01:00
c212cb8f32 gdkwindow: Handle references in "update_windows" list correctly
Since update_windows list is a static variable in GdkWindow.c which
contains pointers to windows which needs to be updated, it can happen
that it contains a pointer to a window even after quit from a gtk_main().
If another gtk_main() is called in the same process it tries to process
windows in the list which leads to a crash.
Correct reference count handling of added windows prevents such applications
from crash.

https://bugzilla.gnome.org/show_bug.cgi?id=711552
2013-12-16 18:15:50 +01:00
2c01e7e78d Bug 651224 - Potential NULL display ptr from quartz gtk_clipboard_wait_for_contents 2013-12-09 11:38:51 -06:00
b7ab0ed129 iconfactory: Initialize varibale to NULL in failure path
Otherwise we use random memory and that is not good.
2013-12-06 12:02:22 -05:00
e048de9cab ime: Add builtin handling of dead keys
The IME input method has been both ignoring keypresses of
non-spacing characters (ditching these as non displayable),
and not letting IME do anything about those.

Even though, the sparse documentation on IMM/IME seems to
hint that applications can't pipe non-spacing characters to
the input method manager, and experimentation shown that
those characters are indeed handled differently than how
it'd be expected.

Then, add basic handling of dead keys on the IME input method
itself , as it's not mutually exclusive with regular keymaps
with dead keys.

https://bugzilla.gnome.org/show_bug.cgi?id=704937
2013-12-05 10:12:24 -06:00
aa8704aa9f Bug 712536 - Themes with gap_(start|end)_file but no actual file crash
Code factorization in commit 34fd123 reintroduced bug fixed in 0d396ab
with non-equivalent factorized tests.
2013-12-05 01:08:18 +13:00
4f47aa6ef5 GtkFileChooser: avoid a memory leak
The directory enumeration code was leaking references to
GtkFolder objects.

https://bugzilla.gnome.org/show_bug.cgi?id=705367
2013-12-01 17:13:01 -05:00
9559c707d5 Avoid a crash in the pixbuf engine
This is fallout from e4c83bbfdb,
which removed a necessary check.
2013-12-01 17:12:08 -05:00
3d0abd5cb0 Remove an unused struct member
AsyncFuncData.folder was entirely unused. Drop it.
2013-12-01 16:56:54 -05:00
e4c83bbfdb 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:19:58 -05:00
e2aabc016a 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:19:58 -05:00
c988a258cc Themes with specified gap images but no actual file crash.
https://bugzilla.gnome.org/show_bug.cgi?id=712536
2013-11-22 22:19:58 -05:00
e09719b12d Prevent a possible warning
When doing updates, gtk_progress_bar_real_update can calculate
compute a negative value for activity_pos.

If the allocation width is smaller than (xthickness + size),
pbar->activity_pos will be set to a negative value and this will
cause the drawing code to emit a warning about coordinates being
out of bounds.

Prevent this by keeping the value at least 0.

https://bugzilla.gnome.org/show_bug.cgi?id=701751
2013-11-09 23:51:50 -05:00
280fc402be Win32: Honor the geometry when GDK_HINT_MAX_SIZE is set.
The MINMAXINFO struct was being populated based upon geometry hints when
GDK_HINT_MAX_SIZE flag was enabled, then promptly having its values blown
away with default values.

https://bugzilla.gnome.org/show_bug.cgi?id=711110
2013-10-31 15:58:41 -05:00
352257a9c1 bgo#710936 - Fix typo in Japanese translation 2013-10-28 15:00:23 -06:00
fc201ba87c Bump version 2013-10-11 08:43:20 -04:00
d4538cf96c 2.24.22 2013-10-11 05:57:31 -04:00
b1813c9c79 Fix build 2013-10-06 00:48:50 -04:00
71560f2b55 Support automake 1.14
https://bugzilla.gnome.org/show_bug.cgi?id=709293
2013-10-05 23:25:59 -04:00
1b8d3b9210 Actually look in /usr/share/gtk-2.0 for default rc files
I managed to forget the 'share' component of the path.
2013-09-30 12:51:39 -04:00
88da0ce47f Updated Hungarian translation 2013-09-22 11:39:26 +02:00