1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
|
/* prefs.c - powershell
* Copyright (C) 1999 Matt Spong <spong@glue.umd.edu>
* Based from zterm.c by Michael Zucci from the libzvt docs
*
* A big, puffy lotsa-shells-in-one app.
*
* 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., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* This code uses my patented "ugly-code" algorithm. I'll fix it
* at some point :-)
*/
#include "powershell.h"
ZvtTerm * current_term;
GtkWidget * widget, * widget2 ,* widget3, * widget4, * widget5;
preferences Prefs;
GtkWidget * pbox;
void property_changed (GtkWidget * w, gpointer user_data)
{
gnome_property_box_changed (GNOME_PROPERTY_BOX(pbox));
}
static void property_apply (GnomePropertyBox *box, int page_num,
gpointer data)
{
ApplyPrefsAppearance();
ApplyPrefsColors();
ApplyPrefsMenus();
ApplyPrefsHandlers();
ApplyPrefsShortcuts();
WriteRCFile();
UpdateAllTerms();
}
int DoPreferences ()
{
pbox = gnome_property_box_new ();
gtk_signal_connect (GTK_OBJECT(pbox), "apply",
GTK_SIGNAL_FUNC(property_apply), NULL);
widget = gtk_vbox_new (FALSE, 0);
CreatePrefsAppearance (GTK_CONTAINER(widget));
gnome_property_box_append_page (GNOME_PROPERTY_BOX(pbox),
widget,
gtk_label_new ("Appearance"));
#ifdef ZVT_USE_MATCHING
widget2 = gtk_vbox_new (FALSE, 0);
CreatePrefsHandlers (widget2);
gnome_property_box_append_page (GNOME_PROPERTY_BOX(pbox),
widget2,
gtk_label_new ("Handlers"));
#endif
widget4 = gtk_hbox_new (FALSE, 0);
CreatePrefsColors (GTK_CONTAINER(widget4));
gnome_property_box_append_page (GNOME_PROPERTY_BOX(pbox),
widget4,
gtk_label_new ("Colors"));
widget5 = gtk_hbox_new (FALSE, 0);
CreatePrefsShortcuts (GTK_CONTAINER(widget5));
gnome_property_box_append_page (GNOME_PROPERTY_BOX(pbox),
widget5,
gtk_label_new ("Keyboard"));
widget3 = gtk_vbox_new (FALSE, 0);
CreatePrefsMenus (GTK_CONTAINER(widget3));
gnome_property_box_append_page (GNOME_PROPERTY_BOX(pbox),
widget3,
gtk_label_new ("Menus"));
gtk_widget_show_all (pbox);
}
|