Commit Graph

21606 Commits

Author SHA1 Message Date
39dbcbab97 filechooserentry: Ensure the base folder is always valid
If the base folder is set to NULL, then we just assume the home dir.
FIXME: Should we disallow a NULL folder?
2016-03-10 15:15:36 -06:00
02705bce36 filechooserentry: Don't complain about incomplete hostnames
First of all, those hostnames may very well be complete, second of all,
smb:// is a valid uri to enter.
2016-03-10 15:15:36 -06:00
f0573f8b42 filechooserentry: Start autocomplete immediately
Don't do idle handlers for this.

Conflicts:
	gtk/gtkfilechooserentry.c
2016-03-10 15:15:36 -06:00
a8c766991a filechooserentry: Remove file_system argument
It's not needed anymore.
2016-03-10 15:15:36 -06:00
ce8d0599dc filechooserentry: Simplify code
Now that we've imported the function in the last commit, rename it and
omit useless arguments by instead passing in the entry directly.
2016-03-10 15:15:36 -06:00
c2978cc394 filechooserentry: Move _gtk_file_system_parse()
It's very specific to the file chooser entry, so it's better kept there.
It's also not used anywhere else in the code.

Also, remove _gtk_file_system_get_folder() as it's no longer used.

Conflicts:
	gtk/gtkfilesystem.h
2016-03-10 15:15:36 -06:00
85563ccd35 filechooserentry: Use a GtkFileSystemModel
Replace the usage of a list store and a GtkFolder with a
GtkFileSystemModel. This improves performance and reduces code size.

Conflicts:
	gtk/gtkfilechooserentry.c
2016-03-10 15:15:30 -06:00
88810509ca filechooserentry: Store the liststore as a treemodel
Just changes the type of the member variable. This way we can avoid a
lot of casts.
2016-03-08 20:45:31 -06:00
c94e902894 filechooserentry: Make appending / to directories simpler 2016-03-08 20:45:17 -06:00
5280da05ee filechooserentry: Only append / to directory names once
Since 069d78ed31 the / is appended to
directories upon constructing the display name, so there is no need to
do it later.
2016-03-08 20:45:13 -06:00
29d7464922 filechooserentry: Don't trim away the slash after directories
It's not necessary as the code appending the slashes checks for a slash
these days.
2016-03-08 20:45:04 -06:00
fc84c3e02e filechooserentry: Fold in start_loading_current_folder()
The function just did one thing, we can just fold it into the only
caller.

Conflicts:
	gtk/gtkfilechooserentry.c
2016-03-08 20:44:43 -06:00
82a1d9fb18 filechooserentry: The file system cannot be NULL
Remove code that checked this.
2016-03-08 20:43:02 -06:00
707aadf6b1 filechooserentry: Make the filesystem a construct-only argument
This allows simplifications in the code.
2016-03-08 20:42:30 -06:00
bdb4727f7f filechooserentry: Keep finished_loading variable ourselves
This will be useful in the next commits when the GtkFolder code
previously keeping that variable gets repalced.
2016-03-08 20:42:09 -06:00
0e6d18eaef filechooserentry: force_reload is never TRUE
.. so remove it.
2016-03-08 20:42:03 -06:00
9c5b7b7892 filechooserentry: Fold function into other
There's no need to discard the current folder's file without also
discarding the folder object.
2016-03-08 20:41:57 -06:00
aff9158d41 filechooserentry: Reorganize function
Setter functions the way I code it look like this (in order):
1) Figure out if the value changed. If not, exit early.
2) Clear the old value (ie unref stuff, disconnect signals
3) Copy the new value
4) Set up things about the new value

This reorganization does that.

And by doing that, it even reduces the amount of code and the amount of
branches (and with it, nesting) needed.
2016-03-08 20:41:49 -06:00
a82a166700 filechooserentry: Use the actual discarding function to discard a folder 2016-03-08 20:41:42 -06:00
6d184e9707 filechooserentry: Don't use a magic number
... when we have a proper enum value for a column.
2016-03-08 20:41:34 -06:00
5fb443d236 Include <package/> tag in generated GIR
Specify pkg-config name when generating GIR files, used for mapping GIR
name to pkg-config names

https://bugzilla.gnome.org/show_bug.cgi?id=635287
2016-03-07 18:09:49 +01:00
674d0eb7e9 printing: Properly initialize auth_info in gtkprintbackend.c
auth_info should be a NULL-terminated array as it is used in
e.g. g_strdupv invocations iterating over its elements until
a NULL element is encountered.

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

