Re: "Connect to Server" dialog & new panel menu layout



On Wed, 2005-01-12 at 19:20 +0100, Vincent Untz wrote:
> Le mercredi 12 janvier 2005 à 16:24 +0100, Alexander Larsson a écrit :
> > On Wed, 2005-01-12 at 15:17 +0100, Vincent Untz wrote:
> > > Hi guys,
> > > 
> > > Since the 2.9.4 release, the panel has a brand new layout for the
> > > menu bar. See http://bugzilla.gnome.org/show_bug.cgi?id=161613 for
> > > more informations.
> > > 
> > > I'd like to add a "Connect to Server" button to the menu. This
> > > would open the very same dialog than the one in nautilus. As Mark
> > > commented in the above bug, it's not that great to copy & paste
> > > the code from nautilus.
> > > 
> > > Thus, I'm left with three possibilities to make this happen:
> > > 
> > >   1) Move the code from nautilus to the panel
> > >   2) Add a "--connect-server" argument to nautilus
> > >   3) Wait for a libgnomevfsui library
> > > 
> > > I'm not sure 1) is a great idea since the dialog has its place in
> > > nautilus too. 3) won't happen for 2.10, so I'm left with option 2).
> > > 
> > > Does adding a "--connect-server" argument to nautilus sound
> > > reasonable?
> > 
> > I think:
> > 4) Create a separate executable that ships with nautilus that just links
> > in nautilus-connect-server.c and whatever else is needed. Then launch
> > that. 
> > 
> > is better.
> 
> Here we go. Patch is attached.
> 
> Some comments:
>    * I did not call nautilus_module_init(). Is it needed?
No.

>    * I couldn't think of a better way than all the #ifdefs...

Does those work at all? I would assume that
nautilus-connect-server-dialog.o only get built once. Can't you pass it
a NULL for the NautilusWindow, and then create your own
nautilus_application_present_spatial_window() in
nautilus-connect-server-dialog-main.c that uses
gnome_url_show_on_screen().

>    * I'm calling gtk_widget_hide (dialog) and not destroying it because
>      destroying it means quitting the program

I'm not sure what you mean here.

>    * I'm using eel_run_simple_dialog() because eel_show_error_dialog()
>      is not blocking

Just make it blocking by running a mainloop after showing it.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a globe-trotting shark-wrestling librarian on the hunt for the last 
specimen of a great and near-mythical creature. She's an enchanted 
cigar-chomping traffic cop looking for love in all the wrong places. They 
fight crime! 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]