Commit Graph

49080 Commits

Author SHA1 Message Date
Daniel Boles
5dc5576e14 ScrolledWindow: Fix non-disconnection of handlers
• Use disconnect_by_data() to catch both _adjustment_changed() and now
  _adjustment_value_changed(), as the latter had been missed until now.

• Also disconnect from indicator_value_changed(), which was not done in
  destroy() due to indicator_reset() and remove_indicator() disagreeing.

https://bugzilla.gnome.org/show_bug.cgi?id=775074
2017-08-31 23:17:03 +01:00
Timm Bäder
64d05b5dc6 scrolledwindow: Properly remove scrollbars
Instead of keeping an extra ref, then unparent+destroy+unref, don't keep
an extra ref and just unparent the scrollbar when appropriate.
2017-08-31 22:59:40 +01:00
Daniel Boles
f0522e9944 Window: Connect screen signals properly in init()
Do not connect to get_settings_for_screen() if we have no screen…

Use g_signal_connect(), not connect_object(), to match how set_screen()
makes these same connections, and how finalize() already disconnects.

https://bugzilla.gnome.org/show_bug.cgi?id=705640
2017-08-31 20:23:00 +01:00
Daniel Boles
169e5502d1 FileChooserWidget: Remove an unused #include 2017-08-31 20:05:32 +01:00
Daniel Boles
794c0946a5 Entry: Rename int helper to gtk_entry_clear_icon()
It was called gtk_entry_clear(), which was unnecessarily vague.
2017-08-30 21:12:56 +01:00
Daniel Boles
12d96f27d3 Entry: Fix Shift-click → extend/truncate selection
Since the move from button-press to gesture events, Shift-clicking did
not work to start a selection (from none) or truncate an existing one.

This was due to the code being copy-pasted around and some logic being
broken in the process. This makes both of those work as they should, by
shuffling it again so the end result is the same as before. Highlights:

(1) ::button-press if extending due to a single press would call
set_positions(tmp_pos, tmp_pos), which is what made the Shift+click to
create a selection work. That was lost. Add it back to make that work.

(2) ::button-press in the “Truncate current selection” branch would not
execute all the stuff around “extend_to_left”, as that was the else
case. So, set extend_selection = FALSE so we skip over that later on.

(3) BUT! This Truncate case never fired because it was in the else
branch of if (in_selection())! Of course, it must be in the true branch.

(4) The IM context was not reset if the Shift-click occurred within an
existing selection, only if it did not. In ::button-press this was the
first thing done if extending a selection, regardless. Make it so again.

https://bugzilla.gnome.org/show_bug.cgi?id=780750
2017-08-30 18:25:00 +01:00
Daniel Boles
81d6f8d81c gl.po: Remove mnemonic underlines from tooltips
It looks like these were copy-paste errors from the corresponding labels
for buttons, which should have mnemonics. Of course, tooltips cannot.
2017-08-30 14:25:14 +01:00
Matthias Clasen
beb7bba3ce Avoid empty space in the emoji chooser
We need to hide the empty flow boxes as well, to avoid
spacing between them.

https://bugzilla.gnome.org/show_bug.cgi?id=786966
2017-08-30 14:25:14 +01:00
Fran Dieguez
305ac38b6a Update Galician translation 2017-08-30 13:10:56 +00:00
Fabio Tomat
b956cba4fb Update Friulian translation 2017-08-30 09:22:45 +00:00
Daniel Boles
9f1d57e032 PlacesSidebar: Reuse strings, mark for translation
The new menu items were not marked for translation, had no mnemonics,
and were not title-cased. Reuse the strings that we already had for the
buttons shortly down the file, and mark these for translation.

https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-08-29 20:09:11 +01:00
Nelson Benítez León
07320200d1 textview: fix bug on DnD displaced limits of selection
The fix of commit f2fd655754
should be confined to DnD coords only, because otherwise
it causes the start and end of the selection to be displaced.

https://bugzilla.gnome.org/show_bug.cgi?id=785736
2017-08-29 19:12:14 +01:00
Daniel Boles
afd624bf4b TextView: :border-width broke window→widget coords
Do the converse of commit bd7c87c762 so
that a TextView with Container:border-width > 0 does not get its handles
and magnified region shifted up/left from where they should be.

https://bugzilla.gnome.org/show_bug.cgi?id=786986
2017-08-29 19:04:26 +01:00
Daniel Boles
18a6c5c4c6 Expander: Don’t set event_window over whole widget
realize() gave the event_window the allocation of the whole widget. This
was wrong; it should be that of the title_gadget, as in size_allocate().

This broke expanders in which :expanded is TRUE before showing: Input
over the entire widget was sent to the title, making the child unable to
receive it. Clicking the child unexpectedly collapsed it. Once expanded
again, things fixed themselves as size_allocate() fixed the event_window
alloc. So, queuing a reallocate or resize after show() was a workaround.

Fix by giving event_window the allocation of the title_gadget, to match
what size_allocate() does. That is symmetrical and just plain correct.

