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

gEDA-cvs: branch: master updated (1.3.0-20071229-20-gcf1ebff)



The branch, master has been updated
       via  cf1ebffc8fc1634dc82cfd3a5e2748edadea4565 (commit)
       via  8333e806fef245815235d8f96a81fcd06b96dfa4 (commit)
       via  3ae9c752b203ddc66b94c3f6cda352ee9306f13d (commit)
      from  09c5d9fe73e0874b8b86b50c1ddc552254ee8661 (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/prototype.h |    1 +
 gschem/src/i_callbacks.c   |    6 ++++++
 gschem/src/o_basic.c       |    8 ++++++--
 gschem/src/x_compselect.c  |   38 +++++++++++++++++++++++++++++++++-----
 4 files changed, 46 insertions(+), 7 deletions(-)


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

commit cf1ebffc8fc1634dc82cfd3a5e2748edadea4565
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Fri Jan 4 20:26:24 2008 +0000

    Remove "Apply" button from the component selector.
    
    As the component list is de-selected when placement mode is cancelled,
    the action of re-selecting a component to place switches back to this
    mode without the need for an explit "Apply" button.

:100644 100644 9197a1a... 1ab795a... M	gschem/src/x_compselect.c

commit 8333e806fef245815235d8f96a81fcd06b96dfa4
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Fri Jan 4 20:23:22 2008 +0000

    De-select list in the compselect dialog when placement is cancelled.
    
    By de-selecting the list, we ensure that the list state reflects the
    component the user may currently place. It allows the same component
    to be selected for again, without either using the "Apply" button,
    or having to temporarily select a different component first.
    
    As a hook to de-select the list is added in o_redraw_cleanstates(), we
    now avoid using that call as a shortcut to cleanup our last place
    operation. It is still used if the last operation was not a component
    placement.

:100644 100644 e98c420... c08c0b5... M	gschem/include/prototype.h
:100644 100644 cd9e5e8... 3fc10b6... M	gschem/src/i_callbacks.c
:100644 100644 67e00a1... 374a979... M	gschem/src/o_basic.c
:100644 100644 9162378... 9197a1a... M	gschem/src/x_compselect.c

commit 3ae9c752b203ddc66b94c3f6cda352ee9306f13d
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Fri Jan 4 20:06:24 2008 +0000

    Add call to o_redraw_cleanstates() in the edit_{copy,mcopy,move} actions.
    
    Ensures that any existing action is appropriately cancelled before
    starting the new action.

:100644 100644 80f6632... cd9e5e8... M	gschem/src/i_callbacks.c

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

commit cf1ebffc8fc1634dc82cfd3a5e2748edadea4565
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Fri Jan 4 20:26:24 2008 +0000

    Remove "Apply" button from the component selector.
    
    As the component list is de-selected when placement mode is cancelled,
    the action of re-selecting a component to place switches back to this
    mode without the need for an explit "Apply" button.

diff --git a/gschem/src/x_compselect.c b/gschem/src/x_compselect.c
index 9197a1a..1ab795a 100644
--- a/gschem/src/x_compselect.c
+++ b/gschem/src/x_compselect.c
@@ -1207,8 +1207,6 @@ compselect_constructor (GType type,
   gtk_dialog_add_buttons (GTK_DIALOG (compselect),
                           /*  - close button */
                           GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
-                          /*  - update button */
-                          GTK_STOCK_APPLY, COMPSELECT_RESPONSE_PLACE,
 			  GTK_STOCK_OK, COMPSELECT_RESPONSE_HIDE,
                           NULL);
 
@@ -1216,7 +1214,6 @@ compselect_constructor (GType type,
   /* Set the alternative button order (ok, cancel, help) for other systems */
   gtk_dialog_set_alternative_button_order(GTK_DIALOG(compselect),
 					  COMPSELECT_RESPONSE_HIDE,
-					  COMPSELECT_RESPONSE_PLACE,
 					  GTK_RESPONSE_CLOSE,
 					  -1);
 #endif

commit 8333e806fef245815235d8f96a81fcd06b96dfa4
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Fri Jan 4 20:23:22 2008 +0000

    De-select list in the compselect dialog when placement is cancelled.
    
    By de-selecting the list, we ensure that the list state reflects the
    component the user may currently place. It allows the same component
    to be selected for again, without either using the "Apply" button,
    or having to temporarily select a different component first.
    
    As a hook to de-select the list is added in o_redraw_cleanstates(), we
    now avoid using that call as a shortcut to cleanup our last place
    operation. It is still used if the last operation was not a component
    placement.

diff --git a/gschem/include/prototype.h b/gschem/include/prototype.h
index e98c420..c08c0b5 100644
--- a/gschem/include/prototype.h
+++ b/gschem/include/prototype.h
@@ -773,6 +773,7 @@ gint x_event_scroll(GtkWidget *widget, GdkEventScroll *event, GSCHEM_TOPLEVEL *w
 /* x_compselect.c */
 void x_compselect_open (GSCHEM_TOPLEVEL *w_current);
 void x_compselect_close (GSCHEM_TOPLEVEL *w_current);
+void x_compselect_deselect (GSCHEM_TOPLEVEL *w_current);
 /* x_fileselect.c */
 void x_fileselect_open(GSCHEM_TOPLEVEL *w_current);
 void x_fileselect_save(GSCHEM_TOPLEVEL *w_current);
diff --git a/gschem/src/i_callbacks.c b/gschem/src/i_callbacks.c
index cd9e5e8..3fc10b6 100644
--- a/gschem/src/i_callbacks.c
+++ b/gschem/src/i_callbacks.c
@@ -3438,6 +3438,9 @@ DEFINE_I_CALLBACK(cancel)
                           w_current->toplevel->page_current->complex_place_list);
     w_current->toplevel->page_current->complex_place_list = NULL;
 
+    /* De-select the lists in the component selector */
+    x_compselect_deselect (w_current);
+
     /* Present the component selector again */
     g_value_init (&value, G_TYPE_BOOLEAN);
     g_value_set_boolean (&value, FALSE);
diff --git a/gschem/src/o_basic.c b/gschem/src/o_basic.c
index 67e00a1..374a979 100644
--- a/gschem/src/o_basic.c
+++ b/gschem/src/o_basic.c
@@ -506,15 +506,19 @@ int o_redraw_cleanstates(GSCHEM_TOPLEVEL *w_current)
 
   switch (w_current->event_state) {
     /* all states with something on the dc */
+    case(DRAWCOMP):
+    case(ENDCOMP):
+      /* De-select the lists in the component selector */
+      x_compselect_deselect (w_current);
+
+      /* Fall through */
     case(COPY): 
     case(MCOPY): 
     case(DRAWBUS): 
-    case(DRAWCOMP): 
     case(DRAWNET):   
     case(ENDARC): 
     case(ENDBOX): 
     case(ENDCIRCLE): 
-    case(ENDCOMP): 
     case(ENDCOPY):
     case(ENDMCOPY): 
     case(ENDLINE): 
diff --git a/gschem/src/x_compselect.c b/gschem/src/x_compselect.c
index 9162378..9197a1a 100644
--- a/gschem/src/x_compselect.c
+++ b/gschem/src/x_compselect.c
@@ -142,8 +142,17 @@ x_compselect_callback_response (GtkDialog *dialog,
               g_assert_not_reached();
         }
 
-        /* Cancel any action / place operation currently in progress */
-        o_redraw_cleanstates (w_current);
+        if (w_current->event_state == ENDCOMP ||
+            w_current->event_state == DRAWCOMP) {
+          /* Delete the component which was being placed */
+          o_complex_rubbercomplex(w_current);
+          s_delete_object_glist(toplevel,
+                                toplevel->page_current->complex_place_list);
+          toplevel->page_current->complex_place_list = NULL;
+        } else {
+          /* Cancel whatever other action is currently in progress */
+          o_redraw_cleanstates (w_current);
+        }
 
         if (symbol == NULL) {
           /* If there is no symbol selected, switch to SELECT mode */
@@ -261,6 +270,28 @@ x_compselect_close (GSCHEM_TOPLEVEL *w_current)
 }
 
 
+void
+x_compselect_deselect (GSCHEM_TOPLEVEL *w_current)
+{
+  Compselect *compselect = COMPSELECT (w_current->cswindow);
+
+  if (compselect == NULL)
+    return;
+
+  switch (compselect_get_view (compselect)) {
+  case VIEW_INUSE:
+    gtk_tree_selection_unselect_all (
+      gtk_tree_view_get_selection (compselect->inusetreeview));
+    break;
+  case VIEW_CLIB:
+    gtk_tree_selection_unselect_all (
+      gtk_tree_view_get_selection (compselect->libtreeview));
+    break;
+  default:
+    g_assert_not_reached();
+  }
+}
+
 
 enum {
   PROP_SYMBOL=1,

commit 3ae9c752b203ddc66b94c3f6cda352ee9306f13d
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Fri Jan 4 20:06:24 2008 +0000

    Add call to o_redraw_cleanstates() in the edit_{copy,mcopy,move} actions.
    
    Ensures that any existing action is appropriately cancelled before
    starting the new action.

diff --git a/gschem/src/i_callbacks.c b/gschem/src/i_callbacks.c
index 80f6632..cd9e5e8 100644
--- a/gschem/src/i_callbacks.c
+++ b/gschem/src/i_callbacks.c
@@ -588,6 +588,7 @@ DEFINE_I_CALLBACK(edit_copy)
 
   i_update_middle_button(w_current, i_callback_edit_copy, _("Copy"));
   if (o_select_return_first_object(w_current)) {
+    o_redraw_cleanstates(w_current);
     i_set_state(w_current, STARTCOPY);
   } else {
     i_set_state_msg(w_current, SELECT, _("Select objs first"));
@@ -628,6 +629,7 @@ DEFINE_I_CALLBACK(edit_mcopy)
 
   i_update_middle_button(w_current, i_callback_edit_copy, _("Multiple Copy"));
   if (o_select_return_first_object(w_current)) {
+    o_redraw_cleanstates(w_current);
     i_set_state(w_current, STARTMCOPY);
   } else {
     i_set_state_msg(w_current, SELECT, _("Select objs first"));
@@ -668,6 +670,7 @@ DEFINE_I_CALLBACK(edit_move)
 
   i_update_middle_button(w_current, i_callback_edit_move, _("Move"));
   if (o_select_return_first_object(w_current)) {
+    o_redraw_cleanstates(w_current);
     i_set_state(w_current, STARTMOVE);
   } else {
     i_set_state_msg(w_current, SELECT, _("Select objs first"));




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