Commit Graph

35499 Commits

Author SHA1 Message Date
Benjamin Otte
e38e47d7d3 clipboard: Reimplement Wayland clipboard using vfuncs
This way, the Wayland and the regular clipboard implementation can both
be compiled in and selected based on the display in use.

One thing potentially broken now is text mime type handling as Wayland
seemed to use different mime types in some places.
2013-08-20 16:34:29 +02:00
Benjamin Otte
aee5bcf9e2 clipboard: Make a bunch of functions vfuncs 2013-08-20 16:34:29 +02:00
Benjamin Otte
4009c8241b clipboard: Split struct definitions into private header 2013-08-20 16:34:29 +02:00
Alexander Larsson
dd27e55a5f Update README.in 2013-08-20 15:37:13 +02:00
Alexander Larsson
78dae73a30 x11: Add gdk_x11_display_set_window_scale
This lets you force a specific window scale, this is needed
for mutter to be able to disable the scaling as it needs access
to unmangled X window/screen sizes. It can also be useful to
force a specific scale in e.g. tests.
2013-08-20 11:15:08 +02:00
Alexander Larsson
66f1deef40 Enforce a fixed scale of 1 if no cairo scale support
We used to just follow the default, which would pick up scale
changes from xsettings, but that is not right if we can't
actually support scales.
2013-08-20 10:29:45 +02:00
Matthias Clasen
8383f003f3 Avoid deprecation warnings 2013-08-20 00:15:37 -04:00
Cosimo Cecchi
417d6666e5 iconhelper: refactor some code into a single function
https://bugzilla.gnome.org/show_bug.cgi?id=705443
2013-08-20 02:50:40 +02:00
Cosimo Cecchi
19c5a00f3a iconfactory: cache/invalidate pixbufs according to the effect
The state of the widget is not enough now to cache the pixbuf - we also
have to take into consideration the image effect itself, since the state
on the actual GtkStyleContext we use might not change, e.g. because the
change was on a parent context.

https://bugzilla.gnome.org/show_bug.cgi?id=705443
2013-08-20 02:50:40 +02:00
Cosimo Cecchi
b6cf6d52ef themingengine: apply image effects according to GtkCssImageEffect value
Instead of only looking at the state flags.

https://bugzilla.gnome.org/show_bug.cgi?id=705443
2013-08-20 02:50:40 +02:00
Cosimo Cecchi
736b350d7a css: Add a GtkCssValue for GtkCssImageEffect
This will allow us to use the CSS machinery to apply a highlight or dim
effect when images are prelit or insensitive.

https://bugzilla.gnome.org/show_bug.cgi?id=705443
2013-08-20 02:50:40 +02:00
Cosimo Cecchi
723a589bdd themingengine: refactor a conditional branch
Return early when the state is not wildcarded - makes the code more
readable.

https://bugzilla.gnome.org/show_bug.cgi?id=705443
2013-08-20 02:50:40 +02:00
Cosimo Cecchi
844dade070 pathbar: add back GTK_STYLE_CLASS_LINKED
This was accidentally removed in commit
42f53ab58e

https://bugzilla.gnome.org/show_bug.cgi?id=706028
2013-08-20 02:47:07 +02:00
Matthias Clasen
64d0ecaec8 Redo style class handling
We should set the appropriate style classes when we have
constructed the content and know if it is a label, an image,
or both. Doing this in the convenience constructors is
problematic for language bindings, and misses out when the
content is changed after construction.
2013-08-19 14:42:18 -04:00
Matthias Clasen
27cb50b48c Revert "Add the "text-button" style to button created with gtk_button_new_with_{label,mnemonic}"
This reverts commit 8d7bab7d7b.
2013-08-19 14:42:18 -04:00
Yosef Or Boczko
6e88b76178 Fix a typo 2013-08-19 20:59:50 +03:00
Andrew Walton
19be4edbea GtkEntry: add a "tabs" property for setting a PangoTabArray in the layout.
I'm currently working on porting view::FieldEntry (from libview) to C for use in
upstream GTK+. FieldEntry is a widget which allows users to enter structured
text such as IPv4 addresses or serial numbers. The way that FieldEntry
delineates the fields within the entry is with tabstops, using PangoTabArray
entries to precisely position the fields and delimiters. Because GtkEntry
rebuilds its internal PangoLayout fairly frequently, this requires a property in
the entry that will set the tabs on the layout whenever that happens. This API
looks very similar to one in GtkTextView.

Patch by David Trowbridge <trowbrds@gmail.com>. Updated for Gtk+ 3.10.

https://bugzilla.gnome.org/show_bug.cgi?id=697399
2013-08-19 13:43:32 -04:00
David Trowbridge
a864f9d052 Fix GtkEntry drawing to provide visual feedback when editable=FALSE.
GtkEntry currently draws exactly the same no matter what the state of the
'editable' property. This is pretty confusing for users because there's
no visual feedback at all, it just seems like their keyboard is broken.

This change adds a "read-only" class to the StyleContext, which will
continue to allow the user to select/copy the text, but will draw the
entry as if it were insensitive, providing some indication that the
contents can't be changed.

Signed-off-by: David Trowbridge <trowbrds@gmail.com>

http://bugzilla.gnome.org/show_bug.cgi?id=694831
2013-08-19 13:41:39 -04:00
Alexander Larsson
d5e5616ae6 icon-theme: Add ScaledDirectories support
For backwards compat support we don't want old implementations not
supporting scaling to see the new scaled directories, so move these
to a separate list.
2013-08-19 16:01:57 +02:00
Alexander Larsson
8ae81bb395 icon-theme: Use "Scale" for key as per the spec
The latest spec proposal uses "Scale", not "OutputScale", so use this.
2013-08-19 16:01:57 +02:00
Juan Pablo Ugarte
497f25730d gdk_window_raise (): Do not invalidate toplevel windows. 2013-08-19 08:30:40 -03:00
Matthias Clasen
dc4f555d25 Fix keyboard activation of menu buttons
Keyboard activation relies on the menu not being visible,
so ensure that it isn't when the menu is attached.

Problem tracked down by Vincent Le Garrec,
https://bugzilla.gnome.org/show_bug.cgi?id=688738
2013-08-18 22:22:22 -04:00
Matthias Clasen
624ec0fb7d Add a style class for context menus
Attached widgets inherit from the style of the widget they are
attached to. This can sometimes have unintended consequences,
like a context menu in the main view of gedit inheriting the font
that is configured for documents, or the context menu of the preview
in the font chooser coming up with humongous font size.

To fix this problem, we introduce a context menu style class
and use it for all menus that are used like that. The theme
can then set a font for this style class.

https://bugzilla.gnome.org/show_bug.cgi?id=697127
2013-08-18 13:46:48 -04:00
Yosef Or Boczko
8d7bab7d7b Add the "text-button" style to button created with gtk_button_new_with_{label,mnemonic}
https://bugzilla.gnome.org/show_bug.cgi?id=706220
2013-08-18 10:12:49 +03:00
keyring
a9ea814597 Update Chinese simplified translatin for properties 2013-08-18 10:39:12 +08:00
Stef Walter
6a837c668a window: Some protection against nested set_focus() calls
Since set_focus() can triger events, have a check to make
sure state is still valid before firing is-focus signal.

https://bugzilla.gnome.org/show_bug.cgi?id=706152
2013-08-17 09:55:27 +02:00
Cosimo Cecchi
9896b9960d window: set GTK_STYLE_CLASS_TITLEBAR to custom titles
When a custom title is added to a GtkWindow, add the
GTK_STYLE_CLASS_TITLEBAR to it, so the theme can apply the default rules
for its style.

https://bugzilla.gnome.org/show_bug.cgi?id=706045
2013-08-16 23:12:23 -04:00
Cosimo Cecchi
3ea0e4a019 stylecontext: add GTK_STYLE_CLASS_TITLEBAR define
For consistency with the other stock style classes.

https://bugzilla.gnome.org/show_bug.cgi?id=706045
2013-08-16 23:12:22 -04:00
Matthias Clasen
f8412eca34 Revert "Deprecate and ignore the cursor blink settings"
This reverts commit b2e666bf8f.

We need to keep cursor blinking configurable for accessibility
reasons.

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

Conflicts:
	gdk/win32/gdkproperty-win32.c
	gdk/x11/gdksettings.c
	gtk/gtksettings.c
	gtk/gtktextview.c
2013-08-16 22:45:13 -04:00
Matthias Clasen
7b4f82ccc6 Make symbolic icons work with the current rsvg
The rsvg loader now restricts what external files it will
allow to load from an svg. Thus our xinclude trick doesn't work
anymore. To work around that, embed the payload in a  data: uri.
This is somewhat ugly, but the best we could come up with.
2013-08-16 22:05:38 -04:00
Ek Kato
08042ea830 Bug 705750 Quartz input method doesn't work correctly for Chinese characters
Modified from original for Gtk3.
2013-08-16 11:18:29 -07:00
Matthias Clasen
77059dbaba Add style classes to headerbar titles
The current theme just makes all text bold that appears anywhere
in a headerbar, which is not great. We add 'title' and 'subtitle'
style classes to allow more targeted overriding of the font.
2013-08-16 13:39:25 -04:00
Chun-wei Fan
5bf8378caa Update config.h.win32.in
Make its entries match those that are checked by autotools in config.h.in
2013-08-16 14:39:08 +08:00
Cody Russell
5ca0280cd3 Fix a crasher that was introduced by 9ca802161e
due to preedit_str being initialized as an empty string rather than NULL.
2013-08-15 15:08:34 -05:00
Michael Hutchison
9ca802161e Bug 705182 Reset Cocoa IME state when immodule is reset
Commits the pre-edit string on receipt of focus_out and reset
commands.
Patch refinements by Cody Russell <bratsche@gnome.org> and
Ek Kato <ek.kato@gmail.com>
2013-08-15 10:02:45 -07:00
Joanmarie Diggs
e67d0119fe gtksearchentry: Provide an accessible name
https://bugzilla.gnome.org/show_bug.cgi?id=706014
2013-08-15 16:37:29 +02:00
Chun-wei Fan
68ce183dfa Clean up Property Sheets a bit
...from the last commit, as some unecessary stuff was left over in the
Visual Studio 2010 property sheets.
2013-08-15 21:48:22 +08:00
Chun-wei Fan
f60e42d726 Update Visual Studio Property Sheets
-For the binary "installation", look for the DLL files with their file
 names consistent with the ones that are generated with the respective
 Visual Studio projects.
