Commit Graph

37569 Commits

Author SHA1 Message Date
Matthias Clasen
cfd7788c0b GtkScaleButton: Don't specify a icon size of zero
This only works for scalable icons, but breaks if we fall
back to pngs.
2014-04-22 18:37:25 -04:00
Matthias Clasen
2d9722e92b Fix the build 2014-04-22 11:08:17 -04:00
Matthias Clasen
2b85d6c225 Add a style class to model buttons
This will let us stop using the class name in Adwaita, and will
help with some future additions.
2014-04-22 11:04:40 -04:00
Volker Sobek
0940cbbeb9 docs: Fix parameter names for two functions
Don't use two different parameter names.
2014-04-21 22:57:35 +02:00
Yuri Myasoedov
c8fa10cace Fixed Russian translation 2014-04-20 15:18:10 +04:00
Christian Kirbach
6668d8697a Updated German translation 2014-04-19 11:58:38 +00:00
Juan Pablo Ugarte
887fc60cce Added bindings support to GtkBuilder by introducing 3 new <property> attributes "bind-source" to specify the source object of the binding "bind-property" to specify the source property and "bind-flags" to specify the binding flags (optional)
Binding an object sensitive property with a check button active property will look like this:

<object class="GtkButton" id="button">
  <property name="sensitive" bind-source="checkbutton" bind-property="active"/>
</object>

This is based on the original work done by Denis Washington for his GSoC project

This closes Bug 654417 "[GSoC] Add <binding> element to GtkBuilder syntax"
2014-04-18 18:59:14 -03:00
Antoine Jacoutot
be9d1e0b3b broadway backend: allow building on OpenBSD
On OpenBSD shm_open(3) is part of libc and there is not librt, so add an
according check.
Check if we have posix_fallocate before using it.

https://bugzilla.gnome.org/show_bug.cgi?id=728272
2014-04-18 18:20:34 +02:00
Matthias Clasen
2e1d0df1ed example: Update screenshots 2014-04-17 22:55:41 -04:00
Matthias Clasen
c923ea9bc4 example: Use popover for gears menu 2014-04-17 22:55:40 -04:00
Matthias Clasen
763250e04d example: Make gears button square
Another application of image-button.
2014-04-17 22:55:40 -04:00
Matthias Clasen
35f4243315 example: Make search button square
The image-button style class takes care of it.
2014-04-17 22:55:39 -04:00
Matthias Clasen
fcba75c2ba example: Modernize the prefs dialog
We should show the current best practice for this kind of
dialog, and use a headerbar with a window close button.
2014-04-17 22:55:39 -04:00
Matthias Clasen
b718b95aab example: Port to gtk_application_set_accels_for_action
Instead of hardcoding an accelerator in the ui file, use
gtk_application_set_accels_for_action.
2014-04-17 22:55:38 -04:00
Matthias Clasen
25ce82d5b3 example: Fix indentation 2014-04-17 22:55:37 -04:00
Matthias Clasen
c502ff73fe example: Fix up margins
This makes the code match what we show in the screenshots. This
broke when headerbars were changed to allow titles to extend into
the margin.
2014-04-17 22:55:37 -04:00
Matthias Clasen
f521dddaed example: Don't set a nonexisting property
The GtkHeaderBar::show-fallback-app-menu property does not exist,
and isn't needed anyway.
2014-04-17 22:55:36 -04:00
Jasper St. Pierre
e4e75a94f5 wayland: The xdg_surface.delete event was renamed to close 2014-04-17 13:14:44 -04:00
Руслан Ижбулатов
42ee237691 W32: correctly guess max window size from the size of the workarea of the screen it's on
Get monitor on which the most of the window is located (nearest monitor if
window is not on screen), get its work area (area not occupied by taskbar or
any other bars) and use that for maxsize.

Previous default of 30000 meant that windows maximized onto full screen,
even covering the area where taskbar is.

https://bugzilla.gnome.org/show_bug.cgi?id=726592
2014-04-16 22:39:56 +00:00
Evan Nemerson
0ebc4decbb selection: mark targets param to gtk_target_list_new as allow-none
https://bugzilla.gnome.org/show_bug.cgi?id=728165
2014-04-14 23:27:41 -07:00
Bastien Nocera
80993ea47a gtkapplication: Fix incorrect value passed to g_variant_new()
The code expected to format @u, not u.

