зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
3907fbc45e
Коммит
22c71a08b4
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче