]> Pileus Git - ~andy/gtk/blobdiff - docs/Changes-2.0.txt
cancel editing if tree_view->priv->edited_column != NULL (fixes #76066)
[~andy/gtk] / docs / Changes-2.0.txt
index 304c968e06289f3861413d6b4478e87b9a523893..8dfb563dacc4c6ec2ef948ab22c7a6508f675922 100644 (file)
@@ -1,3 +1,18 @@
+
+
+
+DON'T EDIT THIS FILE - changes are now maintained in the reference
+manual, see docs/reference/gtk/changes-*.sgml. Also, when adding a
+change to the manual, you should amend the docs for all
+newly-deprecated features to point to the replacement for that
+feature, and be sure the GTK_DISABLE_DEPRECATED guards are in place in
+the header files. Be sure to add a note to the docs for EACH
+deprecated function; don't just do the changes-*.sgml change.
+
+
+
+
+
 Incompatible Changes from GTK+-1.2 to GTK+-2.0:
 
 * gtk_container_get_toplevels() was removed and replaced with
@@ -20,6 +35,9 @@ Incompatible Changes from GTK+-1.2 to GTK+-2.0:
   has been changed to include the entire area previously occupied by
   the gutter.
 
+* gtk_paned_set_handle_size() has been removed, in favor of a style property,
+  since this is an option that only makes sense for themes to adjust.
+
 * GDK no longer selects OwnerGrabButtonMask for button presses. This means  
   that the automatic grab that occurs when the user presses a button
   will have owner_events = FALSE, so all events are redirected to the
@@ -116,6 +134,12 @@ Incompatible Changes from GTK+-1.2 to GTK+-2.0:
     have to be moved into the ::destroy implementations. The reason for doing
     this is that all object reference cycles should be broken at destruction 
     time.
+
+    Because the ::destroy signal can be emitted multiple times, it no longer
+    makes sense to check if a widget has been destroyed using the 
+    GTK_OBJECT_DESTROYED() macro, and this macro has been removed. If 
+    catching destruction is still needed, it can be done with a signal
+    connection to ::destroy.
     
 * Signal system changes:
   The Gtk 2.0 signal merly proxies the GSignal system now.
@@ -135,6 +159,10 @@ Incompatible Changes from GTK+-1.2 to GTK+-2.0:
   not supported anymore.
   For many of the removed functions, similar variants are available
   in the g_signal_* namespace.
+  The GSignal system perfomrs emissions in a slightly different manner than
+  the old GtkSignal code. Signal handlers that are connected to signal "foo"
+  on object "bar" while "foo" is being emitted, will not be called anymore
+  during the emission they were connected within.
 
 * Inserting and deleting text in GtkEntry though functions such
   as gtk_entry_insert_text() now leave the cursor at its original
@@ -187,7 +215,7 @@ Incompatible Changes from GTK+-1.2 to GTK+-2.0:
 
 * A number of functions in GDK have been renamed for consistency and
   clarity. #defines to provide backwards compatibility have been
-  included, but can be disabled by defineing GDK_DISABLE_COMPAT_H.
+  included, but can be disabled by defineing GDK_DISABLE_DEPRECATED.
 
   #define gdk_draw_pixmap                gdk_draw_drawable
   #define gdk_draw_bitmap                gdk_draw_drawable
@@ -318,3 +346,242 @@ Incompatible Changes from GTK+-1.2 to GTK+-2.0:
 
 * GdkColorContext is gone; you probably weren't using it anyway.
   Use GdkColormap and the gdk_rgb_* functions instead.
+
+* GtkMenuBar now draws the GtkContainer::border_width space outside
+  the frame, not inside the frame
+
+* In GTK 1.2, if an event handler returned TRUE it prevented
+  propagation of that event to parent widgets. That is, the 
+  event signal would not be emitted on parent widgets. In 
+  GTK 2.0, if an event handler returns TRUE, the current signal 
+  emission on the current widget is immediately stopped. That is,
+  other callbacks connected to the signal will not be invoked.
+
+* gtk_toolbar_new() no longer has arguments. This function 
+  was broken because the default GtkToolbarStyle (icons, text, both)
+  is now a user preference, which is overridden when you call
+  gtk_toolbar_set_style(). The constructor forced everyone to 
+  override the preference, which was undesirable. So to port
+  your app, decide if you want to force the toolbar style 
+  or conform to the user's global defaults; if you want to force
+  it, call gtk_toolbar_set_style().
+
+  The orientation arg was removed from toolbar_new() as well, just
+  because it wasn't very useful and we were breaking the function
+  anyway so had an opportunity to lose it. Call
+  gtk_toolbar_set_orientation() to set toolbar orientation.
+
+* GtkRange/GtkScrollbar/GtkScale were rewritten; this means that most
+  theme engines won't draw them properly, and any custom subclasses of
+  these widgets will need a rewrite (though if you could figure out
+  how to subclass the old version of GtkRange, you have our
+  respect). Also, GtkTroughType is gone.
+
+* The GtkContainer::focus signal/virtualfunction and
+  gtk_container_focus() call were replaced by 
+  GtkWidget::focus and gtk_widget_child_focus(). 
+  The semantics are the same, so you should be able to just 
+  replace "container_class->focus = mywidget_focus" with 
+  "widget_class->focus = mywidget_focus" and replace 
+  gtk_container_focus() calls with gtk_widget_child_focus() calls.
+
+  The purpose of this change was to allow non-containers to have 
+  focusable elements.
+* gtk_rc_set_image_loader() and gtk_rc_load_image() has been removed, now 
+  that GTK+ includes decent image loading capabilities itself.
+
+* An extra GtkSettings argument has been added to
+  gtk_rc_find_pixmap_in_path(). This function is only actually useful
+  from a theme engine during parsing, at which point the GtkSettings
+  is provided.
+
+* The child argument facility in gtkcontainer.c has been converted
+  to a child property facility using GParamSpec and other facilities
+  for GObject.   
+
+   - The set_child_arg and get_child_arg virtual methods have been
+     replaced with set_child_property / get_child_property, which
+     work similar to GObject->set_property/get_property.
+
+   - Other removed functions with the replacements:
+
+     gtk_container_add_child_arg_type => gtk_container_class_install_child_property
+     gtk_container_query_child_args   => gtk_container_class_list_child_properties
+     gtk_container_child_getv         => gtk_container_child_set_property
+     gtk_container_child_setv         => gtk_container_child_get_property
+     gtk_container_add_with_args      => gtk_container_add_with_properties
+     gtk_container_addv               => gtk_container_add / gtk_container_child_set_property
+
+* gdk_image_get() (or rather its replacement,
+  gdk_drawable_get_image()) now handles errors properly by returning
+  NULL, previously it would crash. Also, a window being offscreen is
+  no longer considered an error; instead, the area being contains
+  undefined contents for the offscreen areas. In most cases, code
+  using gdk_image_get() should really be ported to
+  gdk_pixbuf_get_from_drawable().
+
+* gtk_widget_set_usize() has been renamed to
+  gtk_widget_set_size_request(), however the old name still exists
+  unless you define GTK_DISABLE_DEPRECATED.
+
+* gtk_widget_set_uposition() is deprecated; use gtk_window_move(), 
+  gtk_fixed_put(), or gtk_layout_put() instead.
+
+* gtk_window_set_policy() is deprecated. To get the effect of
+  "allow_shrink", call gtk_widget_set_size_request(window, 0, 0).  To
+  get the effect of "allow_grow", call
+  gtk_window_set_resizable(window, TRUE). You didn't want the effect
+  of auto_shrink, it made no sense. But maybe if you were using it you
+  want to use gtk_window_resize (window, 1, 1) to snap a window back
+  to its minimum size (the 1, 1 will be rounded up to the minimum
+  window size).
+
+* The core GTK+ now takes care of handling mapping, unmapping and
+  realizing the child widgets of containers in
+  gtk_widget_set_parent(). In most cases, this allows container
+  implementations to be simplifid by removing the code in add()
+  methods to map and realize children. However, there are 
+  a couple of things to watch out for here:
+
+   - If the parent is realized before the add() happens, 
+     gtk_widget_set_parent_window() must be called before
+     gtk_widget_set_parent(), since gtk_widget_set_parent()
+     will realize the child.
+
+   - If a container depended on its children not being mapped
+     unless it did so itself (for example, GtkNotebook only
+     mapped the current page), then the new function
+     gtk_widget_set_child_visible() must be called to keep
+     widgets that should not be mapped not mapped.
+
+  As part of this change, most containers also will no longer need
+  custom implementations of the map() and unmap() virtual
+  functions. The only cases where this is necessary are:
+
+   - For !NO_WINDOW widgets, if you create children of widget->window 
+     and don't map them in realize() then you must map them
+     in map(). [ In almost all cases, you can simply map the
+     windows in realize() ]
+
+   - For NO_WINDOW widgets, if you create windows in your realize()
+     method, you must map then in map() and unmap them in unmap().
+
+* gtk_widget_set_default_style (), gtk_widget_push_style (),
+  and gtk_widget_pop_style () have been removed, since they
+  did not work properly with themes and there were better
+  alternatives for modifying the appearance of widgets.
+
+  You should generally use gtk_widget_modify_fg/bg/base/text/font
+  instead.
+  
+* gtk_image_new() now takes no arguments and creates an empty GtkImage
+  widget. To create a GtkImage widget from a GdkImage (the least
+  common usage of GdkImage), use gtk_image_new_from_image.
+
+* GTK_SELECTION_EXTENDED is now deprecated, and neither the
+  GtkList/GtkTree nor the GtkCList/GtkCTree support
+  GTK_SELECTION_EXTENDED anymore.  However, the old extended behavior
+  replaces MULTIPLE behavior.
+
+* The following variables are no longer exported from GDK. (Other variables
+  are also no longer exported; the following are the ones found used
+  externally in a large sample of GTK+ code.)
+
+   Variable                               Replacement
+   ========                               ===========
+   gdk_null_window_warnings               None - did nothing in GTK+-1.2.
+   gdk_leader_window                      None - private variable
+   gdk_screen                             gdk_x11_get_default_screen ()
+   gdk_root_window                        gdk_x11_get_default_root_xwindow ()
+   gdk_root_parent                        gdk_get_default_root_window ()
+   gdk_error_code/gdk_error_warnings      gdk_error_trap_push()/pop()
+   gdk_display_name                       gdk_get_display ()
+   gdk_wm_delete_window                   gdk_atom_intern ("WM_DELETE_WINDOW", FALSE)
+   gdk_wm_take_focus                      gdk_atom_intern ("WM_TAKE_FOCUS", FALSE)
+   gdk_wm_protocols                       gdk_atom_intern ("WM_PROTOCOLS", FALSE)
+   
+* The handling of Colormaps and widgets has been changed:
+
+    - The default colormap for widgets is now the GdkRGB colormap, not
+      the system default colormap. If you try to use resources created for  
+      a widget (e.g., widget->style) with a window using the system
+      colormap, errors will result on some machines.
+
+    - gtk_widget_push/pop_colormap() only cause the colormap to be
+      explicitely set on toplevel widgets not on all widgets. The
+      colormap for other widgets (when not set using 
+      gtk_widget_set_colormap()), is determined by finding the nearest
+      ancestor with a colormap set on it explicitely, or if that
+      fails, the default colormap.
+
+* The default selected day for GtkCalendar is now the current day in the
+  month, not the first day in the month. The current month and year
+  were already used.
+
+* GDK is no longer put into threaded mode automatically when 
+  g_thread_init() has been called. In order to use the 
+  global GDK thread mutex with gdk_threads_enter() and 
+  gdk_threads_leave(), you must call gdk_threads_init() explicitely.
+
+  If you aren't using GDK and GTK+ functions from multiple threads,
+  there is no reason to call gdk_threads_init().
+
+* The GtkPreviewInfo struct has had its visual and colormap fields
+  removed.  Also, gtk_preview_get_cmap() and gtk_preview_get_visual()
+  are deprecated, as GdkRgb works on any colormap and visual.  You no
+  longer need to gtk_widget_push_cmap (gtk_preview_get_cmap ()) in
+  your code.
+
+* The GtkBox, GtkTable, and GtkAlignment widgets now call
+  gtk_widget_set_redraw_on_allocate (widget, FALSE); on themselves.
+  If you want to actually draw contents in a widget derived from
+  one of these widgets, you'll probably want to change this
+  in your init() function.
+
+* A number of widgets are now NO_WINDOW widgets (most importantly
+  GtkButton, but also GtkRange and GtkNotebook)
+
+  This has a couple of effects:
+
+   - If you are deriving from one of these widgets, you need to
+     adapt your code appropriately -- for instance, drawing coordinates
+     start from widget->allocation.x, widget->allocation.y.
+
+   - If you are embedding one of these widgets in a custom widget,
+     you must make sure you call gtk_container_propagate_expose()
+     correctly, as you must for any NO_WINDOW widgets.
+
+  GtkFixed is a little special; it is now created by default as
+  a NO_WINDOW widget, but if you do 
+
+    gtk_fixed_set_has_window (fixed, TRUE);
+
+  after creating a fixed widget, it will create a window and
+  handle it properly.
+
+* GtkLayout no longer has the xoffset, yoffset fields, which used
+  to store the difference between world and window coordinates for
+  layout->bin_window. These coordinate systems are now always
+  the same.
+
+* gtk_paint_focus(), gtk_draw_focus() and GtkStyle::draw_focus()
+  have been changed a bit:
+
+   - A GtkStateType argument has been added to gtk_paint_focus()
+   - The default implementation of GtkStyle::draw_focus virtual
+     function now draws a focus rectangle whose width is 
+     determinted by the GtkWidget::focus-width style property.
+   - The rectangle passed in is the bounding box, instead of
+     the rectangle used in the gdk_draw_rectangle() call, so it is
+     no longer necessary to subtract 1 from the width and height.
+
+
+
+DON'T EDIT THIS FILE - changes are now maintained in the reference
+manual, see docs/reference/gtk/changes-*.sgml. Also, when adding a
+change to the manual, you should amend the docs for all
+newly-deprecated features to point to the replacement for that
+feature, and be sure the GTK_DISABLE_DEPRECATED guards are in place in
+the header files. Be sure to add a note to the docs for EACH
+deprecated function; don't just do the changes-*.sgml change.