Commit Graph

44762 Commits

Author SHA1 Message Date
Matthias Clasen
38be852bee Cosmetic: Avoid explicit state variables
Using the state of the context makes this more obviously correct.
2015-11-14 12:32:57 -05:00
Matthias Clasen
10a8533bd3 Cosmetic: Avoid explicit state variables
Using the state of the context makes this more obviously correct.
2015-11-14 12:32:57 -05:00
Matthias Clasen
6c5d08d75a Cosmetic: Avoid explicit state variables
Fold it into its single user.
2015-11-14 12:32:57 -05:00
Matthias Clasen
3007ad6f3b Cosmetic: Avoid explicit state variables
Using the state of the context makes this more obviously correct.
2015-11-14 12:32:57 -05:00
Matthias Clasen
eca9549c72 Cosmetic: Avoid explicit state variables
Using the state of the context makes this more obviously correct.
2015-11-14 12:32:57 -05:00
Matthias Clasen
beb2875437 Cosmetic: Avoid explict state variables
Using the state of the context makes this more obviously correct.
2015-11-14 12:32:57 -05:00
Matthias Clasen
acdb7dae4e Cosmetic: Avoid an explicit state variable
Using the state of the context makes it more obviously correct.
2015-11-14 12:32:57 -05:00
Matthias Clasen
cf1adadfed listbox: Cosmetic cleanup
We don't cast these arguments anywhere else, so lets not do here
either.
2015-11-14 12:32:57 -05:00
Benjamin Otte
55735cee2f window: Don't invalidate cssnode during get_preferred_width()
Getting the shadow width must not call gtk_style_context_set_state()
because that will invalidate the node and cause a style-updated emission
which can cause gtk_widget_queue_resize() calls.

And calling queue_resize() from get_preferred_size() essentially means
the size is permanently invalid because you invalidate it while
querying it.

This causes flickering of windows when going from/to backdrop state. To
avoid this we either need to fix the theme to not have different shadow
sizes in those cases or we need to ensure the window doesn't flicker in
the first place.
2015-11-14 18:32:08 +01:00
YunQiang Su
38bfec8ea4 Us ... instead of … for zh_CN 2015-11-14 21:59:40 +08:00
Pedro Albuquerque
3c1193f3e4 Updated Portuguese translation 2015-11-14 07:50:47 +00:00
Timm Bäder
3c22784328 GtkShortcutsShortcut: Add missing word 2015-11-13 14:12:35 +01:00
Timm Bäder
86f4346c29 GtkGrid: Remove invalid return annotation 2015-11-13 14:12:35 +01:00
Chun-wei Fan
d01ea18dc3 gtkimcontextsimple.c: Use X11_DATA_PREFIX only on X11/Wayland
Only use the hard-coded build-time path given by X11_PREFIX on X11 and
Wayland where a X11 package is normally available.  On other platforms,
get the datadir of the running system and mimic the behavior by
constructing the path dynamically.  This avoids hardcoding the path for
searching for compose tables where we want to have relocatability.

This fixes the build on Windows/MSVC as well, where we don't normally have
any X11 packages available.

https://bugzilla.gnome.org/show_bug.cgi?id=757984
2015-11-13 07:39:54 -05:00
Matthias Clasen
1190a61c27 check menu item: Fix a typo
It is check, not checl. Pointed out by Giovanni Campagna in
https://bugzilla.gnome.org/show_bug.cgi?id=757968
2015-11-13 07:11:23 -05:00
Matthias Clasen
386b9ef075 Adwaita: Fix styling of selected rows in treeviews
This broke in some of the recent selection handling changes.
2015-11-13 07:07:53 -05:00
Paolo Borelli
c619c86250 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-13 07:07:53 -05:00
Ignacio Casal Quinteiro
d74a08b80f win32: do not use g_clear_pointer also on the clipboard window
A follow up on the previous patch. We should use DestroyWindow
directly since it has a different calling convention than
the expected callback for g_clear_pointer
2015-11-13 12:58:45 +01:00
Ignacio Casal Quinteiro
2ad243d43d 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:57:53 +01:00
Matthias Clasen
e0aa35ca58 Update testlevelbar
This test needs some small updates after the recent changes
to levelbar styling.
2015-11-13 06:41:14 -05:00
Matthias Clasen
4faef48410 notebook: Chain up in direction_changed
We do this everywhere else.
2015-11-13 06:41:14 -05:00
Yosef Or Boczko
989f607e4a Updated Hebrew translation 2015-11-13 11:51:07 +02:00
Matthias Clasen
a0cdd4ac51 HighContrast: Update levelbar styling
Adapt to changes in the previous commit.
2015-11-13 01:05:30 -05:00
Matthias Clasen
d5ab5fee3b Adwaita: Update levelbar styling
Adapt to the changes in the previous commit. In particular, fix
the handling of low and high offsets. Anything below the low offset
gets warning color, anything below high gets selected background,
and anything below the new full offset gets success color.
2015-11-13 00:56:54 -05:00
Matthias Clasen
21209a963a levelbar: Use more CSS nodes
Create as many CSS nodes as we're rendering blocks on the screen.
2015-11-13 00:55:28 -05:00
Sébastien Wilmet
1685da6f69 textbuffer: nicer get_iter functions, without return values
Avoid crashes when passing an invalid location to a
gtk_text_buffer_get_iter_at_*() function.

A first attempt added boolean return values to know if @iter has been set to
the exact location, but it breaks Python and JS bindings because the out
parameter is already a return value in those languages.

Unit tests are added.

https://bugzilla.gnome.org/show_bug.cgi?id=735341
2015-11-12 17:50:39 +01:00
Ignacio Casal Quinteiro
1f5f3ca41b win32: destroy clipboard notification window on dispose
The clipboard uses a hidden window to get some specific events.
The window was created but never destroyed on dispose.
2015-11-12 17:09:25 +01:00
Mingye Wang (Arthur2e5)
a4ccf0e382 update zh_CN translation 2015-11-12 23:18:24 +08:00
Ignacio Casal Quinteiro
79f7f19c6e win32: chain up on display dispose 2015-11-12 16:00:53 +01:00
Matthias Clasen
fde91c3bec Revert "textbuffer: nicer get_iter functions"
This reverts commit a9a1c00cc9.

Unfortunately, adding the boolean return broke both the python
and javascript bindings, since they now return a tuple consisting
of the boolean and the out argument.
2015-11-12 09:58:28 -05:00
Chun-wei Fan
a56f8859ee gtktestutils.c: Ensure variables are declared at top of block
Fixes build on C89 compilers...
2015-11-12 20:12:26 +08:00
Chun-wei Fan
dbe430f6ec MSVC builds: Use /opt:ref for release builds
glib-compile-resources have been updated to ensure that the symbols
generated are referred to, so that they will not be optimized out by the
linker in release builds.  We can change from /opt:noref to /opt:ref,
which should improve optimization a bit.
2015-11-12 18:16:33 +08:00
Chun-wei Fan
97b44e02a9 MSVC 2010+ builds: Do not explicitly use /LTCG
This partially reverts de16a4e.

As we now ensure that items using GResources and GConstructors are always
referenced so that the linker does not optimize them out in a default
Release build, we no longer need to enforce the use of /LTCG, so
/LTCG:incremental will work as well.
2015-11-12 15:53:47 +08:00
Alexander Larsson
51dc4873fd Add gtk_native_dialog_destroy()
Its very easy to get extra references to the NativeDialog so that
when you release your last reference any visible dialog is not
hidden. We handle this by adding a destroy method similar to how
you destroy regular toplevels.
2015-11-11 16:06:44 +01:00
Alexander Larsson
402225a8e2 GtkNativeDialog: Fix modal handling in gtk_native_dialog_run() 2015-11-11 15:14:40 +01:00
Emmanuele Bassi
0e0b45602a tooltipwindow: Use a builder UI file
It's not a hugely complicated file, but it's easier to deal with some of
the details of tooltip windows styling if we have a UI file to edit,
instead of source code.
2015-11-11 12:27:07 +00:00
Emmanuele Bassi
73497c16ae Add autocleanups for GtkShortcutsWindow 2015-11-11 12:02:43 +00:00
Emmanuele Bassi
9ebe95f4a9 Remove introspection scanner guards around autocleanups
They are not needed.
2015-11-11 12:02:43 +00:00
Timm Bäder
5912790f32 gtklevelbar: Fix typo 2015-11-11 09:35:31 +01:00
Matthias Clasen
373a3517b3 HighContrast: Update levelbar styling
Adapt to the changes in the previous release.
2015-11-11 00:30:24 -05:00
Matthias Clasen
2a0024ebe2 Adwaita: Update levelbar rendering
Adapt to the changes in the previous commit.
2015-11-11 00:26:32 -05:00
Matthias Clasen
17f110433d levelbar: Port to use CSS nodes
Use element names levelbar, trough, block, and some style
classes on the block nodes: .discrete, .continuous, .empty,
.level-low, etc.
2015-11-11 00:25:24 -05:00
Matthias Clasen
601cbbcc87 Improve testlevelbar
Add a switch to toggle between discrete and continuous modes.
2015-11-10 23:31:33 -05:00
Matthias Clasen
02d08a1bd7 text util: Avoid creating transient nodes
We don't need to add .view - its already added, and shouldn't
really be needed in the first place.
2015-11-10 21:59:31 -05:00
Matthias Clasen
f3c915f18c HighContrast: Update textview selection styling
Use the selection element name.
2015-11-10 21:52:45 -05:00
Matthias Clasen
fbd6a814c6 Adwaita: Update textview selection styling
Use the selection name.
2015-11-10 21:51:36 -05:00
Matthias Clasen
9d9088304c text view: Improve text rendering
Use the text CSS node for rendering text, and the selection node
for rendering selected text, avoid gtk_style_context_save, update
states of all CSS nodes, and use the proper states when querying
style properties.
2015-11-10 21:49:42 -05:00
Matthias Clasen
bb786ac240 textview: Use a CSS node for selection rendering
Use a CSS node with name selection, like we do for entries
and labels. Unlike those widgets, we currently don't user
gtk_render_background, but just use the background color.
That will require more effort.
2015-11-10 21:18:10 -05:00
Matthias Clasen
735a71da11 cell view: Add an element name
The element name is...cellview.
2015-11-10 20:45:42 -05:00
Matthias Clasen
514c0f761f HighContrast: Update label selection styling
Adapt to changes in the previous commit.
2015-11-10 20:33:12 -05:00