Commit Graph

23 Commits

Author SHA1 Message Date
Matthias Clasen
c8830f2504 Use G_GNUC_NULL_TERMINATED where appropriate. (#165682, Marc Meissner)
2005-03-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkwidget.h:
	* gtk/gtktreeview.h:
	* gtk/gtktreeviewcolumn.h:
	* gtk/gtktextbuffer.h:
	* gtk/gtkobject.h:
	* gtk/gtkfilechooserdialog.h:
	* gtk/gtkdialog.h:
	* gtk/gtkcontainer.h:
	* gtk/gtkcelllayout.h:
	* gtk/gtkaboutdialog.h: Use G_GNUC_NULL_TERMINATED where
	appropriate.  (#165682, Marc Meissner)
2005-03-08 05:52:55 +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
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
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
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
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
jacob berkman
f1bbefb45b switch vbox and action_area back to the order that 2.0 has
2002-08-16  jacob berkman  <jacob@ximian.com>

	* gtk/gtkdialog.h (struct _GtkDialog): switch vbox and action_area
	back to the order that 2.0 has
2002-08-16 19:04:54 +00:00
Soren Sandmann
77eee887f3 Minor documentation fixes
2002-08-10  Soren Sandmann  <sandmann@daimi.au.dk>

	* docs/reference/gtk/tree_widget.sgml,
	docs/reference/gtk/tmpl/gtkdialog.sgml,
	docs/reference/gtk/tmpl/gtkentry.sgml,
	docs/reference/gtk/tmpl/gtkfilesel.sgml,
	docs/reference/gtk/tmpl/gtkfontsel.sgml,
	docs/reference/gtk/tmpl/gtkfontseldlg.sgml,
	docs/reference/gtk/tmpl/gtktreemodel.sgml,
	docs/reference/gtk/tmpl/gtkwidget.sgml, gdk/x11/gdkdisplay-x11.c,
	gtk/gtkbbox.c, gtk/gtkbox.c, gtk/gtkbutton.c, gtk/gtkcellrenderer.c,
	gtk/gtkcellrendererpixbuf.c, gtk/gtkcellrenderertext.c,
	gtk/gtkcheckmenuitem.c, gtk/gtkcontainer.c, gtk/gtkcurve.c,
	gtk/gtkdialog.h, gtk/gtkentry.c, gtk/gtkfilesel.c, gtk/gtkfontsel.c,
	gtk/gtkframe.c, gtk/gtkhandlebox.c, gtk/gtkiconfactory.c,
	gtk/gtkimage.c, gtk/gtkinvisible.c, gtk/gtkitemfactory.c,
	gtk/gtklabel.c, gtk/gtklayout.c, gtk/gtkmenu.c, gtk/gtkprogress.c,
	gtk/gtkprogressbar.c, gtk/gtkscrolledwindow.c, gtk/gtksizegroup.c,
	gtk/gtktable.c, gtk/gtktextiter.c, gtk/gtktexttag.c,
	gtk/gtktexttag.h, gtk/gtktextview.c, gtk/gtktogglebutton.c,
	gtk/gtktoolbar.c, gtk/gtktreemodel.c, gtk/gtktreeselection.c,
	gtk/gtktreestore.c, gtk/gtktreeview.c, gtk/gtktreeviewcolumn.c,
	gtk/gtkviewport.c, gtk/gtkwidget.c, gtk/gtkwidget.h,
	gtk/gtkwindow.c:

	Minor documentation fixes

	(#89254, patch from Brett Nash;
	 #85809, patch from daten@dnetc.org;
	 #76391, patch from Ross Burton;
	 #74559, Manuel Clos;
	 #73569, #72005, Alexey A. Malyshev;
	 #70061, patch from Dennis Bj"orklund;
	 #64566, #63388, #58328, #57499, #81007, #77349, Vitaly Tishkov;
	 #78932, Vitaly Tishkov, patch from Ross Burton;
	 #73306)
2002-08-10 09:55:41 +00:00
Owen Taylor
e5d1ea8cfe Massive padding addition to class structures.
Sat Feb 23 11:54:12 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/*.h gdk/*.h: Massive padding addition to class structures.

        * gtk/gtktextmark.h: Fix a FIXME about G_CONST_RETURN.
2002-02-23 20:22:05 +00:00
Havoc Pennington
5c6ef7990c fix GtkDialogFlags to have the right values, reported by Jeff Franks
2001-12-30  Havoc Pennington  <hp@pobox.com>

	* gtk/gtkdialog.h (GtkDialogFlags): fix GtkDialogFlags to have
	the right values, reported by Jeff Franks
2001-12-31 04:43:07 +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
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
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
Havoc Pennington
69f42512fa Derive from GtkDialog, and use stock buttons. Should be 100% source
2000-11-02  Havoc Pennington  <hp@redhat.com>

	* gtk/gtkfilesel.h, gtk/gtkfilesel.c: Derive from GtkDialog, and
	use stock buttons. Should be 100% source compatible, appropriate
	filesel fields now point to dialog->vbox and dialog->action_area.
	On the bizarre side, dialog->action_area and filesel->action_area
	are not the same widget.
	(gtk_file_selection_init): Put some padding around the selection
	entry, so it isn't touching the GtkDialog separator.

	* gtk/gtkfontsel.h, gtk/gtkfontsel.c: Derive from GtkDialog,
	use stock buttons, etc. Should also be source compatible.
	Set the dialog default title in _init not _new().

	* gtk/gtkcolorseldialog.c (gtk_color_selection_dialog_init):
	Use stock buttons; don't put a button box inside the existing
	dialog button box. Don't bother with push/pop colormap anymore.

	* gtk/gtkdialog.h (GtkResponseType): Add a bunch of more
	specific GTK_RESPONSE_* values. This is clearer than ACCEPT/REJECT
	for message dialog, and necessary for the font selection and color
	selection with help and apply buttons.

	* gtk/gtkdialog.c (gtk_dialog_add_button): Return a pointer
	to the created button widget. Set GTK_CAN_DEFAULT on the button.
	(gtk_dialog_init): Default to GTK_BUTTONBOX_END, put less spacing
	between buttons, put less padding around the action area.
	(gtk_dialog_run): Exit on unmap rather than on destroy.
	This will also exit the loop if the widget is hidden.
	(gtk_dialog_delete_event_handler): Use GTK_RESPONSE_DELETE_EVENT
	instead of GTK_RESPONSE_NONE; since we're already adding a bunch
	of GTK_RESPONSE_* stuff, this seems cleaner, and lets you
	special-case delete event.

	* gtk/gtktexttagtable.c, gtk/gtktextview.c: Fix doc comment
	formatting
2000-11-06 16:44:01 +00:00
Havoc Pennington
1c9f0c0bac create some stock buttons with the default accel group (create_image):
2000-10-04  Havoc Pennington  <hp@redhat.com>

	* gtk/testgtk.c (create_buttons): create some stock buttons
	with the default accel group
	(create_image): test some new GtkImage features
	(make_message_dialog): test GtkMessageDialog
	(create_modal_window): fix someone's bizzarro indentation

        * gtk/gtkwindow.h, gtk/gtkwindow.c: Implement
	GTK_WIN_POS_CENTER_ON_PARENT.
	Add "destroy with parent" setting, which means the window goes
	away with its transient parent.
	(gtk_window_get_default_accel_group): get the default accel group
	for the window.
	(gtk_window_set_destroy_with_parent): set/unset destroy with
	parent flag
	(gtk_window_read_rcfiles): invalidate icon set caches
	after reloading rcfiles

	* gtk/gtkenums.h (GtkWindowPosition): add
	GTK_WIN_POS_CENTER_ON_PARENT, which centers a dialog
	on its parent window when the dialog is mapped for the first time.

        * gtk/gtkmessagedialog.h, gtk/gtkmessagedialog.c: Add
	a simple message dialog class

	* gtk/gtkdialog.c (gtk_dialog_init): Connect delete event
	handler to emit response signal, and maybe later it would
	honor a hide_on_delete flag - though that isn't there yet.
	Set border width on the vbox to 2, so we get some padding.
	Use a button box for the action area.
	(gtk_dialog_key_press): synthesize a delete event if Esc
	is pressed and the GtkWidget key press handler didn't
	handle the escape key.
	(gtk_dialog_new_with_buttons): new function creates a dialog
	with some default buttons in it.
	(gtk_dialog_add_action_widget): add an activatable widget
	as a button in the dialog - you can also add a non-activatable
	widget by accessing the action area directly.
	(gtk_dialog_add_button): add a simple button - stock ID or
	label - to the action area
	(gtk_dialog_response): emit response signal
	(gtk_dialog_run): block waiting for the dialog, return
	the response. Override normal delete_event behavior, so that
	delete_event does nothing inside gtk_dialog_run().

	* gtk/gtkdialog.h, gtk/gtkdialog.c: Add "response" signal
	emitted when an action widget is clicked or the dialog gets
	delete_event

	* gtk/gtk.h: add gtkmessagedialog.h

	* gtk/Makefile.am: add gtkmessagedialog.[hc]

2000-10-20  Havoc Pennington  <hp@redhat.com>

	* gtk/gtk-sections.txt: Add dialog docs
2000-10-20 23:14:41 +00:00
Elliot Lee
0176b387c8 Use G_GNUC_CONST.
Use G_GNUC_CONST.
2000-08-30 00:33:38 +00:00
Tim Janik
afee2c67c5 applied patch from Andreas Persenius <ndap@swipnet.se> that updates the
Wed Jul 26 12:59:31 2000  Tim Janik  <timj@gtk.org>

        * *.[hc]: applied patch from Andreas Persenius <ndap@swipnet.se> that
        updates the license headers to the GNU Lesser General Public License,
        as well as updating the copyright year to 2000.
2000-07-26 11:33:08 +00:00
Tim Janik
ef03cb5287 s/refcount/ref_count/.
Sun Feb 13 08:54:45 2000  Tim Janik  <timj@gtk.org>

        * gdk/gdkcursor.h (struct _GdkCursor): s/refcount/ref_count/.
        * gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap):
        * gdk/x11/gdkcursor-x11.c (_gdk_cursor_destroy):
        * gdk/gdkcursor.c (gdk_cursor_ref): insert assertments for the
        parameters given and cursor->ref_count. coding style fixups.

        * gtk/gtksocket.c (gtk_socket_class_init): parent class is GtkContainer,
        not GtkWidget.

        * gtk/*.h: applied patch from Mathieu Lacage <lacage@email.enst.fr> to
        fix up widget macros and add _GET_CLASS() variant.

        * gtk/*.c: some GtkType fixups.
2000-02-13 08:16:48 +00:00
CST 1999 Shawn T. Amundson
279e878bdd Added notice to look in AUTHORS and ChangeLog files for a list of changes.
Wed Feb 24 01:22:39 CST 1999 Shawn T. Amundson <amundson@gtk.org>

        * *.[ch]: Added notice to look in AUTHORS and ChangeLog files
	  for a list of changes.
1999-02-24 07:37:18 +00:00
Tim Janik
3322a264e0 removed all occourances of #pragma } and #pragma { which were in place to
Wed Oct  7 05:15:36 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtk*.h:
        * gdk/gdk.h: removed all occourances of #pragma } and #pragma {
        which were in place to fixup emacs' cc-mode indentation.
        putting (c-set-offset 'inextern-lang 0) into ~/.emacs is the
        proper way to achive this and doesn't produce problems for
        stupid pragma-related compiler bugs. ;)
1998-10-07 04:21:19 +00:00
Tim Janik
a91be9352f macro and GtkType fixups.
Tue Jul 14 11:41:38 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkdialog.h:
        * gtk/gtkseparator.h:
        * gtk/gtkhseparator.h:
        * gtk/gtkvseparator.h: macro and GtkType fixups.
1998-07-14 16:34:48 +00:00
PDT 1998 Shawn T. Amundson
92006c8e78 Changed LGPL address for FSF in all .h and .c files
Sun Apr 12 18:54:29 PDT 1998 Shawn T. Amundson <amundson@gtk.org>

        * Changed LGPL address for FSF in all .h and .c files
1998-04-13 02:02:47 +00:00
Elliot Lee
9508b76bd2 Initial revision 1997-11-24 22:37:52 +00:00