Commit c9e78a10 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)

Tue May 12 16:54:15 1998  Owen Taylor  <otaylor@gtk.org>
	(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)

	* glib.h gstring.c gmessages.c: Added some missing
	const to arguments.

	* gutils.c (g_strsignal.c): Added missing return statements.

Tue May 12 16:56:35 1998  Owen Taylor  <otaylor@gtk.org>
	(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)

	* gtk/gtkbbox.h gtk/gtkcolorsel.h gtk/gtkvbbox.h:
	Changed #include "gtkfoo.h" to #include <gtk/gtkfoo.h>

	* gtk/gtkwindow.[ch]: Added const to gtk_window_set_wmclass

Tue May 12 15:16:10 1998  Owen Taylor  <otaylor@gtk.org>
	(From: Christopher James Lahey <clahey@umich.edu>)

	* gtk/gtkbutton.[ch] gtk/gtkenums.h gtk/gtktoolbar.[ch]
	  gtk/testgtk.c:

	Added 'relief' for buttons - they can be either GTK_RELIEF_NORMAL
	(old style), or GTK_RELIEF_NONE - no relief in the NORMAL
	state. Added gtk_toolbar_{set,get}_button_relief, which set/get
	the default relief for the toolbars buttons. Added an
	toggle for the toolbar test in testgtk.c.