(cherry picked from commit 15dbadf38992aa09364f0dd06a71a51b99b6e800)
2016-03-07 17:56:41 +01:00
407c89863d Avoid integer overflow
Use g_malloc_n in gdk_cairo_set_source_pixbuf when allocating
a large block of memory, to avoid integer overflow.

Pointed out by Bert Massop in
https://bugzilla.gnome.org/show_bug.cgi?id=703220

(cherry picked from commit 894b1ae76a32720f4bb3d39cf460402e3ce331d6)
2016-03-07 17:38:33 +01:00
ba91ab6604 2.34.30 2016-03-05 12:30:46 -05:00
2289695b69 status icon: Prevent size dithering
We're seeing loops where the size of some status icons constantly
dithers between 24 and 25. Since I couldn't track down exactly
where the one extra pixel comes from, just stop reacting
to single-pixel size changes.

https://bugzilla.gnome.org/show_bug.cgi?id=758893
2016-03-05 12:16:08 -05:00
e7a1afc74d Fix the build against current gdk-pixbuf
The GdkPixdata APIs have been deprecated, lets not fail the build
due to that.
2016-03-05 10:59:55 -05:00
4db659552b gdk: Fix build of gdkkeyuni.c
In commit 4bf5290, there isn't a prototype for
_gdk_win32_keymap_get_decimal_mark(), causing a C4013 (implicit
declaration of...) warning/error.  Fix that by including the right
header for it.
2016-02-27 20:20:32 +08:00
4bf5290a25 W32: Fix for commit 1f74f12d9, re-enabling decimal separator key
1f74f12d9 rendered entry of keypad decimal mark unuseable for
several national keyboard layouts, this commit amends that, at
least for W32, and makes GTK+ behave more or less the same way
W32 behaves.

The patch works like this:
- When typing the first character at the keyboard or when switching
  keyboard layouts, the decimal mark character will be cached in the
  static variable "decimal_mark" within gdkkeys-win32.c

- in case of WIN32, gdk_keyval_to_unicode() asks gdkkeys-win32.c for the
  current decimal_mark when converting GDK_KEY_KP_Decimal.
2016-02-26 19:40:20 +00:00
dd90d178cc Fix Quartz Full Screen Crash. 2016-02-23 10:01:24 -08:00
bbb8ac1caa Updated Thai translation 2016-02-23 14:58:01 +07:00
ce05d6608c Fix typo. 2016-02-21 16:25:12 -08:00
1ac15824c7 Revert "Translate GDK_KEY_KP_Decimal according to locale"
This reverts commit 3b65a6a42e.

Too much controversy for this minor improvement.
See https://bugzilla.gnome.org/show_bug.cgi?id=756751
2016-02-16 17:12:17 +01:00
0517063d76 win32: properly handle show and focus
The first time a window is shown we should always call SW_SHOWNORMAL.
Understand whether to call SW_SHOW or SW_SHOWNORMAL and the specific
ones for the temporary windows depending on IsWindowVisible.
This also fixes the problem when calling gtk_window_present and
the window is snapped to the left or right of the screen.

This patch is based on the patches provided by Yevgen Muntyan
and Aleksander Morgado.

https://bugzilla.gnome.org/show_bug.cgi?id=698652
2016-02-15 09:00:03 +01:00
2299a98a5d win32: on focus restore the window if iconified
If the window is iconified we want to restore the window
to get the proper size instead of showing it normal which
would change the size of the window.

https://bugzilla.gnome.org/show_bug.cgi?id=698652
2016-02-15 09:00:03 +01:00
99db4164bc Fix Quartz clipboard image retrieval.
It does no good to iterate through a series of mime types to call a
function when the eventually-called function,
_gtk_quartz_get_selection_data_from_pasteboard() in this case, gives the
wrong answer and stops the iteration on all but one especially if that
one isn't first.

The one is "image/tiff" and the quartz pasteboard function will return
any image type Quartz knows about for it, so lose the iteration and use
only "image/tiff".
2016-02-11 13:49:07 -08:00
383673643b Avoid a false positive deprecation notice
The comment on the #endif is tripping the deprecation state inside
the gtk-doc parser for gtk_container_get_children().
2016-01-25 10:43:30 +00:00
748900071e Fix interaction between scrolling menus and automatic mnemonics
https://bugzilla.gnome.org/show_bug.cgi?id=612611
2016-01-19 23:51:03 +01:00
679d2a45af Bug 722815 - Deliver GdkModifierType during 'drag-motion'
This bug was also found by clang:

gdkwindow-quartz.c:1956:11: warning: implicit conversion from enumeration type 'GdkEventMask' to
      different enumeration type 'GdkModifierType' [-Wenum-conversion]
  *mask = _gdk_quartz_events_get_current_event_mask ();
        ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
2016-01-12 23:07:25 -05:00
79da37b2c9 Updated Japanese translation
Change B series paper names in accordance with the Japanese standards.
2016-01-12 00:16:50 +09:00
8bbd765930 gtk2-24: add randr 1.5 monitor support [v3]
This patch introduces support for using the newly introduced
monitor objects in the XRandR protocol. These objects are meant
to be used to denote a set of rectangles representing a logical
monitor, and are used to hide details like monitor tiling and
virtual gpu outputs.

This uses the new objects instead of crtc/outputs objects when
they are available to create the monitor lists. X server 1.18
is required on the server side for randr 1.5.

This patch was cherry-picked and fixed from the gtk3 branch and
squashes the two following additional fixupes:

v2: Fix primary monitor determination with XRANDR 1.5
	Matthias Clasen <mclasen@redhat.com>
v3: Fix a typo in the previous patch
	Matthias Clasen <mclasen@redhat.com>

https://bugzilla.gnome.org/show_bug.cgi?id=759912
2015-12-28 10:43:18 -05:00
6de93df9a4 MSVC builds: Build gtk-update-icon-cache
As pointed out by  Paolo Borelli in bug 759436, we ought to build
gtk-update-icon-cache, "install" it and run it nowadays as it becomes more
and more common that we are going to use an external icon theme package,
so that gtk+ programs will run better and faster.
2015-12-15 16:54:00 +08:00
c9899ca93f build: Add support for Visual Studio 2015
This adds support for building with Visual Studio 2015 out-of-the-box
by what we did before: copying the 2010 projects and updating items
in there to make those projects compatible with 2015, as the formats
of the project files are largely unchanged.
2015-12-15 16:46:11 +08:00
339fd3d3f6 Clean Up MSVC Project Generation
Use the common autotools module that was added in the last commit so that
we can clean up the various Makefile.am's in gdk/ and gtk/, and also
make more Visual Studio projects completed during 'make dist', by adding
minimal items to those other Makefile.am's.  This also allows us to make
the property sheets that does the copying of headers and built items
completed at 'make dist', so that we won't have to worry too much about
headers being added (although it would be unlikely for GTK+-2.x).
2015-12-15 16:44:47 +08:00
d1c13ba580 build: Update Makefile-newvs.am
This updates the autotools module copying and generating the MSVC
2012-2015 projects by copying it from from GLib, which also has the
advantage of making things work better when doing 'make -jN dist', and
the Makefile.am's in bui;d/win32/vs[11|12] have been updated accordingly.
2015-12-15 16:38:11 +08:00
8b4e346a26 build/: Add common autotoold module to generate MSVC projects
This adds an autotools module that is copied from GLib, which is
included by the Makefile.am's to generate the complete Visual Studio
projects from their repsective templates, which:

-Cleans up those autotools files
-Make 'make -jN dist' work better
2015-12-15 16:37:45 +08:00
89761b7271 2.28.29 2015-12-10 15:34:40 -05:00
3b65a6a42e Translate GDK_KEY_KP_Decimal according to locale
It makes sense that you should be able to type numbers that are
correctly formatted and parsable according to the current locale,
using just the keypad. This patch makes it so by translating
GDK_KEY_KP_Decimal to the decimal separator for the current locale,
instead of hardcoding a '.'.

https://bugzilla.gnome.org/show_bug.cgi?id=756751
2015-10-25 14:09:03 -04:00
4ba1fbfdb1 Bug 753992 - im-quartz discard_preedit segmentation fault
Replace checking if the NSView is really a GdkWindow, which will crash
in the likely event it's not a GObject, with ensuring that the parent
GdkWindow is really a GdkWindowQuartz.
2015-10-08 21:36:11 -04:00
b3ff8bbe31 Add Language headers to po files
Future versions of gettext will fail if this header is missing.

GTK+ 2 is not going away anytime soon, and some projects (e.g. GIMP)
want to compile it with the latest gettext.

Based on a patch by Sven Claussner <sclaussner@src.gnome.org>.
2015-09-26 19:19:14 +02:00
c4d8fba455 Annotate GtkColorButton get_color
This is a backport of the corresponding change in gtk+ 3.

http://bugzilla.gnome.org/show_bug.cgi?id=754046
2015-08-25 23:46:58 -04:00