summaryrefslogtreecommitdiffhomepage
path: root/mixgtk/mixgtk_gen_handlers.c
diff options
context:
space:
mode:
authorjaortega <jaortega>2001-02-26 23:16:00 +0000
committerjaortega <jaortega>2001-02-26 23:16:00 +0000
commit119a5240f57ded266447b485e5a7c0eec6dd67f8 (patch)
tree4df3fae87486ff21770f07099f213ed7f2efea2c /mixgtk/mixgtk_gen_handlers.c
parentf00a95b117a3db4eed75ce66b9dd6ddb6a54748c (diff)
downloadmdk-119a5240f57ded266447b485e5a7c0eec6dd67f8.tar.gz
mdk-119a5240f57ded266447b485e5a7c0eec6dd67f8.tar.bz2
gtk front-end files
Diffstat (limited to 'mixgtk/mixgtk_gen_handlers.c')
-rw-r--r--mixgtk/mixgtk_gen_handlers.c79
1 files changed, 79 insertions, 0 deletions
diff --git a/mixgtk/mixgtk_gen_handlers.c b/mixgtk/mixgtk_gen_handlers.c
new file mode 100644
index 0000000..e472341
--- /dev/null
+++ b/mixgtk/mixgtk_gen_handlers.c
@@ -0,0 +1,79 @@
+/* -*-c-*- -------------- mixgtk_gen_handlers.c :
+ * Implementation of the functions declared in mixgtk_gen_handlers.h
+ * ------------------------------------------------------------------
+ * Last change: Time-stamp: "01/02/23 00:36:31 jose"
+ * ------------------------------------------------------------------
+ * Copyright (C) 2001 Free Software Foundation, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+
+#include "mixgtk_gen_handlers.h"
+
+void
+on_main_window_destroy (GtkWidget *w, gpointer data)
+{
+ gtk_main_quit ();
+}
+
+static void
+on_file_open_ok_ (GtkWidget *w, gpointer fs)
+{
+ const gchar *file = gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs));
+ g_print ("File %s selected\n", file);
+ gtk_widget_destroy (GTK_WIDGET (fs));
+}
+
+static void
+on_file_open_destroy_ (GtkWidget *w, gpointer data)
+{
+ gtk_grab_remove (GTK_WIDGET (w));
+}
+
+void
+on_file_open_activate (GtkWidget *w, gpointer data)
+{
+ GtkWidget *file = gtk_file_selection_new ("Open program");
+ gtk_signal_connect (GTK_OBJECT (file), "destroy",
+ (GtkSignalFunc) on_file_open_destroy_,
+ GTK_OBJECT (file));
+ gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (file)->ok_button),
+ "clicked", (GtkSignalFunc) on_file_open_ok_,
+ GTK_OBJECT (file));
+ gtk_signal_connect_object (GTK_OBJECT (GTK_FILE_SELECTION
+ (file)->cancel_button),
+ "clicked", (GtkSignalFunc) gtk_widget_destroy,
+ GTK_OBJECT (file));
+ gtk_widget_show (file);
+ gtk_grab_add (file);
+}
+
+void
+on_file_exit_activate (GtkWidget *w, gpointer data)
+{
+ g_message ("File_exit activated");
+ gtk_main_quit ();
+}
+
+void
+on_debug_activate (GtkWidget *w, gpointer data)
+{
+}
+
+
+
+