r14116 by jghali - #8494: cannot browse images in 'Manage images' with arrow keys
scribus-commit
scribus-commit at lists.scribus.net
Wed Oct 7 22:55:39 CEST 2009
Revision: 14116
Author: jghali
Date: 2009-10-07T20:28:27.906586Z
Commit message: #8494: cannot browse images in 'Manage images' with arrow keys
Changeset:
M /trunk/Scribus/scribus/ui/picstatus.cpp
M /trunk/Scribus/scribus/ui/prefsdialogbase.h
M /trunk/Scribus/scribus/ui/preferencesdialog.cpp
M /trunk/Scribus/scribus/ui/picstatus.h
M /trunk/Scribus/scribus/ui/preferencesdialog.h
M /trunk/Scribus/scribus/ui/prefsdialogbase.cpp
Diffs:
Index: scribus/ui/picstatus.h
===================================================================
--- scribus/ui/picstatus.h (revision 14115)
+++ scribus/ui/picstatus.h (revision 14116)
@@ -52,6 +52,7 @@
void sortByPage();
void slotRightClick();
void imageSelected(QListWidgetItem *ite);
+ void newImageSelected();
/*!
\author Franz Schmid
\brief Enables or disables printing of the selected Image.
Index: scribus/ui/preferencesdialog.h
===================================================================
--- scribus/ui/preferencesdialog.h (revision 14115)
+++ scribus/ui/preferencesdialog.h (revision 14116)
@@ -58,6 +58,7 @@
public slots:
void itemSelected(QListWidgetItem* ic);
+ void newItemSelected();
void restoreDefaults();
void setupGui();
void saveGuiToPrefs();
Index: scribus/ui/picstatus.cpp
===================================================================
--- scribus/ui/picstatus.cpp (revision 14115)
+++ scribus/ui/picstatus.cpp (revision 14116)
@@ -68,7 +68,7 @@
fillTable();
workTab->setCurrentIndex(0);
connect(closeButton, SIGNAL(clicked()), this, SLOT(accept()));
- connect(imageViewArea, SIGNAL(itemPressed(QListWidgetItem*)), this, SLOT(imageSelected(QListWidgetItem*)));
+ connect(imageViewArea, SIGNAL(itemSelectionChanged()), this, SLOT(newImageSelected()));
connect(isPrinting, SIGNAL(clicked()), this, SLOT(PrintPic()));
connect(isVisibleCheck, SIGNAL(clicked()), this, SLOT(visiblePic()));
connect(goPageButton, SIGNAL(clicked()), this, SLOT(GotoPic()));
@@ -239,6 +239,12 @@
delete pmen;
}
+void PicStatus::newImageSelected()
+{
+ QList<QListWidgetItem*> items = imageViewArea->selectedItems();
+ imageSelected((items.count() > 0) ? items.at(0) : NULL);
+}
+
void PicStatus::imageSelected(QListWidgetItem *ite)
{
if (ite != NULL)
Index: scribus/ui/prefsdialogbase.cpp
===================================================================
--- scribus/ui/prefsdialogbase.cpp (revision 14115)
+++ scribus/ui/prefsdialogbase.cpp (revision 14116)
@@ -147,7 +147,7 @@
layout4->addWidget( buttonCancel );
prefsLayout->addLayout( layout4 );
languageChange();
- connect(prefsSelection, SIGNAL(itemClicked(QListWidgetItem *)), this, SLOT(itemSelected(QListWidgetItem* )));
+ connect(prefsSelection, SIGNAL(itemSelectionChanged()), this, SLOT(newItemSelected()));
connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
connect(saveButton, SIGNAL(clicked()), this, SLOT(saveButton_clicked()));
@@ -162,6 +162,12 @@
return counter-1;
}
+void PrefsDialogBase::newItemSelected()
+{
+ QList<QListWidgetItem*> items = prefsSelection->selectedItems();
+ itemSelected((items.count() > 0) ? items.at(0) : NULL);
+}
+
void PrefsDialogBase::itemSelected(QListWidgetItem* ic)
{
if (ic == 0)
Index: scribus/ui/prefsdialogbase.h
===================================================================
--- scribus/ui/prefsdialogbase.h (revision 14115)
+++ scribus/ui/prefsdialogbase.h (revision 14116)
@@ -57,6 +57,7 @@
public slots:
void itemSelected(QListWidgetItem* ic);
+ void newItemSelected();
signals:
void aboutToShow(QWidget *);
Index: scribus/ui/preferencesdialog.cpp
===================================================================
--- scribus/ui/preferencesdialog.cpp (revision 14115)
+++ scribus/ui/preferencesdialog.cpp (revision 14116)
@@ -80,7 +80,7 @@
connect(okButton, SIGNAL(clicked()), this, SLOT(accept()));
connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
connect(applyButton, SIGNAL(clicked()), this, SLOT(applyButtonClicked()));
- connect(preferencesTypeList, SIGNAL(itemClicked(QListWidgetItem *)), this, SLOT(itemSelected(QListWidgetItem* )));
+ connect(preferencesTypeList, SIGNAL(itemSelectionChanged()), this, SLOT(newItemSelected()));
initPreferenceValues();
setupGui();
@@ -149,6 +149,11 @@
return counter-1;
}
+void PreferencesDialog::newItemSelected()
+{
+ QList<QListWidgetItem*> items = preferencesTypeList->selectedItems();
+ itemSelected((items.count() > 0) ? items.at(0) : NULL);
+}
void PreferencesDialog::itemSelected(QListWidgetItem* ic)
{
More information about the scribus-commit
mailing list