~mateo-salta/nitroshare/nitroshare

« back to all changes in this revision

Viewing changes to src/main/CTrayIcon.cpp

  • Committer: Nathan Osman
  • Date: 2012-06-26 23:07:20 UTC
  • Revision ID: admin@quickmediasolutions.com-20120626230720-uzgqoc5w7lnowgx7
Added wizard to run when NitroShare is first started to guide new users in configuring the application.

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
           machines currently available to send to. */
94
94
        if(m_broadcast_server.GetMachineMap().size())
95
95
        {
96
 
            CMachineSelectionDialog dialog(m_broadcast_server.GetMachineMap());
 
96
            CMachineSelectionDialog dialog(m_broadcast_server.GetMachineMap(),
 
97
                                           "Please select a machine to send these files to:");
97
98
            if(!dialog.exec())
98
99
                return;
99
100
            else
138
139
    }
139
140
}
140
141
 
 
142
void CTrayIcon::UpdateShareBoxes()
 
143
{
 
144
    /* Loop through each of the share boxes, storing their information. */
 
145
    QVariantList boxes;
 
146
 
 
147
    foreach(CShareBox * box, m_shareboxes)
 
148
    {
 
149
        QVariantMap map;
 
150
        map["id"]  = box->GetMachineID();
 
151
        map["pos"] = box->pos();
 
152
 
 
153
        boxes << QVariant(map);
 
154
    }
 
155
 
 
156
    /* Store the list. */
 
157
    Settings::Set("ShareBox/Instances", QVariant(boxes));
 
158
}
 
159
 
141
160
void CTrayIcon::CreateContextMenu()
142
161
{
143
162
    QMenu * menu = new QMenu;
177
196
 
178
197
        connect(box, SIGNAL(FilesDropped(QStringList,QString)),
179
198
                     SLOT(OnSendFiles(QStringList,QString)));
 
199
        connect(box, SIGNAL(Moved()), SLOT(UpdateShareBoxes()));
180
200
 
181
201
        m_shareboxes.append(box);
182
202
    }