Show
Ignore:
Timestamp:
03/16/08 04:09:36 (9 months ago)
Author:
flynd
Message:

Ask protocol plugin which events are supported instead of just checking for ppid=msn.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/qt4-gui/src/core/licqgui.cpp

    r6102 r6103  
    11431143  } 
    11441144 
    1145   // See if the clipboard contains a url or file (but only message events supported for msn) 
    1146   if (Config::Chat::instance()->sendFromClipboard() && ppid != MSN_PPID) 
     1145  // See if the clipboard contains a url or file 
     1146  if (Config::Chat::instance()->sendFromClipboard()) 
    11471147  { 
    11481148    QClipboard* clip = QApplication::clipboard(); 
     
    11571157    } 
    11581158 
    1159     if (c.left(5) == "http:" || c.left(4) == "ftp:" || c.left(6) == "https:") 
     1159    // Check which message types are supported for this protocol 
     1160    unsigned long sendFuncs = 0xFFFFFFFF; 
     1161    if (ppid != LICQ_PPID) 
     1162    { 
     1163      FOR_EACH_PROTO_PLUGIN_START(gLicqDaemon) 
     1164      { 
     1165        if ((*_ppit)->PPID() == ppid) 
     1166        { 
     1167          sendFuncs = (*_ppit)->SendFunctions(); 
     1168          break; 
     1169        } 
     1170      } 
     1171      FOR_EACH_PROTO_PLUGIN_END 
     1172    } 
     1173 
     1174    if (sendFuncs & PP_SEND_URL && (c.left(5) == "http:" || c.left(4) == "ftp:" || c.left(6) == "https:")) 
    11601175    { 
    11611176      UserEventCommon* ec = showEventDialog(UrlEvent, id, ppid); 
     
    11691184      return; 
    11701185    } 
    1171     else if (c.left(5) == "file:" || c.left(1) == "/") 
     1186    else if (sendFuncs & PP_SEND_FILE && (c.left(5) == "file:" || c.left(1) == "/")) 
    11721187    { 
    11731188      UserEventCommon* ec = showEventDialog(FileEvent, id, ppid);