-Remove any stray GDK DLLs that were left over from a Broadway-enabled
 GDK when building a non-Broadway-enabled GTK+ binary set.
2013-08-15 21:45:27 +08:00
Jasper St. Pierre
030b62d122 gtkdnd: Introduce a new API for more accurate drag origin data
When trying to drag, we currently the position of the first motion
event to determine where the drag came from. This might be alright
in the case of the old animation, but the data will be inaccurate
if the user has moved the pointer quite a bit since pressing the
cursor to start dragging. While we could monkey patch the GdkEvent
at the widget layer, this is unintuitive and strange.

Add a new API that takes a set of pointer coordinates describing
the origin of the drag. Additionally, adapt most widgets to use
it and use it with correct coordinates.

https://bugzilla.gnome.org/show_bug.cgi?id=705605
2013-08-14 07:12:52 -04:00
Jasper St. Pierre
e80d1f0523 gtkdnd: Use a more modern spring back animation for cancelled drags
https://bugzilla.gnome.org/show_bug.cgi?id=705605
2013-08-14 07:12:52 -04:00
Jasper St. Pierre
2b2162dd5f gtktextutil: Remove the border and background from drag icons
https://bugzilla.gnome.org/show_bug.cgi?id=705605
2013-08-14 07:12:52 -04:00
Alberto Ruiz
9e332b8f6e doap: doap files are required to have a lowercase <name> 2013-08-14 12:06:05 +02:00
David King
1e3e123c17 docs: Convert GtkMenuShell comment to documentation
https://bugzilla.gnome.org/show_bug.cgi?id=448637
2013-08-14 09:53:16 +01:00
Yosef Or Boczko
89f701ab2e oopx - fix typo
Signed-off-by: Yosef Or Boczko <yoseforb@gmail.com>
2013-08-14 10:45:35 +03:00
Yosef Or Boczko
2f77a61e61 Add gtk_button_new_from_icon_name
This function is a convenience wrapper around
gtk_button_new() and gtk_button_set_image().

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

Signed-off-by: Yosef Or Boczko <yoseforb@gmail.com>
2013-08-14 10:41:42 +03:00
Alban Browaeys
6ea4c1a1f4 paned: minus the size by the handle for the for_child1 computation.
Fixes:
(rhythmbox:22802): Gtk-CRITICAL **:
_gtk_widget_get_preferred_size_for_size: assertion 'size >= -1' failed

that is gtk_paned_get_preferred_size_for_opposite_orientation calls
_gtk_widget_get_preferred_size_for_size on child2 with a negative
size.

As gtkpaned size was (32), child1 minimum size was (55) then
for_child1 became (32) for an handle_size of (5). Thus for_child2
ended up as (-5).

https://bugzilla.gnome.org/show_bug.cgi?id=705624
2013-08-14 00:10:08 -04:00
Matthias Clasen
b7e41a7eda GtkSpinButton: disconnect signals in the accessible
Just as for GtkRangeAccessible, we were not even trying to disconnect
the signal handler from the adjustment. The same fix works here:
override the widget_set and widget_unset vfuncs.

https://bugzilla.gnome.org/show_bug.cgi?id=705692
2013-08-14 00:04:46 -04:00
Matthias Clasen
b9a6e012d5 GtkRange: disconnect signals in the accessible
We were only disconnecting the signal in finalize, when
the widget was already unset. Instead, override the widget_set
and widget_unset vfuncs of GtkAccessible, and keep a reference
to the adjustment.

https://bugzilla.gnome.org/show_bug.cgi?id=705692
2013-08-14 00:04:05 -04:00
Matthias Clasen
38e51b27c2 Trivial typo fix 2013-08-13 22:25:16 -04:00
Matthias Clasen
4790857da6 Improve a deprecation hint
Don't point to a replacement that is itself deprecated.

https://bugzilla.gnome.org/show_bug.cgi?id=705372
2013-08-13 20:41:59 -04:00