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

gEDA-cvs: gaf.git: branch: master updated (1.6.0-20091004-26-g1af6cf8)



The branch, master has been updated
       via  1af6cf8dcc23174a6e57e8cdf2f3b84996a5b23e (commit)
      from  322ed1852405e6d5e80cb63930edb1d780cf795d (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/bitmap/Makefile.am           |   12 +++--
 gschem/bitmap/gschem-about-logo.png |  Bin 0 -> 2990 bytes
 gschem/bitmap/gschem-about-logo.xcf |  Bin 0 -> 14548 bytes
 gschem/include/gschem_struct.h      |    1 -
 gschem/src/gschem_toplevel.c        |    1 -
 gschem/src/x_dialog.c               |   98 +++++++++++-----------------------
 gschem/src/x_window.c               |    3 -
 7 files changed, 40 insertions(+), 75 deletions(-)
 create mode 100644 gschem/bitmap/gschem-about-logo.png
 create mode 100644 gschem/bitmap/gschem-about-logo.xcf


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

commit 1af6cf8dcc23174a6e57e8cdf2f3b84996a5b23e
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    gschem: New about dialog, including gEDA logo graphics

:100644 100644 e75da3c... d5b7e7f... M	gschem/bitmap/Makefile.am
:000000 100644 0000000... 4e7b3f1... A	gschem/bitmap/gschem-about-logo.png
:000000 100644 0000000... 19f7991... A	gschem/bitmap/gschem-about-logo.xcf
:100644 100644 f921fb6... 9d8bacb... M	gschem/include/gschem_struct.h
:100644 100644 429eca6... 4367d9f... M	gschem/src/gschem_toplevel.c
:100644 100644 ff14ec2... d1db73b... M	gschem/src/x_dialog.c
:100644 100644 714183e... 2dcba49... M	gschem/src/x_window.c

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

commit 1af6cf8dcc23174a6e57e8cdf2f3b84996a5b23e
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    gschem: New about dialog, including gEDA logo graphics

diff --git a/gschem/bitmap/Makefile.am b/gschem/bitmap/Makefile.am
index e75da3c..d5b7e7f 100644
--- a/gschem/bitmap/Makefile.am
+++ b/gschem/bitmap/Makefile.am
@@ -1,6 +1,10 @@
 
 bitmapdatadir = $(GEDADATADIR)/bitmap
-bitmapdata_DATA = gschem-bus.xpm gschem-comp.xpm gschem-net.xpm		 \
+bitmapdata_DATA = \
+                  gschem-about-logo.png                                  \
+                  gschem-bus.xpm                                         \
+                  gschem-comp.xpm                                        \
+                  gschem-net.xpm                                         \
 		  gschem-new.xpm gschem-open.xpm gschem-redo.xpm	 \
 		  gschem-save.xpm gschem-select.xpm gschem-undo.xpm	 \
 		  gschem-edit.xpm gschem-text.xpm			 \
@@ -22,9 +26,9 @@ bitmapdata_DATA = gschem-bus.xpm gschem-comp.xpm gschem-net.xpm		 \
                   gschem-alignment_middlecenter.png			 \
                   gschem-alignment_topleft.png
 
-
-
-EXTRA_DIST = $(bitmapdata_DATA) README
+EXTRA_DIST = $(bitmapdata_DATA)                                          \
+             README                                                      \
+             gschem-about-logo.xcf
 
 MOSTLYCLEANFILES = *.log *~
 CLEANFILES = *.log *~
diff --git a/gschem/bitmap/gschem-about-logo.png b/gschem/bitmap/gschem-about-logo.png
new file mode 100644
index 0000000..4e7b3f1
Binary files /dev/null and b/gschem/bitmap/gschem-about-logo.png differ
diff --git a/gschem/bitmap/gschem-about-logo.xcf b/gschem/bitmap/gschem-about-logo.xcf
new file mode 100644
index 0000000..19f7991
Binary files /dev/null and b/gschem/bitmap/gschem-about-logo.xcf differ
diff --git a/gschem/include/gschem_struct.h b/gschem/include/gschem_struct.h
index f921fb6..9d8bacb 100644
--- a/gschem/include/gschem_struct.h
+++ b/gschem/include/gschem_struct.h
@@ -52,7 +52,6 @@ struct st_gschem_toplevel {
   GtkWidget *tshowwindow;               /* text show window */
   GtkWidget *thidewindow;               /* text hide window */
   GtkWidget *tfindwindow;               /* text find window */
-  GtkWidget *abwindow;                  /* Help/About... dialog*/
   GtkWidget *hkwindow;                  /* Help/Hotkeys... dialog*/
   GtkWidget *clwindow;                  /* Color edit dialog */
   int edit_color;                         /* Used by the color edit dialog */
diff --git a/gschem/src/gschem_toplevel.c b/gschem/src/gschem_toplevel.c
index 429eca6..4367d9f 100644
--- a/gschem/src/gschem_toplevel.c
+++ b/gschem/src/gschem_toplevel.c
@@ -71,7 +71,6 @@ GSCHEM_TOPLEVEL *gschem_toplevel_new ()
   w_current->tshowwindow  = NULL;
   w_current->thidewindow  = NULL;
   w_current->tfindwindow  = NULL;
-  w_current->abwindow     = NULL;
   w_current->hkwindow     = NULL;
   w_current->clwindow     = NULL;
   w_current->edit_color   = 0;
diff --git a/gschem/src/x_dialog.c b/gschem/src/x_dialog.c
index ff14ec2..d1db73b 100644
--- a/gschem/src/x_dialog.c
+++ b/gschem/src/x_dialog.c
@@ -2169,82 +2169,51 @@ void slot_edit_dialog (GSCHEM_TOPLEVEL *w_current, const char *string)
 
 /***************** Start of help/about dialog box ********************/
 
-/*! \brief Response function for the about dialog
- *  \par Function Description
- *  This function destoys the about dialg.
- */
-void about_dialog_response(GtkWidget *w, gint response,
-                           GSCHEM_TOPLEVEL *w_current)
-{
-  switch (response) {
-  case GTK_RESPONSE_REJECT:
-  case GTK_RESPONSE_DELETE_EVENT:
-    /* void */
-    break;
-  default:
-    printf("about_dialog_response(): strange signal %d\n",response);
-  }
-
-  gtk_widget_destroy(w_current->abwindow);
-  w_current->abwindow = NULL;
-}
-
 /*! \brief Create the about dialog and show it
  *  \par Function Description
  *  This function creates the about dialog.
  */
 void about_dialog (GSCHEM_TOPLEVEL *w_current)
 {
-  GtkWidget *label = NULL;
-  GtkWidget *vbox;
-  char *string;
+  char *version_string;
+  char *logo_file;
+  GdkPixbuf *logo;
+  GError *error = NULL;
 
-  if (!w_current->abwindow) {
-    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);
+  version_string = g_strdup_printf(_("%s%s (%s)"),
+                                   PREPEND_VERSION_STRING,
+                                   PACKAGE_DOTTED_VERSION,
+                                   PACKAGE_DATE_VERSION);
 
-    gtk_window_position (GTK_WINDOW (w_current->abwindow),
-                         GTK_WIN_POS_MOUSE);
 
-    gtk_signal_connect (GTK_OBJECT (w_current->abwindow), "response",
-                        GTK_SIGNAL_FUNC(about_dialog_response),
-                        w_current);
+  logo_file = g_strconcat (w_current->toplevel->bitmap_directory,
+                           G_DIR_SEPARATOR_S, "gschem-about-logo.png", NULL);
 
-    gtk_container_border_width (GTK_CONTAINER(w_current->abwindow),
-                                DIALOG_BORDER_SPACING);
-    vbox = GTK_DIALOG(w_current->abwindow)->vbox;
-    gtk_box_set_spacing(GTK_BOX(vbox), DIALOG_V_SPACING);
-
-    label = gtk_label_new ( _("<b>gEDA: GPL Electronic Design Automation</b>"));
-    gtk_label_set_use_markup (GTK_LABEL(label), TRUE);
-    gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0);
+  logo = gdk_pixbuf_new_from_file (logo_file, &error);
+  g_free (logo_file);
 
-    string = g_strdup_printf(_("<b>gschem version %s%s.%s</b>"),
-                             PREPEND_VERSION_STRING, PACKAGE_DOTTED_VERSION,
-                             PACKAGE_DATE_VERSION);
-    label = gtk_label_new (string);
-    gtk_label_set_use_markup (GTK_LABEL(label), TRUE);
-    g_free(string);
-    gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0);
-
-    label = gtk_label_new ( _("Written by:\n"
-                              "Ales Hvezda\n"
-                              "ahvezda@xxxxxxxxxxxxx\n"
-                              "And many others (See AUTHORS file)"));
-    gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
-    gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0);
-
-    gtk_widget_show_all(w_current->abwindow);
+  if (error != NULL) {
+    g_assert (logo == NULL);
+    s_log_message ("Could not load image at file: %s\n%s\n",
+                   logo_file, error->message);
+    g_error_free (error);
   }
 
