]> spindle.queued.net Git - midori/commitdiff
Update default search engine if the according search engine is modified
authorDaniel Michalik <dev@blackamp.de>
Mon, 7 Dec 2009 19:13:31 +0000 (20:13 +0100)
committerChristian Dywan <christian@twotoasts.de>
Mon, 7 Dec 2009 19:38:02 +0000 (20:38 +0100)
midori/midori-searchaction.c

index e324b198c881769f7a734be40c800d7676381a7a..b469ce54ba2cbfc68ee1a1da76ce4f2346a052b8 100644 (file)
@@ -1031,6 +1031,10 @@ midori_search_action_get_editor (MidoriSearchAction* search_action,
 
         if (new_engine)
             katze_array_add_item (search_action->search_engines, item);
+        /* If it isn't a new search engine but the old default one,
+           we need to update the default search engine after editing it. */
+        else if (item == midori_search_action_get_default_item (search_action))
+            midori_search_action_set_default_item (search_action, item);
     }
     gtk_widget_destroy (dialog);
 }