Commit Graph

263 Commits

Author SHA1 Message Date
William Jon McCann
57139820c9 dialog: Mark alternate button order as deprecated
This feature was never implemented 100% correct, and
does not apply to action buttons in header bars.

https://bugzilla.gnome.org/show_bug.cgi?id=720059
2014-01-17 17:52:07 -05:00
Matthias Clasen
32a2901294 dialog: Mark gtk_dialog_get_action_area as deprecated
Direct access to the action area by applications makes it much more
difficult to make changes to GtkDialog. Therefore, deprecate this
function.
2014-01-17 17:52:07 -05:00
Paolo Borelli
4adc072952 Use gtk_window_close for gtk_dialog_close
We manually synthethized the delete event, but now we have the
corresponding method in GtkWindow
2014-01-17 19:24:27 +01:00
Jasper St. Pierre
baa471ec13 gtkdialog: Allow specifying response IDs by nick in <action-widgets>
This makes it a lot more convenient for developers, as they don't
have to look up the numeric value of response IDs.
2013-10-28 18:03:25 -04:00
Matthias Clasen
0b726a409e Revert "dialog: Fix docs for GtkDialog"
This reverts commit e4bb02f8ae.

Responses don't have to be negative.
2013-10-28 06:39:30 -04:00
Jasper St. Pierre
e4bb02f8ae dialog: Fix docs for GtkDialog
Responses need to be negative
2013-10-23 12:04:13 -04:00
Matthias Clasen
cda60c3c40 Another round of template binding api changes
We rename the gtk_widget_class_bind_template_child{_internal}
macros by appending a _private to their name. Otherwise, it
would be too magic to pass the 'public' names as arguments,
but affect a member of the Private struct. At the same time,

Add two new macros with the old names,
gtk_widget_class_bind_template_child{_internal} that operate
on members of the instance struct.
2013-07-26 16:29:12 -04:00
Emmanuele Bassi
89ae3524a3 Rename the widget template API
The macros and functions are inconsistently named, and are not tied to
the "template" concept - to the point that it seems plausible to use
them without setting the template.

The new naming scheme is as follows:

  gtk_widget_class_bind_template_child_full
  gtk_widget_class_bind_template_callback_full

With the convenience macros:

  gtk_widget_class_bind_template_child
  gtk_widget_class_bind_template_child_internal
  gtk_widget_class_bind_template_callback

https://bugzilla.gnome.org/show_bug.cgi?id=700898
https://bugzilla.gnome.org/show_bug.cgi?id=700896
2013-07-26 13:52:15 -04:00
Alexander Larsson
a8e84545d1 widget: Use a real offset in gtk_widget_class_automate_child
Using an offset from the struct means you can have children in
both the public and private (via G_PRIVATE_OFFSET) parts of the
instance. It also matches the new private macros nicer.

https://bugzilla.gnome.org/show_bug.cgi?id=702563

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2013-07-26 08:41:09 -04:00
Jehan
0e4d9b7793 gtkdialog - more informative warning when ordering unexisting response_id 2013-07-21 21:42:50 +09:00
Matthias Clasen
0aa57d26b5 Move wholly deprecated classes to gtk/deprecated/
We've recently a number of classes wholly. For these cases,
move the headers and sources to gtk/deprecated/ and adjust
Makefiles and includes accordingly.

Affected classes:
GtkAction
GtkActionGroup
GtkActivatable
GtkIconFactory
GtkImageMenuItem
GtkRadioAction
GtkRecentAction
GtkStock
GtkToggleAction
GtkUIManager
2013-07-19 21:39:47 -04:00
Emmanuele Bassi
0899ef7cc9 gtk: Use new macros for defining private data
https://bugzilla.gnome.org/show_bug.cgi?id=702996
2013-07-09 09:30:02 +01:00
William Jon McCann
d741b7b873 Deprecate the gtk stock functions 2013-06-27 17:51:38 -04:00
William Jon McCann
424e1d0059 Start deprecating some GtkStock API 2013-06-25 19:05:32 -04:00
William Jon McCann
02c793f24a Start migrating internals away from GtkStock 2013-06-24 22:20:49 -04:00
Alexander Larsson
f354cef61b GtkDialog: Baseline align buttons in action area 2013-04-23 05:58:07 +02:00
Tristan Van Berkom
33f6195d0e GtkDialog: Define children with a GtkBuilder template
As the first composite widget in GTK+, this patch also
adds some Makefile mechanics to list the ui files as
dependencies of the global GTK+ resources, and adds the
initial test case where composite classes should be tested.
2013-04-08 21:19:27 +09:00
Matthias Clasen
8d0e88bac7 gtk: Don't use GDK_THREADS_ENTER/LEAVE macros internally
These are just wrappers for the functions, and we want to
deprecate them. Stopping to use them internally is a good
first step.
2012-07-30 18:01:47 +02:00
Benjamin Otte
7844e8089c types: Clean up gtkwidget.h includes
In particular gtksettings.h and gtkstylecontext.h needed to be included
in lots of places now.

Also, I order the includes alphabetically in a bunch of headers.
2012-03-03 19:45:03 +01:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Javier Jardón
8985ce3b72 gtkbox: Move private functions to private header 2011-10-02 21:30:42 +01:00
Matthias Clasen
5ff8fe6971 Documentation fixes
Mostly making sure that return values and varargs don't loose
their docs.
2011-09-25 21:04:49 -04:00
Matthias Clasen
383127cd0b Clean up unneeded includes 2011-08-28 01:40:10 -04:00
Benjamin Otte
6379faaa90 dialog: Use gtk_widget_class_set_accessible_role() 2011-07-18 18:30:50 +02:00
Matthias Clasen
1743e18c87 GtkDialog: avoid underallocations
GtkDialog changes its size depending on style properties. If
we only do this in response to ::style-updated, it happens during
the initial realization of the dialog and leads to the dialog
'growing' between when we determine the initial window size and
when we allocate it that size. So, do this beforehand.
2011-06-09 20:43:02 -04:00
Matthias Clasen
ab3c63cc3a More include cleanups 2011-06-07 21:23:07 -04:00
Patricia Santana Cruz
49c48546c8 Removed incorrect description's sentence.
Description was wrong when it explained: "The two areas are separated
by a GtkHSeparator.". These separators are not used any more.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=643496
2011-02-28 17:36:05 +00:00
Matthias Clasen
beb8c290d1 Always chain up in ::style-updated
This was not handled consistently, but the default handler
does useful things, so we should always chain up.
2011-02-07 07:30:37 -05:00
Christian Dywan
205ee834ec State that _add_button functions return a "#GtkButton widget"
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=586635
2011-01-26 10:33:49 +01:00
Pavel Holejsovsky
2fb1c06402 [GI] Add missing (out) and (array) annotations 2011-01-20 13:57:20 +01:00
Steve Frécinaux
3f0d330a65 [GI] Fix transfer annotation on gtk_dialog_add_button()
The transfer annotation was (transfer full) but the caller actually
doesn't own a reference of the object. This made the pygobject test suite
crash because pygobject was trying to unref the returned GtkButton
instance.

https://bugzilla.gnome.org/show_bug.cgi?id=639949
2011-01-20 11:55:38 +01:00
Pavel Holejsovsky
a1c297a310 [GI] Cosmetic cleanups of annotations and doc comments
This change does not introduce any functionality change, mostly
cosmtic cleanups, like re-linebreak when introduced annotations messed
up indentation or whitespace errors fixes.
2011-01-18 17:31:59 +01:00
Matthias Clasen
c009149670 Move GtkDialog docs inline
Based on a patch by Garrett Regier.

https://bugzilla.gnome.org/show_bug.cgi?id=617312
2011-01-04 12:54:47 -05:00
Matthias Clasen
b5c6904c2f Drop explicit includes of gdkkeysyms.h
These are no longer needed. At the same time, port gtkimcontextsimpleseqs.h
to use the new GDK_KEY_ symbols.
2011-01-04 12:21:41 -05:00
Carlos Garnacho
be0ebc9f5a Make GtkDialog use ::style-updated 2011-01-04 03:06:18 +01:00
Javier Jardón
abb98246ff docs: Update URL of some documentation links
http://developer.gnome.org -> http://library.gnome.org
2010-11-16 16:20:46 +09:00
Murray Cumming
131da8507b gtk_dialog_get_content_area(): Fix the docs.
This returns a GtkBox now, not a GtkVBox.
Language bindings may need to adjust their APIs accordingly.
2010-11-13 15:23:32 +09:00
Murray Cumming
233afbdab1 gtkdialog.c: Remove trailing whitespace 2010-11-13 15:23:32 +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
Javier Jardón
2615ebf37e Use gtk_button_box_new() instead gtk_[v|h]_button_box_new() 2010-10-30 17:37:02 +09:00
=Christian Persch
d3f1745493 Use g_ascii_strto[u]ll instead of strto[u]l
We don't want GtkBuilder input to be locale-dependent.

