Compare commits

...

277 Commits

Author SHA1 Message Date
Bastien Nocera aabdff2f3e image: Fix loading of pixdata GResources
Pixdata is deprecated but some software already use GtkImage widgets
with image data loaded from GResource-backed pixdata. As the
security-problem ridden pixdata loader was removed, we need to manually
check whether the GResource data is pixdata, and load it manually.

https://bugzilla.gnome.org/show_bug.cgi?id=781583
2017-07-12 15:48:26 +02:00
Мирослав Николић bde4a0dff6 Updated Serbian translation 2016-11-18 09:55:01 +01:00
gogo d3b1bf506e Updated Croatian translation 2016-10-05 22:20:59 +00:00
gogo c26ddd9507 Updated Croatian translation 2016-10-05 22:15:27 +00:00
Matej Urbančič 43dc7832eb Updated Slovenian translation 2016-08-25 22:16:56 +02:00
Matej Urbančič 3f7f13181e Updated Slovenian translation 2016-08-25 22:11:35 +02:00
Matej Urbančič f7a735e375 Updated Slovenian translation 2016-08-25 21:33:27 +02:00
Ignacio Casal Quinteiro 9a8041290c gtkselectionprivate: minor style fix
This seems to make some issue with the gtk# scanner.
2016-05-19 16:58:32 +02:00
YunQiang Su 85cf815d3d update zh_CN translation 2016-04-13 20:14:44 +08:00
YunQiang Su 09c82800bd update zh_CN translation 2016-04-13 16:41:00 +08:00
Rico Tzschichholz fb1b211b45 gtk: Annotate GtkFlowBoxCreateWidgetFunc as "transfer full"
(cherry picked from commit c8d1108574)
2016-04-12 13:35:32 +02:00
Lukas K f3b4148361 Fix gtk_scrollable_get_border annotation
https://bugzilla.gnome.org/show_bug.cgi?id=764540
(cherry picked from commit 8fc1ca1ef2)
2016-04-10 16:15:45 +02:00
Matthias Clasen 538f6213fb icon theme: Make the builtin hicolor index match reality
We were missing all of the status directories, and a few sizes.
This was causing us to not find image-missing on systems without
hicolor icon theme (this basically only happens on Windows).

https://bugzilla.gnome.org/show_bug.cgi?id=764378
2016-03-31 07:36:05 -04:00
Matej Urbančič 371f08d027 Updated Slovenian translation 2016-03-22 22:27:54 +01:00
Matej Urbančič ade7eeac8c Updated Slovenian translation 2016-03-12 22:05:53 +01:00
Federico Mena Quintero 60f8794d7e GtkFileChooserEntry: move the cursor after the user chooses a completion from the list
https://bugzilla.gnome.org/show_bug.cgi?id=756450
2016-03-10 16:03:26 -06:00
Federico Mena Quintero efd52319a5 GtkFileChooserEntry: regenerate the completions if the dir_part changes
Consider this bug:

1. Open a file chooser; switch it to $HOME

2. Start typing "~/Dow" with some file that *does* exist in your $HOME

3. Delete the inline-completion selection (e.g. the "nloads" after "~/Down").

4. While you are at "~/Dow_" hit Tab.  No completion will occur.

This happens because of the following.

Say the GtkFileChooserEntry is in the process of loading $HOME,
because _set_base_folder() was called.  If the entry contains no text,
then the FULL_PATH_COLUMN of the file system model will be set to
unprefixed filenames from $HOME, like

  .ssh/
  Documents/
  Downloads/
  somefile.txt

Later we avoid reloading the folder if g_file_equal(old_folder, new_folder).

However, the FULL_PATH_COLUMN gets populated in completion_store_set()
out of the actual filenames that GIO returned, plus the chooser_entry->dir_part.

If the user starts typing "~/Dow" then dir_part changes to "~/", *but*
the folder won't be reloaded since it is also $HOME.  However, the completion
machinery assumes that FULL_PATH_COLUMN will contain prefixed entries like

  ~/.ssh/
  ~/Documents/
  ~/Downloads/
  ~/somefile.txt

So, we add an invariant that chooser_entry->dir_part and
chooser_entry->current_folder_file must change at the same time, and
must not get out of sync:  If any of them changes, then the
completions are regenerated.
2016-03-10 15:37:36 -06:00
Matthias Clasen c762310578 3.18.9 2016-03-09 22:01:04 -05:00
Takao Fujiwara ed816e6283 Set VirtualBox USB Tablet to GDK_SOURCE_MOUSE
The virtual host assigns the name of the mouse device to
"VirtualBox USB Tablet" in VirtualBox and we'd use that device as mouse.
If not, GtkTooltip is not enabled.

https://bugzilla.gnome.org/show_bug.cgi?id=763017
2016-03-09 22:00:18 -05:00
Matthias Clasen 676565ae1a x11: More fake tablet blacklisting
Sigh.

Now that we've neutered the QEMU USB tablet, I'm finding that
spice is doing just the same nonsense. It has a fake "spice vdagent
tablet". Blacklist that as well.
2016-03-09 22:00:18 -05:00
Jonas Ådahl 926f82e52e gdk: Compress window state events
If there are already a window state event for a given window queued
when the window state is changed, drop that event and queue a new event
with a changed_mask based on the state before last event that was queue
without compression.

https://bugzilla.gnome.org/show_bug.cgi?id=762468
2016-03-09 22:00:18 -05:00
Matthias Clasen d93d777d99 x11: Trap errors around an XRandr call
Apparently, we can get X errors here. Ignore them.
https://bugzilla.gnome.org/show_bug.cgi?id=762907
2016-03-09 22:00:18 -05:00
fiddlerwoaroof 3e624869d5 Check if XRRGetOutputInfo returned a null pointer.
Fixes bug 763023: in certain circumstances, XRRGetOutputInfo will return
a null pointer.  This commit adds a check to detect and handle this
return value.
2016-03-09 22:00:18 -05:00
GNOME Translation Robot 83c990238a Updated Scottish Gaelic translation 2016-03-08 20:24:41 +00:00
Matej Urbančič d99581f49c Updated Slovenian translation 2016-03-05 22:36:56 +01:00
Matej Urbančič 781909fc9b Updated Slovenian translation 2016-03-05 22:33:41 +01:00
Carlos Garnacho 1d0ca716a1 x11: Avoid setting has_pointer_focus if a EWMH compliant WM is present
This is mostly useful to have focus behave sanely on lack of WM, so avoid
any check there if we're positive there is a WM handling focus.

https://bugzilla.gnome.org/show_bug.cgi?id=677329
2016-02-24 12:53:19 -05:00
William Hua 305568f70b x11: don't apply scaling factor twice
The fallback behaviour of get_work_area () divides the
screen width and height by the window scaling factor, but
those values are already scaled down.

https://bugzilla.gnome.org/show_bug.cgi?id=761474
2016-02-24 17:15:37 +00:00
Matthias Clasen fe0a4aed27 3.18.8 2016-02-24 00:03:51 -05:00
Matthias Clasen 4b7eab187c x11: Some cleanups to the multihead initialization
The significant change here is a memory leak fix in init_xrandr15.
The rest of the changes makes init_xrandr13 and init_xrandr15 more
parallel, and simplifies init_multihead.
2016-02-23 07:40:15 -05:00
Marco Trevisan (Treviño) 8419f894d6 X11, GdkScreen: properly implement init_randr15 including output name
https://bugzilla.gnome.org/show_bug.cgi?id=762319
2016-02-23 07:40:15 -05:00
Matthias Clasen 8605fcf2d9 file chooser: Avoid nonworking search+save combinations
With the location entry up in the header bar in save mode, we can
end up with the search model being in use when the user types in
the location entry. In this case, we don't make the Save button
sensitive as we should.

Having two entries in the dialog is somewhat confusing anyway,
so just stop the search when the user starts typing in the location
entry.

https://bugzilla.gnome.org/show_bug.cgi?id=761757
2016-02-23 07:40:15 -05:00
Matthias Clasen 1378d6e073 file chooser: Use the right model when getting the selection
We don't need to make assumptions about which model is currently
used since gtk_tree_selection_get_selection hands us the model.

https://bugzilla.gnome.org/show_bug.cgi?id=761757
2016-02-23 07:40:15 -05:00
Руслан Ижбулатов 5ecf734226 Don't do remote checks on NULL files
Calling _gtk_file_consider_as_remote() with a NULL argument
results in warnings being thrown.

Note that query->priv->location being NULL is a state that does
not seem to be invalid by itself.

This could happen if you do search-as-you-type in a filechooser,
which has a filter that does not match anything *and* the current
"place" selected is "Recent".

https://bugzilla.gnome.org/show_bug.cgi?id=761552
2016-02-23 07:40:15 -05:00
Matthias Clasen 244ac50e98 file chooser: Make Escape close the dialog
In some situations (no header bar, save mode), hitting Escape
would not do anything because the entry ate the key event.
Fix this by telling the entry to only handle Escape when there
is something to do, such as switching back to the path bar.

https://bugzilla.gnome.org/show_bug.cgi?id=761026
2016-02-23 07:40:15 -05:00
Allin Cottrell 8986d5b064 Fix Quartz Full Screen Crash. 2016-02-21 16:23:50 -08:00
John Ralls d5e257d1e4 Fix typo. 2016-02-21 16:23:41 -08:00
Matthias Clasen 4331ff2939 box: Fix rtl allocation with center widget
The code for adjusting the center widget allocation in case
of uneven sides never worked right in RTL. This was finally
noticed for tabs with close button, which commonly use a
centered label.
2016-02-20 16:46:49 -05:00
Matthias Clasen 7fc1fcde1e assistant: Add margin to action area
We are no longer setting a margin on the content area, so put
one on the action area itself to prevent the buttons from touching
the edge.

https://bugzilla.gnome.org/show_bug.cgi?id=762315
2016-02-20 11:29:28 -05:00
GNOME Translation Robot d80a44eb3b Updated Scottish Gaelic translation 2016-02-18 13:38:54 +00:00
Frederic Crozat 5d218939a3 Revert "Translate GDK_KEY_KP_Decimal according to locale"
This reverts commit bfedc3bafe.

Too much controversy for this minor improvement.
See https://bugzilla.gnome.org/show_bug.cgi?id=756751
2016-02-16 17:20:28 +01:00
Colomban Wendling 322c4e1698 treeview: Make sure the editing widget's top left is always visible
https://bugzilla.gnome.org/show_bug.cgi?id=761838
2016-02-14 15:01:06 +01:00
John Ralls 53ee00f790 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 14:09:15 -08:00
Chun-wei Fan 5d5651a51f Visual Studio builds: Drop gtk-query-settings project
The gtk-query-settings tool was only added in 3.19.x, so we ought not try
to build it here.  Oops :|, ought to check closer before trying to cherry-pick.

Issue reported by Ignacio Casal Quinteiro.
2016-02-03 01:31:14 +08:00
Alexandre Franke 85fb4c1c0a Updated French translation 2016-02-02 16:32:30 +00:00
Matthias Clasen 78b8192408 3.18.7 2016-01-27 23:25:10 -05:00
Matthias Clasen b700ce0429 Update expected output of the a11y tests
This is the result of the message dialog title change.
2016-01-27 23:25:10 -05:00
Matthias Clasen 6aec92607f Update README.glade
Update the README.glade file to use current .ui file
names and locations as example.
2016-01-27 22:17:30 -05:00
Olav Vitters 9ba7278e7c Add an XSetting for primary button warps slider
This will be used by xsettings-kde to ensure GTK+3.x programs behave
consistently.

https://bugzilla.gnome.org/show_bug.cgi?id=688524
2016-01-27 22:17:30 -05:00
Ray Strode c3696f7adb wayland: __NR_memfd_create instead of SYS_memfd_create
It looks like the gnome-continuous headers haven't quite
caught up yet, so try __NR_memfd_create instead.

If that doesn't work, i'll likely just add in a fallback
code path.
2016-01-27 22:17:30 -05:00
Ray Strode 12d5e7d1f2 wayland: use memfd_create instead of open in tmpdir
The tmpdir is used for a wide assortment of things, and
can easily fill up. If it fills then desktop will start
crashing with SIGBUS errors.

This commit changes the shm pool allocation code, to use
memfd_create, instead, so the shared memory files will
be anonymous and not associated with /tmp

https://bugzilla.gnome.org/show_bug.cgi?id=761095
2016-01-27 22:17:30 -05:00
Matthias Clasen b3506ede35 path bar: Don't hide arrows
Changing the visibility of child widgets in size-allocate does
not work well with out current allocation and layout machinery.
To avoid the visual fallout, just keep the arrow buttons visible
and only change their sensitivity.

https://bugzilla.gnome.org/show_bug.cgi?id=754868
2016-01-27 22:17:30 -05:00
Sebastien Lafargue b8b61514a0 GtkColorChooser: make set_rgba work in editor mode
When using the color chooser in editor mode,
gtk_color_chooser_set_rgba need to be propaged
to the editor

https://bugzilla.gnome.org/show_bug.cgi?id=761005
2016-01-27 22:17:30 -05:00
Carlos Garnacho 8f3d613f79 GtkTreeView: Update prelight row after revalidating rows
It might have changed (eg. after a row being expanded, and the child
rows revalidated), so just update it here based on the last pointer
position.

Based on a patch by Maxim Reznik <reznikmm@gmail.com>

https://bugzilla.gnome.org/show_bug.cgi?id=760891
2016-01-27 22:17:30 -05:00
Matthias Clasen 444fcaffc0 wayland: Don't hardcode /tmp
As pointed out in https://bugzilla.gnome.org/show_bug.cgi?id=760964,
we should use the GLib facilities for determining the preferred
location for temporary files.
2016-01-27 22:17:29 -05:00
Ray Strode 0443756f0f wayland: don't pass in width and height to create_shm_pool
create_shm_pool doesn't need the width or height, it just needs
the total size.  By passing it in, we're requiring it to redo
stride calculation unnecessarily.

This commit drops the width and height parameters and makes the
function just take the total size directly.

https://bugzilla.gnome.org/show_bug.cgi?id=760897
2016-01-27 22:17:29 -05:00
Ray Strode 6c192a8856 wayland: clean up stride calculation when creating shm surface
Right now, we assume the stride for the image surface needs to
be 4 byte aligned.  This is, in fact, true, but it's better to
ask cairo for the alignment requirement directly rather than
assume we know the alignment rules.

This commit changes the code to use cairo_format_stride_for_width
to calculate a suitable rowstride for pixman.

https://bugzilla.gnome.org/show_bug.cgi?id=760897
2016-01-27 22:17:29 -05:00
Ray Strode 385b7ae0c8 wayland: unlink shm file earlier in create function
create_shm_pool unlinks the temporary file a little,
too late. It should be unlinked before ftruncate()
is called for two reasons:

1) if ftruncate fails, the file is currently not
getting cleaned up at all
2) in theory, if the file is public some other process
could muck with it

This commit just moves the unlink call a little higher
up.

https://bugzilla.gnome.org/show_bug.cgi?id=760897
2016-01-27 22:17:29 -05:00
Matthias Clasen 39ea2982fc application: Protect against double shutdown
It is not something that can happen normally.
But if it does, we shouldn't crash.

https://bugzilla.gnome.org/show_bug.cgi?id=760680
2016-01-27 22:17:29 -05:00
Matt Watson 4accef4d14 widget: remove queue_resize in set_sensitive
Calling gtk_widget_propagate_state is enough to queue a resize if
needed

See da7a4089fe
2016-01-27 22:17:29 -05:00
Matthias Clasen f83878c904 message dialog: Prevent empty title from being shown
We don't want to grow the titlebar by showing an empty label.
2016-01-27 22:17:29 -05:00
Dominique Leuenberger 964adb2a68 QEMU USB Tablet is not really a tablet - it's a trick
Unfortunately, Qemu gives us this confusing device to work with,
and the best we can do is filter it out based on its name.

https://bugzilla.gnome.org/show_bug.cgi?id=760445
2016-01-27 22:17:29 -05:00
Ting-Wei Lan eb0f600785 broadway: Call setlocale in main function of broadwayd
It is required to correctly show translated messages on some locales.

https://bugzilla.gnome.org/show_bug.cgi?id=760416
2016-01-27 22:17:29 -05:00
Matthias Clasen d4032f80ce Fix corner manipulation when growing rounded rects
This addresses problems with uneven border radius',
pointed out by Lapo.
2016-01-27 22:17:29 -05:00
Matthias Clasen cc3bc75402 Fix rendering of unsymmetric borders
There was an errant path that threw off our clipping for
the top section of the border.

https://bugzilla.gnome.org/show_bug.cgi?id=722937
2016-01-27 22:17:29 -05:00
Matthias Clasen f7b0b523ac Avoid division by 0 in the border rendering code
We skip sides with 0 border width in render_border, but when
we collect sides with the same style, we may pass the 0 width
down to render_frame_stroke anyway. So skip width 0 sides
there as well.
2016-01-27 22:17:29 -05:00
Matthias Clasen 427287bea4 Fix dobule border rendering
This is the same fix that was applied for ridge and groove
style in 9f27ee7f5a.
2016-01-27 22:17:29 -05:00
Timm Bäder d7c628124c GtkListBox: Optimize _get_row_at_y a bit
Use g_sequence_lookup for a binary search over the rows.
2016-01-27 22:17:28 -05:00
Timm Bäder 4bf28f8a3b GtkListBox: get_row_at_y can return NULL 2016-01-27 22:17:28 -05:00
Felipe Borges 8c6222e54d printing: always propagate Collate value
https://bugzilla.gnome.org/show_bug.cgi?id=728344
2016-01-27 22:17:28 -05:00
Matt Watson b0d34de0c0 flowbox: remove unused prelight code
It was causing needless redraws

https://bugzilla.gnome.org/show_bug.cgi?id=759757
2016-01-27 22:17:28 -05:00
Matthias Clasen d9405627f1 Fix parsing of font-weight
The parser was turning a 400 into a 200 and a 700 into a 500.
2016-01-27 22:17:28 -05:00
Lionel Landwerlin 67630cb374 inspector: Ensure clip is always shown 2016-01-27 22:17:28 -05:00
Lucas Baudin 7988bd8aea wayland: recursively search for the settings schema.
On some systems, the gtk settings are not used properly for wayland.
Indeed, g_settings_schema_source_get_default is used, and as the docs says it,
"all lookups performed against the default source should probably be done
recursively.".

https://bugzilla.gnome.org/show_bug.cgi?id=759409
2016-01-27 22:17:28 -05:00
Timm Bäder 809c27e5d8 Gestures: Add some nullable annotations 2016-01-27 22:17:28 -05:00
Timm Bäder 2b734bbbb5 GtkFlowBox: Add missing nullable annotation 2016-01-27 22:17:28 -05:00
Timm Bäder 9790fc0bce GtkFlowBox: Fix copy/paste mistake in docs 2016-01-27 22:17:28 -05:00
Matthias Clasen 2558ed9022 file chooser: Also apply the settings
I forgot that the settings object we're dealing with here
is in delay mode, so settings won't apply immediately.
2016-01-27 21:50:57 -05:00
Matthias Clasen 01238dd8ae file chooser: Store size more frequently
We were only storing the dialog size on unmap, but resetting to the
stored default value more often, e.g. on focus-out. This was causing
the dialog to 'jump back' to its remembered size after the user
manually resized it, leading to frustration and bug reports.

Instead, save the dialog size on every ::size-allocate of the toplevel.
To avoid needlessly spamming dconf, only write the new value if it
changed.
2016-01-27 21:50:46 -05:00
Erika a311eb6468 Correct annotations for gtk_cell_layout_get_area
The function can return NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=759081
2016-01-27 21:50:10 -05:00
Kalev Lember e3fb59f88c headerbar: Don't leak internal widgets
Make sure to clean up internal widgets in destroy, as these aren't
cleaned up when GtkContainer walks the childrens list in
gtk_container_destroy().

This also fixes a gedit crash as reported in
https://bugzilla.redhat.com/show_bug.cgi?id=1288669

https://bugzilla.gnome.org/show_bug.cgi?id=759132
2016-01-27 21:49:49 -05:00
Matthias Clasen 5c9c3ccbd0 entry completion: Reduce the timeout
Pop up the completion window after 100ms. The previous timeout
of 300ms was making completions feel slow.

https://bugzilla.gnome.org/show_bug.cgi?id=758929
2016-01-27 21:34:56 -05:00
Timm Bäder ec1f393545 GtkEntry: nullable annotations 2016-01-27 21:29:51 -05:00
Timm Bäder e0d74c64ef GtkTreeModel: Remove erroneous transfer annotation 2016-01-27 21:28:31 -05:00
Sebastien Bacher ab3cec3701 GtkAppChooserWidget: wrap the label, use a standard icon
Let the label wrap if needed, that's required in some locales, use an
icon which is available in the theme

https://bugzilla.gnome.org/show_bug.cgi?id=758908
2016-01-27 21:26:58 -05:00
Balázs Meskó 7d6bdb325c Updated Hungarian translation 2016-01-26 15:08:13 +00:00
Ondrej Holy d5aa2e9e39 file chooser: Allow saving even if executable attribute is not set
Commit 8e975b2 (Bug 753969) introduced check of parent accessibility.
Consequently it is not possible to save file if executable attribute
is not set, which might happen for some gvfs backends. Let's assume
that the folder is accessible even if the attribute is not set.

https://bugzilla.gnome.org/show_bug.cgi?id=760881
2016-01-20 12:02:04 +01:00
Руслан Ижбулатов 62b9c4f817 Ensure that the fstat fix is not applied on x86_64 2016-01-14 12:51:26 +00:00
Руслан Ижбулатов 5f2f4b14b5 W32: Ensure that correct statting function is used by iconcache
With Mingw-w64 fstat() can be an inline function that
calls _fstat32() or _fstat64(), depending on some macros.
And if LFS is enabled, fstat() is defined to turn into
_fstat32i64() or _fstat64(). And some/all of the above
might also be macros as well. Side-step all that mess
and excplicitly re-define fstat as _fstat32, which is
guaranteed to use a version of "stat" struct that
has 32-bit size and time fields, which is what we want.

https://bugzilla.gnome.org/show_bug.cgi?id=760615
2016-01-14 10:01:17 +00:00
Lapo Calamandrei 60d155ddcb Adwaita: dim insensitive GtkColorButton GtkColorSwatch
see https://bugzilla.gnome.org/show_bug.cgi?id=760169
2016-01-07 19:07:07 +01:00
Matthias Clasen 81a287478a wayland: Only do cursor name fallback for standard names
Always returning a left_ptr if we can't find anything better
broke firefox application-specific fallback for missing cursors.
Keep that working by only doing the fallback for the CSS cursor
names, not for things like hashes.

https://bugzilla.gnome.org/show_bug.cgi?id=760141
2016-01-06 22:26:48 -05:00
Matthias Clasen affd6e7073 x11: Only do cursor name fallback for standard names
Always returning a left_ptr if we can't find anything better
broke firefox application-specific fallback for missing cursors.
Keep that working by only doing the fallback for the CSS cursor
names, not for things like hashes.

https://bugzilla.gnome.org/show_bug.cgi?id=760141
2016-01-06 22:26:39 -05:00
Matthias Clasen 0395cf917b Add context-menu to the list of standard cursor names
Adwaita doesn't have this one, but we are falling to the
default cursor anyway.
2016-01-06 22:26:31 -05:00
Andika Triwidada 45b3c553a9 Updated Indonesian translation 2016-01-02 12:27:16 +00:00
Andika Triwidada 1aa5f92784 Updated Indonesian translation 2016-01-02 12:22:34 +00:00
Rafael Fontenelle e96c689aa1 Updated Brazilian Portuguese translation 2016-01-02 06:48:23 +00:00
Marek Černocký 75bd5a313e Updated Czech translation 2015-12-25 10:50:10 +01:00
Paolo Borelli f74c55fb51 Win32: call dnd exit when finalizing the display
Since we init dnd when opening the display, call the corresponding
exit function (which is unused at the moment) when finalizing the
display.
2015-12-17 17:19:14 +01:00
Paolo Borelli c9f370a13f Win32: move CoInitialize to dnd init
Functions requiring CoInitialize are called just in two places:
 - the filechooser thread which calls its own CoInitializeEx
 - the dnd code

Moving CoInitialize in the dnd specific init is cleaner and
we can pair it with the corresponding CoUninitialize since
CoUninitialize should be called as many times as CoInitialize.
Note that it is ok to call this function multiple times, so it
will not break if another codepath will need it in the future.

The patch also replaces the deprecated CoInitialize with the
equivalent call to CoInitializeEx (already used in the filechooser).
2015-12-17 17:19:04 +01:00
Lars Uebernickel 2cbc2972ea gdk_pixbuf_get_from_surface: restore old behavior
A previous commit changed this function to return a pixbuf that is
larger than the passed (width, height) when the surface has a device
scale > 1. It's easy enough to take care of a scaled surface before
calling this function.

Revert to the old behaviour, but change gdk_pixbuf_get_from_window() to
return a scaled version when the underlying surface is scaled. We need
this because there's no other way to get to the unscaled window
contents.

https://bugzilla.gnome.org/show_bug.cgi?id=757147
2015-12-16 13:04:07 +01:00
Chun-wei Fan abac82a83c MSVC builds: Build more tools in gtk/
Build the gtk-update-icon-cache, gtk-builder-tool and gtk-query-settings
tools and run gtk-update-icon-cache as part of the post-build
"installation" process.

Pointed out (and reminded) by Paolo Borelli in bug 759436 that we should
build, "install" and run gtk-update-icon-cache in the MSVC builds as well.
2015-12-15 15:45:01 +08:00
Aurimas Černius 9e7e9817c9 Updated Lithuanian translation 2015-12-13 21:31:52 +02:00
Lapo Calamandrei 66772d30d1 Adwaita: revert menu color change on the light variant
...and make the change more subtle on the dark one.
2015-12-11 20:19:27 +01:00
Anders Jonsson ef1c911306 Updated Swedish translation 2015-12-09 21:51:22 +00:00
Lapo Calamandrei 6c17438492 Adwaita: make menu background color the same as popovers
fixes https://bugzilla.gnome.org/show_bug.cgi?id=759260
2015-12-09 19:03:22 +01:00
Khaled Hosny df4472f64a Update Arabic translation 2015-12-08 10:37:51 +04:00
Adam Reichold 09727d7a62 Fix method to update menu sensitivity of combo box
After removal of the selectable header and separator from the combo box,
the method to update the menu sensitivity must be changed as it assumes
at least two items within each sub menu and contains special handling
for the separator. Removing this fixes bug #759079.
2015-12-07 15:08:50 -05:00
Carlos Garnacho 7859628b22 GtkNotebook: Use gdouble in coordinate calculations
Otherwise rounding errors fool the "tab under coordinates" checks on
crossing events, which will be triggered close enough to the window
rectangle if the pointer moves slowly enough.

With this, the tab_prelight() function correctly figures out we've
moved the pointer outside the tab area when called in
gtk_notebook_leave_notify().

https://bugzilla.gnome.org/show_bug.cgi?id=759091
2015-12-07 17:42:27 +01:00
Piotr Drąg 77149833e9 Updated Polish translation 2015-12-05 15:28:17 +01:00
Wolfgang Stöggl 3fb435666e Updated German translation 2015-12-05 08:43:12 +00:00
Pedro Albuquerque 3971b14779 Updated Portuguese translation 2015-12-05 07:11:29 +00:00
Matthias Clasen b79b4e95a7 3.18.6 2015-12-04 21:09:20 -05:00
Christian Hergert eefbb8aee4 filechooserbutton: add some spacing between icon and text
These were a bit crammed, which doesn't match well with spacing used in
various other parts of gtk.
2015-12-04 21:09:20 -05:00
Timm Bäder bdfa6ebc2b Add some more missing nullable annotations 2015-12-04 21:09:20 -05:00
Timm Bäder 895c8db5da GtkWidget: Add some missing nullable annotations 2015-12-04 21:09:20 -05:00
Matthias Clasen 8b261439d4 testentryicons: Use an existing icon name
dialog-info is not an existing icon.
2015-12-04 21:09:20 -05:00
Sébastien Wilmet b325d0a98a textiter: fix bug in case insensitive backward search
'win.lines' contains the same content as the GtkTextBuffer, so to find
@match_start, forward_chars_with_skipping() is called with
skip_decomp=FALSE (the last parameter). So far so good.

On the other hand, the content 'lines' (the needle split in lines) is
casefolded and normalized for a case insensitive search. So,
forward_chars_with_skipping(..., skip_decomp=TRUE) must be called only
for the portion of text containing the needle.

Since 'start_tmp' contains the location at the start of the match, we
can simply begin at that location to find the end of the match.

Unit tests are added.

https://bugzilla.gnome.org/show_bug.cgi?id=758698
2015-12-04 21:09:20 -05:00
Timm Bäder 0682094e81 icon-browser: Stop using GtkMisc properties
Instead of xpad/ypad of 4 for every widget, just increase the
row-spacing and column-spacing by 8.

https://bugzilla.gnome.org/show_bug.cgi?id=758790
2015-12-04 21:09:20 -05:00
Timm Bäder 462240b9fc icon-browser: Use proper "times" character
https://bugzilla.gnome.org/show_bug.cgi?id=758790
2015-12-04 21:09:20 -05:00
Timm Bäder 6790837f47 icon-browser: baseline-align the icon size labels
https://bugzilla.gnome.org/show_bug.cgi?id=758790
2015-12-04 21:09:20 -05:00
Emmanuele Bassi 55f9dd9907 scalebutton: Annotate the return type
Instead of just listing the return type of get_plus_button() and
get_minus_button() in the documentation, we can use the (type)
annotation to ensure that the introspection data reflects the actual
type of the returned widget.
2015-12-04 21:09:20 -05:00
Timm Bäder c8c2e4e110 GtkScaleButton: _get_(plus|minus)_button returns a GtkButton
https://bugzilla.gnome.org/show_bug.cgi?id=539944
2015-12-04 21:09:20 -05:00
Руслан Ижбулатов 448e72d9ff GDK W32: Add a comment for clarity
This is a copy of a similar comment in another place, which explains
why WS_EX_TRANSPARENT windows get a special treatment.

https://bugzilla.gnome.org/show_bug.cgi?id=758484
2015-12-04 21:09:20 -05:00
Руслан Ижбулатов 19c39742c7 GDK W32: Clarify the use of the second argument to SetWindowPos()
https://bugzilla.gnome.org/show_bug.cgi?id=758484
2015-12-04 21:09:20 -05:00
Руслан Ижбулатов 0b5d6138c7 GDK W32: Don't use SetWindowLong() to set/unset WS_EX_TOPMOST
While searching for the cause of bug 746745 it was discovered that one could
not set WS_EX_TOPMOST extended window style with SetWindowLong(),
but must use SetWindowPos() for that purpose.

This was never a problem most likely because it is highly unlikely for windows
to acquire/lose WS_EX_TOPMOST after they are created, by means other
than SetWindowPos() (which GTK does use to raise/lower windows and
set/remove keep_above), and because trying to set/unset WS_EX_TOPMOST with
SetWindowLong() results in WS_EX_TOPMOST merely not being set/unset (that is,
other styles are still set/unset within the same call and no error is
signalled).

https://bugzilla.gnome.org/show_bug.cgi?id=758483
2015-12-04 21:09:20 -05:00
Matthias Clasen 74228e0ead places view: Fix up docs 2015-12-04 21:09:20 -05:00
Matthias Clasen cad27e76dd Tweak the gtk-font-name setting docs
Clarify that only parts of the font name are used.

https://bugzilla.gnome.org/show_bug.cgi?id=758367
2015-12-04 21:09:20 -05:00
Руслан Ижбулатов e981730fc0 GDK W32: Only restack windows with matching always-on-top status
This prevents normal application windows (and other kinds of windows)
from being moved up in Z-order to be above windows that have the
always-on-top bit set. Doing so would make the previously-normal windows
in question also always-on-top implicitly.
Windows that are already always-on-top will be restacked on top of other
always-on-top windows too.

https://bugzilla.gnome.org/show_bug.cgi?id=746745
2015-12-04 21:09:20 -05:00
Руслан Ижбулатов 3c0d60702e GDK W32: Refactor restacking functions a bit 2015-12-04 21:09:20 -05:00
Jonas Ådahl db3c824c5c wayland: Set a null cursor surface when cursor buffer is null
If the buffer of a cursor is NULL, for example if its an empty cursor,
just set the cursor surface to NULL as well. Not doing this we'll use
uninitialized hotspot coordinates, dimensions and scales.

