Commit Graph

266 Commits

Author SHA1 Message Date
Javier Jardón
8ea37e551b Don't use GTK_WIDGET_STATE in internal code anymore
Use gtk_widget_get/set_state() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:59:06 -04:00
Javier Jardón
ee0bf98769 Deprecate widget flag: GTK_WIDGET_REALIZED
Use gtk_widget_get_realized() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:58:59 -04:00
Javier Jardón
e53efb120a Deprecate widget flag: GTK_WIDGET_MAPPED
Use gtk_widget_get_mapped() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:58:58 -04:00
Javier Jardón
76943117be Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_CAN_FOCUS)
Use new API instead: gtk_widget_set_can_focus ()
2010-04-03 20:58:22 -04:00
Javier Jardón
edc65ce1d2 Deprecate widget flag: GTK_WIDGET_VISIBLE
Use gtk_widget_get_visible() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:58:20 -04:00
Javier Jardón
eb90ec7513 Deprecate widget flag: GTK_WIDGET_HAS_FOCUS
Use gtk_widget_has_focus() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:56:30 -04:00
Javier Jardón
c3f8b4226d Deprecate widget flag: GTK_WIDGET_SENSITIVE
Use gtk_widget_get_sensitive() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:56:30 -04:00
Javier Jardón
04aba4bde2 Deprecate widget flag: GTK_WIDGET_DRAWABLE
Use gtk_widget_is_drawable() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:56:29 -04:00
Johan Dahlin
eee7bb2b2e [annotations] Add allow-none
This commit was created using a script that searched for all docstrings
containing a parameter and the string 'or %NULL'.
Gdk backends and demos excluded as they are not part of a public API

https://bugzilla.gnome.org/show_bug.cgi?id=610474
2010-04-03 20:56:15 -04:00
Christian Persch
66882103cc Allow NULL iter in gtk_combo_box_set_active_iter to unset
Bug #606230.
2010-04-03 20:55:12 -04:00
Christian Dywan
fc2cbf960c Deprecate flag macros for toplevel, state, no window and composite child
Deprecate widget flag macros GTK_WIDGET_STATE, GTK_WIDGET_SAVED_STATE,
GTK_WIDGET_FLAGS, GTK_WIDGET_TOPLEVEL, GTK_WIDGET_NO_WINDOW and
GTK_WIDGET_COMPOSITE_CHILD.

Also deprecate the type macros GTK_WIDGET_TYPE, GTK_OBJECT_TYPE_NAME and
GTK_OBJECT_TYPE which have become redundant.

Instances of GTK_WIDGET_TOPLEVEL are replaced with gtk_widget_is_toplevel,
GTK_WIDGET_TYPE is replaced with G_OBJECT_TYPE, GTK_WIDGET_COMPOSITE_CHILD
is replaced with use of the "composite-child" property and uses of
GTK_WIDGET_NO_WINDOW are adjusted to use gtk_widget_get_has_window.

Uses of GTK_WIDGET_SAVED_STATE and GTK_WIDGET_FLAGS inside GtkWidget are
changed to direct flag usage.

Documentation is updated to refer to gtk_widget_set_has_window and
gtk_widget_get_has_window.

