[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: branch: master updated (1.1.1.20070708-15-ge4f7225)



The branch, master has been updated
       via  e4f7225254cb5168131d31347a8de277181f41ea (commit)
       via  a139f2ed1ec50ad2a0fec4e91c7e51dd690d983a (commit)
       via  91ffb796f41ca6ee7a5ed1063917f7bb3fd03464 (commit)
      from  5e47599e07b5bed9d24b5c295db7a5e05f7c4624 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 gschem/include/gschem_dialog.h |   10 ++
 gschem/include/x_compselect.h  |    1 +
 gschem/src/gschem_dialog.c     |  235 ++++++++++++++++++++++++++++------------
 gschem/src/x_compselect.c      |   95 +++++++++++++----
 4 files changed, 250 insertions(+), 91 deletions(-)


=================
 Commit Messages
=================

commit e4f7225254cb5168131d31347a8de277181f41ea
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sat Jul 21 19:16:50 2007 +0100

    Save/restore geometry of the GtkHPaned in the component selection dialog.

:100644 100644 8b40806... 3f39be2... M	gschem/include/x_compselect.h
:100644 100644 37ff055... f8c2e0b... M	gschem/src/x_compselect.c

commit a139f2ed1ec50ad2a0fec4e91c7e51dd690d983a
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sat Jul 21 19:16:24 2007 +0100

    Extend GschemDialog to allow hooking to save/restore internal geometry
    
    GschemDialog now emits "geometry-save" and "geometry-restore" signals
    which instances can connect to. Subclasses may over-ride and chain the
    "geometry_save" and "geometry_restore" class members. These signal handlers
    are passed a pointer to the GKeyFile and a text string identifying the
    group it expects data to be saved under.
    
    The code relies on features only available in GLIB 2.6 onwards. When using
    this functionality the code must be surrounded with an appropriate test as
    the class functions are not defined when compiling against an older GLIB.

:100644 100644 bffd5b0... bf49e4f... M	gschem/include/gschem_dialog.h
:100644 100644 22c4188... ec28037... M	gschem/src/gschem_dialog.c

commit 91ffb796f41ca6ee7a5ed1063917f7bb3fd03464
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sat Jul 21 19:16:09 2007 +0100

    Separate the list and preview with a GtkHPaned in the compselect dialog.

:100644 100644 df11b1b... 37ff055... M	gschem/src/x_compselect.c

=========
 Changes
=========

commit e4f7225254cb5168131d31347a8de277181f41ea
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sat Jul 21 19:16:50 2007 +0100

    Save/restore geometry of the GtkHPaned in the component selection dialog.

diff --git a/gschem/include/x_compselect.h b/gschem/include/x_compselect.h
index 8b40806..3f39be2 100644
--- a/gschem/include/x_compselect.h
+++ b/gschem/include/x_compselect.h
@@ -61,6 +61,7 @@ struct _CompselectClass {
 struct _Compselect {
   GschemDialog parent_instance;
 
+  GtkWidget   *hpaned;
   GtkTreeView *libtreeview, *inusetreeview;
   GtkNotebook *viewtabs;
   Preview     *preview;
diff --git a/gschem/src/x_compselect.c b/gschem/src/x_compselect.c
index 37ff055..f8c2e0b 100644
--- a/gschem/src/x_compselect.c
+++ b/gschem/src/x_compselect.c
@@ -945,17 +945,76 @@ compselect_get_type ()
   return compselect_type;
 }
 
+#if GLIB_CHECK_VERSION(2,6,0)
+
+/*! \brief GschemDialog "geometry_save" class method handler
+ *
+ *  \par Function Description
+ *  Chain up to our parent's method to save the dialog's size and
+ *  position, then save the dialog's current internal geometry.
+ *
+ *  \param [in] dialog     The GschemDialog to save the geometry of.
+ *  \param [in] key_file   The GKeyFile to save the geometry data to.
+ *  \param [in] group_name The group name in the key file to store the data under.
+ */
+static void
+compselect_geometry_save (GschemDialog *dialog, GKeyFile *key_file, gchar *group_name)
+{
+  int position;
+
+  /* Call the parent's geometry_save method */
+  GSCHEM_DIALOG_CLASS (compselect_parent_class)->
+    geometry_save (dialog, key_file, group_name);
+
+  position = gtk_paned_get_position (GTK_PANED (COMPSELECT (dialog)->hpaned));
+  g_key_file_set_integer (key_file, group_name, "hpaned", position );
+}
+
+
+/*! \brief GschemDialog "geometry_restore" class method handler
+ *
+ *  \par Function Description
+ *  Chain up to our parent's method to restore the dialog's size and
+ *  position, then restore the dialog's current internal geometry.
+ *
+ *  \param [in] dialog     The GschemDialog to restore the geometry of.
+ *  \param [in] key_file   The GKeyFile to save the geometry data to.
+ *  \param [in] group_name The group name in the key file to store the data under.
+ */
+static void
+compselect_geometry_restore (GschemDialog *dialog, GKeyFile *key_file, gchar *group_name)
+{
+  int position;
+
+  /* Call the parent's geometry_restore method */
+  GSCHEM_DIALOG_CLASS (compselect_parent_class)->
+    geometry_restore (dialog, key_file, group_name);
+
+  position = g_key_file_get_integer (key_file, group_name, "hpaned", NULL);
+  if (position != 0)
+    gtk_paned_set_position (GTK_PANED (COMPSELECT (dialog)->hpaned), position);
+}
+
+#endif   /* !GLIB_CHECK_VERSION(2,6,0) */
+
 static void
 compselect_class_init (CompselectClass *klass)
 {
   GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
 
-  compselect_parent_class = g_type_class_peek_parent (klass);
-  
+#if GLIB_CHECK_VERSION(2,6,0)
+  GschemDialogClass *gschem_dialog_class = GSCHEM_DIALOG_CLASS (klass);
+
+  gschem_dialog_class->geometry_save    = compselect_geometry_save;
+  gschem_dialog_class->geometry_restore = compselect_geometry_restore;
+#endif
+
   gobject_class->finalize     = compselect_finalize;
   gobject_class->set_property = compselect_set_property;
   gobject_class->get_property = compselect_get_property;
 
+  compselect_parent_class = g_type_class_peek_parent (klass);
+
   g_object_class_install_property (
     gobject_class, PROP_SYMBOL,
     g_param_spec_pointer ("symbol",
@@ -1010,6 +1069,7 @@ compselect_init (Compselect *compselect)
                                     /* GtkContainer */
                                     "border-width", 5,
                                      NULL));
+  compselect->hpaned = hpaned;
 
   /* notebook for library and inuse views */
   notebook = GTK_WIDGET (g_object_new (GTK_TYPE_NOTEBOOK,

commit a139f2ed1ec50ad2a0fec4e91c7e51dd690d983a
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sat Jul 21 19:16:24 2007 +0100

    Extend GschemDialog to allow hooking to save/restore internal geometry
    
    GschemDialog now emits "geometry-save" and "geometry-restore" signals
    which instances can connect to. Subclasses may over-ride and chain the
    "geometry_save" and "geometry_restore" class members. These signal handlers
    are passed a pointer to the GKeyFile and a text string identifying the
    group it expects data to be saved under.
    
    The code relies on features only available in GLIB 2.6 onwards. When using
    this functionality the code must be surrounded with an appropriate test as
    the class functions are not defined when compiling against an older GLIB.

diff --git a/gschem/include/gschem_dialog.h b/gschem/include/gschem_dialog.h
index bffd5b0..bf49e4f 100644
--- a/gschem/include/gschem_dialog.h
+++ b/gschem/include/gschem_dialog.h
@@ -34,6 +34,16 @@ typedef struct _GschemDialog      GschemDialog;
 
 struct _GschemDialogClass {
   GtkDialogClass parent_class;
+
+#if GLIB_CHECK_VERSION(2,6,0)
+  void (*geometry_save)    (GschemDialog *dialog,
+                            GKeyFile *key_file,
+                            gchar *group_name);
+  void (*geometry_restore) (GschemDialog *dialog,
+                            GKeyFile *key_file,
+                            gchar *group_name);
+#endif
+
 };
 
 struct _GschemDialog {
diff --git a/gschem/src/gschem_dialog.c b/gschem/src/gschem_dialog.c
index 22c4188..ec28037 100644
--- a/gschem/src/gschem_dialog.c
+++ b/gschem/src/gschem_dialog.c
@@ -20,6 +20,7 @@
 
 #include <config.h>
 
+#include <glib-object.h>
 #include <glib/gstdio.h>
 
 #include <libgeda/libgeda.h>
@@ -33,15 +34,62 @@
 #include <dmalloc.h>
 #endif
 
+
 #include "../include/gschem_dialog.h"
 
+/* Signal marshaller based on generated code from glib-genmarshal */
+static void
+gschem_marshal_VOID__POINTER_STRING (GClosure     *closure,
+                                     GValue       *return_value,
+                                     guint         n_param_values,
+                                     const GValue *param_values,
+                                     gpointer      invocation_hint,
+                                     gpointer      marshal_data)
+{
+  typedef void (*GMarshalFunc_VOID__POINTER_STRING) (gpointer     data1,
+                                                     gpointer     arg_1,
+                                                     gpointer     arg_2,
+                                                     gpointer     data2);
+  register GMarshalFunc_VOID__POINTER_STRING callback;
+  register GCClosure *cc = (GCClosure*) closure;
+  register gpointer data1, data2;
+
+  g_return_if_fail (n_param_values == 3);
+
+  if (G_CCLOSURE_SWAP_DATA (closure)) {
+    data1 = closure->data;
+    data2 = g_value_peek_pointer (param_values + 0);
+  } else {
+    data1 = g_value_peek_pointer (param_values + 0);
+    data2 = closure->data;
+  }
+  callback = (GMarshalFunc_VOID__POINTER_STRING) (marshal_data ? marshal_data : cc->callback);
+
+  callback (data1,
+            g_value_get_pointer (param_values + 1),
+            (gchar*)g_value_get_string (param_values + 2),
+            data2);
+}
+/* End section based on generated code from glib-genmashal */
+
+
+enum {
+  PROP_SETTINGS_NAME = 1,
+  PROP_TOPLEVEL
+};
+
+
+enum {
+  GEOMETRY_SAVE,
+  GEOMETRY_RESTORE,
+  LAST_SIGNAL
+};
 
-#if !GLIB_CHECK_VERSION(2,6,0)
+static guint gschem_dialog_signals[ LAST_SIGNAL ] = { 0 };
+static GObjectClass *gschem_dialog_parent_class = NULL;
 
-static inline void save_geometry (GschemDialog *dialog) { }
-static inline void restore_geometry (GschemDialog *dialog) { }
 
-#else
+#if GLIB_CHECK_VERSION(2,6,0)
 
 static GKeyFile *dialog_geometry = NULL;
 
@@ -70,100 +118,90 @@ static void save_geometry_to_file(gpointer user_data)
 }
 
 
-/*! \brief Save dialog's current position and size.
+/*! \brief GschemDialog "geometry_save" class method handler
  *
  *  \par Function Description
- *  Save the dialog's current position and size.
- *  The dialog is referenced by its unique name (the
- *  "settings-name" property).
+ *  Save the dialog's current position and size to the passed GKeyFile
  *
- *  \param [in] dialog  The GschemDialog to save the position and size of.
+ *  \param [in] dialog     The GschemDialog to save the position and size of.
+ *  \param [in] key_file   The GKeyFile to save the geometry data to.
+ *  \param [in] group_name The group name in the key file to store the data under.
  */
-static void save_geometry (GschemDialog *dialog)
+static void geometry_save (GschemDialog *dialog, GKeyFile *key_file, gchar* group_name)
 {
   gint x, y, width, height;
-  gchar *name;
-
-  name = dialog->settings_name;
-  if (name == NULL) return;
-
-  g_assert( dialog_geometry != NULL );
 
   gtk_window_get_position (GTK_WINDOW (dialog), &x, &y);
   gtk_window_get_size (GTK_WINDOW (dialog), &width, &height);
 
-  g_key_file_set_integer (dialog_geometry, name, "x", x);
-  g_key_file_set_integer (dialog_geometry, name, "y", y);
-  g_key_file_set_integer (dialog_geometry, name, "width",  width );
-  g_key_file_set_integer (dialog_geometry, name, "height", height);
+  g_key_file_set_integer (key_file, group_name, "x", x);
+  g_key_file_set_integer (key_file, group_name, "y", y);
+  g_key_file_set_integer (key_file, group_name, "width",  width );
+  g_key_file_set_integer (key_file, group_name, "height", height);
 }
 
 
-/*! \brief Restore dialog's last position and size.
+/*! \brief GschemDialog "geometry_restore" class method handler
  *
  *  \par Function Description
- *  Restore dialog's last position and size.
- *  If the dialog is unknown, do nothing.
+ *  Restore dialog's last position and size from the passed GKeyFile
  *
- *  \param [in] dialog  The GschemDialog to restore the position and size of.
+ *  \param [in] dialog     The GschemDialog to restore the position and size of.
+ *  \param [in] key_file   The GKeyFile to load the geometry data from.
+ *  \param [in] group_name The group name in the key file to find the data under.
  */
-static void restore_geometry (GschemDialog *dialog)
+static void geometry_restore (GschemDialog *dialog, GKeyFile *key_file, gchar* group_name)
 {
-  gchar *name;
   gint x, y, width, height;
 
-  name = dialog->settings_name;
-  if (name == NULL) return;
+  x      = g_key_file_get_integer (key_file, group_name, "x", NULL);
+  y      = g_key_file_get_integer (key_file, group_name, "y", NULL);
+  width  = g_key_file_get_integer (key_file, group_name, "width",  NULL);
+  height = g_key_file_get_integer (key_file, group_name, "height", NULL);
 
-  if (!dialog_geometry) {
-    gchar *file = g_build_filename (g_get_home_dir (), ".gEDA",
-                                    DIALOG_GEOMETRY_STORE, NULL);
+  gtk_window_move (GTK_WINDOW (dialog), x, y);
+  gtk_window_resize (GTK_WINDOW (dialog), width, height);
+}
 
-    dialog_geometry = g_key_file_new();
 
-    /* Remember to save data on program exit */
-    gschem_atexit(save_geometry_to_file, NULL);
+/*! \brief Setup the GKeyFile for saving / restoring geometry
+ *
+ *  \par Function Description
+ *  Check if the GKeyFile for saving / restoring geometry is open.
+ *  If it doesn't exist, we create it here, and also install a hook
+ *  to ensure its contents are saved at program exit.
+ */
+static void setup_keyfile ()
+{
+  if (dialog_geometry != NULL)
+    return;
 
-    if (!g_file_test (file, G_FILE_TEST_EXISTS)) {
-      gchar *dir = g_build_filename (g_get_home_dir (), ".gEDA", NULL);
-      g_mkdir (dir, S_IRWXU | S_IRWXG);
-      g_free (dir);
+  gchar *file = g_build_filename (g_get_home_dir (), ".gEDA",
+                                  DIALOG_GEOMETRY_STORE, NULL);
 
-      g_file_set_contents (file, "", -1, NULL);
-    }
+  dialog_geometry = g_key_file_new();
 
-    if (!g_key_file_load_from_file (dialog_geometry, file, G_KEY_FILE_NONE, NULL)) {
-      /* error opening key file, create an empty one and try again */
-      g_file_set_contents (file, "", -1, NULL);
-      if ( !g_key_file_load_from_file (dialog_geometry, file, G_KEY_FILE_NONE, NULL)) {
-         g_free (file);
-         return;
-      }
-    }
-    g_free (file);
-  }
+  /* Remember to save data on program exit */
+  gschem_atexit(save_geometry_to_file, NULL);
 
-  if (g_key_file_has_group (dialog_geometry, name)) {
-    x = g_key_file_get_integer (dialog_geometry, name, "x", NULL);
-    y = g_key_file_get_integer (dialog_geometry, name, "y", NULL);
-    width  = g_key_file_get_integer (dialog_geometry, name, "width",  NULL);
-    height = g_key_file_get_integer (dialog_geometry, name, "height", NULL);
+  if (!g_file_test (file, G_FILE_TEST_EXISTS)) {
+    gchar *dir = g_build_filename (g_get_home_dir (), ".gEDA", NULL);
+    g_mkdir (dir, S_IRWXU | S_IRWXG);
+    g_free (dir);
 
-    gtk_window_move (GTK_WINDOW (dialog), x, y);
-    gtk_window_resize (GTK_WINDOW (dialog), width, height);
+    g_file_set_contents (file, "", -1, NULL);
   }
-}
-
-#endif   /* !GLIB_CHECK_VERSION(2,6,0) */
-
-
-enum {
-  PROP_SETTINGS_NAME = 1,
-  PROP_TOPLEVEL
-};
 
-
-static GObjectClass *gschem_dialog_parent_class = NULL;
+  if (!g_key_file_load_from_file (dialog_geometry, file, G_KEY_FILE_NONE, NULL)) {
+    /* error opening key file, create an empty one and try again */
+    g_file_set_contents (file, "", -1, NULL);
+    if ( !g_key_file_load_from_file (dialog_geometry, file, G_KEY_FILE_NONE, NULL)) {
+       g_free (file);
+       return;
+    }
+  }
+  g_free (file);
+}
 
 
 /*! \brief GtkWidget show signal handler
@@ -176,9 +214,19 @@ static GObjectClass *gschem_dialog_parent_class = NULL;
  */
 static void show_handler (GtkWidget *widget)
 {
+  gchar *group_name;
   GschemDialog *dialog = GSCHEM_DIALOG( widget );
 
-  restore_geometry (dialog);
+  group_name = dialog->settings_name;
+  if (group_name != NULL) {
+
+    setup_keyfile ();
+    g_assert( dialog_geometry != NULL );
+    if (g_key_file_has_group (dialog_geometry, group_name)) {
+      g_signal_emit (dialog, gschem_dialog_signals[ GEOMETRY_RESTORE ], 0,
+                     dialog_geometry, group_name);
+    }
+  }
 
   /* Let GTK show the window */
   GTK_WIDGET_CLASS (gschem_dialog_parent_class)->show (widget);
@@ -197,14 +245,23 @@ static void show_handler (GtkWidget *widget)
  */
 static void unmap_handler (GtkWidget *widget)
 {
+  gchar *group_name;
   GschemDialog *dialog = GSCHEM_DIALOG (widget);
 
-  save_geometry (dialog);
+  group_name = dialog->settings_name;
+  if (group_name != NULL) {
+
+    g_assert( dialog_geometry != NULL );
+    g_signal_emit (dialog, gschem_dialog_signals[ GEOMETRY_SAVE ], 0,
+                   dialog_geometry, group_name);
+  }
 
   /* Let GTK unmap the window */
   GTK_WIDGET_CLASS (gschem_dialog_parent_class)->unmap (widget);
 }
 
+#endif   /* !GLIB_CHECK_VERSION(2,6,0) */
+
 
 /*! \brief GObject finalise handler
  *
@@ -307,18 +364,52 @@ static void gschem_dialog_init (GschemDialog *dialog)
  */
 static void gschem_dialog_class_init (GschemDialogClass *klass)
 {
+  GObjectClass     *gobject_class = G_OBJECT_CLASS (klass);
+
+#if GLIB_CHECK_VERSION(2,6,0)
   GtkWidgetClass *gtkwidget_class = GTK_WIDGET_CLASS (klass);
-  GObjectClass     *gobject_class =   G_OBJECT_CLASS (klass);
 
-  gschem_dialog_parent_class = g_type_class_peek_parent (klass);
+  klass->geometry_save         = geometry_save;
+  klass->geometry_restore      = geometry_restore;
 
   gtkwidget_class->show        = show_handler;
   gtkwidget_class->unmap       = unmap_handler;
+#endif
 
   gobject_class->finalize      = gschem_dialog_finalize;
   gobject_class->set_property  = gschem_dialog_set_property;
   gobject_class->get_property  = gschem_dialog_get_property;
 
+  gschem_dialog_parent_class = g_type_class_peek_parent (klass);
+
+  gschem_dialog_signals[ GEOMETRY_SAVE ] =
+    g_signal_new ("geometry-save",
+                  G_OBJECT_CLASS_TYPE( gobject_class ),
+                  G_SIGNAL_RUN_FIRST,     /*signal_flags */
+                  G_STRUCT_OFFSET( GschemDialogClass, geometry_save ),
+                  NULL, /* accumulator */
+                  NULL, /* accu_data */
+                  gschem_marshal_VOID__POINTER_STRING,
+                  G_TYPE_NONE,
+                  2,    /* n_params */
+                  G_TYPE_POINTER,
+                  G_TYPE_STRING
+                 );
+
+  gschem_dialog_signals[ GEOMETRY_RESTORE ] =
+    g_signal_new ("geometry-restore",
+                  G_OBJECT_CLASS_TYPE( gobject_class ),
+                  G_SIGNAL_RUN_FIRST,     /*signal_flags */
+                  G_STRUCT_OFFSET( GschemDialogClass, geometry_restore ),
+                  NULL, /* accumulator */
+                  NULL, /* accu_data */
+                  gschem_marshal_VOID__POINTER_STRING,
+                  G_TYPE_NONE,
+                  2,    /* n_params */
+                  G_TYPE_POINTER,
+                  G_TYPE_STRING
+                 );
+
   g_object_class_install_property (
     gobject_class, PROP_SETTINGS_NAME,
     g_param_spec_string ("settings-name",

commit 91ffb796f41ca6ee7a5ed1063917f7bb3fd03464
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sat Jul 21 19:16:09 2007 +0100

    Separate the list and preview with a GtkHPaned in the compselect dialog.

diff --git a/gschem/src/x_compselect.c b/gschem/src/x_compselect.c
index df11b1b..37ff055 100644
--- a/gschem/src/x_compselect.c
+++ b/gschem/src/x_compselect.c
@@ -694,6 +694,8 @@ create_inuse_treeview (Compselect *compselect)
   /* Create a scrolled window to accomodate the treeview */
   scrolled_win = GTK_WIDGET (
     g_object_new (GTK_TYPE_SCROLLED_WINDOW,
+                  /* GtkContainer */
+                  "border-width", 5,
                   /* GtkScrolledWindow */
                   "hscrollbar-policy", GTK_POLICY_AUTOMATIC,
                   "vscrollbar-policy", GTK_POLICY_ALWAYS,
@@ -981,7 +983,7 @@ compselect_class_init (CompselectClass *klass)
 static void
 compselect_init (Compselect *compselect)
 {
-  GtkWidget *hbox, *notebook;
+  GtkWidget *hpaned, *notebook;
   GtkWidget *libview, *inuseview;
   GtkWidget *preview, *combobox;
   
@@ -1003,12 +1005,11 @@ compselect_init (Compselect *compselect)
                 "homogeneous", FALSE,
                 NULL);
 
-  /* horizontal box selection and preview */
-  hbox = GTK_WIDGET (g_object_new (GTK_TYPE_HBOX,
-                                   /* GtkBox */
-                                   "homogeneous", FALSE,
-                                   "spacing",     5,
-                                   NULL));
+  /* horizontal pane containing selection and preview */
+  hpaned = GTK_WIDGET (g_object_new (GTK_TYPE_HPANED,
+                                    /* GtkContainer */
+                                    "border-width", 5,
+                                     NULL));
 
   /* notebook for library and inuse views */
   notebook = GTK_WIDGET (g_object_new (GTK_TYPE_NOTEBOOK,
@@ -1024,14 +1025,11 @@ compselect_init (Compselect *compselect)
                             gtk_label_new (_("Libraries")));
 
   /* include the vertical box in horizontal box */
-  gtk_box_pack_start (GTK_BOX (hbox), notebook,
-                      TRUE, TRUE, 0);
+  gtk_paned_pack1 (GTK_PANED (hpaned), notebook, TRUE, FALSE);
 
                      
   /* -- preview area -- */
   frame = GTK_WIDGET (g_object_new (GTK_TYPE_FRAME,
-                                    /* GtkContainer */
-                                    "border-width", 5,
                                     /* GtkFrame */
                                     "label",        _("Preview"),
                                     NULL));
@@ -1052,14 +1050,13 @@ compselect_init (Compselect *compselect)
   gtk_container_add (GTK_CONTAINER (frame), alignment);
   /* set preview of compselect */
   compselect->preview = PREVIEW (preview);
-  
-  gtk_box_pack_start (GTK_BOX (hbox), frame,
-                      FALSE, TRUE, 0);
 
-  /* add the hbox to the dialog vbox */
-  gtk_box_pack_start (GTK_BOX (GTK_DIALOG (compselect)->vbox), hbox,
+  gtk_paned_pack2 (GTK_PANED (hpaned), frame, FALSE, FALSE);
+
+  /* add the hpaned to the dialog vbox */
+  gtk_box_pack_start (GTK_BOX (GTK_DIALOG (compselect)->vbox), hpaned,
                       TRUE, TRUE, 0);
-  gtk_widget_show_all (hbox);
+  gtk_widget_show_all (hpaned);
   
 
   /* -- behavior combo box -- */




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs