Commit Graph

34 Commits

Author SHA1 Message Date
Benjamin Otte
91467a45fc stylecontext: Deprecate functions
- gtk_style_context_get_background_color()
- gtk_style_context_get_border_color()

Those functions shouldn't be used anymore, because they don't represent
anything from the CSS styling we support. The background color often
isn't used due to background images and there are actually 4 different
border colors (1 for each side) - if there isn't also a border image in
use.
2014-10-03 06:18:06 +02:00
Matthias Clasen
04c4e1963f GtkFlowBox: Add a missing #include 2014-07-18 23:00:54 -04:00
Matthias Clasen
7ed133397a GtkFlowBox: Set orientable style classes initially
This was an omission, horizontal/vertical would only be set
when the orientation is changed.
2014-07-18 19:38:16 -04:00
Matthias Clasen
6877253e14 GtkFlowBox: Explicitly notify orientation 2014-06-09 13:31:01 -04:00
Matthias Clasen
51d17910a1 GtkFlowBox: Use G_PARAM_EXPLICIT_NOTIFY 2014-06-09 13:30:50 -04:00
Matthias Clasen
b549e52c2c GtkFlowBox: Convert to g_object_class_install_properties 2014-06-09 13:30:50 -04:00
Matthias Clasen
45801c8f2c GtkFlowBox: Move overridden prop ids to the end
This makes it easier to convert to g_object_class_install_properties
in the next commit.
2014-06-09 13:30:50 -04:00
Matthias Clasen
ac08d6a421 GtkFlowBox: Drop unused prop ids
No h/valign properties here.
2014-06-09 13:30:50 -04:00
Carlos Garnacho
3ffb4fa699 flowbox: Use gestures for event management
A multipress gesture takes care of item selection/activation, and
a drag gesture is used to manage events when rubberbanding selection
is performed.
2014-06-05 16:15:54 +02:00
Cosimo Cecchi
57f4d3d78a flowbox: don't use focus-line-width 2014-05-09 11:02:46 -07:00
Cosimo Cecchi
053b21cc1f flowbox: don't use focus padding 2014-05-09 11:02:43 -07:00
Juan Pablo Ugarte
35df3bc182 GtkFlowBox: fixed NULL dereferencing segfaults 2014-05-01 20:31:59 -03:00
Benjamin Otte
43e470dad1 flowbox: Remove unneeded checks
Size vfuncs always get non-null out variables passed, so no need to
check for NULL.
2014-05-01 14:51:27 +02:00
Benjamin Otte
73aa7bd2f5 widgets: Remove (GtkTickCallback) casts
Instead, make the functions conform to the prototype, so that casting
isn't needed.
2014-04-29 19:35:29 +02:00
Matthias Clasen
7ac684e9e3 flow box: Avoid excessive signals
We were emitting the a11y ::selection-changed signal much more
often than ::selected-children-changed. Thats not necessary.
2014-03-29 00:46:51 -04:00
Matthias Clasen
3d0b7314cd Trivial typo fix 2014-03-28 23:51:52 -04:00
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -05:00
Murray Cumming
a76bb2c177 docs: Fix tiny typo. 2014-02-10 12:44:52 +01:00
Juan R. García Blanco
dbf1521ad4 GtkFlowBox::child-activated: fix param type in g_signal_connect
Replace GTK_TYPE_WIDGET with more specific GTK_TYPE_FLOW_BOX_CHILD
for GtkFlowBox::child-activated. This matches signature of
child_activated slot in class struct.

https://bugzilla.gnome.org/show_bug.cgi?id=723716
2014-02-07 21:39:49 -05:00
William Jon McCann
326da2da58 docs: don't use <anchor> 2014-02-07 15:40:52 -05:00
William Jon McCann
e34bd4137d docs: use apostrophes in *n't 2014-02-07 13:32:47 -05:00
William Jon McCann
7a208fbbf3 docs: use proper apostrophe
https://wiki.gnome.org/Design/OS/Typography
2014-02-07 13:06:10 -05:00
William Jon McCann
0ce016650b docs: Use markup for links 2014-02-07 09:42:12 -05:00
Matthias Clasen
245c385ae7 Docs: Don't use note elements
In most cases, the text itself makes the message clear enough.
2014-02-02 01:22:14 -05:00
Matthias Clasen
30cc1512e6 Docs: Use markdown for lists
This greatly reduces the amount of xml in the docs.
2014-02-02 01:07:39 -05:00
Andika Triwidada
0a768d274d Changed obsolete FSF portal addresses to web address
Fixed https://bugzilla.gnome.org/show_bug.cgi?id=721530
2014-01-12 19:56:49 +07:00
Debarshi Ray
bcc6979f89 flowbox: Always return a NULL iter when we are at the end
The objective is simplify the semantics of the code so that we don't
need to check for "(iter != NULL && !g_sequence_iter_is_end (iter))"
in the callers.
2013-10-21 16:33:13 +02:00
Debarshi Ray
65dd26d3f3 flowbox: Be careful when the container is empty
Otherwise, showing an empty GtkFlowBox will lead to:
GLib-CRITICAL **: g_sequence_get: assertion '!is_end (iter)' failed
2013-10-21 16:21:11 +02:00
Jasper St. Pierre
fa6f83d89a gtkflowbox: Fix warning when realizing
set_background needs the widget's window to be set.
2013-10-17 15:14:57 -04:00
Chun-wei Fan
d47eac5ba5 gtk/gtkflowbox: Fix build warning/error
The newly-added gtk_flow_box_child_is_selected() needed to return a
gboolean, so use g_return_val_if_fail() to return FALSE when an invalid
GtkFlowBoxChild* is passed in.
2013-10-07 12:13:11 +08:00
Matthias Clasen
98e8505234 Tweak flowbox selection behaviour
Make flowbox selection more orthodox. Control and Shift now
modify the selection behaviour pretty much in the same way
they do in a tree view, and clicking without modifiers will
clear the selection.

When dealing with touch devices, we treat modifier-less events
as modifying the selection.

This commit also adds a few other selection necessities, such
as catching Escape key presses to cancel rubberband selection,
and handling grab notify.
2013-10-06 23:31:18 -04:00
Matthias Clasen
b937557d95 Make resetting a filter work properly
We need to make sure all children are marked as child-visible
again when the filter func is reset.
2013-10-06 23:31:18 -04:00
Matthias Clasen
f733903334 Fix wording in the docs 2013-10-06 23:31:17 -04:00
Matthias Clasen
943d575ec3 Add GtkFlowBox
GtkFlowBox is a container that its children in a reflowing
grid, which can be oriented horizontally or vertically.

It is similar to GtkListBox in that the children can
be sorted and filtered, and by requiring a dedicated child
widget type, GtkFlowBoxChild. It is similar to GtkTreeView
in that is supports a full set of selection modes, including
rubberband selection.

This is the culmination of work that has happened in the
egg-list-box module, and earlier in libegg. The origins of
this code are the EggSpreadTable in libegg, which was written
by Tristan van Berkom. It was moved to egg-list-box and
renamed EggFlowBox by Jon McCann, and I gave it some finishing
touched in the flowbox-improvements branch of that module.
2013-10-06 23:31:17 -04:00