Commit Graph

237 Commits

Author SHA1 Message Date
Michael Natterer
476b4c248c gtk: fix automatic width of spin buttons which have no width in chars set 2010-10-31 20:03:55 +01:00
Matthias Clasen
ac1bb229d1 Remove size_request from GtkSpinButton 2010-10-26 23:46:06 -04:00
Javier Jardón
0b72acf78d gtkspinbutton: Use accessor functions to access GtkEntry 2010-10-26 06:07:42 +02: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
Matthias Clasen
331323e5c7 Make GtkSpinButton a no-window widget
We still retain an input-only window here for now, but all
the painting is done to the parent window.
2010-10-21 11:41:20 +02:00
Javier Jardón
b072ea220c Remove unneded casts
As gtk_adjustment_new() returns a GtkAdjustment* now

https://bugzilla.gnome.org/show_bug.cgi?id=630731
2010-09-29 01:18:10 +02:00
Javier Jardón
42f480a537 gtk_adjustment_new() should return a GtkAdjustment*
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=630731
2010-09-29 01:18:10 +02:00
Javier Jardón
eac1959d2c Move destroy signal to GtkWidget
Also make GtkWidget derive from GInitiallyUnowned
2010-09-26 22:18:18 -04:00
Javier Jardón
3b8184cfee Move classes that currently derive from GtkObject to GInitiallyUnowned 2010-09-26 22:18:13 -04:00
Benjamin Otte
bc3d3e6cf4 spinbutton: Use gtk_cairo_transform_to_window() 2010-09-26 15:11:46 +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
Benjamin Otte
f0c067063c spinbutton: Get rid of gdk_drawable_get_size() usage 2010-09-26 15:11:44 +02:00
Benjamin Otte
1d3f6b30b0 API: Rename gtk_cairo_paint_*() to gtk_paint_*()
Large patch, but just renaming.
Indentation should still mostly be correct because I took care of
keeping the indentation for this function name.
2010-09-26 15:11:42 +02:00
Benjamin Otte
5228913f68 spinbutton: Port to draw vfunc 2010-09-26 15:11:35 +02:00
Benjamin Otte
e8a6bad00b gtk: Don't set colormap anymore when creating GDK windows
Colormaps are about to be removed, so not using them sounds like an
awesome idea.
2010-09-26 15:11:31 +02:00
Matthias Clasen
e0aa12eb0a Tons of transfer annotations 2010-09-21 00:18:11 -04:00
Javier Jardón
efbf04236e Change GtkEditable typedef from GtkEditableClass to GtkEditabeInterface
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=323904
2010-09-17 19:57:09 +02:00
Colin Walters
913cdf3be7 GDK: Prefix key names with KEY_
The keysyms create a lot of potential namespace conflicts for
C, and are especially problematic for introspection, where we take
constants into the namespace, so GDK_Display conflicts with GdkDisplay.

For C application compatiblity, add gdkkeysyms-compat.h which uses
the old names.

Just one user in GTK+ continues to use gdkkeysyms-compat.h, which is
the gtkimcontextsimple.c, since porting that requires porting more
custom Perl code.
2010-09-08 18:51:44 -04:00
Javier Jardón
29044f0f0e gtk/gtkspinbutton.c: use accessor functions to access GtkWidget 2010-09-08 21:13:03 +02:00
Tristan Van Berkom
9934007420 Completely removed requisition cache from GtkWidget instance structure.
Since we have a new mechanism for requesting sizes: GtkSizeRequestIface;
it makes no sense to maintain this cache on the GtkWidget structure...
removing the requisition cache however does not break the old "size-request"
signal which is there for backwards compatability reasons.

In any case widget->requisition should not have been accessed,
gtk_widget_get_child_requisition() would have been the correct way
to consult the cache.

This commit also deprecates the newly added gtk_widget_get_requisition()
API and makes it fallback on gtk_size_request_get_size().
2010-09-08 18:50:24 +02:00
Matthias Clasen
ece148eec0 Remove ::state-hint use
This use of the property was overlooked when it was removed.
We now always behave as if state-hint == TRUE.
2010-09-02 08:59:27 -04:00
Javier Jardón
1e5d7c0225 Use GtkFooPrivate instead GtkFooPriv 2010-08-27 04:48:23 +02:00
Philip Withnall
3eb197b51f Bug 596125 — Property string fixes 2010-08-10 09:23:49 +01:00
Javier Jardón
cbbffa18f8 Add _gtk_spin_button_get_panel private function
It's needed in gtktestutils.c
2010-07-13 19:40:50 +02:00
Javier Jardón
57d870ac5b gtkspinbutton: move public members to private structure 2010-07-13 19:40:50 +02:00
Matthias Clasen
bcbb976d91 Respect GtkEntry::state-hint when drawing spinbutton features
As proposed in bug 589904 by Thomas Wood.
2010-07-09 22:23:25 -04: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
Javier Jardón
3c8a54b2f7 Remove GdkWChar deprecated code 2010-06-20 00:22:26 +02:00
Matthias Clasen
bd4609b140 Merge the xi2-for-master branch 2010-05-25 18:38:44 -04:00
Javier Jardón
b18b33ae82 Revert "Forward-port a GtkAdjustment compatibility fix"
In the early 2.14.x releases, GtkAdjustment was changed to enforce
that values are restricted to the range [lower, upper - page_size].
This has always been the documented behaviour, and the recommended
practice is to set page_size to 0 when using adjustments for simple
scalar values, like in a slider or spin button.
Due to the large number of applications that are affected by this
change, the behaviour has been reverted to the old behaviour in
2.14.3, with an explicit warning that this change will be
reintroduced in 2.90.

