r14115 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:19 CEST 2009


Revision: 14115
Author: jghali
Date: 2009-10-07T20:27:48.350582Z
Commit message: #8494: cannot browse images in 'Manage images' with arrow keys 

Changeset: 
M  /branches/Version135/Scribus/scribus/prefsdialogbase.cpp
M  /branches/Version135/Scribus/scribus/picstatus.cpp
M  /branches/Version135/Scribus/scribus/prefsdialogbase.h
M  /branches/Version135/Scribus/scribus/picstatus.h

Diffs:
Index: scribus/picstatus.cpp
===================================================================
--- scribus/picstatus.cpp	(revision 14114)
+++ scribus/picstatus.cpp	(revision 14115)
@@ -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/prefsdialogbase.cpp
===================================================================
--- scribus/prefsdialogbase.cpp	(revision 14114)
+++ scribus/prefsdialogbase.cpp	(revision 14115)
@@ -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/picstatus.h
===================================================================
--- scribus/picstatus.h	(revision 14114)
+++ scribus/picstatus.h	(revision 14115)
@@ -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/prefsdialogbase.h
===================================================================
--- scribus/prefsdialogbase.h	(revision 14114)
+++ scribus/prefsdialogbase.h	(revision 14115)
@@ -57,6 +57,7 @@
 
 public slots:
 	void itemSelected(QListWidgetItem* ic);
+	void newItemSelected();
 
 signals:
 	void aboutToShow(QWidget *);




More information about the scribus-commit mailing list