summaryrefslogtreecommitdiff
path: root/app/wlib/gtklib/control.c
diff options
context:
space:
mode:
Diffstat (limited to 'app/wlib/gtklib/control.c')
-rw-r--r--app/wlib/gtklib/control.c37
1 files changed, 20 insertions, 17 deletions
diff --git a/app/wlib/gtklib/control.c b/app/wlib/gtklib/control.c
index 07d9210..0332470 100644
--- a/app/wlib/gtklib/control.c
+++ b/app/wlib/gtklib/control.c
@@ -89,7 +89,17 @@ void wControlActive(
abort();
}
- gtk_widget_set_sensitive(GTK_WIDGET(b->widget), active);
+ if (b->type == B_LIST || b->type == B_DROPLIST ) {
+
+ gtk_widget_set_sensitive(gtk_bin_get_child(GTK_BIN(b->widget)), active);
+ gtk_combo_box_set_button_sensitivity(GTK_COMBO_BOX(b->widget),
+ active?GTK_SENSITIVITY_ON:GTK_SENSITIVITY_OFF);
+
+ } else {
+
+ gtk_widget_set_sensitive(GTK_WIDGET(b->widget), active);
+
+ }
}
/**
@@ -102,7 +112,7 @@ void wControlActive(
* \returns width of label including some space
*/
-wPos_t wLabelWidth(
+wWinPix_t wLabelWidth(
const char * label)
{
GtkWidget * widget;
@@ -122,7 +132,7 @@ wPos_t wLabelWidth(
* \returns width
*/
-wPos_t wControlGetWidth(
+wWinPix_t wControlGetWidth(
wControl_p b)
{
return b->w;
@@ -135,7 +145,7 @@ wPos_t wControlGetWidth(
* \returns height
*/
-wPos_t wControlGetHeight(
+wWinPix_t wControlGetHeight(
wControl_p b)
{
return b->h;
@@ -148,7 +158,7 @@ wPos_t wControlGetHeight(
* \returns position
*/
-wPos_t wControlGetPosX(
+wWinPix_t wControlGetPosX(
wControl_p b) /* Control */
{
return b->realX;
@@ -161,7 +171,7 @@ wPos_t wControlGetPosX(
* \returns position
*/
-wPos_t wControlGetPosY(
+wWinPix_t wControlGetPosY(
wControl_p b) /* Control */
{
return b->realY - BORDERSIZE - ((b->parent->option&F_MENUBAR)?b->parent->menu_height:0);
@@ -177,8 +187,8 @@ wPos_t wControlGetPosY(
void wControlSetPos(
wControl_p b,
- wPos_t x,
- wPos_t y)
+ wWinPix_t x,
+ wWinPix_t y)
{
b->realX = x;
b->realY = y + BORDERSIZE + ((b->parent->option&F_MENUBAR)?b->parent->menu_height:0);
@@ -306,19 +316,12 @@ void wControlHilite(
{
cairo_t *cr;
int off = GTKCONTROLHILITEWIDTH/2+1;
+ if ( debugWindow >= 1 )
+ printf( "wControlHIlite( %s, %d )\n", b->labelStr, hilite );
if (b->widget == NULL) {
return;
}
-
- if (! gtk_widget_get_visible(b->widget)) {
- return;
- }
-
- if (! gtk_widget_get_visible(b->parent->widget)) {
- return;
- }
-
b->outline = hilite;
if (b->widget)