https://bugzilla.gnome.org/show_bug.cgi?id=758025
2015-12-04 21:09:20 -05:00
Matthias Clasen 14119f985d Work around g_test_dbus annoyance
Without iterating a mainloop for a bit, g_test_dbus_down() will
give us an error.
2015-12-04 21:09:20 -05:00
Phillip Wood 863abe697e Fix character entities
These are not supposed to be supported by gtk-doc¹

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

https://bugzilla.gnome.org/show_bug.cgi?id=758175
2015-12-04 21:09:20 -05:00
Emmanuele Bassi 53e734f2b3 Do not use the GPL v3 blurb for LGPL v2.1 files
GTK+ is licensed under the terms of the GNU LGPL v2.1+.
2015-12-04 21:09:20 -05:00
Emmanuele Bassi c8153e7f83 Do not use the LGPL v3 blurb for LGPL v2.1 files
GTK+ is released under the terms of the GNU LGPL v2.1+.
2015-12-04 21:09:20 -05:00
Emmanuele Bassi 43f8719a53 Fix the license version in GtkTrashMonitor
There is no GNU Lesser General Public License version 2; it's either GNU
Library General Public License version 2, or GNU Lesser General Public
License version 2.1.
2015-12-04 21:09:20 -05:00
Emmanuele Bassi 10729e4589 Fix license version for GtkFileChooserWidget private header
Since it's using Lesser GPL, use version 2.1; there is no Lesser GPL v2,
as it was called 'Library GPL' prior to v2.1.
2015-12-04 21:09:20 -05:00
Emmanuele Bassi 9cdb0bb8b1 Fix the licensing blurb of GtkBookmarksManager
Copy-pasta from GPL instead of LGPL.

Also, there is no GNU Lesser General Public License version 2; either
it's the GNU Library General Public License version 2, or it's the GNU
Lesser General Public License version 2.1.
2015-12-04 21:09:20 -05:00
Emmanuele Bassi d368b396d4 Fix the licensing blurb in GtkPlacesSidebar
The code is released under the terms of the LGPL v2.1+, as is the rest
of the GTK+ code.
2015-12-04 21:09:20 -05:00
Matthias Clasen 438f2f1ba5 Fix license header
I didn't meant to make this different from any other file
in GTK+ when I added it.
2015-12-04 21:09:20 -05:00
Matthias Clasen f8b24884b5 Document GDK_TOUCHPAD_GESTURE_MASK 2015-12-04 21:09:20 -05:00
Matthias Clasen 049eb3f769 popover: Avoid a crash when no relative-to widget is set
This was showing up in glade, which creates freestanding
popovers.
2015-12-04 21:09:20 -05:00
Rui Matos 8de0d15d8a wayland: Translate virtual modifiers too
Wayland allows us to receive virtual modifiers too so we can just use
them directly if the compositor does send them.

https://bugzilla.gnome.org/show_bug.cgi?id=748904
2015-12-04 21:09:20 -05:00
Carlos Garnacho a0c2ae4709 wayland: Invert drop_finished/button release call order
If we "release" the button first, the drag will be eventually cancelled,
we must first signal GDK_DROP_FINISHED, and then release the button so
the success status prevails.
2015-12-03 12:37:27 +01:00
Carlos Garnacho c52c4f94d5 wayland: Store requested target on GdkWaylandSelection
It doesn't make a lot of sense to have this stored as data offer data,
rather together with the source_targets array, which is what we're
poking here in the end.

https://bugzilla.gnome.org/show_bug.cgi?id=758713
2015-12-03 12:37:27 +01:00
Carlos Garnacho 9db511f677 wayland: Refactor selection ownership
Dissociate ownership from our maintenance of wl_data_source objects.
The only place where ownership must be updated together is
data_source.cancelled, for the other places GDK should take care of
setting up the right ownership, even if at a different order than
we'd expect here.

This fixes GTK+ apps on wayland being locally confused about the
current selection ownership. Because gtk_selection_add_targets()
results in a wl_data_source being created, and ownership being
updated right away, early callers of this will change the ownership
even if the widget it's being called on didn't explicitly request
the selection ownership yet.

https://bugzilla.gnome.org/show_bug.cgi?id=758660
2015-11-30 20:39:07 +01:00
Piotr Drąg 21b0a3c8fe Updated Polish translation 2015-11-27 23:30:07 +01:00
Carlos Garnacho 8662985ebb GtkWindow: Reset gestures after triggering right click titlebar action
Just like it happens for window dragging, we're likely to not see the
matching button release for this event, so we must reset the controller
manually here.

https://bugzilla.gnome.org/show_bug.cgi?id=758661
2015-11-25 22:01:27 +01:00
Carlos Garnacho 48fa89f979 wayland: Do not store the grab cursor separately
After the grab is finished, we would expect an enter event, and
GDK updating internally the cursor for that window and device.
This means there is no need at all to store it separately in the
backend.

As a side effect, animated cursors are now also possible on grab
icons.

https://bugzilla.gnome.org/show_bug.cgi?id=735847
2015-11-25 15:28:18 +01:00
Carlos Garnacho f3e1c088a7 device: Fix dispose
The way master devices detach from their other master counterpart is
vulnerable to infinite recursion due to the way we first recurse on
the other device before clearing the pointer, this may happen if
that last reference to the other master device is held by the
device->associated field.

https://bugzilla.gnome.org/show_bug.cgi?id=732742
2015-11-25 15:28:18 +01:00
Carlos Garnacho 0adf040152 wayland: Plug surface leak
Other backends take care of the cairo surface destruction in
GdkWindow::destroy. We must do the same here, or the cairo_surface
and its corresponding wl_buffer are left dangling.

https://bugzilla.gnome.org/show_bug.cgi?id=747295
2015-11-25 15:28:18 +01:00
Carlos Garnacho 41bed12fe0 searchenginetracker: Remove astray ");" closing a function
Sad face for me.
2015-11-23 18:21:29 +01:00
Carlos Garnacho 3f1e8c6883 searchenginetracker: Optimize direct/recursive folder lookups
tracker:uri-is-descendant/parent has the unfortunate side effect of
rendering the collation mechanisms in the database useless, so those
require full table scans to be validated.

Performing these as pure string comparisons will perform much better,
as those allow the underlying sqlite to rely on its own collation
to perform the search, which can be significantly faster with many
elements in the database.

https://bugzilla.gnome.org/show_bug.cgi?id=758407
2015-11-23 18:01:45 +01:00
Carlos Garnacho dec6e119af searchenginetracker: ensure nie:url is bound
This could produce strange warnings as it is currently passed to
tracker:uri-is-* sparql functions, as these expect no NULLs.

https://bugzilla.gnome.org/show_bug.cgi?id=758407
2015-11-23 18:01:45 +01:00
Benjamin Otte ba6934366d cssstyle: Don't crash if properties are added at runtime
Just return the default value for those properties.

Testcase included.

https://bugzilla.redhat.com/show_bug.cgi?id=1281234
2015-11-20 21:10:59 +01:00
Matthias Clasen 1e30fe1c3b wayland: Avoid a crash
We can end up in situations where NULL gets passed to
get_transient_parent(). Embrace it instead of avoiding it.

https://bugzilla.gnome.org/show_bug.cgi?id=758327
2015-11-20 16:16:00 +01:00
Christian Hergert bd3ea23655 entry: ensure valid GdkWindow before set_invisible_cursor()
If the window has not yet been created, then we can't set the invisible
cursor yet. This can happen in situations where the widget is in a
revealer with type-to-search functionality.
2015-11-18 15:16:15 -08:00
Carlos Garnacho 386303ec66 wayland: Move additional pointer buttons after the old 4-7 scrolling ones
We were using that range for the extra buttons after left/right/middle,
while this is harmless for clients not handling extra buttons (we
used to translate those button events into scroll events in x11 anyway)
this will be unexpected for clients that do handle additional mouse
buttons themselves (eg. back/forward buttons present in some mice).

In order to remain compatible with X11, those need to be assigned from
button 8 onwards.

Also, include input.h, and stop using magic numbers here.

https://bugzilla.gnome.org/show_bug.cgi?id=758072
2015-11-17 22:44:36 +01:00
Carlos Garnacho 1d3f93f277 x11: Add "pointer" to the is-not-a-touchscreen device name checks
Commit 1266d15c4 also broke Xwayland, as it does the same trick
than VMWare pointers. Let's extend the heuristic to check for "pointer"
in the device name, what can possibly go wrong...

https://bugzilla.gnome.org/show_bug.cgi?id=757358
2015-11-17 16:31:10 +01:00
Carlos Garnacho ed692f9a0b x11: Do not misdetect mice with abs axes as touchscreens
VMWare seems to create mouse devices with abs axes which confuses
our detection of single-touch touchscreens. Those have though a
name we can match on ("VirtualPS/2 VMware VMMouse"), it should
be pretty safe to assume that no real touchscreens have "mouse"
in their name...

https://bugzilla.gnome.org/show_bug.cgi?id=757358
2015-11-17 16:31:10 +01:00
Matthias Clasen a1a0ead018 x11: Try harder to find a core pointer
We currently just look for a master device with input source MOUSE.
After recent changes to the way input devices are classified, xwayland
on my system comes up with a virtual core pointer that has input
source TOUCHSCREEN. This was causing assertion failures. Be a little
more careful and accept a touchscreen as core pointer, if there is
no mouse.
2015-11-17 07:02:18 -05:00
Matthias Clasen b71d2864c8 3.18.5 2015-11-16 15:22:36 -05:00
Benjamin Otte f16292ea02 cssprovider: Only push a new scanner when none exists
For @import, we want to emit the error as part of the @import statement,
not as part of the new file.
2015-11-16 19:36:21 +01:00
Paolo Borelli 80a362c3c3 filechooser: ignore double clicks on the selected item
Since we are now interpreting button press events and
make our own double-click determination, we should not
handle double-click events that are generated by GDK.

https://bugzilla.gnome.org/show_bug.cgi?id=757950
2015-11-16 11:46:41 -05:00
Benjamin Otte edff6fa652 cssprovider: Have a section on import error
When loading a nonexisting CSS file using
gtk_css_provider_load_from_file() or gtk_css_provider_load_from_path()
we would emit the error using a NULL scanner. Don't do that, because
we'll have a NULL section in that case and error handlers don't like
that.

Testcase attached.

https://bugzilla.redhat.com/show_bug.cgi?id=1277959
2015-11-16 17:40:59 +01:00
Benjamin Otte 0099b0820d cssprovider: Have a section when parsing style properties
Signal handlers expect a section to be present, so provide them with
one.

New testcase included.

https://bugzilla.gnome.org/show_bug.cgi?id=757240
2015-11-16 17:40:59 +01:00
Carlos Soriano 15cf978d5a gtkplacessidebar: improve heuristics for external drives
Since the change to use GtkPlacesView we don't want to show
internal storage on the sidebar.

In our case we were checking for drive_can_eject and
drive_is_media_removable.

However for some external hard drives it's reported that they
are not ejectable nor the have removable media. So the only
attribute that they have different from internal drives is that
they can be stopped.
So check for if the drive can be stopped to decide if it is
external or internal.

On the way realized we don't need to check for the mounts associated
with the volume to know if the volume can be ejected or not. So remove
that code.

https://bugzilla.gnome.org/show_bug.cgi?id=756589
2015-11-16 11:05:23 +01:00
YunQiang Su 2d1a793d57 Us ... instead of … for zh_CN 2015-11-14 21:59:24 +08:00
Ignacio Casal Quinteiro 7be06688ff win32: do not use g_clear_pointer to destroy the window
DestroyWindow expects a different calling convenction so
we endup getting an error at runtime
2015-11-13 12:54:54 +01:00
Matthias Clasen 9a7c95234c 3.18.4 2015-11-12 12:52:48 -05:00
Colomban Wendling 91a91b69b9 cssnode: Fix style updating when the CSS node ID changes
Since 4ebb5781ea ID has a specific value,
while it used to be the same as NAME.  Thus, explicitly list ID as a
radical change just like NAME.

https://bugzilla.gnome.org/show_bug.cgi?id=757397
2015-11-12 12:52:16 -05:00
Sébastien Wilmet 511bd4fee7 Revert "inspector: remove gtk_text_buffer_get_iter_at_line_index() workaround"
This reverts commit 1536710dba.

Because of the revert at
commit 0dc66f5125.
2015-11-12 17:23:16 +01:00
Matthias Clasen 0dc66f5125 Revert "textbuffer: nicer get_iter functions"
This reverts commit cf51c4f6db.

This change broke binding api.
2015-11-12 10:36:26 -05:00
Mingye Wang (Arthur2e5) a875a84846 update zh_CN translation 2015-11-12 23:17:28 +08:00
Ignacio Casal Quinteiro e0f951a76a win32: chain up on display dispose 2015-11-12 16:01:39 +01:00
Matthias Clasen 3c331ba78d 3.18.3 2015-11-09 11:12:58 -05:00
Alexander Larsson 040a209031 gdk: Fix invalidation w/ pixel cache when changing child window geometry.
When moving/scrolling a child window we can't use the current clip
region to limit what is invalidated, because there may be a pixel
cache that listens for changes outside the clip region. Instead
invalidate the entire area and rely on the invalidation code to limit
the repaint to the actually visible area.
2015-11-09 11:12:58 -05:00
Benjamin Otte 2e09bddb41 placesview: Don't export API
This is a private object, don't export its symbols.

https://bugzilla.gnome.org/show_bug.cgi?id=756978
2015-11-09 10:29:27 -05:00
Matthias Clasen 9883f592b0 Avoid excessive property notification for GtkStack::interpolate-size
make check checks this for writable properties, and fails now that
we've made this property writable.
2015-11-09 09:28:21 -05:00
Alexander Larsson e33f4b1fef TreeModelFilter: Fix uninitialized memory read.
We were copying an iterator that sometimes was not initialized,
which caused debugger warnings in VS2015.
2015-11-09 08:49:22 -05:00
Emmanuele Bassi ebf4ac8a5b docs: Point at for_scale() variants
Using lookup_icon() and lookup_by_gicon() with a size multiplied by a
scaling factor is almost certainly going to get worse results than using
their for_scale() variants.
2015-11-09 08:48:42 -05:00
Emmanuele Bassi ac823cf070 docs: Clarify gtk_render_icon()'s behaviour
A GdkPixbuf has no scaling factor, so drawing directly from it can only
using a scale of 1, to avoid blurry, fuzzy icons.

You should be using gtk_render_icon_surface() anyway.
2015-11-09 08:48:36 -05:00
Emmanuele Bassi afb6265530 docs: Fix typo in gdk_screen_get_scale_factor() 2015-11-09 08:48:30 -05:00
Christian Hergert d1dda37f8c stack: GtkStack:interpolate-size should be read/write
It looks like the param spec for interpolate-size was
copied from the line above it, which is a read only property.

There is a setter for interpolate-size, and it is implemented in
set_property().
2015-11-09 08:48:10 -05:00
Christian Hergert 80ae3fe6f2 headerbar: remove G_PARAM_CONSTRUCT from custom-title
This fixes the ability to sublcass GtkHeaderBar from a UI template which
contains a custom <child type="title"> element.

https://bugzilla.gnome.org/show_bug.cgi?id=757544
2015-11-09 08:47:54 -05:00
Carlos Garnacho 0358fd0b33 GdkDevice: Do not free construct-only properties data on dispose()
Those are not references to other objects, and the device will be mostly
useless if those can't be set again anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=756625
2015-11-09 08:47:30 -05:00
Carlos Garnacho 1266d15c4b x11: Detect single-touch touchscreens as GDK_SOURCE_TOUCHSCREEN
Those won't have ABS_MT_* axes, so won't be reported has having
XITouchClassInfo. Fallback on these to checking whether abs x/y axes are
available. After the Wacom checks, any remaining device with absolute axes
should be touchscreens, and GDK_SOURCE_MOUSE does indeed just make sense on
devices with relative axes.

https://bugzilla.gnome.org/show_bug.cgi?id=757358
2015-11-09 08:46:48 -05:00
Dhiru Kholia 9062a835a0 Fix a memory leak in gtk-3.0.m4 file
This fix is inspired by,

https://git.gnome.org/browse/glib/tree/m4macros/glib-2.0.m4

https://bugzilla.gnome.org/show_bug.cgi?id=757221
2015-11-09 08:46:39 -05:00
Benjamin Otte 94476c3c86 gdkrgba: Use %g instead of %.17g to print alpha
This way 0.3 isn't printed as 0.29999999999999
2015-11-09 08:45:31 -05:00
Matthias Clasen d38c29f48b Load settings.ini from all data dirs
An error in the loading function was making us load the file from
the first data dir repeatedly, instead.

https://bugzilla.gnome.org/show_bug.cgi?id=757377
2015-11-09 08:44:28 -05:00
Matthias Clasen c9b69f7c39 tool item group: Don't leak a button
This causes a hickup in the new css node machinery, causing
the default-value test to fail.
2015-11-09 08:42:00 -05:00
Matthias Clasen 08db197af2 icon theme: Ensure to propagate an error
If the svg pixbuf loader is not available, we end up with criticals
from gtk_css_image_icon_theme_draw because gtk_icon_info_load_symbolic
returns NULL without setting an error.

Avoid this by propagating the load error.
2015-11-09 08:41:30 -05:00
Lars Uebernickel bfdff24b10 gdkpixbuf-drawable: reinstate accidentally removed line 2015-11-09 08:41:18 -05:00
Lars Uebernickel 088d3449ca gdk_pixbuf_get_from_window: honor device scale
gdk_pixbuf_get_from_window() paints the given window onto a new cairo
surface. Create that new surface with the same device scale as the
window so that the result is not scaled down on hidpi screens.

https://bugzilla.gnome.org/show_bug.cgi?id=757147
2015-11-09 08:41:11 -05:00
Jonas Ådahl a4448b7578 wayland: Don't use GTK symbols from GDK
GTK_WINDOW_POPUP sets the GdkWindow type to GDK_WINDOW_TEMP, so use
that in GDK, not the GTK symbol which doesn't exist there.
2015-11-09 08:40:47 -05:00
Jonas Ådahl 8c8ed3e778 GtkTreeView: Rework the search window hack so it also works on Wayland
The search window of a tree view was implemented by showing without
making it visible by by positioning it outside the screen edge. This is
not possible on Wayland, so implement another method for being able to
enter text into a non-visible entry.

The new method is implemented by, before showing the window, pass the
key event directly to the IM context backing the entry. If the key
event triggered the context to commit new text or change the preedit
content, the search window is shown, and from that point the key events
are forwarded directly to the entry widget.

https://bugzilla.gnome.org/show_bug.cgi?id=756780
2015-11-09 08:40:39 -05:00
Jonas Ådahl 1b58cd10a9 wayland: Map UTILITY hinted popup windows as subsurfaces
Currently used by GtkTreeView to map windows without changing focus. We
can't map this as a popup, because popup implies focus change.

https://bugzilla.gnome.org/show_bug.cgi?id=756780
2015-11-09 08:40:34 -05:00
Jonas Ådahl 3a53352afe GtkTreeView: Make a search window destroy helper
https://bugzilla.gnome.org/show_bug.cgi?id=756780
2015-11-09 08:40:25 -05:00
Jonas Ådahl ea449a032a wayland: Don't try to use subsurfaces as popup parents
If a GtkMenu (or something else that is mapped as a xdg_popup) tries to
use a subsurface window as a parent, it will be terminated by the
compositor due to protocol violation. So to avoid this, if a parent
window is not a xdg_popup or xdg_surface, i.e. a wl_subsurface, then
traverse up the transient parents until we find the right popup parent.

https://bugzilla.gnome.org/show_bug.cgi?id=756780
2015-11-09 08:40:20 -05:00
Jonas Ådahl a78f4d5444 wayland: Make window type conditions switches
In order to make it easier to add/remove in future commits.

https://bugzilla.gnome.org/show_bug.cgi?id=756780
2015-11-09 08:40:13 -05:00
Jonas Ådahl b31132971d GtkTreeView: Use more consistent search window naming
Instead of alternating between search dialog and search window, use
search window everywhere.

https://bugzilla.gnome.org/show_bug.cgi?id=756780
2015-11-09 08:40:06 -05:00
Matthias Clasen bfedc3bafe 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-11-09 08:38:45 -05:00
Matthias Clasen d49c1cdcf4 win32: Fix introspection syntax 2015-11-09 08:38:17 -05:00
Matthias Clasen 90dd285c22 builder: Avoid some unnecessary overhead
Only get the class once per object, not once per property.
And don't canonicalize the property name, g_object_class_find_property
does that already.
2015-11-09 08:37:20 -05:00
Paolo Borelli 276e9be383 widget: fix typo in warning message 2015-11-09 08:37:04 -05:00
Jonas Ådahl e135358ed0 wayland: Map windows with tooltip hint as subsurfaces
Tooltips tend to be placed on top of a parent surface with a given
relative coordinate, and without any input focus. So lets map them as
subsurfaces.

https://bugzilla.gnome.org/show_bug.cgi?id=756496
2015-11-09 08:36:55 -05:00
Jonas Ådahl 1d464fca3c wayland: Clean up code determining how to map a window
Restructure the mapping procedure so that its known up front what the
expected way mapping is to be done (subsurface, popup or stand alone),
and warn if it fails to actually map in such a way (for example a popup
without a parent or device grab, a tooltip without a parent).

https://bugzilla.gnome.org/show_bug.cgi?id=756496
2015-11-09 08:36:49 -05:00
Timm Bäder 633b08cc8a GtkPaned: Fix gtk_paned_set_child_visible calls
Use CHILD1/CHILD2 instead of 0 and 1, always use the same order and
don't check for child NULL-ness, because it will be done in
gtk_paned_set_child_visible anyways.
2015-11-09 08:36:10 -05:00
Sébastien Wilmet 1536710dba inspector: remove gtk_text_buffer_get_iter_at_line_index() workaround
The function is now safe to use.

https://bugzilla.gnome.org/show_bug.cgi?id=735341
2015-11-09 08:35:49 -05:00
Sébastien Wilmet cf51c4f6db textbuffer: nicer get_iter functions
Avoid crashes when passing an invalid location to a
gtk_text_buffer_get_iter_at_*() function.

A boolean is returned to know if @iter has been set to the exact
location.

Unit tests are added.

https://bugzilla.gnome.org/show_bug.cgi?id=735341
2015-11-09 08:35:37 -05:00
Matthias Clasen 2a95ab1828 Improve text a11y test
Test appending text as well as replacing the entire text.
Insert non-ASCII text to verify offsets are correct.
2015-11-09 08:35:06 -05:00
Matthias Clasen 13f680d11a file chooser: Avoid search interruption
When the search entry is shown, the 'special' nature of
., ~ and / should not trigger the location entry, because
that interrupts the search and is likely not what the
user intended.

https://bugzilla.gnome.org/show_bug.cgi?id=756505
2015-11-09 08:34:54 -05:00
Matthias Clasen b94ef83239 Assistant: Fix page rmoval
We have to remove the page itself from the intermediate box
first, before removing the box from the notebook. Otherwise,
reffing the page to keep it alive is ineffective: the box
gets destroyed, and that destruction recurses over the page.

This fixes the problem in
https://bugzilla.gnome.org/show_bug.cgi?id=756385
2015-11-06 08:28:57 -05:00
Cosimo Cecchi 4b7611bd93 menushell: don't call gtk_render_background()
GtkMenu and GtkMenuBar, the two implementations of GtkMenuShell in GTK,
already draw it.
Furthermore, rendering a background here will overdraw any rendering
that the subclass will do, such as arrows for scrolling menus.
2015-11-02 16:08:48 -08:00
Matthias Clasen 879630b832 entry completion: Only grab the device if we have one
When the entry completion is popped up from a timeout, we may
not have a device. In that case, don't call gdk_device_grab,
do avoid criticals.
2015-11-02 17:58:01 -05:00
John Ralls 4cdec89bc4 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.

(cherry picked from commit 571704824f)
2015-11-01 17:24:10 -08:00
Paolo Borelli 05a46f629d win32: handle WM_DISPLAYCHANGE globally
Instead of handling WM_DISPLAYCHANGE on every GdkWindow, only handle
it on an ad-hoc hidden window we create when opening the display.
This has two reasons:
1) we want emit the display::size-changed signal even if there are no
   gtk windows currently open
2) we want to emit the signal just once and not once for every window

https://bugzilla.gnome.org/show_bug.cgi?id=757324
2015-10-31 19:38:03 +01:00
Georges Basile Stavracas Neto 9a0d236609 placesview: vertically align path labels
The current situation is somewhat sad, with the path
label totally misaligned throughout the rows.

This is fixed by using a size group for the path labels,
so they all have the same allocated size (with the max
of 15 chars). Also, instead of hiding the eject button,
set it child-invisible, so it is hidden and yet it's size
is allocated by GtkBox.

https://bugzilla.gnome.org/show_bug.cgi?id=757303
2015-10-30 11:39:22 -02:00
Dominique Leuenberger dae857a94d placessidebar: do not crash if uris is NULL
On Drag'n'Drop actions across system boundaries (VM host to guest), the
happen to be null.

https://bugzilla.gnome.org/show_bug.cgi?id=757298
2015-10-29 17:34:45 +01:00
Lars Uebernickel 680295587c gdkpixbuf-drawable: reinstate accidentally removed line 2015-10-27 13:43:07 +01:00
Lars Uebernickel a950b5357a gdk_pixbuf_get_from_window: honor device scale
gdk_pixbuf_get_from_window() paints the given window onto a new cairo
surface. Create that new surface with the same device scale as the
window so that the result is not scaled down on hidpi screens.

https://bugzilla.gnome.org/show_bug.cgi?id=757147
2015-10-27 09:44:01 +01:00
Marek Černocký d8597e3177 Added branch name 2015-10-27 07:37:14 +01:00
Marek Černocký 06c7079758 Updated Czech translation 2015-10-27 07:21:23 +01:00
Marek Černocký 0a3f686cef Updated Czech translation 2015-10-26 07:55:33 +01:00
Chun-wei Fan fb8c947091 MSVC builds: Ensure /LTCG when necessary
gtk3-demo, gtk3-demo-application and gtk3-icon-factory are built using
/opt:noref as they use GResources without --manual-register, meaning that
flag is used to avoid the linker from optimizing out the GResource items
for release builds.

Visual Studio 2015 changed its default link-time code generation setting
to /LTCG:incremental, which would cause problems as it will cause the
linker to optimize out the GResource items from the compiled code, so fix
this by enforcing /LTCG for these three items.
2015-10-23 10:21:25 +08:00
Owen W. Taylor 390c1119ed testgtk/Alpha Window: fix the drawn area when we are drawing decorations
A GtkWindow's allocation includes the titlebar, borders, and shadows; we
only want to draw our custom alpha content over the child allocation of
the GtkWindow.

https://bugzilla.gnome.org/show_bug.cgi?id=756886
2015-10-22 11:07:06 -04:00
Owen W. Taylor e29b911396 GtkWindow: draw the frame and shadow even for app-paintable windows
If a window is decorated, we need to draw the frame and shadow, even if
it is app-paintable - it's just nonsense to have a frame that we handle
events on, but expect the app to paint it. (We paint the titlebar in
any case.) If a client wants to handle all painting, it should use an
undecorated window.

https://bugzilla.gnome.org/show_bug.cgi?id=756886
2015-10-22 11:06:27 -04:00
Owen W. Taylor 132b776e1f Guard against selection requestor disappearing
We made a number of unchecked accesses to the selection requestor,
which could cause X errors if the selection requestor vanished
(or we were sent invalid events). Add error traps around all of them.

See https://bugzilla.redhat.com/show_bug.cgi?id=1210814 for an
example of a crash that could be caused by this. (There are about
1000 instances of such a crash in http://retrace.fedoraproject.org
though no linked bug reports specifically talk about cut-and-paste
or DND.)

https://bugzilla.gnome.org/show_bug.cgi?id=756881
2015-10-22 11:06:19 -04:00
Sveinn í Felli 7f42eee250 Updated Icelandic translation 2015-10-20 13:58:38 +00:00
Inaki Larranaga Murgoitio 57e592629b Updated Basque language 2015-10-20 10:47:00 +02:00
Inaki Larranaga Murgoitio d23fccd4a2 Updated Basque language 2015-10-20 10:45:39 +02:00
Inaki Larranaga Murgoitio 6b6fbc73de Updated Basque language 2015-10-20 10:39:47 +02:00
Matthias Clasen 3c54eb4c6e Clean up handling of _gdk_win32_grab_cursor
This is a variable holding a ref to an object, so it is
a great case to use g_set_object and g_clear_object.

 # Please enter the commit message for your changes. Lines starting
2015-10-19 15:57:41 +02:00
Руслан Ижбулатов 1f2069c55c W32: Add missing reference taking in gdk_device_virtual_grab()
https://bugzilla.gnome.org/show_bug.cgi?id=756160
2015-10-19 15:57:41 +02:00
Kjartan Maraas 1435d8c148 Updated Norwegian bokmål translation. 2015-10-17 12:33:07 +02:00
Kjartan Maraas bb40d64cb4 Updated Norwegian bokmål translation. 2015-10-17 12:32:18 +02:00
Dušan Kazik 929c5ae2f3 Updated Slovak translation 2015-10-16 06:21:05 +00:00
Dušan Kazik db4837c607 Updated Slovak translation 2015-10-16 06:18:01 +00:00
Matthias Clasen 4c675d08a8 scrolled window: Protect against nameless devices
It seems that gdk_device_get_name() can return NULL.
We should not crash if that happens.

https://bugzilla.gnome.org/show_bug.cgi?id=756625
2015-10-15 16:11:00 -04:00
Carlos Garnacho c1ae56dfa8 texthandle: Ensure handles are invalidated on mode changes
Otherwise the "cursor" handle stays with "cursor" appearance instead of
"selection end" when a text selection is started.
2015-10-15 16:10:45 -04:00
Carlos Garnacho e67abe8758 texthandle: small refactor
These long enums are used too often, shorten things a bit with temp vars.
2015-10-15 16:10:40 -04:00
Carlos Garnacho ddeab4dfda texthandle: Fix Y positioning of text handles
It is assumed that border.top is the same than pointing_to.height (which
equals the strong cursor position), which is not since some time ago.

The border calculation has been move on top too, it is now used in the
Y position one, and doesn't depend on anything we calculate later.
2015-10-15 16:10:32 -04:00
Carlos Garnacho c5631dfc9c texthandle: Fix handle dragging on wayland
Text handles are subsurfaces on wayland, so sort of their own toplevel.
This made gtk_widget_translate_coordinates() to bail out there, resulting
in text handles being mispositioned and jumpy. To fix this, translate to
toplevel GtkWindow coordinates manually, and translate coordinates from
there.

