Re: [evolution-patches] Fix for Bug #257118 [e-search-bar]



On Wed, 2005-12-14 at 13:59 +0530, Johnny Jacob wrote:
> Hi,
> Worked on the Bug 257118: "Clear button is not getting disabled after
> clearing the search"
> 
> http://bugzilla.gnome.org/show_bug.cgi?id=257118
> 
> Attached the patch for review.
> 
> Thanks
> Johnny
> 
> Index: widgets/misc/ChangeLog
> ===================================================================
> RCS file: /cvs/gnome/evolution/widgets/misc/ChangeLog,v
> retrieving revision 1.383
> diff -u -p -r1.383 ChangeLog
> --- widgets/misc/ChangeLog      24 Nov 2005 14:23:23 -0000      1.383
> +++ widgets/misc/ChangeLog      26 Nov 2005 11:36:41 -0000
> @@ -1,3 +1,9 @@
> +2005-11-26  Johnny Jacob  <johnnyjacob gmail com>
> +
> +       ** See Bug #257118
> +       * e-search-bar.c: (emit_search_activated) :  when search is
> +       initiated enable the clear_button otherwise disable it.
> +
>  2005-11-24  Tor Lillqvist  <tml novell com>
> 
>         * e-dateedit.c
> Index: widgets/misc/e-search-bar.c
> ===================================================================
> RCS file: /cvs/gnome/evolution/widgets/misc/e-search-bar.c,v
> retrieving revision 1.88
> diff -u -p -r1.88 e-search-bar.c
> --- widgets/misc/e-search-bar.c 20 Sep 2005 09:34:12 -0000      1.88
> +++ widgets/misc/e-search-bar.c 26 Nov 2005 11:37:56 -0000
> @@ -180,6 +180,11 @@ emit_search_activated (ESearchBar *esb)
> 
>         g_signal_emit (esb, esb_signals [SEARCH_ACTIVATED], 0);
> 
> +       if( g_str_equal(gtk_entry_get_text(GTK_ENTRY (esb->entry)),"") )
> +               gtk_widget_set_sensitive (esb->clear_button,FALSE);
> +       else
> +               gtk_widget_set_sensitive (esb->clear_button,TRUE);

you should follow the coding style of the evolution code, which in this
case would be:

if (g_str_equal (gtk_entry_get_text (GTK_ENTRY (esb->entry)), ""))

the main thing here is to put a space after the "if" and no space after
the "(" and no space before the ")"

> +
>         set_find_now_sensitive (esb, FALSE);
>  }
> 
> @@ -945,6 +950,8 @@ e_search_bar_construct (ESearchBar *sear
>                                                   G_CALLBACK
> (clear_button_clicked_cb));
>         search_bar->activate_button = add_button (search_bar, _("Find _Now"),
>                                                   G_CALLBACK
> (activate_button_clicked_cb));
> +
> +       gtk_widget_set_sensitive (search_bar->clear_button,FALSE);
> 
>         e_search_bar_set_menu (search_bar, menu_items);
> _______________________________________________
> Evolution-patches mailing list
> Evolution-patches gnome org
> http://mail.gnome.org/mailman/listinfo/evolution-patches
-- 
Jeffrey Stedfast
Evolution Hacker - Novell, Inc.
fejj ximian com  - www.novell.com




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