]> Pileus Git - ~andy/gtk/commitdiff
TODO updates (major ones ;).
authorTim Janik <timj@src.gnome.org>
Mon, 23 Feb 1998 11:14:27 +0000 (11:14 +0000)
committerTim Janik <timj@src.gnome.org>
Mon, 23 Feb 1998 11:14:27 +0000 (11:14 +0000)
have the send_event field in all GdkEvents.
gtkmenu.c, gtkacceleratortable.c, gtkwindow.c: unreference accelerator_table.
gtk_object_query_args: removed seq_ids again, must have been quite tired
when i commited that change ;)
gtkoptionmenu.c: assure GTK_BIN()->child is empty when reparenting
a menu_items child.
gtkwindow.c: fixed some memory leaks.

-timj

NEWS
TODO
gdk/gdktypes.h
gtk/gtkmenu.c
gtk/gtkmenufactory.c
gtk/gtkobject.c
gtk/gtkobject.h
gtk/gtkoptionmenu.c
gtk/gtkwindow.c

diff --git a/NEWS b/NEWS
index 16db9dfb19b0af9ed8fc84067a29a0f01f99ccd1..7d15299af7eb22fd4cb046909384e5f00c9dec74 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ Forthcoming Changes for GTK+ 0.99.4:
 
 * Reference counting revolution integrated.
   Refer to docs/refcounting.txt on this issue.
+* Implementation of a decent debugging system, see docs/debugging.txt.
 * Additions on the signal code for querying information about certain signals,
   and pending handlers of signals.
 * Support for user signals, and major changes to internal signal handler
diff --git a/TODO b/TODO
index 8301b5e0afdc9601d404d901e3f1d33ca4775c63..8b909df174b9b59ffcccbc115639afb9c1c05842 100644 (file)
--- a/TODO
+++ b/TODO
-
 TODO BEFORE GTK 1.0
 -------------------
 
-BUGS
-----
- * Fix focus activation of list items. Does list item activation have to be
-   completely reorganized?
+Bugs:
+ * Vertical scrollbar: the expose event looks hosed and is causing 
+   quite a bit of flickering
+
+ * signal parameters don't seem to get refreshed on recursive invokations
+   of GTK_NO_RECURSE signals, which causes the restarted emissions to loose
+   their actual point, i.e. parameter changes on the restarted emission,
+   needs further investigation.
 
+ * the GtkText widget needs to be fixed, that means no segfaults, full editing
+   facilities, omit the background pixmap for now.
+
+ * Widget redrawing when the window resizes sometimes messes up.
+   GtkWindows allow_shrink is buggy since we let all kinds of configure events
+   pass from Gdk to Gtk.
+   GtkLabels sometimes redraw without clearing up the underlying background on
+   window resizes.
+ * delay dnd settings to take effect once a widget is realized, this is
+   to avoid force realizations. i think this goes along with owens dnd
+   changes?
+    -timj
+   The way DND data types are set in GtkWidget really needs to be fixed.
+   This is pretty high on my priority list, and I'll get to it as soon as
+   the column list widget is done.  The correct way dnd data needs to be set
+   is to have a additional keyed data type with GtkWidget, which is applied to
+   the widget's window upon realize.
+   There also needs to be a way to set dnd-data on widget windows which are
+   not the main window (for widgets that create more than one window).
+    -Jay Painter
+   DnD seems to work for me, but yes, there needs to be some sort of
+   gtk_widget layer that makes it easier... Also, adding support for drop
+   zones might be nice.
+    -Elliot
+   This one is reproducabel for me:
+   testgtk --sync
+   popup colorselection
+   drag/drop works
+   start up preview color
+   drag works but not dropping
+   end preview color
+   drag/drop works
+   start up prewiev color
+   segfault in malloc
+    -timj
+
+Additions:
  * Lists should scroll to center the recently selected item if it isn't
    visible.
 
- * Notebook: there are a few cosmetic problems left
+ * enforce invariants on *_RESIZE* and *_REDRAW* flags.
 
