Adding buttons to the menu bar

An instant messenger which can connect to AIM, GTalk, Jabber, ICQ, and more.
adambrown
Latté
Posts: 59
Joined: Mon Apr 18, 2005 8:24 pm

Adding buttons to the menu bar

Postby adambrown » Thu Sep 08, 2005 8:47 pm

I would like to add items to the tool bar. Spifically itunes controls for play/pause. Is this possible? Have attached pic of were i would like them:

Image

Bosk
Frappa
Posts: 101
Joined: Tue Dec 14, 2004 10:20 pm

Postby Bosk » Thu Sep 08, 2005 9:13 pm

there are plenty of ways to control itunes. the adium message window is not one of them.

i seriously doubt this would be implemented.

adambrown
Latté
Posts: 59
Joined: Mon Apr 18, 2005 8:24 pm

Postby adambrown » Thu Sep 08, 2005 9:15 pm

im not asking if it will be done im asking if it can be done

User avatar
Adam Iser
Crema
Posts: 427
Joined: Thu Dec 02, 2004 1:36 am

Postby Adam Iser » Thu Sep 08, 2005 10:10 pm

Via a plugin, yes. See ESSafariLinkToolbarItemPlugin in source for something similar.

User avatar
kirk
Mocha
Posts: 565
Joined: Fri Feb 04, 2005 7:56 pm
Location: Massachusetts
Contact:

Postby kirk » Thu Sep 08, 2005 11:28 pm

Hm, you could mock it up and attach an applescript to a button.
the sky is going to crush you.

adambrown
Latté
Posts: 59
Joined: Mon Apr 18, 2005 8:24 pm

Postby adambrown » Sat Sep 10, 2005 9:52 pm

I wouldnt know the first thing about doing that :? I looked in the Nib files of the progy but found nothing that made any sense :?

User avatar
Catfish_Man
Cocoaforge Admin
Posts: 1203
Joined: Thu Dec 02, 2004 6:30 am
Location: Portland, Oregon
Contact:

Postby Catfish_Man » Sat Sep 10, 2005 10:21 pm

adambrown wrote:I wouldnt know the first thing about doing that :? I looked in the Nib files of the progy but found nothing that made any sense :?


Adding toolbar items can't be done in interface builder; this sort of thing would require writing Objective-C code.

User avatar
MBHockey
Crema
Posts: 260
Joined: Fri Dec 03, 2004 9:21 pm
Contact:

Postby MBHockey » Sat Sep 10, 2005 10:39 pm

Perhaps this might be a good place to ask about this -- how would i go about removing the 'roll down' widget located in the top right of the contact list and message window...anyone know where that is in the source?

User avatar
Tipo 61
Grandé
Posts: 910
Joined: Fri Dec 10, 2004 11:12 pm
Location: Boston, MA
Contact:

Postby Tipo 61 » Sat Sep 10, 2005 11:00 pm

MBHockey wrote:Perhaps this might be a good place to ask about this -- how would i go about removing the 'roll down' widget located in the top right of the contact list and message window...anyone know where that is in the source?


I'm thinking it could be a checkbox in the Inspector window of the .nib files in Interface builder... but my Xcode and Interface builder skills are pretty limited. Hope this helps :)

User avatar
MBHockey
Crema
Posts: 260
Joined: Fri Dec 03, 2004 9:21 pm
Contact:

Postby MBHockey » Sat Sep 10, 2005 11:14 pm

This isn't something done in interface builder (I don't think)

User avatar
Tipo 61
Grandé
Posts: 910
Joined: Fri Dec 10, 2004 11:12 pm
Location: Boston, MA
Contact:

Postby Tipo 61 » Sun Sep 11, 2005 2:24 am

Ha, okay, like I said, my experience is limited :)

User avatar
zaudragon
Growl Team
Posts: 1852
Joined: Sat Dec 04, 2004 5:05 am
Location: Kensington, CA, USA
Contact:

Postby zaudragon » Sun Sep 11, 2005 10:42 pm

MBHockey wrote:Perhaps this might be a good place to ask about this -- how would i go about removing the 'roll down' widget located in the top right of the contact list and message window...anyone know where that is in the source?


It would be somewhere with the NSToolbar code; it’s somewhere, I know…
Blog | X(tras)
Communists code without classes.

User avatar
evands
Cocoaforge Admin
Posts: 3152
Joined: Thu Dec 02, 2004 10:55 pm
Location: Decatur, GA
Contact:

Postby evands » Mon Sep 12, 2005 1:55 am

Try

Code: Select all

   [[[self window] standardWindowButton:NSWindowToolbarButton] setFrame:NSZeroRect];

from within the window controller's windowDidLoad
The duck still burns.
--
My company: Saltatory Software. Check it out :)

User avatar
MBHockey
Crema
Posts: 260
Joined: Fri Dec 03, 2004 9:21 pm
Contact:

Postby MBHockey » Mon Sep 12, 2005 2:56 am

That didn't seem to work -- unless i put it in the wrong file.

I put the code you posted in AIMessageWindowController.m

Here's what that function looks like:



Code: Select all

//Setup our window before it is displayed
- (void)windowDidLoad
{
   [super windowDidLoad];
   
   NSWindow   *theWindow = [self window];
   
   //Metal adium - don't display the 'roll-down' widget
   [[[self window] standardWindowButton:NSWindowToolbarButton] setFrame:NSZeroRect];
   
    //Remember the initial tab height
    tabBarHeight = [tabView_customTabs frame].size.height;

    //Exclude this window from the window menu (since we add it manually)
    [theWindow setExcludedFromWindowsMenu:YES];
   [theWindow useOptimizedDrawing:YES];

   [self _configureToolbar];

    //Remove any tabs from our tab view, it needs to start out empty
    while([tabView_messages numberOfTabViewItems] > 0){
        [tabView_messages removeTabViewItem:[tabView_messages tabViewItemAtIndex:0]];
    }
}


Thanks for the help though!

User avatar
evands
Cocoaforge Admin
Posts: 3152
Joined: Thu Dec 02, 2004 10:55 pm
Location: Decatur, GA
Contact:

Postby evands » Mon Sep 12, 2005 12:13 pm

Yeah, that's the right place -- I know that technique can hide the minimize/zoom/close buttons, but it's possible the toolbar widget is different. Try commenting out that [self _configureToolbar].
The duck still burns.

--

My company: Saltatory Software. Check it out :)

User avatar
MBHockey
Crema
Posts: 260
Joined: Fri Dec 03, 2004 9:21 pm
Contact:

Postby MBHockey » Mon Sep 12, 2005 12:39 pm

Thanks Evan, it worked.

If i want to do this for the contact list also (standard window), which file needs to be edited?...i opened a couple that i thought would be it, but they don't have the windowDidLoad function in there.

User avatar
MBHockey
Crema
Posts: 260
Joined: Fri Dec 03, 2004 9:21 pm
Contact:

Postby MBHockey » Mon Sep 12, 2005 9:23 pm

Ah, got it...turned out to be AIStandardListWindowController.m

adambrown
Latté
Posts: 59
Joined: Mon Apr 18, 2005 8:24 pm

Postby adambrown » Mon Sep 12, 2005 9:26 pm

So Mhocky what is the goal of Metal Adium? to make Adium act and look as much like ichat?


Return to “Adium”

Who is online

Users browsing this forum: No registered users