diff options
4 files changed, 48 insertions, 105 deletions
diff --git a/linden/indra/newview/llimpanel.cpp b/linden/indra/newview/llimpanel.cpp index be6df5b..6cf7ffb 100644 --- a/linden/indra/newview/llimpanel.cpp +++ b/linden/indra/newview/llimpanel.cpp | |||
@@ -1082,7 +1082,6 @@ LLFloaterIMPanel::LLFloaterIMPanel( | |||
1082 | LLFloater(session_label, LLRect(), session_label), | 1082 | LLFloater(session_label, LLRect(), session_label), |
1083 | mInputEditor(NULL), | 1083 | mInputEditor(NULL), |
1084 | mHistoryEditor(NULL), | 1084 | mHistoryEditor(NULL), |
1085 | mComboIM(NULL), | ||
1086 | mSessionUUID(session_id), | 1085 | mSessionUUID(session_id), |
1087 | mVoiceChannel(NULL), | 1086 | mVoiceChannel(NULL), |
1088 | mSessionInitialized(FALSE), | 1087 | mSessionInitialized(FALSE), |
@@ -1283,10 +1282,6 @@ BOOL LLFloaterIMPanel::postBuild() | |||
1283 | requires<LLLineEditor>("chat_editor"); | 1282 | requires<LLLineEditor>("chat_editor"); |
1284 | requires<LLTextEditor>("im_history"); | 1283 | requires<LLTextEditor>("im_history"); |
1285 | 1284 | ||
1286 | #if LL_LINUX || LL_DARWIN | ||
1287 | childSetVisible("history_btn", false); | ||
1288 | #endif | ||
1289 | |||
1290 | if (checkRequirements()) | 1285 | if (checkRequirements()) |
1291 | { | 1286 | { |
1292 | mInputEditor = getChild<LLLineEditor>("chat_editor"); | 1287 | mInputEditor = getChild<LLLineEditor>("chat_editor"); |
@@ -1300,18 +1295,8 @@ BOOL LLFloaterIMPanel::postBuild() | |||
1300 | mInputEditor->setReplaceNewlinesWithSpaces( FALSE ); | 1295 | mInputEditor->setReplaceNewlinesWithSpaces( FALSE ); |
1301 | 1296 | ||
1302 | // Profile combobox in floater_instant_message.xml | 1297 | // Profile combobox in floater_instant_message.xml |
1303 | mComboIM = getChild<LLComboBox>("profile_callee_btn"); | 1298 | childSetCommitCallback("profile_callee_btn", onCommitCombo, this); |
1304 | mComboIM->setCommitCallback(onCommitCombo); | 1299 | childSetCommitCallback("group_info_btn", onCommitCombo, this); |
1305 | mComboIM->setCallbackUserData(this); | ||
1306 | |||
1307 | #ifdef LL_WINDOWS | ||
1308 | mComboIM->add(getString("history_entry")); | ||
1309 | #endif | ||
1310 | mComboIM->add(getString("pay_entry")); | ||
1311 | mComboIM->add(getString("teleport_entry")); | ||
1312 | |||
1313 | childSetAction("group_info_btn", onClickGroupInfo, this); | ||
1314 | childSetAction("history_btn", onClickHistory, this); | ||
1315 | 1300 | ||
1316 | childSetAction("start_call_btn", onClickStartCall, this); | 1301 | childSetAction("start_call_btn", onClickStartCall, this); |
1317 | childSetAction("end_call_btn", onClickEndCall, this); | 1302 | childSetAction("end_call_btn", onClickEndCall, this); |
@@ -1804,41 +1789,6 @@ void LLFloaterIMPanel::onTabClick(void* userdata) | |||
1804 | } | 1789 | } |
1805 | 1790 | ||
1806 | // static | 1791 | // static |
1807 | void LLFloaterIMPanel::onClickHistory( void* userdata ) | ||
1808 | { | ||
1809 | LLFloaterIMPanel* self = (LLFloaterIMPanel*) userdata; | ||
1810 | |||
1811 | if (self->mOtherParticipantUUID.notNull()) | ||
1812 | { | ||
1813 | struct stat fileInfo; | ||
1814 | int result; | ||
1815 | |||
1816 | std::string fullname = self->getTitle();; | ||
1817 | //gCacheName->getFullName(self->mOtherParticipantUUID, fullname); | ||
1818 | //if(fullname == "(Loading...)") | ||
1819 | std::string file_path = gDirUtilp->getPerAccountChatLogsDir() + "\\" + fullname + ".txt"; | ||
1820 | |||
1821 | // check if file exists by trying to get its attributes | ||
1822 | result = stat(file_path.c_str(), &fileInfo); | ||
1823 | if(result == 0) | ||
1824 | { | ||
1825 | char command[256]; | ||
1826 | sprintf(command, "\"%s\\%s.txt\"", gDirUtilp->getPerAccountChatLogsDir().c_str(),fullname.c_str()); | ||
1827 | gViewerWindow->getWindow()->ShellEx(command); | ||
1828 | |||
1829 | llinfos << command << llendl; | ||
1830 | } | ||
1831 | else | ||
1832 | { | ||
1833 | LLSD args; | ||
1834 | args["[NAME]"] = fullname; | ||
1835 | LLNotifications::instance().add("IMLogNotFound", args); | ||
1836 | llinfos << file_path << llendl; | ||
1837 | } | ||
1838 | } | ||
1839 | } | ||
1840 | |||
1841 | // static | ||
1842 | void LLFloaterIMPanel::onClickGroupInfo( void* userdata ) | 1792 | void LLFloaterIMPanel::onClickGroupInfo( void* userdata ) |
1843 | { | 1793 | { |
1844 | // Bring up the Profile window | 1794 | // Bring up the Profile window |
@@ -1899,59 +1849,52 @@ void LLFloaterIMPanel::onCommitChat(LLUICtrl* caller, void* userdata) | |||
1899 | void LLFloaterIMPanel::onCommitCombo(LLUICtrl* caller, void* userdata) | 1849 | void LLFloaterIMPanel::onCommitCombo(LLUICtrl* caller, void* userdata) |
1900 | { | 1850 | { |
1901 | LLFloaterIMPanel* self = (LLFloaterIMPanel*) userdata; | 1851 | LLFloaterIMPanel* self = (LLFloaterIMPanel*) userdata; |
1902 | LLCtrlListInterface* options = self->mComboIM ? self->mComboIM->getListInterface() : NULL; | 1852 | if (self->getOtherParticipantID().notNull()) |
1903 | if (options) | ||
1904 | { | 1853 | { |
1905 | S32 index = options->getFirstSelectedIndex(); | 1854 | if (caller->getValue().asString() == "history_entry") |
1906 | if (index < 0) | ||
1907 | { | 1855 | { |
1908 | // Open profile or group window | 1856 | if (self->getOtherParticipantID().notNull()) |
1909 | if (self->mOtherParticipantUUID.notNull()) | ||
1910 | { | 1857 | { |
1911 | LLFloaterAvatarInfo::showFromDirectory(self->getOtherParticipantID()); | 1858 | std::string fullname = self->getTitle(); |
1912 | } | ||
1913 | return; | ||
1914 | } | ||
1915 | |||
1916 | std::string selected = self->mComboIM->getSelectedValue().asString(); | ||
1917 | if (selected == self->getString("history_entry")) | ||
1918 | { | ||
1919 | if (self->mOtherParticipantUUID.notNull()) | ||
1920 | { | ||
1921 | struct stat fileInfo; | ||
1922 | int result; | ||
1923 | |||
1924 | std::string fullname = self->getTitle();; | ||
1925 | //gCacheName->getFullName(self->mOtherParticipantUUID, fullname); | 1859 | //gCacheName->getFullName(self->mOtherParticipantUUID, fullname); |
1926 | //if(fullname == "(Loading...)") | 1860 | //if(fullname == "(Loading...)") |
1927 | std::string file_path = gDirUtilp->getPerAccountChatLogsDir() + "\\" + fullname + ".txt"; | 1861 | std::string file = gDirUtilp->getPerAccountChatLogsDir() + "\\" + fullname + ".txt"; |
1928 | 1862 | ||
1929 | // check if file exists by trying to get its attributes | 1863 | llstat stat_info; |
1930 | result = stat(file_path.c_str(), &fileInfo); | 1864 | if (LLFile::stat(file.c_str(), &stat_info)) |
1931 | if(result == 0) | ||
1932 | { | 1865 | { |
1933 | char command[256]; | 1866 | LLSD args; |
1934 | sprintf(command, "\"%s\\%s.txt\"", gDirUtilp->getPerAccountChatLogsDir().c_str(),fullname.c_str()); | 1867 | args["[NAME]"] = fullname; |
1935 | gViewerWindow->getWindow()->ShellEx(command); | 1868 | LLNotifications::instance().add("IMLogNotFound", args, LLSD()); |
1936 | 1869 | //llinfos << file << " not found" << llendl; | |
1937 | llinfos << command << llendl; | ||
1938 | } | 1870 | } |
1939 | else | 1871 | else |
1940 | { | 1872 | { |
1941 | LLSD args; | 1873 | gViewerWindow->getWindow()->ShellEx(file); |
1942 | args["[NAME]"] = fullname; | 1874 | //llinfos << file << " found" << llendl; |
1943 | LLNotifications::instance().add("IMLogNotFound", args); | ||
1944 | llinfos << file_path << llendl; | ||
1945 | } | 1875 | } |
1946 | } | 1876 | } |
1947 | } | 1877 | } |
1948 | else if (selected == self->getString("pay_entry")) | 1878 | else if (caller->getValue().asString() == "pay_entry") |
1949 | { | 1879 | { |
1950 | handle_pay_by_id(self->mOtherParticipantUUID); | 1880 | handle_pay_by_id(self->getOtherParticipantID()); |
1951 | } | 1881 | } |
1952 | else if (selected == self->getString("teleport_entry")) | 1882 | else if (caller->getValue().asString() == "teleport_entry") |
1953 | { | 1883 | { |
1954 | handle_lure(self->mOtherParticipantUUID); | 1884 | handle_lure(self->getOtherParticipantID()); |
1885 | } | ||
1886 | else | ||
1887 | { | ||
1888 | // group | ||
1889 | if (self->getOtherParticipantID() == self->getSessionID()) | ||
1890 | { | ||
1891 | LLFloaterGroupInfo::showFromUUID(self->getSessionID()); | ||
1892 | } | ||
1893 | // profile | ||
1894 | else | ||
1895 | { | ||
1896 | LLFloaterAvatarInfo::showFromDirectory(self->getOtherParticipantID()); | ||
1897 | } | ||
1955 | } | 1898 | } |
1956 | } | 1899 | } |
1957 | } | 1900 | } |
diff --git a/linden/indra/newview/llimpanel.h b/linden/indra/newview/llimpanel.h index 24f5c9b..5887095 100644 --- a/linden/indra/newview/llimpanel.h +++ b/linden/indra/newview/llimpanel.h | |||
@@ -232,7 +232,6 @@ public: | |||
232 | static void onCommitCombo(LLUICtrl* caller, void* userdata); | 232 | static void onCommitCombo(LLUICtrl* caller, void* userdata); |
233 | static void onTabClick( void* userdata ); | 233 | static void onTabClick( void* userdata ); |
234 | 234 | ||
235 | static void onClickHistory( void* userdata ); | ||
236 | static void onClickGroupInfo( void* userdata ); | 235 | static void onClickGroupInfo( void* userdata ); |
237 | static void onClickClose( void* userdata ); | 236 | static void onClickClose( void* userdata ); |
238 | static void onClickStartCall( void* userdata ); | 237 | static void onClickStartCall( void* userdata ); |
@@ -300,7 +299,6 @@ private: | |||
300 | private: | 299 | private: |
301 | LLLineEditor* mInputEditor; | 300 | LLLineEditor* mInputEditor; |
302 | LLViewerTextEditor* mHistoryEditor; | 301 | LLViewerTextEditor* mHistoryEditor; |
303 | LLComboBox* mComboIM; | ||
304 | 302 | ||
305 | // The value of the mSessionUUID depends on how the IM session was started: | 303 | // The value of the mSessionUUID depends on how the IM session was started: |
306 | // one-on-one ==> random id | 304 | // one-on-one ==> random id |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_instant_message.xml b/linden/indra/newview/skins/default/xui/en-us/floater_instant_message.xml index 98d2020..cf2a457 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_instant_message.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_instant_message.xml | |||
@@ -37,17 +37,17 @@ | |||
37 | <string name="unavailable_text_label"> | 37 | <string name="unavailable_text_label"> |
38 | Text chat is not available for this call. | 38 | Text chat is not available for this call. |
39 | </string> | 39 | </string> |
40 | <string name="history_entry"> | ||
41 | History | ||
42 | </string> | ||
43 | <string name="pay_entry"> | ||
44 | Pay | ||
45 | </string> | ||
46 | <string name="teleport_entry"> | ||
47 | Offer Teleport | ||
48 | </string> | ||
49 | <flyout_button bottom="-40" follows="left|top" height="20" label="Profile" left="5" width="90" | 40 | <flyout_button bottom="-40" follows="left|top" height="20" label="Profile" left="5" width="90" |
50 | list_position="below" mouse_opaque="true" name="profile_callee_btn"> | 41 | list_position="below" mouse_opaque="true" name="profile_callee_btn"> |
42 | <flyout_button_item value="history_entry" name="history_entry"> | ||
43 | View History | ||
44 | </flyout_button_item> | ||
45 | <flyout_button_item value="pay_entry" name="pay_entry"> | ||
46 | Pay | ||
47 | </flyout_button_item> | ||
48 | <flyout_button_item value="teleport_entry" name="teleport_entry"> | ||
49 | Offer Teleport | ||
50 | </flyout_button_item> | ||
51 | </flyout_button> | 51 | </flyout_button> |
52 | <button bottom="-40" follows="left|top" halign="center" height="20" | 52 | <button bottom="-40" follows="left|top" halign="center" height="20" |
53 | image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left" | 53 | image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left" |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_instant_message_group.xml b/linden/indra/newview/skins/default/xui/en-us/floater_instant_message_group.xml index 1266975..4c9ba2a 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_instant_message_group.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_instant_message_group.xml | |||
@@ -44,18 +44,20 @@ | |||
44 | orientation="horizontal" tab_group="1" width="495" name="panels"> | 44 | orientation="horizontal" tab_group="1" width="495" name="panels"> |
45 | <layout_panel border="false" bottom="0" default_tab_group="1" follows="left|top|bottom|right" | 45 | <layout_panel border="false" bottom="0" default_tab_group="1" follows="left|top|bottom|right" |
46 | height="130" left="0" min_width="210" name="im_contents_panel" width="175"> | 46 | height="130" left="0" min_width="210" name="im_contents_panel" width="175"> |
47 | <button bottom="-20" follows="left|top" height="20" label="Group Info" left="5" | 47 | <flyout_button bottom="-20" follows="left|top" height="20" label="Group Info" left="5" |
48 | name="group_info_btn" tab_group="0" width="90" /> | 48 | list_position="below" name="group_info_btn" tab_group="0" width="110"> |
49 | <flyout_button_item value="history_entry" name="history_entry"> | ||
50 | View History | ||
51 | </flyout_button_item> | ||
52 | </flyout_button> | ||
49 | <button bottom_delta="0" enabled="false" follows="left|top" halign="right" height="20" | 53 | <button bottom_delta="0" enabled="false" follows="left|top" halign="right" height="20" |
50 | image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left" | 54 | image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left" |
51 | label="Join Call" left_delta="95" name="start_call_btn" pad_right="12" | 55 | label="Join Call" left_delta="115" name="start_call_btn" pad_right="12" |
52 | width="92" /> | 56 | width="92" /> |
53 | <button bottom_delta="0" follows="left|top" halign="right" height="20" | 57 | <button bottom_delta="0" follows="left|top" halign="right" height="20" |
54 | image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left" | 58 | image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left" |
55 | label="End Call" left_delta="0" name="end_call_btn" pad_right="12" | 59 | label="End Call" left_delta="0" name="end_call_btn" pad_right="12" |
56 | visible="false" width="92" /> | 60 | visible="false" width="92" /> |
57 | <button bottom="-20" follows="left|top" halign="center" height="20" label="History" left_delta="97" | ||
58 | name="history_btn" visible="true" width="85" /> | ||
59 | <button bottom_delta="0" follows="right|top" height="20" label="< <" | 61 | <button bottom_delta="0" follows="right|top" height="20" label="< <" |
60 | label_selected="> >" left="143" name="toggle_active_speakers_btn" | 62 | label_selected="> >" left="143" name="toggle_active_speakers_btn" |
61 | right="176" | 63 | right="176" |