Commit Graph

18 Commits

Author SHA1 Message Date
Owen Taylor
913831b26f Remove --g-fatal-warnings flag from argv.
Thu Jun 18 21:13:54 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkmain.c (gtk_init): Remove --g-fatal-warnings flag
	  from argv.

Thu Jun 18 20:22:28 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/genmarshal.pl: Modified to be more idiomatic Perl,
	  to be more readable perl, to spit out stuff that looks
	  more like readable C, and to pipe output through indent
	  so output looks a lot like readable C. No functional
	  changes.

Thu Jun 18 17:43:31 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkpixmap.[ch] (gtk_pixmap_set): Clear the background if
	  necessary when switching to a masked pixmap. (Based on a patch
	  from Ullrich Hafner <hafner@informatik.uni-wuerzburg.de>)

Thu Jun 18 16:18:10 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkeditable.[ch]: Added action signals for keyboard
   	  bindings. (move_cursor, kill_word, etc, etc, etc).

          removed the time argument from
	  gtk_editable_cut/copy/paste_clipboard (source but not
          binary incompatible...) Instead get time from
	  gtk_get_current_event ().

	* gtk/gtktext.c gtk/gtkentry.c: Support the new editable
	  signals.

Thu Jun 18 02:52:09 1998  Owen Taylor  <otaylor@gtk.org>

	Patches from Damon Chaplin <DAChaplin@email.msn.com>:

        gtk/gtkfontsel.h: Fixed GtkFontSelectionClass - I forgot to change
	     parent class to GtkNotebookClass when splitting the widget in
	     two.  Also updated some comments.

        gtk/gtkfontsel.c: Fixed bug when toggling 'Allow scaled bitmaps'
               button without a font selected.

             Fixed bug in set_font_name - I hadn't updated the code to
               search for the style in the font_style clist - it was
               still assuming the style row was equal to its index,
               but it isn't any more.

             Changed 'Reset' button on filter page to 'Clear Filter'.
             Deleted old code relating to the old 'Filter Fonts' toggle
             Updated some comments.
             Cleared 'Actual Fontname' if no font is set.

        gtk/testgtk.c: Fixed problem when 'OK' button is pressed - it was
	     destroying the GtkFontSelection instead of the
             GtkFontSelectionDialog.

Thu Jun 18 02:15:31 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkmain.c (gtk_init): Added --g-fatal-warnings
	  flag to make all warnings fatal errors.

	* gtk/testthreads.c: moved <pthreads.h> include inside
	  #ifdef USE_PTHREADS

Thu Jun 18 01:37:31 1998  Owen Taylor  <otaylor@gtk.org>

	* gtk/gtkenums.h gtk/gtkcontainer.[ch] gtk/gtkwidget.c
	  gtk/gtkmenu.c gtk/gtkviewport.c gtk/gtkwindow.c:

	- Added new function gtk_container_set_resize_mode() for
	  fine-grained control of where resize-queueing is done.

	- Removed GtkContainer::need_resize and GtkWindow::move_resize
	- Added GtkContainer::check_resize to replace need_resize.

	- Added function gtk_container_check_resize() to trigger
	  queued resizes, and gtk_container_resize_children() to
	  Figure which children need to be size-allocated. (logic
	  moved from gtkwindow.c)

	- Reorganized code in gtkwindow.c

	- Set the resize-mode for viewports so that resizes within
	  a viewport don't propagate out of it.
1998-06-19 01:26:24 +00:00
Tim Janik
f83d57e91b yeppers, accelerator changes to fix the gimp. commit message dedicated to
yeppers, accelerator changes to fix the gimp.
commit message dedicated to sopwith ;)

