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

gEDA-cvs: CVS update: Makefile.am



  User: pcjc2   
  Date: 07/05/29 19:06:05

  Modified:    .        Makefile.am x_attribedit.c x_autonumber.c
                        x_compselect.c x_dialog.c x_log.c x_multiattrib.c
                        x_pagesel.c x_print.c
  Log:
  Applied patch by Ivan Stankovic making dialogs within gschem save
  
  their position and size on exit and restore it on opening.
  
  Geometry is saved to {$HOME}/.gEDA/gschem-dialog-geometry
  
  
  
  Dialogs inherit this functionality by using, or deriving from the
  
  new GschemDialog class (A GtkDialog subclass).
  
  
  
  
  Revision  Changes    Path
  1.48                 eda/geda/gaf/gschem/src/Makefile.am
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Makefile.am
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/Makefile.am,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -b -r1.47 -r1.48
  --- Makefile.am	12 Dec 2006 18:11:39 -0000	1.47
  +++ Makefile.am	29 May 2007 23:06:05 -0000	1.48
  @@ -22,7 +22,8 @@
   	x_pagesel.c x_print.c x_window.c x_stroke.c x_image.c x_color.c \
   	x_compselect.c x_fileselect.c x_preview.c x_attribedit.c \
   	x_multiattrib.c \
  -	parsecmd.c o_cue.c
  +	parsecmd.c o_cue.c \
  +	gschem_dialog.c
   
   if CCISGCC
   AM_CFLAGS = -Wall
  
  
  
  1.13                 eda/geda/gaf/gschem/src/x_attribedit.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: x_attribedit.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_attribedit.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -b -r1.12 -r1.13
  --- x_attribedit.c	21 Apr 2007 18:59:07 -0000	1.12
  +++ x_attribedit.c	29 May 2007 23:06:05 -0000	1.13
  @@ -33,6 +33,7 @@
   #include "../include/i_vars.h"
   #include "../include/globals.h"
   #include "../include/prototype.h"
  +#include "../include/gschem_dialog.h"
   #include "../include/x_dialog.h"
   
   #ifdef HAVE_LIBDMALLOC
  @@ -322,9 +323,10 @@
       }
     }
   
  -  aewindow = gtk_dialog_new_with_buttons(_("Single Attribute Editor"),
  +  aewindow = gschem_dialog_new_with_buttons(_("Single Attribute Editor"),
   					 GTK_WINDOW(w_current->main_window),
   					 GTK_DIALOG_MODAL,
  +                                            "singleattrib", w_current,
   					 GTK_STOCK_CANCEL,
   					 GTK_RESPONSE_REJECT,
   					 GTK_STOCK_OK,
  
  
  
  1.15                 eda/geda/gaf/gschem/src/x_autonumber.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: x_autonumber.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_autonumber.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -b -r1.14 -r1.15
  --- x_autonumber.c	21 Apr 2007 18:59:07 -0000	1.14
  +++ x_autonumber.c	29 May 2007 23:06:05 -0000	1.15
  @@ -34,6 +34,7 @@
   #include "../include/i_vars.h"
   #include "../include/globals.h"
   #include "../include/prototype.h"
  +#include "../include/gschem_dialog.h"
   #include "../include/x_dialog.h"
   
   #ifdef HAVE_LIBDMALLOC
  @@ -1216,9 +1217,10 @@
     GtkWidget *label3;
   
   
  -  autonumber_text = gtk_dialog_new_with_buttons(_("Autonumber text"),
  +  autonumber_text = gschem_dialog_new_with_buttons(_("Autonumber text"),
   						GTK_WINDOW(w_current->main_window),
   						0, /* not modal */
  +                                                   "autonumber", w_current,
   						GTK_STOCK_CLOSE,
   						GTK_RESPONSE_REJECT,
   						GTK_STOCK_APPLY,
  
  
  
  1.22                 eda/geda/gaf/gschem/src/x_compselect.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: x_compselect.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_compselect.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -b -r1.21 -r1.22
  --- x_compselect.c	28 May 2007 07:42:19 -0000	1.21
  +++ x_compselect.c	29 May 2007 23:06:05 -0000	1.22
  @@ -46,8 +46,8 @@
   #include <dmalloc.h>
   #endif
   
  +#include "../include/gschem_dialog.h"
   #include "../include/x_preview.h"
  -
   #include "../include/x_compselect.h"
   
   /*! \def COMPSELECT_FILTER_INTERVAL
  @@ -182,6 +182,9 @@
     if (toplevel->cswindow == NULL) {
       toplevel->cswindow = GTK_WIDGET (
         g_object_new (TYPE_COMPSELECT,
  +                    /* GschemDialog */
  +                    "settings-name", "compselect",
  +                    "toplevel",      toplevel,
                       NULL));
   
       g_signal_connect (toplevel->cswindow,
  @@ -636,7 +639,7 @@
         (GInstanceInitFunc) compselect_init,
       };
                   
  -    compselect_type = g_type_register_static (GTK_TYPE_DIALOG,
  +    compselect_type = g_type_register_static (GSCHEM_TYPE_DIALOG,
                                                 "Compselect",
                                                 &compselect_info, 0);
     }
  
  
  
  1.87                 eda/geda/gaf/gschem/src/x_dialog.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: x_dialog.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_dialog.c,v
  retrieving revision 1.86
  retrieving revision 1.87
  diff -u -b -r1.86 -r1.87
  --- x_dialog.c	21 Apr 2007 18:59:07 -0000	1.86
  +++ x_dialog.c	29 May 2007 23:06:05 -0000	1.87
  @@ -33,6 +33,7 @@
   #include "../include/globals.h"
   #include "../include/prototype.h"
   #include "../include/x_dialog.h"
  +#include "../include/gschem_dialog.h"
   
   #ifdef HAVE_LIBDMALLOC
   #include <dmalloc.h>
  @@ -179,9 +180,10 @@
     int real_tab_width;
   
     if (!w_current->tiwindow) { /* dialog not created yet */
  -    w_current->tiwindow = gtk_dialog_new_with_buttons(_("Text Entry..."),
  +    w_current->tiwindow = gschem_dialog_new_with_buttons(_("Text Entry..."),
   						      GTK_WINDOW(w_current->main_window),
   						      0, /* NON_MODAL */
  +                                                         "text-entry", w_current,
   						      GTK_STOCK_CLOSE,
   						      GTK_RESPONSE_REJECT,
   						      GTK_STOCK_APPLY,
  @@ -503,9 +505,10 @@
     int select_index=0;
   
     if (!w_current->tewindow) {
  -    w_current->tewindow = gtk_dialog_new_with_buttons(_("Edit Text Properties"),
  +    w_current->tewindow = gschem_dialog_new_with_buttons(_("Edit Text Properties"),
   						      GTK_WINDOW(w_current->main_window),
   						      GTK_DIALOG_MODAL,
  +                                                         "text-edit", w_current,
   						      GTK_STOCK_CANCEL,
   						      GTK_RESPONSE_REJECT,
   						      GTK_STOCK_OK,
  @@ -867,9 +870,10 @@
     line_type_data = (struct line_type_data*) g_malloc (
       sizeof (struct line_type_data));
   
  -  dialog = gtk_dialog_new_with_buttons(_("Edit Line Width & Type"),
  +  dialog = gschem_dialog_new_with_buttons(_("Edit Line Width & Type"),
   				       GTK_WINDOW(w_current->main_window),
   				       GTK_DIALOG_MODAL,
  +                                          "line-type", w_current,
   				       GTK_STOCK_CANCEL,
   				       GTK_RESPONSE_REJECT,
   				       GTK_STOCK_OK,
  @@ -1253,9 +1257,10 @@
     fill_type_data = (struct fill_type_data*) g_malloc (
       sizeof (struct fill_type_data));
   
  -  dialog = gtk_dialog_new_with_buttons(_("Edit Fill Type"),
  +  dialog = gschem_dialog_new_with_buttons(_("Edit Fill Type"),
   				       GTK_WINDOW(w_current->main_window),
   				       GTK_DIALOG_MODAL,
  +                                          "fill-type", w_current,
   				       GTK_STOCK_CANCEL,
   				       GTK_RESPONSE_REJECT,
   				       GTK_STOCK_OK,
  @@ -1474,9 +1479,10 @@
     GtkWidget *spin_start, *spin_sweep;
   
     if (!w_current->aawindow) {
  -    w_current->aawindow = gtk_dialog_new_with_buttons(_("Arc Params"),
  +    w_current->aawindow = gschem_dialog_new_with_buttons(_("Arc Params"),
   						      GTK_WINDOW(w_current->main_window),
   						      GTK_DIALOG_MODAL,
  +                                                         "arc-angle", w_current,
   						      GTK_STOCK_CANCEL,
   						      GTK_RESPONSE_REJECT,
   						      GTK_STOCK_OK,
  @@ -1594,9 +1600,10 @@
     GtkWidget *vbox;
   
     if (!w_current->trwindow) {
  -    w_current->trwindow = gtk_dialog_new_with_buttons(_("Translate"),
  +    w_current->trwindow = gschem_dialog_new_with_buttons(_("Translate"),
   						      GTK_WINDOW(w_current->main_window),
   						      GTK_DIALOG_MODAL,
  +                                                         "translate", w_current,
   						      GTK_STOCK_CANCEL,
   						      GTK_RESPONSE_REJECT,
   						      GTK_STOCK_OK,
  @@ -1693,9 +1700,10 @@
     GtkWidget *spin_size;
   
     if (!w_current->tswindow) {
  -    w_current->tswindow = gtk_dialog_new_with_buttons(_("Text Size"),
  +    w_current->tswindow = gschem_dialog_new_with_buttons(_("Text Size"),
                                                         GTK_WINDOW(w_current->main_window),
                                                         GTK_DIALOG_MODAL,
  +                                                         "text-size", w_current,
                                                         GTK_STOCK_CANCEL,
                                                         GTK_RESPONSE_REJECT,
                                                         GTK_STOCK_OK,
  @@ -1799,9 +1807,10 @@
     GtkWidget *spin_size;
   
     if (!w_current->tswindow) {
  -    w_current->tswindow = gtk_dialog_new_with_buttons(_("Snap Size"),
  +    w_current->tswindow = gschem_dialog_new_with_buttons(_("Snap Size"),
                                                         GTK_WINDOW(w_current->main_window),
                                                         GTK_DIALOG_MODAL,
  +                                                         "snap-size", w_current,
                                                         GTK_STOCK_CANCEL,
                                                         GTK_RESPONSE_REJECT,
                                                         GTK_STOCK_OK,
  @@ -1903,9 +1912,10 @@
     GtkWidget *vbox;
   
     if (!w_current->sewindow) {
  -    w_current->sewindow = gtk_dialog_new_with_buttons(_("Edit slot number"),
  +    w_current->sewindow = gschem_dialog_new_with_buttons(_("Edit slot number"),
   						      GTK_WINDOW(w_current->main_window),
   						      GTK_DIALOG_MODAL,
  +                                                         "slot-edit", w_current,
   						      GTK_STOCK_CANCEL,
   						      GTK_RESPONSE_REJECT,
   						      GTK_STOCK_OK,
  @@ -1997,9 +2007,10 @@
     char *string;
   
     if (!w_current->abwindow) {
  -    w_current->abwindow = gtk_dialog_new_with_buttons(_("About..."),
  +    w_current->abwindow = gschem_dialog_new_with_buttons(_("About..."),
   						      GTK_WINDOW(w_current->main_window),
   						      GTK_DIALOG_MODAL,
  +                                                         "about", w_current,
   						      GTK_STOCK_CLOSE,
   						      GTK_RESPONSE_REJECT,
   						      NULL);
  @@ -2090,9 +2101,10 @@
     GtkWidget *vbox;
   
     if (!w_current->cowindow) {
  -    w_current->cowindow = gtk_dialog_new_with_buttons(_("Coords"),
  +    w_current->cowindow = gschem_dialog_new_with_buttons(_("Coords"),
   						      GTK_WINDOW(w_current->main_window),
   						      0, /* Not modal GTK_DIALOG_MODAL */
  +                                                         "coord", w_current,
   						      GTK_STOCK_CLOSE,
   						      GTK_RESPONSE_REJECT,
   						      NULL);
  @@ -2405,9 +2417,10 @@
     int select_index = 0;
   
     if (!w_current->clwindow) {
  -    w_current->clwindow = gtk_dialog_new_with_buttons(_("Color Edit"),
  +    w_current->clwindow = gschem_dialog_new_with_buttons(_("Color Edit"),
   						      GTK_WINDOW(w_current->main_window),
   						      0, /* nonmodal dialog */
  +                                                         "color-edit", w_current,
   						      GTK_STOCK_CLOSE,
   						      GTK_RESPONSE_REJECT,
   						      GTK_STOCK_APPLY,
  @@ -2498,9 +2511,10 @@
     };
   
     if (!w_current->hkwindow) {
  -    w_current->hkwindow = gtk_dialog_new_with_buttons(_("Hotkeys"),
  +    w_current->hkwindow = gschem_dialog_new_with_buttons(_("Hotkeys"),
                                                         GTK_WINDOW(w_current->main_window),
                                                         0, /* not modal */
  +                                                         "hotkeys", w_current,
                                                         GTK_STOCK_CLOSE,
                                                         GTK_RESPONSE_REJECT,
                                                         NULL);
  @@ -2922,9 +2936,10 @@
     }
   
     if (!w_current->tfindwindow) {
  -    w_current->tfindwindow = gtk_dialog_new_with_buttons(_("Find Text"),
  +    w_current->tfindwindow = gschem_dialog_new_with_buttons(_("Find Text"),
   							 GTK_WINDOW(w_current->main_window),
   							 0, /* not modal GTK_DIALOG_MODAL */
  +                                                            "find-text", w_current,
   							 GTK_STOCK_CLOSE,
   							 GTK_RESPONSE_REJECT,
   							 GTK_STOCK_FIND,
  @@ -3028,9 +3043,10 @@
     GtkWidget *vbox;
   
     if (!w_current->thidewindow) {
  -    w_current->thidewindow = gtk_dialog_new_with_buttons(_("Hide Text"),
  +    w_current->thidewindow = gschem_dialog_new_with_buttons(_("Hide Text"),
   						      GTK_WINDOW(w_current->main_window),
   						      0, /* not modal GTK_DIALOG_MODAL, */
  +                                                           "hide-text", w_current,
   						      GTK_STOCK_CLOSE,
   						      GTK_RESPONSE_REJECT,
   						      GTK_STOCK_APPLY,
  @@ -3128,9 +3144,10 @@
     GtkWidget *vbox;
   
     if (!w_current->tshowwindow) {
  -    w_current->tshowwindow = gtk_dialog_new_with_buttons(_("Show Text"),
  +    w_current->tshowwindow = gschem_dialog_new_with_buttons(_("Show Text"),
   						      GTK_WINDOW(w_current->main_window),
   						      0, /* not modal GTK_DIALOG_MODAL, */
  +                                                            "show-text", w_current,
   						      GTK_STOCK_CLOSE,
   						      GTK_RESPONSE_REJECT,
   						      GTK_STOCK_APPLY,
  
  
  
  1.22                 eda/geda/gaf/gschem/src/x_log.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: x_log.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_log.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -b -r1.21 -r1.22
  --- x_log.c	21 Apr 2007 18:33:50 -0000	1.21
  +++ x_log.c	29 May 2007 23:06:05 -0000	1.22
  @@ -43,6 +43,7 @@
   #include <dmalloc.h>
   #endif
   
  +#include "../include/gschem_dialog.h"
   #include "../include/x_log.h"
   
   static void x_log_callback_response (GtkDialog *dialog,
  @@ -62,6 +63,9 @@
       gchar *contents;
       
       log_dialog = GTK_WIDGET (g_object_new (TYPE_LOG,
  +                                           /* GschemDialog */
  +                                           "settings-name", "log",
  +                                           /* "toplevel", TOPEVEL * */
                                              NULL));
   
       g_signal_connect (log_dialog,
  @@ -192,7 +196,7 @@
         (GInstanceInitFunc) log_init,
       };
   		
  -    log_type = g_type_register_static (GTK_TYPE_DIALOG,
  +    log_type = g_type_register_static (GSCHEM_TYPE_DIALOG,
                                          "Log",
                                          &log_info, 0);
     }
  
  
  
  1.10                 eda/geda/gaf/gschem/src/x_multiattrib.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: x_multiattrib.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_multiattrib.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -b -r1.9 -r1.10
  --- x_multiattrib.c	21 Apr 2007 18:59:07 -0000	1.9
  +++ x_multiattrib.c	29 May 2007 23:06:05 -0000	1.10
  @@ -37,6 +37,7 @@
   #endif
   
   #include <gdk/gdkkeysyms.h>
  +#include "../include/gschem_dialog.h"
   #include "../include/x_multiattrib.h"
   
   /*! \brief Open multiple attribute editor dialog.
  @@ -55,13 +56,16 @@
     GtkWidget *dialog;
   
     dialog = GTK_WIDGET (g_object_new (TYPE_MULTIATTRIB,
  -                                     "toplevel", toplevel,
                                        "object", object,
  +                                     /* GschemDialog */
  +                                     "settings-name", "multiattrib",
  +                                     "toplevel", toplevel,
                                        NULL));
   
     gtk_window_set_transient_for(GTK_WINDOW(dialog),
   			       GTK_WINDOW(toplevel->main_window));
   
  +  multiattrib_update (MULTIATTRIB(dialog));
     gtk_widget_show (dialog);
     switch (gtk_dialog_run ((GtkDialog*)dialog)) {
         case MULTIATTRIB_RESPONSE_CLOSE:
  @@ -378,8 +382,7 @@
   
   
   enum {
  -  PROP_TOPLEVEL=1,
  -  PROP_OBJECT
  +  PROP_OBJECT = 1
   };
   
   enum {
  @@ -637,7 +640,7 @@
     gchar *name, *value, *newtext;
   
     model = gtk_tree_view_get_model (multiattrib->treeview);
  -  toplevel = multiattrib->toplevel;
  +  toplevel = GSCHEM_DIALOG (multiattrib)->toplevel;
   
     if (!gtk_tree_model_get_iter_from_string (model, &iter, arg1)) {
       return;
  @@ -692,7 +695,7 @@
     gchar *name, *value, *newtext;
   
     model = gtk_tree_view_get_model (multiattrib->treeview);
  -  toplevel = multiattrib->toplevel;
  +  toplevel = GSCHEM_DIALOG (multiattrib)->toplevel;
   
     if (!gtk_tree_model_get_iter_from_string (model, &iter, arg1)) {
       return;
  @@ -736,7 +739,7 @@
     gint visibility;
   
     model = gtk_tree_view_get_model (multiattrib->treeview);
  -  toplevel = multiattrib->toplevel;
  +  toplevel = GSCHEM_DIALOG (multiattrib)->toplevel;
   
     if (!gtk_tree_model_get_iter_from_string (model, &iter, path)) {
       return;
  @@ -778,7 +781,7 @@
     gint new_snv;
   
     model = gtk_tree_view_get_model (multiattrib->treeview);
  -  toplevel = multiattrib->toplevel;
  +  toplevel = GSCHEM_DIALOG (multiattrib)->toplevel;
   
     if (!gtk_tree_model_get_iter_from_string (model, &iter, path)) {
       return;
  @@ -827,7 +830,7 @@
     gint new_snv;
   
     model = gtk_tree_view_get_model (multiattrib->treeview);
  -  toplevel = multiattrib->toplevel;
  +  toplevel = GSCHEM_DIALOG (multiattrib)->toplevel;
   
     if (!gtk_tree_model_get_iter_from_string (model, &iter, path)) {
       return;
  @@ -889,7 +892,7 @@
                           -1);
       g_assert (o_attrib->type == OBJ_TEXT);
       
  -    multiattrib_action_delete_attribute (multiattrib->toplevel,
  +    multiattrib_action_delete_attribute (GSCHEM_DIALOG (multiattrib)->toplevel,
                                            o_attrib);
       
       /* update the treeview contents */
  @@ -955,7 +958,7 @@
       return;
     }
   
  -  toplevel = multiattrib->toplevel;
  +  toplevel = GSCHEM_DIALOG (multiattrib)->toplevel;
     object   = multiattrib->object;
     
     gtk_tree_model_get (model, &iter,
  @@ -991,7 +994,7 @@
       return;
     }
   
  -  toplevel = multiattrib->toplevel;
  +  toplevel = GSCHEM_DIALOG (multiattrib)->toplevel;
     
     gtk_tree_model_get (model, &iter,
                         COLUMN_ATTRIBUTE, &o_attrib,
  @@ -1081,7 +1084,7 @@
     gboolean visible;
     gint shownv;
   
  -  toplevel = multiattrib->toplevel;
  +  toplevel = GSCHEM_DIALOG (multiattrib)->toplevel;
     object   = multiattrib->object;
     buffer   = gtk_text_view_get_buffer (multiattrib->textview_value);
     
  @@ -1251,7 +1254,7 @@
         (GInstanceInitFunc) multiattrib_init,
       };
   		
  -    multiattrib_type = g_type_register_static (GTK_TYPE_DIALOG,
  +    multiattrib_type = g_type_register_static (GSCHEM_TYPE_DIALOG,
                                                  "Multiattrib",
                                                  &multiattrib_info, 0);
     }
  @@ -1272,12 +1275,6 @@
     gobject_class->get_property = multiattrib_get_property;
   
     g_object_class_install_property (
  -    gobject_class, PROP_TOPLEVEL,
  -    g_param_spec_pointer ("toplevel",
  -                          "",
  -                          "",
  -                          G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
  -  g_object_class_install_property (
       gobject_class, PROP_OBJECT,
       g_param_spec_pointer ("object",
                             "",
  @@ -1317,7 +1314,6 @@
                   "has-separator",   TRUE,
                   NULL);
   
  -  multiattrib->toplevel = NULL;
     multiattrib->object   = NULL;
   
     /* connect to the key-press-event of dialog */
  @@ -1608,9 +1604,6 @@
     Multiattrib *multiattrib = MULTIATTRIB (object);
   
     switch(property_id) {
  -      case PROP_TOPLEVEL:
  -        multiattrib->toplevel = (TOPLEVEL*)g_value_get_pointer (value);
  -        break;
         case PROP_OBJECT:
           multiattrib->object = (OBJECT*)g_value_get_pointer (value);
           multiattrib_update (multiattrib);
  @@ -1634,9 +1627,6 @@
     Multiattrib *multiattrib = MULTIATTRIB (object);
   
     switch(property_id) {
  -      case PROP_TOPLEVEL:
  -        g_value_set_pointer (value, (gpointer)multiattrib->toplevel);
  -        break;
         case PROP_OBJECT:
           g_value_set_pointer (value, (gpointer)multiattrib->object);
           break;
  @@ -1658,7 +1648,7 @@
     OBJECT **object_attribs, *o_current;
     gint i;
     
  -  if (multiattrib->toplevel == NULL ||
  +  if (GSCHEM_DIALOG (multiattrib)->toplevel == NULL ||
         multiattrib->object   == NULL) {
       /* we can not do anything until both toplevel and object are set */
       return;
  @@ -1671,7 +1661,7 @@
    
     /* get list of attributes */
     object_attribs = o_attrib_return_attribs (
  -    multiattrib->toplevel->page_current->object_head,
  +    GSCHEM_DIALOG (multiattrib)->toplevel->page_current->object_head,
       multiattrib->object);
     /* populate the store with attributes */
     if (object_attribs) {
  
  
  
  1.20                 eda/geda/gaf/gschem/src/x_pagesel.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: x_pagesel.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_pagesel.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -b -r1.19 -r1.20
  --- x_pagesel.c	21 Apr 2007 23:05:37 -0000	1.19
  +++ x_pagesel.c	29 May 2007 23:06:05 -0000	1.20
  @@ -35,6 +35,7 @@
   #include <dmalloc.h>
   #endif
   
  +#include "../include/gschem_dialog.h"
   #include "../include/x_pagesel.h"
   
   
  @@ -55,6 +56,8 @@
   {
     if (toplevel->pswindow == NULL) {
       toplevel->pswindow = GTK_WIDGET (g_object_new (TYPE_PAGESEL,
  +                                                   /* GschemDialog */
  +                                                   "settings-name", "pagesel",
                                                      "toplevel", toplevel,
                                                      NULL));
   
  @@ -133,10 +136,6 @@
   }
   
   enum {
  -  PROP_TOPLEVEL=1
  -};
  -
  -enum {
     COLUMN_PAGE,
     COLUMN_NAME,
     COLUMN_CHANGED,
  @@ -146,14 +145,6 @@
   
   static void pagesel_class_init (PageselClass *class);
   static void pagesel_init       (Pagesel *pagesel);
  -static void pagesel_set_property (GObject *object,
  -                                  guint property_id,
  -                                  const GValue *value,
  -                                  GParamSpec *pspec);
  -static void pagesel_get_property (GObject *object,
  -                                  guint property_id,
  -                                  GValue *value,
  -                                  GParamSpec *pspec);
   
   static void pagesel_popup_menu (Pagesel *pagesel,
                                   GdkEventButton *event);
  @@ -176,7 +167,7 @@
       return;
     }
   
  -  toplevel = pagesel->toplevel;
  +  toplevel = GSCHEM_DIALOG (pagesel)->toplevel;
     gtk_tree_model_get (model, &iter,
                         COLUMN_PAGE, &page,
                         -1);
  @@ -234,7 +225,7 @@
   pagesel_callback_popup_ ## name (GtkMenuItem *menuitem,           \
                                    gpointer user_data)              \
   {                                                                 \
  -  i_callback_ ## action (PAGESEL (user_data)->toplevel, 0, NULL); \
  +  i_callback_ ## action (GSCHEM_DIALOG (user_data)->toplevel, 0, NULL); \
   }
   
   DEFINE_POPUP_CALLBACK (new_page,     file_new)
  @@ -330,7 +321,7 @@
         (GInstanceInitFunc) pagesel_init,
       };
   		
  -    pagesel_type = g_type_register_static (GTK_TYPE_DIALOG,
  +    pagesel_type = g_type_register_static (GSCHEM_TYPE_DIALOG,
                                              "Pagesel",
                                              &pagesel_info, 0);
     }
  @@ -345,18 +336,6 @@
    */
   static void pagesel_class_init (PageselClass *klass)
   {
  -  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
  -
  -  gobject_class->set_property = pagesel_set_property;
  -  gobject_class->get_property = pagesel_get_property;
  -
  -  g_object_class_install_property (
  -    gobject_class, PROP_TOPLEVEL,
  -    g_param_spec_pointer ("toplevel",
  -                          "",
  -                          "",
  -                          G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
  -	
   }
   
   /*! \todo Finish function documentation!!!
  @@ -492,53 +471,10 @@
   					  -1);
   #endif
   
  -  
  -}
  -
  -/*! \todo Finish function documentation!!!
  - *  \brief
  - *  \par Function Description
  - *
  - */
  -static void pagesel_set_property (GObject *object,
  -				  guint property_id,
  -				  const GValue *value,
  -				  GParamSpec *pspec)
  -{
  -  Pagesel *pagesel = PAGESEL (object);
  -
  -  switch(property_id) {
  -      case PROP_TOPLEVEL:
  -        pagesel->toplevel = (TOPLEVEL*)g_value_get_pointer (value);
  -        pagesel_update (pagesel);
  -        break;
  -      default:
  -        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
  -  }
  -
  +  /* Strictly, this has the wrong prototype, but it doesn't matter */
  +  g_signal_connect( pagesel, "notify::toplevel", G_CALLBACK (pagesel_update), NULL );
   }
   
  -/*! \todo Finish function documentation!!!
  - *  \brief
  - *  \par Function Description
  - *
  - */
  -static void pagesel_get_property (GObject *object,
  -				  guint property_id,
  -				  GValue *value,
  -				  GParamSpec *pspec)
  -{
  -  Pagesel *pagesel = PAGESEL (object);
  -
  -  switch(property_id) {
  -      case PROP_TOPLEVEL:
  -        g_value_set_pointer (value, (gpointer)pagesel->toplevel);
  -        break;
  -      default:
  -        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
  -  }
  -
  -}
   
   /*! \brief Update tree model of <B>pagesel</B>'s treeview.
    *  \par Function Description
  @@ -628,9 +564,9 @@
   
     g_assert (IS_PAGESEL (pagesel));
   
  -  g_return_if_fail (pagesel->toplevel);
  +  g_return_if_fail (GSCHEM_DIALOG (pagesel)->toplevel);
   
  -  toplevel = pagesel->toplevel;
  +  toplevel = GSCHEM_DIALOG (pagesel)->toplevel;
     model    = gtk_tree_view_get_model (pagesel->treeview);
   
     /* wipe out every thing in the store */
  
  
  
  1.36                 eda/geda/gaf/gschem/src/x_print.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: x_print.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_print.c,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -b -r1.35 -r1.36
  --- x_print.c	21 Apr 2007 20:33:54 -0000	1.35
  +++ x_print.c	29 May 2007 23:06:05 -0000	1.36
  @@ -30,6 +30,7 @@
   
   #include "../include/globals.h"
   #include "../include/prototype.h"
  +#include "../include/gschem_dialog.h"
   #include "../include/x_print.h"
   
   #ifdef HAVE_LIBDMALLOC
  @@ -675,7 +676,7 @@
   	0,			/* n_preallocs */
   	(GInstanceInitFunc) print_dialog_init,
         };
  -      print_dialog_type = g_type_register_static (GTK_TYPE_DIALOG,
  +      print_dialog_type = g_type_register_static (GSCHEM_TYPE_DIALOG,
   						  "PrintDialog",
   						  &print_dialog_info, 0);
       }
  @@ -735,6 +736,9 @@
   						"orientation", orient,
   						"type", type,
   						"usefile", usefile,
  +                                     /* GschemDialog */
  +                                     "settings-name", "print",
  +                                     "toplevel", w_current,
   						 NULL));
     gtk_widget_show_all (GTK_WIDGET (dialog));
   
  
  
  


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