Only toggle the checkbox when the checkbox is clicked. Bug 112252, patch by

Andrew Schultz <ajschult@mindspring.com>, r=dveditz, sr=bryner
This commit is contained in:
bzbarsky%mit.edu 2004-04-14 02:43:56 +00:00
Родитель 3907fbc45e
Коммит 22c71a08b4
2 изменённых файлов: 11 добавлений и 5 удалений

Просмотреть файл

@ -481,7 +481,7 @@ nsComponentsDlg::RowSelected(GtkWidget *aWidget, gint aRow, gint aColumn,
if (aColumn == -1 && !aEvent)
return;
ToggleRowSelection(aWidget, aRow);
ToggleRowSelection(aWidget, aRow, aColumn);
}
void
@ -491,11 +491,12 @@ nsComponentsDlg::KeyPressed(GtkWidget *aWidget, GdkEventKey *aEvent,
DUMP("KeyPressed");
if (aEvent->keyval == GDK_space)
ToggleRowSelection(aWidget, sCurrRowSelected);
ToggleRowSelection(aWidget, sCurrRowSelected, 0);
}
void
nsComponentsDlg::ToggleRowSelection(GtkWidget *aWidget, gint aRow)
nsComponentsDlg::ToggleRowSelection(GtkWidget *aWidget, gint aRow,
gint aColumn)
{
int numRows = 0, currRow = 0;
GtkStyle *style = NULL;
@ -523,6 +524,10 @@ nsComponentsDlg::ToggleRowSelection(GtkWidget *aWidget, gint aRow)
currComp->GetDescLong());
gtk_widget_show(sDescLong);
// don't toggle checkbox for clicks on component text
if (aColumn != 0)
break;
if (currComp->IsSelected())
{
DUMP("Toggling off...");

Просмотреть файл

@ -49,10 +49,11 @@ public:
int Hide(int aDirection);
static void RowSelected(GtkWidget *aWidget, gint aRow, gint aColumn,
GdkEventButton *aEvent, gpointer aData);
GdkEventButton *aEvent, gpointer aData);
static void KeyPressed(GtkWidget *aWidget, GdkEventKey *aEvent,
gpointer aData);
static void ToggleRowSelection(GtkWidget *aEvent, gint aRow);
static void ToggleRowSelection(GtkWidget *aEvent, gint aRow,
gint aColumn);
/*--------------------------------------------------------------------*
* INI Properties