Thu Jun 18 03:30:06 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkaccellabel.h:
        * gtk/gtkaccellabel.c: new function gtk_accel_label_accelerator_width to
        request the size of the accelerator portion of an accel label.
        (gtk_accel_label_size_request): don't request for the accelerators size.
        (gtk_accel_label_expose_event): only draw the accelerator if we got
        enough extra space.

        * gtk/gtkmenuitem.c (gtk_menu_item_size_request): request accelerator
        width from children.

        * gtk/gtkmenu.c (gtk_menu_key_press): when adding an accelerator to an
        object (after removal has been requested) check if there is still an
        accelerator remaining to avoid adding two accelerators on an object.
        this can happen for locked accelerators (or accelerator-frozen widgets).
        (gtk_menu_size_request): feature childrens accelerator width in size
        requests.

        * gtk/gtknotebook.c (gtk_notebook_menu_item_create): use
        gtk_widget_freeze_accelerators() for dynamically created menu items.

        * gtk/gtksignal.h:
        * gtk/gtksignal.c: new function gtk_signal_handler_pending_by_func()
        which will return a handler_id > 0 if the specified function is pending
        for `signal_id'.

        * gtk/gtkwidget.h:
        * gtk/gtkwidget.c: remove gtk_widget_stop_accelerator, which was just
        a signal handler function to stop accelerator addition.
        added gtk_widget_freeze_accelerators and gtk_widget_thaw_accelerators
        which will prevent (undo) any accelerators from being added to or
        removed from a widget.
1998-06-18 03:22:09 +00:00
Tim Janik
a21d063ef8 new functions gtk_selection_data_copy and gtk_selection_data_free.
Tue Jun  9 01:57:23 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkselection.h:
        * gtk/gtkselection.c: new functions gtk_selection_data_copy and
        gtk_selection_data_free.

        * gtk/gtkwidget.c (gtk_widget_class_init): fixed gtk_signal_new() call
        for "selection_received", which was completely bogus.
        * other fixups to gtk_signal_new() calls all over the place.

        * gtk/gtktypebuiltins.h: types as variables (formerly macros).
        * gtk/gtktypebuiltins_vars.c: type variable implementations.
        * gtk/gtktypebuiltins_ids.c: array entries for builtin type
        declarations.
        * gtk/gtktypebuiltins_evals.c: enum value arrays.
        * gtk/gtk-boxed.defs: gtk and gdk structure definitions, used to build
        gtk.defs.
        * gtk/gtk.defs: generated file with scheme syntax for type definitions
        of gtk and gdk structures and enums.
        * gtk/gtktypeutils.h:
        * gtk/gtktypeutils.c: reworked type ids, so they are variables not
        macros anymore (this fixes binary incompatibility with new enum
        definitions).

        * gtk/gtkwidget.c (gtk_widget_real_key_press_event): proccess possible
        key bindings for this widget.
        * gtk/gtkwindow.c (gtk_window_key_press_event): chain parent class'
        handler.

        * gtk/gtkobject.h:
        * gtk/gtkobject.c: removed gtk_object_class_new_user_signal_no_recurse()
        again. new functions gtk_object_class_user_signal_new () and
        gtk_object_class_user_signal_newv (), to feature the GtkSignalRunType
        flag on the signal creation.
Mon Jun  8 20:52:21 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkcontainer.h: new signal GtkContainer::set_focus_child.
1998-06-09 07:11:55 +00:00
Tim Janik
9775962a96 new file used as template for new file to define macros indicating newly
Sat May  9 02:34:41 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkfeatures.h.in: new file used as template for
        * gtk/gtkfeatures.h: new file to define macros indicating newly
        introduced features, such as GTK_HAVE_SIGNAL_INIT.

        * gtk/gtksignal.c:
        (gtk_signal_emitv_by_name):
        (gtk_signal_emitv):
        new functions to emit signals with an already provided parameter set.
        (provided by Kenneth Albanowski <kjahds@kjahds.com>).
        (gtk_signal_real_emit): prototype changes, so this functions always
        gets its parameters and signal structure as arguments.
        (gtk_signal_emit): provide the signal structure and parameter list for
        gtk_signal_real_emit.
        (gtk_signal_emit_by_name): likewise.
1998-05-09 01:17:03 +00:00
Tim Janik
518a8a9c4e reimplemented the signal storage system to use a linear array rather than
Wed May  6 02:16:34 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtksignal.c: reimplemented the signal storage system to use a
        linear array rather than a hash table.
        be carefull *not* to keep any GtkSignal pointers across invokations
        of gtk_signal_next_and_invalidate() and therefore gtk_signal_new[v]().
        general code cleanups, made all allocations through memchunks.
        (gtk_signal_lookup): we now do the lookup of signals through a key_id
        for the signal names to avoid multiple hashing of the signal name on
        lookups for the several hirarchy levels of an object.

Tue May  5 15:33:27 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkmain.c (gtk_init): added gtk_signal_init() to avoid repeatedly
        checking for signal initialization in gtksignal.c.

        * gtk/gtktypeutils.c (TYPE_NODES_BLOCK_SIZE): reseted this to 200 after
        a long debugging period ;)

Mon May  4 00:30:11 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtktypeutils.h (GTK_TYPE_IS_A): new macro to speedup
        gtk_type_is_a().
        * gtk/gtktypeutils.c: reimplemented the type storage system to use a
        linear array rather than a hash table. it actually speeded up testgtk
        for a *considerable* amount. be carefull *not* to keep any GtkTypeNode
        pointers across invokations of gtk_type_node_next_and_invalidate() and
        therefore gtk_type_unique()!

        * gtk/gtkobject.h (GTK_IS_OBJECT_CLASS): new macro to test for the
        inheritance of a class pointer.
        (GTK_OBJECT): modifications for speedups.
        (GTK_IS_OBJECT): likewise.
        (GTK_OBJECT_CLASS): likewise.
        (suggested by owen).

        * gtk/gtkcontainer.h (GTK_IS_CONTAINER_CLASS): new macro.

        * gtk/gtkwidget.h (GTK_IS_WIDGET_CLASS): new macro.

        * gtk/gtk.defs (GtkTooltips): define GtkTooltips as object not as boxed,
        since its derivation changed 4 month ago ;(. showed up with the unique
        type name checking code in gtk_type_unique().

        * random guint->GtkType and macro fixups.
1998-05-06 01:43:56 +00:00
Tim Janik
5c9af6b5aa new function to set the adjustments value without causing a current
Sun May  3 19:45:09 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtkadjustment.c (gtk_adjustment_assimilate_value): new function
                to set the adjustments value without causing a current emission of
                        "value_changed" to be restarted.

                                * gtk/gtksignal.c: added new functions to retrive the number of
                                        existing emissions for a certain signal.
                                                (gtk_signal_n_emissions): new function.
                                                        (gtk_signal_n_emissions_by_name): new function.
1998-05-03 19:13:24 +00:00
Tim Janik
2ca03393f5 added new functions to operate on intermediate function pointers.
Sat May  2 22:33:45 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtksignal.c: added new functions to operate on intermediate
                function pointers. implemented incremental blocking.
                        (gtk_signal_disconnect_by_func): new function.
                                (gtk_signal_handler_block_by_func): new function.
                                        (gtk_signal_handler_unblock_by_func): new function
1998-05-02 20:48:49 +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
Tim Janik
d187183161 made the <widget>_signals[] arrays of type guint rather than gint. made
Mon Mar  9 15:48:10 1998  Tim Janik  <timj@gimp.org>

        * Signal signedness and naming corrections, plus GtkType fixes:

        * gtk/gtkadjustment.c:
        * gtk/gtkbutton.c:
        * gtk/gtkcheckmenuitem.c:
        * gtk/gtkclist.c:
        * gtk/gtkcolorsel.c:
        * gtk/gtkcontainer.c:
        * gtk/gtkcurve.c:
        * gtk/gtkdata.c:
        * gtk/gtkeditable.c:
        * gtk/gtkentry.c:
        * gtk/gtkhandlebox.c:
        * gtk/gtkinputdialog.c:
        * gtk/gtkitem.c:
        * gtk/gtklist.c:
        * gtk/gtkmenuitem.c:
        * gtk/gtkmenushell.c:
        * gtk/gtknotebook.c:
        * gtk/gtkstatusbar.c:
        * gtk/gtktoolbar.c:
        * gtk/gtktree.c:
        * gtk/gtktreeitem.c:
        * gtk/gtkwidget.c:
        * gtk/gtktogglebutton.c:
        * gtk/gtkwindow.c:
        made the <widget>_signals[] arrays of type guint rather than gint.
        * gtk/gtkwidget.c (gtk_widget_get_ancestor): made widget_type a GtkType.

        * gtk/gtkcombo.h:
        handler ids need to be of type guint (entry_change_id, list_change_id).

        * gtk/gtkaccelerator.c:
        changed signal_num to signal_id and typed it guint.

        * gtk/gtkmain.c: made gtk_ndebug_keys a guint.

        * gtk/gtkmenu.h:
        * gtk/gtkmenu.c:
        (gtk_menu_popup): made button a guint.
        (gtk_menu_set_active): made index a guint.

        * gtk/gtkmenuitem.h:
        * gtk/gtkmenuitem.c:
        made accelerator_signal a guint.

        * gtk/gtkoptionmenu.h:
        * gtk/gtkoptionmenu.c:
        (gtk_option_menu_set_history): made index a guint.

        * gtk/gtksignal.h:
        * gtk/gtksignal.c:
        * gtk/gtkobject.h:
        * gtk/gtkobject.c: changed a bunch of prototypes to take guints rather
        than gints. also made some conversions from guint to GtkType, left over
        from when the fundamental-types system was introduced.

        * gtk/gtkobject.h:
        * gtk/gtkobject.c: made object_data_id_index and obj_count guints.
        made *signals and nsignals guints in GtkObjectClass.
1998-03-09 15:16:28 +00:00
Owen Taylor
888470ee29 gtk/gtksignal.[ch] gtk/gtkmain.[ch] gtk/gtkcontainer.[ch]
Thu Feb 12 23:59:49 1998  Owen Taylor  <owt1@cornell.edu>

	* gtk/gtksignal.[ch] gtk/gtkmain.[ch] gtk/gtkcontainer.[ch]
	  gtk/gtkselection.[ch] gdk/gdk.[ch] gtktypeutils.h

 	  Replaced all _interp functions with _full functions.
	  (_interp functions left in for compatibility until 0.99.5).
	  Difference: _full functions take _both_ a C-language callback and a
	  marshaller, and simply ignore the C-language callback
	  if the marshaller is present. This allows the destroy notification
	  to be used without marshalling.

	  gtk_selection_add_handler[_full]() regularized to agree
	  with other callbacks.

	  Also, added gtk_input_add_full() to the header file.
	  (gtk_input_add_interp() was never there)

	* gtk/gtkmain.[ch] gtk/gtkwidget.c: Idle functions are now prioritized.
	  Added new function gtk_idle_add_priority to create
	  an idle with a specified priority (default is zero)
	  constants #defined - GTK_PRIORITY_[HIGH/INTERNAL/DEFAULT/LOW]
	  (redraws, resizes run at GTK_PRIORITY_INTERNAL)

	* gtk/gtkentry.c gtk/testselection.c: changes to keep up with change
  	  to gtkselection.c.
1998-02-13 05:19:06 +00:00
Tim Janik
2090cc650c new function gtk_signal_handler_pending() returning the id of the next
Wed Feb 11 00:18:31 1998  Tim Janik  <timj@gimp.org>

        * gtk/gtksignal.h:
        * gtk/gtksignal.c: new function gtk_signal_handler_pending() returning
          the id of the next handler pending for that signal or 0.
          put struct GtkHandler back into gtksignal.c along with
          gtk_signal_get_handlers.
1998-02-10 23:49:15 +00:00
Tim Janik
6898536a02 ok, there have been several severe bugs in the signal handler referencing
Tue Feb 10 07:12:07 1998  Tim Janik  <timj@gimp.org>

        * gtk/gtksignal.h:
        * gtk/gtksignal.c:
        ok, there have been several severe bugs in the signal handler
        referencing and ->next connection stuff. these bugs caused
        invokations of handlers that are disconnected and - worse -
        destroyed already. invokation of *destroyd* handlers mean:
        anything can be executed , because the handler structure can just
        as well be realocated.
        at the cost of an extra ->prev field per handler we should have a
        reasonable stable system now, because of the various places that
        can cause a handler to be disconnected (*any* handler invokation can
        cause *any* or *all* handlers to be disconnected, there is no way
        around a doubly linked list, actually handler disconnection has never
        worked correctly because of this.
        handlers are connected together via a *doubly* linked list now, and it
        is *not* valid to remove a handler out of this list untill all its
        references have been droped, i.e. handler->ref_count==0.
        to prevent emissions of disconnected but still referenced handlers,
        disconnected handlers are simply marked as blocked and get an id of 0
        which is an invalid signal handler id.
        the handler->id has been changed to have 28 significant bits (using
        alignment gaps), since 65536 (old range: guint16) signal connections
        (as a total) can easily be reached by complex applications.
        this whole handler thingy is at least as tedious as writing doubly
        linked list implementations ;)
1998-02-10 06:53:08 +00:00
Miguel de Icaza
6246db9288 no longer a private routine; gtksignal.h: export gtk_signal_get_handlers
Mon Feb  9 16:42:21 1998  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* gtk/gtksignal.c (gtk_signal_get_handlers): no longer a private
	routine;
	gtksignal.h: export gtk_signal_get_handlers and GtkHandlers type.
1998-02-09 22:44:34 +00:00
Tim Janik
64ca527ecb for the emission of AFTER signals, fetch the objects signals via
Tue Feb  3 15:09:55 1998  Tim Janik  <timj@gimp.org>

        * gtk/gtksignal.c (gtk_signal_real_emit): for the emission
          of AFTER signals, fetch the objects signals via
          gtk_signal_get_handlers again. some handlers might have
          been removed or added. not doing this would mess up the
          memchunk allocation of signal handlers (this had been
          triggered by multiple *_while_alive connections), bad, bad, bad!
          (gtk_handlers_run): do the referencing on signal handlers
          unconditionally, the invokation of AFTER handlers will now take
          care of modified lists.

        * gtk/gtksignal.h: added gtk_signal_connect_while_alive.
1998-02-03 21:36:06 +00:00
Tim Janik
eef38289b2 GTK_RESIZE_NEEDED is a private flag now.
Mon Feb  2 04:15:08 1998  Tim Janik  <timj@gimp.org>

        * gtk/gtkcontainer.h:
        * gtk/gtkcontainer.c: GTK_RESIZE_NEEDED is a private flag now.
          (gtk_container_register_toplevel): new function.
          (gtk_container_unregister_toplevel): new function.

        * gtk/gtkmain.c: GTK_LEAVE_PENDING is a private flag now.

        * gtk/gtkmenu.c: call gtk_container_register_toplevel in
          gtk_menu_class_init instead of this dirty gtk_widget_set_parent(,NULL)
          hack. new default handler gtk_menu_destroy for calling
          gtk_container_unregister_toplevel. removed GTK_ANCHORED, GTK_UNMAPPED.

        * gtk/gtkobject.h: macro cleanups, added GTK_DESTROYED flag.

        * gtk/gtkobject.c: only emit DESTROY signal if !GTK_OBJECT_DESTROYED
          (object).

        * gtk/gtkprivate.h: new file that will not be automatically included.
          it holds the private flags for GtkWidget along with it's SET/UNSET
          and examination macros.

        * gtk/gtkwidget.c: private flags: GTK_RESIZE_NEEDED, GTK_REDRAW_PENDING,
          GTK_RESIZE_PENDING, GTK_IN_REPARENT, GTK_USER_STYLE. GTK_ANCHORED is
          replaced by GTK_TOPLEVEL. added missing UNSET for GTK_IN_REPARENT.
          removed the gtk_widget_set_parent(, NULL) hack for toplevels.
          upon destroy free memory for widgets with GTK_WIDGET_HAS_SHAPE_MASK.

        * gtk/gtkwidget.h: split up the widget flags into a public and a private
          portion. added an extra field private_flags to GtkWidget without making
          it bigger by using an alignment gap of 16 bit. macro cleanups.

        * gtk/gtkwindow.c: removed GTK_ANCHORED. new function gtk_window_destroy
          for calling gtk_container_unregister_toplevel. removed the
          gtk_widget_set_parent(,NULL), call gtk_container_register_toplevel
          instead. remove GTK_UNMAPPED. GTK_RESIZE_NEEDED is private now.

        * gtk/gtksignal.c (gtk_signal_disconnect): removed a bug on
          removal that cut off the handler list -> living_objects == 0
          with testgtk. made some warnings more descriptive.
          new function gtk_signal_connect_object_while_alive, which
          will automatically destroy the connection once one of the objects
          is destroyed. didn't include this before removal of the above
          mentioned bug.

* reflected refcounting revolution in ChangeLog
1998-02-02 04:54:25 +00:00
Tim Janik
4af33fa24d hm, initital refcount revolution commit ;)
still some gnits left, but keep working on it ;)
-timj
1998-01-30 23:47:09 +00:00
Tim Janik
db6a8d4a8a new user signal, and possibility to query signal information.
-timj
1998-01-29 20:44:14 +00:00
Elliot Lee
9508b76bd2 Initial revision 1997-11-24 22:37:52 +00:00