This reverts commit e6373738fc.

https://bugzilla.gnome.org/show_bug.cgi?id=619474
2010-05-24 15:39:30 +02:00
Javier Jardón
32b9aeaadd 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-03-09 02:40:17 +01:00
Javier Jardón
16a59ad912 Deprecate widget flag: GTK_WIDGET_REALIZED
Use gtk_widget_get_realized() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-03 20:41:05 +01: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
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
Javier Jardón
a27d5a2c9e Deprecate widget flag: GTK_WIDGET_IS_SENSITIVE
Use gtk_widget_is_sensitive() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 05:32:51 +01:00
Javier Jardón
4f78f70b15 Deprecate widget flag: GTK_WIDGET_DRAWABLE
Use gtk_widget_is_drawable() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 04:55:55 +01:00
Johan Dahlin
fe85272112 [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-02-19 17:57:51 -02: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
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
Stefan Walter
de60fd8cfd Use gtk_entry_xxx functions rather than using GtkEntry structure directly.
See bug #576801

svn path=/trunk/; revision=22589
2009-03-27 05:22:23 +00:00
Matthias Clasen
c2d48cfc91 Chain up enter and leave notify handlers
svn path=/trunk/; revision=21781
2008-11-11 18:10:20 +00:00
Michael Natterer
e18d3c6fd3 consistently chain up using GTK_FOO_CLASS(parent_class)->bar(instance)
2008-08-12  Michael Natterer  <mitch@imendio.com>

	* gtk/*.c: consistently chain up using
	GTK_FOO_CLASS(parent_class)->bar(instance) instead of
	(*GTK_FOO_CLASS(parent_class))->bar(instance).


svn path=/trunk/; revision=21085
2008-08-12 09:06:34 +00:00
Sven Neumann
1b34902d33 gtk/gtkscale.c gtk/gtkscrolledwindow.c gtk/gtksocket.c gtk/gtkspinbutton.c
2008-08-08  Sven Neumann  <sven@gimp.org>

	* gtk/gtkscale.c
	* gtk/gtkscrolledwindow.c
	* gtk/gtksocket.c
	* gtk/gtkspinbutton.c
	* gtk/gtkstatusbar.c
	* gtk/gtkstatusicon.c: use canonical signal names.


svn path=/trunk/; revision=21046
2008-08-08 14:36:41 +00:00
Sven Neumann
867a82c36e gtk/gtkadjustment.c gtk/gtkclist.c gtk/gtkcolorsel.c gtk/gtkiconview.c
2008-08-08  Sven Neumann  <sven@gimp.org>

	* gtk/gtkadjustment.c
	* gtk/gtkclist.c
	* gtk/gtkcolorsel.c
	* gtk/gtkiconview.c
	* gtk/gtklayout.c
	* gtk/gtkprogress.c
	* gtk/gtkrange.c
	* gtk/gtkspinbutton.c
	* gtk/gtktext.c
	* gtk/gtktextview.c
	* gtk/gtktreeview.c
	* gtk/gtkviewport.c: use the canonical signal name 
"value-changed"
	instead of "value_changed".


svn path=/trunk/; revision=21041
2008-08-08 13:25:18 +00:00
Michael Natterer
c6bb5b4882 remove g_return_if_fail() from private functions and virtual function
2008-07-21  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkspinbutton.c: remove g_return_if_fail() from private
	functions and virtual function implementations. Some minor
	cleanups.


svn path=/trunk/; revision=20873
2008-07-21 09:41:28 +00:00
Cody Russell
57223c9a05 Revert name change
svn path=/trunk/; revision=20724
2008-07-01 22:57:50 +00:00
Cody Russell
fce9c8b7d4 Practically everything changed.
2008-06-30  Cody Russell  <bratsche@gnome.org>

        * Practically everything changed.

        Change	all references	of GIMP	Toolkit	(and variations	of it)
        to GTK+	Toolkit, showing no mercy at all to our	beloved
	ancestry. (#540529)


svn path=/trunk/; revision=20709
2008-06-30 23:01:56 +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
Matthias Clasen
8d5e58b632 106574 - Inconsistent increment behavior for gtkspinbutton
* gtk/gtkspinbutton.c (gtk_spin_button_real_value_change):
        Commit the entry text before doing an increment. Patch by
        Björn Lindqvist.


svn path=/trunk/; revision=20196
2008-05-27 22:50:49 +00:00
Jan Arne Petersen
4ebacd8376 Reorder strange window hierarchy of the GtkSpinButton (#466000).
2008-05-25  Jan Arne Petersen  <jpetersen@jpetersen.org>

	* gtk/gtkentry.c: (gtk_entry_class_init), (get_text_area_size),
	(gtk_entry_get_text_area_size), (gtk_entry_draw_frame):
	* gtk/gtkentry.h:
	* gtk/gtkspinbutton.c: (gtk_spin_button_class_init),
	(gtk_spin_button_realize), (gtk_spin_button_size_allocate),
	(gtk_spin_button_expose), (gtk_spin_button_draw_arrow),
	(gtk_spin_button_enter_notify), (gtk_spin_button_leave_notify),
	(gtk_spin_button_grab_notify), (gtk_spin_button_state_changed),
	(start_spinning), (gtk_spin_button_button_release),
	(gtk_spin_button_motion_notify), (gtk_spin_button_value_changed),
	(gtk_spin_button_get_text_area_size), (gtk_spin_button_real_spin),
	(gtk_spin_button_update): Reorder strange window hierarchy of the
	GtkSpinButton (#466000).


svn path=/trunk/; revision=20147
2008-05-25 12:46:26 +00:00
Björn Lindqvist
8d2e8a4505 Remove two chunks of duplicated code (#533733).
2008-05-20  Björn Lindqvist  <bjourne@gmail.com>

	* gtk/gtkspinbutton.c: (gtk_spin_button_snap,
	gtk_spin_button_update): Remove two chunks of duplicated
	code (#533733).

svn path=/trunk/; revision=20118
2008-05-20 17:29:34 +00:00
Tor Lillqvist
2503eac037 Bug 330743 - Up/down spinbuttons won't take zeros and exhibit very strange
2008-04-03  Tor Lillqvist  <tml@novell.com>

	Bug 330743 - Up/down spinbuttons won't take zeros and exhibit
	very strange behavior

	* gtk/gtkspinbutton.c (gtk_spin_button_insert_text) [Win32]: Add
	workaround for a specific kind of screwed up locale setting.


svn path=/trunk/; revision=19972
2008-04-03 12:44:29 +00:00
Johan Dahlin
0c05c6a917 Declare value in the example code for GtkSpinButton::output, as pointed
2008-01-06  Johan Dahlin  <johan@gnome.org>

	* gtk/gtkspinbutton.c: Declare value in the example code for
	GtkSpinButton::output, as pointed out by Anders Carlsson.


svn path=/trunk/; revision=19319
2008-01-07 01:26:39 +00:00
Matthias Clasen
f8c2aaf473 Document the ::output signal and add an example. (#507566, example by Owen
2008-01-06  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkspinbutton.c: Document the ::output signal and
        add an example.  (#507566, example by Owen Taylor)

svn path=/trunk/; revision=19312
2008-01-06 06:35:49 +00:00
Johan Dahlin
71e9be7e6d Use G_OBJECT_WARN_INVALID_PROPERTY_ID consistently. Fixes #5075
2008-01-06  Johan Dahlin  <johan@gnome.org>

	* gtk/gtkcellrenderercombo.c:
	(gtk_cell_renderer_combo_get_property),
	(gtk_cell_renderer_combo_set_property):
	* gtk/gtkcombobox.c: (gtk_combo_box_set_property):
	* gtk/gtkcomboboxentry.c: (gtk_combo_box_entry_set_property):
	* gtk/gtknotebook.c: (gtk_notebook_set_property):
	* gtk/gtkspinbutton.c: (gtk_spin_button_set_property):
	* gtk/gtktextbuffer.c: (gtk_text_buffer_set_property),
	(gtk_text_buffer_get_property):
	* gtk/gtktextview.c: (gtk_text_view_set_property):
	* gtk/gtktogglebutton.c: (gtk_toggle_button_set_property):
	* gtk/gtktoolbutton.c: (gtk_tool_button_set_property),
	(gtk_tool_button_get_property):
	* gtk/gtktoolitem.c: (gtk_tool_item_set_property),
	(gtk_tool_item_get_property):
	* gtk/gtktreeview.c: (gtk_tree_view_set_property):
	* gtk/gtkwidget.c: (gtk_widget_set_property):
	* gtk/gtkwindow.c: (gtk_window_set_property):
	Use G_OBJECT_WARN_INVALID_PROPERTY_ID consistently.
	Fixes #5075

svn path=/trunk/; revision=19311
2008-01-06 03:28:40 +00:00
Matthias Clasen
7b8bbe8687 Set the background of the panel window on style changes. (#402144,
2007-03-12  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkspinbutton.c (gtk_spin_button_style_set): Set
        the background of the panel window on style changes. (#402144,
        Benjamin Berg)



svn path=/trunk/; revision=17492
2007-03-12 05:51:11 +00:00
Tim Janik
caa4d15dab call gdk_event_request_motions() for new motion events after receiving
Tue Feb  6 15:53:59 2007  Tim Janik  <timj@imendio.com>

        * gtk/gtktextview.c (gtk_text_view_motion_event):
        * gtk/gtkspinbutton.c (gtk_spin_button_motion_notify):
        * gtk/gtkaboutdialog.c (credits_motion_notify_event):
        * gtk/gtkhruler.c (gtk_hruler_motion_notify):
        * gtk/gtkvruler.c (gtk_vruler_motion_notify): 
        * gtk/gtkentry.c (gtk_entry_motion_notify):
        * gtk/gtktooltip.c (_gtk_tooltip_handle_event):
        * gtk/gtkhsv.c (gtk_hsv_motion): call gdk_event_request_motions()                              
        for new motion events after receiving motion hints.

        * gdk/gdkevents.[hc]: added gdk_event_request_motions().



svn path=/trunk/; revision=17269
2007-02-06 14:53:35 +00:00
Matthias Clasen
721c3bc101 Replace a lot of idle and timeout calls by the new gdk_threads api.
2006-12-22  Matthias Clasen  <mclasen@redhat.com>

        * *.c: Replace a lot of idle and timeout calls by
        the new gdk_threads api.
2006-12-22 19:10:43 +00:00
Michael Natterer
7f374a74ba Add new infrastructure for notifications of failed keyboard navigation and
2006-11-16  Michael Natterer  <mitch@imendio.com>

	Add new infrastructure for notifications of failed keyboard
	navigation and navigation with restricted set of keys.

	The patch handles configurable beeping, navigating the GUI with
	cursor keys only (as in phone environments), and configurable
	wrap-around. Fixes bugs #322640, #70986, #318827, #334726, #334742
	and #309291.

	* gtk/gtksettings.c: added properties gtk-keynav-cursor-only,
	gtk-keynav-wrap-around and gtk-error-bell.

	* gtk/gtkwidget.[ch]: added new signal "keynav-failed" and public
	API to emit it. Added New function gtk_widget_error_bell() which
	looks at the gtk-error-bell setting and calls gdk_window_beep()
	accordingly.

	* gtk/gtk.symbols: add the new widget symbols.

	* gtk/gtkcellrendereraccel.c
	* gtk/gtkimcontextsimple.c
	* gtk/gtkmenu.c
	* gtk/gtknotebook.c: use gtk_widget_error_bell() or look at the
	gtk-error-bell setting instead of calling gdk_display_beep()
	unconditionally.

	* gtk/gtkcombobox.c
	* gtk/gtkentry.c
	* gtk/gtkiconview.c
	* gtk/gtklabel.c
	* gtk/gtkmenushell.c
	* gtk/gtkspinbutton.c
	* gtk/gtktextview.c
	* gtk/gtktreeview.c: call gtk_widget_error_bell() on failed keynav.

	* gtk/gtkentry.c
	* gtk/gtklabel.c
	* gtk/gtkrange.c
	* gtk/gtktextview.c: consult gtk_widget_keynav_failed() on failed
	cursor navigation and leave the widget if it returns FALSE.

	* gtk/gtkmenushell.c
	* gtk/gtknotebook.c: only wrap around if gtk-keynav-wrap-around
	is TRUE.

	* gtk/gtkradiobutton.c: ask gtk_widget_keynav_failed() to decide
	whether to to wrap-around, and don't select active items on cursor
	navigation if gtk-keynav-cursor-only is TRUE. Should look at
	gtk-keynav-wrap-around too, will look into that.
2006-11-16 12:56:30 +00:00
Matthias Clasen
83e9b96337 Export privately. Adjust all callers.
2006-08-15  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentryprivate.h:
	* gtk/gtkentry.c (_gtk_entry_effective_inner_border): Export
	privately. Adjust all callers.

	* gtk/gtkspinbutton.c (gtk_spin_button_size_request): Use it
	here to get the actual inner border.  (#349429, Benjamin Berg)
2006-08-15 18:52:14 +00:00
Matthias Clasen
113f364a37 More of the same 2006-05-14 04:25:34 +00:00
Matthias Clasen
f26aad1916 Boilerplate reduction 2006-05-02 23:56:43 +00:00
Matthias Clasen
19f92e70d6 Add a wrapped signal. (#322933, Carlos Garnacho Parro)
2006-01-30  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkspinbutton.h:
	* gtk/gtkspinbutton.c: Add a wrapped signal.  (#322933,
	Carlos Garnacho Parro)
2006-01-30 17:35:49 +00:00
Tim Janik
fbb2e3f4f5 deprecated floating/sink API and implemented it in terms of the GObject
Wed Nov 23 18:55:47 2005  Tim Janik  <timj@imendio.com>

        * gtk/gtkobject.[hc]: deprecated floating/sink API and implemented it
        in terms of the GObject floating/sink API.

        * gtk/gtkaboutdialog.c:
        * gtk/gtkaction.c:
        * gtk/gtkcellview.c:
        * gtk/gtkclist.c:
        * gtk/gtkcolorsel.c:
        * gtk/gtkcombobox.c:
        * gtk/gtkfilechooserdefault.c:
        * gtk/gtkiconview.c:
        * gtk/gtkinvisible.c:
        * gtk/gtkitemfactory.c:
        * gtk/gtklayout.c:
        * gtk/gtkmenu.c:
        * gtk/gtkmenutoolbutton.c:
        * gtk/gtknotebook.c:
        * gtk/gtkprogress.c:
        * gtk/gtkrange.c:
        * gtk/gtkspinbutton.c:
        * gtk/gtkstatusicon.c:
        * gtk/gtktext.c:
        * gtk/gtktextview.c:
        * gtk/gtktoolbar.c:
        * gtk/gtktoolbutton.c:
        * gtk/gtktoolitem.c:
        * gtk/gtktreeitem.c:
        * gtk/gtktreeview.c:
        * gtk/gtktreeviewcolumn.c:
        * gtk/gtkuimanager.c:
        * gtk/gtkviewport.c:
        * gtk/gtkwidget.c:
        * gtk/gtkwindow.c:
        ported to use GObject's g_object_ref_sink().

        * gtk/gtkcolorsel.c:
        * gtk/gtkfilechooserdefault.c:
        * gtk/gtkaboutdialog.c:
        fixed compiler warnings.
2005-11-23 18:06:58 +00:00
Michael Natterer
dfa4870b74 Made button-press timeouts which work like key repeat timeouts
2005-11-22  Michael Natterer  <mitch@imendio.com>

	Made button-press timeouts which work like key repeat timeouts
	configurable. Addresses bug #142582:

	* gtk/gtksettings.c: added properties "gtk-timeout-initial" and
	"gtk-timeout-repeat" which defalt to 200/20 (ms).

	Use the values from GtkSettings instead of hardcoding them
	(the repeat value is either taken as-is for fast repeat or
	multiplied by 5 for slow repeat). Changed all places to use these
	two standard initial/repeat timings:

	* gtk/gtkcalendar.c (unchanged 200/20)
	* gtk/gtknotebook.c (unchanged 200/100)
	* gtk/gtkpathbar.c (changed from 300/150 to 200/100)
	* gtk/gtkrange.c (changed from 250/100 to 200/100)
	* gtk/gtkspinbutton.c (unchanged 200/20)
2005-11-22 12:40:15 +00:00
Matthias Clasen
94eec04267 Intern some more strings.
2005-09-01  Matthias Clasen  <mclasen@redhat.com>

        * gdk/*.c: Intern some more strings.
        * gtk/gtkintl.h:
        * gtk/*.c: Define an I_() macro and use it instead of the
        bulky g_intern_static_string().
2005-09-01 05:11:46 +00:00
Matthias Clasen
c09cc89317 Intern type names in code generated by glib-mkenums, too.
2005-08-31  Matthias Clasen  <mclasen@redhat.com>

	* gdk/Makefile.am:
	* gtk/Makefile.am: Intern type names in code generated by
	glib-mkenums, too.

	* gtk/*.c:
	* gdk/x11/*.c:
	* gdk/*.c: Intern type names before registering the type to avoid
	unnecessary copies.
2005-08-31 16:53:43 +00:00
Matthias Clasen
d28d674a66 Add some additional docs on precision. (#309238, Steve Chaplin)
2005-07-05  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkspinbutton.c (gtk_spin_button_new_with_range): Add some
	additional docs on precision.  (#309238, Steve Chaplin)
2005-07-06 03:45:13 +00:00
Matthias Clasen
80bf176f06 2005-06-10 Matthias Clasen <mclasen@redhat.com>
* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_expand):
	* gtk/gtktoolbar.c (gtk_toolbar_get_show_arrow):
	* gtk/gtktextview.c (gtk_text_view_get_iter_at_position):
	* gtk/gtkstock.c (gtk_stock_set_translate_func):
	* gtk/gtkspinbutton.c (gtk_spin_button_get_adjustment):
	* gtk/gtkscrolledwindow.h:
	* gtk/gtkmenushell.c (gtk_menu_shell_get_take_focus):
2005-06-10 04:45:40 +00:00
Matthias Clasen
4c28ce0877 Use canonical names for g_object_notify() as well.
2005-03-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/*.c:
	* gdk/gdkdisplaymanager.c:
	Use canonical names for g_object_notify() as well.
2005-03-26 05:49:15 +00:00
Matthias Clasen
81ffe54056 Stop scrolling when the widget is unmapped. (#168791, Ryan Lortie)
2005-03-22  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkpathbar.c (gtk_path_bar_unmap):
	* gtk/gtkspinbutton.c (gtk_spin_button_unmap):
	* gtk/gtknotebook.c (gtk_notebook_unmap):
	* gtk/gtkrange.c (gtk_range_unmap): Stop scrolling when
	the widget is unmapped.  (#168791, Ryan Lortie)
2005-03-22 17:36:41 +00:00
Matthias Clasen
269d89c79c Define macros GTK_PARAM_READABLE, GTK_PARAM_WRITABLE, GTK_PARAM_READWRITE
2005-03-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprivate.h: Define macros GTK_PARAM_READABLE,
	GTK_PARAM_WRITABLE, GTK_PARAM_READWRITE which are like
	their G_ counterparts, but also mark the name, nick
	and blurb as static.

	* gtk/*.c: Mark param spec strings as static, using
	the new macros.
2005-03-22 02:14:55 +00:00
Matthias Clasen
cca8dd6347 Make PLT-reduction work with gcc4, and don't include everything in
2005-03-20  Matthias Clasen  <mclasen@redhat.com>

	Make PLT-reduction work with gcc4, and don't include
	everything in gdkalias.h:

	* gtk/grk.symbols: Group symbols by header and source file.
	* gtk/makegtkalias.pl: Protect definitions by the same
	preprocessor symbols used to guard the headers. Move
	the alias declarations to a separate file which is
	produced when calling makegtkalias.pl -def
	* gdk/Makefile.am (gtkaliasdef.c): Add a rule to generate
	this file.
	* gtk/*.c: Include gtkalias.h after the other headers,
	include gtkaliasdef.c at the bottom.
	* gtk/*.h: Small cleanups.
2005-03-20 07:01:23 +00:00
Matthias Clasen
52711c24e8 More canonical property names. 2005-03-09 06:15:13 +00:00
Matthias Clasen
3644afd14b Allow min == max. (#158225, Vasco Alexandre da Silva Costa)
2004-11-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkspinbutton.c (gtk_spin_button_new_with_range): Allow
	min == max.  (#158225, Vasco Alexandre da Silva Costa)
2004-11-14 01:25:35 +00:00
Matthias Clasen
daeea8b871 Share the three copies of get_borders() under the name
2004-10-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentry.h:
	* gtk/gtkentry.c:
	* gtk/gtkentrycompletion.c:
	* gtk/gtkspinbutton.c: Share the three copies of get_borders()
	under the name _gtk_entry_get_borders().  (#116368, Owen Taylor)
2004-10-08 04:24:45 +00:00
Matthias Clasen
3612aee585 Add hidden aliases for exported symbols which are used internally in order
Mon Aug  9 12:48:04 2004  Matthias Clasen  <maclas@gmx.de>

	Add hidden aliases for exported symbols which are
	used internally in order to get rid of many PLT
	entries.  (#145519, Arjan van de Ven)

	* gtk/Makefile.am: Add rules to generate gtk.def and
	from gtk.symbols, and make make check check the abi
	with abicheck.sh.
	(gtk_private_h_sources): Add gtkinternals.h
	(gtk_built_private_headers): Add gtkalias.h
	(gtk_extra_sources): Add gtk.symbols
	(EXTRA_DIST): Add makegtkalias.pl and abicheck.sh

	* gtk/gtk.symbols: New file. Definition of the GTK+ ABI.
	The file can be processed by cpp to filter out certain
	subsets of symbols.

	* gtk/abicheck.sh: New file. Script to check the actually
	symbols exported from libgtk-x11.2.0.so against the symbols
	found in gtk.symbols.

	* gtk/makegtkalias.pl: New file. Perl script to generate the
	header containing the alias definitions for internally used
	exported symbols from a list of symbols.

	* gtk/gtkinternals.h: New file. An uninstalled header listing
	symbols which must be exported for some reason and do not appear
	in any other header.

	* gtk/*.c: Include gtkalias.h
2004-08-09 16:59:53 +00:00
Matthias Clasen
f436df88d3 Install the timeout before changing the value, so that a ::value_changed
Thu Jul 15 20:31:28 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkspinbutton.c (start_spinning): Install the timeout
	before changing the value, so that a ::value_changed handler
	has a chance to remove it.  (#122427, Elke Meier)
2004-07-16 00:38:06 +00:00
Matthias Clasen
171d43b206 Make spinbuttons work with negative increments. (#137975, Tim Gerla)
2004-04-22  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkspinbutton.c (spin_button_at_limit): Make spinbuttons
	work with negative increments.  (#137975, Tim Gerla)
2004-04-22 13:49:27 +00:00
Matthias Clasen
c20280810a Use the same logic as GtkEntry when calculating border width. (#116368,
Thu Mar 11 22:12:14 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkspinbutton.c (gtk_spin_button_size_request): Use the same
	logic as GtkEntry when calculating border width.  (#116368, reported
	by Morten Welinder)
2004-03-11 21:10:49 +00:00
Federico Mena Quintero
80581c3011 Fixes #136082 and #135265, patch by Morten Welinder.
2004-03-05  Federico Mena Quintero  <federico@ximian.com>

	Fixes #136082 and #135265, patch by Morten Welinder.

	* configure.in: Use AC_SYS_LARGEFILE.

	* */*.c: #include <config.h>
2004-03-06 03:38:59 +00:00
Matthias Clasen
07d4d314b6 The first part of the fix for #114351 (see also gdk-pixbuf/ChangeLog and
Fri Jan 16 23:59:01 2004  Matthias Clasen  <maclas@gmx.de>

	The first part of the fix for #114351 (see also
	gdk-pixbuf/ChangeLog and po/ChangeLog):

	* gtk/gtkintl.h:
	* gdk-pixbuf/gdk-pixbuf-i18n.h:
	* gdk/gdkintl.h: Define P_() for property blurbs and nicks.

	* gdk/gdkdisplaymanager.c:
	* gdk-pixbuf/gdk-pixbuf.c:
	* modules/input/gtkimcontextxim.c:
	* gtk/*.c:  Mark property blurbs and nicks with P_().

	* po/Makefile.in.in: Add --keyword=P_ to the xgettext
	invocation, since property blurbs and nicks are
	now marked with P_().
2004-01-16 23:10:05 +00:00
Matthias Clasen
2a136e56b8 Add missing GDK_THREADS_ENTER()/GDK_THREADS_LEAVE(). Cast second argument
Wed Dec 17 23:20:23 2003  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkexpander.c (gtk_expander_animation_timeout): Add missing
	GDK_THREADS_ENTER()/GDK_THREADS_LEAVE().
	* gtk/gtkcalendar.c, gtk/gtkclist.c, gtk/gtkexpander.c,
	gtk/gtklist.c, gtk/gtknotebook.c, gtk/gtkselection.c,
	gtk/gtkspinbutton.c: Cast second argument to g_timeout_add() to
	GSourceFunc instead of GtkFunction.  (#129525, Olexiy Avramchenko)
2003-12-17 22:23:32 +00:00
Kristian Rietveld
5ff0e3fabe Merge from stable.
Thu Aug 21 01:33:51 2003  Kristian Rietveld  <kris@gtk.org>

	Merge from stable.

	* gtk/gtkspinbutton.c (gtk_spin_button_size_request): always round
	approximate digit widths up, to avoid truncation, convert to
	pango pixels when we have the full string width instead of converting
	the approx digit width to pango pixels, take inner border and
	interior focus into account correctly. (Fixes #116368, patch from
	Morten Welinder).
2003-08-20 23:47:19 +00:00
Kristian Rietveld
a36775060d Merged from stable.
Wed Aug 20 22:03:25 2003  Kristian Rietveld  <kris@gtk.org>

	Merged from stable.

	* gtk/gtkspinbutton.c (start_spinning): change the type of step
	to gdouble, since it gets it's data from a gdouble (Fixes #113547).
2003-08-20 20:20:00 +00:00
Matthias Clasen
5708dcee6c Use g_strtod() to cope with C libraries with crippled locale support.
2003-08-07  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkspinbutton.c (gtk_spin_button_default_input): Use g_strtod() to cope with C libraries with
	crippled locale support.  (#115293)
2003-08-07 18:54:51 +00:00
Matthias Clasen
39f5280dcb Improve docs. (116364, Morten Welinder)
2003-07-01  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkspinbutton.c (gtk_spin_button_set_digits): Improve docs.  (116364, Morten Welinder)
2003-07-01 20:49:01 +00:00
Matthias Clasen
3ec234a6c5 Add a blurb for shadow_type.
2003-06-24  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkspinbutton.c (gtk_spin_button_class_init): Add a blurb for shadow_type.

	* gtk/gtkwidget.c (gtk_widget_class_install_style_property_parser):
	(gtk_widget_class_list_style_properties): Use same parameter names as in
	header (to silence gtk-doc).

	* gtk/gtkalignment.c (gtk_alignment_[gs]et_padding): Fix doc comments.
2003-06-24 21:55:40 +00:00
Matthias Clasen
feefa270e3 Fixes for bug #56248:
2003-03-29  Matthias Clasen  <maclas@gmx.de>

        Fixes for bug #56248:

	* gtk/gtknotebook.c (stop_scrolling): New function to remove the
	timer and queue a redraw.
	(gtk_notebook_grab_notify):
	(gtk_notebook_state_changed): New functions to call stop_scrolling()
	if necessary.
	(gtk_notebook_button_release): Use stop_scrolling().
	(gtk_notebook_draw_arrow): Fix drawing of insensitive arrows.

	* gtk/gtkrange.c (stop_scrolling): New function to remove the
	grab, remove the timer and queue a redraw.
	(gtk_range_grab_notify):
	(gtk_range_state_changed): New functions to call stop_scrolling()
	if necessary.
	(gtk_range_button_release): Use stop_scrolling().

	* gtk/gtkspinbutton.c (gtk_spin_button_grab_notify):
	(gtk_spin_button_state_changed): Redraw after stop_spinning.
	(gtk_spin_button_stop_spinning): Reset click_child to correct the
	drawing of the arrows.
	(gtk_spin_button_button_release): Use a local copy of click_child,
	since stop_spinning() resets it.
2003-03-29 00:11:32 +00:00
Matthias Clasen
b414adc897 Replace uses of gtk_timeout_* and gtk_idle_* by their non-deprecated
GLib counterparts. Fully deprecate gtk_timeout_* and gtk_idle_*.
2003-02-05 23:48:11 +00:00
Manish Singh
28bc53032b Deprecation cleanup
Wed Oct  9 17:40:13 2002  Manish Singh  <yosh@gimp.org>

        * gtk/gtkaccelmap.c gtk/gtkfixed.[ch] gtk/gtkkeyhash.c gtk/gtkmenu.c
        gtk/gtkobject.c gtk/gtkoldeditable.c gtk/gtkrc.c gtk/gtkspinbutton.[ch]
        gtk/gtktable.[ch] gtk/gtkthemes.c: Deprecation cleanup
2002-10-10 01:02:25 +00:00
Owen Taylor
3a93889c3c Remove the check for editable. (Reported by Brent Fox)
Thu Aug  8 16:58:22 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkspinbutton.c (gtk_spin_button_real_change_value):
        Remove the check for editable. (Reported by Brent Fox)
2002-09-24 10:39:23 +00:00
Owen Taylor
aa6cde8dc3 Chain up so that entry->activates_default is honored. (#93865, Pieter
Tue Sep 24 04:50:28 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkspinbutton.c (gtk_spin_button_activate):
        Chain up so that entry->activates_default is honored.
        (#93865, Pieter Penninckx)
2002-09-24 08:57:57 +00:00
Owen Taylor
a7716c187f Patch from Joshua N Pritikin to fix problem where signal connection wasn't
Mon Sep 23 12:12:48 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkspinbutton.c: Patch from Joshua N Pritikin to
        fix problem where signal connection wasn't removed
        from adjustment on finalize. (#93962)
2002-09-23 16:14:15 +00:00
Owen Taylor
f51ef574b5 Handle 0 increment, to fix division-by-zero problem. (#82816, George
Wed Jun 12 15:43:38 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkspinbutton.c (gtk_spin_button_snap): Handle
        0 increment, to fix division-by-zero problem.
        (#82816, George Lebl.)
2002-06-12 19:42:48 +00:00
Owen Taylor
8acfd1e9de Patch from Erwann Chenede, #73900 fixing a lot of warnings with Forte CC,
Wed Mar 20 16:36:08 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/*.c: Patch from Erwann Chenede, #73900 fixing
        a lot of warnings with Forte CC, mostly implicit
        casts between void * and function pointers.

        * gdk/gdkevents.c (gdk_event_get_state): GdkEventVisibility's
        state field is not a GdkModifierType. (Also #73900)
2002-03-20 21:47:01 +00:00
Soeren Sandmann
ad64579ca0 Draw arrows better (without extra baseline)
Wed Feb 27 00:45:39 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkarrow.c, gtk/gtkmenuitem.c, gtk/gtkrange.c
	gtk/gtkspinbutton.c gtk/gtkstyle.c: Draw arrows better (without
	extra baseline)
2002-02-26 23:50:14 +00:00
Soeren Sandmann
cdd97348e6 Many cleanups and fixes. Draw exclusively in expose handler. Feedback when
Thu Feb 21 00:31:41 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkspinbutton.c: Many cleanups and fixes. Draw exclusively
	in expose handler. Feedback when buttons are depressed.

	* gtk/gtkstyle.c: update for changes in gtkspinbutton.c. Fix
	spinbuttons for RTL langauges.
2002-02-20 23:36:28 +00:00
Owen Taylor
aa88182321 Convert to using binding set for doing key bindings. (#62622, Requested by
Thu Feb  7 19:00:10 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkspinbutton.c (gtk_spin_button_key_release): Convert
        to using  binding set for doing key bindings. (#62622,
        Requested by Skip Montaro)

        * gtk/gtkwindow.c (gtk_window_class_init): Add control-arrow
        bindings as overrides along with control-tab bindings.

        * gtk/gtknotebook.c (gtk_notebook_class_init): Fix return
        type for ::focus_tab signal.
2002-02-08 00:02:52 +00:00
Matthias Clasen
4dddfb2dc6 Remove excess calls to g_return_if_fail from static and virtual functions. 2002-01-30 22:29:03 +00:00