https://bugzilla.gnome.org/show_bug.cgi?id=728140
2014-04-14 20:27:45 +02:00
Cosimo Cecchi
b0a0b7ebe7 iconhelper: always ensure a stated pixbuf
Even when we are set a pixbuf itself.

https://bugzilla.gnome.org/show_bug.cgi?id=726271
2014-04-13 22:26:18 -07:00
Marcus Karlsson
19510cdec7 GtkColorChooserWidget: Redraw swatches when selection changes
When selecting a swatch in a GtkColorChooserWidget the previously
selected swatch and the currently selected swatch are not redrawn. This
can leave the old swatch still marked with a checkbox even though a new
swatch has been selected.

Redraw the swatches after changing the selection.

https://bugzilla.gnome.org/show_bug.cgi?id=727487
2014-04-13 22:10:35 -07:00
Marcus Karlsson
3d956db500 docs: fix GtkWidget::size-allocate description
The documentation for the GtkWidget::size-allocate signal is missing the
description of the "allocation" parameter. Add the missing description
to the parameter.

https://bugzilla.gnome.org/show_bug.cgi?id=726179
2014-04-13 14:43:47 -07:00
Sébastien Wilmet
983a03d5f8 GtkTextView: use GSlice to allocate GtkTextLineSegment's
Use GSlice to allocate all types of segments:
- char
- toggle
- mark
- pixbuf
- child widget

Char segments are a bit more complicated because the length of the text
is determined at run time and stored in the 'byte_count' field. If the
text is long, GSlice will call the system malloc() anyway, so it's
better to always use GSlice for GtkTextLineSegment.

Toggle segments are also freed in gtktextbtree.c, hence the function
_gtk_toggle_segment_free() (for a later commit it would be nice to
rename those functions with the _gtk_text prefix).

https://bugzilla.gnome.org/show_bug.cgi?id=727908
2014-04-13 14:04:12 -07:00
Sébastien Wilmet
d69d57afa7 textview: inline a function
gtk_text_view_move_cursor_internal() was exactly the same as
gtk_text_view_move_cursor(), and was called only in the latter function.

https://bugzilla.gnome.org/show_bug.cgi?id=727908
2014-04-13 14:04:11 -07:00
Sébastien Wilmet
22ce03fd94 doc: improve documentation of gtk_text_iter_inside_word()
There is a possible confusion with the sentence:
"@iter is inside a natural-language word"

The iter should be viewed here as the pointed character (i.e. on the
right of the iter), not as a position between two characters.

Instead of improving the documentation, another solution would have been
to change the implementation so it is interpreted as an iter position
inside a word, i.e. between two characters that are part of a
natural-language word. But maybe some applications rely on the current
implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=727908
2014-04-13 14:04:10 -07:00
Sébastien Wilmet
704a178abb tests textiter: test word boundaries
- As the tests show, some of the functions have a strange and
inconsistent behavior for corner cases.

- Rename test_full_buffer() -> test_search_full_buffer() because
textiter.c is used for other GtkTextIter unit tests.

https://bugzilla.gnome.org/show_bug.cgi?id=727908
2014-04-13 14:04:10 -07:00
Matthias Clasen
14ce8025ca listbox: Add tests for multi-selection
This was forgotten when the multi-selection API was added,
and it was promptly broken in some places.
2014-04-13 14:04:09 -07:00
Matthias Clasen
0d55346fbb list-box: Fix copy-paste error
The new function gtk_list_box_get_selected_rows was implemented
as gtk_list_box_get_selected_children.
2014-04-13 14:04:08 -07:00
Matthias Clasen
dbf3a0681a listbox: Emit ::row-selected as we used to
The listbox selection test was failing because we were not
emitting these signals anymore.
2014-04-13 14:04:08 -07:00
Marcus Karlsson
ac5fbb5ef3 docs: Add missing transfer annotation to GtkBox
The gtk_box_get_center_widget function is missing a transfer annotation
for the returned widget. No transfer is done, so set transfer to none.

