Commit Graph

159 Commits

Author SHA1 Message Date
Benjamin Otte
dc331ccb17 entrycompletion: Don't reconnect signals all the time
We block signal handlers areound GtkEntry signal emission and if those
signals get used to call functions on the completion that cause a
reconnection of the signals, then the reconnected signals will not be
blocked anymore (so they might get emitted?) and unblocking the old
signal id will later cause warnings.

Fixes spurious warnings in gtk/tests/filechooser tests.
2013-03-05 13:09:10 +01:00
Matthias Clasen
1e85e0f017 a11y: Set up popup-for relation between entry and completion
This may address
https://bugzilla.gnome.org/show_bug.cgi?id=658148
2013-02-03 16:32:21 -05:00
Matthias Clasen
eda0d9ba10 Fix duplicate columns in filechooser entry completion
This partically reverts commit
331bba1ad6, which broke documented
behaviour.
2012-10-17 21:27:26 -04:00
Benjamin Otte
12683da8f7 gtk: Make functions static that don't need to be non-static
Also remove the starting underscore from function names where
appropriate, as those functions are static now and not exported anymore.

This is part of a bunch of fixes for gcc complaining about
-Wmissing-declarations.
2012-10-02 19:32:51 +02:00
Matthias Clasen
e5b2ca5d89 Move entry completion code where it belongs
This commit moves all the entry completion implementation
into gtkentrycompletion.c. It also gets rid of an unnecessary
completion_device member in GtkEntryPrivate.
2012-08-31 10:47:23 -04:00
Cosimo Cecchi
5a8e2b5995 entry-completion: set size request on the toplevel window
Instead of setting it on the child scrolled window. This is needed
because the whole window's allocation must be equal to the one of the
entry (in case the popup-set-width property is TRUE); if we set the size
request on a children of the window, there might be other children with
borders/paddings in between the toplevel and the child we set the size
request too, which will break alignment.

https://bugzilla.gnome.org/show_bug.cgi?id=672947
2012-05-04 15:43:29 -04:00
Cosimo Cecchi
644070b551 entry-completion: don't subtract entry borders from popup allocation
The completion popup should be aligned with the GtkEntry allocation, not
less than that.

https://bugzilla.gnome.org/show_bug.cgi?id=672947
2012-05-04 15:43:27 -04:00
Matthias Clasen
050cba6a31 Fix malformed doc comments
Most of these are forgotten :'s and similar details
which gtk-doc now warns about.
2012-04-12 21:12:16 -04:00
Pavel Holejsovsky
331bba1ad6 entrycompletion: set_property() should call property setters
gtk_entry_completion_set_property() was setting many properties by
directly modifying priv values, bypassing notification invocation and
possibly another actions done by gtk_completion_entry_set_xxx ()
functions.  Fix by invoking set_xxx() instead of setting the property
value directly.

The real bug observerd was that setting text-column property using
g_object_set() caused SIGFPE later when entry completion was about to
appear.  gtk_entry_completion_set_text_column () apparently does way
more important things than just setting priv->text_column member.

https://bugzilla.gnome.org/show_bug.cgi?id=673693
2012-04-08 12:10:44 +02:00
Benjamin Otte
94dbefda1c Fix for bug 672961 - Custom theme can crash apps with GtkEntryCompletion 2012-03-27 20:29:56 -04:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Cosimo Cecchi
8275a20026 entry: change _gtk_entry_get_borders() to return a GtkBorder 2012-01-31 10:04:25 -05:00
Matthias Clasen
020c1846b7 Use the workarea when placing popups
This uses the new workarea API to avoid placing popups underneath
panels, docks, etc.
2011-12-18 14:29:16 -05:00
Benjamin Otte
fc775dfa5b entrycompletion: Export gtk_entry_completion_compute_prefix()
I want to use it in the file chooser entry autocomplete code.
2011-12-16 20:09:12 +01:00
Michael Natterer
5c4f2ef0c1 gtk: move _gtk_modules_has_mixed_deps() to gtkmodlesprivate.h
and remove gtkmainprivate.h completely.
2011-10-23 13:57:07 +02:00
Matthias Clasen
383127cd0b Clean up unneeded includes 2011-08-28 01:40:10 -04:00
Matthias Clasen
7ef362ec67 GtkEntryCompletion: add a sanity check
Patch by John Lindgren,
https://bugzilla.gnome.org/show_bug.cgi?id=650110
2011-05-31 20:07:14 -04:00
Tristan Van Berkom
4164a49b84 Added documentation to "cell-area" construct-only properties.
Indicate what kind of area will be used by default if none is
provided by the user.
2011-02-24 16:05:41 +09:00
Matthias Clasen
6d218084c3 Clarify models vs callbacks in entry completion docs
See https://bugzilla.gnome.org/show_bug.cgi?id=641073
2011-01-31 19:01:16 -05:00
Matthias Clasen
726b0d8736 Bandaid fix for icon view subclassing
I've decided that it is isn't feasible to make cell areas runtime-settable
in the time we have left before 3.0, therefore, I'm going with the
approach to allow init() functions to instantiate the default cell area
and issue a warning if a construct property is ignored.