https://bugzilla.gnome.org/show_bug.cgi?id=774134
2017-08-29 18:47:33 +01:00
Debarshi Ray
a827e92226 GtkBuilder: Prefer "type-func" over "class" when looking for the GType
https://bugzilla.gnome.org/show_bug.cgi?id=786932
2017-08-29 15:42:56 +02:00
Aurimas Černius
bbb233464c Updated Lithuanian translation 2017-08-29 15:49:02 +03:00
Rūdolfs Mazurs
07936ac71f Update Latvian translation 2017-08-29 12:17:44 +03:00
Chun-wei Fan
935e48ce09 build: Install Emoji chooser GSettings files in MSVC projects
This is needed for the Emoji chooser to work on Visual Studio builds.
2017-08-29 13:05:52 +08:00
Daniel Boles
c85f34b6fc LevelBar: Really fix underallocation of blocks
Themes should not enforce min sizes on blocks in continuous mode; in
this case, the filled block should be as large as it needs to be to
reflect the current value, and no larger or smaller than that. So, the
fact that the minimal size was selected on just levelbar block is wrong:
we should also require the levelbar.discrete class to apply min sizes.

The widget should enforce whatever correct minimum size results from the
above fix, by reapplying commit 78b4885fe8

Except: we should not allocate/draw the filled block if the value is 0,
as in this case, the LevelBar should be empty, not have a min-size fill.

https://bugzilla.gnome.org/show_bug.cgi?id=783649
2017-08-29 00:03:47 +01:00
Daniel Boles
bd7c87c762 TextView: Fix gesture coords with :border-width >0
Container:border-width caused the x/y coords converted to iters to be
offset inwards by that width, breaking positioning/selecting by gesture.

So, subtract :border-width in widget_to_text_window_coords(). This fixes
gesture positions, & plays fine with :margin & CSS margin/border/padding

N.B.: This is not to endorse :border-width. It’s gone in GTK+ 4 & weird
on a TextView: it’d be more intuitive to – if you must! – set it on the
TV parent. Really, please just use CSS instead. Still, it’s easy to fix.

https://bugzilla.gnome.org/show_bug.cgi?id=759725
2017-08-28 22:28:49 +01:00
gogo
25abbfdcf6 Update Croatian translation 2017-08-28 21:12:23 +00:00
Daniel Boles
669e8c4de5 Entry: Handle :show-emoji-icon becoming false
Disconnect the now-unwanted signal handler, and hide the icon.

https://bugzilla.gnome.org/show_bug.cgi?id=786940
2017-08-28 20:52:29 +01:00
Daniel Boles
6094caf984 Entry: Drop redundant typecasts
https://bugzilla.gnome.org/show_bug.cgi?id=786940
2017-08-28 20:52:26 +01:00
Daniel Boles
fccf19b905 Entry: Only open emoji picker on 2ndary icon click
We hijack the secondary icon for the emoji picker, but the handler for
::icon-press did not check the pressed icon and opened it for either.

https://bugzilla.gnome.org/show_bug.cgi?id=786938
2017-08-28 20:31:02 +01:00
Daniel Boles
1fd834c54d ComboBox: Don’t redundantly show() scrolled_window
It and its child were already show()n in list_setup().
2017-08-28 20:01:57 +01:00
Daniel Boles
1f1fdfe757 ComboBox: Fix wrongly matched signal disconnect()s
Various disconnections had the wrong flags and/or data, so we failed to
disconnect a pile of signals, shown by 0 returned by the disconnect_*()
functions. Fix this, and use the nicer disconnect_by_*() while here.
2017-08-28 20:01:57 +01:00
Daniel Boles
1301723905 Revert "combobox: remove superfluous GTK+ grabs"
This reverts commit 46b4e5d388.

Apparently these weren’t so redundant, because their removal introduced
at least 2 bugs in list-mode ComboBoxes: failure to close the popup upon
clicking out of it, and failing to receive mouse input in the popup of a
CB in a modal window. It may also have caused (even more!) stuck grabs.

https://bugzilla.gnome.org/show_bug.cgi?id=738387
https://bugzilla.gnome.org/show_bug.cgi?id=776793
2017-08-28 20:00:59 +01:00
Daniel Boles
c789bf7718 ComboBox: Really set list-mode popup transient-for
set_transient_for(toplevel) was only called in list_setup(). It was easy
to make a test showing a NULL :transient-for instead of the correct one.

So, move the call from list_setup() to popup_for_device(). Also do that
for window_group_add_window(), which means not calling it redundantly.

(I tried using a ComboBox:parent-set handler, but the Inspector’s CB
didn’t like that: it calls popup_for_device() twice and closes on button
release. Anyway, using popup() is much more concise than a new handler.)
2017-08-28 20:00:17 +01:00
Daniel Boles
70534de382 ComboBox: List-mode popup must open on CB’s screen
The screen for the list-mode popup_window was only being set in
set_popup_widget(), i.e. when changing modes, so if the ComboBox was
moved to a different screen later, the popup would appear on the
original one, which is wrong.

