1. 17 Dec, 2000 1 commit
    • Havoc Pennington's avatar
      Port to GObject, can go back in gdk-pixbuf after setting up a · fde4fecf
      Havoc Pennington authored
      2000-12-16  Havoc Pennington  <hp@pobox.com>
      
      * gtk/gdk-pixbuf-loader.h, gtk/gdk-pixbuf-loader.c:
      Port to GObject, can go back in gdk-pixbuf after setting up
      a gdk-pixbuf-marshal.h header over there.
      
      * gtk/gtktreeview.c: s/SEPERATOR/SEPARATOR/g;
      (gtk_tree_view_class_init): specify GTK_TYPE_ADJUSTMENT for signal
      args
      (gtk_tree_view_init): don't unset GTK_NO_WINDOW, it shouldn't be
      set
      (gtk_tree_view_realize_buttons): don't gtk_widget_show() buttons
      here, do it when we create the buttons later
      (gtk_tree_view_realize_buttons): add some g_return_if_fail
      (gtk_tree_view_map): paranoia checks that column->button is shown
      and unmapped
      (gtk_tree_view_size_request): only request visible children.
      Move header size calculation in here, for cleanliness, and
      to maintain invariants for child widgets if we eventually
      let users set different children inside the buttons
      (gtk_tree_view_map_buttons): factor out code to map buttons,
      since it was being called several times
      (gtk_tree_view_size_allocate_buttons): move_resize the drag
      windows instead of just moving them; their height may change
      if we allow random widgets in there, or the theme changes.
      (gtk_tree_view_size_allocate): move button size allocation
      above emitting the scroll signals, to ensure a sane state when we
      hit user code
      (gtk_tree_view_button_release): remove queue_resize after
      tree_view_set_size(), set_size() will handle any resize queuing
      that's needed
      (gtk_tree_view_focus_in): just queue a draw, don't fool with
      draw_focus goo
      (gtk_tree_view_focus): use gtk_get_current_event() and
      gdk_event_get_state()
      (gtk_tree_view_deleted): don't queue_resize() after calling set_size()
      (gtk_tree_view_build_tree): fix a "if (foo); {}" bug - i.e. remove
      semicolon
      (gtk_tree_view_create_button): show the button here
      (gtk_tree_view_button_clicked): actually emit the clicked signal
      on the column
      (_gtk_tree_view_set_size): return right away if the size is
      unchanged, as a cheesy optimization
      (gtk_tree_view_setup_model): rename set_model_realized to
      setup_model to match the flag that indicates whether we've
      called it
      (gtk_tree_view_get_hadjustment): create adjustment if it doesn't
      exist, because set_scroll_adjustment does that and it shouldn't
      matter what order you call these in
      (gtk_tree_view_get_vadjustment): ditto
      (gtk_tree_view_set_headers_visible): canonicalize the bool,
      for paranoia
      (gtk_tree_view_set_headers_visible): call
      gtk_tree_view_map_buttons() instead of using cut-and-paste code
      (gtk_tree_view_append_column): clarify whether the return value
      is the count of columns before or after, and do the increment
      separately from the return statement so you can tell from the code.
      (gtk_tree_view_remove_column): ditto
      (gtk_tree_view_insert_column): ditto
      (gtk_tree_view_get_column): remove g_return_if_fail for columns
      outside the existing range, the docs say that outside-range
      columns are allowed, so we handle them as documented. (Presumably
      this allows a nice loop with column != NULL as test.)
      (gtk_tree_view_move_to): document what 0.0, 0.5, 1.0 alignments
      mean (left/right/center etc.).
      (gtk_tree_view_collapse_all): only queue a draw if we're mapped
      (gtk_tree_view_expand_row): add docs
      (gtk_tree_view_collapse_row): add docs
      
      * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_clicked): new
      function to emit the clicked signal on a column
      
      * gdk/gdkevents.c (gdk_event_get_state): new function, to get the
      state of an event
      (gdk_event_get_time): don't treat GDK_SCROLL
      as a button event, remove default case from switch so gcc
      will whine if we don't explicitly handle all event types
      
      * gtk/gtktreeselection.h: added some FIXME
      
      * gtk/gtktreeprivate.h (struct _GtkTreeViewPrivate): rename
      "columns" to "n_columns" and "column" to "columns" for clarity
      fde4fecf
  2. 11 Dec, 2000 1 commit
    • Owen Taylor's avatar
      Add a function to determine if a window is the focus widget within its · 0cdc00ec
      Owen Taylor authored
      Wed Oct 25 14:17:43 2000  Owen Taylor  <otaylor@redhat.com>
      
      	* gtk/gtkwidget.[ch] (gtk_widget_is_focus): Add a function
      	to determine if a window is the focus widget within
      	its toplevel.
      
      	* gtk/gtkcontainer.[ch]: Fix the return type of ::focus
      	to be boolean.
      
      	* gtk/gtkcontainer.c (gtk_container_real_focus): Move handling
      	of the case where the container CAN_FOCUS to here instead
      	of having it in each individual move-the-focus place.
      
      	* gtk/gtkcontainer.c: Rewrite handling of left-right and up-down
      	focusing to be geometric in a much more obvious sense. Arrowing
      	around is still non-intuitive because it isn't perfect and
      	because entries, etc, grab the arrow keys, but it at least
      	usually will do what you expect now.
      
      	* gtk/gtknotebook.[ch]: Many cleanups. Moved docs inline in this
      	file.
      
      	* gtk/gtknotebook.c: Change tabs to be a single item in
      	the focus chain. Make movement of focus on tabs with arrow
      	keys wrap around.
      
      	* gtk/gtknotebook.c (gtk_notebook_find_child): Add
      	CHECK_FIND_CHILD macro to give informative error messages
      	instead of silent returns.
      
      	* gtk/gtknotebook.c (gtk_notebook_init): Set the RECEIVES_DEFAULT
      	flag since we handle GdkReturn on the tabs.
      
      	* gtk/gtknotebook.c (gtk_notebook_expose_tabs): Invalidate
      	windows rather than sending expose events directly.
      
      	* gtk/gtknotebook.[ch] docs/Changes-2.0.txt: Move structure
      	definition for GtkNotebookPage into .c file, since it is private.
      
      	* gtk/testgtk.c (create_notebook): Add option for
      	testing borderless notebook.
      
      	* gtk/testgtk.c (page_switch): Removed egregious poking
      	around in GTK+ internals.
      
      	* docs/widget-system.txt: Remove references to GTK_REDRAW_PENDING.
      
      	* gtk/gtkclist.[ch]: Remove key press handler, handle focusing
      	properly through gtk_clist_focus. Make the title headers a
      	single item in the tab-focus chain, and make left-right wrap
      	around.
      
      	* gtk/gtkwindow.c (gtk_window_focus): Add a custom
      	focus method so that wrapping around works properly.
      
      	* gtk/gtktreeview.c: Remove calls to gtk_container_set_focus_child() -
      	that is handled for the widget now.
      0cdc00ec
  3. 04 Dec, 2000 1 commit
    • Havoc Pennington's avatar
      Remove "draw" virtual method and signal · 5995baab
      Havoc Pennington authored
      2000-12-02  Havoc Pennington  <hp@pobox.com>
      
      * gtk/gtkwidget.h (struct _GtkWidgetClass): Remove "draw" virtual
      method and signal
      
      * gtk/gtkwidget.c (gtk_widget_draw): Now just queues a draw then
      calls gdk_window_process_updates() to push the exposes through
      (gtk_widget_class_init): No more draw signal, no
      gtk_widget_real_draw()
      
      * gtk/gtkbin.c (gtk_bin_draw): remove
      
      * gtk/gtkbox.c (gtk_box_draw): remove
      
      * gtk/gtkbutton.c (gtk_button_draw): remove
      
      * gtk/gtkcalendar.c (gtk_calendar_draw): remove
      
      * gtk/gtkcheckbutton.c (gtk_check_button_draw): remove
      
      * gtk/gtkcheckmenuitem.c (gtk_check_menu_item_draw): remove
      
      * gtk/gtkclist.c (gtk_clist_draw): remove
      
      * gtk/gtkentry.c (gtk_entry_draw): remove
      
      * gtk/gtkeventbox.c (gtk_event_box_draw): remove
      
      * gtk/gtkfixed.c (gtk_fixed_draw): remove
      
      * gtk/gtkframe.c (gtk_frame_draw): remove
      
      * gtk/gtkhandlebox.c (gtk_handle_box_draw): remove
      
      * gtk/gtkhpaned.c (gtk_hpaned_draw): remove
      
      * gtk/gtklayout.c (gtk_layout_draw): remove
      
      * gtk/gtklist.c (gtk_list_draw): remove
      
      * gtk/gtklistitem.c (gtk_list_item_draw): remove
      
      * gtk/gtkmenu.c (gtk_menu_draw): remove
      
      * gtk/gtkmenubar.c (gtk_menu_bar_draw): remove
      
      * gtk/gtkmenuitem.c (gtk_menu_item_draw): remove
      
      * gtk/gtknotebook.c (gtk_notebook_draw): remove
      
      * gtk/gtkoptionmenu.c (gtk_option_menu_draw): remove
      
      * gtk/gtkpacker.c (gtk_packer_draw): remove
      
      * gtk/gtkrange.c (gtk_range_draw): remove
      
      * gtk/gtkscrolledwindow.c (gtk_scrolled_window_draw): remove
      
      * gtk/gtkspinbutton.c (gtk_spin_button_draw): remove
      
      * gtk/gtktable.c (gtk_table_draw): remove
      
      * gtk/gtktearoffmenuitem.c (gtk_tearoff_menu_item_draw): remove
      
      * gtk/gtktext.c (gtk_text_draw): remove
      
      * gtk/gtktextview.c (gtk_text_view_draw): remove
      
      * gtk/gtktogglebutton.c (gtk_toggle_button_draw): remove
      
      * gtk/gtktoolbar.c (gtk_toolbar_draw): remove
      
      * gtk/gtktree.c (gtk_tree_draw): remove
      
      * gtk/gtktreeitem.c (gtk_tree_item_draw): remove
      
      * gtk/gtktreeview.c (gtk_tree_view_draw): remove
      
      * gtk/gtkviewport.c (gtk_viewport_draw): remove
      
      * gtk/gtkvpaned.c (gtk_vpaned_draw): remove
      
      * gtk/gtkvscale.c (gtk_vscale_draw): remove
      
      * gtk/gtkwindow.c (gtk_window_draw): remove
      5995baab
  4. 22 Nov, 2000 1 commit
    • 2's avatar
      It's amazing what reversing the order in an if statement will do. Doing so · c76c5f48
      2 authored
      2000-11-22    <jrb@redhat.com>
      
      	* gtk/gtktreeview.c (gtk_tree_view_calc_size): It's amazing what
      	reversing the order in an if statement will do.  Doing so managed
      	to make the treemodelsort half work.  Other half will follow after
      	I get the insert function fully fixed.
      c76c5f48
  5. 18 Nov, 2000 1 commit
    • Jonathan Blandford's avatar
      Changed to have the list become non-italic when the demo window is · c9e39436
      Jonathan Blandford authored
      Sat Nov 18 18:00:17 2000  Jonathan Blandford  <jrb@redhat.com>
      
      	* demos/gtk-demo/main.c: Changed to have the list become
      	non-italic when the demo window is destroyed through an external
      	event (like a close button).  Doing so found three bugs in the
      	widget.
      
      	* demos/gtk-demo/*.c (do_*): Changed to return the toplevel window.
      
      	* gtk/gtkliststore.c (gtk_list_store_set_cell): emit "change" when
      	we actually set the cell.
      
      	* gtk/gtktreestore.c (gtk_tree_store_set_cell): ditto
      
      	* gtk/gtktreeselection.c (gtk_tree_selection_real_select_node):
      	free a leaked path.  Thanks memprof.
      c9e39436
  6. 09 Nov, 2000 1 commit
    • Jonathan Blandford's avatar
      added more fields to allow more interesting iterators. Also, made the · c97d57eb
      Jonathan Blandford authored
      Thu Nov  9 11:23:22 2000  Jonathan Blandford  <jrb@redhat.com>
      
      	* gtk/gtktreemodel.h (struct _GtkTreeIter): added more fields to
      	allow more interesting iterators.  Also, made the lifecycle of
      	iterators more explicit.
      
      	* gtk/gtktreemodelsort.[ch]: New model for sorting.
      
      	* gtk/gtk-boxed.defs (GtkTreeIter, GtkTreePath): Added two boxed
      	types.
      c97d57eb
  7. 30 Oct, 2000 1 commit
    • Jonathan Blandford's avatar
      New function. · c42cee3e
      Jonathan Blandford authored
      Mon Oct 30 19:23:50 2000  Jonathan Blandford  <jrb@redhat.com>
      
      	* gtk/gtktreeview.c (gtk_tree_view_expand_row): New function.
      
      	* gtk/gtktreeview.c (gtk_tree_view_collapse_row): New function.
      
      	* gtk/gtktreeview.c, gtk/gtktreemodel.c, gtk/gtktreeselection.c
      	gtk/gtktreestore.h, gtk/gtktreeview.h, gtk/gtktreeviewcolumn.c,
      	gtk/gtktreeviewcolumn.h: Fixed inline docs.
      
      	* docs/reference/gtk/tree_widget.sgml: Proto intro to the tree
      	widget.  Needs writing someday.
      
      	* docs/reference/gtk/tmpl/gtktree*sgml: Added the tree widget to
      	the docs.
      c42cee3e
  8. 27 Oct, 2000 1 commit
  9. 26 Oct, 2000 1 commit
    • Jonathan Blandford's avatar
      Got rid of GtkTreeNode, and changed it to GtkTreeIter. Added iterators · ef7b510f
      Jonathan Blandford authored
      Wed Oct 25 20:40:25 2000  Jonathan Blandford  <jrb@redhat.com>
      
      	* gtk/gtktreemodel.h: Got rid of GtkTreeNode, and changed it to
      	GtkTreeIter.  Added iterators everywhere.
      
      	* gtk/gtktreeviewcolumn.c: Changed to use the iterators.
      
      	* gtk/gtktreeviewselection.c: Changed to use the iterators.
      
      	* gtk/gtktreestore.c: Changed to use the iterators.
      
      	* gtk/gtkliststore.c: Commented out the code.  Will convert to
      	iterators tomorrow.
      
      	* gtk/gtkmodelsimple.c: Commented out the code.  Will convert to
      	iterators tomorrow.
      
      	* gtk/treestoretest.c: Changed to use iterators.
      
      	* demos/testgtk/main.c: Moved to use the new iterator system.
      ef7b510f
  10. 25 Oct, 2000 1 commit
    • Tim Janik's avatar
      urg, removed implementation of gtk_marshal_VOID__INT_INT_INT_INT. if · d69496c0
      Tim Janik authored
      Wed Oct 25 20:47:41 2000  Tim Janik  <timj@gtk.org>
      
              * gtk/gdk-pixbuf-loader.c (gdk_pixbuf_loader_class_init): urg, removed
              implementation of gtk_marshal_VOID__INT_INT_INT_INT. if people do that,
              couldn't they at least give it a non-standard name?
      
              * gtk/gtktextlayout.c: arg! yet another implementation of
              gtk_marshal_VOID__INT_INT_INT_INT(), is this a conspiracy?
      
              * gtk/gtktextbuffer.c: gotcha! captured a vagabonding
              gtk_marshal_VOID__INT_POINTER_INT() implementation, braught it back
              home. now i know this _is_ a conspiracy.
      
              * gtk/gtkwidget.c (gtk_widget_class_init): marshaller fixups for
              ::state-changed.
      
              * gtk/gtkaccelgroup.c (gtk_accel_group_create_remove):
              (gtk_accel_group_create_add): marshaller signature fixups.
      
              * gtk/gtklistitem.c (gtk_list_item_class_init): signal creation fixups,
              pass in GTK_TYPE_SCROLL_TYPE instead of GTK_TYPE_ENUM.
      
              * gtk/gtkobject.[hc]: removed GTK_CONNECTED flag, it's not valid
              anymore.
      
      Tue Oct 24 23:59:21 2000  Tim Janik  <timj@gtk.org>
      
              * docs/reference/Makefile.am: disabled SUBDIRS for the moment, since
              due to the signal system changes, it wouldn't build currently. to
              be fixed soon.
      
              * docs/Changes-2.0.txt: GtkSignal/GSignal updates.
      
              * gtk/gtkwidget.c: ::direction_changed takes an enum as argument,
              so it needs gtk_marshal_VOID__ENUM() instead of
              gtk_marshal_NONE__UINT().
      
              * gdk/gdk*.c: adapted type registration functions.
      
              * gtk/gtkbindings.c:
              * gtk/gtkaccelgroup.c: operate on GSignalQuery, GtkSignalQuery is
              gone.
      
              * gtk/gtkenums.h: define GtkSignalRunType in terms of GSignalType.
      
              * gtk/gtkobject.c:
              (gtk_object_destroy):
              (gtk_object_shutdown): fixed recursion guards. basically we have to
              catch the case where any of GObject.shutdown() or gtk_object_destroy()
              is called during ::destroy, and avoid recursion there.
      
              * gtk/gtktypeutils.c:
              * gtk/maketypes.awk: awk-script hackup to provide gtk_type_init() with
              boxed_copy/boxed_free. this needs a more general solution based on a
              publically installed code-generator utility.
      
              * gtk/gtktypeutils.[hc]: compat aliased GTK_TYPE_BOXED to G_TYPE_BOXED,
              glib's gobject has support for that now.
              define GtkSignalMarshaller in terms of GSignalCMarshaller.
      
      
      Mon Oct 23 09:36:42 2000  Tim Janik  <timj@gtk.org>
      
              * gtk/gtksignal.[hc]:
              * gtk/gtkmarshal.[hc]:
              * gtk/Makefile.am: generate marshallers with glib-genmarshal and don't
              compile gtkmarshal.c on its own anymore, just include it in gtksignal.c.
              removed #include <gtkmarshal.h>s all over the place, gtksignal.h takes
              care of that.
      
              * *.c: marshaller name fixups.
      
              * gtk/gtkmarshal.list: added a comment briefing the format.
      
      Sun Oct 22 23:14:39 2000  Tim Janik  <timj@gtk.org>
      
              * gtk/gtksignal.[hc]: nuked old implementation. we mostly have
              compatibility macros here now. more specifically, most of
              the API is preserved (yes, _most_, nonwithstanding the
              following exceptions listed, the API is stil lHUGE ;)
              things that got removed completely:
              GtkSignalQuery, gtk_signal_query(), gtk_signal_n_emissions(),
              gtk_signal_n_emissions_by_name(), gtk_signal_handlers_destroy(),
              gtk_signal_set_funcs(), gtk_signal_handler_pending_by_id(),
              gtk_signal_add_emission_hook(), gtk_signal_add_emission_hook_full(),
              gtk_signal_remove_emission_hook().
              non-functional functions variants:
              gtk_signal_add_emission_hook(), gtk_signal_remove_emission_hook().
              the GtkCallbackMarshal argument to gtk_signal_connect_full() is
              not supported anymore.
              (gtk_signal_compat_matched): new internal function to aid
              implementation of the compatibility macros, it  provides
              functionality to block/unblock/disconnect handlers based
              on func/data.
      
              * gtk/gtkenums.h: define GtkSignalRunType in terms of GSignalType,
      
              * *.c: adaptions to new type registration API signatures.
      
      
      Fri Oct 20 15:26:33 2000  Tim Janik  <timj@gtk.org>
      
              * gtk/gtktypeutils.[hc]: removed G_TYPE_GTK_POINTER cludge.
      d69496c0
  11. 17 Oct, 2000 1 commit
    • 7's avatar
      Draw the arrows correctly. · 3b42e087
      7 authored
      2000-10-17    <jrb@redhat.com>
      
      	* gtk/gtktreeview.c: Draw the arrows correctly.
      
      Also, commit a few minor fixes so Havoc can make a model.
      3b42e087
  12. 16 Oct, 2000 2 commits
  13. 15 Oct, 2000 1 commit
    • 5's avatar
      Fix GtkTreeNode *node ->GtkTreeNode node issue. · e6b9f291
      5 authored
      2000-10-15    <jrb@redhat.com>
      
      	* gtk/gtktreeview.c, gtk/gtktreeview.h, gtk/gtktreestore.h,
      	gtk/gtktreestore.c, gtk/gtkliststore.h, gtk/gtkliststore.c,
      	gtk/gtkmodelsimple.c, gtk/gtkmodelsimple.h, gtk/gtktreedatalist.c,
      	gtk/gtktreemodel.h, gtk/gtktreeselection.c,
      	gtk/gtktreeselection.h: Fix GtkTreeNode *node ->GtkTreeNode node
      	issue.
      e6b9f291
  14. 06 Oct, 2000 1 commit
    • Jonathan Blandford's avatar
      Replaced with GTK_TREE_SELECTION_OLD to prevent conflict with · 6b6e6763
      Jonathan Blandford authored
      2000-10-05  Jonathan Blandford  <jrb@redhat.com>
      
      	* gtk/gtktree.h (GTK_TREE_SELECTION): Replaced with
      	GTK_TREE_SELECTION_OLD to prevent conflict with gtktreeselection.c
      	* gtk/testgtk.c: s/GTK_TREE_SELECTION/GTK_TREE_SELECTION_OLD/
      	* gtk/gtktreeselection.[ch]: Replaced
      	"node_selected"/"node_unselected" signal with "selection_changed"
      	signal.
      6b6e6763
  15. 05 Oct, 2000 1 commit