Re: [evolution-patches] UI patch - for GW system address book/GAL



looks good

Siva
On Fri, 2004-11-26 at 12:05 +0530, Sushma Rai wrote:
> I have attached the new patch.,

> 
> In case of backend not specifying do-initial-query and
> being editable I am using a different message.
> 
> Thanks,
> Sushma.
> 
> Sivaiah Nallagatla wrote:
> > Few comments below 
> > To get a reference to book we can just do 
> > g_object_get (view->adapter, "book", &book, NULL);
> > in set_empty_message. we need not add a new function for this.
> > 
> > Also a backend may not specify do-initial-query but still can be
> > editable, for example ldap backend, so the message setting logic should
> > be as follows .
> > 
> > if(no initial query) 
> >   {
> >     if (editable) 
> >           show "search for conacts, double clikc to create one"
> >     else 
> >          show "search for contacts"
> > }
> >  else {
> >        if (editable)
> >        show "there are no items in this view, doble click to create one"
> >        else 
> >            show "there are no items in this view"
> >   }
> > 
> > Siva
> > 
> > 
> > 
> > On Thu, 2004-11-25 at 13:38 +0530, Sushma Rai wrote:
> > 
> >>Hi,
> >>
> >>There were couple of mails on the lists, about 
> >>Global address list, in Exchange connector 
> >>not being intuitive, that one need to search
> >>for contacts and they are not fetched by default.
> >> 
> >>This patch sets a different message, in such cases.
> >>
> >>Thanks,
> >>Sushma.
> 
> Plain text document attachment (empty-msg.diff)
> Index: gui/widgets/e-minicard-view.c
> ===================================================================
> RCS file: /cvs/gnome/evolution/addressbook/gui/widgets/e-minicard-view.c,v
> retrieving revision 1.66
> diff -u -r1.66 e-minicard-view.c
> --- gui/widgets/e-minicard-view.c	2 Nov 2004 08:36:05 -0000	1.66
> +++ gui/widgets/e-minicard-view.c	26 Nov 2004 06:36:08 -0000
> @@ -153,19 +153,33 @@
>  set_empty_message (EMinicardView *view)
>  {
>  	char *empty_message;
> -	gboolean editable = FALSE;
> +	gboolean editable = FALSE, perform_initial_query = FALSE;
> +	EBook *book;
>  
>  	if (view->adapter) {
>  		g_object_get (view->adapter,
>  			      "editable", &editable,
>  			      NULL);
> +
> +		g_object_get (view->adapter, "book", &book, NULL);
> +		if (!e_book_check_static_capability (book, "do-initial-query"))
> +			perform_initial_query = TRUE;
>  	}
>  
> -	if (editable)
> -		empty_message = _("\n\nThere are no items to show in this view.\n\n"
> -				  "Double-click here to create a new Contact.");
> -	else
> -		empty_message = _("\n\nThere are no items to show in this view.");
> +	if (editable) {
> +		if (perform_initial_query)
> +			empty_message = _("\n\nSearch for the Contact\n\n"
> +					  "or double-click here to create a new Contact.");
> +		else
> +			empty_message = _("\n\nThere are no items to show in this view.\n\n"
> +					  "Double-click here to create a new Contact.");
> +	}
> +	else {
> +		if (perform_initial_query)
> +			empty_message = _("\n\nSearch for the Contact.");
> +		else
> +			empty_message = _("\n\nThere are no items to show in this view.");
> +	}
>  
>  	g_object_set (view,
>  		      "empty_message", empty_message,



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