Commit Graph

127 Commits

Author SHA1 Message Date
Johan Dahlin
71e9be7e6d Use G_OBJECT_WARN_INVALID_PROPERTY_ID consistently. Fixes #5075
2008-01-06  Johan Dahlin  <johan@gnome.org>

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

svn path=/trunk/; revision=19311
2008-01-06 03:28:40 +00:00
Paolo Borelli
540569dadb Use gtk_text_buffer_get_insert instead of get_mark. Fixes Bug 497164.
2007-11-17  Paolo Borelli  <pborelli@katamail.com>

	* gtk/gtktextbuffer.c:
	* gtk/gtktextlayout.c:
	* gtk/gtktextview.c:
	Use gtk_text_buffer_get_insert instead of get_mark. Fixes Bug 497164.


svn path=/trunk/; revision=18997
2007-11-17 10:18:13 +00:00
Yevgen Muntyan
abad58b003 new functions _gtk_text_btree_get_insert() and
2007-11-15  Yevgen Muntyan  <muntyan@tamu.edu>

	* gtk/gtktextbtree.h:
	* gtk/gtktextbtree.c: new functions _gtk_text_btree_get_insert()
	and _gtk_text_btree_get_selection_bound() (#497102).
	* gtk/gtktextbuffer.c (gtk_text_buffer_get_insert),
	(gtk_text_buffer_get_selection_bound): use them here instead of
	hash table lookup.


svn path=/trunk/; revision=18996
2007-11-15 17:03:09 +00:00
Owen Taylor
5072e43bb2 Allow the ::delete-range handler to delete text after the text it was
2007-10-28  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktextbuffer.c (gtk_text_buffer_delete_interactive): Allow
        the ::delete-range handler to delete text after the text it was
        explicitly asked to delete without confusing us as to whether
        we're currently on an editable or not-editable segment.
        (#491207)

svn path=/trunk/; revision=18951
2007-10-28 22:27:15 +00:00
Matthias Clasen
d8e3fc2be7 Formatting fixes.
2007-05-25  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktextmark.c:
        * gtk/gtktextbuffer.c: Formatting fixes.



svn path=/trunk/; revision=17923
2007-05-26 04:39:23 +00:00
Matthias Clasen
6ac30db004 Allow to separate GtkTextMark creation from buffer insertion. (#132818,
2007-05-25  Matthias Clasen  <mclasen@redhat.com>

        Allow to separate GtkTextMark creation from buffer insertion.
        (#132818, Gustavo Giráldez, patch by Yevgen Muntyan)

        * gtk/gtktextmarkprivate.h:
        * gtk/gtktextmark.[hc] (gtk_text_mark_new): New function to
        create a GtkTextMark.

        * gtk/gtktextbuffer.[hc] (gtk_text_buffer_add_mark): New
        function to add an existing mark to a buffer.

        * gtk/gtktextbtree.c: Allow adding existing marks.

        * gtk/gtk.symbols: Add new functions.

        * tests/testtextbuffer.c: Add some tests for new mark
        functionality.


svn path=/trunk/; revision=17922
2007-05-26 04:10:42 +00:00
Matthias Clasen
82ce59cd0f Remove unnecessary NULL checks before g_free(). (#369666, Morten Welinder,
2007-03-09  Matthias Clasen <mclasen@redhat.com>

        * Everywhere: Remove unnecessary NULL checks before
        g_free().  (#369666, Morten Welinder, Djihed Afifi)

        * configure.in: Check for ftw.h



svn path=/trunk/; revision=17444
2007-03-09 21:57:37 +00:00
Matthias Clasen
5b1283ba4c Add signal documentation. (#317064, Søren Wedel Nielsen)
2006-12-20  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktextbuffer.c: Add signal documentation.  (#317064,
        Søren Wedel Nielsen)
2006-12-20 21:18:27 +00:00
Matthias Clasen
7d5ca7dd46 fix the build 2006-10-08 14:09:39 +00:00
Matthias Clasen
07e7719441 Apply a cleanup patch by Kjartan Maraas (#341812)
2006-10-08  Matthias Clasen  <mclasen@redhat.com>

	* Apply a cleanup patch by Kjartan Maraas  (#341812)
2006-10-08 05:07:55 +00:00
Matthias Clasen
67a6f37ef6 fix a sylpheed crash 2006-09-08 20:02:45 +00:00
Paolo Borelli
2bca4a48d0 make sure the has-selection property is updated when the delection is
2006-08-17  Paolo Borelli  <pborelli@katamail.com>

	* gtk/gtktextbuffer.c: make sure the has-selection property is
	updated when the delection is deleted. Bug #329752
	* tests/testtext.c: add a copy menu item and show how to
	update its sensitivity tracking the has-selection property.
2006-08-17 01:12:02 +00:00
Matthias Clasen
113f364a37 More of the same 2006-05-14 04:25:34 +00:00
Matthias Clasen
b44fcd55dd Add a :cursor-position property. (#334412, Yevgen Muntyan) `
2006-05-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextbuffer.c (gtk_text_buffer_class_init): Add a :cursor-position
	property.  (#334412, Yevgen Muntyan)
`
2006-05-09 04:44:53 +00:00
Matthias Clasen
f26aad1916 Boilerplate reduction 2006-05-02 23:56:43 +00:00
Michael Natterer
7e15674cd9 keep a reference to the source buffer while the clipboard contents buffer
2006-04-28  Michael Natterer  <mitch@imendio.com>

	* gtk/gtktextbuffer.c (create_clipboard_contents_buffer): keep a
	reference to the source buffer while the clipboard contents buffer
	exists, because it is needed for serializing the contents buffer.
	Makes copying from the contents buffer possible even after the
	resp. text view is destroyed (for example when there is a
	clipboard manager running on app exit) (bug #339195).
2006-04-28 12:13:04 +00:00
Matthias Clasen
2f24913cb5 fix another Coverity bug. 2006-04-16 04:45:02 +00:00
Matthias Clasen
f9d99fe6ed Another leak 2006-03-26 06:15:51 +00:00
Michael Natterer
6c1d990adc Add infrastructure for copy/paste and DND of rich text for GtkTextBuffer.
2006-03-07  Michael Natterer  <mitch@imendio.com>

	Add infrastructure for copy/paste and DND of rich text for
	GtkTextBuffer. Fixes bug #324177.

	* gtk/gtktextbufferrichtext.[ch]: new files implementing a
	per-buffer registry of rich text formats.

	* gtk/gtk.h: #include gtktextbufferrichtext.h

	* gtk/gtktextbufferserialize.[ch]: new files implementing an
	internal serialization format that can handle all of a text
	buffer's tags and pixbufs. It's not useful for anything except
	tranfer between instances of GtkTextBuffer (Anders Carlsson).

	* gtk/Makefile.am: build the new files.

	* gtk/gtkclipboard.[ch]: added convenience APIs for rich text,
	just as they exist for plain text and pixbufs.

	* gtk/gtkselection.[ch]: added rich text convenience APIs here
	too.  Return the target list from gtk_target_list_ref(). Register
	GtkTargetList as boxed type. Added
	gtk_target_table_new_from_list() and gtk_target_table_free(),
	which make converting between GtkTargetList and arrays of
	GtkTargetEntry considerably easier.

	* gtk/gtktextutil.[ch]: added _gtk_text_util_create_rich_drag_icon()
	which creates a fancy rich text icon (Matthias Clasen).

	* gtk/gtktextbuffer.[ch]: use all the new stuff above and
	implement copy and paste of rich text. Added APIs for getting the
	target lists used for copy and paste. Added public enum
	GtkTextBufferTargetInfo which contains the "info" IDs associated
	with the entries of the target lists.

	* gtk/gtktextview.c: use the new rich text APIs and
	GtkTextBuffer's new target list API to enable DND of rich text
	chunks.

	* gtk/gtk.symbols: export all the new symbols added.

	* tests/testtext.c: added rich text testing stuff.
2006-03-07 13:46:11 +00:00
Matthias Clasen
9e40d57cbe Fix the last commit 2005-12-09 17:26:26 +00:00
Matthias Clasen
4669a053d7 Unref the buffer when freeing the RequestData. (#323577)
2005-12-09  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktextbuffer.c (paste_from_buffer): Unref the buffer
        when freeing the RequestData.  (#323577)
2005-12-09 16:05:55 +00:00
Matthias Clasen
b863d24089 Add a has-selection property 2005-10-07 03:38:57 +00:00
Matthias Clasen
463aab93dd Various cleanups. (#315360, Kjartan Maraas)
2005-09-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/*.c: Various cleanups.  (#315360, Kjartan Maraas)
2005-09-13 19:57:42 +00:00
Matthias Clasen
af89d145f7 Use gdk_atom_intern_static_string() where appropriate.
* gtk/*.c:  Use gdk_atom_intern_static_string() where
	appropriate.
2005-09-11 05:48:27 +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
Johan Dahlin
6675c29a7d Add GtkTextBuffer::text (#172631)
* gtk/gtktextbuffer.c: (gtk_text_buffer_class_init),
    (gtk_text_buffer_set_property), (gtk_text_buffer_get_property),
    (gtk_text_buffer_set_text): Add GtkTextBuffer::text (#172631)
2005-04-04 23:29:53 +00:00
Matthias Clasen
70d788c71e Some trivial doc fixes.
2005-04-04  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextbuffer.c: Some trivial doc fixes.
2005-04-04 21:15:41 +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
269d89c79c Define macros GTK_PARAM_READABLE, GTK_PARAM_WRITABLE, GTK_PARAM_READWRITE
2005-03-21  Matthias Clasen  <mclasen@redhat.com>

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

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

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

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

	* gtk/gtktextbuffer.c (gtk_text_buffer_backspace): Revalidate the
	iter.  (#156924, Murray Cumming)
2004-11-01 19:57:13 +00:00
Matthias Clasen
d5f92150d4 Fix many sparse warnings. 2004-10-28 15:00:05 +00:00
Anders Carlsson
98e2b9ea62 Rewrite clipboard handling so that the clipboard contents won't be freed
2004-10-26  Anders Carlsson  <andersca@imendio.com>

	* gtk/gtktextbuffer.c: (gtk_text_buffer_finalize),
	(create_clipboard_contents_buffer), (clipboard_get_contents_cb),
	(clipboard_clear_contents_cb), (cut_or_copy):
	Rewrite clipboard handling so that the clipboard contents won't be
	freed when the text buffer is finalized. Also add clipboard manager support.
	Fixes #95496.
2004-10-26 16:37:54 +00:00
Owen Taylor
ad955c8196 ri Oct 22 13:25:25 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtktextbuffer.c (gtk_text_buffer_backspace): Fix
        backspacing on the empty last line of a buffer
        (https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=136840,
        Dan Williams)
2004-10-22 17:30:43 +00:00
Owen Taylor
e0ad07e0b4 #155952
Thu Oct 21 15:01:09 2004  Owen Taylor  <otaylor@redhat.com>

        #155952

        * gtk/gtkentry.c: Fix checking the wrong position for
        the backspace_deletes_character PangoLogAttr.

        * gtk/gtktextbuffer.[ch] gtk/gtk.symbols (gtk_text_buffer_backspace):
        Move backspace logic from GtkTextView to here, check
        backspace_deletes_char.

        * gtk/gtktextview.c: Use gtk_text_buffer_backspace().
2004-10-21 19:13:17 +00:00
Matthias Clasen
3612aee585 Add hidden aliases for exported symbols which are used internally in order
Mon Aug  9 12:48:04 2004  Matthias Clasen  <maclas@gmx.de>

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

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

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

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

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

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

	* gtk/*.c: Include gtkalias.h
2004-08-09 16:59:53 +00:00
Matthias Clasen
37b90cc7d1 Update clipboards. (#142805, Mikael Hallendal)
Sat Jul 10 22:13:53 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktextbuffer.c (gtk_text_buffer_select_range): Update
	clipboards.  (#142805, Mikael Hallendal)
2004-07-11 02:20:01 +00:00
Owen Taylor
fe3558c786 Revert last change; it causes problems for pastes from other applications;
Sat Mar 13 10:34:03 2004  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktextview.c gtk/gtktextbuffer.c: Revert last change;
        it causes problems for pastes from other applications; see
        comments in bugzilla for #81880.
2004-03-13 15:37:18 +00:00
Matthias Clasen
fff3885193 Fix middle button pasting in the TextView (#81880, reported by Evert
Sat Mar 13 02:55:51 2004  Matthias Clasen  <maclas@gmx.de>

	Fix middle button pasting in the TextView  (#81880, reported
	by Evert Verhellen, patch by Paolo Borelli):

	* gtk/gtktextview.c (gtk_text_view_button_press_event): Retrieve
	the insert mark and move the cursor to it making sure of also
	scroll the window if needed.

	* gtk/gtktextbuffer.c (pre_paste_prep): Move the insert mark
	to the insertion point.
2004-03-13 01:54:04 +00:00
Federico Mena Quintero
80581c3011 Fixes #136082 and #135265, patch by Morten Welinder.
2004-03-05  Federico Mena Quintero  <federico@ximian.com>

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

	* configure.in: Use AC_SYS_LARGEFILE.

	* */*.c: #include <config.h>
2004-03-06 03:38:59 +00:00
Matthias Clasen
a6e4e43c05 Document some peculiarities of the ::delete_range signal. (#132135, Grant
Wed Feb 18 02:03:47 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktextbuffer.c (gtk_text_buffer_class_init): Document some
	peculiarities of the ::delete_range signal.  (#132135, Grant Gayed)
2004-02-18 01:05:41 +00:00
Matthias Clasen
07d4d314b6 The first part of the fix for #114351 (see also gdk-pixbuf/ChangeLog and
Fri Jan 16 23:59:01 2004  Matthias Clasen  <maclas@gmx.de>

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

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

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

	* po/Makefile.in.in: Add --keyword=P_ to the xgettext
	invocation, since property blurbs and nicks are
	now marked with P_().
2004-01-16 23:10:05 +00:00
Matthias Clasen
913e6e9ea9 Document.
2003-04-13  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktreeviewcolumn.c
	(gtk_tree_view_column_cell_get_position): Document.

	* gtk/gtktextbuffer.c (gtk_text_buffer_select_range):
	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_[sg]et_expand):
	* gtk/gtkbutton.c (gtk_button_[sg]et_focus_on_click): Document
	these as 2.4 additions.
2003-04-12 22:25:21 +00:00
Manish Singh
dd74be94c6 demos/gtk-demo/main.c demos/gtk-demo/tree_store.c gdk/x11/gdkscreen-x11.c
Thu Feb 27 17:44:24 2003  Manish Singh  <yosh@gimp.org>

        * demos/gtk-demo/main.c
        * demos/gtk-demo/tree_store.c
        * gdk/x11/gdkscreen-x11.c
        * gtk/gtkcellrenderertoggle.c
        * gtk/gtkcolorsel.c
        * gtk/gtkdnd.c
        * gtk/gtkeditable.c
        * gtk/gtkentry.c
        * gtk/gtkmenu.c
        * gtk/gtkmenubar.c
        * gtk/gtkmenuitem.c
        * gtk/gtkmenushell.c
        * gtk/gtkrc.c
        * gtk/gtksettings.c
        * gtk/gtkstyle.c
        * gtk/gtktextbuffer.c
        * gtk/gtktextview.c
        * gtk/gtktreeviewcolumn.c
        * tests/testgtk.c
        * tests/testtext.c
        * tests/testtreeedit.c
        * tests/testtreefocus.c
        * tests/testtreeview.c: remove unnecessary G_OBJECT() casts.
2003-02-28 01:45:51 +00:00
Matthias Clasen
bc70dc94bf Implement a utility function proposed in #102534:
2003-01-06  Matthias Clasen  <maclas@gmx.de>

	Implement a utility function proposed in #102534:

	* gtk/gtktextbtree.h:
	* gtk/gtktextbtree.c (_gtk_text_btree_select_range): New function.
	(_gtk_text_btree_place_cursor): Now a simple wrapper around
	_gtk_text_btree_select_range().

	* gtk/gtktextbuffer.h:
	* gtk/gtktextbuffer.c (gtk_text_buffer_select_range): New function.
	(gtk_text_buffer_place_cursor): Now a simple wrapper around
	gtk_text_buffer_select_range().
2003-01-06 22:34:23 +00:00
Matthias Clasen
713d91c73a Let the user action span the insertion and the deletion of the old
2002-12-24  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtktextbuffer.c (paste_from_buffer):
	(clipboard_text_received): Let the user action span the insertion
	and the deletion of the old selection.  (#82844)
2002-12-24 22:24:48 +00:00
Manish Singh
ac77076507 Deprecation cleanup
Thu Oct 10 14:41:05 2002  Manish Singh  <yosh@gimp.org>

        * gtk/gtktextbtree.c gtk/gtktextbuffer.c gtk/gtktextdisplay.c
        gtk/gtktextlayout.c gtk/gtktextmark.c gtk/gtktexttag.[ch]
        gtk/gtktexttagtable.c gtk/gtktextutil.c gtk/gtktextview.[ch]:
        Deprecation cleanup
2002-10-10 21:45:41 +00:00