summaryrefslogtreecommitdiffhomepage
path: root/mixgtk/mixgtk_widgets.c
diff options
context:
space:
mode:
authorjaortega <jaortega>2001-03-13 22:21:16 +0000
committerjaortega <jaortega>2001-03-13 22:21:16 +0000
commit3ab6797d68162c6094964ad0c5c7e194bee06b80 (patch)
treee81f7121a98cbddb5509a0e10631c409a89b62d6 /mixgtk/mixgtk_widgets.c
parentde46b4f1ddd7ed43bf8988e65234c9e33ef1e51d (diff)
downloadmdk-3ab6797d68162c6094964ad0c5c7e194bee06b80.tar.gz
mdk-3ab6797d68162c6094964ad0c5c7e194bee06b80.tar.bz2
minor changes
Diffstat (limited to 'mixgtk/mixgtk_widgets.c')
-rw-r--r--mixgtk/mixgtk_widgets.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/mixgtk/mixgtk_widgets.c b/mixgtk/mixgtk_widgets.c
index 3ff6436..5a2cd91 100644
--- a/mixgtk/mixgtk_widgets.c
+++ b/mixgtk/mixgtk_widgets.c
@@ -1,7 +1,7 @@
/* -*-c-*- -------------- mixgtk_widgets.c :
* Implementation of the functions declared in mixgtk_widgets.h
* ------------------------------------------------------------------
- * Last change: Time-stamp: "01/03/09 22:29:47 jose"
+ * Last change: Time-stamp: "01/03/13 14:09:05 jose"
* ------------------------------------------------------------------
* Copyright (C) 2001 Free Software Foundation, Inc.
*
@@ -22,9 +22,10 @@
*/
-#include "mixgtk_widgets.h"
#include <glade/glade.h>
+#include <mixlib/mix.h>
+#include "mixgtk_widgets.h"
/* the glade spec */
static GladeXML *xml_ = NULL;
@@ -33,6 +34,7 @@ static GladeXML *xml_ = NULL;
static const gchar *names_[] = {
"main_window",
"word_dialog",
+ "about_dialog",
"command_prompt",
"command_log",
"mixal_clist",
@@ -61,17 +63,28 @@ static const gchar *names_[] = {
#define WIDGET_NO_ (sizeof (names_) / sizeof (names_[0]))
+#define VERSION_LABEL_ "version_label"
+#define GPL_TEXT_ "gpl_text"
+GtkWidget *about_;
/* create a new factory from an xml glade file */
gboolean
mixgtk_widget_factory_init (const char *glade_file)
{
+ GtkWidget *label;
glade_init ();
xml_ = glade_xml_new (glade_file, NULL);
if (!xml_) return FALSE;
glade_xml_signal_autoconnect (xml_);
+ about_ = mixgtk_widget_factory_get (MIXGTK_WIDGET_ABOUT_DIALOG);
+ g_return_val_if_fail (about_ != NULL, FALSE);
+ label = mixgtk_widget_factory_get_by_name (VERSION_LABEL_);
+ g_return_val_if_fail (label != NULL, FALSE);
+ gtk_label_set_text (GTK_LABEL(label), VERSION);
+ gtk_widget_show (label);
+ g_print ("%s", VERSION);
return TRUE;
}
@@ -90,4 +103,9 @@ mixgtk_widget_factory_get_by_name (const gchar *name)
return glade_xml_get_widget (xml_, name);
}
-
+/* about box */
+void
+on_about_activate (GtkWidget *w, gpointer data)
+{
+ gtk_widget_show (about_);
+}