- * Vertical scrollbar: the expose event looks hosed and is causing 
-   quite a bit of flickering
+ * asure that child widgets are really get gtk_widget_destroy()ed in their
+   parents destroy handler, and not just unparented or somesuch.
+
+ * GtkToolTips:
+   allocate GtkTooltipsData from memchunks
+   look into incorporation of old/gtk-dairiki-971208-[01].patch.gz
+                          
+ * Make widget attributes configurable after the widget is created (timj).
+
+ * Implementation of owens widget style proposal.
+ * Are there still some GtkCList changes outstanding? (Jay Painter)
+   GtkCList is derived from GtkContainer but doesn't implement the
+   need_resize, focus, add and remove methods from containers.
+   it should at least issue a warning upon invokation of not supported
+   member functions.
+
+ * GtkTree and GtkList should express in their *_add implementations,
+   that they expect GtkListItems/GtkTreeItems as children. Similar
+   things might apply to other containers.
 
+
+TODO AFTER GTK 1.0
+------------------
+
+ * Make all widget attributes configurable after the widget is created (timj).
  * Make sure a widget added to a list is a list item and a widget added
    to a menu is a menu item, etc. GTK_BASIC was a first attempt at this,
    but it fails with subsequent container_add()s. maybe have another
    GTK_PARENT_BASIC (similar to GTK_PARENT_SENSITIVE) flag, to prevent
    tree iterations upon every container addition.
- * GtkMenu needs to properly unref() accelerator tables upon destroy.
 
- * Using gtk_container_add() on an option menu to add a label works, but then
-   gtk_option_menu_button_press() segfaults. This is supposed to fail while
-   adding due to a g_return_if_fail (GTK_IS_MENU_ITEM (child));
-
- * enforce invariants on *_RESIZE* and *_REDRAW* flags.
-   
-
-NEW FEATURES
-------------
  * gdk_expose_compress: ala-Xt, this would really help for opaque moves and
    such
 
-WIDGETS
--------
- * Column-list (Jay Painter)
- * Text widget (needs to be finished)
  * Entry should have a password mode (and it should show stars
-   for user feedback)
-
-DND
----
-  It seems to be having problems again.  The way DND data types are set in
-  GtkWidget really needs to be fixed.  This is pretty high on my priority
-  list, and I'll get to it as soon as the column list widget is done.  The
-  correct way dnd data needs to be set is to have a additional keyed data
-  type with GtkWidget, which is applied to the widget's window upon realize.
-  There also needs to be a way to set dnd-data on widget windows which are
-  not the main window (for widgets that create more than one window).
-    -Jay Painter
-  DnD seems to work for me, but yes, there needs to be some sort of
-  gtk_widget layer that makes it easier... Also, adding support for drop
-  zones might be nice.
-    -- Elliot
-  This one is reproducabel for me:
-  testgtk --sync
-  popup colorselection
-  drag/drop works
-  start up preview color
-  drag works but not dropping
-  end preview color
-  drag/drop works
-  start up prewiev color
-  segfault in malloc
-  -timj
-
-OTHER
------
- * Documentation
-
-
-PLANNED FOR GTK AFTER 1.0
--------------------------
-(add your thoughts here)
-
-============================================================================
-Other stuff todo, as of yet not categorized into the above:
-
--Widget redrawing when the window resizes sometimes messes up.
-
--More dialogs? Print, font, etc?
-
--Multiple document interface (MDI)?
-
--Support another widget style? Should be possible using GtkStyle's, but
- there may be some work needed to remove any style dependencies in widget
- code. Maybe GtkStyle's should have 'draw_push_button', 'draw_check_button',
- etc, functions to draw the various widgets.
-
--Make all widget attributes configurable after the widget is created.
+   for user feedback).
+
+ * More dialogs? Print, GtkFontSelector, maybe others...
+
+ * Multiple document interface (MDI)?
+
+ * Support another widget style? Should be possible using GtkStyle's, but
+   there may be some work needed to remove any style dependencies in widget
+   code. Maybe GtkStyle's should have 'draw_push_button', 'draw_check_button',
+   etc, functions to draw the various widgets.
+   This will be covered by upcoming themability, raster is working on it.
+ * More work on Documentation
index e864dd59664b01b0e8e819a002e50755612fa2d3..4ea12a4590f1561cd815c90cdf8d1e19192356f6 100644 (file)
@@ -869,6 +869,7 @@ struct _GdkEventExpose
 {
   GdkEventType type;
   GdkWindow *window;
+  gint8 send_event;
   GdkRectangle area;
   gint count; /* If non-zero, how many more events follow. */
 };
