[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bacula-devel] patch: fix joblist selection


This patch is applied in the trunk.  Riccardo,  Does this catch me up
with patches you have sent??

I'm assuming you may be working on being able to resort the joblist??

Dirk


On Fri, 2008-05-16 at 21:45 +0200, rghetta wrote:
> Joblist deletion wasn't working properly because the itemchanged signal 
> used by bat is issued /before/ the selection is made.
> Also, my previous patch disabled multiple row selection.
> This patch fixes both issues.
> 
> Ciao,
> Riccardo
> plain text document attachment (jobsel.patch)
> Index: bacula/src/qt-console/joblist/joblist.cpp
> ===================================================================
> --- bacula/src/qt-console/joblist/joblist.cpp	(revision 6979)
> +++ bacula/src/qt-console/joblist/joblist.cpp	(working copy)
> @@ -138,7 +138,6 @@
>     mp_tableWidget->setColumnCount(headerlist.size());
>     mp_tableWidget->setHorizontalHeaderLabels(headerlist);
>     mp_tableWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
> -   mp_tableWidget->setSelectionMode(QAbstractItemView::SingleSelection);
>  
>     if (mainWin->m_sqlDebug) {
>        Pmsg1(000, "Query cmd : %s\n",query.toUtf8().data());
> @@ -157,7 +156,7 @@
>        foreach (resultline, results) {
>           fieldlist = resultline.split("\t");
>           if (fieldlist.size() < 12)
> -	    continue; // some fields missing, ignore row
> +  	    continue; /* some fields missing, ignore row */
>  
>  	 TableItemFormatter jobitem(*mp_tableWidget, row);
>    
> @@ -397,7 +396,6 @@
>        int row = currentItem->row();
>        QTableWidgetItem* jobitem = mp_tableWidget->item(row, 0);
>        m_currentJob = jobitem->text();
> -      selectedJobsGet();
>  
>        /* include purged action or not */
>        jobitem = mp_tableWidget->item(row, m_purgedIndex);
> @@ -446,6 +444,10 @@
>             currentItemChanged(QTableWidgetItem *, QTableWidgetItem *)),
>             this, SLOT(tableItemChanged(QTableWidgetItem *, QTableWidgetItem *)));
>  
> +   /* for the tableItemChanged to maintain a delete selection */
> +   connect(mp_tableWidget, SIGNAL( itemSelectionChanged()),
> +           this, SLOT(selectedJobsGet()) );
> +
>     /* Do what is required for the local context sensitive menu */
>  
> 
> Index: bacula/src/qt-console/joblist/joblist.h
> ===================================================================
> --- bacula/src/qt-console/joblist/joblist.h	(revision 6979)
> +++ bacula/src/qt-console/joblist/joblist.h	(working copy)
> @@ -54,6 +54,7 @@
>     void populateTable();
>     virtual void treeWidgetName(QString &);
>     void tableItemChanged(QTableWidgetItem *, QTableWidgetItem *);
> +   void selectedJobsGet();
>  
>  private slots:
>     void consoleListJobid();
> @@ -77,7 +78,6 @@
>     void readSettings();
>     void prepareFilterWidgets();
>     void fillQueryString(QString &query);
> -   void selectedJobsGet();
>     QSplitter *m_splitter;
>     QString m_groupText;
>     QString m_splitText;
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft 
> Defy all challenges. Microsoft(R) Visual Studio 2008. 
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________ Bacula-devel mailing list Bacula-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/bacula-devel


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bacula-devel mailing list
Bacula-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/bacula-devel


This mailing list archive is a service of Copilotco.