Commit c4b771b8 authored by GMT 2003  Tony Gale's avatar GMT 2003 Tony Gale Committed by Tony Gale

docs/tutorial/gtk-tut.sgml: Adopted chapter 21.3 "Creating a Composite

Thu Jan 23 20:56:56 GMT 2003  Tony Gale <gale@gtk.org>
        * Sebastian Rittau  <srittau@jroger.in-berlin.de>:

           docs/tutorial/gtk-tut.sgml: Adopted chapter 21.3 "Creating a
           Composite widget" to modern standards. (I.e. use gobject instead of
           glib, derive from GtkTable instead of GtkVBox.) Bugzilla #103869.

        * docs/tutorial/gtk-tut.sgml, examples/tictactoe: Fixup tic-tac-toe
        code in Appendix C to reflect above changes.

        * examples/rangewidgets/rangewidgets.c: From Roger Leigh
        auto resize on page size change
parent 06116092
Thu Jan 23 20:56:56 GMT 2003 Tony Gale <gale@gtk.org>
* Sebastian Rittau <srittau@jroger.in-berlin.de>:
docs/tutorial/gtk-tut.sgml: Adopted chapter 21.3 "Creating a
Composite widget" to modern standards. (I.e. use gobject instead of
glib, derive from GtkTable instead of GtkVBox.) Bugzilla #103869.
* docs/tutorial/gtk-tut.sgml, examples/tictactoe: Fixup tic-tac-toe
code in Appendix C to reflect above changes.
* examples/rangewidgets/rangewidgets.c: From Roger Leigh
auto resize on page size change
2003-01-23 Daniel Elstner <daniel.elstner@gmx.net>
* gtk/gtktoolbar.c (gtk_toolbar_hide_all): Override hide_all
......
Thu Jan 23 20:56:56 GMT 2003 Tony Gale <gale@gtk.org>
* Sebastian Rittau <srittau@jroger.in-berlin.de>:
docs/tutorial/gtk-tut.sgml: Adopted chapter 21.3 "Creating a
Composite widget" to modern standards. (I.e. use gobject instead of
glib, derive from GtkTable instead of GtkVBox.) Bugzilla #103869.
* docs/tutorial/gtk-tut.sgml, examples/tictactoe: Fixup tic-tac-toe
code in Appendix C to reflect above changes.
* examples/rangewidgets/rangewidgets.c: From Roger Leigh
auto resize on page size change
2003-01-23 Daniel Elstner <daniel.elstner@gmx.net>
* gtk/gtktoolbar.c (gtk_toolbar_hide_all): Override hide_all
......
Thu Jan 23 20:56:56 GMT 2003 Tony Gale <gale@gtk.org>
* Sebastian Rittau <srittau@jroger.in-berlin.de>:
docs/tutorial/gtk-tut.sgml: Adopted chapter 21.3 "Creating a
Composite widget" to modern standards. (I.e. use gobject instead of
glib, derive from GtkTable instead of GtkVBox.) Bugzilla #103869.
* docs/tutorial/gtk-tut.sgml, examples/tictactoe: Fixup tic-tac-toe
code in Appendix C to reflect above changes.
* examples/rangewidgets/rangewidgets.c: From Roger Leigh
auto resize on page size change
2003-01-23 Daniel Elstner <daniel.elstner@gmx.net>
* gtk/gtktoolbar.c (gtk_toolbar_hide_all): Override hide_all
......
Thu Jan 23 20:56:56 GMT 2003 Tony Gale <gale@gtk.org>
* Sebastian Rittau <srittau@jroger.in-berlin.de>:
docs/tutorial/gtk-tut.sgml: Adopted chapter 21.3 "Creating a
Composite widget" to modern standards. (I.e. use gobject instead of
glib, derive from GtkTable instead of GtkVBox.) Bugzilla #103869.
* docs/tutorial/gtk-tut.sgml, examples/tictactoe: Fixup tic-tac-toe
code in Appendix C to reflect above changes.
* examples/rangewidgets/rangewidgets.c: From Roger Leigh
auto resize on page size change
2003-01-23 Daniel Elstner <daniel.elstner@gmx.net>
* gtk/gtktoolbar.c (gtk_toolbar_hide_all): Override hide_all
......
Thu Jan 23 20:56:56 GMT 2003 Tony Gale <gale@gtk.org>
* Sebastian Rittau <srittau@jroger.in-berlin.de>:
docs/tutorial/gtk-tut.sgml: Adopted chapter 21.3 "Creating a
Composite widget" to modern standards. (I.e. use gobject instead of
glib, derive from GtkTable instead of GtkVBox.) Bugzilla #103869.
* docs/tutorial/gtk-tut.sgml, examples/tictactoe: Fixup tic-tac-toe
code in Appendix C to reflect above changes.
* examples/rangewidgets/rangewidgets.c: From Roger Leigh
auto resize on page size change
2003-01-23 Daniel Elstner <daniel.elstner@gmx.net>
* gtk/gtktoolbar.c (gtk_toolbar_hide_all): Override hide_all
......
This diff is collapsed.
......@@ -43,7 +43,7 @@ GtkWidget *create_bbox( gint horizontal,
int main( int argc,
char *argv[] )
{
GtkWidget *window;
static GtkWidget* window = NULL;
GtkWidget *main_vbox;
GtkWidget *vbox;
GtkWidget *hbox;
......
......@@ -146,7 +146,7 @@ gtk_dial_destroy (GtkObject *object)
dial = GTK_DIAL (object);
if (dial->adjustment)
if (dial->adjustment)
{
g_object_unref (GTK_OBJECT (dial->adjustment));
dial->adjustment = NULL;
......@@ -353,7 +353,7 @@ gtk_dial_expose (GtkWidget *widget,
if ((upper - lower) == 0)
return FALSE;
increment = (100*G_PI) / (dial->radius*dial->radius);
increment = (100*M_PI) / (dial->radius*dial->radius);
inc = (upper - lower);
......@@ -363,7 +363,7 @@ gtk_dial_expose (GtkWidget *widget,
for (i = 0; i <= inc; i++)
{
theta = ((gfloat)i*G_PI / (18*inc/24.) - G_PI/6.);
theta = ((gfloat)i*M_PI / (18*inc/24.) - M_PI/6.);
if ((theta - last) < (increment))
continue;
......@@ -558,17 +558,17 @@ gtk_dial_update_mouse (GtkDial *dial, gint x, gint y)
old_value = dial->adjustment->value;
dial->angle = atan2(yc-y, x-xc);
if (dial->angle < -G_PI/2.)
dial->angle += 2*G_PI;
if (dial->angle < -M_PI/2.)
dial->angle += 2*M_PI;
if (dial->angle < -G_PI/6)
dial->angle = -G_PI/6;
if (dial->angle < -M_PI/6)
dial->angle = -M_PI/6;
if (dial->angle > 7.*G_PI/6.)
dial->angle = 7.*G_PI/6.;
if (dial->angle > 7.*M_PI/6.)
dial->angle = 7.*M_PI/6.;
dial->adjustment->value = dial->adjustment->lower + (7.*G_PI/6 - dial->angle) *
(dial->adjustment->upper - dial->adjustment->lower) / (4.*G_PI/3.);
dial->adjustment->value = dial->adjustment->lower + (7.*M_PI/6 - dial->angle) *
(dial->adjustment->upper - dial->adjustment->lower) / (4.*M_PI/3.);
if (dial->adjustment->value != old_value)
{
......@@ -615,7 +615,7 @@ gtk_dial_update (GtkDial *dial)
g_signal_emit_by_name (GTK_OBJECT (dial->adjustment), "value_changed");
}
dial->angle = 7.*G_PI/6. - (new_value - dial->adjustment->lower) * 4.*G_PI/3. /
dial->angle = 7.*M_PI/6. - (new_value - dial->adjustment->lower) * 4.*M_PI/3. /
(dial->adjustment->upper - dial->adjustment->lower);
gtk_widget_queue_draw (GTK_WIDGET (dial));
......
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