Bug #632503
2010-10-25 12:22:20 -04:00
Matthias Clasen
35e0ad72e4 Another fix for the initial focus heuristic
We were trying to avoid selecting a label initially, but the code
was sometimes leaving labels selected when the focus eventually
ended up on a button instead.
2010-09-19 00:54:50 -04: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
John (J5) Palmieri
c78a23bdca add annotations for tranfer and scope so that methods are exported by GI 2010-09-07 13:50:40 -04:00
Matthias Clasen
d433a60611 Remove separators from dialogs
It seems more reasonable to remove this feature than to keep fighting
off every separator that pops up by accident in a dialog.
2010-09-02 09:14:20 -04:00
Javier Jardón
1e5d7c0225 Use GtkFooPrivate instead GtkFooPriv 2010-08-27 04:48:23 +02:00
Matthias Clasen
586bbc9b13 Make the initial focus in dialogs work as intended
We had code that tried to prevent selecting the text in the label
if we end up focusing a label, but it didn't take effect, because
we were moving the focus into the label again afterwards.
2010-08-25 00:43:16 -04:00
Javier Jardón
014fc1f73a gtk/gtkdialog.c: Use accessor functions to access GtkWindow 2010-08-23 20:18:10 +02:00
Javier Jardón
4def73b386 gtk/gtkdialog.c: use accessor functions to access GtkWidget 2010-08-22 22:56:13 +02:00
Javier Jardón
a8014e6fec gtkdialog: Move public members to private structure 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
Matthias Clasen
87f48634f4 Fix an infinite loop in gtk_dialog_map()
The new focus handling with links in labels tripped up the code
that tries to avoid focussing labels. Bug 612066
2010-03-08 10:36:11 -05:00
Javier Jardón
e8e95d4c5e Don't use GTK_WIDGET_*SET_FLAGS (wid, GTK_CAN_DEFAULT)
Use new API instead: gtk_widget_set_can_default ()
2010-03-02 07:58:05 +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
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
Javier Jardón
127033f83d Bug 596019 - No accessors for GtkDialog buttons
Add API for GtkDialog to return widgets by response ID.
Added gtk_dialog_get_widget_for_response() to access to all kinds
of buttons with all kinds of responses.
2009-10-12 17:20:02 +02:00
Matthias Clasen
bc74cdb8ae Make an internal function static 2009-05-03 12:15:28 -04:00
Paul Bolle
42ab202b84 Bug 562817 – Typo in GtkDialog
2008-12-01  Paul Bolle  <pebolle@tiscali.nl>

	Bug 562817 – Typo in GtkDialog

	* gtk/gtkdialog.c: Fix typo


svn path=/trunk/; revision=21836
2008-11-30 23:49:29 +00:00
Christian Dywan
3a872a3c42 Bug 408244 – add GtkDialog::content-area-spacing
* gtk/gtkbox.c (gtk_box_init), (gtk_box_set_spacing),
(_gtk_box_set_spacing_set), (_gtk_box_get_spacing_set):
* gtk/gtkbox.h:
* gtk/gtkdialog.c (gtk_dialog_class_init), (update_spacings):
Implement "content-area-spacing" style property in GtkDialog
and internal helper _gtk_box_get_spacing_set in GtkBox.
Patch by Tim Janik, Sven Herzberg and myself.

svn path=/trunk/; revision=21508
2008-09-24 08:41:46 +00:00
Michael Natterer
06d7547ff8 return gboolean instead of gint. Reindent static prototypes.
2008-09-02  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkdialog.c (gtk_dialog_delete_event_handler): return
	gboolean instead of gint. Reindent static prototypes.


svn path=/trunk/; revision=21260
2008-09-02 16:37:37 +00:00
Michael Natterer
e0bbf16989 get rid of the deprecated aliases NONE and BOOL.
2008-08-13  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkmarshalers.list: get rid of the deprecated aliases NONE
	and BOOL.

	* gtk/gtkdialog.c
	* gtk/gtkentrycompletion.c
	* gtk/gtkmenuitem.c
	* gtk/gtkoldeditable.c
	* gtk/gtkrange.c
	* gtk/gtktreeview.c
	* gtk/gtkwidget.c: changed accordingly.


svn path=/trunk/; revision=21111
2008-08-13 18:44:11 +00:00
Sven Neumann
b699ac5853 gtk/gtkaccellabel.c gtk/gtkaction.c gtk/gtkclist.c gtk/gtkcolorbutton.c
2008-08-12  Sven Neumann  <sven@gimp.org>

	* gtk/gtkaccellabel.c
	* gtk/gtkaction.c
	* gtk/gtkclist.c
	* gtk/gtkcolorbutton.c
	* gtk/gtkctree.c
	* gtk/gtkdialog.c
	* gtk/gtkdnd-quartz.c
	* gtk/gtkdnd.c
	* gtk/gtkentry.c
	* gtk/gtkfilechooserdefault.c
	* gtk/gtkfilesel.c
	* gtk/gtkgamma.c
	* gtk/gtkiconview.c
	* gtk/gtkkeyhash.c
	* gtk/gtklabel.c
	* gtk/gtkmenu.c
	* gtk/gtkmenubar.c
	* gtk/gtkpaned.c
	* gtk/gtkrecentchooserdialog.c
	* gtk/gtkrecentchooserutils.c
	* gtk/gtkselection.c
	* gtk/gtksizegroup.c
	* gtk/gtktextbtree.c
	* gtk/gtktextbuffer.c
	* gtk/gtktextview.c
	* gtk/gtktoolbar.c
	* gtk/gtktreemodel.c
	* gtk/gtkuimanager.c
	* gtk/gtkwindow-decorate.c
	* gtk/gtkwindow.c: use canonical signal names in some more places
	that I missed earlier. Also changed this in the documentation and
	comments.


svn path=/trunk/; revision=21094
2008-08-12 14:37:03 +00:00
Matthias Clasen
c455b5eac1 Add some missing braces
svn path=/trunk/; revision=21005
2008-08-05 00:21:49 +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
Michael Natterer
24c0eb5d39 also revert change in how the dialog's vbox was added (bug #539732).
2008-06-24  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkdialog.c (gtk_dialog_init): also revert change in how
	the dialog's vbox was added (bug #539732).


svn path=/trunk/; revision=20681
2008-06-24 10:49:12 +00:00
Carlos Garnacho
60e1b3ea89 Remove container implementation, which isn't thought for handling
2008-06-24  Carlos Garnacho  <carlos@imendio.com>

        * gtk/gtkdialog.[ch]: Remove container implementation, which isn't
        thought for handling non-direct children. Fixes #539732.
        (gtk_dialog_pack_start) (gtk_dialog_pack_end): Removed as well, it
        doesn't provide enough control to API users (removing, reordering...),
        this is better handled through:
        (gtk_dialog_get_content_area): New function which just returns
        dialog->vbox.
        * gtk/gtk.symbols: Modify accordingly.
        * docs/reference/gtk/tmpl/gtkdialog.sgml: Update docs to recommend
        using gtk_dialog_get_[action|content]_area() instead of accessing
        dialog struct members directly.

svn path=/trunk/; revision=20680
2008-06-24 10:22:40 +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
Johan Dahlin
e46eeab2a9 Add missing Since: gtk-doc markup for newly added GSEAL API. Change all
2008-06-20  Johan Dahlin  <jdahlin@async.com.br>

    * gtk/gtkaccelgroup.c:
    * gtk/gtkcolorseldialog.c:
    * gtk/gtkcontainer.c:
    * gtk/gtkdialog.c:
    * gtk/gtkentry.c (gtk_entry_class_init):
    * gtk/gtkfontsel.c:
    * gtk/gtkhandlebox.c:
    * gtk/gtklayout.c:
    * gtk/gtkmenu.c (gtk_menu_class_init):
    * gtk/gtkmenuitem.c (gtk_menu_item_class_init):
    * gtk/gtkplug.c (gtk_plug_class_init):
    * gtk/gtkselection.c:
    * gtk/gtksocket.c:
    * gtk/gtktreeselection.c:
    * gtk/gtkwidget.c (gtk_widget_class_init):
    * gtk/gtkwindow.c:
    Add missing Since: gtk-doc markup for newly added GSEAL API.
    Change all Since: GSEAL-branch to Since: 2.14.


svn path=/trunk/; revision=20639
2008-06-20 13:54:31 +00:00
Michael Natterer
7cd4eb5650 change return value from GtkHButtonBox to GtkWidget.
2008-06-20  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkdialog.c (gtk_dialog_get_action_area): change return
	value from GtkHButtonBox to GtkWidget.


svn path=/trunk/; revision=20637
2008-06-20 13:23:22 +00:00
Tim Janik
dd8ea21142 Document gtk_dialog_get_action_area(), gtk_dialog_pack_start() and gtk_dialog_pack_end()
* gtk/gtkdialog.c: Add missing documentation for new fucntions.

svn path=/trunk/; revision=20631
2008-06-20 11:10:48 +00:00
Tim Janik
847b87eb9f Fix GtkDialog, don't add vbox via gtk_container_add.
svn path=/trunk/; revision=20618
2008-06-20 11:09:30 +00:00
Tim Janik
b15ca51c35 Add accessors for GtkDialog public vars, also implement GtkContainer::add/remove
svn path=/trunk/; revision=20486
2008-06-20 10:57:35 +00:00
Johan Dahlin
3d5b7c2078 Chain up to parent, so widgets can have internal children.
2008-01-24  Johan Dahlin  <johan@gnome.org>

	* gtk/gtkdialog.c (gtk_dialog_buildable_get_internal_child): 
	Chain up to parent, so widgets can have internal children.


svn path=/trunk/; revision=19394
2008-01-24 16:38:50 +00:00
Johan Dahlin
f3ec3ddac2 Chain up. This makes it possible to have accelerators tags on GtkDialog
2007-12-28  Johan Dahlin  <johan@gnome.org>

	* gtk/gtkdialog.c (gtk_dialog_buildable_custom_finished)
	(gtk_dialog_buildable_custom_tag_start): Chain up. 
	This makes it possible to have accelerators tags on GtkDialog 
	subclasses.


svn path=/trunk/; revision=19268
2007-12-28 10:36:07 +00:00
Matthias Clasen
4896e24bb1 Require gtk-doc 1.8
2007-11-25  Matthias Clasen  <mclasen@redhat.com>

        * configure.in: Require gtk-doc 1.8

        * */*.c: Use gtk-doc abbreviations for examples in docs.


svn path=/trunk/; revision=19041
2007-11-25 06:51:19 +00:00
Matthias Clasen
0184d7caad Move signal and property documentation inline, fix a problem with the
2007-11-25  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkdialog.c: Move signal and property documentation inline,
        fix a problem with the ::response signal docs.  (#499133, Josselin
        Mouette)


svn path=/trunk/; revision=19038
2007-11-25 05:40:49 +00:00
Johan Dahlin
8332387682 Mimic the behavior of gtk_dialog_add_action_widget closer, to make
2007-07-03  Johan Dahlin  <jdahlin@async.com.br>

    * gtk/gtkdialog.c (gtk_dialog_buildable_custom_finished): Mimic the behavior
    of gtk_dialog_add_action_widget closer, to make clicking on the buttons
    actually work.


svn path=/trunk/; revision=18349
2007-07-03 03:26:07 +00:00
Johan Dahlin
4d638bf0c1 Add GtkBuilder, fixes #172535
2007-06-15  Johan Dahlin  <jdahlin@async.com.br>

    * demos/gtk-demo/Makefile.am:
    * demos/gtk-demo/builder.c: (quit_activate), (about_activate),
    (do_builder):
    * demos/gtk-demo/demo.ui:
    * docs/reference/gtk/gtk-docs.sgml:
    * docs/reference/gtk/gtk-sections.txt:
    * docs/reference/gtk/gtk.types:
    * docs/reference/gtk/tmpl/gtkbuildable.sgml:
    * docs/reference/gtk/tmpl/gtkbuilder.sgml:
    * gtk/Makefile.am:
    * gtk/gtk.h:
    * gtk/gtk.symbols:
    * gtk/gtkaction.c: (gtk_action_buildable_init),
    (gtk_action_buildable_set_name), (gtk_action_buildable_get_name):
    * gtk/gtkactiongroup.c: (gtk_action_group_get_type),
    (gtk_action_group_buildable_init),
    (gtk_action_group_buildable_add),
    (gtk_action_group_buildable_set_name),
    (gtk_action_group_buildable_get_name):
    * gtk/gtkbuildable.c: (gtk_buildable_get_type),
    (gtk_buildable_set_name), (gtk_buildable_get_name),
    (gtk_buildable_add), (gtk_buildable_set_property),
    (gtk_buildable_parser_finished), (gtk_buildable_construct_child),
    (gtk_buildable_custom_tag_start), (gtk_buildable_custom_tag_end),
    (gtk_buildable_custom_finished),
    (gtk_buildable_get_internal_child):
    * gtk/gtkbuildable.h:
    * gtk/gtkbuilder.c: (gtk_builder_class_init), (gtk_builder_init),
    (gtk_builder_finalize), (gtk_builder_set_property),
    (gtk_builder_get_property), (_gtk_builder_resolve_type_lazily),
    (gtk_builder_real_get_type_from_name),
    (gtk_builder_get_parameters), (gtk_builder_get_internal_child),
    (_gtk_builder_construct), (_gtk_builder_add),
    (apply_delayed_properties), (_gtk_builder_finish),
    (gtk_builder_new), (gtk_builder_add_from_file),
    (gtk_builder_add_from_string), (gtk_builder_get_object),
    (object_add_to_list), (gtk_builder_get_objects),
    (gtk_builder_set_translation_domain),
    (gtk_builder_get_translation_domain),
    (gtk_builder_connect_signals_default),
    (gtk_builder_connect_signals), (gtk_builder_connect_signals_full),
    (gtk_builder_value_from_string),
    (gtk_builder_value_from_string_type),
    (_gtk_builder_enum_from_string), (_gtk_builder_flags_from_string),
    (gtk_builder_get_type_from_name), (gtk_builder_error_quark):
    * gtk/gtkbuilder.h:
    * gtk/gtkbuilderparser.c: (state_push), (state_peek), (state_pop),
    (error_missing_attribute), (error_invalid_attribute),
    (error_invalid_tag), (builder_construct), (parse_object),
    (free_object_info), (_get_type_by_symbol), (parse_child),
    (free_child_info), (parse_property), (free_property_info),
    (parse_signal), (_free_signal_info), (parse_interface),
    (create_subparser), (free_subparser), (subparser_start),
    (subparser_end), (parse_custom), (start_element), (end_element),
    (text), (_gtk_builder_parser_parse_buffer):
    * gtk/gtkbuilderprivate.h:
    * gtk/gtkcelllayout.c: (attributes_start_element),
    (attributes_text_element),
    (_gtk_cell_layout_buildable_custom_tag_start),
    (_gtk_cell_layout_buildable_custom_tag_end),
    (_gtk_cell_layout_buildable_add):
    * gtk/gtkcelllayout.h:
    * gtk/gtkcellview.c: (gtk_cell_view_buildable_init),
    (gtk_cell_view_buildable_custom_tag_start),
    (gtk_cell_view_buildable_custom_tag_end):
    * gtk/gtkcolorseldialog.c:
    (gtk_color_selection_dialog_buildable_interface_init),
    (gtk_color_selection_dialog_buildable_get_internal_child):
    * gtk/gtkcombobox.c: (gtk_combo_box_buildable_init),
    (gtk_combo_box_buildable_custom_tag_start),
    (gtk_combo_box_buildable_custom_tag_end):
    * gtk/gtkcomboboxentry.c:
    (gtk_combo_box_entry_buildable_interface_init),
    (gtk_combo_box_entry_buildable_get_internal_child):
    * gtk/gtkcontainer.c: (gtk_container_get_type),
    (gtk_container_buildable_init), (gtk_container_buildable_add),
    (gtk_container_buildable_set_child_property),
    (attributes_start_element), (attributes_text_element),
    (gtk_container_buildable_custom_tag_start),
    (gtk_container_buildable_custom_tag_end):
    * gtk/gtkdebug.h:
    * gtk/gtkdialog.c: (gtk_dialog_buildable_interface_init),
    (gtk_dialog_buildable_get_internal_child),
    (attributes_start_element), (attributes_text_element),
    (gtk_dialog_buildable_custom_tag_start),
    (gtk_dialog_buildable_custom_finished):
    * gtk/gtkentrycompletion.c: (gtk_entry_completion_buildable_init):
    * gtk/gtkexpander.c: (gtk_expander_buildable_add),
    (gtk_expander_buildable_init):
    * gtk/gtkfontsel.c:
    (gtk_font_selection_dialog_buildable_interface_init),
    (gtk_font_selection_dialog_buildable_get_internal_child):
    * gtk/gtkframe.c: (gtk_frame_buildable_init),
    (gtk_frame_buildable_add):
    * gtk/gtkiconview.c: (gtk_icon_view_buildable_init),
    (gtk_icon_view_buildable_custom_tag_start),
    (gtk_icon_view_buildable_custom_tag_end):
    * gtk/gtkliststore.c: (gtk_list_store_buildable_init),
    (list_store_start_element), (list_store_end_element),
    (list_store_text), (gtk_list_store_buildable_custom_tag_start),
    (gtk_list_store_buildable_custom_tag_end):
    * gtk/gtkmain.c:
    * gtk/gtknotebook.c: (gtk_notebook_buildable_init),
    (gtk_notebook_buildable_add):
    * gtk/gtksizegroup.c: (gtk_size_group_buildable_init),
    (size_group_start_element),
    (gtk_size_group_buildable_custom_tag_start),
    (gtk_size_group_buildable_custom_finished):
    * gtk/gtktreestore.c: (gtk_tree_store_buildable_init),
    (tree_model_start_element),
    (gtk_tree_store_buildable_custom_tag_start),
    (gtk_tree_store_buildable_custom_finished):
    * gtk/gtktreeview.c: (gtk_tree_view_buildable_init),
    (gtk_tree_view_buildable_add):
    * gtk/gtktreeviewcolumn.c: (gtk_tree_view_column_buildable_init):
    * gtk/gtkuimanager.c: (gtk_ui_manager_buildable_init),
    (gtk_ui_manager_buildable_add),
    (gtk_ui_manager_buildable_construct_child),
    (gtk_ui_manager_buildable_custom_tag_start),
    (gtk_ui_manager_buildable_custom_tag_end):
    * gtk/gtkwidget.c: (gtk_widget_get_type),
    (gtk_widget_buildable_interface_init),
    (gtk_widget_buildable_set_name), (gtk_widget_buildable_get_name),
    (gtk_widget_buildable_set_property),
    (gtk_widget_buildable_parser_finshed), (accel_group_start_element),
    (gtk_widget_buildable_custom_tag_start),
    (gtk_widget_buildable_custom_finshed):
    * gtk/gtkwindow.c: (gtk_window_buildable_interface_init),
    (gtk_window_buildable_set_property),
    (gtk_window_buildable_parser_finished):
    * tests/Makefile.am:
    * tests/buildertest.c: (builder_new_from_string), (test_parser),
    (signal_normal), (signal_after), (signal_object),
    (signal_object_after), (signal_first), (signal_second),
    (signal_extra), (signal_extra2), (test_connect_signals),
    (test_uimanager_simple), (test_domain), (test_translation),
    (test_sizegroup), (test_list_store), (test_tree_store),
    (test_types), (test_spin_button), (test_notebook),
    (test_construct_only_property), (test_children),
    (test_child_properties), (test_treeview_column), (test_icon_view),
    (test_combo_box), (test_combo_box_entry), (test_cell_view),
    (test_dialog), (test_accelerators), (test_widget), (main):

    Add GtkBuilder, fixes #172535


svn path=/trunk/; revision=18141
2007-06-15 17:53:46 +00:00
Matthias Clasen
b80b526080 Require gtk-doc 1.6, for signal and property links.
2007-05-26  Matthias Clasen  <mclasen@redhat.com>

        * configure.in: Require gtk-doc 1.6, for signal and property links.
        * gtk/gtkbox.c:
        * gtk/gtkbutton.c:
        * gtk/gtkcontainer.c:
        * gtk/gtkdialog.c:
        * gtk/gtkentry.c:
        * gtk/gtkimage.c:
        * gtk/gtklabel.c:
        * gtk/gtkmisc.c:
        * gtk/gtksettings.c:
        * gtk/gtkwidget.c: Documentation improvements, link signals
        and properties where it makes sense.

svn path=/trunk/; revision=17924
2007-05-26 06:59:36 +00:00
Matthias Clasen
f8794cccca Improve consistency of signal and property names 2006-07-06 05:14:03 +00:00
Christian Persch
847d09cc9f Set default action area spacing to HIG-compliant 6px. Bug #345106,
2006-06-18  Christian Persch  <chpe@cvs.gnome.org>

	* gtk/gtkdialog.c: (gtk_dialog_class_init): Set default action area
	spacing to HIG-compliant 6px. Bug #345106, follow-up from bug #163850.
2006-06-20 11:39:07 +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
Federico Mena Quintero
4ce475bd07 Don't make this conditional on having a GTK_RESPONSE_CANCEL button -> end
2006-04-26  Federico Mena Quintero  <federico@novell.com>

	* gtk/gtkdialog.c (gtk_dialog_close): Don't make this conditional
	on having a GTK_RESPONSE_CANCEL button -> end the idiocy.  Fixes
	bug #101293.
2006-04-26 20:33:18 +00:00
Matthias Clasen
04eceaf621 Use the slice allocator for many small allocations.
2006-01-04  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkaccelmap.c:
	* gtk/gtkactiongroup.c:
	* gtk/gtkdialog.c:
	* gtk/gtkfilesystemunix.c:
	* gtk/gtkgc.c:
	* gtk/gtkkeyhash.c:
	* gtk/gtkplug.c:
	* gtk/gtktextiter.c:
	* gtk/gtktextlayout.c:
	* gtk/gtkuimanager.c:
	* gtk/gtkwidget.c:
	* gtk/gtkwindow.c:
	* gtk/gtkxembed.c: Use the slice allocator for many small
	allocations.

	* gtk/gtkcolorsel.c:
	* gtk/gtktreeview.c: Use IPN.

	* gtk/gtkwidget.c: Remove an unused field from the AccelPath
	struct.
2006-01-04 07:06:12 +00:00
Matthias Clasen
168ad4bc79 Add a gtk-label-select-on-focus setting. (gtk_label_grab_focus): And use
2005-12-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c (gtk_label_class_init): Add a gtk-label-select-on-focus
	setting.
	(gtk_label_grab_focus): And use it here to select the contents of
	the label when appropriate.
	(gtk_label_class_init): Use the same keybindings for select all/
	unselect all as GtkEntry and GtkTextView.

	* gtk/gtkdialog.c (gtk_dialog_map): When looking for the initial
	focus, avoid leaving a selection in a label.
2005-12-26 07:02:51 +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
f4bbe8f0de Also intern static strings passed to g_object_set_data() 2005-08-31 17:58:55 +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
cbd1435c88 When using gtk_dialog_run() for modal dialogs, make sure to inherit the
2005-08-15  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserdefault.c: When using gtk_dialog_run() for
	modal dialogs, make sure to inherit the window group from
	the parent, since we don't inherit window groups across
	transient parents currently.  (#312918, Christian Persch)

	* gtk/gtkmessagedialog.c (gtk_message_dialog_new):
	* gtk/gtkdialog.c (gtk_dialog_run): Slight update to the docs.
2005-08-15 18:17:01 +00:00
Matthias Clasen
2430a4018b Make this function public. (#170748, Morten Welinder)
2005-05-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtk.symbols:
	* gtk/gtkdialog.h:
	* gtk/gtkdialog.c (gtk_dialog_get_response_for_widget):
	Make this function public.  (#170748, Morten Welinder)
2005-05-03 04:44:53 +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
c43673f17f Some cleanups to the GtkDialog code: (#170746, Morten Welinder) Simplify,
2005-03-23  Matthias Clasen  <mclasen@redhat.com>

	Some cleanups to the GtkDialog code:  (#170746,
	Morten Welinder)
	* gtk/gtkdialog.c (action_widget_activated): Simplify,
	use _gtk_dialog_get_response_for_widget.
	(gtk_dialog_add_action_widget): Use the correct signal
	id for non-buttons.
	(gtk_dialog_set_response_sensitive):
	(gtk_dialog_set_default_response): Use get_response_data.
	(gtk_dialog_run): Don't disconnect the signals if the
	dialog was destroyed while running.
2005-03-23 14:03:43 +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
602d233229 Don't try to focus the default_widget if there is none. (#169881, Thomas
2005-03-10  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkdialog.c (gtk_dialog_map): Don't
	try to focus the default_widget if there is
	none.  (#169881, Thomas Leonard)
2005-03-11 04:28:13 +00:00
Matthias Clasen
52711c24e8 More canonical property names. 2005-03-09 06:15:13 +00:00
Matthias Clasen
357c4aa3bf Don't loop forever here, even if the only focusable widgets are labels.
2005-01-20  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkdialog.c (gtk_dialog_map): Don't loop forever
	here, even if the only focusable widgets are labels.
2005-01-20 19:53:58 +00:00
Matthias Clasen
31feb29bdf Some clarification regarding modality. (#112903, Dave Bordoley)
2005-01-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkdialog.c (gtk_dialog_run): Some clarification
	regarding modality.  (#112903, Dave Bordoley)
2005-01-03 17:40:36 +00:00
Matthias Clasen
6603a0868d Provide a non-varargs variant of gtk_dialog_set_alternative_button_order()
2004-11-20  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkdialog.h:
	* gtk/gtkdialog.c (gtk_dialog_set_alternative_button_order_from_array):
	Provide a non-varargs variant of gtk_dialog_set_alternative_button_order()
	for language bindings.  (#158798, John Finlay)
2004-11-21 04:55:37 +00:00
Matthias Clasen
e18bbad7d7 Fix the doc formatting.
2004-10-25  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkdialog.c (gtk_dialog_set_alternative_button_order): Fix the
	doc formatting.

	* gtk/gtkcellview.[hc]: Make function parameter names consistent.
2004-10-25 15:53:46 +00:00
Matthias Clasen
8ab4fd4526 Add a public setting for button ordering (#74669, Owen Taylor)
2004-10-25  Matthias Clasen  <mclasen@redhat.com>

	Add a public setting for button ordering (#74669, Owen Taylor)

	* gtk/gtksettings.c (gtk_settings_class_init): Add a
	gtk-alternative-button-order setting.

	* gtk/gtkdialog.h:
	* gtk/gtkdialog.c (gtk_alternative_dialog_button_order): A
	getter for the alternative button order setting.
	* gtk/gtkdialog.c (gtk_dialog_set_alternative_button_order):
	New function to install an alternative button order for a
	dialog.

	* gtk/gtkfilesel.c (gtk_file_selection_init):
	* gtk/gtkfontsel.c (gtk_font_selection_dialog_init):
	* gtk/gtkmessagedialog.c (gtk_message_dialog_add_buttons):
	* gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init):
	* gtk/gtkfilechooserdefault.c (location_popup_handler):
	Set up an alternative button order.
2004-10-25 05:43:29 +00:00
Matthias Clasen
57a61d6f9f Skip selectable labels when looking for the initial focus widget.
2004-09-29  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkdialog.c (gtk_dialog_map): Skip selectable labels when
	looking for the initial focus widget.

	* gtk/gtklabel.c (gtk_label_focus): Remove to put selectable labels
	in the regular focus chain again.
2004-09-29 05:04:31 +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
Federico Mena Quintero
edf8e6f580 Don't ignore the return value of gtk_widget_activate().
2004-03-12  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkwindow.c (gtk_window_activate_focus): Don't ignore the
	return value of gtk_widget_activate().
	(gtk_window_activate_default): Likewise.  Fixes #137008.

	* gtk/gtkfilechooserdialog.c (response_cb): Act on positive
	response IDs we recognize, rather than bailing out on cancellation
	ones.  Fixes #136237; patch by Olivier Andrieu
	<oliv__a@users.sourceforge.net>.
	(file_chooser_widget_file_activated): If the dialog doesn't have a
	default widget, try to find a suitable response widget on our own.
	People should *really* be using gtk_dialog_set_default_response(),
	but this is to help lazy programmers.

	* gtk/gtkdialog.c (_gtk_dialog_get_response_for_widget): New
	internal function.
	(get_response_data): Add a "create" argument so that we don't
	unconditionally create the response data.
2004-03-12 20:38:54 +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
Federico Mena Quintero
d08dd112cc Fix #68938.
2004-02-03  Federico Mena Quintero  <federico@ximian.com>

	Fix #68938.

	* gtk/gtkdialog.c (GtkDialogPrivate): New private structure for
	GtkDialog; right now it only contains an ignore_separator field.
	(gtk_dialog_class_init): Register the private structure.
	(gtk_dialog_init): Initialize the priv->ignore_separator field.
	(_gtk_dialog_set_ignore_separator): New private function.
	(gtk_dialog_set_has_separator): Ignore the setting if appropriate.

	* gtk/gtkmessagedialog.c (gtk_message_dialog_class_init): Add a
	use_separator style property.
	(gtk_message_dialog_style_set): Change the dialog's separator
	based on the style property.
	(gtk_message_dialog_init): Set the dialog box to ignore the
	separator setting.
2004-02-03 19:46:43 +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
Federico Mena Quintero
69c2585f0d Sigh, revert the change.
2003-12-15  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkdialog.c: Sigh, revert the change.
2003-12-15 22:03:15 +00:00
Federico Mena Quintero
7054ddccd8 Removed. (gtk_dialog_close): Don't call dialog_has_cancel(). At least
2003-12-15  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkdialog.c (dialog_has_cancel): Removed.
	(gtk_dialog_close): Don't call dialog_has_cancel().  At least
	allows sane behavior for #101293.
2003-12-15 21:47:50 +00:00
Owen Taylor
6669d0c581 Some fixes for modal hint setting based on a patch from Arvind Samptur
Sun Dec 15 18:47:30 2002  Owen Taylor  <otaylor@redhat.com>

	Some fixes for modal hint setting based on a patch
	from Arvind Samptur (#100416)

	* gtk/gtkdialog.c (gtk_dialog_run): Call gtk_window_set_modal
	before showing the window for efficiency.

	* gtk/gtkwindow.c (gtk_window_realize): Ignore the EWMH
	constraint that the transient-for hint must always be
	set on windows with the modal hint and just always set
	the modal hint.

	* gtk/gtkwindow.c (gtk_window_set_modal): Update the
	modal hint on the GdkWindow when the window is realized.
2002-12-16 00:05:26 +00:00
Chema Celorio
c7c9ec32d5 minor coding style fix.
Sat Dec 14 01:51:05 2002  Chema Celorio  <chema@celorio.com>

	* gtk/gtkdialog.c (gtk_dialog_add_buttons_valist): minor coding
	style fix.
2002-12-14 16:54:08 +00:00
Owen Taylor
59f712ad5f Change the Escape key binding to only close if the dialog contains a
Fri Dec 13 18:57:20 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkdialog.c: Change the Escape key binding to only close
        if the dialog contains a cancel button.  (Patch from
        James Willcox, #74221)
2002-12-14 00:14:54 +00:00
Owen Taylor
5e17ddfb11 Remove code to grab the focus here, it is no longer needed since we focus
Mon Nov 25 12:34:44 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkdialog.c (gtk_dialog_set_default_response):
        Remove code to grab the focus here, it is no longer
        needed since we focus a widget on map, and can cause
        harm. (#99048, Daniel Elstner)
2002-11-25 17:45:32 +00:00
Soeren Sandmann
a130f089ca Documentation fixes.
Sun Oct 13 18:50:14 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtkmenu.c, gtkmenu.sgml, gtkitemfactory.c, gdkwindow.c,
	gtkwindow.c, gtkpaned.sgml, gtkdialog.c, gtkbox.h, gtkbutton.sgml,
	gtktreemodel.sgml,gtktable.sgml, gtktable.c:

	Documentation fixes.

	#85719, #90759, #95169, Owen Taylor;
	#89221, Yao Zhang, Matthias Clasen;
	#95592, Joost Faassen;
	#92637, Vitaly Tishkov;
	#94616, Ben Martin;
	#94772, sbaillie@bigpond.net.au;
2002-10-13 17:17:14 +00:00
Manish Singh
f18d5d3510 Deprecation cleanup
Fri Oct 11 15:56:20 2002  Manish Singh  <yosh@gimp.org>

        * gtk/gtkaccellabel.[ch] gtk/gtkaccessible.[ch] gtk/gtkbutton.[ch]
        gtk/gtkcheckbutton.[ch] gtk/gtkcolorseldialog.[ch] gtk/gtkdialog.[ch]
        gtk/gtkhandlebox.[ch] gtk/gtkinputdialog.[ch] gtk/gtkmessagedialog.[ch]
        gtk/gtktearoffmenuitem.[ch] gtk/gtktogglebutton.[ch]: Deprecation
        cleanup
2002-10-11 22:57:11 +00:00
Owen Taylor
ef33adff83 Add a 'type' parameter, make public.
Thu Oct  3 14:13:33 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkevents.c (gdk_event_new): Add a 'type'
        parameter, make public.

        * gdk/gdkevents.c (gdk_event_copy): Copy the screen.

        * gdk/gdkevents.c gdk/linux-fb/gdkmain-fb.c
        gdk/x11/gdkevents-x11.c gdk/win32/gdkevents-win32.c:
        _gdk_event_new() => gdk_event_new().

        * gdk/win32/gdkevents-win32.c (real_window_procedure):
        Fix event_private->screen breakage that results from evil
        encapsulation breakage here.

        * gtk/gtkclist.c gtk/gtkcombo.c gtk/gtkcontainer.c
        gtk/gtkdialog.c gtk/gtkdnd.c gtk/gtkdrawingarea.c
        gtk/gtkimcontextsimple.c gtk/gtklist.c gtk/gtkmenu.c
        gtk/gtknotebook.c gtk/gtkplug.c gtk/gtkselection.c
        gtk/gtktext.c gtk/gtktreeitem.c gtk/gtktreeview.c
        gtk/gtkviewport.c gtk/gtkwindow-decorate.c gtk/gtkwindow.c
        tests/testgtk.c: Remove most usage of stack-allocated
        GdkEvent structures.

        * gtk/gtktreeview.c: Use a cut-and-paste of the full
        send_focus_event() from gtkwindow.c that does the necessary
        notification of the ::has-focus property and setting of
        the HAS_FOCUS flag.x

        * gtk/gtkdnd.c: Clean up some mess/duplicated code; removing
        an extraneous use of a GdkEvent.
2002-10-03 20:53:30 +00:00
Owen Taylor
bf09470d79 Fix some cases where signal connection IDs where being assigned to guint
Wed Jul 10 14:27:14 2002  Owen Taylor  <otaylor@redhat.com>

        * modules/input/gtkimcontextxim.c gtk/gtkcolorsel.c
        gtk/gtkdialog.c gtk/gtktextbtree.c: Fix some cases
        where signal connection IDs where being assigned to
        guint rather than gulong. (part of #87281, Shivram U)
2002-07-10 18:30:23 +00:00
Matthias Clasen
1f75708d5a s/<!>/<!-- -->/g throughout the documentation to bring the produced
* gtk/gtkitemfactory.c:
	* gtk/gtkiconfactory.c:
	* gtk/gtkwidget.c:
	* gtk/gtkstyle.c:
	* gtk/gtkrc.c:
	* gtk/gtktreeviewcolumn.c:
	* gtk/gtkdialog.c:
	* gtk/gtktreemodel.c: s/<!>/<!-- -->/g throughout the
	documentation to bring the produced Docbook closer to XML.

	* gdk/tmpl/rgb.sgml:
	* gdk/tmpl/general.sgml:
	* gtk/tmpl/gtktogglebutton.sgml:
	* gtk/tmpl/gtkaccellabel.sgml:
	* gtk/tmpl/gtkradiobutton.sgml:
	* gtk/tmpl/gtktreemodel.sgml:
	* gtk/tmpl/gtkwidget.sgml:
	* gtk/tmpl/gtkimage.sgml:
	* gtk/tmpl/gtktooltips.sgml:
	* gtk/tmpl/gtksignal.sgml:
	* gtk/tmpl/gtkcombo.sgml:
	* gtk/tmpl/gtkdnd.sgml:
	* gtk/tmpl/gtksocket.sgml:
	* gtk/tmpl/gtkdrawingarea.sgml:
	* gtk/tmpl/gtkobject.sgml:
	* gtk/tmpl/gtkpaned.sgml:
	* gtk/tmpl/gtkmain.sgml: s/<!>/<!-- -->/g throughout the
	documentation to bring the produced Docbook closer to XML.
2002-04-18 22:04:46 +00:00
Owen Taylor
2a9af2ff42 Try to make sure that we have some focused widget on map. (#50339)
Wed Jan 30 13:55:59 2002  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwindow.c (gtk_window_show): Try to make
	sure that we have some focused widget on map. (#50339)

	* gtk/gtkdialog.c (gtk_dialog_map): Handling picking
	a focus widget here differently so that if a
	response button gets picked, it's the default one.

	* tests/testgtk.c (make_message_dialog): Set the
	default response for the dialogs.
2002-01-30 18:58:31 +00:00
Matthias Clasen
c1808baa01 Doc typo fix. (#68172)
* gtk/gtksocket.c (gtk_socket_get_id): Doc typo fix. (#68172)

        * gtk/gtktreemodel.c (gtk_tree_path_is_descendant): Fix docs.

        * gtk/gtktreemodel.c (gtk_tree_model_rows_reordered): Document.

        * gtk/gtkwindow.c (gtk_window_remove_accel_group): Fix docs.

        * gtk/gtkrc.c (gtk_rc_get_style_by_paths),
        gtk/gtkwidget.c (gtk_widget_get_toplevel,
        gtk_widget_push_composite_child), gtk/gtkdialog.c
        (gtk_dialog_new_with_buttons, gtk_dialog_run): Keep gtk-doc
        from messing up the indentation of inline examples.

        * gtk/gtkmain.c, gtk/gtkrc.c: Consistently call g_getenv()
        instead of getenv().

        * gtk/gtktreemodel.c, gtk/gtkaccelgroup.c, gtk/gtkclipboard.c,
        gtk/gtkdnd.c, gtk/gtkiconfactory.c, gtk/gtkrc.c,
        gtk/gtkstyle.c, gtk/gtkselection.c: Doc fixes.

        * gtk/gtkaccelmap.c (gtk_accel_map_add_filter,
        gtk_accel_map_foreach_unfiltered, gtk_accel_map_load_scanner):
        Document.

        * gtk/tmpl/gtksocket.sgml: Mention gtk_socket_get_id()
        instead of GTK_WINDOW_XWINDOW().  (#68172)

        * gtk/gtk-sections.txt: Move functions which are documented
        as "private" or "internal" into Private subsections.

        * gtk/tmpl/gtkdnd.sgml, gtk/tmpl/gtkobject.sgml,
        gtk/tmpl/gtkrc.sgml, gtk/tmpl/gtktooltips.sgml,
        gtk/tmpl/gtkwidget.sgml, gtk/tmpl/gtkclipboard.sgml,
        gtk/tmpl/gtkstyle.sgml, gtk/tmpl/gtkselection.sgml,
        gtk/tmpl/gtkfeatures.sgml: Minor markup fixes.

        * gtk/tmpl/gtksignal.sgml: Add link to GLib signal docs.

        * gtk/tmpl/gtkpreview.sgml, gtk/tmpl/gtktext.sgml,
        gtk/tmpl/gtktree.sgml: Remove "deprecated" from short desc.

        * gtk/tmpl/gtkrc.sgml: Correct names of default RC files.
2002-01-08 00:04:57 +00:00
James Henstridge
99ce496b97 s/<!>/<!-- -->/ to make the doc valid with both SGML and XML.
2001-12-24  James Henstridge  <james@daa.com.au>

        * gtk/gtkdialog.h (doc comment): s/<!>/<!-- -->/ to make the doc
        valid with both SGML and XML.
2001-12-24 01:34:29 +00:00
Matthias Clasen
fc4a6b955d Markup fixes.
* gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.

        * gdk-pixbuf-io.c: Markup fixes.

        * gdk-pixbuf/tmpl/scaling.sgml, gdk/tmpl/fonts.sgml,
        gdk/tmpl/general.sgml, gdk/tmpl/rgb.sgml, gdk/tmpl/visuals.sgml,
        gdk/tmpl/windows.sgml, gtk/gtk-docs.sgml, gtk/tmpl/gtkaccellabel.sgml,
        gtk/tmpl/gtkcombo.sgml, gtk/tmpl/gtkdialog.sgml,
        gtk/tmpl/gtkdrawingarea.sgml, gtk/tmpl/gtkeditable.sgml,
        gtk/tmpl/gtkfilesel.sgml, gtk/tmpl/gtkfontseldlg.sgml,
        gtk/tmpl/gtkimage.sgml, gtk/tmpl/gtkmain.sgml, gtk/tmpl/gtkmenu.sgml,
        gtk/tmpl/gtkmessagedialog.sgml, gtk/tmpl/gtkobject.sgml,
        gtk/tmpl/gtkpaned.sgml, gtk/tmpl/gtkradiobutton.sgml,
        gtk/tmpl/gtkrc.sgml, gtk/tmpl/gtkscale.sgml, gtk/tmpl/gtksignal.sgml,
        gtk/tmpl/gtksocket.sgml, gtk/tmpl/gtkspinbutton.sgml,
        gtk/tmpl/gtktogglebutton.sgml, gtk/tmpl/gtksignal.sgml,
        gtk/tmpl/gtktooltips.sgml, gtk/tmpl/gtkwindow.sgml,
        gdk/tmpl/regions.sgml, gtk/tmpl/gtkfontsel.sgml,
        gtk/tmpl/gtkpixmap.sgml, gtk/tmpl/gtkprogress.sgml,
        gtk/tmpl/gtkselection.sgml, gtk/tmpl/gtktable.sgml,
        gtk/tmpl/gtktipsquery.sgml: Markup fixes (mainly examples).
2001-12-13 19:51:24 +00:00
Owen Taylor
e4be2240b7 Rename the GTK_DESTROYED flag to GTK_IN_DESTRUCTION, remove the
Sun Nov 18 19:47:29 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkobject.h docs/Changes-2.0.txt: Rename the
	GTK_DESTROYED flag to GTK_IN_DESTRUCTION, remove the
	GTK_OBJECT_DESTROYED() check macro.

	* gtk/gtkbindings.c (gtk_bindings_activate): Remove
	instances of GTK_OBJECT_DESTROYED() that weren't
	needed any more.

	* gtk/gtkdialog.c: Exchange use of GTK_OBJECT_DESTROYED
	for a connection to ::destroy.
2001-11-19 01:08:51 +00:00
Owen Taylor
a036c6e59f Make gtkmarshal.list/gtkmarshal.h only for compatibility with GTK+-1.2;
Sat Nov 17 18:26:45 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/Makefile.am gtk/gtkmarshal.list gtk/gtkmarshalers.list
	gtk/*.c gtk/gtksignal.h: Make gtkmarshal.list/gtkmarshal.h
	only for compatibility with GTK+-1.2; and deprecate it;
	put all marshalers we actually use into gtkmarshalers.list
	and use the _gtk_marshal_ prefix for these marshalers.
2001-11-17 23:28:51 +00:00
Matthias Clasen
79e4b185f6 Mass fixing of trivial doc bugs. (#63544, #57007, #64141, #63472, #57108,
* gtk/gtkiconfactory.c, gtk/gtktextbuffer.c, gtk/gtktreemodel.c,
        gtk/gtkwindow.c, gtk/gtknotebook.c, gtk/gtkradiobutton.c,
        gtk/gtktextiter.c, gtk/gtkdialog.c: Mass fixing of trivial doc bugs.
        (#63544, #57007, #64141, #63472, #57108, #60818, #61562)

        * gtk/tmpl/gtkaccellabel.sgml, gtk/tmpl/gtkcombo.sgml,
        gtk/tmpl/gtkentry.sgml, gtk/tmpl/gtkhscrollbar.sgml,
        gtk/tmpl/gtkvscrollbar.sgml, gtk/tmpl/gtktoolbar.sgml,
        gtk/tmpl/gtkdialog.sgml, gtk/tmpl/gtkstatusbar.sgml:
        Mass fixing of trivial doc bugs. (#55579, #56760, #58769, #55918,
        #64154, #60422, #54697)
2001-11-10 22:06:44 +00:00
Darin Adler
966fc7ed0e Add g_return_if_fail.
* gtk/gtkdialog.c: (gtk_dialog_set_response_sensitive),
	(gtk_dialog_set_default_response): Add g_return_if_fail.
2001-11-07 18:12:25 +00:00
Matt Wilson
bc0d15aba7 remove totally broken unused, non-compiling, static function.
2001-11-02  Matt Wilson  <msw@redhat.com>

	* gtk/gtkdialog.c (find_child_by_response_id): remove totally
	broken unused, non-compiling, static function.
2001-11-02 14:49:37 +00:00
Owen Taylor
78fa1576e6 Iterate through children of the action area, not of the vbox. (#58278,
Fri Nov  2 08:17:06 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkdialog.c (gtk_dialog_set_response_sensitive):
	Iterate through children of the action area, not of
	the vbox. (#58278, Sergey Kuzminov)
2001-11-02 13:20:17 +00:00
Owen Taylor
ea77d8d7dd Automatically set set dialogs to GTK_WIN_POS_CENTER_ON_PARENT. (#60554)
Thu Sep 20 15:10:30 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkdialog.c (gtk_dialog_init): Automatically set
	set dialogs to GTK_WIN_POS_CENTER_ON_PARENT. (#60554)
2001-09-20 19:16:03 +00:00
Havoc Pennington
9ddcb3e07e default xscale/yscale to 0.0, not 0.5, 0.5 isn't useful
2001-09-08  Havoc Pennington  <hp@pobox.com>

	* gtk/gtkalignment.c (gtk_alignment_class_init): default
	xscale/yscale to 0.0, not 0.5, 0.5 isn't useful

	* tests/testtextbuffer.c: fix usage of gtk_text_iter_spew

	* gtk/gtktextiter.c: fix docs
	(gtk_text_iter_spew): get rid of this

	* gtk/gtklayout.c: docs

	* gtk/gtkbutton.c (gtk_button_construct_child): add an alignment
	to center image and label together, instead of having image on
	left and label centered, patch/suggestion from Jacob

	* gtk/gtkdialog.c: docs

2001-09-08  Havoc Pennington  <hp@pobox.com>

	* gtk/tmpl/gtklayout.sgml: docs

	* gdk-pixbuf/gdk-pixbuf.sgml: remove the section on compiling
	gdk-pixbuf since it isn't a standalone package anymore

	* gtk/building.sgml: section on compiling GTK itself
2001-09-08 19:33:06 +00:00
Owen Taylor
991a7188ed Rename gtk_container_children() to gtk_container_get_children. Added
Thu Aug 23 19:33:54 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkcontainer.[ch]: Rename gtk_container_children()
	to gtk_container_get_children. Added deprecated compatibility
	macro.	(Suggested by Vitaly Tishkov, #59051)

	* gtk/gtktoolbar.c gtkdialog.c: Fix gtk_container_children()
	calls.
2001-08-23 23:38:32 +00:00
Owen Taylor
4e2b60ac4d Patch from Matthias Clasen to remove remove all instances of
Wed Jul 18 19:28:46 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/*.c: Patch from Matthias Clasen to remove remove
	all instances of g_return_if_fail (foo != NULL); that are
	immediately before a g_return_if_fail (GTK_IS_FOO (foo));
	since the second check catches the NULL anyways.
2001-07-18 23:39:26 +00:00
Owen Taylor
b613a74cb2 Fix idles and timeouts to be properly surrounded by
Wed Jul 18 18:23:05 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkbutton.c gtk/gtkentry.c gtk/gtkmenu.c gtk/gtktextview.c
	gtktreeview.c: Fix idles and timeouts to be properly surrounded by
	GDK_THREADS_ENTER()/LEAVE() pairs.

	* gtk/gtkdialog.c gtk/gtkclipboard.c: Surround calls
	to g_main_loop_run() with GDK_THREADS_LEAVE()/ENTER()
	pairs. (Problem found by M. Meeks)
2001-07-18 22:43:41 +00:00
Owen Taylor
0b6c3f5497 Patch from Gregory Merchan to add gtk_button_box_set_secondary(), which
Thu Jul  5 21:53:46 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkbbox.[ch] gtk/gtkbox.[ch] gtk/gtk[hv]bbox.c:
	Patch from Gregory Merchan to add
	gtk_button_box_set_secondary(), which separates
	the child into a separate group from the normal
	buttons. (#56331)

	* gtk/gtkdialog.c: Make help buttons secondary by
	default.

	* gtk/gtkbbox.c: Added a child property "secondary".

	* gtk/testgtk.c: Turn on the help button for the
	color selector to check that it properly appears
	as secondary.
2001-07-06 02:10:32 +00:00
Havoc Pennington
0bee26c7ba Clip the retrieved image data to the screen, using a server grab to avoid
2001-06-28  Havoc Pennington  <hp@pobox.com>

	* gdk/x11/gdkimage-x11.c (_gdk_x11_get_image): Clip the retrieved
	image data to the screen, using a server grab to avoid race
	conditions.

	* gtk/gtkitemfactory.c (gtk_item_factory_create_item): remove
	check for NULL return from gtk_image_new_from_stock(), it never
	returns NULL.
	(gtk_item_factory_create_item): fix bug where we parsed the stock
	ID as an inline pixbuf

	* gtk/gtktext.c (gtk_text_key_press): numeric keypad support

	* gtk/gtkspinbutton.c (gtk_spin_button_key_press): numeric keypad
	support (should be using binding set here)

	* gtk/gtkoptionmenu.c (gtk_option_menu_key_press): numeric keypad
	support (should be using binding set here)

	* gtk/gtkmenushell.c (gtk_menu_shell_class_init): numeric keypad
	support

	* gtk/gtkmenu.c (gtk_menu_class_init): numeric keypad support

	* gtk/gtkmenubar.c (gtk_menu_bar_class_init): numeric keypad

	* gtk/gtklistitem.c (gtk_list_item_class_init): numeric keypad

	* gtk/gtkimcontextsimple.c
	(gtk_im_context_simple_filter_keypress): keypad

	* gtk/gtkfilesel.c (gtk_file_selection_key_press): keypad

	* gtk/gtkentry.c (gtk_entry_class_init): numeric keypad fixes

	* gtk/gtkctree.c (gtk_ctree_class_init): numeric keypad support

	* gtk/gtkcolorsel.c (palette_activate): keypad support (of course,
	should be binding-setted)

	* gtk/gtkwindow.c (gtk_window_class_init): numeric keypad fixes

	* gtk/gtkclist.c (gtk_clist_class_init): numeric keypad fixes

	* gtk/gtkcalendar.c: numeric keypad fixes

	* gtk/gtktextview.c (gtk_text_view_class_init): numeric keypad
	support

	* gdk/gdkwindow.c (gdk_window_get_clip_region): fix infinite loop
	screwup

	* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable_alpha):
	clip the render area to the drawable's clip region in advance,
	so we don't get data from the server that we don't need.

	* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable_alpha):
	check return value of gdk_pixbuf_get_from_drawable(), fall back
	to bilevel alpha if we can't get the pixbuf to composite against.

	* gdk/gdkdraw.c (gdk_drawable_get_image): set the image colormap

	* gdk/gdkimage.c (gdk_image_get_colormap): add
	gdk_image_set_colormap, gdk_image_get_colormap

	* gdk/gdkpixbuf-drawable.c (rgbconvert): Change all converters to
	take a region of the image, instead of converting the entire
	image.

	* gtk/gtkwidget.h (struct _GtkWidgetClass): add show_help
	keybinding signal. Add default bindings for it. Add default
	handler for show_help that shows the tooltip for the widget.

	* gtk/gtkdialog.c (gtk_dialog_class_init): add binding set and
	"close" keybinding signal, remove key press handler.

	* gtk/gtktooltips.c (gtk_tooltips_set_colors): Just remove this,
	it's not our usual practice to leave a deprecated function around
	with a runtime warning, plus we don't want it to appear in docs,
	plus if we make them yellow no one will want to change them
	anyhow.
2001-06-29 01:59:02 +00:00
Havoc Pennington
87684f9549 get sizes an icon set can render without falling back to missing image
2001-05-25  Havoc Pennington  <hp@redhat.com>

	* gtk/gtkiconfactory.c (gtk_icon_set_get_sizes): get sizes an icon
	set can render without falling back to missing image icon

	* gtk/gtktextview.c (gtk_text_view_size_request): request full
	size of text, instead of random values

	* gtk/gtktreeview.c (gtk_tree_view_size_request): request full
	size of tree view, instead of random values

	* gtk/gtkiconfactory.c (gtk_icon_set_render_icon): render fallback
	image in an appropriate size

        * gtk/gtkstock.h: Rename the stock items including _BUTTON_,
	etc. not to include that. i.e. s/GTK_STOCK_BUTTON_OK/GTK_STOCK_OK/

        Throughout: fix GTK_STOCK_BUTTON_ instances

	* gtk/gtkstock.h, gtk/gtkstock.c, gtk/gtkiconfactory.h,
	gtk/gtkiconfactory.c, gtk/stock-icons/Makefile.am:
	Add a bunch of new stock items/icons

	* gtk/gtktreeview.c (gtk_tree_view_insert_column_with_data_func):
	new function, convenience for inserting columns with a data func

	* gtk/gtkiconfactory.c: keep a list of all existing icon factories
	(_gtk_icon_factory_list_ids): use list of all factories to
	generate a list of all known IDs

	* gtk/gtkstock.c (gtk_stock_list_ids): replace
	gtk_stock_list_items() with a function that returns all IDs known
	including those for GtkIconFactory.
2001-05-25 20:41:46 +00:00
Owen Taylor
2d372c4053 Add an extra parameter use_text to gtk_paint_label() to deal with
Mon Apr 30 19:18:07 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkstyle.[ch] gtk/gtkaccellabel.c gtk/gtkcellrenderertext.c
	  gtk/gtkhruler.c gtk/gtkhscale.c gtk/gtklabel.c gtk/gtkprogressbar.c
	  gtk/gtkvruler.c gtk/gtkvscale.c: Add an extra parameter
          use_text to gtk_paint_label() to deal with style->bg[] vs style->text[].

	* gtk/gtkbbox.c gtk/gtkdialog.c: Tweak padding some to deal
	  with GtkWidget::interior_focus = TRUE better.

	* gtk/gtkbutton.c

	* gtk/gtkwidget.c (gtk_widget_style_get_valist): Remove
	G_VALUE_NO_COPY_CONTENTS, to correspond with the recent
	change that had to be made with g_object_get.
2001-04-30 23:23:54 +00:00
Havoc Pennington
b84d2f1234 handle 0-height empty/invisible lines.
2001-04-21  Havoc Pennington  <hp@pobox.com>

	* gtk/gtktextdisplay.c (gtk_text_layout_draw): handle 0-height
	empty/invisible lines.

	* gtk/gtktextiter.c (gtk_text_iter_set_visible_line_offset)
	(gtk_text_iter_set_visible_line_index): new functions to set
	indexes excluding invisible text

	* gtk/gtktextlayout.c (line_display_iter_to_index): get visible
	index

	* gtk/gtktextiter.c (gtk_text_iter_get_visible_line_index)
	(gtk_text_iter_get_visible_line_offset): new functions to
	get indexes excluding invisible text

	* gtk/gtkmessagedialog.c (gtk_message_dialog_init): strip out a
	bunch of extra padding that served no purpose

	* gtk/gtkdialog.c: Make all the spacings configurable via style
	properties, for chubbiness configuration in themes

	* tests/testtext.c: fix path to the immodules.
2001-04-24 12:24:35 +00:00
Alexander Larsson
de5eafede2 Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and removed
2001-03-21  Alexander Larsson  <alexl@redhat.com>

        * gtk/gtkbutton.[ch]:
	* gtk/gtkdialog.c:
	Renamed gtk_button_new_stock() to gtk_button_new_from_stock() and
	removed accel_group argument. Renamed gtk_button_new_accel() to
	gtk_button_new_with_mnemonic() and removed accel_group argument.

	* gtk/gtkcheckbutton.[ch]:
	New function gtk_check_button_new_with_mnemonic().

	* gtk/gtkentry.c:
	Override activate_mnemonic and just grab focus.

	* gtk/gtkitemfactory.c:
	Don't add menu uline accel group, instead use mnemonics support.

	* gtk/gtklabel.[ch]:
	New support for mnemonics.

	* gtk/gtkmarshal.list:
	Needed BOOLEAN:BOOLEAN for activate_mnemonic.

	* gtk/gtkmenu.[c]:
	* gtkmenushell.c:
	Use mnemonics instead of accel groups for uline
	support in menu items.
	Removed gtk_menu_get_uline_accel_group() and
	gtk_menu_ensure_uline_accel_group().

	* gtk/gtkmenuitem.c:
	Override activate_mnemonic to handle switching between
	menu items if there are collisions.

	* gtk/gtknotebook.c:
	Connect to activate_mnemonic on the tab_label, so that
	activating it switches to that notebook page.

	* gtk/gtkwidget.[ch]:
	Add activate_mnemonic signal. New function
	gtk_widget_activate_mnemonic() to emit it.
	Default implementation does activate/grab_focus.

	* gtk/gtkwindow.[ch]:
	Add support for mnemonics in windows.
	New functions:
	gtk_window_add_mnemonic, gtk_window_remove_mnemonic,
	gtk_window_activate_mnemonic, gtk_window_set_mnemonic_modifier

	* gtk/testgtk.c:
	Update to function name changes.
2001-03-21 18:58:28 +00:00
Havoc Pennington
29b902a481 remove trailer (gtk_entry_set_property): remove trailer
2001-03-07  Havoc Pennington  <hp@redhat.com>

	* gtk/gtkentry.c (gtk_entry_get_property): remove trailer
	(gtk_entry_set_property): remove trailer

	* gtk/gtkentry.c (gtk_entry_set_width_chars):
	(gtk_entry_get_width_chars): new functions, to set size request to
	a given number of characters

	* gtk/testgtk.c (create_dialog): beef up the dialog test slightly

	* gtk/gtkdialog.c (gtk_dialog_set_has_separator): new function
	(gtk_dialog_get_has_separator): new function
        (run_delete_handler): fix to not emit "response" signal
	because we already did in the delete event handler installed
	at dialog creation time.

	* gtk/gtkdialog.h: add a has_separator property,
	add GTK_DIALOG_NO_SEPARATOR flag
2001-03-07 21:32:51 +00:00
Havoc Pennington
9d1e2a1323 new function, turns off decorations for a window.
2001-03-07  Havoc Pennington  <hp@redhat.com>

	* gtk/gtkwindow.c (gtk_window_set_decorated): new function, turns
	off decorations for a window.

	* demos/gtk-demo/button_box.c (create_bbox): adapt to button box
	changes

	* gtk/gtklabel.c (gtk_label_get_layout_offsets): new function
	to get location of PangoLayout inside the label, closes #51198

	* gtk/testgtk.c (create_bbox): fix up button box usage

	* gtk/testcalendar.c (create_calendar): fix up button box usage

	* gtk/gtkfilesel.c (gtk_file_selection_init): fixup buttonbox usage

	* gtk/gtkdialog.c (gtk_dialog_init): fixup buttonbox usage

	* gtk/gtkhbbox.h: deprecations

	* gtk/gtkvbbox.h: deprecations

	* gtk/gtkbox.c (gtk_box_get_spacing): new function, used to
	emulate deprecated gtk_button_box_get_spacing

	* gtk/gtkbbox.h: deprecate some useless functions, remove entirely
	the "set global default" functions
	(struct _GtkButtonBox): remove "spacing" field, use the one from
	GtkBox base class

	* gtk/gtkbbox.c (_gtk_button_box_child_requisition): rename with uscore

	* gtk/gtkiconfactory.c (gtk_icon_set_render_icon): If we fail to
	render the icon, return the missing image icon.

	* gtk/gtkimage.c (gtk_image_set_from_file): fall back to missing
	image icon if the load fails.

	* gtk/gtkstock.h (GTK_STOCK_MISSING_IMAGE): Add stock icon for use
	when no image is found; should be the Netscape "missing image"
	icon eventually but for now is a random image

	* gtk/gtkwindow.c (gtk_window_set_role): new function, sets the
	role for the session manager

	* gtk/testgtk.c (dnd_drop): remove use of GTK_WINDOW_DIALOG

	* gtk/gtkcompat.h (GTK_WINDOW_DIALOG): compat #define
	GTK_WINDOW_DIALOG GTK_WINDOW_TOPLEVEL

	* gtk/gtkenums.h (enum GtkWindowType): remove GTK_WINDOW_DIALOG
2001-03-07 21:10:44 +00:00
Owen Taylor
71aa1161b3 Add animation of activation by, on activate, pressing the button, and
Tue Mar  6 10:45:45 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkbutton.c: Add animation of activation by, on
	activate, pressing the button, and adding a timeout that
	releases the button after 250ms	or on key release and
	emits ::clicked. (#51501)

	* gtk/gtkdialog.c: Bit of a hack - for buttons in the
	action area, we connect to ::clicked instead of ::activate
	so the dialog stays up through the animation.

Mon Mar  5 16:38:15 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkmenushell.c (gtk_menu_shell_enter_notify): Only
	check the ignore_enter flag for the menu shell that
	the item is actually a child of, not for attached
	submenus. (#51536)
2001-03-06 15:51:10 +00:00
Alexander Larsson
83c3e076ef Added GdkWindowTypeHint type. Added modal_hint field to GdkWindindow. New
2001-03-05  Alexander Larsson  <alexl@redhat.com>

	* gdk/gdkwindow.h:
	Added GdkWindowTypeHint type. Added modal_hint field to GdkWindindow.
	New functions gdk_window_set_type_hint, gdk_window_set_modal_hint and
	gdk_window_set_icon_list for net wmspec functionality.

	* gdk/x11/gdkwindow-x11.c:
	Set _NEW_WM_STATE_MODAL from window->modal_hint in set_inital_hints.
	Implement gdk_window_set_type_hint, gdk_window_set_modal_hint and
	gdk_window_set_icon_list.
	Added gdk_wmspec_change_state helper function and used it in the code.
	Set _NET_WM_ICON_NAME in gdk_window_set_title and gdk_window_set_icon_name.

	* gtk/gtkdialog.c (gtk_dialog_init):
	Set GDK_WINDOW_TYPE_HINT_DIALOG.

	* gtk/gtkhandlebox.c (gtk_handle_box_realize):
	Set GDK_WINDOW_TYPE_HINT_TOOLBAR.

	* gtk/gtkwindow.c:
	new function gtk_window_set_type_hint.
	On realize, set type hint and modal hint.

	* gtk/gtkwindow.h:
	Added type_hint field and gtk_window_set_type_hint.
2001-03-05 15:09:02 +00:00
Owen Taylor
bcb6720d6e Remove spurious const.
Sat Mar  3 13:32:47 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkimmodule.c (gtk_im_module_init): Remove spurious
	const.

	* gdk-pixbuf-2.0.pc.in gtk+-2.0.pc.in: Fix include path.

	* gtk/gtkdialog.c (gtk_dialog_set_default_response): If there
	is no focus widget for the dialog currently, grab the focus as well
	as the default.

	* gtk/gtkdialog.c (gtk_dialog_set_default_response): Get
	the action area's children to iterate through, not the
	dialog's children.
2001-03-03 18:39:33 +00:00
Havoc Pennington
637c61da76 handle case where there are no rows in the model
2001-01-09  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktreeview.c (gtk_tree_view_check_dirty): handle case where
	there are no rows in the model

	* gtk/gtkliststore.c (gtk_list_store_iter_children): if parent is
	NULL, then return the start of the list

	* gtk/gtktreeview.c (gtk_tree_view_setup_model): don't build tree
	if we can't get any rows from an empty model

	* gtk/gtktreeviewcolumn.h (struct _GtkTreeViewColumn): remove
	extraneous * after function pointer typedef usage

	* Makefile.am: don't specify full path to cp and rm

	* gtk/gtkcellrenderertextpixbuf.c
	(gtk_cell_renderer_text_pixbuf_get_size): check width/height !=
	NULL before dereferencing, fixes a segfault that happened from
	time to time

	* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_render):
	use gdk_pixbuf_render_to_drawable_alpha() to get alpha channel,
	and reindent the function
	(gtk_cell_renderer_pixbuf_get_size): indentation

	* gtk/gtkdialog.c (gtk_dialog_run): destroy main loop only after
	we quit it
	(gtk_dialog_add_buttons_valist): add g_return_if_fail
	(gtk_dialog_set_default_response): New function, to set default
	button
	(gtk_dialog_set_response_sensitive): New function, to set
	sensitivity of buttons

	* gtk/gtkcellrendererpixbuf.c
	(gtk_cell_renderer_pixbuf_get_property): allow getting a NULL pixbuf
	(gtk_cell_renderer_pixbuf_set_property): allow setting a NULL pixbuf

	* gtk/gtktreedatalist.c (_gtk_tree_data_list_node_to_value):
	handle any G_TYPE_OBJECT subclass, not just the base class, and
	also boxed types.
	(_gtk_tree_data_list_value_to_node): ditto

	* gtk/gtkrbtree.c: Run _gtk_rbtree_test at strategic points if
	--gtk-debug=tree

	* gtk/gtkmain.c: add GTK_DEBUG_TREE

	* gtk/gtkdebug.h: add GTK_DEBUG_TREE
2001-01-09 17:45:34 +00:00
Tim Janik
2c9eb3a572 doh, this was broken beyond believe.
Tue Dec 12 23:46:44 2000  Tim Janik  <timj@gtk.org>

	* gtk/stock-icons/Makefile.am: doh, this was broken beyond believe.

	* gtk/gtkbox.c: change property types from (u)long to (u)int for
	::position and ::padding.

	* gtk/gtkcontainer.c: make ::border_width an INT property.

	* gtk/gtkpacker.c: make ::position an INT property.

	* gtk/gtkscrolledwindow.c (gtk_scrolled_window_adjustment_changed):
	guard against NULL h/v scrollbars, since this is used at construction
	time.

	* gtk/gtkclist.[hc]: nuked gtk_clist_construct(), implemented
	internal gtk_clist_constructor().

	* gtk/gtkctree.[hc]: nuked gtk_ctree_construct(), implemented
	gtk_ctree_constructor().

	* gtk/gtkprogressbar.c (gtk_progress_bar_class_init): property
	::pulse_step should use ARG_PULSE_STEP, not ARG_FRACTION.

	* docs/reference/Makefile.am: fun stuff, disabled docs generation
	again, gtk-scan.c needs to introspec paramspecs, not GtkAgs.

	* gtk/gtkwidget.[hc]:
	removed gtk_widget_setv(), gtk_widget_getv(), gtk_widget_newv()
	and gtk_widget_get().
	(gtk_widget_new): use g_object_new_valist().
	(gtk_widget_set): use g_object_set_valist().

	* gtk/gtkobject.[hc]:
	removed gtk_object_arg_get_info(), gtk_object_getv(),
	gtk_object_query_args(), gtk_object_newv(),
	gtk_object_class_add_signals(),
	gtk_object_class_user_signal_new(),
	gtk_object_class_user_signal_newv(),
	gtk_object_arg_set(), gtk_object_arg_get(),
	gtk_object_args_collect(),
	gtk_object_default_construct(),
	gtk_object_constructed(),
	GTK_CONSTRUCTED and GTK_OBJECT_CONSTRUCTED().
	removed nsignals, signals and n_args members from GtkObjectClass.
	(gtk_object_new): use g_object_new_valist().
	(gtk_object_set): use g_object_set_valist().
	(gtk_object_get): use g_object_get_valist().

	* gtk/gtkcompat.h: define gtk_object_default_construct().

	* gtk/gtktypeutils.c (gtk_type_new): create constructed objects via
	g_object_new().

	* gtk/*.c: removed gtk_object_class_add_signals() from class_init()
	fucntions, cleaned up method assignments (make sure your structures
	are setup properly before calling out). removed all GTK_CONSTRUCTED
	hacks ;)
2000-12-13 01:34:41 +00:00
Havoc Pennington
73a00eeb44 fix bug where GC didn't always get updated properly
2000-11-13  Havoc Pennington  <hp@redhat.com>

	* gtk/gtktextdisplay.c (gtk_text_render_state_update): fix bug
	where GC didn't always get updated properly

	* demos/gtk-demo/textview.c (create_tags): Use subattributes
	of fonts instead of setting the entire font

	* gtk/testtext.c (fill_example_buffer): Use "size" instead of
	setting entire font

	* gtk/gtkdialog.c (gtk_dialog_add_button): Fix some warnings

	* gtk/gtktexttag.h, gtk/gtktexttag.c: Explode font_desc into
	a bunch of individually-settable font attributes. You can still
	use the "font" and "font_desc" args, they just set all the font
	attributes at once.
2000-11-14 01:08:28 +00:00