Re: [evolution-patches] Much improved search bar patch




I think there's no need to have the create_widgets() call separate, just have a get_search_bar() function which can create the widgets if it needs to.


-
-       if (p->search_dialog) {
-               gdk_window_raise(((GtkWidget *)p->search_dialog)->window);
-               return;
-       }

-       xml = glade_xml_new (EVOLUTION_GLADEDIR "/mail-dialogs.glade", "search_message_dialog", NULL);
-       if (xml == NULL) {
-               g_warning("Cannot open search dialog glade file");
-               /* ?? */
-               return;
+       if (p->search_dialog)
+       {
+               gtk_widget_show (GTK_WIDGET (p->search_dialog));
+               gtk_widget_grab_focus ( GTK_WIDGET(p->search_entry));
        }


Definiely don't use this style.  Use k&r style, i.e. as the code above which is removed.

Also, use C style casts, not the gtk ones - they're more readable and efficient.


Otherwise its looking good to me codewise.


On Wed, 2005-05-11 at 05:02 -0600, Srinivasa Ragavan wrote:
Hi,
 
I have attached the fix. Please review it.
I have to add stuff, like
 
+ "ESC" to cancel search
+ Kill 'X" button and close on lose of focus
 
Thanks
Srini.


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