This is not ideal, but it keeps existing icon view and combo box
subclasses working.

https://bugzilla.gnome.org/show_bug.cgi?id=639139
2011-01-31 17:39:42 -05:00
Matthias Clasen
2690b8b924 Move GtkEntryCompletion docs inline
Based on a patch by Garrett Regier
https://bugzilla.gnome.org/show_bug.cgi?id=617322
2011-01-04 17:54:47 -05:00
Matthias Clasen
b123bc41fd Move docs for gtkmain inline
At the same time, introduce a gtkmainprivate.h header
and various other cleanups.

Based on a patch by Tadej Borovšak.
https://bugzilla.gnome.org/show_bug.cgi?id=617471
2011-01-04 17:32:12 -05:00
Carlos Garnacho
e02cbf4770 Make GtkEntryCompletion use GtkStyleContext 2011-01-04 03:06:20 +01:00
Tristan Van Berkom
623abdedf6 Added gtk_entry_completion_new_with_area() 2010-12-13 15:58:07 +09:00
Tristan Van Berkom
55bbe4a3a5 Adding gtk_tree_view_column_new_with_area().
Creates a treeviewcolumn using a specific GtkCellArea.
This patch also makes GtkEntryCompletion use the new api
instead of g_object_new().
2010-12-06 19:04:51 +09:00
Tristan Van Berkom
9c7e00f744 Fixing GtkTreeViewColumn to use the new _gtk_cell_layout_buildable_custom_tag_end correctly. 2010-12-04 17:10:31 +09:00
Tristan Van Berkom
84eb40b57e Added GtkEntryCompletion:cell-area construct property.
- Removed most of GtkCellLayout implementation in favor of ->get_area()
  - This allows GtkBuildable cell layout implementation to implement
    the child "cell-properties"
  - Also allows feeding a custom/different GtkCellArea implementation to
    layout cells.
  - Share the internal area with the created GtkTreeViewColumn.
2010-12-04 16:55:49 +09:00
Matthias Clasen
f991f88d3f Fix entry completion window sizing
I don't think we are at the end of scrolledwindow tweaks yet,
but this will make things work for now, as they used to.

https://bugzilla.gnome.org/show_bug.cgi?id=633670
2010-11-09 16:18:15 +09:00
Michael Natterer
260ccdfebe gtk: remove "gboolean homogeneous" from gtk_box_new()
Because it's FALSE in virtually all use cases.
2010-11-02 12:04:35 +09:00
Javier Jardón
c15ef6405c Use gtk_box_new() instead gtk_[v|h]box_new() 2010-10-30 17:37:03 +09:00
Matthias Clasen
596da84312 Make GtkEntry a no-window widget
Use input-only windows for capturing input, and just draw onto
the parent window. This allows themes to make entries with rounded
corners. Patch by Boram Park.

https://bugzilla.gnome.org/show_bug.cgi?id=632736
2010-10-21 13:17:33 +02:00
Benjamin Otte
d9c9259861 Move GtkSizeRequest into GtkWidget
It doesn't make sense to keep them separate as GtkSizeRequest requires a
GtkWidget and GtkWidget implements GtkSizeRequest, so you can never have
one without the other.
It also makes the code a lot easier because no casts are required when
calling functions.

Also, the names would translate to gtk_widget_get_width() and people
agreed that this would be a too generic name, so a "preferred" was added
to the names.

So this patch moves the functions:
gtk_size_request_get_request_mode() => gtk_widget_get_request_mode()
gtk_size_request_get_width() => gtk_widget_get_preferred_width()
gtk_size_request_get_height() => gtk_widget_get_preferred_height()
gtk_size_request_get_size() => gtk_widget_get_preferred_size()
gtk_size_request_get_width_for_height() =>
  gtk_widget_get_preferred_width_for_height()
gtk_size_request_get_height_for_width() =>
  gtk_widget_get_preferred_height_for_width()
... and moves the corresponding vfuncs to the GtkWidgetClass.

The patch also renames the implementations of the vfuncs in widgets to
include the word "preferrred".
2010-09-26 15:11:45 +02:00
Matthias Clasen
e0aa12eb0a Tons of transfer annotations 2010-09-21 00:18:11 -04:00
Javier Jardón
b140884fec Use gtk_size_request_get_size() instead deprecated gtk_widget_size_request()
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629598

Signed-off-by: Javier Jardón <jjardon@gnome.org>
Signed-off-by: Tristan Van Berkom <tristanvb@openismus.com>
2010-09-15 03:02:58 +02:00
Javier Jardón
325a00e40d gtk/gtkentrycompletion.c: use accessor functions to access GtkWidget 2010-08-22 22:56:12 +02:00
Javier Jardón
910ad4872c gtkentrycompletion: check return value because It can be non-UTF8
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=624270
2010-07-19 23:56:22 +02:00
Javier Jardón
675745e1ca Use accessor functions to access GtkScrolledWindow 2010-07-13 19:40:50 +02:00
Javier Jardón
d4813408b0 gtkentrycompletion: Do not use GET_PRIV() macro all the time
Also, unseal private pointer
2010-07-13 19:40:47 +02:00
Javier Jardón
0a07e9733b gtk/: fully remove gtkalias hacks
https://bugzilla.gnome.org/show_bug.cgi?id=623845
2010-07-10 02:51:26 +02:00
Colin Walters
905f988166 Revert "Add length to gtk_tree_path_get_indices"
This reverts commit eebb16eb1a.

Was an accidental commit.
2010-06-28 14:15:10 -04:00
Colin Walters
eebb16eb1a Add length to gtk_tree_path_get_indices
The old version wasn't introspectable as it didn't have a length
return parameter.  Also, delete gtk_tree_path_get_indices_with_depth,
since it's no longer needed.
2010-06-28 13:50:36 -04:00
Matthias Clasen
bd4609b140 Merge the xi2-for-master branch 2010-05-25 18:38:44 -04:00
Matthias Clasen
bb91ebcb8f Fix signal parameters in GtkEntryCompletion
The ::match-selected and ::cursor-on-match signal were emitted
with the internal filter model instead of the user-provided model.

Fixes bug #555087.
2010-05-21 23:50:46 -04:00
Javier Jardón
1fe7d3cefd Deprecate widget flag: GTK_WIDGET_MAPPED
Use gtk_widget_get_mapped() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-03 20:19:03 +01:00
Javier Jardón
214a023e91 Deprecate widget flag: GTK_WIDGET_VISIBLE
Use gtk_widget_get_visible() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 07:52:07 +01:00
Javier Jardón
4232115e22 Deprecate widget flag: GTK_WIDGET_HAS_FOCUS
Use gtk_widget_has_focus() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 06:11:01 +01:00
Colin Walters
6529c07614 [introspection] Merge in Gtk-custom.c annotations
The Gtk-custom.c file in gir-repository contained a number of
introspection annotations.  Merge those into the GTK source files.

Some documentation was moved from the tmpl/ files to accomodate
the addition of annotations.
2009-12-16 17:22:01 -02:00
Matthias Clasen
c12a8388f6 More instances of those deprecated functions 2009-06-16 12:21:36 -04:00
Matthias Clasen
d51132e584 Don't use deprecated api internally 2009-06-16 11:27:06 -04:00
Matthias Clasen
dccfd423ca Don't unselect when resizing
This was causing problems in Epiphany. Fixes bug 584805.
2009-06-05 20:11:44 -04:00