Worse, this (somehow) broke opening some combos in the Inspector.

Fix this by moving the call to set_screen() to popup_for_device(), so
the popup_window is put on the correct screen each time around.

https://bugzilla.gnome.org/show_bug.cgi?id=468868
https://bugzilla.gnome.org/show_bug.cgi?id=786771
2017-08-28 19:33:54 +01:00
Ask Hjorth Larsen
3b1e4031df Updated Danish translation 2017-08-28 19:27:02 +02:00
Matej Urbančič
7d7284ddbb Updated Slovenian translation 2017-08-28 19:23:15 +02:00
Matej Urbančič
0a1fba2172 Updated Slovenian translation 2017-08-28 19:19:40 +02:00
Gábor Kelemen
64eae69ff7 Update Hungarian translation 2017-08-28 16:09:38 +00:00
Balázs Meskó
ff625f69ea Update Hungarian translation 2017-08-28 16:05:37 +00:00
Fabio Tomat
13efeb0ad3 Update Friulian translation 2017-08-28 14:38:07 +00:00
Fabio Tomat
429b46d6aa Update Friulian translation 2017-08-28 14:12:06 +00:00
Marek Cernocky
639e2e992f Updated Czech translation 2017-08-28 15:54:20 +02:00
Милош Поповић
1169751955 Update Serbian Latin translation 2017-08-28 11:03:13 +00:00
Марко Костић
1ae2c662ff Update Serbian translation 2017-08-28 11:00:46 +00:00
Chun-wei Fan
3d4b721e28 build: Fix last commit
Another pango-1.0.lib was added accidently to the list of .lib files for
the GTK+ to link to.  Remove that, although it shouldn't really matter.
2017-08-28 16:28:18 +08:00
Chun-wei Fan
09b7dc81a6 build: Integrate introspection builds into MSVC projects
This is so that it is easier for one building GTK+ with Visual Studio to
build the introspection files as well in one shot.  Note that this is
not built by default, so one needs to select the gtk3-introspect
explicitly to build (and clean up) the introspection files.

For this to work, one needs to ensure the following:
-A complete build of GObject-Introspection in $(GlibEtcInstallRoot),
 that is built with the same installation of the Python interpretor that
 is used here (see PythonDir and PythonDirX64 in
 gtk3-version-paths.[vsprops|props]).
-Introspection files for ATK, GDK-Pixbuf and Pango, also in their proper
 locations under $(GlibEtcInstallRoot), which should be built with the
 same G-I installation.
2017-08-28 16:18:24 +08:00
Chun-wei Fan
e579245b1d build: Prepare NMake Makefiles for MSVC project integration
The build/win32/detectenv-msvc.mak needs to be updated for Visual Studio
2017, and we ought to add quotes to surround the copy destination path
for the introspection files, so that we do not bail out in the copy
process (cmd.exe's copy command does not like '+' in them that are not
quoted).
2017-08-28 16:15:11 +08:00
Chun-wei Fan
24fd61512b build: Set PythonDir according to MSVC version in projects
This is to make this more in-line with what is in the G-I projects, so
that we could use this to build the introspection files for GTK+-3.22.x
directly from the project files.  This is intended to follow the MSVC
versions used to build the official CPython Windows binaries, i.e.:
-3.3.x, 3.4.x: for MSVC 2010, 2012, 2013, which is built with 2010
-3.5.x, 3.6.x: for 2015 and 2017, which is built with 2015.
2017-08-28 15:56:18 +08:00
Chun-wei Fan
74ffc85b80 build: Use PythonDir in Visual Studio projects
This is to avoid any confusion with the PYTHONPATH envvar that is used
by Python for additional locations for looking for modules.
2017-08-28 15:55:59 +08:00
Julius Härtl
f68421376b gtkplacessidebar: remove oversight of old code
https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-08-28 08:13:12 +02:00
Changwoo Ryu
35cf9fefd6 Update Korean translation 2017-08-27 21:24:01 +00:00
Changwoo Ryu
cd33f3abc4 Update Korean translation 2017-08-27 21:22:39 +00:00
Carlos Garnacho
26d8a6dfba menu: Avoid cancelling the menu on GTK+ grabs inside the GtkMenu
Allows again sliders as menuitems, broken by commit 9b032073.

https://bugzilla.gnome.org/show_bug.cgi?id=786029
2017-08-27 20:43:11 +01:00
Daniel Boles
d1d8658898 PlacesSidebar: Avoid warning about unused variable
end_icon is only used if HAVE_CLOUDPROVIDERS is defined, so only declare
it under the same condition.

https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-08-27 15:37:34 +01:00
Daniel Boles
53e0bd91e6 SidebarRow: need config.h for HAVE_CLOUDPROVIDERS
https://bugzilla.gnome.org/show_bug.cgi?id=786123
2017-08-27 15:37:34 +01:00