parent fe6ef6c0
Tue May 12 16:56:35 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
* gtk/gtkbbox.h gtk/gtkcolorsel.h gtk/gtkvbbox.h:
Changed #include "gtkfoo.h" to #include <gtk/gtkfoo.h>
* gtk/gtkwindow.[ch]: Added const to gtk_window_set_wmclass
Tue May 12 15:16:10 1998 Owen Taylor <otaylor@gtk.org>
(From: Christopher James Lahey <clahey@umich.edu>)
* gtk/gtkbutton.[ch] gtk/gtkenums.h gtk/gtktoolbar.[ch]
gtk/testgtk.c:
Added 'relief' for buttons - they can be either GTK_RELIEF_NORMAL
(old style), or GTK_RELIEF_NONE - no relief in the NORMAL
state. Added gtk_toolbar_{set,get}_button_relief, which set/get
the default relief for the toolbars buttons. Added an
toggle for the toolbar test in testgtk.c.
Tue May 12 00:24:59 1998 Owen Taylor <otaylor@gtk.org> Tue May 12 00:24:59 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtk-config.1: Rewritten and hopefully improved. * docs/gtk-config.1: Rewritten and hopefully improved.
......
Tue May 12 16:56:35 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
* gtk/gtkbbox.h gtk/gtkcolorsel.h gtk/gtkvbbox.h:
Changed #include "gtkfoo.h" to #include <gtk/gtkfoo.h>
* gtk/gtkwindow.[ch]: Added const to gtk_window_set_wmclass
Tue May 12 15:16:10 1998 Owen Taylor <otaylor@gtk.org>
(From: Christopher James Lahey <clahey@umich.edu>)
* gtk/gtkbutton.[ch] gtk/gtkenums.h gtk/gtktoolbar.[ch]
gtk/testgtk.c:
Added 'relief' for buttons - they can be either GTK_RELIEF_NORMAL
(old style), or GTK_RELIEF_NONE - no relief in the NORMAL
state. Added gtk_toolbar_{set,get}_button_relief, which set/get
the default relief for the toolbars buttons. Added an
toggle for the toolbar test in testgtk.c.
Tue May 12 00:24:59 1998 Owen Taylor <otaylor@gtk.org> Tue May 12 00:24:59 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtk-config.1: Rewritten and hopefully improved. * docs/gtk-config.1: Rewritten and hopefully improved.
......
Tue May 12 16:56:35 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
* gtk/gtkbbox.h gtk/gtkcolorsel.h gtk/gtkvbbox.h:
Changed #include "gtkfoo.h" to #include <gtk/gtkfoo.h>
* gtk/gtkwindow.[ch]: Added const to gtk_window_set_wmclass
Tue May 12 15:16:10 1998 Owen Taylor <otaylor@gtk.org>
(From: Christopher James Lahey <clahey@umich.edu>)
* gtk/gtkbutton.[ch] gtk/gtkenums.h gtk/gtktoolbar.[ch]
gtk/testgtk.c:
Added 'relief' for buttons - they can be either GTK_RELIEF_NORMAL
(old style), or GTK_RELIEF_NONE - no relief in the NORMAL
state. Added gtk_toolbar_{set,get}_button_relief, which set/get
the default relief for the toolbars buttons. Added an
toggle for the toolbar test in testgtk.c.
Tue May 12 00:24:59 1998 Owen Taylor <otaylor@gtk.org> Tue May 12 00:24:59 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtk-config.1: Rewritten and hopefully improved. * docs/gtk-config.1: Rewritten and hopefully improved.
......
Tue May 12 16:56:35 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
* gtk/gtkbbox.h gtk/gtkcolorsel.h gtk/gtkvbbox.h:
Changed #include "gtkfoo.h" to #include <gtk/gtkfoo.h>
* gtk/gtkwindow.[ch]: Added const to gtk_window_set_wmclass
Tue May 12 15:16:10 1998 Owen Taylor <otaylor@gtk.org>
(From: Christopher James Lahey <clahey@umich.edu>)
* gtk/gtkbutton.[ch] gtk/gtkenums.h gtk/gtktoolbar.[ch]
gtk/testgtk.c:
Added 'relief' for buttons - they can be either GTK_RELIEF_NORMAL
(old style), or GTK_RELIEF_NONE - no relief in the NORMAL
state. Added gtk_toolbar_{set,get}_button_relief, which set/get
the default relief for the toolbars buttons. Added an
toggle for the toolbar test in testgtk.c.
Tue May 12 00:24:59 1998 Owen Taylor <otaylor@gtk.org> Tue May 12 00:24:59 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtk-config.1: Rewritten and hopefully improved. * docs/gtk-config.1: Rewritten and hopefully improved.
......
Tue May 12 16:56:35 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
* gtk/gtkbbox.h gtk/gtkcolorsel.h gtk/gtkvbbox.h:
Changed #include "gtkfoo.h" to #include <gtk/gtkfoo.h>
* gtk/gtkwindow.[ch]: Added const to gtk_window_set_wmclass
Tue May 12 15:16:10 1998 Owen Taylor <otaylor@gtk.org>
(From: Christopher James Lahey <clahey@umich.edu>)
* gtk/gtkbutton.[ch] gtk/gtkenums.h gtk/gtktoolbar.[ch]
gtk/testgtk.c:
Added 'relief' for buttons - they can be either GTK_RELIEF_NORMAL
(old style), or GTK_RELIEF_NONE - no relief in the NORMAL
state. Added gtk_toolbar_{set,get}_button_relief, which set/get
the default relief for the toolbars buttons. Added an
toggle for the toolbar test in testgtk.c.
Tue May 12 00:24:59 1998 Owen Taylor <otaylor@gtk.org> Tue May 12 00:24:59 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtk-config.1: Rewritten and hopefully improved. * docs/gtk-config.1: Rewritten and hopefully improved.
......
Tue May 12 16:56:35 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
* gtk/gtkbbox.h gtk/gtkcolorsel.h gtk/gtkvbbox.h:
Changed #include "gtkfoo.h" to #include <gtk/gtkfoo.h>
* gtk/gtkwindow.[ch]: Added const to gtk_window_set_wmclass
Tue May 12 15:16:10 1998 Owen Taylor <otaylor@gtk.org>
(From: Christopher James Lahey <clahey@umich.edu>)
* gtk/gtkbutton.[ch] gtk/gtkenums.h gtk/gtktoolbar.[ch]
gtk/testgtk.c:
Added 'relief' for buttons - they can be either GTK_RELIEF_NORMAL
(old style), or GTK_RELIEF_NONE - no relief in the NORMAL
state. Added gtk_toolbar_{set,get}_button_relief, which set/get
the default relief for the toolbars buttons. Added an
toggle for the toolbar test in testgtk.c.
Tue May 12 00:24:59 1998 Owen Taylor <otaylor@gtk.org> Tue May 12 00:24:59 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtk-config.1: Rewritten and hopefully improved. * docs/gtk-config.1: Rewritten and hopefully improved.
......
Tue May 12 16:56:35 1998 Owen Taylor <otaylor@gtk.org>
(James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
* gtk/gtkbbox.h gtk/gtkcolorsel.h gtk/gtkvbbox.h:
Changed #include "gtkfoo.h" to #include <gtk/gtkfoo.h>
* gtk/gtkwindow.[ch]: Added const to gtk_window_set_wmclass
Tue May 12 15:16:10 1998 Owen Taylor <otaylor@gtk.org>
(From: Christopher James Lahey <clahey@umich.edu>)
* gtk/gtkbutton.[ch] gtk/gtkenums.h gtk/gtktoolbar.[ch]
gtk/testgtk.c:
Added 'relief' for buttons - they can be either GTK_RELIEF_NORMAL
(old style), or GTK_RELIEF_NONE - no relief in the NORMAL
state. Added gtk_toolbar_{set,get}_button_relief, which set/get
the default relief for the toolbars buttons. Added an
toggle for the toolbar test in testgtk.c.
Tue May 12 00:24:59 1998 Owen Taylor <otaylor@gtk.org> Tue May 12 00:24:59 1998 Owen Taylor <otaylor@gtk.org>
* docs/gtk-config.1: Rewritten and hopefully improved. * docs/gtk-config.1: Rewritten and hopefully improved.
......
...@@ -127,7 +127,7 @@ gdk_region_polygon (GdkPoint *points, ...@@ -127,7 +127,7 @@ gdk_region_polygon (GdkPoint *points,
GdkRegionPrivate *private; GdkRegionPrivate *private;
GdkRegion *region; GdkRegion *region;
Region xregion; Region xregion;
gint xfill_rule = 0; gint xfill_rule = EvenOddRule;
g_return_val_if_fail (points != NULL, NULL); g_return_val_if_fail (points != NULL, NULL);
g_return_val_if_fail (npoints != 0, NULL); /* maybe we should check for at least three points */ g_return_val_if_fail (npoints != 0, NULL); /* maybe we should check for at least three points */
......
...@@ -127,7 +127,7 @@ gdk_region_polygon (GdkPoint *points, ...@@ -127,7 +127,7 @@ gdk_region_polygon (GdkPoint *points,
GdkRegionPrivate *private; GdkRegionPrivate *private;
GdkRegion *region; GdkRegion *region;
Region xregion; Region xregion;
gint xfill_rule = 0; gint xfill_rule = EvenOddRule;
g_return_val_if_fail (points != NULL, NULL); g_return_val_if_fail (points != NULL, NULL);
g_return_val_if_fail (npoints != 0, NULL); /* maybe we should check for at least three points */ g_return_val_if_fail (npoints != 0, NULL); /* maybe we should check for at least three points */
......
Tue May 12 16:54:15 1998 Owen Taylor <otaylor@gtk.org>
( James A <jamesa@demon.net> : gtk-jamesa-980511-4.patch)
* glib.h gstring.c gmessages.c: Added some missing
const to arguments.
* gutils.c (g_strsignal.c): Added missing return statements.
Mon May 11 21:11:54 1998 Owen Taylor <otaylor@gtk.org> Mon May 11 21:11:54 1998 Owen Taylor <otaylor@gtk.org>
* gutils.c gmessages.c: Moved g_error, g_warning, g_message and * gutils.c gmessages.c: Moved g_error, g_warning, g_message and
......
...@@ -684,10 +684,10 @@ gdouble g_timer_elapsed (GTimer *timer, ...@@ -684,10 +684,10 @@ gdouble g_timer_elapsed (GTimer *timer,
/* Output /* Output
*/ */
void g_error (gchar *format, ...) G_GNUC_PRINTF (1, 2); void g_error (const gchar *format, ...) G_GNUC_PRINTF (1, 2);
void g_warning (gchar *format, ...) G_GNUC_PRINTF (1, 2); void g_warning (const gchar *format, ...) G_GNUC_PRINTF (1, 2);
void g_message (gchar *format, ...) G_GNUC_PRINTF (1, 2); void g_message (const gchar *format, ...) G_GNUC_PRINTF (1, 2);
void g_print (gchar *format, ...) G_GNUC_PRINTF (1, 2); void g_print (const gchar *format, ...) G_GNUC_PRINTF (1, 2);
/* Utility functions /* Utility functions
*/ */
...@@ -742,9 +742,9 @@ void g_stack_trace (const gchar *progname, ...@@ -742,9 +742,9 @@ void g_stack_trace (const gchar *progname,
GStringChunk* g_string_chunk_new (gint size); GStringChunk* g_string_chunk_new (gint size);
void g_string_chunk_free (GStringChunk *chunk); void g_string_chunk_free (GStringChunk *chunk);
gchar* g_string_chunk_insert (GStringChunk *chunk, gchar* g_string_chunk_insert (GStringChunk *chunk,
gchar* string); const gchar *string);
gchar* g_string_chunk_insert_const (GStringChunk *chunk, gchar* g_string_chunk_insert_const (GStringChunk *chunk,
gchar* string); const gchar *string);
/* Strings /* Strings
*/ */
......
...@@ -31,7 +31,7 @@ static GPrintFunc glib_print_func = NULL; ...@@ -31,7 +31,7 @@ static GPrintFunc glib_print_func = NULL;
extern char* g_vsprintf (const gchar *fmt, va_list *args, va_list *args2); extern char* g_vsprintf (const gchar *fmt, va_list *args, va_list *args2);
void void
g_error (gchar *format, ...) g_error (const gchar *format, ...)
{ {
va_list args, args2; va_list args, args2;
char *buf; char *buf;
...@@ -65,7 +65,7 @@ g_error (gchar *format, ...) ...@@ -65,7 +65,7 @@ g_error (gchar *format, ...)
} }
void void
g_warning (gchar *format, ...) g_warning (const gchar *format, ...)
{ {
va_list args, args2; va_list args, args2;
char *buf; char *buf;
...@@ -89,7 +89,7 @@ g_warning (gchar *format, ...) ...@@ -89,7 +89,7 @@ g_warning (gchar *format, ...)
} }
void void
g_message (gchar *format, ...) g_message (const gchar *format, ...)
{ {
va_list args, args2; va_list args, args2;
char *buf; char *buf;
...@@ -113,7 +113,7 @@ g_message (gchar *format, ...) ...@@ -113,7 +113,7 @@ g_message (gchar *format, ...)
} }
void void
g_print (gchar *format, ...) g_print (const gchar *format, ...)
{ {
va_list args, args2; va_list args, args2;
char *buf; char *buf;
......
...@@ -124,7 +124,7 @@ g_string_chunk_free (GStringChunk *fchunk) ...@@ -124,7 +124,7 @@ g_string_chunk_free (GStringChunk *fchunk)
gchar* gchar*
g_string_chunk_insert (GStringChunk *fchunk, g_string_chunk_insert (GStringChunk *fchunk,
gchar* string) const gchar *string)
{ {
GRealStringChunk *chunk = (GRealStringChunk*) fchunk; GRealStringChunk *chunk = (GRealStringChunk*) fchunk;
gint len = strlen (string); gint len = strlen (string);
...@@ -160,7 +160,7 @@ g_string_chunk_insert (GStringChunk *fchunk, ...@@ -160,7 +160,7 @@ g_string_chunk_insert (GStringChunk *fchunk,
gchar* gchar*
g_string_chunk_insert_const (GStringChunk *fchunk, g_string_chunk_insert_const (GStringChunk *fchunk,
gchar* string) const gchar *string)
{ {
GRealStringChunk *chunk = (GRealStringChunk*) fchunk; GRealStringChunk *chunk = (GRealStringChunk*) fchunk;
char* lookup; char* lookup;
......
...@@ -570,85 +570,85 @@ g_strsignal (gint signum) ...@@ -570,85 +570,85 @@ g_strsignal (gint signum)
case SIGQUIT: return "Quit"; case SIGQUIT: return "Quit";
#endif #endif
#ifdef SIGILL #ifdef SIGILL
case SIGILL: "Illegal instruction"; case SIGILL: return "Illegal instruction";
#endif #endif
#ifdef SIGTRAP #ifdef SIGTRAP
case SIGTRAP: "Trace/breakpoint trap"; case SIGTRAP: return "Trace/breakpoint trap";
#endif #endif
#ifdef SIGABRT #ifdef SIGABRT
case SIGABRT: "IOT trap/Abort"; case SIGABRT: return "IOT trap/Abort";
#endif #endif
#ifdef SIGBUS #ifdef SIGBUS
case SIGBUS: "Bus error"; case SIGBUS: return "Bus error";
#endif #endif
#ifdef SIGFPE #ifdef SIGFPE
case SIGFPE: "Floating point exception"; case SIGFPE: return "Floating point exception";
#endif #endif
#ifdef SIGKILL #ifdef SIGKILL
case SIGKILL: "Killed"; case SIGKILL: return "Killed";
#endif #endif
#ifdef SIGUSR1 #ifdef SIGUSR1
case SIGUSR1: "User defined signal 1"; case SIGUSR1: return "User defined signal 1";
#endif #endif
#ifdef SIGSEGV #ifdef SIGSEGV
case SIGSEGV: "Segmentation fault"; case SIGSEGV: return "Segmentation fault";
#endif #endif
#ifdef SIGUSR2 #ifdef SIGUSR2
case SIGUSR2: "User defined signal 2"; case SIGUSR2: return "User defined signal 2";
#endif #endif
#ifdef SIGPIPE #ifdef SIGPIPE
case SIGPIPE: "Broken pipe"; case SIGPIPE: return "Broken pipe";
#endif #endif
#ifdef SIGALRM #ifdef SIGALRM
case SIGALRM: "Alarm clock"; case SIGALRM: return "Alarm clock";
#endif #endif
#ifdef SIGTERM #ifdef SIGTERM
case SIGTERM: "Terminated"; case SIGTERM: return "Terminated";
#endif #endif
#ifdef SIGSTKFLT #ifdef SIGSTKFLT
case SIGSTKFLT: "Stack fault"; case SIGSTKFLT: return "Stack fault";
#endif #endif
#ifdef SIGCHLD #ifdef SIGCHLD
case SIGCHLD: "Child exited"; case SIGCHLD: return "Child exited";
#endif #endif
#ifdef SIGCONT #ifdef SIGCONT
case SIGCONT: "Continued"; case SIGCONT: return "Continued";
#endif #endif
#ifdef SIGSTOP #ifdef SIGSTOP
case SIGSTOP: "Stopped (signal)"; case SIGSTOP: return "Stopped (signal)";
#endif #endif
#ifdef SIGTSTP #ifdef SIGTSTP
case SIGTSTP: "Stopped"; case SIGTSTP: return "Stopped";
#endif #endif
#ifdef SIGTTIN #ifdef SIGTTIN
case SIGTTIN: "Stopped (tty input)"; case SIGTTIN: return "Stopped (tty input)";
#endif #endif
#ifdef SIGTTOU #ifdef SIGTTOU
case SIGTTOU: "Stopped (tty output)"; case SIGTTOU: return "Stopped (tty output)";
#endif #endif
#ifdef SIGURG #ifdef SIGURG
case SIGURG: "Urgent condition"; case SIGURG: return "Urgent condition";
#endif #endif
#ifdef SIGXCPU #ifdef SIGXCPU
case SIGXCPU: "CPU time limit exceeded"; case SIGXCPU: return "CPU time limit exceeded";
#endif #endif
#ifdef SIGXFSZ #ifdef SIGXFSZ
case SIGXFSZ: "File size limit exceeded"; case SIGXFSZ: return "File size limit exceeded";
#endif #endif
#ifdef SIGVTALRM #ifdef SIGVTALRM
case SIGVTALRM: "Virtual time alarm"; case SIGVTALRM: return "Virtual time alarm";
#endif #endif
#ifdef SIGPROF #ifdef SIGPROF
case SIGPROF: "Profile signal"; case SIGPROF: return "Profile signal";
#endif #endif
#ifdef SIGWINCH #ifdef SIGWINCH
case SIGWINCH: "Window size changed"; case SIGWINCH: return "Window size changed";
#endif #endif
#ifdef SIGIO #ifdef SIGIO
case SIGIO: "Possible I/O"; case SIGIO: return "Possible I/O";
#endif #endif
#ifdef SIGPWR #ifdef SIGPWR
case SIGPWR: "Power failure"; case SIGPWR: return "Power failure";
#endif #endif
#ifdef SIGUNUSED #ifdef SIGUNUSED
case SIGUNUSED: return "Unused signal"; case SIGUNUSED: return "Unused signal";
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#ifndef __GTK_BUTTON_BOX_H__ #ifndef __GTK_BUTTON_BOX_H__
#define __GTK_BUTTON_BOX_H__ #define __GTK_BUTTON_BOX_H__
#include "gtkbox.h" #include <gtk/gtkbox.h>
#ifdef __cplusplus #ifdef __cplusplus
......
...@@ -206,6 +206,7 @@ gtk_button_init (GtkButton *button) ...@@ -206,6 +206,7 @@ gtk_button_init (GtkButton *button)
button->child = NULL; button->child = NULL;
button->in_button = FALSE; button->in_button = FALSE;
button->button_down = FALSE; button->button_down = FALSE;
button->relief = GTK_RELIEF_NORMAL;
} }
static void static void
...@@ -290,6 +291,25 @@ gtk_button_leave (GtkButton *button) ...@@ -290,6 +291,25 @@ gtk_button_leave (GtkButton *button)
gtk_signal_emit (GTK_OBJECT (button), button_signals[LEAVE]); gtk_signal_emit (GTK_OBJECT (button), button_signals[LEAVE]);
} }
void
gtk_button_set_relief (GtkButton *button,
GtkReliefStyle newrelief)
{
g_return_if_fail (button != NULL);
g_return_if_fail (GTK_IS_BUTTON (button));
button->relief = newrelief;
}
GtkReliefStyle
gtk_button_get_relief(GtkButton *button)
{
g_return_val_if_fail (button != NULL, GTK_RELIEF_NORMAL);
g_return_val_if_fail (GTK_IS_BUTTON (button), GTK_RELIEF_NORMAL);
return button->relief;
}
static void static void
gtk_button_map (GtkWidget *widget) gtk_button_map (GtkWidget *widget)
{ {
...@@ -507,7 +527,11 @@ gtk_button_paint (GtkWidget *widget, ...@@ -507,7 +527,11 @@ gtk_button_paint (GtkWidget *widget,
if (gdk_rectangle_intersect (area, &restrict_area, &new_area)) if (gdk_rectangle_intersect (area, &restrict_area, &new_area))
{ {
gtk_style_set_background (widget->style, widget->window, GTK_WIDGET_STATE (widget)); if ((GTK_WIDGET_STATE (widget) == GTK_STATE_PRELIGHT) &&
(GTK_BUTTON (widget)->relief == GTK_RELIEF_NONE))
gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL);
else
gtk_style_set_background (widget->style, widget->window, GTK_WIDGET_STATE (widget));
gdk_window_clear_area (widget->window, gdk_window_clear_area (widget->window,
new_area.x, new_area.y, new_area.x, new_area.y,
new_area.width, new_area.height); new_area.width, new_area.height);
...@@ -631,10 +655,14 @@ gtk_button_draw_focus (GtkWidget *widget) ...@@ -631,10 +655,14 @@ gtk_button_draw_focus (GtkWidget *widget)
gdk_draw_rectangle (widget->window, gdk_draw_rectangle (widget->window,
widget->style->bg_gc[GTK_WIDGET_STATE (widget)], FALSE, widget->style->bg_gc[GTK_WIDGET_STATE (widget)], FALSE,
x + 1, y + 1, width - 4, height - 4); x + 1, y + 1, width - 4, height - 4);
else else if (button->relief == GTK_RELIEF_NORMAL)
gdk_draw_rectangle (widget->window, gdk_draw_rectangle (widget->window,
widget->style->bg_gc[GTK_WIDGET_STATE (widget)], FALSE, widget->style->bg_gc[GTK_WIDGET_STATE (widget)], FALSE,
x + 2, y + 2, width - 5, height - 5); x + 2, y + 2, width - 5, height - 5);
else
gdk_draw_rectangle (widget->window,
widget->style->bg_gc[GTK_WIDGET_STATE (widget)], FALSE,
x, y, width - 1, height - 1);
} }
if (GTK_WIDGET_STATE (widget) == GTK_STATE_ACTIVE) if (GTK_WIDGET_STATE (widget) == GTK_STATE_ACTIVE)
...@@ -642,9 +670,14 @@ gtk_button_draw_focus (GtkWidget *widget) ...@@ -642,9 +670,14 @@ gtk_button_draw_focus (GtkWidget *widget)
else else
shadow_type = GTK_SHADOW_OUT; shadow_type = GTK_SHADOW_OUT;
gtk_draw_shadow (widget->style, widget->window, if ((button->relief == GTK_RELIEF_NORMAL) ||
GTK_WIDGET_STATE (widget), shadow_type, ((GTK_WIDGET_STATE (widget) != GTK_STATE_NORMAL) &&
x, y, width, height); (GTK_WIDGET_STATE (widget) != GTK_STATE_INSENSITIVE)))
{
gtk_draw_shadow (widget->style, widget->window,
GTK_WIDGET_STATE (widget), shadow_type,
x, y, width, height);
}
if (GTK_WIDGET_HAS_FOCUS (widget)) if (GTK_WIDGET_HAS_FOCUS (widget))
{ {
...@@ -676,7 +709,7 @@ gtk_button_draw_default (GtkWidget *widget) ...@@ -676,7 +709,7 @@ gtk_button_draw_default (GtkWidget *widget)
width = widget->allocation.width - GTK_CONTAINER (widget)->border_width * 2; width = widget->allocation.width - GTK_CONTAINER (widget)->border_width * 2;
height = widget->allocation.height - GTK_CONTAINER (widget)->border_width * 2; height = widget->allocation.height - GTK_CONTAINER (widget)->border_width * 2;