Commit 992ea8e1 authored by BST 2002  Tony Gale's avatar BST 2002 Tony Gale Committed by Tony Gale
Browse files

update packaging script for current tutorial

Sun Aug 25 11:58:27 BST 2002  Tony Gale <gale@gtk.org>

	* docs/tutorial/package-db-tutorial.sh:
	update packaging script for current tutorial

	* docs/tutorial/images/*.eps: New Files
	EPS versions of the tutorial images
parent 2f31e7ed
Sun Aug 25 11:58:27 BST 2002 Tony Gale <gale@gtk.org>
* docs/tutorial/package-db-tutorial.sh:
update packaging script for current tutorial
* docs/tutorial/images/*.eps: New Files
EPS versions of the tutorial images
2002-08-25 Tor Lillqvist <tml@iki.fi>
* gtk/gtkmain.h: Include gtkbox.h and gtkwindow.h on Win32, as the
......
Sun Aug 25 11:58:27 BST 2002 Tony Gale <gale@gtk.org>
* docs/tutorial/package-db-tutorial.sh:
update packaging script for current tutorial
* docs/tutorial/images/*.eps: New Files
EPS versions of the tutorial images
2002-08-25 Tor Lillqvist <tml@iki.fi>
* gtk/gtkmain.h: Include gtkbox.h and gtkwindow.h on Win32, as the
......
Sun Aug 25 11:58:27 BST 2002 Tony Gale <gale@gtk.org>
* docs/tutorial/package-db-tutorial.sh:
update packaging script for current tutorial
* docs/tutorial/images/*.eps: New Files
EPS versions of the tutorial images
2002-08-25 Tor Lillqvist <tml@iki.fi>
* gtk/gtkmain.h: Include gtkbox.h and gtkwindow.h on Win32, as the
......
Sun Aug 25 11:58:27 BST 2002 Tony Gale <gale@gtk.org>
* docs/tutorial/package-db-tutorial.sh:
update packaging script for current tutorial
* docs/tutorial/images/*.eps: New Files
EPS versions of the tutorial images
2002-08-25 Tor Lillqvist <tml@iki.fi>
* gtk/gtkmain.h: Include gtkbox.h and gtkwindow.h on Win32, as the
......
Sun Aug 25 11:58:27 BST 2002 Tony Gale <gale@gtk.org>
* docs/tutorial/package-db-tutorial.sh:
update packaging script for current tutorial
* docs/tutorial/images/*.eps: New Files
EPS versions of the tutorial images
2002-08-25 Tor Lillqvist <tml@iki.fi>
* gtk/gtkmain.h: Include gtkbox.h and gtkwindow.h on Win32, as the
......
Sun Aug 25 11:58:27 BST 2002 Tony Gale <gale@gtk.org>
* docs/tutorial/package-db-tutorial.sh:
update packaging script for current tutorial
* docs/tutorial/images/*.eps: New Files
EPS versions of the tutorial images
2002-08-25 Tor Lillqvist <tml@iki.fi>
* gtk/gtkmain.h: Include gtkbox.h and gtkwindow.h on Win32, as the
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -9,8 +9,7 @@
# o Jadetex
TARGET=`pwd`/gtk-tut.sgml
JPGS="`pwd`/*.jpg"
EPSS="`pwd`/*.eps"
IMAGES="`pwd`/images"
EXAMPLES=`pwd`/../../examples
PATH=`pwd`:$PATH
......@@ -35,8 +34,7 @@ if ! cd gtk-tutorial.$DATE; then
fi
cp $TARGET .
cp $JPGS .
cp $EPSS .
cp -R $IMAGES .
# SGML Format
echo -n "Copy SGML and images.... "
......@@ -48,7 +46,7 @@ if [ ! -d sgml ]; then
mkdir sgml
fi
(cd sgml ; cp $TARGET . ; cp $JPGS .)
(cd sgml ; cp $TARGET . ; cp -R $IMAGES . ; rm -rf images/CVS)
echo "done"
# HTML Format
......@@ -61,11 +59,12 @@ if [ ! -d html ]; then
mkdir html
fi
(db2html gtk-tut.sgml ; mv gtk-tut/* html ; cp $JPGS html ; rm -rf gtk-tut) > /dev/null
(db2html gtk-tut.sgml ; mv gtk-tut/* html ; cp -R $IMAGES html ; rm -rf gtk-tut) > /dev/null
(cd html ; ln -s book1.html index.html ; rm -rf images/CVS)
echo "done"
# Text, PS and DVI Format
echo -n "Formatting into Text, PS and DVI.... "
# PS, PDF and DVI Format
echo -n "Formatting into PS, DVI and PDF.... "
if [ ! -d ps ]; then
if [ -e ps ]; then
echo "ERROR: ps is not a directory"
......@@ -74,40 +73,59 @@ if [ ! -d ps ]; then
mkdir ps
fi
if [ ! -d txt ]; then
if [ -e txt ]; then
echo "ERROR: ps is not a directory"
if [ ! -d pdf ]; then
if [ -e pdf ]; then
echo "ERROR: pdf is not a directory"
exit
fi
mkdir txt
mkdir pdf
fi
sed 's/gtk_tut_packbox1.jpg/gtk_tut_packbox1.eps/ ; s/gtk_tut_packbox2.jpg/gtk_tut_packbox2.eps/ ; s/gtk_tut_table.jpg/gtk_tut_table.eps/' gtk-tut.sgml > ps/gtk-tut.sgml
(cd ps ; db2ps gtk-tut.sgml ; ps2pdf gtk-tut.ps gtk-tut.pdf ; pdftotext gtk-tut.pdf ; mv gtk-tut.txt ../txt ; rm -f *) > /dev/null 2>&1
sed 's/gtk_tut_packbox1.jpg/gtk_tut_packbox1.eps/ ; s/gtk_tut_packbox2.jpg/gtk_tut_packbox2.eps/ ; s/gtk_tut_table.jpg/gtk_tut_table.eps/' gtk-tut.sgml > ps/gtk-tut.sgml
(cp *.eps ps ; cd ps ; db2ps gtk-tut.sgml ; rm gtk-tut.aux gtk-tut.log gtk-tut.sgml gtk-tut.tex *.eps) > /dev/null 2>&1
#sed 's/gtk_tut_packbox1.jpg/gtk_tut_packbox1.eps/ ; s/gtk_tut_packbox2.jpg/gtk_tut_packbox2.eps/ ; s/gtk_tut_table.jpg/gtk_tut_table.eps/' gtk-tut.sgml > ps/gtk-tut.sgml
sed "s/images\/\(.*\)\.png/images\/\1.eps/g" gtk-tut.sgml > ps/gtk-tut.sgml
cp -R ../images ps
(cd ps ; db2dvi gtk-tut.sgml ; dvips gtk-tut.dvi -o gtk-tut.ps ; dvipdf gtk-tut.dvi ../pdf/gtk-tut.pdf) > /dev/null 2>&1
#sed 's/gtk_tut_packbox1.jpg/gtk_tut_packbox1.eps/ ; s/gtk_tut_packbox2.jpg/gtk_tut_packbox2.eps/ ; s/gtk_tut_table.jpg/gtk_tut_table.eps/' gtk-tut.sgml > ps/gtk-tut.sgml
#sed "s/images\/\(.*\)\.png/images\/\1.eps/g" gtk-tut.sgml > ps/gtk-tut.sgml
#cp -R images ps
(cd ps ; rm gtk-tut.aux gtk-tut.log gtk-tut.sgml gtk-tut.tex ; rm -Rf images) > /dev/null 2>&1
echo "done"
# PDF Format
echo -n "Formatting into PDF.... "
if [ ! -d pdf ]; then
if [ -e pdf ]; then
echo "ERROR: pdf is not a directory"
#echo -n "Formatting into PDF.... "
#if [ ! -d pdf ]; then
# if [ -e pdf ]; then
# echo "ERROR: pdf is not a directory"
# exit
# fi
# mkdir pdf
#fi
#(db2pdf gtk-tut.sgml ; mv gtk-tut.pdf pdf) > /dev/null
#echo "done"
# RTF Format
echo -n "Formatting into RTF.... "
if [ ! -d rtf ]; then
if [ -e rtf ]; then
echo "ERROR: rtf is not a directory"
exit
fi
mkdir pdf
mkdir rtf
fi
(db2pdf gtk-tut.sgml ; mv gtk-tut.pdf pdf) > /dev/null
(db2rtf gtk-tut.sgml ; mv gtk-tut.rtf rtf) > /dev/null
cp -R $IMAGES rtf
echo "done"
# Copy examples
echo -n "Copying examples"
cp -R $EXAMPLES .
(cd examples ; make clean ; rm -rf CVS */CVS)
(cd examples ; make clean ; rm -rf CVS */CVS */.cvsignore README.1ST extract.awk extract.sh find-examples.sh)
echo "done"
rm -f *
rm -rf images
# Package it all up
echo -n "Creating packages.... "
......
......@@ -18,6 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
#include <stdlib.h>
#include <gtk/gtk.h>
/* Backing pixmap for drawing area */
......@@ -169,7 +170,7 @@ int main( int argc,
g_signal_connect_swapped (G_OBJECT (button), "clicked",
G_CALLBACK (gtk_widget_destroy),
window);
G_OBJECT (window));
gtk_widget_show (button);
gtk_widget_show (window);
......
......@@ -158,11 +158,11 @@ create_input_dialog ()
inputd = gtk_input_dialog_new();
g_signal_connect (G_OBJECT (inputd), "destroy",
G_CALLBACK (input_dialog_destroy), &inputd);
G_CALLBACK (input_dialog_destroy), (gpointer) &inputd);
g_signal_connect_swapped (G_OBJECT (GTK_INPUT_DIALOG (inputd)->close_button),
"clicked",
G_CALLBACK (gtk_widget_hide),
inputd);
G_OBJECT (inputd));
gtk_widget_hide (GTK_INPUT_DIALOG (inputd)->save_button);
gtk_widget_show (inputd);
......@@ -248,7 +248,7 @@ main (int argc, char *argv[])
g_signal_connect_swapped (G_OBJECT (button), "clicked",
G_CALLBACK (gtk_widget_destroy),
window);
G_OBJECT (window));
gtk_widget_show (button);
gtk_widget_show (window);
......
......@@ -73,7 +73,7 @@ int main( int argc,
button = gtk_button_new_with_label ("close");
g_signal_connect_swapped (G_OBJECT (button), "clicked",
G_CALLBACK (gtk_widget_destroy),
window);
G_OBJECT (window));
/* this makes it so the button is the default. */
......
......@@ -11,13 +11,14 @@ void get_targets( GtkWidget *widget,
gpointer data )
{
static GdkAtom targets_atom = GDK_NONE;
GtkWidget *window = (GtkWidget *)data;
/* Get the atom corresponding to the string "TARGETS" */
if (targets_atom == GDK_NONE)
targets_atom = gdk_atom_intern ("TARGETS", FALSE);
/* And request the "TARGETS" target for the primary selection */
gtk_selection_convert (widget, GDK_SELECTION_PRIMARY, targets_atom,
gtk_selection_convert (window, GDK_SELECTION_PRIMARY, targets_atom,
GDK_CURRENT_TIME);
}
......@@ -82,9 +83,9 @@ int main( int argc,
button = gtk_button_new_with_label ("Get Targets");
gtk_container_add (GTK_CONTAINER (window), button);
g_signal_connect (G_OBJECT(button), "clicked",
G_CALLBACK (get_targets), NULL);
g_signal_connect (G_OBJECT(button), "selection_received",
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (get_targets), (gpointer) window);
g_signal_connect (G_OBJECT (window), "selection_received",
G_CALLBACK (selection_received), NULL);
gtk_widget_show (button);
......
......@@ -2,6 +2,10 @@
#include <stdlib.h>
#include <gtk/gtk.h>
#include <time.h>
#include <string.h>
GtkWidget *selection_button;
GtkWidget *selection_widget;
/* Callback when the user toggles the selection */
void selection_toggled( GtkWidget *widget,
......@@ -9,7 +13,7 @@ void selection_toggled( GtkWidget *widget,
{
if (GTK_TOGGLE_BUTTON (widget)->active)
{
*have_selection = gtk_selection_owner_set (widget,
*have_selection = gtk_selection_owner_set (selection_widget,
GDK_SELECTION_PRIMARY,
GDK_CURRENT_TIME);
/* if claiming the selection failed, we return the button to
......@@ -37,7 +41,7 @@ gint selection_clear( GtkWidget *widget,
gint *have_selection )
{
*have_selection = FALSE;
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (selection_button), FALSE);
return TRUE;
}
......@@ -65,7 +69,6 @@ int main( int argc,
char *argv[] )
{
GtkWidget *window;
GtkWidget *selection_button;
static int have_selection = FALSE;
......@@ -82,21 +85,22 @@ int main( int argc,
/* Create a toggle button to act as the selection */
selection_widget = gtk_invisible_new ();
selection_button = gtk_toggle_button_new_with_label ("Claim Selection");
gtk_container_add (GTK_CONTAINER (window), selection_button);
gtk_widget_show (selection_button);
g_signal_connect (G_OBJECT (selection_button), "toggled",
G_CALLBACK (selection_toggled), &have_selection);
g_signal_connect (G_OBJECT (selection_button), "selection_clear_event",
G_CALLBACK (selection_clear), &have_selection);
G_CALLBACK (selection_toggled), (gpointer) &have_selection);
g_signal_connect (G_OBJECT (selection_widget), "selection_clear_event",
G_CALLBACK (selection_clear), (gpointer) &have_selection);
gtk_selection_add_target (selection_button,
gtk_selection_add_target (selection_widget,
GDK_SELECTION_PRIMARY,
GDK_SELECTION_TYPE_STRING,
1);
g_signal_connect (G_OBJECT (selection_button), "selection_get",
G_CALLBACK (selection_handle), &have_selection);
g_signal_connect (G_OBJECT (selection_widget), "selection_get",
G_CALLBACK (selection_handle), (gpointer) &have_selection);
gtk_widget_show (selection_button);
gtk_widget_show (window);
......
......@@ -160,7 +160,7 @@ int main( int argc,
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (spinner2), TRUE);
g_signal_connect (G_OBJECT (adj), "value_changed",
G_CALLBACK (change_digits),
spinner2);
(gpointer) spinner2);
gtk_box_pack_start (GTK_BOX (vbox2), spinner2, FALSE, TRUE, 0);
hbox = gtk_hbox_new (FALSE, 0);
......@@ -169,14 +169,14 @@ int main( int argc,
button = gtk_check_button_new_with_label ("Snap to 0.5-ticks");
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (toggle_snap),
spinner1);
(gpointer) spinner1);
gtk_box_pack_start (GTK_BOX (vbox), button, TRUE, TRUE, 0);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
button = gtk_check_button_new_with_label ("Numeric only input mode");
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (toggle_numeric),
spinner1);
(gpointer) spinner1);
gtk_box_pack_start (GTK_BOX (vbox), button, TRUE, TRUE, 0);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
......@@ -207,7 +207,7 @@ int main( int argc,
button = gtk_button_new_with_label ("Close");
g_signal_connect_swapped (G_OBJECT (button), "clicked",
G_CALLBACK (gtk_widget_destroy),
window);
G_OBJECT (window));
gtk_box_pack_start (GTK_BOX (hbox), button, TRUE, TRUE, 5);
gtk_widget_show_all (window);
......
......@@ -96,7 +96,7 @@ tictactoe_init (Tictactoe *ttt)
gtk_table_attach_defaults (GTK_TABLE (table), ttt->buttons[i][j],
i, i+1, j, j+1);
g_signal_connect (G_OBJECT (ttt->buttons[i][j]), "toggled",
G_CALLBACK (tictactoe_toggle), ttt);
G_CALLBACK (tictactoe_toggle), (gpointer) ttt);
gtk_widget_set_size_request (ttt->buttons[i][j], 20, 20);
gtk_widget_show (ttt->buttons[i][j]);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment