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

gEDA-cvs: branch: master updated (1.1.1.20070708-6-gb5caa78)



The branch, master has been updated
       via  b5caa78a6dd9227d328397cb77ac4b0731c7d1c9 (commit)
       via  5dfe42146dfee7dd0909cda7615279228bc09d70 (commit)
      from  cd7db8026b00934afc6acc1ff8f5467021194287 (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/x_pagesel.c     |   72 ++++++++++++++-----------------------------
 2 files changed, 24 insertions(+), 49 deletions(-)


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

commit b5caa78a6dd9227d328397cb77ac4b0731c7d1c9
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sun Jul 15 12:55:54 2007 +0100

    Remove unused function e_gtk_button_new_with_icon() from x_pagesel.c

:100644 100644 5750dae... 131100d... M	gschem/include/prototype.h
:100644 100644 2bf843b... f13515b... M	gschem/src/x_pagesel.c

commit 5dfe42146dfee7dd0909cda7615279228bc09d70
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sun Jul 15 12:55:47 2007 +0100

    Split out update(s) when notify::toplevel on GschemDialog is recieved.
    
    We need to perform various setup actions when the toplevel property of our
    parent GschemDialog is set. We need to make this a specific function, as
    the current method of just calling pagesel_update isn't correct for all
    future cases.

:100644 100644 1a28060... 2bf843b... M	gschem/src/x_pagesel.c

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

commit b5caa78a6dd9227d328397cb77ac4b0731c7d1c9
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sun Jul 15 12:55:54 2007 +0100

    Remove unused function e_gtk_button_new_with_icon() from x_pagesel.c

diff --git a/gschem/include/prototype.h b/gschem/include/prototype.h
index 5750dae..131100d 100644
--- a/gschem/include/prototype.h
+++ b/gschem/include/prototype.h
@@ -848,7 +848,6 @@ void x_multiattrib_open (TOPLEVEL *toplevel, OBJECT *object);
 void x_pagesel_open (TOPLEVEL *toplevel);
 void x_pagesel_close (TOPLEVEL *toplevel);
 void x_pagesel_update (TOPLEVEL *toplevel);
-GtkWidget *e_gtk_button_new_with_icon(const char *text, const char *stock);
 /* x_preview.c */
 /* x_print.c */
 void x_print_setup(TOPLEVEL *w_current, char *filename);
diff --git a/gschem/src/x_pagesel.c b/gschem/src/x_pagesel.c
index 2bf843b..f13515b 100644
--- a/gschem/src/x_pagesel.c
+++ b/gschem/src/x_pagesel.c
@@ -610,49 +610,3 @@ void pagesel_update (Pagesel *pagesel)
   select_page (pagesel->treeview, NULL, toplevel->page_current);  
 }
 
-/*! \deprecated
- *  This function was in the noweb file, but was not referenced.
- *  Create a gtk button with a custom label <B>text</B> and a stock
- *  icon <B>stock</B>.
- *  <B>text</B>: The mnemonic text for the label.
- *  <B>stock</B>: The name of the stock item to get the icon from.
- *
- *  Return value: The widget.
- *  Taken from evolution code:
- *  http://lists.ximian.com/archives/public/evolution-patches/2003-April/000088.html
- */
-/*! \todo Finish function documentation!!!
- *  \brief
- *  \par Function Description
- *
- */
-/*
-GtkWidget *e_gtk_button_new_with_icon(const char *text, const char *stock)
-{
-	GtkWidget *button, *label;
-	GtkStockItem item;
-
-	button = gtk_button_new();
-	label = gtk_label_new_with_mnemonic(text);
-	gtk_label_set_mnemonic_widget((GtkLabel *)label, button);
-
-	if (gtk_stock_lookup(stock, &item)) {
-		GtkWidget *image, *hbox, *align;
-
-		image = gtk_image_new_from_stock(stock, GTK_ICON_SIZE_BUTTON);
-		hbox = gtk_hbox_new(FALSE, 2);
-		align = gtk_alignment_new(0.5, 0.5, 0.0, 0.0);
-		gtk_box_pack_start((GtkBox *)hbox, image, FALSE, FALSE, 0);
-		gtk_box_pack_end((GtkBox *)hbox, label, FALSE, FALSE, 0);
-		gtk_container_add((GtkContainer *)align, hbox);
-		gtk_container_add((GtkContainer *)button, align);
-		gtk_widget_show_all(align);
-	} else {
-		gtk_misc_set_alignment((GtkMisc *)label, 0.5, 0.5);
-		gtk_container_add((GtkContainer *)button, label);
-		gtk_widget_show(label);
-	}
-
-	return button;
-}
-*/

commit 5dfe42146dfee7dd0909cda7615279228bc09d70
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Sun Jul 15 12:55:47 2007 +0100

    Split out update(s) when notify::toplevel on GschemDialog is recieved.
    
    We need to perform various setup actions when the toplevel property of our
    parent GschemDialog is set. We need to make this a specific function, as
    the current method of just calling pagesel_update isn't correct for all
    future cases.

diff --git a/gschem/src/x_pagesel.c b/gschem/src/x_pagesel.c
index 1a28060..2bf843b 100644
--- a/gschem/src/x_pagesel.c
+++ b/gschem/src/x_pagesel.c
@@ -300,6 +300,28 @@ static void pagesel_popup_menu (Pagesel *pagesel,
   
 }
 
+
+/*! \brief Handler for the notify::toplevel signal of GschemDialog
+ *
+ *  \par Function Description
+ *
+ *  When the toplevel property is set on the parent GschemDialog,
+ *  we should update the pagesel dialog.
+ *
+ *  \param [in] pspec      the GParamSpec of the property which changed
+ *  \param [in] gobject    the object which received the signal.
+ *  \param [in] user_data  user data set when the signal handler was connected.
+ */
+static void notify_toplevel_cb (GObject    *gobject,
+                                GParamSpec *arg1,
+                                gpointer    user_data)
+{
+  Pagesel *pagesel = PAGESEL( gobject );
+
+  pagesel_update( pagesel );
+}
+
+
 /*! \todo Finish function documentation!!!
  *  \brief
  *  \par Function Description
@@ -472,8 +494,8 @@ static void pagesel_init (Pagesel *pagesel)
 					  -1);
 #endif
 
-  /* Strictly, this has the wrong prototype, but it doesn't matter */
-  g_signal_connect( pagesel, "notify::toplevel", G_CALLBACK (pagesel_update), NULL );
+  g_signal_connect( pagesel, "notify::toplevel",
+                    G_CALLBACK( notify_toplevel_cb ), NULL );
 }
 
 




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