Gail and tests are updated as well.

Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-04-03 20:55:07 -04:00
Hiroyuki Ikezoe
f8b8bb4bf9 [gtk] GtkCellEditable::editing-cancelled should be writable
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=604881

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-04-03 20:51:56 -04:00
Colin Walters
fcbbd763cd [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.
2010-04-03 20:51:53 -04:00
Javier Jardón
325bd9299a Use GtkCellEditable::editing-canceled
GtkCellEditable::editing-canceled property was added in 2.19 cycle,
so we should make the code that currently uses entry->editing_canceled
directly go through the property

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=599213
2009-12-04 02:50:57 +01:00
Cody Russell
0f33ad4ee1 Added editing_canceled property to GtkCellEditable
GTK_ENTRY()->editing_canceled should really have been a parameter of the
GtkCellEditable::editing-done signal, it should be a property on the cell
editable interface

https://bugzilla.gnome.org/show_bug.cgi?id=594962
2009-10-21 18:55:24 +02:00
Kristian Rietveld
95cb1cc86c Sensitivity event box should only be toggled if cell view is non-NULL 2009-09-21 12:59:44 +02:00
Kristian Rietveld
fef3c88e89 Unbreak GtkComboBox::button-sensitivity
Fixed the button-sensivity patch done to GtkComboBox to account for
changes in appearance (changes to the appears-as-list style property).
Also, in list-mode, the event box that has been created below the cell
view also needs to have its sensitivity updated.
2009-09-09 21:30:13 +02:00
Alexander Larsson
0111030586 Merge branch 'client-side-windows' 2009-07-01 16:15:03 +02:00
Matthias Clasen
724ab58244 Add a way to turn off toggle spacing in menus
Reserving toggle space is nice for consistency in main menus
and context menus, but it gets in the way in special situations,
such as combo boxes, tabular menus, etc.
2009-06-24 01:01:51 -04:00
Matthias Clasen
8f57c91766 Remove extra padding from comboboxes
We do want to have consistent padding in menus in menubars and context
menus, but the menus used in comboboxes don't need the extra padding.
Add private GtkMenu API for turning this off. Bug 564063
2009-06-22 00:53:14 -04:00
Alexander Larsson
7303f3c9fd Merge branch 'master' into client-side-windows
This updates client-side-windows to the the latest soname
change for easier testing.

Conflicts:
	gdk/x11/gdkwindow-x11.c
	tests/Makefile.am
2009-06-17 12:56:05 +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
Alexander Larsson
89e187e7c1 Use gdk_window_get_root_cords to get popup position for combobox
This makes us handle transformed offscreen widgets much better.
2009-06-08 20:01:05 +02:00
Matthias Clasen
e18a4fa047 Improve gtk_combo_box_get_active_text() docs
Make it more explicit that the return value needs to be freed.
Fixes bug 583050.
2009-05-23 01:20:39 -04:00
Matthias Clasen
e6373738fc Forward-port a GtkAdjustment compatibility fix
We reverted GtkAdjustment to its traditional behaviour wrt. to
clamping in 2.14.3, but the fix was lost between 2.14 and 2.16.
2009-05-03 13:04:06 -04:00
Michael Hasselmann
a02ade3737 Added a check to not emit a "changed" signal when an already invalid
2009-02-19  Michael Hasselmann <michaelh@openismus.com>

	* gtk/gtkcombobox.c (gtk_combo_box_set_active_internal):
	Added a check to not emit a "changed" signal when an already
	invalid selection was set to invalid.

svn path=/trunk/; revision=22390
2009-02-22 17:21:37 +00:00
Christian Dywan
a8cc721e7c Bug 567413 – GtkComboBoxEntry doesn't emit "changed" signal on entry
2009-01-21  Christian Dywan  <christian@twotoasts.de>

	Bug 567413 – GtkComboBoxEntry doesn't emit "changed" signal
        on entry editing

	* gtk/gtkcombobox.c (gtk_combo_box_set_active): Return only if index
        is set. Patch by Carl-Anton Ingmarsson.

svn path=/trunk/; revision=22152
2009-01-21 00:03:00 +00:00
Matthias Clasen
4cf69fddb4 Allow out-of-order setting of model and active. Patch by Christian Dywan
* gtk/gtkcombobox.c: Allow out-of-order setting of model and active.
        Patch by Christian Dywan



svn path=/trunk/; revision=21888
2008-12-13 08:11:54 +00:00
Christian Dywan
446fd7d72a Bug 547449 – Entry/ Combo popup misplaced after resize
svn path=/trunk/; revision=21263
2008-09-03 12:38:32 +00:00
Michael Natterer
b2d286d5bf examples/gtkdial/gtkdial.c gdk/gdkapplaunchcontext.c gdk/gdkpango.c
2008-08-12  Michael Natterer  <mitch@imendio.com>

	* examples/gtkdial/gtkdial.c
	* gdk/gdkapplaunchcontext.c
	* gdk/gdkpango.c
	* gtk/gtkcellrendererpixbuf.c
	* gtk/gtkcellrenderertext.c
	* gtk/gtkcellview.c
	* gtk/gtkcombobox.c
	* gtk/gtkfontsel.c
	* gtk/gtkinvisible.c
	* gtk/gtkliststore.c
	* gtk/gtktexttag.c
	* gtk/gtktexttagtable.c: remove dereferencing from some function
	pointers i missed before.


svn path=/trunk/; revision=21089
2008-08-12 09:51:16 +00:00
Sven Neumann
2a95978506 gtk/gtkaboutdialog.c gtk/gtkcellrendereraccel.c gtk/gtkcellrenderercombo.c
2008-08-11  Sven Neumann  <sven@gimp.org>

	* gtk/gtkaboutdialog.c
	* gtk/gtkcellrendereraccel.c
	* gtk/gtkcellrenderercombo.c
	* gtk/gtkcellrendererspin.c
	* gtk/gtkcellrenderertext.c
	* gtk/gtkclipboard.c
	* gtk/gtkcolorsel.c
	* gtk/gtkcombo.c
	* gtk/gtkcombobox.c
	* gtk/gtkdnd-quartz.c
	* gtk/gtkdnd.c
	* gtk/gtkentry.c
	* gtk/gtkentrycompletion.c
	* gtk/gtkfilechooserbutton.c
	* gtk/gtkfilechooserdefault.c
	* gtk/gtkfilechooserentry.c
	* gtk/gtkfontsel.c
	* gtk/gtkinputdialog.c
	* gtk/gtkmenutoolbutton.c
	* gtk/gtkpathbar.c
	* gtk/gtktooltip.c: use canonical signal names in 
g_signal_connect().


svn path=/trunk/; revision=21060
2008-08-11 09:17:49 +00:00
Michael Natterer
3d75f27801 gtk/gtkcombobox.c gtk/gtkiconview.c gtk/gtkrange.c gtk/gtkscrolledwindow.c
2008-08-06  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkcombobox.c
	* gtk/gtkiconview.c
	* gtk/gtkrange.c
	* gtk/gtkscrolledwindow.c
	* gtk/gtktreeview.c: remove CLAMPing from values passed to
	gtk_adjustment_set_value() since it does it right now.


svn path=/trunk/; revision=21021
2008-08-06 11:32:33 +00:00
Michael Natterer
da61c61c4b bail out early if priv->button is NULL to avoid zillions of warnings when
2008-08-05  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkcombobox.c (gtk_combo_box_update_sensitivity): bail out
	early if priv->button is NULL to avoid zillions of warnings when
	destroying combo boxes that were working fine before the
	button sensitivity patch.


svn path=/trunk/; revision=21014
2008-08-05 15:44:04 +00:00
Matthias Clasen
7d85757776 Bug 382291 – Automatically dim the combobox when the model is empty
2008-08-04  Matthias Clasen  <mclasen@redhat.com>

        Bug 382291 – Automatically dim the combobox when the model is empty

        * gtk/gtk.symbols:
        * gtkcombobox.[hc]: Add a GtkComboBox::button-sensitivity
        property with getter and setter to control the sensitity of
        empty combo boxes. Patch by Carlos Garnacho, Sven Herzberg,
        Christian Dywan and others.

        * README.in: Add a note about automatic combobox sensitivity.


svn path=/trunk/; revision=20997
2008-08-04 23:40:36 +00:00
Michael Natterer
7f00695920 remove _gtk_binding_signal_new().
2008-07-21  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkbindings.[ch]: remove _gtk_binding_signal_new().

	* gtk/gtkfilechooserdefault.c
	* gtk/gtkmenu.c
	* gtk/gtkmenushell.c
	* gtk/gtkscalebutton.c
	* gtk/gtktextview.c
	* gtk/gtktoolbar.c
	* gtk/gtkwidget.c: use g_signal_new_class_handler() instead. Add
	some missing I_() to the signal names.


svn path=/trunk/; revision=20874
2008-07-21 09:48:20 +00:00
Michael Natterer
d905a906a4 allocate ComboCellInfo with GSlice.
2008-07-04  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkcombobox.c: allocate ComboCellInfo with GSlice.


svn path=/trunk/; revision=20760
2008-07-04 10:52:52 +00:00
Johan Dahlin
d97cdbdf53 Include "config.h" instead of <config.h> Command used: find -name
2008-06-21  Johan Dahlin  <jdahlin@async.com.br>

    * *.[ch]: Include "config.h" instead of <config.h>
    Command used:
    find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g'
    Rubberstamped by Mitch and Tim


svn path=/trunk/; revision=20669
2008-06-22 14:28:52 +00:00
Michael Natterer
2ba736d775 Bug 538395 – gtk_combo_box_append_text() on non-compliant model
2008-06-20  Michael Natterer  <mitch@imendio.com>

	Bug 538395 – gtk_combo_box_append_text() on non-compliant model
	segfaults

	* gtk/gtkcombobox.c (gtk_combo_box_append_text)
	(gtk_combo_box_insert_text)
	(gtk_combo_box_prepend_text)
	(gtk_combo_box_remove_text)
	(gtk_combo_box_real_get_active_text): apply patch from Christian
	Dywan which adds the needed g_return_if_fail() to prevent the
	crashes.


svn path=/trunk/; revision=20477
2008-06-20 10:00:40 +00:00
Michael Natterer
fe8a946e87 deprecate GtkDestroyNotify.
2008-06-18  Michael Natterer  <mitch@imendio.com>

	* gtk/gtktypeutils.h: deprecate GtkDestroyNotify.

	* gtk/gtkactiongroup.[ch]
	* gtk/gtkcombobox.[ch]
	* gtk/gtkcontainer.[ch]
	* gtk/gtkliststore.[ch]
	* gtk/gtkmain.[ch]
	* gtk/gtkmenu.c
	* gtk/gtkstock.[ch]
	* gtk/gtktreedatalist.[ch]
	* gtk/gtktreemodelfilter.[ch]
	* gtk/gtktreemodelsort.[ch]
	* gtk/gtktreeprivate.h
	* gtk/gtktreeselection.[ch]
	* gtk/gtktreesortable.[ch]
	* gtk/gtktreestore.[ch]
	* gtk/gtktreeview.[ch]
	* gtk/gtktreeviewcolumn.[ch]: s/GtkDestroyNotify/GDestroyNotify/g.


svn path=/trunk/; revision=20448
2008-06-18 09:12:32 +00:00
Michael Natterer
37c28957fe use _gtk_marshal_BOOLEAN__VOID instead of the deprecated
2008-06-16  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkcombobox.c (gtk_combo_box_class_init): use
	_gtk_marshal_BOOLEAN__VOID instead of the deprecated
	gtk_marshal_BOOLEAN__VOID.


svn path=/trunk/; revision=20404
2008-06-16 16:44:19 +00:00
Michael Natterer
6aaea97378 cast menu's toplevel to GtkWindow when passing to
2008-06-13  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkcombobox.c (gtk_combo_box_menu_position): cast menu's
	toplevel to GtkWindow when passing to gtk_window_set_type_hint().


svn path=/trunk/; revision=20372
2008-06-13 13:30:38 +00:00
Matthias Clasen
5f8af6d910 Bug 536765 – GtkComboBox should set COMBO type hint for its menu
* gtk/gtkoptionmenu.c:
        * gtk/gtkcombobox.c: Set the window type hint on popups.
        Patch by Danny Baumann


svn path=/trunk/; revision=20351
2008-06-11 03:36:32 +00:00
Alberto Ruiz
ca5c68f160 The child is now aware of both the combobox and frame (if has-frame is
2008-16-03  Alberto Ruiz <aruiz@gnome.org>

	* gtl/gtkcombobox.c: (gtk_combo_box_size_allocate) The child is now aware of
	both the combobox and frame (if has-frame is set) thickness and border. (bug #521442)


svn path=/trunk/; revision=19886
2008-03-16 01:37:12 +00:00
Alberto Ruiz
1e1f49e09a Take thickness into account in the size allocation of the child widgets in
2008-03-11  Alberto Ruiz  <aruiz@gnome.org>

	* gtk/gtkcombobox.c (gtk_combo_box_size_allocate):
	Take thickness into account in the size allocation of the child widgets in
	list mode.
	Fixes #521442


svn path=/trunk/; revision=19747
2008-03-11 13:46:37 +00:00
Matthias Clasen
0509519d35 Unify the handling of various "Enter" keysyms all over the place.
2008-02-12  Matthias Clasen  <mclasen@redhat.com>

        * gtk/*.c: Unify the handling of various "Enter" keysyms
        all over the place.  (#515047, Christian Persch)



svn path=/trunk/; revision=19528
2008-02-12 15:51:09 +00:00
Cody Russell
d7292b61f8 Removed an extra semicolon. (#515219, reported by Kazuki IWAMOTO)
2008-02-08  Cody Russell  <bratsche@gnome.org>

        * gtk/gtkcombobox.c (gtk_combo_box_cell_layout_pack_start):
        Removed an extra semicolon.  (#515219, reported by Kazuki IWAMOTO)


svn path=/trunk/; revision=19502
2008-02-09 04:03:25 +00:00
Michael Natterer
d95069aa1f gtk/gtkaction.c gtk/gtkassistant.c gtk/gtkbin.c gtk/gtkbox.c
2008-02-07  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkaction.c
	* gtk/gtkassistant.c
	* gtk/gtkbin.c
	* gtk/gtkbox.c
	* gtk/gtkcalendar.c
	* gtk/gtkcellrenderercombo.c
	* gtk/gtkcombobox.c
	* gtk/gtkcombo.c
	* gtk/gtkdrawingarea.c
	* gtk/gtkentrycompletion.c
	* gtk/gtkfixed.h
	* gtk/gtkgamma.c
	* gtk/gtkhpaned.c
	* gtk/gtkiconview.c
	* gtk/gtkitem.c
	* gtk/gtkitemfactory.c: remove g_return_if_fail() from private
	functions and virtual function implementations.


svn path=/trunk/; revision=19491
2008-02-07 15:50:39 +00:00
Michael Natterer
ea8ffe42aa g_return_if_fail() is the cell is not part of the combo instead of
2008-02-04  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkcombobox.c (gtk_combo_box_cell_layout_add_attribute):
	g_return_if_fail() is the cell is not part of the combo instead of
	crashing in the next line.


svn path=/trunk/; revision=19462
2008-02-04 23:01:00 +00:00
Matthias Clasen
9fbb25f734 Emit the notify::model signal. (#509819, David Zeuthen)
2008-01-16  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkcombobox.c (gtk_combo_box_set_model): Emit
        the notify::model signal.  (#509819, David Zeuthen)



svn path=/trunk/; revision=19374
2008-01-16 05:25:35 +00:00