https://bugzilla.gnome.org/show_bug.cgi?id=728093
2014-04-13 13:22:36 -07:00
Matthias Clasen
71fdf845a7 gtk-demo: Avoid a compiler warning 2014-04-12 22:13:40 -07:00
Matthias Clasen
e8da5ec916 widget-factory: Clean up on shutdown 2014-04-12 22:13:14 -07:00
Matthias Clasen
e087f434a3 widget-factory: Remove unnecessary signal handlers
quitting the mainloop when none is running gives a critical
warning on shutdown.
2014-04-12 22:12:38 -07:00
Matthias Clasen
b86f54b54a widget-factory: Add a listbox example 2014-04-12 21:45:30 -07:00
Matthias Clasen
4e64708b3d widget-factory: Improve actionbar appearance
We are using the actionbar in the middle of the window, which
is not really what it is designed for. To avoid the unfinished
appearance on the sides, move it into the frame that we have
around the stack below. This fixes the sides, but gives the top
a double stroke. Too bad.
2014-04-12 21:09:03 -07:00
Matthias Clasen
2fab389930 widget-factory: Avoid ugly resizing on map
The text view is resizing several times after the window is mapped.
Not setting a hscrollbar-policy of never avoids that, and a
scrollbar still doesn't appear. Magic
2014-04-12 20:46:17 -07:00
Matthias Clasen
8ccdd5b7cf gtk-demo: Fix images demo
The incremental loading was broken by GtkIconHelper - queuing a
redraw is no longer sufficient to cause GtkImage to redraw with
the new pixbuf contents.
Pointed out by Jasper St. Pierre.
2014-04-12 20:40:27 -07:00
Matthias Clasen
9268ef36ab gtk-demo: Fix the links example
The keynav dialog is transient to the example window; since the
example window is now modal, we need to make the keynav dialog
modal as well, so it can receive input.
Problem pointed out by Jasper St. Pierre.
2014-04-12 18:44:40 -07:00
Jasper St. Pierre
5ac2346862 Remove gdk_synthesize_window_state from gdkinternals.h
It's already in gdkprivate.h
2014-04-12 08:20:33 -07:00
Jasper St. Pierre
eb5cc3da9b wayland: set_transient_for was renamed to set_parent 2014-04-12 08:20:33 -07:00
Jasper St. Pierre
e91e447db7 wayland: Don't pass dx/dy when we're resizing
They're ignored by the server.
2014-04-12 08:20:33 -07:00
Jasper St. Pierre
8201e2bfab wayland: Merge buffer implementations 2014-04-12 08:20:33 -07:00
Matthias Clasen
2d7b9273cf window: Be more careful when propagating key events
We are keeping references on the widget we are handling as we
are iterating up, but that doesn't protect us against the entire
tree being axed from inside gtk_widget_handle_event.
https://bugzilla.gnome.org/show_bug.cgi?id=727644
2014-04-11 22:00:01 -07:00
Cosimo Cecchi
a5bd1474d5 entry: consider ascent and descent when requesting height
Commit d05191a010 change the height
requisition to be completely dependent on the PangoLayout, but that
breaks when the font has special characters with different metrics.
Use the maximum between the two instead.

https://bugzilla.gnome.org/show_bug.cgi?id=728054
2014-04-11 18:58:16 -07:00
Bastien Nocera
1409d7c4bd gtkapplication: Fix passing NULL as the window to inhibit
gtk_application_inhibit() supports passing NULL, so don't
blindly pass the NULL window to
gtk_application_impl_dbus_get_window_system_id().

https://bugzilla.gnome.org/show_bug.cgi?id=728023
2014-04-11 18:51:53 -07:00
Matthias Clasen
85855da946 Update expected output for assistant a11y test
The headerbar and its content now shows up, as it should.
2014-04-10 15:50:51 -07:00
Matthias Clasen
256d52152c GtkAssistant: don't hide headerbar from a11y
GtkAssistant has its own accessible implementation, and we forgot
to update it when we added a headerbar.
2014-04-10 14:23:39 -07:00
Matthias Clasen
19e1a8feb4 GtkMessageDialog: Allow action-area-border theming again
This border does not interfere with headerbar-vs-content placement,
and we can allow themes to change it without breaking dialogs.
2014-04-10 13:54:38 -07:00