-  else { /* dialog already created */
-    gtk_window_present(GTK_WINDOW(w_current->abwindow));
-  }
+  gtk_show_about_dialog (
+      GTK_WINDOW (w_current->main_window),
+      "version",        version_string,
+      "logo",           logo,
+      "title",          _("About gschem"),
+      "comments",       _("gEDA: GPL Electronic Design Automation"),
+      "copyright",      _("Copyright © 1998-2009 Ales Hvezda"
+                            " <ahvezda@xxxxxxxxxxxxx>\n"
+                          "Copyright © 1998-2009 gEDA Contributors"
+                            " (see ChangeLog for details)"),
+      "website",        "http://www.gpleda.org/";,
+      NULL);
+
+  g_free (version_string);
+  g_object_unref (logo);
 }
 
 /***************** End of help/about dialog box *********************/
@@ -2840,9 +2809,6 @@ void x_dialog_raise_all(GSCHEM_TOPLEVEL *w_current)
   if(w_current->tswindow) {
     gdk_window_raise(w_current->tswindow->window);
   }
-  if(w_current->abwindow) {
-    gdk_window_raise(w_current->abwindow->window);
-  }
   if(w_current->hkwindow) {
     gdk_window_raise(w_current->hkwindow->window);
   }
diff --git a/gschem/src/x_window.c b/gschem/src/x_window.c
index 714183e..2dcba49 100644
--- a/gschem/src/x_window.c
+++ b/gschem/src/x_window.c
@@ -592,9 +592,6 @@ void x_window_close(GSCHEM_TOPLEVEL *w_current)
   if (w_current->tswindow)
   gtk_widget_destroy(w_current->tswindow);
 
-  if (w_current->abwindow)
-  gtk_widget_destroy(w_current->abwindow);
-
   if (w_current->iwindow)
   gtk_widget_destroy(w_current->iwindow);
 



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