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

gEDA-cvs: branch: master updated (1.1.2.20070818-3-g5a67f8a)



The branch, master has been updated
       via  5a67f8a879c0f5bcfaa14daf6847064beebaf783 (commit)
      from  f0c1bf37611b14dedcf1c4b45ac2319216f3293c (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/src/x_compselect.c |   39 ++++++++++++++++++++++-----------------
 1 files changed, 22 insertions(+), 17 deletions(-)


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

commit 5a67f8a879c0f5bcfaa14daf6847064beebaf783
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date:   Sun Sep 2 18:52:50 2007 -0400

    Moved refresh button in component select dialog box
    
    The refresh button was along the very bottom of the component select
    dialog box at the same level as Close, Apply, and OK.  The refresh
    operation is not nearly as important or first class as these actions.
    The refresh button was moved to the filter area.  Whether this change
    sticks depends on what users think of the new location (I'm quite willing
    to move it elsewhere if there is a better spot).

:100644 100644 72b9ff0... c5c4255... M	gschem/src/x_compselect.c

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

commit 5a67f8a879c0f5bcfaa14daf6847064beebaf783
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date:   Sun Sep 2 18:52:50 2007 -0400

    Moved refresh button in component select dialog box
    
    The refresh button was along the very bottom of the component select
    dialog box at the same level as Close, Apply, and OK.  The refresh
    operation is not nearly as important or first class as these actions.
    The refresh button was moved to the filter area.  Whether this change
    sticks depends on what users think of the new location (I'm quite willing
    to move it elsewhere if there is a better spot).

diff --git a/gschem/src/x_compselect.c b/gschem/src/x_compselect.c
index 72b9ff0..c5c4255 100644
--- a/gschem/src/x_compselect.c
+++ b/gschem/src/x_compselect.c
@@ -647,19 +647,14 @@ create_lib_tree_model (void)
 /* \brief On-demand refresh of the component library.
  * \par Function Description
  * Requests a rescan of the component library in order to pick up any
- * new signals, and then updates the component selector.  Handler for
- * the #COMPSELECT_RESPONSE_REFRESH response ID.
+ * new signals, and then updates the component selector. 
  */
 static void
-compselect_callback_refresh_library (Compselect *compselect,
-                                     gint response_id,
-                                     gpointer user_data) {
+compselect_callback_refresh_library (GtkButton *button, gpointer user_data) 
+{
+  Compselect *compselect = COMPSELECT (user_data);
   GtkTreeModel *model;
 
-  if (response_id != COMPSELECT_RESPONSE_REFRESH) {
-    return;
-  }
-
   /* Rescan the libraries for symbols */
   s_clib_refresh ();
 
@@ -872,6 +867,7 @@ create_lib_treeview (Compselect *compselect)
                                      /* GtkButton */
                                      "relief",    GTK_RELIEF_NONE,
                                      NULL));
+
   gtk_container_add (GTK_CONTAINER (button),
                      gtk_image_new_from_stock (GTK_STOCK_CLEAR,
                                                GTK_ICON_SIZE_SMALL_TOOLBAR));
@@ -884,6 +880,23 @@ create_lib_treeview (Compselect *compselect)
                       FALSE, FALSE, 0);
   /* set clear button of compselect */
   compselect->button_clear = GTK_BUTTON (button);
+
+  /* create the refresh button */
+  button = GTK_WIDGET (g_object_new (GTK_TYPE_BUTTON,
+                                     /* GtkWidget */
+                                     "sensitive", TRUE,
+                                     /* GtkButton */
+                                     "relief",    GTK_RELIEF_NONE,
+                                     NULL));
+  gtk_container_add (GTK_CONTAINER (button),
+                     gtk_image_new_from_stock (GTK_STOCK_REFRESH,
+                                            GTK_ICON_SIZE_SMALL_TOOLBAR));
+  /* add the refresh button to the filter area */
+  gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
+  g_signal_connect (button,
+                    "clicked",
+                    G_CALLBACK (compselect_callback_refresh_library),
+                    compselect);
                                      
   /* add the filter area to the vertical box */
   gtk_box_pack_start (GTK_BOX (vbox), hbox,
@@ -1149,25 +1162,17 @@ compselect_init (Compselect *compselect)
                           /*  - update button */
                           GTK_STOCK_APPLY, COMPSELECT_RESPONSE_PLACE,
 			  GTK_STOCK_OK, COMPSELECT_RESPONSE_HIDE,
-                          /*  - refresh button */
-                          GTK_STOCK_REFRESH, COMPSELECT_RESPONSE_REFRESH,
                           NULL);
 
 #if GTK_CHECK_VERSION (2,6,0)
   /* Set the alternative button order (ok, cancel, help) for other systems */
   gtk_dialog_set_alternative_button_order(GTK_DIALOG(compselect),
-                                          COMPSELECT_RESPONSE_REFRESH,
 					  COMPSELECT_RESPONSE_HIDE,
 					  COMPSELECT_RESPONSE_PLACE,
 					  GTK_RESPONSE_CLOSE,
 					  -1);
 #endif
 
-  /* Add refresh handler */
-  g_signal_connect (compselect, "response",
-                    G_CALLBACK (compselect_callback_refresh_library),
-                    NULL);
-
   /* Initialize the hidden property */
   compselect->hidden = FALSE;
 }




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