@@ -877,6 +878,7 @@ struct _GdkEventNoExpose
 {
   GdkEventType type;
   GdkWindow *window;
+  gint8 send_event;
   /* XXX: does anyone need the X major_code or minor_code fields? */
 };
 
@@ -884,6 +886,7 @@ struct _GdkEventVisibility
 {
   GdkEventType type;
   GdkWindow *window;
+  gint8 send_event;
   GdkVisibilityState state;
 };
 
@@ -891,6 +894,7 @@ struct _GdkEventMotion
 {
   GdkEventType type;
   GdkWindow *window;
+  gint8 send_event;
   guint32 time;
   gdouble x;
   gdouble y;
@@ -908,6 +912,7 @@ struct _GdkEventButton
 {
   GdkEventType type;
   GdkWindow *window;
+  gint8 send_event;
   guint32 time;
   gdouble x;
   gdouble y;
@@ -925,6 +930,7 @@ struct _GdkEventKey
 {
   GdkEventType type;
   GdkWindow *window;
+  gint8 send_event;
   guint32 time;
   guint state;
   guint keyval;
@@ -936,6 +942,7 @@ struct _GdkEventCrossing
 {
   GdkEventType type;
   GdkWindow *window;
+  gint8 send_event;
   GdkWindow *subwindow;
   GdkNotifyType detail;
 };
@@ -944,6 +951,7 @@ struct _GdkEventFocus
 {
   GdkEventType type;
   GdkWindow *window;
+  gint8 send_event;
   gint16 in;
 };
 
@@ -951,6 +959,7 @@ struct _GdkEventConfigure
 {
   GdkEventType type;
   GdkWindow *window;
+  gint8 send_event;
   gint16 x, y;
   gint16 width;
   gint16 height;
@@ -960,6 +969,7 @@ struct _GdkEventProperty
 {
   GdkEventType type;
   GdkWindow *window;
+  gint8 send_event;
   GdkAtom atom;
   guint32 time;
   guint state;
@@ -969,6 +979,7 @@ struct _GdkEventSelection
 {
   GdkEventType type;
   GdkWindow *window;
+  gint8 send_event;
   GdkAtom selection;
   GdkAtom target;
   GdkAtom property;
@@ -983,6 +994,7 @@ struct _GdkEventProximity
 {
   GdkEventType type;
   GdkWindow *window;
+  gint8 send_event;
   guint32 time;
   GdkInputSource source;
   guint32 deviceid;
@@ -992,6 +1004,7 @@ struct _GdkEventDragRequest
 {
   GdkEventType type;
   GdkWindow *window;
+  gint8 send_event;
   guint32 requestor;
   union {
     struct {
@@ -1017,6 +1030,7 @@ struct _GdkEventDragBegin
 {
   GdkEventType type;
   GdkWindow *window;
+  gint8 send_event;
   union {
     struct {
       guint protocol_version:4;
@@ -1030,6 +1044,7 @@ struct _GdkEventDropEnter
 {
   GdkEventType type;
   GdkWindow *window;
+  gint8 send_event;
   guint32 requestor;
   union {
     struct {
@@ -1046,6 +1061,7 @@ struct _GdkEventDropLeave
 {
   GdkEventType type;
   GdkWindow *window;
+  gint8 send_event;
   guint32 requestor;
   union {
     struct {
@@ -1060,6 +1076,7 @@ struct _GdkEventDropDataAvailable
 {
   GdkEventType type;
   GdkWindow *window;
+  gint8 send_event;
   guint32 requestor;
   union {
     struct {
@@ -1078,6 +1095,7 @@ struct _GdkEventClient
 {
   GdkEventType type;
   GdkWindow *window;
+  gint8 send_event;
   GdkAtom message_type;
   gushort data_format;
   union {
@@ -1091,6 +1109,7 @@ struct _GdkEventOther
 {
   GdkEventType type;
   GdkWindow *window;
+  gint8 send_event;
   GdkXEvent *xevent;
 };
 
index 1db8b2d4e450ab54334e03df3d17ecddb210a754..2f1f7c347c730d9e6db08836b9116bc0132ef372 100644 (file)
@@ -135,11 +135,6 @@ gtk_menu_init (GtkMenu *menu)
   menu->position_func_data = NULL;
   
   GTK_MENU_SHELL (menu)->menu_flag = TRUE;
-  
-  /* we don't need to register as toplevel anymore,
-   * since there is the attach/detach functionality in place.
-   * gtk_container_register_toplevel (GTK_CONTAINER (menu));
-   */
 }
 
 static void
@@ -156,9 +151,7 @@ gtk_menu_destroy (GtkObject         *object)
   if (data)
     gtk_menu_detach (GTK_MENU (object));
 
-  /* we don't need this:
-   * gtk_container_unregister_toplevel (GTK_CONTAINER (object));
-   */
+  gtk_menu_set_accelerator_table (GTK_MENU (object), NULL);
 
   if (GTK_OBJECT_CLASS (parent_class)->destroy)
     (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
@@ -191,7 +184,7 @@ gtk_menu_attach_to_widget (GtkMenu             *menu,
       return;
     }
 
-  gtk_widget_ref (menu);
+  gtk_widget_ref (GTK_WIDGET (menu));
   gtk_object_sink (GTK_OBJECT (menu));
 
   data = g_new (GtkMenuAttachData, 1);
index 02c748c84e243ce9bf7c05fccc92d861e3530c4e..7e0f5b7a38001339cba85fbc509a3cfc32c9c043 100644 (file)
@@ -87,7 +87,10 @@ gtk_menu_factory_destroy (GtkMenuFactory *factory)
     }
 
   if (factory->table)
-    gtk_accelerator_table_unref (factory->table);
+    {
+      gtk_accelerator_table_unref (factory->table);
+      factory->table = NULL;
+    }
   
   if (factory->widget)
     gtk_widget_unref (factory->widget);
index b854634c890f82b908e75535fd399bb330545eaa..3699f10dc113efe92773fb19e5a153597521dd38 100644 (file)
@@ -713,7 +713,6 @@ gtk_query_arg_foreach (gpointer key,
 GtkArg*
 gtk_object_query_args (GtkType class_type,
                       guint32  **arg_flags,
-                      guint    **seq_ids,
                       guint    *nargs)
 {
   GtkArg *args;
@@ -721,8 +720,6 @@ gtk_object_query_args (GtkType      class_type,
 
   if (arg_flags)
     *arg_flags = NULL;
-  if (seq_ids)
-    *seq_ids = NULL;
   g_return_val_if_fail (nargs != NULL, NULL);
   *nargs = 0;
   g_return_val_if_fail (gtk_type_is_a (class_type, gtk_object_get_type ()), NULL);
@@ -757,8 +754,6 @@ gtk_object_query_args (GtkType      class_type,
       *nargs = len;
       if (arg_flags)
        *arg_flags = g_new (guint32, len);
-      if (seq_ids)
-       *seq_ids = g_new (guint, len);
 
       do
        {
@@ -773,8 +768,6 @@ gtk_object_query_args (GtkType      class_type,
          args[info->seq_id - 1].name = info->name;
          if (arg_flags)
            (*arg_flags)[info->seq_id - 1] = info->arg_flags;
-         if (seq_ids)
-           (*seq_ids)[info->seq_id - 1] = info->seq_id;
        }
       while (list);
 
index e6f83329f3fd80c47629fbe2348f4fd54595810f..e7ac1038497de87e3cbb11347e4bdcbbcf641826 100644 (file)
@@ -255,7 +255,6 @@ void        gtk_object_setv         (GtkObject      *object,
  */
 GtkArg* gtk_object_query_args   (GtkType       class_type,
                                 guint32        **arg_flags,
-                                guint          **seq_ids,
                                 guint          *nargs);
 
 void   gtk_object_add_arg_type (const gchar    *arg_name,
index 93d3236e2ce52729ef04d685c42316d19b84d425..ad59e8faf78588c712c619191dcae456a419e0ba 100644 (file)
@@ -459,6 +459,9 @@ gtk_option_menu_update_contents (GtkOptionMenu *option_menu)
          if (child)
            {
              gtk_container_block_resize (GTK_CONTAINER (option_menu));
+             if (GTK_BUTTON (option_menu)->child)
+               gtk_container_remove (GTK_CONTAINER (option_menu),
+                                     GTK_BUTTON (option_menu)->child);
              if (GTK_WIDGET (option_menu)->state != child->state)
                gtk_widget_set_state (child, GTK_WIDGET (option_menu)->state);
              gtk_widget_reparent (child, GTK_WIDGET (option_menu));
index 016e76a95a3fa3ba1dcf169ea2817987df29e477..7c2b3534a95f4ea877453214b60024200c533d0e 100644 (file)
@@ -327,12 +327,10 @@ gtk_window_set_wmclass (GtkWindow *window,
   g_return_if_fail (window != NULL);
   g_return_if_fail (GTK_IS_WINDOW (window));
 
-  if (window->wmclass_name)
-    g_free (window->wmclass_name);
+  g_free (window->wmclass_name);
   window->wmclass_name = g_strdup (wmclass_name);
 
-  if (window->wmclass_class)
-    g_free (window->wmclass_class);
+  g_free (window->wmclass_class);
   window->wmclass_class = g_strdup (wmclass_class);
 
   if (GTK_WIDGET_REALIZED (window))
@@ -402,12 +400,21 @@ void
 gtk_window_remove_accelerator_table (GtkWindow           *window,
                                     GtkAcceleratorTable *table)
 {
+  GList *list;
+
   g_return_if_fail (window != NULL);
   g_return_if_fail (GTK_IS_WINDOW (window));
 
-  window->accelerator_tables = g_list_remove (window->accelerator_tables,
-                                             table);
-  gtk_accelerator_table_unref (table);
+  for (list = window->accelerator_tables; list; list = list->next)
+    {
+      if (list->data == table)
+       {
+         gtk_accelerator_table_unref (table);
+         window->accelerator_tables = g_list_remove_link (window->accelerator_tables, list);
+         g_list_free_1 (list);
+         break;
+       }
+    }
 }
 
 void
@@ -486,11 +493,18 @@ gtk_window_marshal_signal_2 (GtkObject      *object,
 static void
 gtk_window_destroy (GtkObject *object)
 {
+  GList *list;
+
   g_return_if_fail (object != NULL);
   g_return_if_fail (GTK_IS_WINDOW (object));
 
   gtk_container_unregister_toplevel (GTK_CONTAINER (object));
 
+  for (list = GTK_WINDOW (object)->accelerator_tables; list; list = list->next)
+    gtk_accelerator_table_unref (list->data);
+  g_list_free (GTK_WINDOW (object)->accelerator_tables);
+  GTK_WINDOW (object)->accelerator_tables = NULL;
+  
   if (GTK_OBJECT_CLASS (parent_class)->destroy)
     (* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
 }
@@ -505,6 +519,8 @@ gtk_window_finalize (GtkObject *object)
 
   window = GTK_WINDOW (object);
   g_free (window->title);
+  g_free (window->wmclass_name);
+  g_free (window->wmclass_class);
 
   GTK_OBJECT_CLASS(parent_class)->finalize (object);
 }