Along the way, the coordinates reported in ::handle-dragged have been
fixed so there is no small jumps in either axis (most noticeable in the
X axis when you started dragging, and in the Y axis when moving between
lines of different heights.
2015-10-15 16:10:25 -04:00
Jonas Ådahl 396215615b GtkWindow: Enlarge the type hint private field
Make it what it is - the enum - so that that it is sure that the hint
will fit in the field. Without this, any hint that doesn't fit in 3
bits will be truncated to the 3 least significant bits, causing
unexpected behaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=756496
2015-10-15 16:10:01 -04:00
Carlos Soriano 577fb25b00 gtkplacesview: align spinner with header label
Use the box margin top instead of the label margin top,
so the spinner remains aligned with the header label.

https://bugzilla.gnome.org/show_bug.cgi?id=756568
2015-10-15 20:02:05 +02:00
Carlos Soriano 3f7095c36e gtkplacesview: plug leak
https://bugzilla.gnome.org/show_bug.cgi?id=756568
2015-10-15 20:02:05 +02:00
Carlos Soriano 50737f4e6b gtkplacesview: remove hover color from rows
Since other views are not using hover neither

https://bugzilla.gnome.org/show_bug.cgi?id=756568
2015-10-15 20:02:05 +02:00
Carlos Soriano 343fafbc30 gtkplacesview: add a clear button to address entry
So it allows a quick way to clear the entry.

https://bugzilla.gnome.org/show_bug.cgi?id=756568
2015-10-15 20:02:04 +02:00
Carlos Soriano 8bb36ed031 gtkplacesview: rotate server list icon on toggled
Disclosure triangles are usually used pointing down, however
in this case the popover spawns in the upper direction, which
makes it odd looking.
Instead of pointing always down or up, point down when not toggled and
animate a rotation when toggled.

https://bugzilla.gnome.org/show_bug.cgi?id=756568
2015-10-15 20:02:04 +02:00
Carlos Soriano 0b773e6704 gtkplacesview: tweak ui to allow more server rows
Following design guidance, reduce row height and increase
popover height so the user is allowed to see more than 3
rows.

https://bugzilla.gnome.org/show_bug.cgi?id=756568
2015-10-15 20:02:04 +02:00
Carlos Soriano e1afa087af gtkplacesview: improve heuristics for external drives
Following the sidebar on commit b0989b190df, improve the way
we check when a drive is external or not.

https://bugzilla.gnome.org/show_bug.cgi?id=756589
2015-10-15 20:02:04 +02:00
Carlos Soriano 4c833b21c8 gtkplacesview: remove dead code
This is checked on add_volume inside the loop.

https://bugzilla.gnome.org/show_bug.cgi?id=756589
2015-10-15 20:02:04 +02:00
Carlos Soriano df687b5930 gtkplacesview: remove dead code
This is checked on is_removable_volume

https://bugzilla.gnome.org/show_bug.cgi?id=756589
2015-10-15 20:02:04 +02:00
Ross Lagerwall 40f5a35a69 gtkplacessidebar: Show drives with removable media
Some drives have removable media that is not ejectable (e.g. a laptop's
SD card reader). Show volumes on these drives in the sidebar.

https://bugzilla.gnome.org/show_bug.cgi?id=755654
2015-10-14 17:42:52 +01:00
Marek Černocký 9356cb8ea1 Updated Czech translation 2015-10-13 12:02:29 +02:00
Carlos Garnacho c344d6dc17 textview: Ensure magnifier popover points within widget area
Otherwise the popopver will be automatically unmapped in
_gtk_popover_update_child_visible() when the X axis (coming more
or less directly from events) goes outside the textview.
2015-10-13 02:14:24 +02:00
Carlos Garnacho 0a97d05258 popover: Invalidate borders on tail position changes
There's nothing doing this explicitly, so tail position changes may
leave trails of older positions.

https://bugzilla.gnome.org/show_bug.cgi?id=756449
2015-10-13 02:14:24 +02:00
Carlos Garnacho 17ea79f33a wayland: Set a more believable crossing detail on pointer enter/leave
GDK_NOTIFY_ANCESTOR would happen when the pointer crosses across a direct
parent/child. However nonlinear events are more likely, specially when
the pointer moves across toplevels (either different apps, or menus being
popped up over the pointer position).

This makes popping up comboboxes and other menus that fall over the pointer
position possible. With the previous detail the GtkMenu code misinterpreted
the crossing event, making it think the button release coming right after
should dismiss the popup, which made menus just flash on the screen unless
you kept the button pressed.
2015-10-13 02:14:24 +02:00
Matthias Clasen 1ed442180d 3.18.2 2015-10-12 13:42:40 -04:00
Benjamin Otte 8342724022 stylecontext: Make sure style is valid when looking up style properties
Otherwise, the validation may happen vey automatically some time during
the style property and that will most likely cause a crash.

https://bugzilla.gnome.org/show_bug.cgi?id=756338
2015-10-12 13:26:24 -04:00
Felipe Borges 78a59caed9 gtkprintoperation: job names must not exceed 255 chars
According to http://datatracker.ietf.org/doc/rfc2911/, The 'name'
attribute syntax is essentially the same as 'text', including the
REQUIRED support of UTF-8 except that the sequence of characters
is limited so that its encoded form MUST NOT exceed 255 (MAX) octets.

CUPS will not print jobs with names exceeding 255 characters.

https://bugzilla.gnome.org/show_bug.cgi?id=755988
2015-10-12 13:26:06 -04:00
Matthias Clasen 5d70f4bd44 color chooser: Render icons sharp at scale 2
We need to load the icons at the right scale, and render them
to a surface with the right scale too.

https://bugzilla.gnome.org/show_bug.cgi?id=756195
2015-10-12 13:25:22 -04:00
Carlos Soriano c1b1e41ddb gtkfilesystem: protect against null filesystem type
The filesystem:type attribute could be NULL, then g_strv_contains
will crash if that happens.
Just don't call it if the attribute is not set.
2015-10-12 13:25:07 -04:00
Sébastien Wilmet a8dc876e02 textiter: fix bug in _gtk_text_btree_get_iter_at_last_toggle()
If the last tag toggle is the end iter, the function returned the wrong
tag toggle.

This resulted in some bugs where the view wasn't relayout/redrawn
correctly.

The function also always returned TRUE, probably because the return
value is used nowhere. But for consistency with
_gtk_text_btree_get_iter_at_first_toggle(), it's better to keep the
return value, and also because otherwise the function would be wrong (it
doesn't always return a tag toggle, if there is none).

https://bugzilla.gnome.org/show_bug.cgi?id=755413
2015-10-12 13:24:35 -04:00
Timm Bäder 7394270efa GtkPopover: Don't apply shape on wayland
Popovers are subsurfaces on wayland so we don't need that, and the shape
messed up hidpi popovers there.
2015-10-12 13:24:20 -04:00
Jonas Ådahl cbc8d4a88a wayland: Don't ignore wl_keyboard.leave if surface is gone
keyboard_handle_leave() might be called with a NULL surface resource
(for example if the surface was destroyed after the event was sent). If
so, we should still deal with the keyboard focus lost event, otherwise
we will both leak (the keyboard_focus GdkWindow reference) and miss
stopping the key repeat timer.

https://bugzilla.gnome.org/show_bug.cgi?id=755927
2015-10-12 13:23:31 -04:00
Christoph Reiter da2f672c11 Fix accessibility not getting initialized in gtk_init() if a default display is already set
_gtk_accessibility_init() only gets called if the default
display changes, but in case gdk_init() is called before gtk_init()
the default display is already set and no property notification occurs.

This can happen quite easily in pygobject where
"from gi.repository import Gdk, Gtk"
will call gdk_init() followed by gtk_init() in the Python overrides.

This fixes it by checking for a default display in all cases.
2015-10-12 13:23:11 -04:00
Rafal Luzynski ca9440c21e flowbox: correct the behavior with "can-focus"==FALSE
In fact there were two issues:

1. GtkFlowBoxChild with "can-focus"==FALSE should pass the focus
to its child immediately.
2. GtkFlowBox with "can-focus"==FALSE should cease its custom keynav
implementation and fall back to the default GtkContainer behavior
which is more natural.

Thanks to these changes the flow box can act as a better replacement
for GtkGrid and similar containers.

https://bugzilla.gnome.org/show_bug.cgi?id=753371
2015-10-12 13:22:09 -04:00
Chun-wei Fan bd46d285d3 MSVC builds: Fix "install"
Use $(GlibEtcInstallRoot) when invoking glib-compile-schemas, as CopyDir
is not GlibInstallRoot for GTK+ (due to quoting issues), meaning that the
glib-compile-schemas tool may not be found in certain cases.

Issue pointed out by Ignacio Casal Quinteiro.
2015-10-12 23:24:33 +08:00
Ignacio Casal Quinteiro 3b0056ae1a win32: use the same parameter name as the implementation 2015-10-12 12:23:31 +02:00
Jiri Grönroos d19b3d2c74 Updated Finnish translation 2015-10-05 17:07:38 +00:00
Jiri Grönroos 47cee3521a Updated Finnish translation 2015-10-05 17:04:41 +00:00
Matthias Clasen b06cb4b9d1 assistant: Deal with spontaneous page disappearance
Removing pages from the assistant with gtk_widget_destroy() used
to work. It broke with the recent interposition of a box between
each page and the notebook. Fix this by cleaning up when the box
child is removed.

https://bugzilla.gnome.org/show_bug.cgi?id=756042
2015-10-05 08:22:40 -04:00
Wolfgang Stöggl f561bdb3eb Updated German translation 2015-10-04 11:37:40 +00:00
Christian Kirbach d4e644ec52 Updated German translation 2015-10-04 09:13:09 +00:00
Matthias Clasen ee856fd30d Add a test for gtk_style_context_list_classes
This test failed before the previous commit.
2015-10-03 20:42:57 -04:00
Matthias Clasen b9d4591949 Fix gtk_style_context_list_classes
The function was always returning NULL.
2015-10-03 20:42:42 -04:00
Matthias Clasen e1ec1497a8 switch: Unclip the slider shadow
This commit arranges things so the shadow of the slider can
extend outside the widget, even if the switch itself has no
shadow.

https://bugzilla.gnome.org/show_bug.cgi?id=755791
2015-10-03 20:42:31 -04:00
188 changed files with 54083 additions and 43756 deletions
+171
View File
@@ -1,3 +1,174 @@
Overview of Changes in GTK+ 3.18.9
==================================
* Bugs fixed:
677329 Missing focus-in events
761474 x11: Scaling factor is applied twice on screen work area
762468 wayland: Switching between fullscreen and unfullscreen too fast...
762907 gnome-shell crashes after undocking
763017 tooltip text is not shown
* Translation updates:
Scottish Gaelic
Slovenian
Overview of Changes in GTK+ 3.18.8
==================================
* Bugs fixed:
756751 Keypad decimal point patch prevents entry of comma in german key...
761026 Pressing ESC in a file chooser dialog doesn't dismiss it
761552 Warnings in filechooser when typing-to-search in Recent
761757 Crash in GtkFileChooserWidget
761838 Editing widgets may be drawn off the visible area if the column ...
762315 Assistant pages have no padding which looks weird
762319 issues with randr 1.5
Fix Quartz clipboard image retrieval
Fix Quartz Full Screen Crash
box: Fix rtl allocation with center widget
* Translation updates:
French
Scottish Gaelic
Overview of Changes in GTK+ 3.18.7
==================================
* Bugs fixed:
688524 Expose gtk-primary-button-warps-slider as an X setting
722937 problem rendering asymmetric borders with dotted style
728344 Collate setting in Print Dialog does not override PPD setting for...
754868 visual anomaly in gtk path bar
757147 gdk_pixbuf_get_from_window() doesn't honor device scale
758908 The app chooser dialog uses a non standard icon and doesn't wrap ...
758929 GtkEntryCompletion should allow for changing the popdown delay
759079 GtkComboBox triggers segmentation fault in update_menu_sensitivit...
759081 Add 'nullable' to return type of gtk_cell_layout_get_area.
759091 notebook tab stays hovered if mouse leaves slowly
759260 [Adwaita:dark] menus on GtkTreeView barely visible because menu s...
759757 Flow box redraws all children on hover
760141 New gdk_cursor_new_from_name() fallback breaks behavior expected...
760169 GtkColorButton sensitive and insensitive appearances are barely d...
760416 broadwayd --help shows translated characters as question marks on...
760445 regression: openQA no longer able to press ctrl-alt-del to get to...
760615 GTK FTBFS with MinGW-w64
760680 Emitting "shutdown" signal twice leads to a crash
760891 GtkTreeView Cannot expand/collapse rows by mouse
760897 A few clean ups to the shm handling code
760964 hardcodes temp dir to /tmp
761005 GtkColorChooser: make set_rgba work in editor mode
761095 wayland: use shm_open instead of open in tmpdir
* Translation updates
Arabic
Brazilian Portuguese
Czech
German
Hungarian
Indonesian
Lithuanian
Polish
Portuguese
Swedish
Overview of Changes in GTK+ 3.18.6
==================================
* Bugs fixed:
539944 Add GtkScaleButton API so struct fields can be marked as private
732742 Infinite recursion on GdkDevice disposal
735847 move animatable cursors' current frame info into GdkCursor
746745 Window suddenly always on top
747295 shared memory leak when creating/destroying widgets
748904 wayland: map real modifiers to virtual modifiers
757358 single touch devices are not detected as touch devices
758025 cursor flickering
758072 [Wayland] additional mouse buttons don't work
758175 Fix character entity
758327 gnome-disks segfault in gdkwayland get_popup_parent - dereference...
758367 GTK+ 3 does not respect bold in org.gnome.desktop.interface font-name
758407 Could not send the search request \ GDBus.Error:org.freedesktop...
758483 GDK W32: Incorrectly uses SetWindowLong() to set/unset WS_EX_TOPMOST
758484 GDK W32: Some calls to W32 routines are rather unclear
758660 Copy and paste doesn't work in wayland session
758661 every second right-click to window header is ignored (CSD-related?)
758698 Bug backward search + case insensitive + preceding multi-byte character
758790 A few stylistic icon-browser patches
* Translation updates:
Polish
Overview of Changes in GTK+ 3.18.5
==================================
* GtkFileChooser:
- Make sure external drives show up either in the sidebar or the places view
- Ignore double-click events
* Avoid some crashes in CSS parsing error handling
Overview of Changes in GTK+ 3.18.4
==================================
* Revert a GtkTextBuffer change that broke binding API
* Properly refresh styles when widget names change
Overview of Changes in GTK+ 3.18.3
==================================
* Bug fixes:
735341 Fix/improve gtk_text_buffer_get_iter_at_*() functions
753992 im-quartz discard_preedit segmentation fault
755654 mmc/sd drive does not appear in Nautilus
756160 Crash/segfault when dragging tabs (after 2nd/3rd/4th+ drag)
756385 No more content in Anjuta project wizard
756449 GtkTextHandle artifacts under Wayland
756496 wayland: Make it possible to use a window type hint to map as a subsurface
756505 Entering a dot removes all other characters from input
756568 Some improvements to gtkplacesview
756589 Improve the heuristics for external drives
756625 segfault in captured_event_cb
756751 Keypad decimal point patch prevents entry of comma in german keypad layout
756780 wayland: Fix GtkTreeView's search window
756886 The GtkWindow patch here is necessary to make transparent terminals work...
757147 gdk_pixbuf_get_from_window() doesn't honor device scale
757221 Memory leak in gtk-3.0.m4
757298 nautilus crashes on drag'n'drop over 'side bar'
757303 Vertically align path labels in Other Locations view
757324 win32: handle WM_DISPLAYCHANGE globally
757358 single touch devices are not detected as touch devices
757377 settings.ini is only loaded from first XDG_CONFIG_DIRS entry
757544 GtkHeaderBar subclass template and <child type="title"> does not work
* Translation updates:
Basque
Czech
Icelandic
Norwegian bokmål
Slovak
Overview of Changes in GTK+ 3.18.2
==================================
* Bug fixes:
753371 Bad focus order in GtkFlowBox
755413 Bug in _gtk_text_btree_get_iter_at_last_toggle()
755791 GtkSwitch: unclip css box-shadow on the slider
755927 Occasional "stuck key" after closing window using keyboard shortcut...
755988 gtk printer dialog won't print jobs with names exceeding 255 charac...
756042 GtkAssistant: Segfault after g_object_run_dispose(page)
756195 GtkColorChooser: Plus/checkmark icons are blurry in hidpi
756338 applications segfaults on 3.18.1 when using external themes
* Translation updates:
Finnish
German
Overview of Changes in GTK+ 3.18.1
==================================
+4
View File
@@ -43,8 +43,12 @@ EXTRA_DIST += \
gdk-3.vcxproj.filtersin \
gtk-3.vcxprojin \
gtk-3.vcxproj.filtersin \
gtk-builder-tool.vcxproj \
gtk-builder-tool.vcxproj.filters \
gtk-encode-symbolic-svg.vcxproj \
gtk-encode-symbolic-svg.vcxproj.filters \
gtk-update-icon-cache.vcxproj \
gtk-update-icon-cache.vcxproj.filters \
gtk3-demo.vcxprojin \
gtk3-demo.vcxproj.filtersin \
gtk3-demo-application.vcxprojin \
+36
View File
@@ -22,6 +22,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-encode-symbolic-svg", "
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gailutil-3", "gailutil-3.vcxproj", "{A1FCED61-4E51-4015-A70C-5373404D1BA0}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-update-icon-cache", "gtk-update-icon-cache.vcxproj", "{FC98AF16-4C68-42DF-906B-93A6804C198A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-builder-tool", "gtk-builder-tool.vcxproj", "{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-install", "gtk3-install.vcxproj", "{23BBF35F-78AF-4E8C-983F-7B90448CD7DF}"
EndProject
Global
@@ -220,6 +224,38 @@ Global
{F280BF1A-777A-4FB5-8005-DFBE04621EDB}.Release_Broadway|Win32.Build.0 = Release|Win32
{F280BF1A-777A-4FB5-8005-DFBE04621EDB}.Release_Broadway|x64.ActiveCfg = Release|x64
{F280BF1A-777A-4FB5-8005-DFBE04621EDB}.Release_Broadway|x64.Build.0 = Release|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug|Win32.ActiveCfg = Debug|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug|Win32.Build.0 = Debug|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug|x64.ActiveCfg = Debug|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug|x64.Build.0 = Debug|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release|Win32.ActiveCfg = Release|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release|Win32.Build.0 = Release|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release|x64.ActiveCfg = Release|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release|x64.Build.0 = Release|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug_Broadway|Win32.Build.0 = Debug|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug_Broadway|x64.ActiveCfg = Debug|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug_Broadway|x64.Build.0 = Debug|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release_Broadway|Win32.ActiveCfg = Release|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release_Broadway|Win32.Build.0 = Release|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release_Broadway|x64.ActiveCfg = Release|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release_Broadway|x64.Build.0 = Release|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug|Win32.ActiveCfg = Debug|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug|Win32.Build.0 = Debug|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug|x64.ActiveCfg = Debug|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug|x64.Build.0 = Debug|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release|Win32.ActiveCfg = Release|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release|Win32.Build.0 = Release|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release|x64.ActiveCfg = Release|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release|x64.Build.0 = Release|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug_Broadway|Win32.Build.0 = Debug|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug_Broadway|x64.ActiveCfg = Debug|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug_Broadway|x64.Build.0 = Debug|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release_Broadway|Win32.ActiveCfg = Release|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release_Broadway|Win32.Build.0 = Release|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release_Broadway|x64.ActiveCfg = Release|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release_Broadway|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
+181
View File
@@ -0,0 +1,181 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}</ProjectGuid>
<RootNamespace>gtkencodesymbolicsvg</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\gtk\gtk-builder-tool.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="gdk-3.vcxproj">
<Project>{5ae8f5ce-9103-4951-aede-ea2f3b573be8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk-3.vcxproj">
<Project>{95a4b53d-2773-4406-a2c1-8fd2840bbad8}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Sources">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Headers">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\gtk\gtk-builder-tool.c"><Filter>Sources</Filter></ClCompile>
</ItemGroup>
</Project>
@@ -0,0 +1,177 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{FC98AF16-4C68-42DF-906B-93A6804C198A}</ProjectGuid>
<RootNamespace>gtkencodesymbolicsvg</RootNamespace>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="gtk3-build-defines.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\gtk\updateiconcache.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="gtk3-prebuild.vcxproj">
<Project>{b98fbe68-b03c-48e3-8f32-c3c010720d30}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Sources">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Headers">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\gtk\updateiconcache.c"><Filter>Sources</Filter></ClCompile>
</ItemGroup>
</Project>
@@ -107,6 +107,7 @@
<SubSystem>Console</SubSystem>
<OptimizeReferences>false</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -151,6 +152,7 @@
<SubSystem>Console</SubSystem>
<OptimizeReferences>false</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
+26 -24
View File
@@ -96,6 +96,31 @@
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\gdk;..\..\..\gtk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>$(GtkPrefixDefine);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<FunctionLevelLinking>false</FunctionLevelLinking>
<OptimizeReferences>false</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
@@ -120,30 +145,6 @@
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\gdk;..\..\..\gtk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>$(GtkPrefixDefine);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<FunctionLevelLinking>false</FunctionLevelLinking>
<OptimizeReferences>false</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\..\gdk;..\..\..\gtk;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@@ -165,6 +166,7 @@
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -109,6 +109,7 @@
<SubSystem>Console</SubSystem>
<OptimizeReferences>false</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
@@ -155,6 +156,7 @@
<SubSystem>Console</SubSystem>
<OptimizeReferences>false</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
+23 -1
View File
@@ -32,6 +32,12 @@ copy "$(BinDir)\gtk3-icon-browser.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk3-icon-browser.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-encode-symbolic-svg.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-encode-symbolic-svg.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-update-icon-cache.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-update-icon-cache.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-query-settings.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-query-settings.pdb" $(CopyDir)\bin
copy "$(BinDir)\gtk-builder-tool.exe" $(CopyDir)\bin
copy "$(BinDir)\gtk-builder-tool.pdb" $(CopyDir)\bin
goto DONE_BIN
:DO_BROADWAY_BIN
@@ -55,6 +61,12 @@ copy .\Release\$(Platform)\bin\gtk3-icon-browser.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-update-icon-cache.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-update-icon-cache.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-query-settings.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-query-settings.pdb $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-builder-tool.exe $(CopyDir)\bin
copy .\Release\$(Platform)\bin\gtk-builder-tool.pdb $(CopyDir)\bin
goto DONE_BIN
@@ -73,6 +85,12 @@ copy .\Debug\$(Platform)\bin\gtk3-icon-browser.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-update-icon-cache.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-update-icon-cache.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-query-settings.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-query-settings.pdb $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-builder-tool.exe $(CopyDir)\bin
copy .\Debug\$(Platform)\bin\gtk-builder-tool.pdb $(CopyDir)\bin
:DONE_BIN
</GtkDoInstallBin>
@@ -108,8 +126,12 @@ copy ..\..\..\gtk\org.gtk.Settings.FileChooser.gschema.xml $(CopyDir)\share\glib
copy ..\..\..\gtk\org.gtk.Settings.ColorChooser.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\gtk\org.gtk.Settings.Debug.gschema.xml $(CopyDir)\share\glib-2.0\schemas
copy ..\..\..\demos\gtk-demo\org.gtk.Demo.gschema.xml $(CopyDir)\share\glib-2.0\schemas
echo "Compiling gsettings XML Files..."
$(CopyDir)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas
$(GlibEtcInstallRoot)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas
echo "Generating icon cache......"
$(CopyDir)\bin\gtk-update-icon-cache.exe --ignore-theme-index --force "$(CopyDir)\share\icons\hicolor"
</GtkDoInstall>
<GtkDoInstallBroadwayHeaders>
copy ..\..\..\gdk\broadway\gdkbroadway.h $(CopyDir)\include\gtk-$(ApiVersion)\gdk
+12
View File
@@ -215,6 +215,18 @@
<Project>{f280bf1a-777a-4fb5-8005-dfbe04621edb}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk-udpate-icon-cache.vcxproj">
<Project>{fc98af16-4c68-42df-906b-93a6804c198a}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk-builder-tool.vcxproj">
<Project>{7d2397cf-4c25-45bc-a1bb-cb4b6e154bbd}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="gtk-query-settings.vcxproj">
<Project>{9f22107a-3ef7-4b52-b269-747b65307f36}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
+4
View File
@@ -10,8 +10,12 @@ EXTRA_DIST += \
gdk-3.vcxproj.filters \
gtk-3.vcxproj \
gtk-3.vcxproj.filters \
gtk-builder-tool.vcxproj \
gtk-builder-tool.vcxproj.filters \
gtk-encode-symbolic-svg.vcxproj \
gtk-encode-symbolic-svg.vcxproj.filters \
gtk-update-icon-cache.vcxproj \
gtk-update-icon-cache.vcxproj.filters \
gtk3-demo.vcxproj \
gtk3-demo.vcxproj.filters \
gtk3-demo-application.vcxproj \
+4
View File
@@ -10,8 +10,12 @@ EXTRA_DIST += \
gdk-3.vcxproj.filters \
gtk-3.vcxproj \
gtk-3.vcxproj.filters \
gtk-builder-tool.vcxproj \
gtk-builder-tool.vcxproj.filters \
gtk-encode-symbolic-svg.vcxproj \
gtk-encode-symbolic-svg.vcxproj.filters \
gtk-update-icon-cache.vcxproj \
gtk-update-icon-cache.vcxproj.filters \
gtk3-demo.vcxproj \
gtk3-demo.vcxproj.filters \
gtk3-demo-application.vcxproj \
+4
View File
@@ -10,8 +10,12 @@ EXTRA_DIST += \
gdk-3.vcxproj.filters \
gtk-3.vcxproj \
gtk-3.vcxproj.filters \
gtk-builder-tool.vcxproj \
gtk-builder-tool.vcxproj.filters \
gtk-encode-symbolic-svg.vcxproj \
gtk-encode-symbolic-svg.vcxproj.filters \
gtk-update-icon-cache.vcxproj \
gtk-update-icon-cache.vcxproj.filters \
gtk3-demo.vcxproj \
gtk3-demo.vcxproj.filters \
gtk3-demo-application.vcxproj \
+2
View File
@@ -27,7 +27,9 @@ EXTRA_DIST += \
gdk3-win32.vcprojin \
gdk-3.vcprojin \
gtk-3.vcprojin \
gtk-builder-tool.vcproj \
gtk-encode-symbolic-svg.vcproj \
gtk-update-icon-cache.vcproj \
gtk3-demo.vcprojin \
gtk3-demo-application.vcprojin \
gtk3-icon-browser.vcprojin \
+45
View File
@@ -57,6 +57,17 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gailutil-3", "gailutil-3.vc
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8} = {95A4B53D-2773-4406-A2C1-8FD2840BBAD8}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-update-icon-cache", "gtk-update-icon-cache.vcproj", "{FC98AF16-4C68-42DF-906B-93A6804C198A}"
ProjectSection(ProjectDependencies) = postProject
{B98FBE68-B03C-48E3-8F32-C3C010720D30} = {B98FBE68-B03C-48E3-8F32-C3C010720D30}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk-builder-tool", "gtk-builder-tool.vcproj", "{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}"
ProjectSection(ProjectDependencies) = postProject
{5AE8F5CE-9103-4951-AEDE-EA2F3B573BE8} = {5AE8F5CE-9103-4951-AEDE-EA2F3B573BE8}
{95A4B53D-2773-4406-A2C1-8FD2840BBAD8} = {95A4B53D-2773-4406-A2C1-8FD2840BBAD8}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-install", "gtk3-install.vcproj", "{23BBF35F-78AF-4E8C-983F-7B90448CD7DF}"
ProjectSection(ProjectDependencies) = postProject
{5AE8F5CE-9103-4951-AEDE-EA2F3B573BE8} = {5AE8F5CE-9103-4951-AEDE-EA2F3B573BE8}
@@ -67,6 +78,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtk3-install", "gtk3-instal
{343333C4-D46C-4C97-A986-959CCA6F1DE0} = {343333C4-D46C-4C97-A986-959CCA6F1DE0}
{E9687D21-E214-4A0C-9EB4-8B38EBB783E5} = {E9687D21-E214-4A0C-9EB4-8B38EBB783E5}
{F280BF1A-777A-4FB5-8005-DFBE04621EDB} = {F280BF1A-777A-4FB5-8005-DFBE04621EDB}
{FC98AF16-4C68-42DF-906B-93A6804C198A} = {FC98AF16-4C68-42DF-906B-93A6804C198A}
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD} = {7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}
EndProjectSection
EndProject
Global
@@ -257,6 +270,38 @@ Global
{F280BF1A-777A-4FB5-8005-DFBE04621EDB}.Release_Broadway|Win32.Build.0 = Release|Win32
{F280BF1A-777A-4FB5-8005-DFBE04621EDB}.Release_Broadway|x64.ActiveCfg = Release|x64
{F280BF1A-777A-4FB5-8005-DFBE04621EDB}.Release_Broadway|x64.Build.0 = Release|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug|Win32.ActiveCfg = Debug|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug|Win32.Build.0 = Debug|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug|x64.ActiveCfg = Debug|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug|x64.Build.0 = Debug|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release|Win32.ActiveCfg = Release|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release|Win32.Build.0 = Release|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release|x64.ActiveCfg = Release|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release|x64.Build.0 = Release|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug_Broadway|Win32.Build.0 = Debug|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug_Broadway|x64.ActiveCfg = Debug|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Debug_Broadway|x64.Build.0 = Debug|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release_Broadway|Win32.ActiveCfg = Release|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release_Broadway|Win32.Build.0 = Release|Win32
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release_Broadway|x64.ActiveCfg = Release|x64
{FC98AF16-4C68-42DF-906B-93A6804C198A}.Release_Broadway|x64.Build.0 = Release|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug|Win32.ActiveCfg = Debug|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug|Win32.Build.0 = Debug|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug|x64.ActiveCfg = Debug|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug|x64.Build.0 = Debug|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release|Win32.ActiveCfg = Release|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release|Win32.Build.0 = Release|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release|x64.ActiveCfg = Release|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release|x64.Build.0 = Release|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug_Broadway|Win32.ActiveCfg = Debug|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug_Broadway|Win32.Build.0 = Debug|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug_Broadway|x64.ActiveCfg = Debug|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Debug_Broadway|x64.Build.0 = Debug|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release_Broadway|Win32.ActiveCfg = Release|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release_Broadway|Win32.Build.0 = Release|Win32
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release_Broadway|x64.ActiveCfg = Release|x64
{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}.Release_Broadway|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
+172
View File
@@ -0,0 +1,172 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="gtk-builder-tool"
ProjectGUID="{7D2397CF-4C25-45BC-A1BB-CB4B6E154BBD}"
RootNamespace="gtkbuildertool"
Keyword="Win32Proj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
ConfigurationType="1"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="_DEBUG"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="1"
/>
</Configuration>
<Configuration
Name="Release|Win32"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
ConfigurationType="1"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions=""
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
</Configuration>
<Configuration
Name="Debug|x64"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="_DEBUG"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies=""
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="17"
/>
</Configuration>
<Configuration
Name="Release|x64"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
EnableIntrinsicFunctions="true"
PreprocessorDefinitions=""
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies=""
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="17"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Sources"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File RelativePath="..\..\..\gtk\gtk-builder-tool.c" />
</Filter>
<Filter
Name="Headers"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
@@ -0,0 +1,172 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="gtk-update-icon-cache"
ProjectGUID="{FC98AF16-4C68-42DF-906B-93A6804C198A}"
RootNamespace="gtkupdateiconcache"
Keyword="Win32Proj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
ConfigurationType="1"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="_DEBUG"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="1"
/>
</Configuration>
<Configuration
Name="Release|Win32"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
ConfigurationType="1"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions=""
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
</Configuration>
<Configuration
Name="Debug|x64"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="_DEBUG"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies=""
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="17"
/>
</Configuration>
<Configuration
Name="Release|x64"
InheritedPropertySheets=".\gtk3-build-defines.vsprops"
ConfigurationType="1"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
EnableIntrinsicFunctions="true"
PreprocessorDefinitions=""
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies=""
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="17"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Sources"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File RelativePath="..\..\..\gtk\updateiconcache.c" />
</Filter>
<Filter
Name="Headers"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
+22 -1
View File
@@ -31,6 +31,12 @@ copy $(ConfigurationName)\$(PlatformName)\bin\gtk3-icon-browser.exe $(CopyDir)\b
copy $(ConfigurationName)\$(PlatformName)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-update-icon-cache.exe $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-update-icon-cache.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-query-settings.exe $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-query-settings.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-builder-tool.exe $(CopyDir)\bin&#x0D;&#x0A;
copy $(ConfigurationName)\$(PlatformName)\bin\gtk-builder-tool.pdb $(CopyDir)\bin&#x0D;&#x0A;
goto DONE_BIN&#x0D;&#x0A;
:DO_BROADWAY_BIN&#x0D;&#x0A;
@@ -54,6 +60,12 @@ copy .\Release\$(PlatformName)\bin\gtk3-icon-browser.exe $(CopyDir)\bin&#x0D;&#x
copy .\Release\$(PlatformName)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk-update-icon-cache.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk-update-icon-cache.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk-query-settings.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk-query-settings.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk-builder-tool.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Release\$(PlatformName)\bin\gtk-builder-tool.pdb $(CopyDir)\bin&#x0D;&#x0A;
goto DONE_BIN&#x0D;&#x0A;
:DO_BROADWAY_DEBUG&#x0D;&#x0A;
@@ -71,6 +83,12 @@ copy .\Debug\$(PlatformName)\bin\gtk3-icon-browser.exe $(CopyDir)\bin&#x0D;&#x0A
copy .\Debug\$(PlatformName)\bin\gtk3-icon-browser.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk-encode-symbolic-svg.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk-encode-symbolic-svg.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk-update-icon-cache.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk-update-icon-cache.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk-query-settings.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk-query-settings.pdb $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk-builder-tool.exe $(CopyDir)\bin&#x0D;&#x0A;
copy .\Debug\$(PlatformName)\bin\gtk-builder-tool.pdb $(CopyDir)\bin&#x0D;&#x0A;
:DONE_BIN&#x0D;&#x0A;
"
/>
@@ -112,7 +130,10 @@ copy ..\..\..\gtk\org.gtk.Settings.Debug.gschema.xml $(CopyDir)\share\glib-2.0\s
copy ..\..\..\demos\gtk-demo\org.gtk.Demo.gschema.xml $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
echo &quot;Compiling gsettings XML Files...&quot;&#x0D;&#x0A;
$(CopyDir)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
$(GlibEtcInstallRoot)\bin\glib-compile-schemas.exe $(CopyDir)\share\glib-2.0\schemas&#x0D;&#x0A;
echo &quot;Generating icon cache...&quot;&#x0D;&#x0A;
$(CopyDir)\bin\gtk-update-icon-cache.exe --ignore-theme-index --force &quot;$(CopyDir)\share\icons\hicolor&quot;
"
/>
<UserMacro
+2 -2
View File
@@ -10,8 +10,8 @@
m4_define([gtk_major_version], [3])
m4_define([gtk_minor_version], [18])
m4_define([gtk_micro_version], [1])
m4_define([gtk_interface_age], [1])
m4_define([gtk_micro_version], [9])
m4_define([gtk_interface_age], [9])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
m4_define([gtk_version],
+12 -32
View File
@@ -148,16 +148,14 @@
<object class="GtkGrid">
<property name="visible">True</property>
<property name="margin">10</property>
<property name="row-spacing">10</property>
<property name="column-spacing">10</property>
<property name="row-spacing">18</property>
<property name="column-spacing">18</property>
<child>
<object class="GtkEventBox">
<property name="visible">True</property>
<child>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="xpad">4</property>
<property name="ypad">4</property>
<property name="halign">center</property>
<property name="valign">end</property>
</object>
@@ -174,8 +172,6 @@
<child>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="xpad">4</property>
<property name="ypad">4</property>
<property name="halign">center</property>
<property name="valign">end</property>
</object>
@@ -192,8 +188,6 @@
<child>
<object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="xpad">4</property>
<property name="ypad">4</property>
<property name="halign">center</property>
<property name="valign">end</property>
</object>
@@ -210,8 +204,6 @@
<child>
<object class="GtkImage" id="image4">
<property name="visible">True</property>
<property name="xpad">4</property>
<property name="ypad">4</property>
<property name="halign">center</property>
<property name="valign">end</property>
</object>
@@ -228,8 +220,6 @@
<child>
<object class="GtkImage" id="image5">
<property name="visible">True</property>
<property name="xpad">4</property>
<property name="ypad">4</property>
<property name="halign">center</property>
<property name="valign">end</property>
</object>
@@ -244,11 +234,9 @@
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="xpad">4</property>
<property name="ypad">4</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="label">16x16</property>
<property name="valign">baseline</property>
<property name="label">16×16</property>
<style>
<class name="dim-label"/>
</style>
@@ -261,11 +249,9 @@
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="xpad">4</property>
<property name="ypad">4</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="label">24x24</property>
<property name="valign">baseline</property>
<property name="label">24×24</property>
<style>
<class name="dim-label"/>
</style>
@@ -278,11 +264,9 @@
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="xpad">4</property>
<property name="ypad">4</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="label">32x32</property>
<property name="valign">baseline</property>
<property name="label">32×32</property>
<style>
<class name="dim-label"/>
</style>
@@ -295,11 +279,9 @@
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="xpad">4</property>
<property name="ypad">4</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="label">48x48</property>
<property name="valign">baseline</property>
<property name="label">48×48</property>
<style>
<class name="dim-label"/>
</style>
@@ -312,11 +294,9 @@
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="xpad">4</property>
<property name="ypad">4</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="label">64x64</property>
<property name="valign">baseline</property>
<property name="label">64×64</property>
<style>
<class name="dim-label"/>
</style>
+3
View File
@@ -7,6 +7,7 @@
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <locale.h>
#include <glib.h>
#include <gio/gio.h>
@@ -434,6 +435,8 @@ main (int argc, char *argv[])
{ NULL }
};
setlocale (LC_ALL, "");
context = g_option_context_new ("[:DISPLAY] - broadway display daemon");
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
if (!g_option_context_parse (context, &argc, &argv, &error))
+1
View File
@@ -253,6 +253,7 @@ gdk_cursor_new_for_display (GdkDisplay *display,
* - ![](default_cursor.png) "default"
* - ![](help_cursor.png) "help"
* - ![](pointer_cursor.png) "pointer"
* - ![](pointer_cursor.png) "context-menu"
* - ![](progress_cursor.png) "progress"
* - ![](wait_cursor.png) "wait"
* - ![](cell_cursor.png) "cell"
+28 -19
View File
@@ -63,6 +63,7 @@ enum {
static guint signals [LAST_SIGNAL] = { 0 };
static void gdk_device_finalize (GObject *object);
static void gdk_device_dispose (GObject *object);
static void gdk_device_set_property (GObject *object,
guint prop_id,
@@ -99,6 +100,7 @@ gdk_device_class_init (GdkDeviceClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = gdk_device_finalize;
object_class->dispose = gdk_device_dispose;
object_class->set_property = gdk_device_set_property;
object_class->get_property = gdk_device_get_property;
@@ -299,37 +301,44 @@ gdk_device_init (GdkDevice *device)
}
static void
gdk_device_dispose (GObject *object)
gdk_device_finalize (GObject *object)
{
GdkDevice *device = GDK_DEVICE (object);
if (device->type == GDK_DEVICE_TYPE_SLAVE)
_gdk_device_remove_slave (device->associated, device);
if (device->associated)
{
if (device->type == GDK_DEVICE_TYPE_MASTER)
_gdk_device_set_associated_device (device->associated, NULL);
g_object_unref (device->associated);
device->associated = NULL;
}
if (device->axes)
{
g_array_free (device->axes, TRUE);
device->axes = NULL;
}
g_free (device->name);
g_free (device->keys);
device->name = NULL;
device->keys = NULL;
g_clear_pointer (&device->name, g_free);
g_clear_pointer (&device->keys, g_free);
g_clear_pointer (&device->vendor_id, g_free);
g_clear_pointer (&device->product_id, g_free);
G_OBJECT_CLASS (gdk_device_parent_class)->finalize (object);
}
static void
gdk_device_dispose (GObject *object)
{
GdkDevice *device = GDK_DEVICE (object);
GdkDevice *associated = device->associated;
if (associated && device->type == GDK_DEVICE_TYPE_SLAVE)
_gdk_device_remove_slave (associated, device);
if (associated)
{
device->associated = NULL;
if (device->type == GDK_DEVICE_TYPE_MASTER &&
associated->associated == device)
_gdk_device_set_associated_device (associated, NULL);
g_object_unref (associated);
}
G_OBJECT_CLASS (gdk_device_parent_class)->dispose (object);
}
+35 -4
View File
@@ -2145,12 +2145,32 @@ _gdk_event_button_generate (GdkDisplay *display,
}
}
static GList *
gdk_get_pending_window_state_event_link (GdkWindow *window)
{
GdkDisplay *display = gdk_window_get_display (window);
GList *tmp_list;
for (tmp_list = display->queued_events; tmp_list; tmp_list = tmp_list->next)
{
GdkEventPrivate *event = tmp_list->data;
if (event->event.type == GDK_WINDOW_STATE &&
event->event.window_state.window == window)
return tmp_list;
}
return NULL;
}
void
_gdk_set_window_state (GdkWindow *window,
GdkWindowState new_state)
{
GdkDisplay *display = gdk_window_get_display (window);
GdkEvent temp_event;
GdkWindowState old;
GList *pending_event_link;
g_return_if_fail (window != NULL);
@@ -2159,11 +2179,22 @@ _gdk_set_window_state (GdkWindow *window,
temp_event.window_state.send_event = FALSE;
temp_event.window_state.new_window_state = new_state;
old = window->state;
if (temp_event.window_state.new_window_state == old)
if (temp_event.window_state.new_window_state == window->state)
return; /* No actual work to do, nothing changed. */
pending_event_link = gdk_get_pending_window_state_event_link (window);
if (pending_event_link)
{
old = window->old_state;
_gdk_event_queue_remove_link (display, pending_event_link);
g_list_free_1 (pending_event_link);
}
else
{
old = window->state;
window->old_state = old;
}
temp_event.window_state.changed_mask = new_state ^ old;
/* Actually update the field in GdkWindow, this is sort of an odd
@@ -2185,7 +2216,7 @@ _gdk_set_window_state (GdkWindow *window,
{
case GDK_WINDOW_TOPLEVEL:
case GDK_WINDOW_TEMP: /* ? */
gdk_display_put_event (gdk_window_get_display (window), &temp_event);
gdk_display_put_event (display, &temp_event);
break;
case GDK_WINDOW_FOREIGN:
case GDK_WINDOW_ROOT:
+1
View File
@@ -310,6 +310,7 @@ struct _GdkWindow
/* We store the old expose areas to support buffer-age optimizations */
cairo_region_t *old_updated_area[2];
GdkWindowState old_state;
GdkWindowState state;
guint8 alpha;
+26 -7
View File
@@ -47,8 +47,8 @@
* @window: Source window
* @src_x: Source X coordinate within @window
* @src_y: Source Y coordinate within @window
* @width: Width in pixels of region to get
* @height: Height in pixels of region to get
* @width: Width in logical pixels of region to get
* @height: Height in logical pixels of region to get
*
* Transfers image data from a #GdkWindow and converts it to an RGB(A)
* representation inside a #GdkPixbuf. In other words, copies
@@ -56,8 +56,9 @@
* This allows you to efficiently read individual pixels on the client side.
*
* This function will create an RGB pixbuf with 8 bits per channel with
* the same size specified by the @width and @height arguments. The pixbuf
* will contain an alpha channel if the @window contains one.
* the size specified by the @width and @height arguments scaled by the
* scale factor of @window. The pixbuf will contain an alpha channel if
* the @window contains one.
*
* If the window is off the screen, then there is no image data in the
* obscured/offscreen regions to be placed in the pixbuf. The contents of
@@ -87,11 +88,16 @@ gdk_pixbuf_get_from_window (GdkWindow *src,
gint height)
{
cairo_surface_t *surface;
cairo_surface_t *copy;
cairo_t *cr;
GdkPixbuf *dest;
gint scale;
g_return_val_if_fail (GDK_IS_WINDOW (src), NULL);
g_return_val_if_fail (gdk_window_is_viewable (src), NULL);
scale = gdk_window_get_scale_factor (src);
surface = _gdk_window_ref_cairo_surface (src);
/* We do not know what happened to this surface outside of GDK.
@@ -101,9 +107,22 @@ gdk_pixbuf_get_from_window (GdkWindow *src,
*/
cairo_surface_mark_dirty (surface);
dest = gdk_pixbuf_get_from_surface (surface,
src_x, src_y,
width, height);
if (cairo_surface_get_content (surface) & CAIRO_CONTENT_ALPHA)
copy = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width * scale, height * scale);
else
copy = cairo_image_surface_create (CAIRO_FORMAT_RGB24, width * scale, height * scale);
cairo_surface_set_device_scale (copy, scale, scale);
cr = cairo_create (copy);
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
cairo_set_source_surface (cr, surface, -src_x, -src_y);
cairo_paint (cr);
cairo_destroy (cr);
dest = gdk_pixbuf_get_from_surface (copy, 0, 0, width * scale, height * scale);
cairo_surface_destroy (copy);
cairo_surface_destroy (surface);
return dest;
+1 -1
View File
@@ -366,7 +366,7 @@ gdk_rgba_to_string (const GdkRGBA *rgba)
{
gchar alpha[G_ASCII_DTOSTR_BUF_SIZE];
g_ascii_dtostr (alpha, G_ASCII_DTOSTR_BUF_SIZE, CLAMP (rgba->alpha, 0, 1));
g_ascii_formatd (alpha, G_ASCII_DTOSTR_BUF_SIZE, "%g", CLAMP (rgba->alpha, 0, 1));
return g_strdup_printf ("rgba(%d,%d,%d,%s)",
(int)(0.5 + CLAMP (rgba->red, 0., 1.) * 255.),
+1 -1
View File
@@ -1095,7 +1095,7 @@ gdk_screen_get_setting (GdkScreen *screen,
* on very high density outputs this can be a higher value (often 2).
*
* This can be used if you want to create pixel based data for a
* particula monitor, but most of the time youre drawing to a window
* particular monitor, but most of the time youre drawing to a window
* where it is better to use gdk_window_get_scale_factor() instead.
*
* Since: 3.10
+1
View File
@@ -392,6 +392,7 @@ typedef enum
* @GDK_SCROLL_MASK: receive scroll events
* @GDK_TOUCH_MASK: receive touch events. Since 3.4
* @GDK_SMOOTH_SCROLL_MASK: receive smooth scrolling events. Since 3.4
@GDK_TOUCHPAD_GESTURE_MASK: receive touchpad gesture events. Since 3.18
* @GDK_ALL_EVENTS_MASK: the combination of all the above event masks.
*
* A set of bit-flags to indicate which events a window is to receive.
+17 -7
View File
@@ -5761,11 +5761,16 @@ gdk_window_move_resize_internal (GdkWindow *window,
if (gdk_window_is_viewable (window) &&
!window->input_only)
{
GdkRectangle r;
expose = TRUE;
old_region = cairo_region_copy (window->clip_region);
/* Adjust regions to parent window coords */
cairo_region_translate (old_region, window->x, window->y);
r.x = window->x;
r.y = window->y;
r.width = window->width;
r.height = window->height;
old_region = cairo_region_create_rectangle (&r);
}
/* Set the new position and size */
@@ -5801,9 +5806,14 @@ gdk_window_move_resize_internal (GdkWindow *window,
if (expose)
{
new_region = cairo_region_copy (window->clip_region);
/* Adjust region to parent window coords */
cairo_region_translate (new_region, window->x, window->y);
GdkRectangle r;
r.x = window->x;
r.y = window->y;
r.width = window->width;
r.height = window->height;
new_region = cairo_region_create_rectangle (&r);
cairo_region_union (new_region, old_region);
@@ -5940,7 +5950,7 @@ gdk_window_scroll (GdkWindow *window,
move_native_children (window);
gdk_window_invalidate_region_full (window, window->clip_region, TRUE);
gdk_window_invalidate_rect_full (window, NULL, TRUE);
_gdk_synthesize_crossing_events_for_geometry_change (window);
}
+8
View File
@@ -23,6 +23,14 @@
@implementation GdkQuartzNSWindow
- (void)windowWillClose:(NSNotification*)notification
{
// Clears the delegate when window is going to be closed; since EL
// Capitan it is possible that the methods of delegate would get
// called after the window has been closed.
[self setDelegate:nil];
}
-(BOOL)windowShouldClose:(id)sender
{
GdkWindow *window = [[self contentView] gdkWindow];
+1 -1
View File
@@ -662,7 +662,7 @@
GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (gdk_window->impl);
NSRect rect;
if (!impl->toplevel)
if (!impl || !impl->toplevel)
return;
if (trackingRect)
+21 -8
View File
@@ -87,17 +87,23 @@ static const struct {
const gchar *css_name, *traditional_name;
} name_map[] = {
{ "default", "left_ptr" },
{ "help", "left_ptr" },
{ "context-menu", "left_ptr" },
{ "pointer", "hand" },
{ "progress", "left_ptr_watch" },
{ "wait", "watch" },
{ "cell", "crosshair" },
{ "crosshair", "cross" },
{ "text", "xterm" },
{ "vertical-text","xterm" },
{ "alias", "dnd-link" },
{ "copy", "dnd-copy" },
{ "move", "dnd-move" },
{ "no-drop", "dnd-none" },
{ "not-allowed", "crossed_circle" },
{ "grab", "hand2" },
{ "grabbing", "hand2" },
{ "all-scroll", "left_ptr" },
{ "col-resize", "h_double_arrow" },
{ "row-resize", "v_double_arrow" },
{ "n-resize", "top_side" },
@@ -112,6 +118,8 @@ static const struct {
{ "ns-resize", "v_double_arrow" },
{ "nesw-resize", "fd_double_arrow" },
{ "nwse-resize", "bd_double_arrow" },
{ "zoom-in", "left_ptr" },
{ "zoom-out", "left_ptr" },
{ NULL, NULL }
};
@@ -126,7 +134,7 @@ name_fallback (const gchar *name)
return name_map[i].traditional_name;
}
return "left_ptr";
return NULL;
}
static gboolean
@@ -144,17 +152,22 @@ _gdk_wayland_cursor_update (GdkWaylandDisplay *wayland_display,
cursor->scale);
c = wl_cursor_theme_get_cursor (theme, cursor->name);
if (!c)
c = wl_cursor_theme_get_cursor (theme, name_fallback (cursor->name));
{
const char *fallback;
fallback = name_fallback (cursor->name);
if (fallback)
{
c = wl_cursor_theme_get_cursor (theme, name_fallback (cursor->name));
if (!c)
c = wl_cursor_theme_get_cursor (theme, "left_ptr");
}
}
if (!c)
{
g_warning (G_STRLOC ": Unable to load %s from the cursor theme", cursor->name);
/* return the left_ptr cursor as a fallback */
c = wl_cursor_theme_get_cursor (theme, "left_ptr");
if (!c)
return FALSE;
return FALSE;
}
cursor->wl_cursor = c;
+36 -34
View File
@@ -33,9 +33,13 @@
#include <xkbcommon/xkbcommon.h>
#include <linux/input.h>
#include <sys/time.h>
#include <sys/mman.h>
#define BUTTON_BASE (BTN_LEFT - 1) /* Used to translate to 1-indexed buttons */
typedef struct _GdkWaylandTouchData GdkWaylandTouchData;
struct _GdkWaylandTouchData
@@ -91,7 +95,6 @@ struct _GdkWaylandDeviceData
guint32 repeat_count;
GSettings *keyboard_settings;
GdkCursor *grab_cursor;
guint cursor_timeout_id;
guint cursor_image_index;
guint cursor_image_delay;
@@ -200,12 +203,7 @@ gdk_wayland_device_update_window_cursor (GdkWaylandDeviceData *wd)
guint next_image_index, next_image_delay;
gboolean retval = G_SOURCE_REMOVE;
if (wd->grab_cursor)
{
buffer = _gdk_wayland_cursor_get_buffer (wd->grab_cursor, 0,
&x, &y, &w, &h, &scale);
}
else if (wd->cursor)
if (wd->cursor)
{
buffer = _gdk_wayland_cursor_get_buffer (wd->cursor, wd->cursor_image_index,
&x, &y, &w, &h, &scale);
@@ -219,23 +217,27 @@ gdk_wayland_device_update_window_cursor (GdkWaylandDeviceData *wd)
if (!wd->wl_pointer)
return retval;
wl_pointer_set_cursor (wd->wl_pointer,
wd->enter_serial,
wd->pointer_surface,
x, y);
if (buffer)
{
wl_surface_attach (wd->pointer_surface, buffer, 0, 0);
wl_surface_set_buffer_scale (wd->pointer_surface, scale);
wl_surface_damage (wd->pointer_surface, 0, 0, w, h);
wl_surface_commit (wd->pointer_surface);
}
if (wd->grab_cursor)
wl_pointer_set_cursor (wd->wl_pointer,
wd->enter_serial,
wd->pointer_surface,
x, y);
}
else
{
/* We admit only static icons during drags so far */
gdk_wayland_device_stop_window_cursor_animation (wd);
return retval;
wl_pointer_set_cursor (wd->wl_pointer,
wd->enter_serial,
NULL,
0, 0);
wl_surface_attach (wd->pointer_surface, NULL, 0, 0);
wl_surface_commit (wd->pointer_surface);
}
next_image_index =
@@ -496,10 +498,10 @@ gdk_wayland_device_grab (GdkDevice *device,
wayland_device->wl_seat,
time_);
g_clear_object (&wayland_device->grab_cursor);
g_clear_object (&wayland_device->cursor);
if (cursor)
wayland_device->grab_cursor = g_object_ref (cursor);
wayland_device->cursor = g_object_ref (cursor);
gdk_wayland_device_update_window_cursor (wayland_device);
}
@@ -538,7 +540,6 @@ gdk_wayland_device_ungrab (GdkDevice *device,
else
{
/* Device is a pointer */
g_clear_object (&wayland_device->grab_cursor);
gdk_wayland_device_update_window_cursor (wayland_device);
if (wayland_device->pointer_grab_window)
@@ -881,7 +882,7 @@ pointer_handle_enter (void *data,
event->crossing.subwindow = NULL;
event->crossing.time = (guint32)(g_get_monotonic_time () / 1000);
event->crossing.mode = GDK_CROSSING_NORMAL;
event->crossing.detail = GDK_NOTIFY_ANCESTOR;
event->crossing.detail = GDK_NOTIFY_NONLINEAR;
event->crossing.focus = TRUE;
event->crossing.state = 0;
@@ -928,7 +929,7 @@ pointer_handle_leave (void *data,
event->crossing.subwindow = NULL;
event->crossing.time = (guint32)(g_get_monotonic_time () / 1000);
event->crossing.mode = GDK_CROSSING_NORMAL;
event->crossing.detail = GDK_NOTIFY_ANCESTOR;
event->crossing.detail = GDK_NOTIFY_NONLINEAR;
event->crossing.focus = TRUE;
event->crossing.state = 0;
@@ -1018,14 +1019,18 @@ pointer_handle_button (void *data,
switch (button)
{
case 273:
gdk_button = 3;
case BTN_LEFT:
gdk_button = GDK_BUTTON_PRIMARY;
break;
case 274:
gdk_button = 2;
case BTN_MIDDLE:
gdk_button = GDK_BUTTON_MIDDLE;
break;
case BTN_RIGHT:
gdk_button = GDK_BUTTON_SECONDARY;
break;
default:
gdk_button = button - 271;
/* For compatibility reasons, all additional buttons go after the old 4-7 scroll ones */
gdk_button = button - BUTTON_BASE + 4;
break;
}
@@ -1191,15 +1196,14 @@ keyboard_handle_leave (void *data,
GdkEvent *event;
GdkWaylandDisplay *display = GDK_WAYLAND_DISPLAY (device->display);
if (!surface)
return;
if (!GDK_IS_WINDOW (wl_surface_get_user_data (surface)))
return;
if (!device->keyboard_focus)
return;
/* gdk_window_is_destroyed() might already return TRUE for
* device->keyboard_focus here, which would happen if we destroyed the
* window before loosing keyboard focus.
*/
stop_key_repeat (device);
_gdk_wayland_display_update_serial (display, serial);
@@ -2155,8 +2159,6 @@ pointer_surface_update_scale (GdkWaylandDeviceData *device)
device->current_output_scale = scale;
if (device->grab_cursor)
_gdk_wayland_cursor_set_scale (device->grab_cursor, scale);
if (device->cursor)
_gdk_wayland_cursor_set_scale (device->cursor, scale);
+17 -19
View File
@@ -22,7 +22,9 @@
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#include <linux/memfd.h>
#include <sys/mman.h>
#include <sys/syscall.h>
#include <glib.h>
#include "gdkwayland.h"
@@ -975,41 +977,37 @@ static const struct wl_buffer_listener buffer_listener = {
static struct wl_shm_pool *
create_shm_pool (struct wl_shm *shm,
int width,
int height,
int size,
size_t *buf_length,
void **data_out)
{
char filename[] = "/tmp/wayland-shm-XXXXXX";
struct wl_shm_pool *pool;
int fd, size, stride;
int ret, fd;
void *data;
fd = mkstemp (filename);
if (fd < 0)
ret = syscall (__NR_memfd_create, "gdk-wayland", MFD_CLOEXEC);
if (ret < 0)
{
g_critical (G_STRLOC ": Unable to create temporary file (%s): %s",
filename, g_strerror (errno));
g_critical (G_STRLOC ": creating shared memory file failed: %s",
g_strerror (-ret));
return NULL;
}
stride = width * 4;
size = stride * height;
fd = ret;
if (ftruncate (fd, size) < 0)
{
g_critical (G_STRLOC ": Truncating temporary file failed: %s",
g_strerror (errno));
g_critical (G_STRLOC ": Truncating shared memory file failed: %m");
close (fd);
return NULL;
}
data = mmap (NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
unlink (filename);
if (data == MAP_FAILED)
{
g_critical (G_STRLOC ": mmap'ping temporary file failed: %s",
g_strerror (errno));
g_critical (G_STRLOC ": mmap'ping shared memory file failed: %m");
close (fd);
return NULL;
}
@@ -1056,10 +1054,10 @@ _gdk_wayland_display_create_shm_surface (GdkWaylandDisplay *display,
data->scale = scale;
data->busy = FALSE;
stride = width * 4;
stride = cairo_format_stride_for_width (CAIRO_FORMAT_ARGB32, width*scale);
data->pool = create_shm_pool (display->shm,
width*scale, height*scale,
height*scale*stride,
&data->buf_length,
&data->buf);
@@ -1067,11 +1065,11 @@ _gdk_wayland_display_create_shm_surface (GdkWaylandDisplay *display,
CAIRO_FORMAT_ARGB32,
width*scale,
height*scale,
stride*scale);
stride);
data->buffer = wl_shm_pool_create_buffer (data->pool, 0,
width*scale, height*scale,
stride*scale, WL_SHM_FORMAT_ARGB8888);
stride, WL_SHM_FORMAT_ARGB8888);
wl_buffer_add_listener (data->buffer, &buffer_listener, surface);
cairo_surface_set_user_data (surface, &gdk_wayland_cairo_key,
+12
View File
@@ -264,6 +264,12 @@ get_xkb_modifiers (struct xkb_keymap *xkb_keymap,
mods |= 1 << xkb_keymap_mod_get_index (xkb_keymap, XKB_MOD_NAME_LOGO);
if (state & GDK_MOD5_MASK)
mods |= 1 << xkb_keymap_mod_get_index (xkb_keymap, "Mod5");
if (state & GDK_SUPER_MASK)
mods |= 1 << xkb_keymap_mod_get_index (xkb_keymap, "Super");
if (state & GDK_HYPER_MASK)
mods |= 1 << xkb_keymap_mod_get_index (xkb_keymap, "Hyper");
if (state & GDK_META_MASK)
mods |= 1 << xkb_keymap_mod_get_index (xkb_keymap, "Meta");
return mods;
}
@@ -290,6 +296,12 @@ get_gdk_modifiers (struct xkb_keymap *xkb_keymap,
state |= GDK_MOD4_MASK;
if (mods & (1 << xkb_keymap_mod_get_index (xkb_keymap, "Mod5")))
state |= GDK_MOD5_MASK;
if (mods & (1 << xkb_keymap_mod_get_index (xkb_keymap, "Super")))
state |= GDK_SUPER_MASK;
if (mods & (1 << xkb_keymap_mod_get_index (xkb_keymap, "Hyper")))
state |= GDK_HYPER_MASK;
if (mods & (1 << xkb_keymap_mod_get_index (xkb_keymap, "Meta")))
state |= GDK_META_MASK;
return state;
}
+1 -1
View File
@@ -631,7 +631,7 @@ init_settings (GdkScreen *screen)
if (g_hash_table_lookup (screen_wayland->settings, (gpointer)translations[i].schema) != NULL)
continue;
schema = g_settings_schema_source_lookup (source, translations[i].schema, FALSE);
schema = g_settings_schema_source_lookup (source, translations[i].schema, TRUE);
if (schema != NULL)
{
settings = g_settings_new_full (schema, NULL, NULL);
+18 -21
View File
@@ -69,7 +69,6 @@ struct _DataOfferData
{
struct wl_data_offer *offer;
GList *targets; /* List of GdkAtom */
GdkAtom requested_target;
};
struct _AsyncWriteData
@@ -97,6 +96,7 @@ struct _GdkWaylandSelection
/* Source-side data */
StoredSelection stored_selection;
GArray *source_targets;
GdkAtom requested_target;
struct wl_data_source *clipboard_source;
GdkWindow *clipboard_owner;
@@ -657,7 +657,6 @@ gdk_wayland_selection_request_target (GdkWaylandSelection *wayland_selection,
GdkAtom target,
gint fd)
{
DataOfferData *offer;
GdkAtom selection;
if (wayland_selection->clipboard_owner == window)
@@ -667,10 +666,8 @@ gdk_wayland_selection_request_target (GdkWaylandSelection *wayland_selection,
else
return FALSE;
offer = selection_lookup_offer_by_atom (wayland_selection, selection);
if (wayland_selection->stored_selection.fd == fd &&
offer->requested_target == target)
wayland_selection->requested_target == target)
return FALSE;
/* If we didn't issue gdk_wayland_selection_check_write() yet
@@ -681,7 +678,7 @@ gdk_wayland_selection_request_target (GdkWaylandSelection *wayland_selection,
close (wayland_selection->stored_selection.fd);
wayland_selection->stored_selection.fd = fd;
offer->requested_target = target;
wayland_selection->requested_target = target;
if (window &&
gdk_wayland_selection_source_handles_target (wayland_selection, target))
@@ -782,9 +779,9 @@ data_source_send (void *data,
if (context)
{
gdk_wayland_device_unset_grab (gdk_drag_context_get_device (context));
_gdk_wayland_drag_context_emit_event (context, GDK_DROP_FINISHED,
GDK_CURRENT_TIME);
gdk_wayland_device_unset_grab (gdk_drag_context_get_device (context));
}
}
@@ -795,6 +792,7 @@ data_source_cancelled (void *data,
GdkWaylandSelection *wayland_selection = data;
GdkDragContext *context;
GdkDisplay *display;
GdkAtom atom;
g_debug (G_STRLOC ": %s source = %p",
G_STRFUNC, source);
@@ -802,16 +800,22 @@ data_source_cancelled (void *data,
display = gdk_display_get_default ();
if (source == wayland_selection->dnd_source)
{
gdk_wayland_selection_unset_data_source (display, atoms[ATOM_DND]);
atom = atoms[ATOM_DND];
else if (source == wayland_selection->clipboard_source)
atom = atoms[ATOM_CLIPBOARD];
else
return;
gdk_wayland_selection_unset_data_source (display, atom);
gdk_selection_owner_set (NULL, atom, GDK_CURRENT_TIME, TRUE);
if (source == wayland_selection->dnd_source)
{
context = gdk_wayland_drag_context_lookup_by_data_source (source);
if (context)
gdk_wayland_device_unset_grab (gdk_drag_context_get_device (context));
}
else if (source == wayland_selection->clipboard_source)
gdk_wayland_selection_unset_data_source (display, atoms[ATOM_CLIPBOARD]);
}
static const struct wl_data_source_listener data_source_listener = {
@@ -864,15 +868,9 @@ gdk_wayland_selection_get_data_source (GdkWindow *owner,
wayland_selection);
if (is_clipboard)
{
wayland_selection->clipboard_source = source;
wayland_selection->clipboard_owner = owner;
}
wayland_selection->clipboard_source = source;
else
{
wayland_selection->dnd_source = source;
wayland_selection->dnd_owner = owner;
}
wayland_selection->dnd_source = source;
return source;
}
@@ -892,7 +890,6 @@ gdk_wayland_selection_unset_data_source (GdkDisplay *display,
device = gdk_device_manager_get_client_pointer (device_manager);
gdk_wayland_device_set_selection (device, NULL);
wayland_selection->clipboard_owner = NULL;
if (wayland_selection->clipboard_source)
{
@@ -902,7 +899,6 @@ gdk_wayland_selection_unset_data_source (GdkDisplay *display,
}
else if (selection == atoms[ATOM_DND])
{
wayland_selection->dnd_owner = NULL;
wayland_selection->dnd_source = NULL;
}
}
@@ -1189,6 +1185,7 @@ gdk_wayland_selection_clear_targets (GdkDisplay *display,
{
GdkWaylandSelection *wayland_selection = gdk_wayland_display_get_selection (display);
wayland_selection->requested_target = GDK_NONE;
g_array_set_size (wayland_selection->source_targets, 0);
gdk_wayland_selection_unset_data_source (display, selection);
}
+128 -28
View File
@@ -888,9 +888,6 @@ gdk_wayland_window_create_subsurface (GdkWindow *window)
GdkWindowImplWayland *impl, *parent_impl = NULL;
GdkWaylandDisplay *display_wayland;
if (GDK_WINDOW_TYPE (window) != GDK_WINDOW_SUBSURFACE)
return;
impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
if (!impl->surface)
@@ -1209,13 +1206,87 @@ find_grab_input_seat (GdkWindow *window, GdkWindow *transient_for)
static gboolean
should_be_mapped (GdkWindow *window)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
/* Don't map crazy temp that GTK+ uses for internal X11 shenanigans. */
if (window->window_type == GDK_WINDOW_TEMP && window->x < 0 && window->y < 0)
return FALSE;
if (impl->hint == GDK_WINDOW_TYPE_HINT_DND)
return FALSE;
return TRUE;
}
static gboolean
should_map_as_subsurface (GdkWindow *window)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_SUBSURFACE)
return TRUE;
switch (impl->hint)
{
case GDK_WINDOW_TYPE_HINT_TOOLTIP:
return TRUE;
case GDK_WINDOW_TYPE_HINT_UTILITY:
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP)
return TRUE;
break;
default:
break;
}
return FALSE;
}
static gboolean
should_map_as_popup (GdkWindow *window)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
switch (impl->hint)
{
case GDK_WINDOW_TYPE_HINT_POPUP_MENU:
case GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU:
case GDK_WINDOW_TYPE_HINT_COMBO:
return TRUE;
case GDK_WINDOW_TYPE_HINT_UTILITY:
if (GDK_WINDOW_TYPE (window) != GDK_WINDOW_TEMP)
return TRUE;
break;
default:
break;
}
return FALSE;
}
/* Get the window that can be used as a parent for a popup, i.e. a xdg_surface
* or xdg_popup. If the window is not, traverse up the transiency parents until
* we find one.
*/
static GdkWindow *
get_popup_parent (GdkWindow *window)
{
while (window)
{
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
if (impl->xdg_popup || impl->xdg_surface)
return window;
window = impl->transient_for;
}
return NULL;
}
static void
gdk_wayland_window_map (GdkWindow *window)
{
@@ -1225,8 +1296,22 @@ gdk_wayland_window_map (GdkWindow *window)
if (!should_be_mapped (window))
return;
if (!impl->mapped && !impl->use_custom_surface)
if (impl->mapped || impl->use_custom_surface)
return;
if (should_map_as_subsurface (window))
{
if (impl->transient_for)
gdk_wayland_window_create_subsurface (window);
else
g_warning ("Couldn't map as window %p as susburface yet because it doesn't have a parent",
window);
}
else if (should_map_as_popup (window))
{
gboolean create_fallback = FALSE;
struct wl_seat *grab_input_seat;
/* Popup menus can appear without a transient parent, which means they
* cannot be positioned properly on Wayland. This attempts to guess the
* surface they should be positioned with by finding the surface beneath
@@ -1265,7 +1350,7 @@ gdk_wayland_window_map (GdkWindow *window)
}
if (transient_for)
transient_for = gdk_window_get_toplevel (transient_for);
transient_for = get_popup_parent (gdk_window_get_toplevel (transient_for));
/* If the position was not explicitly set, start the popup at the
* position of the device that holds the grab.
@@ -1276,31 +1361,45 @@ gdk_wayland_window_map (GdkWindow *window)
&window->x, &window->y, NULL);
}
else
transient_for = impl->transient_for;
transient_for = get_popup_parent (impl->transient_for);
if (transient_for &&
GDK_WINDOW_TYPE (window) != GDK_WINDOW_SUBSURFACE)
if (!transient_for)
{
struct wl_seat *grab_input_seat = find_grab_input_seat (window, transient_for);
if (grab_input_seat &&
(impl->hint == GDK_WINDOW_TYPE_HINT_POPUP_MENU ||
impl->hint == GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU ||
impl->hint == GDK_WINDOW_TYPE_HINT_COMBO))
g_warning ("Couldn't map as window %p as popup because it doesn't have a parent",
window);
create_fallback = TRUE;
}
else
{
grab_input_seat = find_grab_input_seat (window, transient_for);
if (!grab_input_seat)
{
gdk_wayland_window_create_xdg_popup (window,
transient_for,
grab_input_seat);
goto mapped;
g_warning ("Couldn't map window %p as popup because no grabbed seat found",
window);
create_fallback = TRUE;
}
}
if (impl->hint != GDK_WINDOW_TYPE_HINT_DND &&
GDK_WINDOW_TYPE (window) != GDK_WINDOW_SUBSURFACE)
gdk_wayland_window_create_xdg_surface (window);
mapped:
impl->mapped = TRUE;
if (!create_fallback)
{
gdk_wayland_window_create_xdg_popup (window,
transient_for,
grab_input_seat);
}
else
{
gdk_wayland_window_create_xdg_surface (window);
}
}
else
{
gdk_wayland_window_create_xdg_surface (window);
}
impl->mapped = TRUE;
}
static void
@@ -1312,9 +1411,6 @@ gdk_wayland_window_show (GdkWindow *window,
if (!impl->surface)
gdk_wayland_window_create_surface (window);
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_SUBSURFACE)
gdk_wayland_window_create_subsurface (window);
gdk_wayland_window_map (window);
_gdk_make_event (window, GDK_MAP, NULL, FALSE);
@@ -1673,7 +1769,11 @@ gdk_wayland_window_destroy (GdkWindow *window,
gdk_wayland_window_hide_surface (window);
if (impl->cairo_surface)
cairo_surface_finish (impl->cairo_surface);
{
cairo_surface_finish (impl->cairo_surface);
cairo_surface_destroy (impl->cairo_surface);
impl->cairo_surface = NULL;
}
}
static void
@@ -1846,7 +1946,7 @@ gdk_wayland_window_set_transient_for (GdkWindow *window,
gdk_wayland_window_sync_parent (window);
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_SUBSURFACE &&
if (should_map_as_subsurface (window) &&
parent && gdk_window_is_visible (window))
gdk_wayland_window_create_subsurface (window);
}
+2 -4
View File
@@ -266,10 +266,9 @@ gdk_device_virtual_grab (GdkDevice *device,
{
if (GetCursor () == GDK_WIN32_CURSOR (_gdk_win32_grab_cursor)->hcursor)
SetCursor (NULL);
g_clear_object (&_gdk_win32_grab_cursor);
}
_gdk_win32_grab_cursor = cursor;
g_set_object (&_gdk_win32_grab_cursor, cursor);
if (_gdk_win32_grab_cursor != NULL)
SetCursor (GDK_WIN32_CURSOR (_gdk_win32_grab_cursor)->hcursor);
@@ -303,9 +302,8 @@ gdk_device_virtual_ungrab (GdkDevice *device,
{
if (GetCursor () == GDK_WIN32_CURSOR (_gdk_win32_grab_cursor)->hcursor)
SetCursor (NULL);
g_clear_object (&_gdk_win32_grab_cursor);
}
_gdk_win32_grab_cursor = NULL;
g_clear_object (&_gdk_win32_grab_cursor);
ReleaseCapture ();
}
+90 -3
View File
@@ -26,10 +26,12 @@
#include "gdkwin32window.h"
#include "gdkwin32.h"
static int debug_indent = 0;
/**
* gdk_win32_display_set_cursor_theme:
* @display: (type GdkWin32Display): a #GdkDisplay
* @theme: (allow-none) the name of the cursor theme to use, or %NULL to unset
* @name: (allow-none): the name of the cursor theme to use, or %NULL to unset
* a previously set value
* @size: the cursor size to use, or 0 to keep the previous size
*
@@ -242,6 +244,81 @@ _gdk_monitor_init (void)
}
}
static LRESULT CALLBACK
inner_display_change_window_procedure (HWND hwnd,
UINT message,
WPARAM wparam,
LPARAM lparam)
{
switch (message)
{
case WM_DESTROY:
{
PostQuitMessage (0);
return 0;
}
case WM_DISPLAYCHANGE:
{
_gdk_monitor_init ();
_gdk_root_window_size_init ();
g_signal_emit_by_name (_gdk_screen, "size_changed");
return 0;
}
default:
/* Otherwise call DefWindowProcW(). */
GDK_NOTE (EVENTS, g_print (" DefWindowProcW"));
return DefWindowProc (hwnd, message, wparam, lparam);
}
}
static LRESULT CALLBACK
display_change_window_procedure (HWND hwnd,
UINT message,
WPARAM wparam,
LPARAM lparam)
{
LRESULT retval;
GDK_NOTE (EVENTS, g_print ("%s%*s%s %p",
(debug_indent > 0 ? "\n" : ""),
debug_indent, "",
_gdk_win32_message_to_string (message), hwnd));
debug_indent += 2;
retval = inner_display_change_window_procedure (hwnd, message, wparam, lparam);
debug_indent -= 2;
GDK_NOTE (EVENTS, g_print (" => %" G_GINT64_FORMAT "%s", (gint64) retval, (debug_indent == 0 ? "\n" : "")));
return retval;
}
/* Use a hidden window to be notified about display changes */
static void
register_display_change_notification (GdkDisplay *display)
{
GdkWin32Display *display_win32 = GDK_WIN32_DISPLAY (display);
WNDCLASS wclass = { 0, };
ATOM klass;
wclass.lpszClassName = "GdkDisplayChange";
wclass.lpfnWndProc = display_change_window_procedure;
wclass.hInstance = _gdk_app_hmodule;
klass = RegisterClass (&wclass);
if (klass)
{
display_win32->hwnd = CreateWindow (MAKEINTRESOURCE (klass),
NULL, WS_POPUP,
0, 0, 0, 0, NULL, NULL,
_gdk_app_hmodule, NULL);
if (!display_win32->hwnd)
{
UnregisterClass (MAKEINTRESOURCE (klass), _gdk_app_hmodule);
}
}
}
GdkDisplay *
_gdk_win32_display_open (const gchar *display_name)
{
@@ -276,6 +353,8 @@ _gdk_win32_display_open (const gchar *display_name)
/* Precalculate display name */
(void) gdk_display_get_name (_gdk_display);
register_display_change_notification (_gdk_display);
g_signal_emit_by_name (_gdk_display, "opened");
GDK_NOTE (MISC, g_print ("... _gdk_display now set up\n"));
@@ -376,7 +455,6 @@ gdk_win32_display_supports_selection_notification (GdkDisplay *display)
}
static HWND _hwnd_next_viewer = NULL;
static int debug_indent = 0;
/*
* maybe this should be integrated with the default message loop - or maybe not ;-)
@@ -619,7 +697,6 @@ gdk_win32_display_flush (GdkDisplay * display)
GdiFlush ();
}
static void
gdk_win32_display_sync (GdkDisplay * display)
{
@@ -631,6 +708,15 @@ gdk_win32_display_sync (GdkDisplay * display)
static void
gdk_win32_display_dispose (GObject *object)
{
GdkWin32Display *display_win32 = GDK_WIN32_DISPLAY (object);
if (display_win32->hwnd != NULL)
{
DestroyWindow (display_win32->hwnd);
display_win32->hwnd = NULL;
}
G_OBJECT_CLASS (gdk_win32_display_parent_class)->dispose (object);
}
static void
@@ -639,6 +725,7 @@ gdk_win32_display_finalize (GObject *object)
GdkWin32Display *display_win32 = GDK_WIN32_DISPLAY (object);
_gdk_win32_display_finalize_cursors (display_win32);
_gdk_win32_dnd_exit ();
G_OBJECT_CLASS (gdk_win32_display_parent_class)->finalize (object);
}
+2
View File
@@ -31,6 +31,8 @@ struct _GdkWin32Display
int cursor_theme_size;
GHashTable *cursor_cache;
HWND hwnd;
/* WGL/OpenGL Items */
guint have_wgl : 1;
guint gl_version;
+4
View File
@@ -1569,6 +1569,8 @@ add_format (GArray *fmts,
void
_gdk_dnd_init (void)
{
CoInitializeEx (NULL, COINIT_APARTMENTTHREADED);
if (getenv ("GDK_WIN32_USE_EXPERIMENTAL_OLE2_DND"))
use_ole2_dnd = TRUE;
@@ -1615,6 +1617,8 @@ _gdk_win32_dnd_exit (void)
{
OleUninitialize ();
}
CoUninitialize ();
}
/* Source side */
+138 -94
View File
@@ -1611,14 +1611,6 @@ sync_timer_proc (HWND hwnd,
KillTimer (hwnd, sync_timer);
}
static void
handle_display_change (void)
{
_gdk_monitor_init ();
_gdk_root_window_size_init ();
g_signal_emit_by_name (_gdk_screen, "size_changed");
}
static gboolean
handle_nchittest (HWND hwnd,
GdkWindow *window,
@@ -1687,35 +1679,72 @@ generate_button_event (GdkEventType type,
_gdk_win32_append_event (event);
}
/**
* Used by the stacking functions to see if a window
* should be always on top.
* Restacking is only done if both windows are either ontop
* or not ontop.
*/
static gboolean
should_window_be_always_on_top (GdkWindow *window)
{
DWORD exstyle;
if ((GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP) ||
(window->state & GDK_WINDOW_STATE_ABOVE))
return TRUE;
exstyle = GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE);
if (exstyle & WS_EX_TOPMOST)
return TRUE;
return FALSE;
}
static void
ensure_stacking_on_unminimize (MSG *msg)
{
HWND rover;
HWND lowest_transient = NULL;
GdkWindow *msg_window;
gboolean window_ontop = FALSE;
rover = msg->hwnd;
while ((rover = GetNextWindow (rover, GW_HWNDNEXT)))
msg_window = gdk_win32_handle_table_lookup (msg->hwnd);
if (msg_window)
window_ontop = should_window_be_always_on_top (msg_window);
for (rover = GetNextWindow (msg->hwnd, GW_HWNDNEXT);
rover;
rover = GetNextWindow (rover, GW_HWNDNEXT))
{
GdkWindow *rover_gdkw = gdk_win32_handle_table_lookup (rover);
GdkWindowImplWin32 *rover_impl;
gboolean rover_ontop;
/* Checking window group not implemented yet */
if (rover_gdkw)
{
GdkWindowImplWin32 *rover_impl =
GDK_WINDOW_IMPL_WIN32 (rover_gdkw->impl);
if (rover_gdkw == NULL)
continue;
if (GDK_WINDOW_IS_MAPPED (rover_gdkw) &&
(rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY ||
rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_DIALOG ||
rover_impl->transient_owner != NULL))
{
lowest_transient = rover;
}
}
rover_ontop = should_window_be_always_on_top (rover_gdkw);
rover_impl = GDK_WINDOW_IMPL_WIN32 (rover_gdkw->impl);
if (GDK_WINDOW_IS_MAPPED (rover_gdkw) &&
(rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY ||
rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_DIALOG ||
rover_impl->transient_owner != NULL) &&
((window_ontop && rover_ontop) || (!window_ontop && !rover_ontop)))
{
lowest_transient = rover;
}
}
if (lowest_transient != NULL)
{
GDK_NOTE (EVENTS, g_print (" restacking: %p", lowest_transient));
GDK_NOTE (EVENTS,
g_print (" restacking %p above %p",
msg->hwnd, lowest_transient));
SetWindowPos (msg->hwnd, lowest_transient, 0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
}
@@ -1727,52 +1756,61 @@ ensure_stacking_on_window_pos_changing (MSG *msg,
{
GdkWindowImplWin32 *impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
WINDOWPOS *windowpos = (WINDOWPOS *) msg->lParam;
HWND rover;
gboolean restacking;
gboolean window_ontop;
if (GetActiveWindow () == msg->hwnd &&
impl->type_hint != GDK_WINDOW_TYPE_HINT_UTILITY &&
impl->type_hint != GDK_WINDOW_TYPE_HINT_DIALOG &&
impl->transient_owner == NULL)
if (GetActiveWindow () != msg->hwnd ||
impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY ||
impl->type_hint == GDK_WINDOW_TYPE_HINT_DIALOG ||
impl->transient_owner != NULL)
return FALSE;
/* Make sure the window stays behind any transient-type windows
* of the same window group.
*
* If the window is not active and being activated, we let
* Windows bring it to the top and rely on the WM_ACTIVATEAPP
* handling to bring any utility windows on top of it.
*/
window_ontop = should_window_be_always_on_top (window);
for (rover = windowpos->hwndInsertAfter, restacking = FALSE;
rover;
rover = GetNextWindow (rover, GW_HWNDNEXT))
{
/* Make sure the window stays behind any transient-type windows
* of the same window group.
*
* If the window is not active and being activated, we let
* Windows bring it to the top and rely on the WM_ACTIVATEAPP
* handling to bring any utility windows on top of it.
*/
HWND rover;
gboolean restacking;
GdkWindow *rover_gdkw = gdk_win32_handle_table_lookup (rover);
GdkWindowImplWin32 *rover_impl;
gboolean rover_ontop;
rover = windowpos->hwndInsertAfter;
restacking = FALSE;
while (rover)
{
GdkWindow *rover_gdkw = gdk_win32_handle_table_lookup (rover);
/* Checking window group not implemented yet */
/* Checking window group not implemented yet */
if (rover_gdkw)
{
GdkWindowImplWin32 *rover_impl =
GDK_WINDOW_IMPL_WIN32 (rover_gdkw->impl);
if (rover_gdkw == NULL)
continue;
if (GDK_WINDOW_IS_MAPPED (rover_gdkw) &&
(rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY ||
rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_DIALOG ||
rover_impl->transient_owner != NULL))
{
restacking = TRUE;
windowpos->hwndInsertAfter = rover;
}
}
rover = GetNextWindow (rover, GW_HWNDNEXT);
}
rover_ontop = should_window_be_always_on_top (rover_gdkw);
rover_impl = GDK_WINDOW_IMPL_WIN32 (rover_gdkw->impl);
if (restacking)
{
GDK_NOTE (EVENTS, g_print (" restacking: %p", windowpos->hwndInsertAfter));
return TRUE;
}
if (GDK_WINDOW_IS_MAPPED (rover_gdkw) &&
(rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY ||
rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_DIALOG ||
rover_impl->transient_owner != NULL) &&
((window_ontop && rover_ontop) || (!window_ontop && !rover_ontop)))
{
restacking = TRUE;
windowpos->hwndInsertAfter = rover;
}
}
if (restacking)
{
GDK_NOTE (EVENTS,
g_print (" letting Windows restack %p above %p",
msg->hwnd, windowpos->hwndInsertAfter));
return TRUE;
}
return FALSE;
}
@@ -1781,6 +1819,8 @@ ensure_stacking_on_activate_app (MSG *msg,
GdkWindow *window)
{
GdkWindowImplWin32 *impl = GDK_WINDOW_IMPL_WIN32 (window->impl);
HWND rover;
gboolean window_ontop;
if (impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY ||
impl->type_hint == GDK_WINDOW_TYPE_HINT_DIALOG ||
@@ -1791,38 +1831,46 @@ ensure_stacking_on_activate_app (MSG *msg,
return;
}
if (IsWindowVisible (msg->hwnd) &&
msg->hwnd == GetActiveWindow ())
if (!IsWindowVisible (msg->hwnd) ||
msg->hwnd != GetActiveWindow ())
return;
/* This window is not a transient-type window and it is the
* activated window. Make sure this window is as visible as
* possible, just below the lowest transient-type window of this
* app.
*/
window_ontop = should_window_be_always_on_top (window);
for (rover = GetNextWindow (msg->hwnd, GW_HWNDPREV);
rover;
rover = GetNextWindow (rover, GW_HWNDPREV))
{
/* This window is not a transient-type window and it is the
* activated window. Make sure this window is as visible as
* possible, just below the lowest transient-type window of this
* app.
*/
HWND rover;
GdkWindow *rover_gdkw = gdk_win32_handle_table_lookup (rover);
GdkWindowImplWin32 *rover_impl;
gboolean rover_ontop;
rover = msg->hwnd;
while ((rover = GetNextWindow (rover, GW_HWNDPREV)))
{
GdkWindow *rover_gdkw = gdk_win32_handle_table_lookup (rover);
/* Checking window group not implemented yet */
if (rover_gdkw == NULL)
continue;
/* Checking window group not implemented yet */
if (rover_gdkw)
{
GdkWindowImplWin32 *rover_impl =
GDK_WINDOW_IMPL_WIN32 (rover_gdkw->impl);
rover_ontop = should_window_be_always_on_top (rover_gdkw);
rover_impl = GDK_WINDOW_IMPL_WIN32 (rover_gdkw->impl);
if (GDK_WINDOW_IS_MAPPED (rover_gdkw) &&
(rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY ||
rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_DIALOG ||
rover_impl->transient_owner != NULL))
{
GDK_NOTE (EVENTS, g_print (" restacking: %p", rover));
SetWindowPos (msg->hwnd, rover, 0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
break;
}
}
if (GDK_WINDOW_IS_MAPPED (rover_gdkw) &&
(rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY ||
rover_impl->type_hint == GDK_WINDOW_TYPE_HINT_DIALOG ||
rover_impl->transient_owner != NULL) &&
((window_ontop && rover_ontop) || (!window_ontop && !rover_ontop)))
{
GDK_NOTE (EVENTS,
g_print (" restacking %p above %p",
msg->hwnd, rover));
SetWindowPos (msg->hwnd, rover, 0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
break;
}
}
}
@@ -3202,10 +3250,6 @@ gdk_event_translate (MSG *msg,
return_val = TRUE;
break;
case WM_DISPLAYCHANGE:
handle_display_change ();
break;
case WM_DWMCOMPOSITIONCHANGED:
_gdk_win32_window_enable_transparency (window);
break;
-2
View File
@@ -97,8 +97,6 @@ _gdk_win32_windowing_init (void)
GDK_NOTE (EVENTS, g_print ("input_locale:%p, codepage:%d\n",
_gdk_input_locale, _gdk_input_codepage));
CoInitialize (NULL);
_gdk_selection = gdk_atom_intern_static_string ("GDK_SELECTION");
_wm_transient_for = gdk_atom_intern_static_string ("WM_TRANSIENT_FOR");
_targets = gdk_atom_intern_static_string ("TARGETS");
+1 -1
View File
@@ -52,7 +52,7 @@ GType gdk_win32_display_get_type (void);
GDK_AVAILABLE_IN_3_18
void gdk_win32_display_set_cursor_theme (GdkDisplay *display,
const gchar *theme,
const gchar *name,
gint size);
G_END_DECLS
+64 -17
View File
@@ -60,6 +60,13 @@ struct _FullscreenInfo
LONG style;
};
/* Use this for hWndInsertAfter (2nd argument to SetWindowPos()) if
* SWP_NOZORDER flag is used. Otherwise it's unobvious why a particular
* argument is used. Using NULL is misleading, because
* NULL is equivalent to HWND_TOP.
*/
#define SWP_NOZORDER_SPECIFIED HWND_TOP
static void update_style_bits (GdkWindow *window);
static gboolean _gdk_window_get_functions (GdkWindow *window,
GdkWMFunction *functions);
@@ -694,7 +701,8 @@ _gdk_win32_display_create_window_impl (GdkDisplay *display,
/* Now we know the initial position, move to actually specified position */
if (real_x != x || real_y != y)
{
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
SWP_NOZORDER_SPECIFIED,
real_x, real_y, 0, 0,
SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER));
}
@@ -1027,7 +1035,8 @@ show_window_internal (GdkWindow *window,
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TEMP || !focus_on_map)
flags |= SWP_NOACTIVATE;
SetWindowPos (GDK_WINDOW_HWND (window), HWND_TOP, 0, 0, 0, 0, flags);
SetWindowPos (GDK_WINDOW_HWND (window),
SWP_NOZORDER_SPECIFIED, 0, 0, 0, 0, flags);
return;
}
@@ -1097,7 +1106,8 @@ show_window_internal (GdkWindow *window,
y = center_on_rect.top + ((center_on_rect.bottom - center_on_rect.top) - (window_rect.bottom - window_rect.top)) / 2;
}
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
SWP_NOZORDER_SPECIFIED,
x, y, 0, 0,
SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER));
}
@@ -1146,7 +1156,8 @@ show_window_internal (GdkWindow *window,
}
if (x != window_rect.left || y != window_rect.top)
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
SWP_NOZORDER_SPECIFIED,
window_rect.left, window_rect.top, 0, 0,
SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER));
}
@@ -1218,9 +1229,12 @@ gdk_win32_window_hide (GdkWindow *window)
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TOPLEVEL)
ShowOwnedPopups (GDK_WINDOW_HWND (window), FALSE);
/* Use SetWindowPos to hide transparent windows so automatic redraws
* in other windows can be suppressed.
*/
if (GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE) & WS_EX_TRANSPARENT)
{
SetWindowPos (GDK_WINDOW_HWND (window), HWND_BOTTOM,
SetWindowPos (GDK_WINDOW_HWND (window), SWP_NOZORDER_SPECIFIED,
0, 0, 0, 0,
SWP_HIDEWINDOW | SWP_NOREDRAW | SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE);
}
@@ -1279,7 +1293,8 @@ gdk_win32_window_move (GdkWindow *window,
GDK_WINDOW_HWND (window),
x - _gdk_offset_x, y - _gdk_offset_y));
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
SWP_NOZORDER_SPECIFIED,
x - _gdk_offset_x, y - _gdk_offset_y, 0, 0,
SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOZORDER));
}
@@ -1321,7 +1336,8 @@ gdk_win32_window_resize (GdkWindow *window,
outer_rect.right - outer_rect.left,
outer_rect.bottom - outer_rect.top));
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
SWP_NOZORDER_SPECIFIED,
0, 0,
outer_rect.right - outer_rect.left,
outer_rect.bottom - outer_rect.top,
@@ -1373,7 +1389,8 @@ gdk_win32_window_move_resize_internal (GdkWindow *window,
outer_rect.right - outer_rect.left,
outer_rect.bottom - outer_rect.top));
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window), NULL,
API_CALL (SetWindowPos, (GDK_WINDOW_HWND (window),
SWP_NOZORDER_SPECIFIED,
x - _gdk_offset_x, y - _gdk_offset_y,
outer_rect.right - outer_rect.left,
outer_rect.bottom - outer_rect.top,
@@ -2402,6 +2419,10 @@ update_style_bits (GdkWindow *window)
LONG old_style, new_style, old_exstyle, new_exstyle;
gboolean all;
RECT rect, before, after;
gboolean was_topmost;
gboolean will_be_topmost;
HWND insert_after;
UINT flags;
if (window->state & GDK_WINDOW_STATE_FULLSCREEN)
return;
@@ -2413,15 +2434,27 @@ update_style_bits (GdkWindow *window)
after = before;
AdjustWindowRectEx (&before, old_style, FALSE, old_exstyle);
was_topmost = (old_exstyle & WS_EX_TOPMOST) ? TRUE : FALSE;
will_be_topmost = was_topmost;
old_exstyle &= ~WS_EX_TOPMOST;
new_style = old_style;
new_exstyle = old_exstyle;
if (window->window_type == GDK_WINDOW_TEMP)
new_exstyle |= WS_EX_TOOLWINDOW | WS_EX_TOPMOST;
{
new_exstyle |= WS_EX_TOOLWINDOW;
will_be_topmost = TRUE;
}
else if (impl->type_hint == GDK_WINDOW_TYPE_HINT_UTILITY)
new_exstyle |= WS_EX_TOOLWINDOW ;
{
new_exstyle |= WS_EX_TOOLWINDOW;
}
else
new_exstyle &= ~WS_EX_TOOLWINDOW;
{
new_exstyle &= ~WS_EX_TOOLWINDOW;
}
if (get_effective_window_decorations (window, &decorations))
{
@@ -2469,12 +2502,26 @@ update_style_bits (GdkWindow *window)
rect.right += after.right - before.right;
rect.bottom += after.bottom - before.bottom;
SetWindowPos (GDK_WINDOW_HWND (window), NULL,
rect.left, rect.top,
rect.right - rect.left, rect.bottom - rect.top,
SWP_FRAMECHANGED | SWP_NOACTIVATE |
SWP_NOREPOSITION | SWP_NOZORDER);
flags = SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOREPOSITION;
if (will_be_topmost && !was_topmost)
{
insert_after = HWND_TOPMOST;
}
else if (was_topmost && !will_be_topmost)
{
insert_after = HWND_NOTOPMOST;
}
else
{
flags |= SWP_NOZORDER;
insert_after = SWP_NOZORDER_SPECIFIED;
}
SetWindowPos (GDK_WINDOW_HWND (window), insert_after,
0, 0,
rect.right - rect.left, rect.bottom - rect.top,
flags);
}
static void
@@ -3057,7 +3104,7 @@ gdk_win32_window_set_skip_taskbar_hint (GdkWindow *window,
SetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE,
GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE) & ~(WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_SYSMENU));
SetWindowPos (GDK_WINDOW_HWND (window), NULL,
SetWindowPos (GDK_WINDOW_HWND (window), SWP_NOZORDER_SPECIFIED,
0, 0, 0, 0,
SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE |
SWP_NOREPOSITION | SWP_NOSIZE | SWP_NOZORDER);
+20 -4
View File
@@ -611,17 +611,23 @@ static const struct {
const gchar *css_name, *traditional_name;
} name_map[] = {
{ "default", "left_ptr" },
{ "help", "left_ptr" },
{ "context-menu", "left_ptr" },
{ "pointer", "hand" },
{ "progress", "left_ptr_watch" },
{ "wait", "watch" },
{ "cell", "crosshair" },
{ "crosshair", "cross" },
{ "text", "xterm" },
{ "vertical-text","xterm" },
{ "alias", "dnd-link" },
{ "copy", "dnd-copy" },
{ "move", "dnd-move" },
{ "no-drop", "dnd-none" },
{ "not-allowed", "crossed_circle" },
{ "grab", "hand2" },
{ "grabbing", "hand2" },
{ "all-scroll", "left_ptr" },
{ "col-resize", "h_double_arrow" },
{ "row-resize", "v_double_arrow" },
{ "n-resize", "top_side" },
@@ -636,6 +642,8 @@ static const struct {
{ "ns-resize", "v_double_arrow" },
{ "nesw-resize", "fd_double_arrow" },
{ "nwse-resize", "bd_double_arrow" },
{ "zoom-in", "left_ptr" },
{ "zoom-out", "left_ptr" },
{ NULL, NULL }
};
@@ -650,7 +658,7 @@ name_fallback (const gchar *name)
return name_map[i].traditional_name;
}
return "left_ptr";
return NULL;
}
GdkCursor*
@@ -683,9 +691,17 @@ _gdk_x11_display_get_cursor_for_name (GdkDisplay *display,
xdisplay = GDK_DISPLAY_XDISPLAY (display);
xcursor = XcursorLibraryLoadCursor (xdisplay, name);
if (xcursor == None)
xcursor = XcursorLibraryLoadCursor (xdisplay, name_fallback (name));
if (xcursor == None)
xcursor = XcursorLibraryLoadCursor (xdisplay, "left_ptr");
{
const char *fallback;
fallback = name_fallback (name);
if (fallback)
{
xcursor = XcursorLibraryLoadCursor (xdisplay, fallback);
if (xcursor == None)
xcursor = XcursorLibraryLoadCursor (xdisplay, "left_ptr");
}
}
if (xcursor == None)
return NULL;
}
+5 -1
View File
@@ -807,6 +807,7 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
int mode)
{
GdkToplevelX11 *toplevel;
GdkX11Screen *x11_screen;
gboolean had_focus;
g_return_if_fail (GDK_IS_WINDOW (window));
@@ -828,6 +829,7 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
return;
had_focus = HAS_FOCUS (toplevel);
x11_screen = GDK_X11_SCREEN (gdk_window_get_screen (window));
switch (detail)
{
@@ -841,6 +843,7 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
* has_focus_window case.
*/
if (toplevel->has_pointer &&
!x11_screen->wmspec_check_window &&
mode != NotifyGrab &&
#ifdef XINPUT_2
mode != XINotifyPassiveGrab &&
@@ -871,7 +874,8 @@ _gdk_device_manager_core_handle_focus (GdkWindow *window,
* but the pointer focus is ignored while a
* grab is in effect
*/
if (mode != NotifyGrab &&
if (!x11_screen->wmspec_check_window &&
mode != NotifyGrab &&
#ifdef XINPUT_2
mode != XINotifyPassiveGrab &&
mode != XINotifyPassiveUngrab &&
+40
View File
@@ -301,6 +301,39 @@ is_touch_device (XIAnyClassInfo **classes,
return FALSE;
}
static gboolean
has_abs_axes (GdkDisplay *display,
XIAnyClassInfo **classes,
guint n_classes)
{
gboolean has_x = FALSE, has_y = FALSE;
Atom abs_x, abs_y;
guint i;
abs_x = gdk_x11_get_xatom_by_name_for_display (display, "Abs X");
abs_y = gdk_x11_get_xatom_by_name_for_display (display, "Abs Y");
for (i = 0; i < n_classes; i++)
{
XIValuatorClassInfo *class = (XIValuatorClassInfo *) classes[i];
if (class->type != XIValuatorClass)
continue;
if (class->mode != XIModeAbsolute)
continue;
if (class->label == abs_x)
has_x = TRUE;
else if (class->label == abs_y)
has_y = TRUE;
if (has_x && has_y)
break;
}
return (has_x && has_y);
}
static gboolean
get_device_ids (GdkDisplay *display,
XIDeviceInfo *info,
@@ -393,6 +426,13 @@ create_device (GdkDeviceManager *device_manager,
else if (strstr (tmp_name, "wacom") ||
strstr (tmp_name, "pen"))
input_source = GDK_SOURCE_PEN;
else if (!strstr (tmp_name, "mouse") &&
!strstr (tmp_name, "pointer") &&
!strstr (tmp_name, "qemu usb tablet") &&
!strstr (tmp_name, "spice vdagent tablet") &&
!strstr (tmp_name, "virtualbox usb tablet") &&
has_abs_axes (display, dev->classes, dev->num_classes))
input_source = GDK_SOURCE_TOUCHSCREEN;
else
input_source = GDK_SOURCE_MOUSE;
+18 -11
View File
@@ -1342,6 +1342,7 @@ gdk_x11_display_init_input (GdkDisplay *display)
GdkDeviceManager *device_manager;
GdkDevice *device;
GList *list, *l;
gint pass;
display_x11 = GDK_X11_DISPLAY (display);
device_manager = gdk_display_get_device_manager (display);
@@ -1365,25 +1366,31 @@ gdk_x11_display_init_input (GdkDisplay *display)
g_list_free (list);
/* Now set "core" pointer to the first
* master device that is a pointer.
* master device that is a pointer,
* preferring mice over touchscreens.
*/
list = gdk_device_manager_list_devices (device_manager, GDK_DEVICE_TYPE_MASTER);
for (l = list; l; l = l->next)
for (pass = 0; pass < 2; pass++)
{
device = l->data;
for (l = list; l; l = l->next)
{
device = l->data;
if (gdk_device_get_source (device) != GDK_SOURCE_MOUSE)
continue;
if ((pass == 0 && gdk_device_get_source (device) == GDK_SOURCE_MOUSE) ||
(pass == 1 && gdk_device_get_source (device) == GDK_SOURCE_TOUCHSCREEN))
{
display->core_pointer = device;
display->core_pointer = device;
break;
/* Add the core pointer to the devices list */
display_x11->input_devices = g_list_prepend (display_x11->input_devices,
g_object_ref (display->core_pointer));
goto out;
}
}
}
/* Add the core pointer to the devices list */
display_x11->input_devices = g_list_prepend (display_x11->input_devices,
g_object_ref (display->core_pointer));
out:
g_list_free (list);
}
+5
View File
@@ -132,11 +132,16 @@ static void
handle_focus_change (GdkEventCrossing *event)
{
GdkToplevelX11 *toplevel;
GdkX11Screen *x11_screen;
gboolean focus_in, had_focus;
toplevel = _gdk_x11_window_get_toplevel (event->window);
x11_screen = GDK_X11_SCREEN (gdk_window_get_screen (event->window));
focus_in = (event->type == GDK_ENTER_NOTIFY);
if (x11_screen->wmspec_check_window)
return;
if (!toplevel || event->detail == GDK_NOTIFY_INFERIOR)
return;
+139 -89
View File
@@ -328,8 +328,8 @@ get_work_area (GdkScreen *screen,
/* Defaults in case of error */
area->x = 0;
area->y = 0;
area->width = gdk_screen_get_width (screen) / x11_screen->window_scale;
area->height = gdk_screen_get_height (screen) / x11_screen->window_scale;
area->width = gdk_screen_get_width (screen);
area->height = gdk_screen_get_height (screen);
if (!gdk_x11_screen_supports_net_wm_hint (screen,
gdk_atom_intern_static_string ("_NET_WORKAREA")))
@@ -503,7 +503,7 @@ check_is_composited (GdkDisplay *display,
static void
init_monitor_geometry (GdkX11Monitor *monitor,
int x, int y, int width, int height)
int x, int y, int width, int height)
{
monitor->geometry.x = x;
monitor->geometry.y = y;
@@ -613,22 +613,30 @@ monitor_compare_function (GdkX11Monitor *monitor1,
}
#endif
#ifdef HAVE_RANDR15
static gboolean
init_randr15 (GdkScreen *screen)
{
#ifdef HAVE_RANDR15
GdkDisplay *display = gdk_screen_get_display (screen);
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
XRRMonitorInfo *rr_monitors;
int num_rr_monitors;
XRRScreenResources *resources;
RROutput primary_output = None;
RROutput first_output = None;
int i;
GArray *monitors;
XID primary_output = None;
gboolean randr12_compat = FALSE;
XRRMonitorInfo *rr_monitors;
int num_rr_monitors;
if (!display_x11->have_randr15)
return FALSE;
resources = XRRGetScreenResourcesCurrent (x11_screen->xdisplay,
x11_screen->xroot_window);
if (!resources)
return FALSE;
rr_monitors = XRRGetMonitors (x11_screen->xdisplay,
x11_screen->xroot_window,
True,
@@ -636,11 +644,34 @@ init_randr15 (GdkScreen *screen)
if (!rr_monitors)
return FALSE;
monitors = g_array_sized_new (FALSE, TRUE, sizeof (GdkX11Monitor),
num_rr_monitors);
monitors = g_array_sized_new (FALSE, TRUE, sizeof (GdkX11Monitor), num_rr_monitors);
for (i = 0; i < num_rr_monitors; i++)
{
RROutput output = rr_monitors[i].outputs[0];
XRROutputInfo *output_info;
GdkX11Monitor monitor;
gdk_x11_display_error_trap_push (display);
output_info = XRRGetOutputInfo (x11_screen->xdisplay, resources, output);
if (gdk_x11_display_error_trap_pop (display))
continue;
if (output_info == NULL)
continue;
/* Non RandR1.2+ X driver have output name "default" */
randr12_compat |= !g_strcmp0 (output_info->name, "default");
if (output_info->connection == RR_Disconnected)
{
XRRFreeOutputInfo (output_info);
continue;
}
if (first_output == None)
first_output = output;
init_monitor_geometry (&monitor,
rr_monitors[i].x,
rr_monitors[i].y,
@@ -649,34 +680,62 @@ init_randr15 (GdkScreen *screen)
monitor.width_mm = rr_monitors[i].mwidth;
monitor.height_mm = rr_monitors[i].mheight;
monitor.output = rr_monitors[i].outputs[0];
monitor.output = output;
monitor.output_name = g_strndup (output_info->name, output_info->nameLen);
if (rr_monitors[i].primary)
primary_output = monitor.output;
g_array_append_val (monitors, monitor);
XRRFreeOutputInfo (output_info);
}
XRRFreeMonitors (rr_monitors);
g_array_sort (monitors,
(GCompareFunc) monitor_compare_function);
XRRFreeMonitors (rr_monitors);
XRRFreeScreenResources (resources);
/* non RandR 1.2+ X driver doesn't return any usable multihead data */
if (randr12_compat)
{
guint n_monitors = monitors->len;
free_monitors ((GdkX11Monitor *)g_array_free (monitors, FALSE), n_monitors);
return FALSE;
}
g_array_sort (monitors, (GCompareFunc) monitor_compare_function);
x11_screen->n_monitors = monitors->len;
x11_screen->monitors = (GdkX11Monitor *) g_array_free (monitors, FALSE);
x11_screen->primary_monitor = 0;
for (i = 0; i < x11_screen->n_monitors; i++)
for (i = 0; i < x11_screen->n_monitors; ++i)
{
if (x11_screen->monitors[i].output == primary_output)
{
x11_screen->primary_monitor = i;
break;
}
/* No RandR1.3+ available or no primary set, fall back to prefer LVDS as primary if present */
if (primary_output == None &&
g_ascii_strncasecmp (x11_screen->monitors[i].output_name, "LVDS", 4) == 0)
{
x11_screen->primary_monitor = i;
break;
}
/* No primary specified and no LVDS found */
if (x11_screen->monitors[i].output == first_output)
x11_screen->primary_monitor = i;
}
return x11_screen->n_monitors > 0;
}
#endif
return FALSE;
}
static gboolean
init_randr13 (GdkScreen *screen)
{
@@ -684,9 +743,8 @@ init_randr13 (GdkScreen *screen)
GdkDisplay *display = gdk_screen_get_display (screen);
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
Display *dpy = GDK_SCREEN_XDISPLAY (screen);
XRRScreenResources *resources;
RROutput primary_output;
RROutput primary_output = None;
RROutput first_output = None;
int i;
GArray *monitors;
@@ -696,50 +754,44 @@ init_randr13 (GdkScreen *screen)
return FALSE;
resources = XRRGetScreenResourcesCurrent (x11_screen->xdisplay,
x11_screen->xroot_window);
x11_screen->xroot_window);
if (!resources)
return FALSE;
monitors = g_array_sized_new (FALSE, TRUE, sizeof (GdkX11Monitor),
resources->noutput);
monitors = g_array_sized_new (FALSE, TRUE, sizeof (GdkX11Monitor), resources->noutput);
for (i = 0; i < resources->noutput; ++i)
{
XRROutputInfo *output =
XRRGetOutputInfo (dpy, resources, resources->outputs[i]);
RROutput output = resources->outputs[i];
XRROutputInfo *output_info =
XRRGetOutputInfo (x11_screen->xdisplay, resources, output);
/* Non RandR1.2 X driver have output name "default" */
randr12_compat |= !g_strcmp0 (output->name, "default");
/* Non RandR1.2+ X driver have output name "default" */
randr12_compat |= !g_strcmp0 (output_info->name, "default");
if (output->connection == RR_Disconnected)
if (output_info->connection == RR_Disconnected)
{
XRRFreeOutputInfo (output);
XRRFreeOutputInfo (output_info);
continue;
}
if (output->crtc)
if (output_info->crtc)
{
GdkX11Monitor monitor;
XRRCrtcInfo *crtc = XRRGetCrtcInfo (dpy, resources, output->crtc);
XRRCrtcInfo *crtc = XRRGetCrtcInfo (x11_screen->xdisplay, resources, output_info->crtc);
monitor.geometry.x = crtc->x;
monitor.geometry.y = crtc->y;
monitor.geometry.width = crtc->width;
monitor.geometry.height = crtc->height;
monitor.output = resources->outputs[i];
monitor.width_mm = output->mm_width;
monitor.height_mm = output->mm_height;
monitor.output_name = g_strdup (output->name);
/* FIXME: need EDID parser */
monitor.manufacturer = NULL;
init_monitor_geometry (&monitor, crtc->x, crtc->y, crtc->width, crtc->height);
monitor.output = output;
monitor.width_mm = output_info->mm_width;
monitor.height_mm = output_info->mm_height;
monitor.output_name = g_strndup (output_info->name, output_info->nameLen);
g_array_append_val (monitors, monitor);
XRRFreeCrtcInfo (crtc);
}
XRRFreeOutputInfo (output);
XRRFreeOutputInfo (output_info);
}
if (resources->noutput > 0)
@@ -747,19 +799,18 @@ init_randr13 (GdkScreen *screen)
XRRFreeScreenResources (resources);
/* non RandR 1.2 X driver doesn't return any usable multihead data */
/* non RandR 1.2+ X driver doesn't return any usable multihead data */
if (randr12_compat)
{
guint n_monitors = monitors->len;
free_monitors ((GdkX11Monitor *)g_array_free (monitors, FALSE),
n_monitors);
free_monitors ((GdkX11Monitor *)g_array_free (monitors, FALSE), n_monitors);
return FALSE;
}
g_array_sort (monitors,
(GCompareFunc) monitor_compare_function);
g_array_sort (monitors, (GCompareFunc) monitor_compare_function);
x11_screen->n_monitors = monitors->len;
x11_screen->monitors = (GdkX11Monitor *)g_array_free (monitors, FALSE);
@@ -771,22 +822,22 @@ init_randr13 (GdkScreen *screen)
for (i = 0; i < x11_screen->n_monitors; ++i)
{
if (x11_screen->monitors[i].output == primary_output)
{
x11_screen->primary_monitor = i;
break;
}
{
x11_screen->primary_monitor = i;
break;
}
/* No RandR1.3+ available or no primary set, fall back to prefer LVDS as primary if present */
if (primary_output == None &&
g_ascii_strncasecmp (x11_screen->monitors[i].output_name, "LVDS", 4) == 0)
{
x11_screen->primary_monitor = i;
break;
}
{
x11_screen->primary_monitor = i;
break;
}
/* No primary specified and no LVDS found */
if (x11_screen->monitors[i].output == first_output)
x11_screen->primary_monitor = i;
x11_screen->primary_monitor = i;
}
return x11_screen->n_monitors > 0;
@@ -807,7 +858,12 @@ init_solaris_xinerama (GdkScreen *screen)
gint result;
int n_monitors;
int i;
int opcode, firstevent, firsterror;
if (!XQueryExtension (GDK_SCREEN_XDISPLAY (screen), "XINERAMA",
&opcode, &firstevent, &firsterror))
return FALSE;
if (!XineramaGetState (dpy, screen_no))
return FALSE;
@@ -847,7 +903,12 @@ init_xfree_xinerama (GdkScreen *screen)
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
XineramaScreenInfo *monitors;
int i, n_monitors;
int opcode, firstevent, firsterror;
if (!XQueryExtension (GDK_SCREEN_XDISPLAY (screen), "XINERAMA",
&opcode, &firstevent, &firsterror))
return FALSE;
if (!XineramaIsActive (dpy))
return FALSE;
@@ -1107,42 +1168,10 @@ compare_monitors (GdkX11Monitor *monitors1, gint n_monitors1,
}
static void
init_multihead (GdkScreen *screen)
init_no_multihead (GdkScreen *screen)
{
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
int opcode, firstevent, firsterror;
/* There are four different implementations of multihead support:
*
* 1. Fake Xinerama for debugging purposes
* 2. RandR 1.2
* 3. Solaris Xinerama
* 4. XFree86/Xorg Xinerama
*
* We use them in that order.
*/
if (init_fake_xinerama (screen))
return;
#ifdef HAVE_RANDR15
if (init_randr15 (screen))
return;
#endif
if (init_randr13 (screen))
return;
if (XQueryExtension (GDK_SCREEN_XDISPLAY (screen), "XINERAMA",
&opcode, &firstevent, &firsterror))
{
if (init_solaris_xinerama (screen))
return;
if (init_xfree_xinerama (screen))
return;
}
/* No multihead support of any kind for this screen */
x11_screen->n_monitors = 1;
x11_screen->monitors = g_new0 (GdkX11Monitor, 1);
x11_screen->primary_monitor = 0;
@@ -1152,6 +1181,27 @@ init_multihead (GdkScreen *screen)
HeightOfScreen (x11_screen->xscreen));
}
static void
init_multihead (GdkScreen *screen)
{
if (init_fake_xinerama (screen))
return;
if (init_randr15 (screen))
return;
if (init_randr13 (screen))
return;
if (init_solaris_xinerama (screen))
return;
if (init_xfree_xinerama (screen))
return;
init_no_multihead (screen);
}
static void
update_bounding_box (GdkScreen *screen)
{
+1
View File
@@ -65,6 +65,7 @@ static const struct {
{"Gtk/TitlebarRightClick", "gtk-titlebar-right-click"},
{"Gtk/DialogsUseHeader", "gtk-dialogs-use-header"},
{"Gtk/EnablePrimaryPaste", "gtk-enable-primary-paste"},
{"Gtk/PrimaryButtonWarpsSlider", "gtk-primary-button-warps-slider"},
{"Gtk/RecentFilesMaxAge", "gtk-recent-files-max-age"},
{"Gtk/RecentFilesEnabled", "gtk-recent-files-enabled"},
+1 -1
View File
@@ -6,7 +6,7 @@ In order to edit any composite classes in GTK+, startup Glade
in the following way, example:
cd /path/to/gtk+/
GLADE_CATALOG_SEARCH_PATH=`pwd`/gtk/glade glade gtk/gtkfilechooserdefault.ui
GLADE_CATALOG_SEARCH_PATH=`pwd`/gtk/glade glade gtk/ui/gtkfilechooserwidget.ui
Documentation for updating this catalog can be found here:
https://developer.gnome.org/gladeui/stable/
+5 -4
View File
@@ -596,8 +596,7 @@ gtk_application_startup (GApplication *g_application)
{
GtkApplication *application = GTK_APPLICATION (g_application);
G_APPLICATION_CLASS (gtk_application_parent_class)
->startup (g_application);
G_APPLICATION_CLASS (gtk_application_parent_class)->startup (g_application);
gtk_action_muxer_insert (application->priv->muxer, "app", G_ACTION_GROUP (application));
@@ -614,6 +613,9 @@ gtk_application_shutdown (GApplication *g_application)
{
GtkApplication *application = GTK_APPLICATION (g_application);
if (application->priv->impl == NULL)
return;
gtk_application_impl_shutdown (application->priv->impl);
g_clear_object (&application->priv->impl);
@@ -627,8 +629,7 @@ gtk_application_shutdown (GApplication *g_application)
/* Synchronize the recent manager singleton */
_gtk_recent_manager_sync ();
G_APPLICATION_CLASS (gtk_application_parent_class)
->shutdown (g_application);
G_APPLICATION_CLASS (gtk_application_parent_class)->shutdown (g_application);
}
static gboolean
+10 -15
View File
@@ -88,6 +88,7 @@ struct _GtkAssistantPage
gchar *title;
GtkWidget *box;
GtkWidget *page;
GtkWidget *regular_title;
GtkWidget *current_title;
@@ -184,7 +185,7 @@ static void on_assistant_cancel (GtkWidget *wid
GtkAssistant *assistant);
static void on_assistant_last (GtkWidget *widget,
GtkAssistant *assistant);
static void assistant_remove_page_cb (GtkNotebook *notebook,
static void assistant_remove_page_cb (GtkContainer *container,
GtkWidget *page,
GtkAssistant *assistant);
@@ -1113,7 +1114,7 @@ on_page_notify_visibility (GtkWidget *widget,
}
static void
assistant_remove_page_cb (GtkNotebook *notebook,
assistant_remove_page_cb (GtkContainer *container,
GtkWidget *page,
GtkAssistant *assistant)
{
@@ -1122,15 +1123,6 @@ assistant_remove_page_cb (GtkNotebook *notebook,
GList *page_node;
GList *element;
if (GTK_IS_BOX (page))
{
GList *children;
children = gtk_container_get_children (GTK_CONTAINER (page));
page = GTK_WIDGET (children->data);
g_list_free (children);
}
element = find_page (assistant, page);
if (!element)
return;
@@ -1367,7 +1359,7 @@ find_page (GtkAssistant *assistant,
while (child)
{
GtkAssistantPage *page_info = child->data;
if (page_info->page == page)
if (page_info->page == page || page_info->box == page)
return child;
child = child->next;
@@ -1474,8 +1466,8 @@ gtk_assistant_remove (GtkContainer *container,
assistant->priv->content != NULL &&
gtk_widget_get_parent (box) == assistant->priv->content)
{
container = (GtkContainer *) assistant->priv->content;
gtk_container_remove (container, box);
gtk_container_remove (GTK_CONTAINER (box), page);
gtk_container_remove (GTK_CONTAINER (assistant->priv->content), box);
}
}
@@ -1816,9 +1808,12 @@ gtk_assistant_insert_page (GtkAssistant *assistant,
gtk_widget_show (box);
gtk_box_pack_start (GTK_BOX (box), page, TRUE, TRUE, 0);
g_object_set (box, "margin", 12, NULL);
g_signal_connect (box, "remove", G_CALLBACK (assistant_remove_page_cb), assistant);
gtk_notebook_insert_page (GTK_NOTEBOOK (priv->content), box, NULL, position);
page_info->box = box;
if (gtk_widget_get_mapped (GTK_WIDGET (assistant)))
{
update_buttons_state (assistant);
@@ -2415,7 +2410,7 @@ gtk_assistant_set_page_has_padding (GtkAssistant *assistant,
{
page_info->has_padding = has_padding;
g_object_set (gtk_widget_get_parent (page),
g_object_set (page_info->box,
"margin", has_padding ? 12 : 0,
NULL);
+3 -3
View File
@@ -7,15 +7,15 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2 of the
* published by the Free Software Foundation; either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*
* Authors: Federico Mena Quintero <federico@gnome.org>
+3 -3
View File
@@ -7,15 +7,15 @@
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2 of the
* published by the Free Software Foundation; either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*
* Authors: Federico Mena Quintero <federico@gnome.org>
+14 -10
View File
@@ -1058,7 +1058,8 @@ gtk_box_size_allocate_with_center (GtkWidget *widget,
{
child_allocation.y = allocation->y;
child_allocation.height = MAX (1, allocation->height);
if (packing == GTK_PACK_START)
if ((packing == GTK_PACK_START && direction == GTK_TEXT_DIR_LTR) ||
(packing == GTK_PACK_END && direction == GTK_TEXT_DIR_RTL))
x = allocation->x;
else
x = allocation->x + allocation->width;
@@ -1105,7 +1106,8 @@ gtk_box_size_allocate_with_center (GtkWidget *widget,
child_allocation.x = x + (child_size - child_allocation.width) / 2;
}
if (packing == GTK_PACK_START)
if ((packing == GTK_PACK_START && direction == GTK_TEXT_DIR_LTR) ||
(packing == GTK_PACK_END && direction == GTK_TEXT_DIR_RTL))
{
x += child_size + priv->spacing;
}
@@ -1114,10 +1116,6 @@ gtk_box_size_allocate_with_center (GtkWidget *widget,
x -= child_size + priv->spacing;
child_allocation.x -= child_size;
}
if (direction == GTK_TEXT_DIR_RTL)
child_allocation.x = allocation->x + allocation->width - (child_allocation.x - allocation->x) - child_allocation.width;
}
else /* (private->orientation == GTK_ORIENTATION_VERTICAL) */
{
@@ -1159,10 +1157,16 @@ gtk_box_size_allocate_with_center (GtkWidget *widget,
else
center_pos = allocation->y + (box_size - center_size) / 2;
if (center_pos < side[GTK_PACK_START])
center_pos = side[GTK_PACK_START];
else if (center_pos + center_size > side[GTK_PACK_END])
center_pos = side[GTK_PACK_END] - center_size;
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL &&
direction == GTK_TEXT_DIR_RTL)
packing = GTK_PACK_END;
else
packing = GTK_PACK_START;
if (center_pos < side[packing])
center_pos = side[packing];
else if (center_pos + center_size > side[1 - packing])
center_pos = side[1 - packing] - center_size;
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
{
+18 -19
View File
@@ -333,6 +333,7 @@ parse_object (GMarkupParseContext *context,
object_info = g_slice_new0 (ObjectInfo);
object_info->type = object_type;
object_info->oclass = g_type_class_ref (object_type);
object_info->id = (internal_id) ? internal_id : g_strdup (object_id);
object_info->constructor = g_strdup (constructor);
state_push (data, object_info);
@@ -439,6 +440,7 @@ parse_template (GMarkupParseContext *context,
object_info = g_slice_new0 (ObjectInfo);
object_info->type = parsed_type;
object_info->oclass = g_type_class_ref (parsed_type);
object_info->id = g_strdup (object_class);
object_info->object = gtk_builder_get_object (data->builder, object_class);
state_push (data, object_info);
@@ -465,6 +467,7 @@ static void
free_object_info (ObjectInfo *info)
{
/* Do not free the signal items, which GtkBuilder takes ownership of */
g_type_class_unref (info->oclass);
g_slist_free (info->signals);
g_slist_free_full (info->properties, (GDestroyNotify)free_property_info);
g_free (info->constructor);
@@ -546,8 +549,7 @@ parse_property (ParserData *data,
gboolean translatable = FALSE;
ObjectInfo *object_info;
GParamSpec *pspec = NULL;
GObjectClass *oclass;
gchar *canonical;
gint line, col;
object_info = state_peek_info (data, ObjectInfo);
if (!object_info ||
@@ -572,13 +574,7 @@ parse_property (ParserData *data,
return;
}
oclass = g_type_class_ref (object_info->type);
canonical = g_strdelimit (g_strdup (name), "_", '-');
g_assert (oclass != NULL);
pspec = g_object_class_find_property (oclass, canonical);
g_type_class_unref (oclass);
g_free (canonical);
pspec = g_object_class_find_property (object_info->oclass, name);
if (!pspec)
{
@@ -620,16 +616,19 @@ parse_property (ParserData *data,
return;
}
info = g_slice_new0 (PropertyInfo);
g_markup_parse_context_get_position (data->ctx, &line, &col);
info = g_slice_new (PropertyInfo);
info->tag.name = element_name;
info->pspec = pspec;
info->text = g_string_new ("");
info->translatable = translatable;
info->bound = (bind_source && bind_property);
info->context = g_strdup (context);
info->text = g_string_new ("");
state_push (data, info);
info->line = line;
info->col = col;
info->tag.name = element_name;
g_markup_parse_context_get_position (data->ctx, &info->line, &info->col);
state_push (data, info);
}
static void
@@ -1147,11 +1146,11 @@ end_element (GMarkupParseContext *context,
/* Called for character data */
/* text is not nul-terminated */
static void
text (GMarkupParseContext *context,
const gchar *text,
gsize text_len,
gpointer user_data,
GError **error)
text (GMarkupParseContext *context,
const gchar *text,
gsize text_len,
gpointer user_data,
GError **error)
{
ParserData *data = (ParserData*)user_data;
CommonInfo *info;
+1
View File
@@ -32,6 +32,7 @@ typedef struct {
typedef struct {
TagInfo tag;
GType type;
GObjectClass *oclass;
gchar *id;
gchar *constructor;
GSList *properties;
+2 -1
View File
@@ -600,7 +600,8 @@ gtk_cell_layout_get_cells (GtkCellLayout *cell_layout)
* if called on a #GtkCellArea or might be %NULL if no #GtkCellArea
* is used by @cell_layout.
*
* Returns: (transfer none): the cell area used by @cell_layout.
* Returns: (transfer none) (nullable): the cell area used by @cell_layout,
* or %NULL in case no cell area is used.
*
* Since: 3.0
*/
+57 -62
View File
@@ -142,7 +142,7 @@ static GtkClipboard *clipboard_peek (GdkDisplay *display,
{
self = [super init];
if (self)
if (self)
{
clipboard = aClipboard;
setting_same_owner = FALSE;
@@ -164,7 +164,7 @@ GType
gtk_clipboard_get_type (void)
{
static GType clipboard_type = 0;
if (!clipboard_type)
{
const GTypeInfo clipboard_info =
@@ -179,11 +179,11 @@ gtk_clipboard_get_type (void)
0, /* n_preallocs */
(GInstanceInitFunc) NULL,
};
clipboard_type = g_type_register_static (G_TYPE_OBJECT, I_("GtkClipboard"),
&clipboard_info, 0);
}
return clipboard_type;
}
@@ -193,7 +193,7 @@ gtk_clipboard_class_init (GtkClipboardClass *class)
GObjectClass *gobject_class = G_OBJECT_CLASS (class);
parent_class = g_type_class_peek_parent (class);
gobject_class->finalize = gtk_clipboard_finalize;
class->owner_change = gtk_clipboard_owner_change;
@@ -227,7 +227,7 @@ gtk_clipboard_finalize (GObject *object)
g_warning ("GtkClipboard prematurely finalized");
clipboard_unset (clipboard);
clipboards = g_object_get_data (G_OBJECT (clipboard->display), "gtk-clipboard-list");
clipboards = g_slist_remove (clipboards, clipboard);
g_object_set_data (G_OBJECT (clipboard->display), I_("gtk-clipboard-list"), clipboards);
@@ -312,7 +312,7 @@ clipboard_owner_destroyed (gpointer data)
tmp_list = tmp_list->next;
}
g_slist_free (clipboards);
}
@@ -321,7 +321,7 @@ clipboard_add_owner_notify (GtkClipboard *clipboard)
{
if (!clipboards_owned_key_id)
clipboards_owned_key_id = g_quark_from_static_string (clipboards_owned_key);
if (clipboard->have_owner)
g_object_set_qdata_full (clipboard->user_data, clipboards_owned_key_id,
g_slist_prepend (g_object_steal_qdata (clipboard->user_data,
@@ -502,12 +502,12 @@ clipboard_unset (GtkClipboard *clipboard)
gpointer old_data;
gboolean old_have_owner;
gint old_n_storable_targets;
old_clear_func = clipboard->clear_func;
old_data = clipboard->user_data;
old_have_owner = clipboard->have_owner;
old_n_storable_targets = clipboard->n_storable_targets;
if (old_have_owner)
{
clipboard_remove_owner_notify (clipboard);
@@ -522,7 +522,7 @@ clipboard_unset (GtkClipboard *clipboard)
clipboard->get_func = NULL;
clipboard->clear_func = NULL;
clipboard->user_data = NULL;
if (old_clear_func)
old_clear_func (clipboard, old_data);
@@ -548,7 +548,7 @@ gtk_clipboard_clear (GtkClipboard *clipboard)
[clipboard->pasteboard declareTypes:nil owner:nil];
}
static void
static void
text_get_func (GtkClipboard *clipboard,
GtkSelectionData *selection_data,
guint info,
@@ -557,14 +557,14 @@ text_get_func (GtkClipboard *clipboard,
gtk_selection_data_set_text (selection_data, data, -1);
}
static void
static void
text_clear_func (GtkClipboard *clipboard,
gpointer data)
{
g_free (data);
}
void
void
gtk_clipboard_set_text (GtkClipboard *clipboard,
const gchar *text,
gint len)
@@ -573,11 +573,11 @@ gtk_clipboard_set_text (GtkClipboard *clipboard,
g_return_if_fail (clipboard != NULL);
g_return_if_fail (text != NULL);
if (len < 0)
len = strlen (text);
gtk_clipboard_set_with_data (clipboard,
gtk_clipboard_set_with_data (clipboard,
&target, 1,
text_get_func, text_clear_func,
g_strndup (text, len));
@@ -585,7 +585,7 @@ gtk_clipboard_set_text (GtkClipboard *clipboard,
}
static void
static void
pixbuf_get_func (GtkClipboard *clipboard,
GtkSelectionData *selection_data,
guint info,
@@ -594,7 +594,7 @@ pixbuf_get_func (GtkClipboard *clipboard,
gtk_selection_data_set_pixbuf (selection_data, data);
}
static void
static void
pixbuf_clear_func (GtkClipboard *clipboard,
gpointer data)
{
@@ -624,7 +624,7 @@ gtk_clipboard_set_image (GtkClipboard *clipboard,
targets[i].target = gdk_atom_name (pair->target);
}
gtk_clipboard_set_with_data (clipboard,
gtk_clipboard_set_with_data (clipboard,
targets, n_targets,
pixbuf_get_func, pixbuf_clear_func,
g_object_ref (pixbuf));
@@ -643,7 +643,7 @@ gtk_clipboard_set_image (GtkClipboard *clipboard,
* @callback: (scope async):
* @user_data:
*/
void
void
gtk_clipboard_request_contents (GtkClipboard *clipboard,
GdkAtom target,
GtkClipboardReceivedFunc callback,
@@ -664,7 +664,7 @@ gtk_clipboard_request_contents (GtkClipboard *clipboard,
* @callback: (scope async):
* @user_data:
*/
void
void
gtk_clipboard_request_text (GtkClipboard *clipboard,
GtkClipboardTextReceivedFunc callback,
gpointer user_data)
@@ -718,7 +718,7 @@ gtk_clipboard_wait_for_rich_text (GtkClipboard *clipboard,
* @callback: (scope async):
* @user_data:
*/
void
void
gtk_clipboard_request_image (GtkClipboard *clipboard,
GtkClipboardImageReceivedFunc callback,
gpointer user_data)
@@ -737,7 +737,7 @@ gtk_clipboard_request_image (GtkClipboard *clipboard,
* @callback: (scope async):
* @user_data:
*/
void
void
gtk_clipboard_request_uris (GtkClipboard *clipboard,
GtkClipboardURIReceivedFunc callback,
gpointer user_data)
@@ -755,7 +755,7 @@ gtk_clipboard_request_uris (GtkClipboard *clipboard,
* @callback: (scope async):
* @user_data:
*/
void
void
gtk_clipboard_request_targets (GtkClipboard *clipboard,
GtkClipboardTargetsReceivedFunc callback,
gpointer user_data)
@@ -788,7 +788,7 @@ gtk_clipboard_wait_for_contents (GtkClipboard *clipboard,
clipboard->change_count = [clipboard->pasteboard changeCount];
}
if (target == gdk_atom_intern_static_string ("TARGETS"))
if (target == gdk_atom_intern_static_string ("TARGETS"))
{
NSArray *types = [clipboard->pasteboard types];
int i, length;
@@ -841,7 +841,7 @@ gtk_clipboard_wait_for_text (GtkClipboard *clipboard)
GtkSelectionData *data;
gchar *result;
data = gtk_clipboard_wait_for_contents (clipboard,
data = gtk_clipboard_wait_for_contents (clipboard,
gdk_atom_intern_static_string ("UTF8_STRING"));
result = (gchar *)gtk_selection_data_get_text (data);
@@ -860,23 +860,18 @@ gtk_clipboard_wait_for_text (GtkClipboard *clipboard)
GdkPixbuf *
gtk_clipboard_wait_for_image (GtkClipboard *clipboard)
{
const gchar *priority[] = { "image/png", "image/tiff", "image/jpeg", "image/gif", "image/bmp" };
GdkAtom target = gdk_atom_intern_static_string("image/tiff");
int i;
GtkSelectionData *data;
for (i = 0; i < G_N_ELEMENTS (priority); i++)
{
data = gtk_clipboard_wait_for_contents (clipboard, gdk_atom_intern_static_string (priority[i]));
data = gtk_clipboard_wait_for_contents (clipboard, target);
if (data)
{
GdkPixbuf *pixbuf = gtk_selection_data_get_pixbuf (data);
gtk_selection_data_free (data);
return pixbuf;
}
}
if (data && data->data)
{
GdkPixbuf *pixbuf = gtk_selection_data_get_pixbuf (data);
gtk_selection_data_free (data);
return pixbuf;
}
return NULL;
}
@@ -901,7 +896,7 @@ gtk_clipboard_wait_for_uris (GtkClipboard *clipboard)
gtk_selection_data_free (data);
return uris;
}
}
return NULL;
}
@@ -962,7 +957,7 @@ gtk_clipboard_wait_is_image_available (GtkClipboard *clipboard)
GtkSelectionData *data;
gboolean result = FALSE;
data = gtk_clipboard_wait_for_contents (clipboard,
data = gtk_clipboard_wait_for_contents (clipboard,
gdk_atom_intern_static_string ("TARGETS"));
if (data)
{
@@ -979,7 +974,7 @@ gtk_clipboard_wait_is_uris_available (GtkClipboard *clipboard)
GtkSelectionData *data;
gboolean result = FALSE;
data = gtk_clipboard_wait_for_contents (clipboard,
data = gtk_clipboard_wait_for_contents (clipboard,
gdk_atom_intern_static_string ("TARGETS"));
if (data)
{
@@ -997,13 +992,13 @@ gtk_clipboard_wait_is_uris_available (GtkClipboard *clipboard)
* @n_targets: (out):
*/
gboolean
gtk_clipboard_wait_for_targets (GtkClipboard *clipboard,
gtk_clipboard_wait_for_targets (GtkClipboard *clipboard,
GdkAtom **targets,
gint *n_targets)
{
GtkSelectionData *data;
gboolean result = FALSE;
g_return_val_if_fail (clipboard != NULL, FALSE);
/* If the display supports change notification we cache targets */
@@ -1012,19 +1007,19 @@ gtk_clipboard_wait_for_targets (GtkClipboard *clipboard,
{
if (n_targets)
*n_targets = clipboard->n_cached_targets;
if (targets)
*targets = g_memdup (clipboard->cached_targets,
clipboard->n_cached_targets * sizeof (GdkAtom));
return TRUE;
}
if (n_targets)
*n_targets = 0;
if (targets)
*targets = NULL;
*targets = NULL;
data = gtk_clipboard_wait_for_contents (clipboard, gdk_atom_intern_static_string ("TARGETS"));
@@ -1032,24 +1027,24 @@ gtk_clipboard_wait_for_targets (GtkClipboard *clipboard,
{
GdkAtom *tmp_targets;
gint tmp_n_targets;
result = gtk_selection_data_get_targets (data, &tmp_targets, &tmp_n_targets);
if (gdk_display_supports_selection_notification (gtk_clipboard_get_display (clipboard)))
{
clipboard->n_cached_targets = tmp_n_targets;
clipboard->cached_targets = g_memdup (tmp_targets,
tmp_n_targets * sizeof (GdkAtom));
}
if (n_targets)
*n_targets = tmp_n_targets;
if (targets)
*targets = tmp_targets;
else
g_free (tmp_targets);
gtk_selection_data_free (data);
}
@@ -1057,7 +1052,7 @@ gtk_clipboard_wait_for_targets (GtkClipboard *clipboard,
}
static GtkClipboard *
clipboard_peek (GdkDisplay *display,
clipboard_peek (GdkDisplay *display,
GdkAtom selection,
gboolean only_if_exists)
{
@@ -1086,13 +1081,13 @@ clipboard_peek (GdkDisplay *display,
NSString *pasteboard_name;
clipboard = g_object_new (GTK_TYPE_CLIPBOARD, NULL);
if (selection == GDK_SELECTION_CLIPBOARD)
if (selection == GDK_SELECTION_CLIPBOARD)
pasteboard_name = NSGeneralPboard;
else
else
{
char *atom_string = gdk_atom_name (selection);
pasteboard_name = [NSString stringWithFormat:@"_GTK_%@",
pasteboard_name = [NSString stringWithFormat:@"_GTK_%@",
[NSString stringWithUTF8String:atom_string]];
g_free (atom_string);
}
@@ -1111,7 +1106,7 @@ clipboard_peek (GdkDisplay *display,
G_CALLBACK (clipboard_display_closed), clipboard);
gdk_display_request_selection_notification (display, selection);
}
return clipboard;
}
@@ -1133,7 +1128,7 @@ gtk_clipboard_wait_is_target_available (GtkClipboard *clipboard,
GdkAtom *targets;
gint i, n_targets;
gboolean retval = FALSE;
if (!gtk_clipboard_wait_for_targets (clipboard, &targets, &n_targets))
return FALSE;
@@ -1147,11 +1142,11 @@ gtk_clipboard_wait_is_target_available (GtkClipboard *clipboard,
}
g_free (targets);
return retval;
}
void
void
_gtk_clipboard_handle_event (GdkEventOwnerChange *event)
{
}
+5 -1
View File
@@ -111,10 +111,14 @@ select_swatch (GtkColorChooserWidget *cc,
gtk_widget_queue_draw (GTK_WIDGET (cc->priv->current));
gtk_color_swatch_get_rgba (swatch, &color);
g_settings_set (cc->priv->settings, "selected-color", "(bdddd)",
TRUE, color.red, color.green, color.blue, color.alpha);
g_object_notify (G_OBJECT (cc), "rgba");
if (gtk_widget_get_visible (GTK_WIDGET (cc->priv->editor)))
gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (cc->priv->editor), &color);
else
g_object_notify (G_OBJECT (cc), "rgba");
}
static void
+18 -12
View File
@@ -118,6 +118,7 @@ swatch_draw (GtkWidget *widget,
GtkBorder border, padding;
GdkRectangle rect;
GtkIconInfo *icon_info = NULL;
gint scale;
theme = gtk_icon_theme_get_default ();
context = gtk_widget_get_style_context (widget);
@@ -168,11 +169,13 @@ swatch_draw (GtkWidget *widget,
gtk_render_frame (context, cr, 0, 0, width, height);
scale = gtk_widget_get_scale_factor (widget);
if (swatch->priv->icon)
{
icon_info = gtk_icon_theme_lookup_icon (theme, swatch->priv->icon, PIXBUF_SIZE,
GTK_ICON_LOOKUP_GENERIC_FALLBACK
| GTK_ICON_LOOKUP_USE_BUILTIN);
icon_info = gtk_icon_theme_lookup_icon_for_scale (theme, swatch->priv->icon, PIXBUF_SIZE,
scale,
GTK_ICON_LOOKUP_GENERIC_FALLBACK
| GTK_ICON_LOOKUP_USE_BUILTIN);
}
else if ((state & GTK_STATE_FLAG_SELECTED) != 0)
{
@@ -182,9 +185,10 @@ swatch_draw (GtkWidget *widget,
/* fallback for themes that don't have object-select-symbolic */
g_themed_icon_append_name (G_THEMED_ICON (gicon), "gtk-apply");
icon_info = gtk_icon_theme_lookup_by_gicon (theme, gicon, PIXBUF_SIZE,
GTK_ICON_LOOKUP_GENERIC_FALLBACK
| GTK_ICON_LOOKUP_USE_BUILTIN);
icon_info = gtk_icon_theme_lookup_by_gicon_for_scale (theme, gicon, PIXBUF_SIZE,
scale,
GTK_ICON_LOOKUP_GENERIC_FALLBACK
| GTK_ICON_LOOKUP_USE_BUILTIN);
g_object_unref (gicon);
}
@@ -206,14 +210,16 @@ swatch_draw (GtkWidget *widget,
{
GdkPixbuf *pixbuf;
pixbuf = gtk_icon_info_load_symbolic_for_context (icon_info, context,
NULL, NULL);
pixbuf = gtk_icon_info_load_symbolic_for_context (icon_info, context, NULL, NULL);
if (pixbuf != NULL)
{
gtk_render_icon (context, cr, pixbuf,
rect.x + (rect.width - gdk_pixbuf_get_width (pixbuf)) / 2,
rect.y + (rect.height - gdk_pixbuf_get_height (pixbuf)) / 2);
cairo_surface_t *surface;
surface = gdk_cairo_surface_create_from_pixbuf (pixbuf, scale, gtk_widget_get_window (widget));
gtk_render_icon_surface (context, cr, surface,
rect.x + (rect.width - (gdk_pixbuf_get_width (pixbuf) / scale)) / 2,
rect.y + (rect.height - (gdk_pixbuf_get_height (pixbuf) / scale)) / 2);
cairo_surface_destroy (surface);
g_object_unref (pixbuf);
}
+2 -10
View File
@@ -2082,7 +2082,7 @@ update_menu_sensitivity (GtkComboBox *combo_box,
{
GtkComboBoxPrivate *priv = combo_box->priv;
GList *children, *child;
GtkWidget *item, *submenu, *separator;
GtkWidget *item, *submenu;
GtkWidget *cell_view;
gboolean sensitive;
@@ -2108,15 +2108,7 @@ update_menu_sensitivity (GtkComboBox *combo_box,
else
{
sensitive = cell_layout_is_sensitive (GTK_CELL_LAYOUT (cell_view));
if (menu != priv->popup_widget && child == children)
{
separator = GTK_WIDGET (child->next->data);
g_object_set (item, "visible", sensitive, NULL);
g_object_set (separator, "visible", sensitive, NULL);
}
else
gtk_widget_set_sensitive (item, sensitive);
gtk_widget_set_sensitive (item, sensitive);
}
}
+2 -2
View File
@@ -481,9 +481,9 @@ _gtk_css_font_weight_value_try_parse (GtkCssParser *parser)
}
/* special cases go here */
if (_gtk_css_parser_try (parser, "400", TRUE))
return _gtk_css_value_ref (&font_weight_values[3]);
return _gtk_css_value_ref (&font_weight_values[5]);
if (_gtk_css_parser_try (parser, "700", TRUE))
return _gtk_css_value_ref (&font_weight_values[6]);
return _gtk_css_value_ref (&font_weight_values[8]);
return NULL;
}
+1 -1
View File
@@ -28,7 +28,7 @@
/* When these change we do a full restyling. Otherwise we try to figure out
* if we need to change things. */
#define GTK_CSS_RADICAL_CHANGE (GTK_CSS_CHANGE_NAME | GTK_CSS_CHANGE_CLASS | GTK_CSS_CHANGE_SOURCE | GTK_CSS_CHANGE_PARENT_STYLE)
#define GTK_CSS_RADICAL_CHANGE (GTK_CSS_CHANGE_ID | GTK_CSS_CHANGE_NAME | GTK_CSS_CHANGE_CLASS | GTK_CSS_CHANGE_SOURCE | GTK_CSS_CHANGE_PARENT_STYLE)
G_DEFINE_TYPE (GtkCssNode, gtk_css_node, G_TYPE_OBJECT)
+25 -7
View File
@@ -1740,7 +1740,11 @@ gtk_css_provider_get_style_property (GtkStyleProvider *provider,
val->section,
val->section != NULL ? gtk_css_section_get_file (val->section) : NULL,
val->value);
if (!val->section)
gtk_css_scanner_push_section (scanner, GTK_CSS_SECTION_VALUE);
found = _gtk_css_style_funcs_parse_value (value, scanner->parser);
if (!val->section)
gtk_css_scanner_pop_section (scanner, GTK_CSS_SECTION_VALUE);
gtk_css_scanner_destroy (scanner);
break;
}
@@ -1939,6 +1943,9 @@ gtk_css_provider_error (GtkCssProvider *provider,
GError *error;
va_list args;
gtk_internal_return_if_fail (GTK_IS_CSS_PROVIDER (provider));
gtk_internal_return_if_fail (scanner != NULL);
va_start (args, format);
error = g_error_new_valist (domain, code, format, args);
va_end (args);
@@ -2721,21 +2728,32 @@ gtk_css_provider_load_internal (GtkCssProvider *css_provider,
}
else
{
GtkCssSection *section;
if (parent)
section = gtk_css_section_ref (parent->section);
if (parent == NULL)
{
scanner = gtk_css_scanner_new (css_provider,
parent,
parent ? parent->section : NULL,
file,
"");
gtk_css_scanner_push_section (scanner, GTK_CSS_SECTION_DOCUMENT);
}
else
section = _gtk_css_section_new_for_file (GTK_CSS_SECTION_DOCUMENT, file);
scanner = parent;
gtk_css_provider_error (css_provider,
parent,
scanner,
GTK_CSS_PROVIDER_ERROR,
GTK_CSS_PROVIDER_ERROR_IMPORT,
"Failed to import: %s",
load_error->message);
gtk_css_section_unref (section);
if (parent == NULL)
{
gtk_css_scanner_pop_section (scanner, GTK_CSS_SECTION_DOCUMENT);
gtk_css_scanner_destroy (scanner);
}
}
}
+6 -3
View File
@@ -46,9 +46,12 @@ gtk_css_static_style_get_value (GtkCssStyle *style,
{
GtkCssStaticStyle *sstyle = GTK_CSS_STATIC_STYLE (style);
if (sstyle->values == NULL ||
id >= sstyle->values->len)
return NULL;
if (G_UNLIKELY (id >= GTK_CSS_PROPERTY_N_PROPERTIES))
{
GtkCssStyleProperty *prop = _gtk_css_style_property_lookup_by_id (id);
return _gtk_css_style_property_get_initial_value (prop);
}
return g_ptr_array_index (sstyle->values, id);
}
+1 -1
View File
@@ -30,7 +30,7 @@
/* When these change we do a full restyling. Otherwise we try to figure out
* if we need to change things. */
#define GTK_CSS_RADICAL_CHANGE (GTK_CSS_CHANGE_NAME | GTK_CSS_CHANGE_CLASS | GTK_CSS_CHANGE_SOURCE | GTK_CSS_CHANGE_PARENT_STYLE)
#define GTK_CSS_RADICAL_CHANGE (GTK_CSS_CHANGE_ID | GTK_CSS_CHANGE_NAME | GTK_CSS_CHANGE_CLASS | GTK_CSS_CHANGE_SOURCE | GTK_CSS_CHANGE_PARENT_STYLE)
G_DEFINE_TYPE (GtkCssWidgetNode, gtk_css_widget_node, GTK_TYPE_CSS_NODE)
+12 -10
View File
@@ -4778,9 +4778,11 @@ gtk_entry_obscure_mouse_cursor (GtkEntry *entry)
if (priv->mouse_cursor_obscured)
return;
set_invisible_cursor (priv->text_area);
priv->mouse_cursor_obscured = TRUE;
if (priv->text_area)
{
set_invisible_cursor (priv->text_area);
priv->mouse_cursor_obscured = TRUE;
}
}
static gint
@@ -8808,7 +8810,7 @@ gtk_entry_get_icon_activatable (GtkEntry *entry,
* method will work regardless of whether the icon was set using a
* #GdkPixbuf, a #GIcon, a stock item, or an icon name.
*
* Returns: (transfer none): A #GdkPixbuf, or %NULL if no icon is
* Returns: (transfer none) (nullable): A #GdkPixbuf, or %NULL if no icon is
* set for this position.
*
* Since: 2.16
@@ -8850,7 +8852,7 @@ gtk_entry_get_icon_pixbuf (GtkEntry *entry,
* no icon or if the icon was set by some other method (e.g., by
* stock, pixbuf, or icon name).
*
* Returns: (transfer none): A #GIcon, or %NULL if no icon is set
* Returns: (transfer none) (nullable): A #GIcon, or %NULL if no icon is set
* or if the icon is not a #GIcon
*
* Since: 2.16
@@ -8918,7 +8920,7 @@ gtk_entry_get_icon_stock (GtkEntry *entry,
* no icon or if the icon was set by some other method (e.g., by
* pixbuf, stock or gicon).
*
* Returns: An icon name, or %NULL if no icon is set or if the icon
* Returns: (nullable): An icon name, or %NULL if no icon is set or if the icon
* wasnt set from an icon name
*
* Since: 2.16
@@ -10529,7 +10531,7 @@ gtk_entry_get_completion (GtkEntry *entry)
/**
* gtk_entry_set_cursor_hadjustment:
* @entry: a #GtkEntry
* @adjustment: an adjustment which should be adjusted when the cursor
* @adjustment: (nullable): an adjustment which should be adjusted when the cursor
* is moved, or %NULL
*
* Hooks up an adjustment to the cursor position in an entry, so that when
@@ -10566,7 +10568,7 @@ gtk_entry_set_cursor_hadjustment (GtkEntry *entry,
* Retrieves the horizontal cursor adjustment for the entry.
* See gtk_entry_set_cursor_hadjustment().
*
* Returns: (transfer none): the horizontal cursor adjustment, or %NULL
* Returns: (transfer none) (nullable): the horizontal cursor adjustment, or %NULL
* if none has been set.
*
* Since: 2.12
@@ -10828,7 +10830,7 @@ gtk_entry_progress_pulse (GtkEntry *entry)
/**
* gtk_entry_set_placeholder_text:
* @entry: a #GtkEntry
* @text: a string to be displayed when @entry is empty an unfocused, or %NULL
* @text: (nullable): a string to be displayed when @entry is empty an unfocused, or %NULL
*
* Sets text to be displayed in @entry when it is empty and unfocused.
* This can be used to give a visual hint of the expected contents of
@@ -11092,7 +11094,7 @@ gtk_entry_set_attributes (GtkEntry *entry,
* Gets the attribute list that was set on the entry using
* gtk_entry_set_attributes(), if any.
*
* Returns: (transfer none): the attribute list, or %NULL
* Returns: (transfer none) (nullable): the attribute list, or %NULL
* if none was set.
*
* Since: 3.6
+12 -9
View File
@@ -90,7 +90,7 @@
#include <string.h>
#define PAGE_STEP 14
#define COMPLETION_TIMEOUT 300
#define COMPLETION_TIMEOUT 100
/* signals */
enum
@@ -1654,15 +1654,18 @@ gtk_entry_completion_popup (GtkEntryCompletion *completion)
gtk_widget_show (completion->priv->popup_window);
gtk_device_grab_add (completion->priv->popup_window, completion->priv->device, TRUE);
gdk_device_grab (completion->priv->device, gtk_widget_get_window (completion->priv->popup_window),
GDK_OWNERSHIP_WINDOW, TRUE,
GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK |
GDK_POINTER_MOTION_MASK,
NULL, GDK_CURRENT_TIME);
if (completion->priv->device)
{
gtk_device_grab_add (completion->priv->popup_window, completion->priv->device, TRUE);
gdk_device_grab (completion->priv->device, gtk_widget_get_window (completion->priv->popup_window),
GDK_OWNERSHIP_WINDOW, TRUE,
GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK |
GDK_POINTER_MOTION_MASK,
NULL, GDK_CURRENT_TIME);
completion->priv->has_grab = TRUE;
completion->priv->has_grab = TRUE;
}
}
void
+23 -2
View File
@@ -225,6 +225,8 @@ static void gtk_file_chooser_dialog_notify (GObject *obj
static void gtk_file_chooser_dialog_map (GtkWidget *widget);
static void gtk_file_chooser_dialog_unmap (GtkWidget *widget);
static void gtk_file_chooser_dialog_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
static void file_chooser_widget_file_activated (GtkFileChooser *chooser,
GtkFileChooserDialog *dialog);
static void file_chooser_widget_default_size_changed (GtkWidget *widget,
@@ -256,6 +258,7 @@ gtk_file_chooser_dialog_class_init (GtkFileChooserDialogClass *class)
widget_class->map = gtk_file_chooser_dialog_map;
widget_class->unmap = gtk_file_chooser_dialog_unmap;
widget_class->size_allocate = gtk_file_chooser_dialog_size_allocate;
gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_FILE_CHOOSER);
@@ -618,6 +621,7 @@ save_dialog_geometry (GtkFileChooserDialog *dialog)
{
GtkWindow *window;
GSettings *settings;
int old_x, old_y, old_width, old_height;
int x, y, width, height;
settings = _gtk_file_chooser_get_settings_for_widget (GTK_WIDGET (dialog));
@@ -627,8 +631,15 @@ save_dialog_geometry (GtkFileChooserDialog *dialog)
gtk_window_get_position (window, &x, &y);
gtk_window_get_size (window, &width, &height);
g_settings_set (settings, SETTINGS_KEY_WINDOW_POSITION, "(ii)", x, y);
g_settings_set (settings, SETTINGS_KEY_WINDOW_SIZE, "(ii)", width, height);
g_settings_get (settings, SETTINGS_KEY_WINDOW_POSITION, "(ii)", &old_x, &old_y);
if (old_x != x || old_y != y)
g_settings_set (settings, SETTINGS_KEY_WINDOW_POSITION, "(ii)", x, y);
g_settings_get (settings, SETTINGS_KEY_WINDOW_SIZE, "(ii)", &old_width, &old_height);
if (old_width != width || old_height != height)
g_settings_set (settings, SETTINGS_KEY_WINDOW_SIZE, "(ii)", width, height);
g_settings_apply (settings);
}
static void
@@ -641,6 +652,16 @@ gtk_file_chooser_dialog_unmap (GtkWidget *widget)
GTK_WIDGET_CLASS (gtk_file_chooser_dialog_parent_class)->unmap (widget);
}
static void
gtk_file_chooser_dialog_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
GTK_WIDGET_CLASS (gtk_file_chooser_dialog_parent_class)->size_allocate (widget, allocation);
if (gtk_widget_is_drawable (widget))
save_dialog_geometry (GTK_FILE_CHOOSER_DIALOG (widget));
}
/* We do a signal connection here rather than overriding the method in
* class_init because GtkDialog::response is a RUN_LAST signal. We want *our*
* handler to be run *first*, regardless of whether the user installs response
+32 -18
View File
@@ -108,7 +108,8 @@ static void set_complete_on_load (GtkFileChooserEntry *chooser_entry,
gboolean complete_on_load);
static void refresh_current_folder_and_file_part (GtkFileChooserEntry *chooser_entry);
static void set_completion_folder (GtkFileChooserEntry *chooser_entry,
GFile *folder);
GFile *folder,
char *dir_part);
static void finished_loading_cb (GtkFileSystemModel *model,
GError *error,
GtkFileChooserEntry *chooser_entry);
@@ -248,7 +249,7 @@ gtk_file_chooser_entry_dispose (GObject *object)
{
GtkFileChooserEntry *chooser_entry = GTK_FILE_CHOOSER_ENTRY (object);
set_completion_folder (chooser_entry, NULL);
set_completion_folder (chooser_entry, NULL, NULL);
G_OBJECT_CLASS (_gtk_file_chooser_entry_parent_class)->dispose (object);
}
@@ -276,6 +277,8 @@ match_selected_callback (GtkEntryCompletion *completion,
-1,
&pos);
gtk_editable_set_position (GTK_EDITABLE (chooser_entry), pos);
g_free (path);
return TRUE;
@@ -374,7 +377,7 @@ explicitly_complete (GtkFileChooserEntry *chooser_entry)
{
char *completion, *text;
gsize completion_len, text_len;
text = gtk_file_chooser_entry_get_completion_text (chooser_entry);
text_len = strlen (text);
completion = gtk_entry_completion_compute_prefix (gtk_entry_get_completion (GTK_ENTRY (chooser_entry)), text);
@@ -523,11 +526,11 @@ completion_store_set (GtkFileSystemModel *model,
if (_gtk_file_info_consider_as_directory (info))
suffix = G_DIR_SEPARATOR_S;
g_value_take_string (value, g_strconcat (
prefix,
g_file_info_get_display_name (info),
suffix,
NULL));
g_value_take_string (value,
g_strconcat (prefix,
g_file_info_get_display_name (info),
suffix,
NULL));
break;
default:
g_assert_not_reached ();
@@ -598,24 +601,31 @@ finished_loading_cb (GtkFileSystemModel *model,
static void
set_completion_folder (GtkFileChooserEntry *chooser_entry,
GFile *folder_file)
GFile *folder_file,
char *dir_part)
{
if (folder_file &&
chooser_entry->local_only
&& !_gtk_file_has_native_path (folder_file))
folder_file = NULL;
if ((chooser_entry->current_folder_file
&& folder_file
&& g_file_equal (folder_file, chooser_entry->current_folder_file))
|| chooser_entry->current_folder_file == folder_file)
return;
if (((chooser_entry->current_folder_file
&& folder_file
&& g_file_equal (folder_file, chooser_entry->current_folder_file))
|| chooser_entry->current_folder_file == folder_file)
&& g_strcmp0 (dir_part, chooser_entry->dir_part) == 0)
{
return;
}
if (chooser_entry->current_folder_file)
{
g_object_unref (chooser_entry->current_folder_file);
chooser_entry->current_folder_file = NULL;
}
g_free (chooser_entry->dir_part);
chooser_entry->dir_part = g_strdup (dir_part);
chooser_entry->current_folder_loaded = FALSE;
@@ -633,29 +643,33 @@ refresh_current_folder_and_file_part (GtkFileChooserEntry *chooser_entry)
{
GFile *folder_file;
char *text, *last_slash, *old_file_part;
char *dir_part;
old_file_part = chooser_entry->file_part;
g_free (chooser_entry->dir_part);
text = gtk_file_chooser_entry_get_completion_text (chooser_entry);
last_slash = strrchr (text, G_DIR_SEPARATOR);
if (last_slash)
{
chooser_entry->dir_part = g_strndup (text, last_slash - text + 1);
dir_part = g_strndup (text, last_slash - text + 1);
chooser_entry->file_part = g_strdup (last_slash + 1);
}
else
{
chooser_entry->dir_part = g_strdup ("");
dir_part = g_strdup ("");
chooser_entry->file_part = g_strdup (text);
}
folder_file = gtk_file_chooser_get_directory_for_text (chooser_entry, text);
set_completion_folder (chooser_entry, folder_file);
set_completion_folder (chooser_entry, folder_file, dir_part);
if (folder_file)
g_object_unref (folder_file);
g_free (dir_part);
if (chooser_entry->completion_store &&
(g_strcmp0 (old_file_part, chooser_entry->file_part) != 0))
{
+28 -10
View File
@@ -1278,13 +1278,16 @@ key_is_left_or_right (GdkEventKey *event)
}
static gboolean
should_trigger_location_entry (GtkWidget *widget,
GdkEventKey *event)
should_trigger_location_entry (GtkFileChooserWidget *impl,
GdkEventKey *event)
{
GdkModifierType no_text_input_mask;
if (impl->priv->operation_mode == OPERATION_MODE_SEARCH)
return FALSE;
no_text_input_mask =
gtk_widget_get_modifier_mask (widget, GDK_MODIFIER_INTENT_NO_TEXT_INPUT);
gtk_widget_get_modifier_mask (GTK_WIDGET (impl), GDK_MODIFIER_INTENT_NO_TEXT_INPUT);
if ((event->keyval == GDK_KEY_slash
|| event->keyval == GDK_KEY_KP_Divide
@@ -1310,7 +1313,7 @@ browse_files_key_press_event_cb (GtkWidget *widget,
GtkFileChooserWidget *impl = (GtkFileChooserWidget *) data;
GtkFileChooserWidgetPrivate *priv = impl->priv;
if (should_trigger_location_entry (widget, event) &&
if (should_trigger_location_entry (impl, event) &&
(priv->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
priv->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER))
{
@@ -1370,7 +1373,7 @@ gtk_file_chooser_widget_key_press_event (GtkWidget *widget,
GtkFileChooserWidget *impl = (GtkFileChooserWidget *) widget;
GtkFileChooserWidgetPrivate *priv = impl->priv;
if (should_trigger_location_entry (widget, event))
if (should_trigger_location_entry (impl, event))
{
if (priv->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
priv->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
@@ -2400,6 +2403,7 @@ list_button_press_event_cb (GtkWidget *widget,
get_selection_modifiers (widget, event, &modify, &extend);
if (!is_touchscreen &&
!modify && !extend &&
event->type == GDK_BUTTON_PRESS &&
event->button == GDK_BUTTON_PRIMARY &&
gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (priv->browse_files_tree_view),
event->x, event->y,
@@ -2554,6 +2558,9 @@ static void
location_entry_changed_cb (GtkEditable *editable,
GtkFileChooserWidget *impl)
{
if (impl->priv->operation_mode == OPERATION_MODE_SEARCH)
operation_mode_set (impl, OPERATION_MODE_BROWSE);
if (impl->priv->action != GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER)
reset_location_timeout (impl);
}
@@ -2600,7 +2607,12 @@ location_entry_create (GtkFileChooserWidget *impl)
if (!priv->location_entry)
{
priv->location_entry = _gtk_file_chooser_entry_new (TRUE, TRUE);
gboolean eat_escape;
eat_escape = priv->action == GTK_FILE_CHOOSER_ACTION_OPEN ||
priv->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER;
priv->location_entry = _gtk_file_chooser_entry_new (TRUE, eat_escape);
location_entry_setup (impl);
}
}
@@ -6247,10 +6259,11 @@ get_selected_file_info_from_file_list (GtkFileChooserWidget *impl,
GtkTreeSelection *selection;
GtkTreeIter iter;
GFileInfo *info;
GtkTreeModel *model;
g_assert (!priv->select_multiple);
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->browse_files_tree_view));
if (!gtk_tree_selection_get_selected (selection, NULL, &iter))
if (!gtk_tree_selection_get_selected (selection, &model, &iter))
{
*had_selection = FALSE;
return NULL;
@@ -6258,7 +6271,7 @@ get_selected_file_info_from_file_list (GtkFileChooserWidget *impl,
*had_selection = TRUE;
info = _gtk_file_system_model_get_info (priv->browse_files_model, &iter);
info = _gtk_file_system_model_get_info (GTK_FILE_SYSTEM_MODEL (model), &iter);
return info;
}
@@ -6470,7 +6483,11 @@ name_entry_get_parent_info_cb (GCancellable *cancellable,
if (info)
{
parent_is_folder = _gtk_file_info_consider_as_directory (info);
parent_is_accessible = g_file_info_has_attribute (info, "access::can-execute") &&
/* Some gvfs backends do not set executable attribute, let's assume that
* the folder is accessible even if the attribute is not set.
*/
parent_is_accessible = !g_file_info_has_attribute (info, "access::can-execute") ||
g_file_info_get_attribute_boolean (info, "access::can-execute");
}
@@ -7317,7 +7334,8 @@ search_start_query (GtkFileChooserWidget *impl,
_gtk_search_engine_start (priv->search_engine);
if (_gtk_file_consider_as_remote (gtk_query_get_location (priv->search_query)))
if (gtk_query_get_location (priv->search_query) &&
_gtk_file_consider_as_remote (gtk_query_get_location (priv->search_query)))
gtk_widget_show (priv->remote_warning_bar);
}
+2 -2
View File
@@ -4,7 +4,7 @@
*
* This file is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 3 of the
* published by the Free Software Foundation; either version 2.1 of the
* License, or (at your option) any later version.
*
* This file is distributed in the hope that it will be useful, but
@@ -12,7 +12,7 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Authors: Matthias Clasen
+4 -1
View File
@@ -947,7 +947,10 @@ _gtk_file_consider_as_remote (GFile *file)
const gchar *type;
type = g_file_info_get_attribute_string (info, "filesystem::type");
is_remote = g_strv_contains (remote_types, type);
if (type != NULL)
is_remote = g_strv_contains (remote_types, type);
else
is_remote = FALSE;
g_object_unref (info);
}
+56 -38
View File
@@ -292,6 +292,23 @@ gtk_flow_box_child_focus (GtkWidget *widget,
child = gtk_bin_get_child (GTK_BIN (widget));
/* Without "can-focus" flag try to pass the focus to the child immediately */
if (!gtk_widget_get_can_focus (widget))
{
if (child)
{
if (gtk_widget_child_focus (child, direction))
{
GtkFlowBox *box;
box = gtk_flow_box_child_get_box (GTK_FLOW_BOX_CHILD (widget));
if (box)
gtk_flow_box_update_cursor (box, GTK_FLOW_BOX_CHILD (widget));
return TRUE;
}
}
return FALSE;
}
g_object_get (widget, "has-focus", &had_focus, NULL);
if (had_focus)
{
@@ -765,7 +782,6 @@ struct _GtkFlowBoxPrivate {
guint row_spacing;
guint column_spacing;
GtkFlowBoxChild *prelight_child;
GtkFlowBoxChild *cursor_child;
GtkFlowBoxChild *selected_child;
@@ -883,19 +899,6 @@ gtk_flow_box_find_child_at_pos (GtkFlowBox *box,
return NULL;
}
static void
gtk_flow_box_update_prelight (GtkFlowBox *box,
GtkFlowBoxChild *child)
{
GtkFlowBoxPrivate *priv = BOX_PRIV (box);
if (child != priv->prelight_child)
{
priv->prelight_child = child;
gtk_widget_queue_draw (GTK_WIDGET (box));
}
}
static void
gtk_flow_box_update_active (GtkFlowBox *box,
GtkFlowBoxChild *child)
@@ -2706,7 +2709,6 @@ autoscroll_cb (GtkWidget *widget,
child = gtk_flow_box_find_child_at_pos (box, x, y);
gtk_flow_box_update_prelight (box, child);
gtk_flow_box_update_active (box, child);
if (child != NULL)
@@ -2809,7 +2811,6 @@ gtk_flow_box_enter_notify_event (GtkWidget *widget,
return FALSE;
child = gtk_flow_box_find_child_at_pos (box, event->x, event->y);
gtk_flow_box_update_prelight (box, child);
gtk_flow_box_update_active (box, child);
return FALSE;
@@ -2830,7 +2831,6 @@ gtk_flow_box_leave_notify_event (GtkWidget *widget,
else
child = gtk_flow_box_find_child_at_pos (box, event->x, event->y);
gtk_flow_box_update_prelight (box, child);
gtk_flow_box_update_active (box, child);
return FALSE;
@@ -2903,7 +2903,6 @@ gtk_flow_box_motion_notify_event (GtkWidget *widget,
}
child = gtk_flow_box_find_child_at_pos (box, relative_x, relative_y);
gtk_flow_box_update_prelight (box, child);
gtk_flow_box_update_active (box, child);
return GTK_WIDGET_CLASS (gtk_flow_box_parent_class)->motion_notify_event (widget, event);
@@ -3141,8 +3140,6 @@ gtk_flow_box_remove (GtkContainer *container,
was_visible = child_is_visible (GTK_WIDGET (child));
was_selected = CHILD_PRIV (child)->selected;
if (child == priv->prelight_child)
priv->prelight_child = NULL;
if (child == priv->active_child)
priv->active_child = NULL;
if (child == priv->selected_child)
@@ -3193,6 +3190,12 @@ gtk_flow_box_focus (GtkWidget *widget,
GSequenceIter *iter;
GtkFlowBoxChild *next_focus_child;
/* Without "can-focus" flag fall back to the default behavior immediately */
if (!gtk_widget_get_can_focus (widget))
{
return GTK_WIDGET_CLASS (gtk_flow_box_parent_class)->focus (widget, direction);
}
focus_child = gtk_container_get_focus_child (GTK_CONTAINER (box));
next_focus_child = NULL;
@@ -3313,7 +3316,7 @@ gtk_flow_box_toggle_cursor_child (GtkFlowBox *box)
gtk_flow_box_select_and_activate (box, priv->cursor_child);
}
static void
static gboolean
gtk_flow_box_move_cursor (GtkFlowBox *box,
GtkMovementStep step,
gint count)
@@ -3331,6 +3334,10 @@ gtk_flow_box_move_cursor (GtkFlowBox *box,
GtkAdjustment *adjustment;
gboolean vertical;
/* Without "can-focus" flag fall back to the default behavior immediately */
if (!gtk_widget_get_can_focus (GTK_WIDGET (box)))
return FALSE;
vertical = priv->orientation == GTK_ORIENTATION_VERTICAL;
if (vertical)
@@ -3479,17 +3486,25 @@ gtk_flow_box_move_cursor (GtkFlowBox *box,
if (!gtk_widget_keynav_failed (GTK_WIDGET (box), direction))
{
GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (box));
if (toplevel)
gtk_widget_child_focus (toplevel,
direction == GTK_DIR_UP ?
GTK_DIR_TAB_BACKWARD :
GTK_DIR_TAB_FORWARD);
return FALSE;
}
return;
return TRUE;
}
/* If the child has its "can-focus" property set to FALSE then it will
* not grab the focus. We must pass the focus to its child directly.
*/
if (!gtk_widget_get_can_focus (GTK_WIDGET (child)))
{
GtkWidget *subchild;
subchild = gtk_bin_get_child (GTK_BIN (child));
if (subchild)
{
GtkDirectionType direction = count < 0 ? GTK_DIR_TAB_BACKWARD : GTK_DIR_TAB_FORWARD;
gtk_widget_child_focus (subchild, direction);
}
}
get_current_selection_modifiers (GTK_WIDGET (box), &modify, &extend);
@@ -3497,6 +3512,7 @@ gtk_flow_box_move_cursor (GtkFlowBox *box,
gtk_flow_box_update_cursor (box, child);
if (!modify)
gtk_flow_box_update_selection (box, child, FALSE, extend);
return TRUE;
}
/* Selection {{{2 */
@@ -3845,8 +3861,6 @@ gtk_flow_box_class_init (GtkFlowBoxClass *class)
* The ::move-cursor signal is a
* [keybinding signal][GtkBindingSignal]
* which gets emitted when the user initiates a cursor movement.
* If the cursor is not visible in @text_view, this signal causes
* the viewport to be moved instead.
*
* Applications should not connect to it, but may emit it with
* g_signal_emit_by_name() if they need to control the cursor
@@ -3859,14 +3873,17 @@ gtk_flow_box_class_init (GtkFlowBoxClass *class)
* - Arrow keys move by individual children
* - Home/End keys move to the ends of the box
* - PageUp/PageDown keys move vertically by pages
*
* Returns: %TRUE to stop other handlers from being invoked for the event.
* %FALSE to propagate the event further.
*/
signals[MOVE_CURSOR] = g_signal_new (I_("move-cursor"),
GTK_TYPE_FLOW_BOX,
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
G_STRUCT_OFFSET (GtkFlowBoxClass, move_cursor),
NULL, NULL,
_gtk_marshal_VOID__ENUM_INT,
G_TYPE_NONE, 2,
_gtk_marshal_BOOLEAN__ENUM_INT,
G_TYPE_BOOLEAN, 2,
GTK_TYPE_MOVEMENT_STEP, G_TYPE_INT);
/**
* GtkFlowBox::select-all:
@@ -4152,8 +4169,9 @@ gtk_flow_box_insert (GtkFlowBox *box,
*
* Gets the nth child in the @box.
*
* Returns: (transfer none): the child widget, which will
* always be a #GtkFlowBoxChild
* Returns: (transfer none) (nullable): the child widget, which will
* always be a #GtkFlowBoxChild or %NULL in case no child widget
* with the given index exists.
*
* Since: 3.12
*/
@@ -4932,8 +4950,8 @@ gtk_flow_box_invalidate_filter (GtkFlowBox *box)
* gtk_flow_box_child_changed()) and when gtk_flow_box_invalidate_sort()
* is called.
*
* + * Note that using a sort function is incompatible with using a model
* + * (see gtk_list_box_bind_model()).
* Note that using a sort function is incompatible with using a model
* (see gtk_flow_box_bind_model()).
*
* Since: 3.12
*/
+2 -2
View File
@@ -61,7 +61,7 @@ struct _GtkFlowBoxClass
void (*selected_children_changed) (GtkFlowBox *box);
void (*activate_cursor_child) (GtkFlowBox *box);
void (*toggle_cursor_child) (GtkFlowBox *box);
void (*move_cursor) (GtkFlowBox *box,
gboolean (*move_cursor) (GtkFlowBox *box,
GtkMovementStep step,
gint count);
void (*select_all) (GtkFlowBox *box);
@@ -107,7 +107,7 @@ struct _GtkFlowBoxChildClass
* Called for flow boxes that are bound to a #GListModel with
* gtk_flow_box_bind_model() for each item that gets added to the model.
*
* Returns: a #GtkWidget that represents @item
* Returns: (transfer full): a #GtkWidget that represents @item
*
* Since: 3.18
*/
+2 -2
View File
@@ -1240,7 +1240,7 @@ gtk_gesture_get_sequences (GtkGesture *gesture)
*
* Returns the #GdkEventSequence that was last updated on @gesture.
*
* Returns: The last updated sequence
* Returns: (nullable): The last updated sequence
*
* Since: 3.14
**/
@@ -1263,7 +1263,7 @@ gtk_gesture_get_last_updated_sequence (GtkGesture *gesture)
*
* Returns the last event that was processed for @sequence.
*
* Returns: (transfer none): The last event from @sequence
* Returns: (transfer none) (nullable): The last event from @sequence
**/
const GdkEvent *
gtk_gesture_get_last_event (GtkGesture *gesture,
+1 -1
View File
@@ -510,7 +510,7 @@ gtk_gesture_single_get_current_button (GtkGestureSingle *gesture)
* Returns the event sequence currently interacting with @gesture.
* This is only meaningful if gtk_gesture_is_active() returns %TRUE.
*
* Returns: the current sequence
* Returns: (nullable): the current sequence
*
* Since: 3.14
**/
+1 -1
View File
@@ -1951,7 +1951,7 @@ gtk_grid_attach_next_to (GtkGrid *grid,
* Gets the child of @grid whose area covers the grid
* cell whose upper left corner is at @left, @top.
*
* Returns: (transfer none): the child at the given position, or %NULL
* Returns: (transfer none) (nullable): the child at the given position, or %NULL
*
* Since: 3.2
*/
+36 -1
View File
@@ -1391,6 +1391,40 @@ gtk_header_bar_get_custom_title (GtkHeaderBar *bar)
return priv->custom_title;
}
static void
gtk_header_bar_destroy (GtkWidget *widget)
{
GtkHeaderBarPrivate *priv = gtk_header_bar_get_instance_private (GTK_HEADER_BAR (widget));
if (priv->custom_title)
{
gtk_widget_unparent (priv->custom_title);
priv->custom_title = NULL;
}
if (priv->label_box)
{
gtk_widget_unparent (priv->label_box);
priv->label_box = NULL;
}
if (priv->titlebar_start_box)
{
gtk_widget_unparent (priv->titlebar_start_box);
priv->titlebar_start_box = NULL;
priv->titlebar_start_separator = NULL;
}
if (priv->titlebar_end_box)
{
gtk_widget_unparent (priv->titlebar_end_box);
priv->titlebar_end_box = NULL;
priv->titlebar_end_separator = NULL;
}
GTK_WIDGET_CLASS (gtk_header_bar_parent_class)->destroy (widget);
}
static void
gtk_header_bar_finalize (GObject *object)
{
@@ -1844,6 +1878,7 @@ gtk_header_bar_class_init (GtkHeaderBarClass *class)
object_class->get_property = gtk_header_bar_get_property;
object_class->set_property = gtk_header_bar_set_property;
widget_class->destroy = gtk_header_bar_destroy;
widget_class->size_allocate = gtk_header_bar_size_allocate;
widget_class->get_preferred_width = gtk_header_bar_get_preferred_width;
widget_class->get_preferred_height = gtk_header_bar_get_preferred_height;
@@ -1897,7 +1932,7 @@ gtk_header_bar_class_init (GtkHeaderBarClass *class)
P_("Custom Title"),
P_("Custom title widget to display"),
GTK_TYPE_WIDGET,
G_PARAM_READWRITE|G_PARAM_CONSTRUCT|G_PARAM_STATIC_STRINGS);
G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS);
header_bar_props[PROP_SPACING] =
g_param_spec_int ("spacing",
+1 -1
View File
@@ -110,7 +110,7 @@ _gtk_icon_cache_new_for_path (const gchar *path)
/* Bug 660730: _fstat32 is only defined in msvcrt80.dll+/VS 2005+ */
/* or possibly in the msvcrt.dll linked to by the Windows DDK */
/* (will need to check on the Windows DDK part later) */
#if (_MSC_VER >= 1400 || __MSVCRT_VERSION__ >= 0x0800)
#if ((_MSC_VER >= 1400 || __MSVCRT_VERSION__ >= 0x0800) || defined (__MINGW64_VERSION_MAJOR)) && !defined(_WIN64)
#undef fstat /* Just in case */
#define fstat _fstat32
#endif
+33 -2
View File
@@ -1087,18 +1087,33 @@ static const gchar builtin_hicolor_index[] =
"[Icon Theme]\n"
"Name=Hicolor\n"
"Hidden=True\n"
"Directories=16x16/actions,22x22/actions,24x24/actions,32x32/actions\n"
"Directories=16x16/actions,16x16/status,22x22/actions,24x24/actions,24x24/status,32x32/actions,32x32/status,48x48/status,64x64/actions\n"
"[16x16/actions]\n"
"Size=16\n"
"Type=Threshold\n"
"[16x16/status]\n"
"Size=16\n"
"Type=Threshold\n"
"[22x22/actions]\n"
"Size=22\n"
"Type=Threshold\n"
"[24x24/actions]\n"
"Size=24\n"
"Type=Threshold\n"
"[24x24/status]\n"
"Size=24\n"
"Type=Threshold\n"
"[32x32/actions]\n"
"Size=32\n"
"Type=Threshold\n"
"[32x32/status]\n"
"Size=32\n"
"Type=Threshold\n"
"[48x48/status]\n"
"Size=48\n"
"Type=Threshold\n"
"[64x64/actions]\n"
"Size=64\n"
"Type=Threshold\n";
static void
@@ -1995,6 +2010,12 @@ choose_icon (GtkIconTheme *icon_theme,
* can then be rendered into a pixbuf using
* gtk_icon_info_load_icon(). (gtk_icon_theme_load_icon()
* combines these two steps if all you need is the pixbuf.)
*
* When rendering on displays with high pixel densities you should not
* use a @size multiplied by the scaling factor returned by functions
* like gdk_window_get_scale_factor(). Instead, you should use
* gtk_icon_theme_lookup_icon_for_scale(), as the assets loaded
* for a given scaling factor may be different.
*
* Returns: (nullable) (transfer full): a #GtkIconInfo object
* containing information about the icon, or %NULL if the
@@ -4441,7 +4462,11 @@ gtk_icon_info_load_symbolic_svg (GtkIconInfo *icon_info,
return NULL;
if (!icon_info_ensure_scale_and_pixbuf (icon_info))
return NULL;
{
g_propagate_error (error, icon_info->load_error);
icon_info->load_error = NULL;
return NULL;
}
if (icon_info->symbolic_width == 0 ||
icon_info->symbolic_height == 0)
@@ -5373,6 +5398,12 @@ find_builtin_icon (const gchar *icon_name,
* such as the filename of the icon. The icon can then be rendered
* into a pixbuf using gtk_icon_info_load_icon().
*
* When rendering on displays with high pixel densities you should not
* use a @size multiplied by the scaling factor returned by functions
* like gdk_window_get_scale_factor(). Instead, you should use
* gtk_icon_theme_lookup_by_gicon_for_scale(), as the assets loaded
* for a given scaling factor may be different.
*
* Returns: (nullable) (transfer full): a #GtkIconInfo containing
* information about the icon, or %NULL if the icon wasnt
* found. Unref with g_object_unref()
+35 -2
View File
@@ -966,6 +966,36 @@ gtk_image_set_from_file (GtkImage *image,
g_object_thaw_notify (G_OBJECT (image));
}
#ifndef GDK_PIXBUF_MAGIC_NUMBER
#define GDK_PIXBUF_MAGIC_NUMBER (0x47646b50) /* 'GdkP' */
#endif
static gboolean
resource_is_pixdata (const gchar *resource_path)
{
const guint8 *stream;
guint32 magic;
gsize data_size;
GBytes *bytes;
gboolean ret = FALSE;
bytes = g_resources_lookup_data (resource_path, 0, NULL);
if (bytes == NULL)
return FALSE;
stream = g_bytes_get_data (bytes, &data_size);
if (data_size < sizeof(guint32))
goto out;
magic = (stream[0] << 24) + (stream[1] << 16) + (stream[2] << 8) + stream[3];
if (magic == GDK_PIXBUF_MAGIC_NUMBER)
ret = TRUE;
out:
g_bytes_unref (bytes);
return ret;
}
/**
* gtk_image_set_from_resource:
* @image: a #GtkImage
@@ -979,7 +1009,7 @@ gtk_image_set_from_resource (GtkImage *image,
{
GtkImagePrivate *priv;
GdkPixbufAnimation *animation;
gint scale_factor;
gint scale_factor = 1;
g_return_if_fail (GTK_IS_IMAGE (image));
@@ -995,7 +1025,10 @@ gtk_image_set_from_resource (GtkImage *image,
return;
}
animation = load_scalable_with_loader (image, NULL, resource_path, &scale_factor);
if (resource_is_pixdata (resource_path))
animation = gdk_pixbuf_animation_new_from_resource (resource_path, NULL);
else
animation = load_scalable_with_loader (image, NULL, resource_path, &scale_factor);
if (animation == NULL)
{
+28 -20
View File
@@ -651,7 +651,7 @@ gtk_list_box_get_selected_row (GtkListBox *box)
* If @_index is negative or larger than the number of items in the
* list, %NULL is returned.
*
* Returns: (transfer none): the child #GtkWidget or %NULL
* Returns: (transfer none) (nullable): the child #GtkWidget or %NULL
*
* Since: 3.10
*/
@@ -670,6 +670,23 @@ gtk_list_box_get_row_at_index (GtkListBox *box,
return NULL;
}
static int
row_y_cmp_func (gconstpointer a,
gconstpointer b,
gpointer user_data)
{
int y = GPOINTER_TO_INT (b);
GtkListBoxRowPrivate *row_priv = ROW_PRIV (a);
if (y < row_priv->y)
return 1;
else if (y >= row_priv->y + row_priv->height)
return -1;
return 0;
}
/**
* gtk_list_box_get_row_at_y:
* @box: a #GtkListBox
@@ -677,7 +694,8 @@ gtk_list_box_get_row_at_index (GtkListBox *box,
*
* Gets the row at the @y position.
*
* Returns: (transfer none): the row
* Returns: (transfer none) (nullable): the row or %NULL
* in case no row exists for the given y coordinate.
*
* Since: 3.10
*/
@@ -685,29 +703,19 @@ GtkListBoxRow *
gtk_list_box_get_row_at_y (GtkListBox *box,
gint y)
{
GtkListBoxRow *row, *found_row;
GtkListBoxRowPrivate *row_priv;
GSequenceIter *iter;
g_return_val_if_fail (GTK_IS_LIST_BOX (box), NULL);
/* TODO: This should use g_sequence_search */
iter = g_sequence_lookup (BOX_PRIV (box)->children,
GINT_TO_POINTER (y),
row_y_cmp_func,
NULL);
found_row = NULL;
for (iter = g_sequence_get_begin_iter (BOX_PRIV (box)->children);
!g_sequence_iter_is_end (iter);
iter = g_sequence_iter_next (iter))
{
row = (GtkListBoxRow*) g_sequence_get (iter);
row_priv = ROW_PRIV (row);
if (y >= row_priv->y && y < (row_priv->y + row_priv->height))
{
found_row = row;
break;
}
}
if (iter)
return GTK_LIST_BOX_ROW (g_sequence_get (iter));
return found_row;
return NULL;
}
/**
@@ -3324,7 +3332,7 @@ gtk_list_box_row_changed (GtkListBoxRow *row)
* in a #GtkListBoxUpdateHeaderFunc to see if there is a header
* set already, and if so to update the state of it.
*
* Returns: (transfer none): the current header, or %NULL if none
* Returns: (transfer none) (nullable): the current header, or %NULL if none
*
* Since: 3.10
*/
+7 -1
View File
@@ -698,6 +698,8 @@ static void
do_post_parse_initialization (int *argc,
char ***argv)
{
GdkDisplayManager *display_manager;
if (gtk_initialized)
return;
@@ -737,7 +739,11 @@ do_post_parse_initialization (int *argc,
_gtk_modules_init (argc, argv, NULL);
}
g_signal_connect (gdk_display_manager_get (), "notify::default-display",
display_manager = gdk_display_manager_get ();
if (gdk_display_manager_get_default_display (display_manager) != NULL)
_gtk_accessibility_init ();
g_signal_connect (display_manager, "notify::default-display",
G_CALLBACK (default_display_notify_cb),
NULL);
}
-15
View File
@@ -134,8 +134,6 @@ static void gtk_menu_shell_screen_changed (GtkWidget *widget,
GdkScreen *previous_screen);
static gboolean gtk_menu_shell_grab_broken (GtkWidget *widget,
GdkEventGrabBroken *event);
static gboolean gtk_menu_shell_draw (GtkWidget *widget,
cairo_t *cr);
static void gtk_menu_shell_add (GtkContainer *container,
GtkWidget *widget);
static void gtk_menu_shell_remove (GtkContainer *container,
@@ -201,7 +199,6 @@ gtk_menu_shell_class_init (GtkMenuShellClass *klass)
widget_class->enter_notify_event = gtk_menu_shell_enter_notify;
widget_class->leave_notify_event = gtk_menu_shell_leave_notify;
widget_class->screen_changed = gtk_menu_shell_screen_changed;
widget_class->draw = gtk_menu_shell_draw;
container_class->add = gtk_menu_shell_add;
container_class->remove = gtk_menu_shell_remove;
@@ -617,18 +614,6 @@ gtk_menu_shell_realize (GtkWidget *widget)
gtk_widget_register_window (widget, window);
}
static gboolean
gtk_menu_shell_draw (GtkWidget *widget,
cairo_t *cr)
{
gtk_render_background (gtk_widget_get_style_context (widget), cr,
0, 0,
gtk_widget_get_allocated_width (widget),
gtk_widget_get_allocated_height (widget));
return GTK_WIDGET_CLASS (gtk_menu_shell_parent_class)->draw (widget, cr);
}
static void
gtk_menu_shell_activate (GtkMenuShell *menu_shell)
{
+1
View File
@@ -440,6 +440,7 @@ gtk_message_dialog_constructed (GObject *object)
gtk_widget_show (box);
gtk_widget_set_size_request (box, -1, 16);
label = gtk_label_new ("");
gtk_widget_set_no_show_all (label, TRUE);
gtk_widget_set_margin_top (label, 6);
gtk_widget_set_margin_bottom (label, 6);
gtk_style_context_add_class (gtk_widget_get_style_context (label), "title");
+8 -6
View File
@@ -2837,8 +2837,8 @@ gtk_notebook_arrow_button_press (GtkNotebook *notebook,
static gboolean
get_widget_coordinates (GtkWidget *widget,
GdkEvent *event,
gint *x,
gint *y)
gdouble *x,
gdouble *y)
{
GdkWindow *window = ((GdkEventAny *)event)->window;
gdouble tx, ty;
@@ -2869,7 +2869,9 @@ get_widget_coordinates (GtkWidget *widget,
}
static GList*
get_tab_at_pos (GtkNotebook *notebook, gint x, gint y)
get_tab_at_pos (GtkNotebook *notebook,
gdouble x,
gdouble y)
{
GtkNotebookPrivate *priv = notebook->priv;
GtkNotebookPage *page;
@@ -2903,7 +2905,7 @@ gtk_notebook_button_press (GtkWidget *widget,
GtkNotebookPage *page;
GList *tab;
GtkNotebookArrow arrow;
gint x, y;
gdouble x, y;
if (event->type != GDK_BUTTON_PRESS || !priv->children ||
priv->button)
@@ -3282,7 +3284,7 @@ tab_prelight (GtkNotebook *notebook,
{
GtkNotebookPrivate *priv = notebook->priv;
GList *tab;
gint x, y;
gdouble x, y;
if (get_widget_coordinates (GTK_WIDGET (notebook), (GdkEvent *)event, &x, &y))
{
@@ -3313,7 +3315,7 @@ gtk_notebook_leave_notify (GtkWidget *widget,
{
GtkNotebook *notebook = GTK_NOTEBOOK (widget);
GtkNotebookPrivate *priv = notebook->priv;
gint x, y;
gdouble x, y;
if (get_widget_coordinates (widget, (GdkEvent *)event, &x, &y))
{
+8 -15
View File
@@ -1484,9 +1484,8 @@ gtk_paned_size_allocate (GtkWidget *widget,
if (priv->child1 && gtk_widget_get_visible (priv->child1))
{
gtk_paned_set_child_visible (paned, 0, TRUE);
if (priv->child2)
gtk_paned_set_child_visible (paned, 1, FALSE);
gtk_paned_set_child_visible (paned, CHILD1, TRUE);
gtk_paned_set_child_visible (paned, CHILD2, FALSE);
gtk_paned_child_allocate (priv->child1,
priv->child1_window,
@@ -1495,9 +1494,8 @@ gtk_paned_size_allocate (GtkWidget *widget,
}
else if (priv->child2 && gtk_widget_get_visible (priv->child2))
{
gtk_paned_set_child_visible (paned, 1, TRUE);
if (priv->child1)
gtk_paned_set_child_visible (paned, 0, FALSE);
gtk_paned_set_child_visible (paned, CHILD1, FALSE);
gtk_paned_set_child_visible (paned, CHILD2, TRUE);
gtk_paned_child_allocate (priv->child2,
priv->child2_window,
@@ -1506,10 +1504,8 @@ gtk_paned_size_allocate (GtkWidget *widget,
}
else
{
if (priv->child1)
gtk_paned_set_child_visible (paned, 0, FALSE);
if (priv->child2)
gtk_paned_set_child_visible (paned, 1, FALSE);
gtk_paned_set_child_visible (paned, CHILD1, FALSE);
gtk_paned_set_child_visible (paned, CHILD2, FALSE);
}
}
}
@@ -2212,11 +2208,8 @@ gtk_paned_calc_position (GtkPaned *paned,
&priv->min_position, &priv->max_position,
&priv->child1_size);
if (priv->child1)
gtk_paned_set_child_visible (paned, 0, priv->child1_size != 0);
if (priv->child2)
gtk_paned_set_child_visible (paned, 1, priv->child1_size != allocation);
gtk_paned_set_child_visible (paned, CHILD1, priv->child1_size != 0);
gtk_paned_set_child_visible (paned, CHILD2, priv->child1_size != allocation);
g_object_freeze_notify (G_OBJECT (paned));
if (priv->child1_size != old_position)
+3 -3
View File
@@ -526,7 +526,7 @@ gtk_path_bar_size_allocate (GtkWidget *widget,
GList *list, *first_button;
gint width;
gint allocation_width;
gboolean need_sliders = FALSE;
gboolean need_sliders = TRUE;
gint up_slider_offset = 0;
gint down_slider_offset = 0;
GtkRequisition child_requisition;
@@ -584,7 +584,7 @@ gtk_path_bar_size_allocate (GtkWidget *widget,
else
first_button = path_bar->priv->button_list;
need_sliders = TRUE;
/* To see how much space we have, and how many buttons we can display.
* We start at the first button, count forward until hit the new
* button, then count backwards.
@@ -742,7 +742,7 @@ gtk_path_bar_size_allocate (GtkWidget *widget,
needs_reorder |= gtk_widget_get_child_visible (path_bar->priv->up_slider_button) == TRUE;
gtk_widget_set_child_visible (path_bar->priv->up_slider_button, FALSE);
}
if (need_sliders)
{
child_allocation.width = path_bar->priv->slider_width;
+27 -34
View File
@@ -1,27 +1,24 @@
/*
* GtkPlacesSidebar - sidebar widget for places in the filesystem
/* GtkPlacesSidebar - sidebar widget for places in the filesystem
*
* This code comes from Nautilus, GNOMEs file manager.
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
* You should have received a copy of the GNU General Public License
* along with this library; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Authors : Mr Jamie McCracken (jamiemcc at blueyonder dot co dot uk)
* Cosimo Cecchi <cosimoc@gnome.org>
* Federico Mena Quintero <federico@gnome.org>
* Carlos Soriano <csoriano@gnome.org>
* This code is originally from Nautilus.
*
* Authors : Mr Jamie McCracken (jamiemcc at blueyonder dot co dot uk)
* Cosimo Cecchi <cosimoc@gnome.org>
* Federico Mena Quintero <federico@gnome.org>
* Carlos Soriano <csoriano@gnome.org>
*/
#include "config.h"
@@ -823,33 +820,29 @@ out:
}
static gboolean
is_removable_volume (GVolume *volume)
is_external_volume (GVolume *volume)
{
gboolean is_removable;
gboolean is_external;
GDrive *drive;
GMount *mount;
gchar *id;
drive = g_volume_get_drive (volume);
mount = g_volume_get_mount (volume);
id = g_volume_get_identifier (volume, G_VOLUME_IDENTIFIER_KIND_CLASS);
is_removable = g_volume_can_eject (volume);
is_external = g_volume_can_eject (volume);
/* NULL volume identifier only happens on removable devices */
is_removable |= !id;
is_external |= !id;
if (drive)
is_removable |= g_drive_can_eject (drive);
if (mount)
is_removable |= (g_mount_can_eject (mount) && !g_mount_can_unmount (mount));
is_external |= g_drive_can_eject (drive) ||
g_drive_is_media_removable (drive) ||
g_drive_can_stop (drive);
g_clear_object (&drive);
g_clear_object (&mount);
g_free (id);
return is_removable;
return is_external;
}
static void
@@ -988,7 +981,7 @@ update_places (GtkPlacesSidebar *sidebar)
}
g_free (identifier);
if (sidebar->show_other_locations && !is_removable_volume (volume))
if (sidebar->show_other_locations && !is_external_volume (volume))
{
g_object_unref (volume);
continue;
@@ -1092,7 +1085,7 @@ update_places (GtkPlacesSidebar *sidebar)
}
g_free (identifier);
if (sidebar->show_other_locations && !is_removable_volume (volume))
if (sidebar->show_other_locations && !is_external_volume (volume))
{
g_object_unref (volume);
continue;
@@ -1712,7 +1705,7 @@ build_file_list_from_uris (const gchar **uris)
gint i;
result = NULL;
for (i = 0; uris[i]; i++)
for (i = 0; uris && uris[i]; i++)
{
GFile *file;
+14 -17
View File
@@ -1,27 +1,24 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/*
* GtkPlacesSidebar - sidebar widget for places in the filesystem
/* GtkPlacesSidebar - sidebar widget for places in the filesystem
*
* This code comes from Nautilus, GNOMEs file manager.
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 2.1 of the License, or
* (at your option) any later version.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* You should have received a copy of the GNU General Public License
* along with this library; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Authors : Mr Jamie McCracken (jamiemcc at blueyonder dot co dot uk)
* Federico Mena Quintero <federico@gnome.org>
* This code comes from Nautilus, GNOMEs file manager.
*
* Authors : Mr Jamie McCracken (jamiemcc at blueyonder dot co dot uk)
* Federico Mena Quintero <federico@gnome.org>
*/
#ifndef __GTK_PLACES_SIDEBAR_H__
+2 -2
View File
@@ -4,7 +4,7 @@
*
* This file is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 3 of the
* published by the Free Software Foundation; either version 2.1 of the
* License, or (at your option) any later version.
*
* This file is distributed in the hope that it will be useful, but
@@ -12,7 +12,7 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Authors: Carlos Soriano <csoriano@gnome.org>

Some files were not shown because too many files have changed in this diff Show More