diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2012-07-17 00:32:37 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2012-07-17 16:40:31 +0200 |
commit | 1abd8c22a56bd51a2da2be4da1ef79be04e5b985 (patch) | |
tree | 11ec68581ad50bb1dc3ef65de07111b9b0ea55ac /sc | |
parent | a64fa6c7235559667afef1bb185203fd0d262e44 (diff) |
tubes: improve contacts dialog
- do not show until it's ready
- do not close it with buttons
- buttons for both 1-1 and MUC sessions
- display all online contacts
Change-Id: Idfbea7ffdf76ef3f31dbeeefe62d69cb5e3e64b7
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/collab/contacts.cxx | 23 | ||||
-rw-r--r-- | sc/source/ui/collab/contacts.hrc | 1 | ||||
-rw-r--r-- | sc/source/ui/collab/contacts.src | 10 |
3 files changed, 20 insertions, 14 deletions
diff --git a/sc/source/ui/collab/contacts.cxx b/sc/source/ui/collab/contacts.cxx index 51bd1e40ff3a..4536e2e49bdc 100644 --- a/sc/source/ui/collab/contacts.cxx +++ b/sc/source/ui/collab/contacts.cxx @@ -47,6 +47,7 @@ class TubeContacts : public ModelessDialog { FixedLine maLabel; PushButton maBtnConnect; + PushButton maBtnGroup; PushButton maBtnInvite; PushButton maBtnListen; SvxSimpleTableContainer maListContainer; @@ -55,6 +56,7 @@ class TubeContacts : public ModelessDialog ScDocFuncSend* mpSender; DECL_LINK( BtnConnectHdl, void * ); + DECL_LINK( BtnGroupHdl, void * ); DECL_LINK( BtnInviteHdl, void * ); DECL_LINK( BtnListenHdl, void * ); @@ -152,12 +154,14 @@ public: ModelessDialog( NULL, ScResId( RID_SCDLG_CONTACTS ) ), maLabel( this, ScResId( FL_LABEL ) ), maBtnConnect( this, ScResId( BTN_CONNECT ) ), + maBtnGroup( this, ScResId( BTN_GROUP ) ), maBtnInvite( this, ScResId( BTN_INVITE ) ), maBtnListen( this, ScResId( BTN_LISTEN ) ), maListContainer( this, ScResId( CTL_LIST ) ), maList( maListContainer ), mpManager( TeleManager::get() ) { + Hide(); ScDocShell *pScDocShell = dynamic_cast<ScDocShell*> (SfxObjectShell::Current()); ScDocFunc *pDocFunc = pScDocShell ? &pScDocShell->GetDocFunc() : NULL; mpSender = dynamic_cast<ScDocFuncSend*> (pDocFunc); @@ -185,6 +189,7 @@ public: } } maBtnConnect.SetClickHdl( LINK( this, TubeContacts, BtnConnectHdl ) ); + maBtnGroup.SetClickHdl( LINK( this, TubeContacts, BtnGroupHdl ) ); maBtnInvite.SetClickHdl( LINK( this, TubeContacts, BtnInviteHdl ) ); maBtnListen.SetClickHdl( LINK( this, TubeContacts, BtnListenHdl ) ); @@ -200,7 +205,6 @@ public: sHeader += String( ScResId( STR_HEADER_NAME ) ); sHeader += '\t'; maList.InsertHeaderEntry( sHeader, HEADERBAR_APPEND, HIB_LEFT ); - Show(); } virtual ~TubeContacts() { @@ -221,7 +225,6 @@ public: ContactList *pContacts = mpManager->getContactList(); if ( pContacts ) { - fprintf( stderr, "contacts !\n" ); AccountContactPairV aPairs = pContacts->getContacts(); AccountContactPairV::iterator it; for( it = aPairs.begin(); it != aPairs.end(); it++ ) @@ -240,10 +243,6 @@ public: aImage = Image( aBitmap ); } } - fprintf( stderr, "'%s' => '%s' '%s'\n", - tp_account_get_display_name( it->first ), - tp_contact_get_alias( it->second ), - tp_contact_get_identifier( it->second ) ); rtl::OUStringBuffer aEntry( 128 ); aEntry.append( sal_Unicode( '\t' ) ); aEntry.append( fromUTF8 ( tp_contact_get_alias( it->second ) ) ); @@ -256,31 +255,31 @@ public: pEntry->SetUserData( &maACs.back() ); } } + Show(); } }; IMPL_LINK_NOARG( TubeContacts, BtnConnectHdl ) { -#if 0 StartBuddySession(); -#else + return 0; +} + +IMPL_LINK_NOARG( TubeContacts, BtnGroupHdl ) +{ StartGroupSession(); -#endif - Close(); return 0; } IMPL_LINK_NOARG( TubeContacts, BtnInviteHdl ) { Invite(); - Close(); return 0; } IMPL_LINK_NOARG( TubeContacts, BtnListenHdl ) { Listen(); - Close(); return 0; } diff --git a/sc/source/ui/collab/contacts.hrc b/sc/source/ui/collab/contacts.hrc index 59aeb678243a..4d7cc5f1a7b2 100644 --- a/sc/source/ui/collab/contacts.hrc +++ b/sc/source/ui/collab/contacts.hrc @@ -5,6 +5,7 @@ #define BTN_CONNECT 3 #define BTN_INVITE 4 #define BTN_LISTEN 5 +#define BTN_GROUP 6 #define STR_HEADER_ALIAS 20 #define STR_HEADER_NAME 21 diff --git a/sc/source/ui/collab/contacts.src b/sc/source/ui/collab/contacts.src index 27d1dcafc7cd..6a868ae87aaf 100644 --- a/sc/source/ui/collab/contacts.src +++ b/sc/source/ui/collab/contacts.src @@ -9,7 +9,7 @@ ModelessDialog RID_SCDLG_CONTACTS Hide = FALSE ; Moveable = TRUE ; Closeable = TRUE ; - Size = MAP_APPFONT ( 220 , 215 ) ; + Size = MAP_APPFONT ( 220 , 225 ) ; OutputSize = TRUE ; Text [ en-US ] = "Contacts" ; @@ -23,7 +23,13 @@ ModelessDialog RID_SCDLG_CONTACTS { Pos = MAP_APPFONT( 70 , 200 ); Size = MAP_APPFONT( 50 , 10 ); - Text [ en-US ] = "Collaborate"; + Text [ en-US ] = "startBuddySession"; + }; + PushButton BTN_GROUP + { + Pos = MAP_APPFONT( 70 , 212 ); + Size = MAP_APPFONT( 50 , 10 ); + Text [ en-US ] = "startGroupSession"; }; PushButton BTN_INVITE { |