{"thread":{"id":"13008","subject":"[EGIT PATCH 2/3] Change the find toolbar find-in prefs into radio rotating options.","startedAt":"2008-04-06T21:42:04Z","lastAt":"2008-04-06T21:42:04Z","messageCount":1,"participants":["Roger C. Soares"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"73774","messageId":"1207518124-4194-1-git-send-email-rogersoares@intelinet.com.br","threadId":"13008","inReplyTo":null,"subject":"[EGIT PATCH 2/3] Change the find toolbar find-in prefs into radio rotating options.","fromName":"Roger C. Soares","fromEmail":"rogersoares@intelinet.com.br","sentAt":"2008-04-06T21:42:04Z","receivedAt":"2008-04-06T21:42:04Z","isPatch":true,"sender":{"key":"rogersoares@intelinet.com.br","avatar":null},"body":"The find toolbar now searches only in one field at a time and the user\ncan change the find-in field by clicking on the button. The button shows\nan icon so the user knows at all times what field is selected.\n\nWe don't have the option to find in 2 or more fields at the same time\nanymore, but from day to day usage I noticed that I usually only want to\nsearch in one field at a time. It feels a lot better to me and makes it\nmore like gitk.\n\nSigned-off-by: Roger C. Soares <rogersoares@intelinet.com.br>\n---\n org.spearce.egit.ui/icons/elcl16/author.gif        |  Bin 0 -> 594 bytes\n org.spearce.egit.ui/icons/elcl16/comment.gif       |  Bin 0 -> 341 bytes\n org.spearce.egit.ui/icons/elcl16/commit.gif        |  Bin 0 -> 173 bytes\n org.spearce.egit.ui/icons/elcl16/committer.gif     |  Bin 0 -> 589 bytes\n .../egit/ui/PluginPreferenceInitializer.java       |    5 +-\n .../src/org/spearce/egit/ui/UIIcons.java           |   12 ++\n .../src/org/spearce/egit/ui/UIPreferences.java     |    2 +\n .../src/org/spearce/egit/ui/UIText.java            |    8 +\n .../egit/ui/internal/history/FindToolbar.java      |  140 +++++++++++++++-----\n .../src/org/spearce/egit/ui/uitext.properties      |    4 +\n 10 files changed, 135 insertions(+), 36 deletions(-)\n create mode 100644 org.spearce.egit.ui/icons/elcl16/author.gif\n create mode 100644 org.spearce.egit.ui/icons/elcl16/comment.gif\n create mode 100644 org.spearce.egit.ui/icons/elcl16/commit.gif\n create mode 100644 org.spearce.egit.ui/icons/elcl16/committer.gif\n\ndiff --git a/org.spearce.egit.ui/icons/elcl16/author.gif b/org.spearce.egit.ui/icons/elcl16/author.gif\nnew file mode 100644\nindex 0000000000000000000000000000000000000000..c4ae8cda9a848e562cd1574b6b797495e6d22836\nGIT binary patch\nliteral 594\nzcmZ?wbhEHb6krfwI2OU6V3??EmL+GAFK<<(;!vt-U!mn#uj|sH;ofH8*{SE<Wa!&$\nz=-+7>Hqku1-!fu?b;LZUq}k5Nv)$6>`D8Ek$yrua>|b3RP+j6*T@p}N>K9SIuDRT|\nzy~?Mj)@x$DM@rMS=}m5PTU{4*I4|#VTGQiDGjZ#Ne!DFbY};n->z;R{Xa1r7#m6Tv\nzJ2rFm=~-(|&suwa*4hiR*Pfrf_QKpv*A{I)e`Qm~l}(vfH)XEaae2+2tGD*nY&`OK\nz)6vHdPV}F+`r^*>?{}YnzxM)&e%ycY{r<}z4`2Ow^5*BWcR!!M`}yj_&$pj`z5Dd*\nz!`I)RzW)9UB)|Rs{O$MGAHTo-`2GFo?;jxa=jX3K{|5*t{$yd~VyI`(VE_V9oG`Gj\nzZ>Vo-ZfR}O=;-WdYY*@1H`l1w<4|i>4+#sM8D?#vA!^UmtQw@RtF0MqXKkj&G_6U+\nzFEAj`KX9iGA2*v$ld`XsrRnmOLMFyq>`hAE-ah9q3ECJc2s9~r9X`53Q`pu}?MA)4\nzhv$oz9?a5OA`DG(?stx9y0aKDHp{yG{r8V6K}6!nLXYhsE-gHX3z8Nn@H#ZGOw=fR\nd)GW`*7JH)MAk*<a3B864hsKE~9UB=KtN}d*Uh4n=\n\nliteral 0\nHcmV?d00001\n\ndiff --git a/org.spearce.egit.ui/icons/elcl16/comment.gif b/org.spearce.egit.ui/icons/elcl16/comment.gif\nnew file mode 100644\nindex 0000000000000000000000000000000000000000..0f6e19e604a7fa73e6b2fc3fcffe65a7ec309d03\nGIT binary patch\nliteral 341\nzcmZ?wbhEHb6krfwSZc@s1iXCwe0==!ib{$~%Jxn!{sDnLfx*EMQQ^_CF$qZt$*FNE\nzY02rCNf}w01;xc>W!=+OPn*AZ&VmK=maks0eAR-LYZt9tvvU2WRU5Z#*?;)pkz*I{\nzKECnb@%^`-p1k{X_4EJdUw*v!`t$9VZ?As*d;RnOo1cH*{QCdy_y3Q-|9|@Z@5}GM\nzpa1;-_V@qKzyE*z|NrMdX+ZHO3nLeUJ%bL&Cm=sDuoWGcU*Mr5)qk|3=wu3)@`4p5\nzQoS~gOD8=ER4Qb;JLxOC?OZ-7{wARf27bvJS|$byU055KTf3TrB)K%@IYpVoc{S^F\nzxFvLSv}Bnk=+tSmDC^FeJ*!TdO>g0%MRfwg`YTqhtTR}<ZoNUF?`AKLZQI=(8LR<U\nCd%3;<\n\nliteral 0\nHcmV?d00001\n\ndiff --git a/org.spearce.egit.ui/icons/elcl16/commit.gif b/org.spearce.egit.ui/icons/elcl16/commit.gif\nnew file mode 100644\nindex 0000000000000000000000000000000000000000..e0625b45deef1ee3687c0dd7e521b9b9bcc11435\nGIT binary patch\nliteral 173\nzcmZ?wbhEHb6krfwc+ATH2LD&CTzU2L|JOhNzxnn5-S7V&fB*md=l{3A|9}4d|Lgz%\nzKmQRx@h1x-7Xv?o4oD-&3<j2{4<|iW%UEzv{H&_5qxE6voab$erazQ&;Mw!8^p3*<\nz_5-!sH{8t&tL7<iihZB%qEO`7AYACFvcRdqv@oz@qs{v7n>6%O7>a)$%Ghq6XCApX\nQaD8tfn@#@9U?m1?00Qk-fdBvi\n\nliteral 0\nHcmV?d00001\n\ndiff --git a/org.spearce.egit.ui/icons/elcl16/committer.gif b/org.spearce.egit.ui/icons/elcl16/committer.gif\nnew file mode 100644\nindex 0000000000000000000000000000000000000000..c31e9619e8f25d7b10396bcee4e058d938c5b43a\nGIT binary patch\nliteral 589\nzcmZ?wbhEHb6krfwI2Od9V3??EmL+GAFK<<(;!vt-U!mn#uj|sH;ofH8*{SE<Wa!&$\nz=-+7>Hqku1-!fu?b;LZUq}k5Nv)$6>`D8Ek$ypXrzAmL{+xB|yjkQ)a6Sp4hRXfzD\nzx_6Suu1S_J+Ld-sw%9$z^1vL~?s-QJFH$+YSiOJo@x#lt-_GMXy;A?!D$~bH^k=R<\nzJ!|dxS!*xMUVDD_+6#xaSk2vZ?df{G6Fb8mZ?S#7Q|0wR)s06UZ#w$;^)dgCM?=1y\nzw0M8o;q!H;FW0?JTz&ENX2PFaK7VfeeZ80X{ZYjC$4S2*W&eIs`txP!&sU8<Up4*u\nzSoHhDwBKKQ{(M>U=gZo^zxMtgG(hnu3nLdpJ%bJd5P;%@fqhj&eN%HwYqN=px~h__\nzNn4YllSg2Hw~LKoy$**|vzD{_lxa2+^`Z_;&5CBOex7#b8q)PrOmmy$9DNr}msaEB\nzW>afY*cIsSHC;x?$UvF>$gvZr1TFN$1upKsY$GFVsV8-_{^;$KcbUbMMHp@!e=bwc\nzqR-g;^!=%NE?w4UNp1TX5-$xOJGa^MxP1}cqU?O2(b#CokIxJqOiort8CN2lFSN3W\nM$aTtya4=W{0B0msW&i*H\n\nliteral 0\nHcmV?d00001\n\ndiff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/PluginPreferenceInitializer.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/PluginPreferenceInitializer.java\nindex 5c66d38..8970d97 100644\n--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/PluginPreferenceInitializer.java\n+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/PluginPreferenceInitializer.java\n@@ -51,10 +51,7 @@ public class PluginPreferenceInitializer extends AbstractPreferenceInitializer {\n \t\t\t\tUIPreferences.RESOURCEHISTORY_REV_SPLIT, w);\n \n \t\tprefs.setDefault(UIPreferences.FINDTOOLBAR_IGNORE_CASE, true);\n-\t\tprefs.setDefault(UIPreferences.FINDTOOLBAR_COMMIT_ID, true);\n-\t\tprefs.setDefault(UIPreferences.FINDTOOLBAR_COMMENTS, true);\n-\t\tprefs.setDefault(UIPreferences.FINDTOOLBAR_AUTHOR, false);\n-\t\tprefs.setDefault(UIPreferences.FINDTOOLBAR_COMMITTER, false);\n+\t\tprefs.setDefault(UIPreferences.FINDTOOLBAR_FIND_IN, 2);\n \t}\n \n }\ndiff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/UIIcons.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/UIIcons.java\nindex 881265d..33edcec 100644\n--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/UIIcons.java\n+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/UIIcons.java\n@@ -46,6 +46,14 @@ public class UIIcons {\n \tpublic static final ImageDescriptor ELCL16_NEXT;\n \t/** Previous arrow icon */\n \tpublic static final ImageDescriptor ELCL16_PREVIOUS;\n+\t/** Commit icon */\n+\tpublic static final ImageDescriptor ELCL16_COMMIT;\n+\t/** Comments icon */\n+\tpublic static final ImageDescriptor ELCL16_COMMENTS;\n+\t/** Author icon */\n+\tpublic static final ImageDescriptor ELCL16_AUTHOR;\n+\t/** Committer icon */\n+\tpublic static final ImageDescriptor ELCL16_COMMITTER;\n \n \tprivate static final URL base;\n \n@@ -59,6 +67,10 @@ public class UIIcons {\n \t\tELCL16_FIND = map(\"elcl16/find.gif\");\n \t\tELCL16_NEXT = map(\"elcl16/next.gif\");\n \t\tELCL16_PREVIOUS = map(\"elcl16/previous.gif\");\n+\t\tELCL16_COMMIT = map(\"elcl16/commit.gif\");\n+\t\tELCL16_COMMENTS = map(\"elcl16/comment.gif\");\n+\t\tELCL16_AUTHOR = map(\"elcl16/author.gif\");\n+\t\tELCL16_COMMITTER = map(\"elcl16/committer.gif\");\n \t}\n \n \tprivate static ImageDescriptor map(final String icon) {\ndiff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/UIPreferences.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/UIPreferences.java\nindex 7f17770..51aa1b8 100644\n--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/UIPreferences.java\n+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/UIPreferences.java\n@@ -47,6 +47,8 @@ public class UIPreferences {\n \tpublic final static String FINDTOOLBAR_AUTHOR = \"findtoolbar_author\";\n \t/** */\n \tpublic final static String FINDTOOLBAR_COMMITTER = \"findtoolbar_committer\";\n+\t/** */\n+\tpublic final static String FINDTOOLBAR_FIND_IN = \"findtoolbar_find_in\";\n \n \t/** */\n \tpublic final static String THEME_CommitGraphNormalFont = \"org.spearce.egit.ui.CommitGraphNormalFont\";\ndiff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/UIText.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/UIText.java\nindex dbe0df1..f000f6b 100644\n--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/UIText.java\n+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/UIText.java\n@@ -90,6 +90,14 @@ public class UIText extends NLS {\n \t/** */\n \tpublic static String HistoryPage_findbar_committer;\n \t/** */\n+\tpublic static String HistoryPage_findbar_changeto_commit;\n+\t/** */\n+\tpublic static String HistoryPage_findbar_changeto_comments;\n+\t/** */\n+\tpublic static String HistoryPage_findbar_changeto_author;\n+\t/** */\n+\tpublic static String HistoryPage_findbar_changeto_committer;\n+\t/** */\n \tpublic static String HistoryPage_findbar_exceeded;\n \t/** */\n \tpublic static String HistoryPage_findbar_notFound;\ndiff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/history/FindToolbar.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/history/FindToolbar.java\nindex dbd0774..5715d12 100644\n--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/history/FindToolbar.java\n+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/history/FindToolbar.java\n@@ -61,6 +61,14 @@ import org.spearce.egit.ui.UIText;\n  * @see GitHistoryPage\n  */\n public class FindToolbar extends Composite {\n+\tprivate static final int PREFS_FINDIN_COMMITID = 1;\n+\n+\tprivate static final int PREFS_FINDIN_COMMENTS = 2;\n+\n+\tprivate static final int PREFS_FINDIN_AUTHOR = 4;\n+\n+\tprivate static final int PREFS_FINDIN_COMMITTER = 5;\n+\n \tprivate Color errorBackgroundColor;\n \n \t/**\n@@ -72,10 +80,6 @@ public class FindToolbar extends Composite {\n \n \tprivate List<Listener> eventList = new ArrayList<Listener>();\n \n-\tprivate Image nextIcon;\n-\n-\tprivate Image previousIcon;\n-\n \tprivate Table historyTable;\n \n \tprivate SWTCommit[] fileRevisions;\n@@ -92,6 +96,26 @@ public class FindToolbar extends Composite {\n \n \tprivate String lastErrorPattern;\n \n+\tprivate MenuItem commitIdItem;\n+\n+\tprivate MenuItem commentsItem;\n+\n+\tprivate MenuItem authorItem;\n+\n+\tprivate MenuItem committerItem;\n+\n+\tprivate Image nextIcon;\n+\n+\tprivate Image previousIcon;\n+\n+\tprivate Image commitIdIcon;\n+\n+\tprivate Image commentsIcon;\n+\n+\tprivate Image authorIcon;\n+\n+\tprivate Image committerIcon;\n+\n \t/**\n \t * Creates the toolbar.\n \t *\n@@ -107,6 +131,10 @@ public class FindToolbar extends Composite {\n \t\terrorBackgroundColor = new Color(getDisplay(), new RGB(255, 150, 150));\n \t\tnextIcon = UIIcons.ELCL16_NEXT.createImage();\n \t\tpreviousIcon = UIIcons.ELCL16_PREVIOUS.createImage();\n+\t\tcommitIdIcon = UIIcons.ELCL16_COMMIT.createImage();\n+\t\tcommentsIcon = UIIcons.ELCL16_COMMENTS.createImage();\n+\t\tauthorIcon = UIIcons.ELCL16_AUTHOR.createImage();\n+\t\tcommitterIcon = UIIcons.ELCL16_COMMITTER.createImage();\n \n \t\tGridLayout findLayout = new GridLayout();\n \t\tfindLayout.marginHeight = 2;\n@@ -141,13 +169,13 @@ public class FindToolbar extends Composite {\n \t\tfinal MenuItem caseItem = new MenuItem(prefsMenu, SWT.CHECK);\n \t\tcaseItem.setText(UIText.HistoryPage_findbar_ignorecase);\n \t\tnew MenuItem(prefsMenu, SWT.SEPARATOR);\n-\t\tfinal MenuItem commitIdItem = new MenuItem(prefsMenu, SWT.CHECK);\n+\t\tcommitIdItem = new MenuItem(prefsMenu, SWT.RADIO);\n \t\tcommitIdItem.setText(UIText.HistoryPage_findbar_commit);\n-\t\tfinal MenuItem commentsItem = new MenuItem(prefsMenu, SWT.CHECK);\n+\t\tcommentsItem = new MenuItem(prefsMenu, SWT.RADIO);\n \t\tcommentsItem.setText(UIText.HistoryPage_findbar_comments);\n-\t\tfinal MenuItem authorItem = new MenuItem(prefsMenu, SWT.CHECK);\n+\t\tauthorItem = new MenuItem(prefsMenu, SWT.RADIO);\n \t\tauthorItem.setText(UIText.HistoryPage_findbar_author);\n-\t\tfinal MenuItem committerItem = new MenuItem(prefsMenu, SWT.CHECK);\n+\t\tcommitterItem = new MenuItem(prefsMenu, SWT.RADIO);\n \t\tcommitterItem.setText(UIText.HistoryPage_findbar_committer);\n \n \t\tprefsItem.addListener(SWT.Selection, new Listener() {\n@@ -158,6 +186,21 @@ public class FindToolbar extends Composite {\n \t\t\t\t\t\t\t+ itemBounds.height);\n \t\t\t\t\tprefsMenu.setLocation(point);\n \t\t\t\t\tprefsMenu.setVisible(true);\n+\t\t\t\t} else {\n+\t\t\t\t\tswitch (prefs.getInt(UIPreferences.FINDTOOLBAR_FIND_IN)) {\n+\t\t\t\t\tcase PREFS_FINDIN_COMMITID:\n+\t\t\t\t\t\tcommentsItem.notifyListeners(SWT.Selection, null);\n+\t\t\t\t\t\tbreak;\n+\t\t\t\t\tcase PREFS_FINDIN_COMMENTS:\n+\t\t\t\t\t\tauthorItem.notifyListeners(SWT.Selection, null);\n+\t\t\t\t\t\tbreak;\n+\t\t\t\t\tcase PREFS_FINDIN_AUTHOR:\n+\t\t\t\t\t\tcommitterItem.notifyListeners(SWT.Selection, null);\n+\t\t\t\t\t\tbreak;\n+\t\t\t\t\tcase PREFS_FINDIN_COMMITTER:\n+\t\t\t\t\t\tcommitIdItem.notifyListeners(SWT.Selection, null);\n+\t\t\t\t\t\tbreak;\n+\t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t});\n@@ -276,49 +319,78 @@ public class FindToolbar extends Composite {\n \t\tcaseItem.setSelection(prefs\n \t\t\t\t.getBoolean(UIPreferences.FINDTOOLBAR_IGNORE_CASE));\n \n+\t\tint selectedPrefsItem = prefs.getInt(UIPreferences.FINDTOOLBAR_FIND_IN);\n+\n \t\tcommitIdItem.addSelectionListener(new SelectionAdapter() {\n \t\t\tpublic void widgetSelected(SelectionEvent e) {\n-\t\t\t\tprefs.setValue(UIPreferences.FINDTOOLBAR_COMMIT_ID,\n-\t\t\t\t\t\tcommitIdItem.getSelection());\n-\t\t\t\tActivator.getDefault().savePluginPreferences();\n-\t\t\t\tclear();\n+\t\t\t\tprefsItem.setImage(commitIdIcon);\n+\t\t\t\tprefsItem\n+\t\t\t\t\t\t.setToolTipText(UIText.HistoryPage_findbar_changeto_comments);\n+\t\t\t\tprefsItemChanged(PREFS_FINDIN_COMMITID, commitIdItem);\n \t\t\t}\n \t\t});\n-\t\tcommitIdItem.setSelection(prefs\n-\t\t\t\t.getBoolean(UIPreferences.FINDTOOLBAR_COMMIT_ID));\n+\t\tif (selectedPrefsItem == PREFS_FINDIN_COMMITID) {\n+\t\t\tcommitIdItem.setSelection(true);\n+\t\t\tprefsItem.setImage(commitIdIcon);\n+\t\t\tprefsItem\n+\t\t\t\t\t.setToolTipText(UIText.HistoryPage_findbar_changeto_comments);\n+\t\t}\n \n \t\tcommentsItem.addSelectionListener(new SelectionAdapter() {\n \t\t\tpublic void widgetSelected(SelectionEvent e) {\n-\t\t\t\tprefs.setValue(UIPreferences.FINDTOOLBAR_COMMENTS, commentsItem\n-\t\t\t\t\t\t.getSelection());\n-\t\t\t\tActivator.getDefault().savePluginPreferences();\n-\t\t\t\tclear();\n+\t\t\t\tprefsItem.setImage(commentsIcon);\n+\t\t\t\tprefsItem\n+\t\t\t\t\t\t.setToolTipText(UIText.HistoryPage_findbar_changeto_author);\n+\t\t\t\tprefsItemChanged(PREFS_FINDIN_COMMENTS, commentsItem);\n \t\t\t}\n \t\t});\n-\t\tcommentsItem.setSelection(prefs\n-\t\t\t\t.getBoolean(UIPreferences.FINDTOOLBAR_COMMENTS));\n+\t\tif (selectedPrefsItem == PREFS_FINDIN_COMMENTS) {\n+\t\t\tcommentsItem.setSelection(true);\n+\t\t\tprefsItem.setImage(commentsIcon);\n+\t\t\tprefsItem\n+\t\t\t\t\t.setToolTipText(UIText.HistoryPage_findbar_changeto_author);\n+\t\t}\n \n \t\tauthorItem.addSelectionListener(new SelectionAdapter() {\n \t\t\tpublic void widgetSelected(SelectionEvent e) {\n-\t\t\t\tprefs.setValue(UIPreferences.FINDTOOLBAR_AUTHOR, authorItem\n-\t\t\t\t\t\t.getSelection());\n-\t\t\t\tActivator.getDefault().savePluginPreferences();\n-\t\t\t\tclear();\n+\t\t\t\tprefsItem.setImage(authorIcon);\n+\t\t\t\tprefsItem\n+\t\t\t\t\t\t.setToolTipText(UIText.HistoryPage_findbar_changeto_committer);\n+\t\t\t\tprefsItemChanged(PREFS_FINDIN_AUTHOR, authorItem);\n \t\t\t}\n \t\t});\n-\t\tauthorItem.setSelection(prefs\n-\t\t\t\t.getBoolean(UIPreferences.FINDTOOLBAR_AUTHOR));\n+\t\tif (selectedPrefsItem == PREFS_FINDIN_AUTHOR) {\n+\t\t\tauthorItem.setSelection(true);\n+\t\t\tprefsItem.setImage(authorIcon);\n+\t\t\tprefsItem\n+\t\t\t\t\t.setToolTipText(UIText.HistoryPage_findbar_changeto_committer);\n+\t\t}\n \n \t\tcommitterItem.addSelectionListener(new SelectionAdapter() {\n \t\t\tpublic void widgetSelected(SelectionEvent e) {\n-\t\t\t\tprefs.setValue(UIPreferences.FINDTOOLBAR_COMMITTER,\n-\t\t\t\t\t\tcommitterItem.getSelection());\n-\t\t\t\tActivator.getDefault().savePluginPreferences();\n-\t\t\t\tclear();\n+\t\t\t\tprefsItem.setImage(committerIcon);\n+\t\t\t\tprefsItem\n+\t\t\t\t\t\t.setToolTipText(UIText.HistoryPage_findbar_changeto_commit);\n+\t\t\t\tprefsItemChanged(PREFS_FINDIN_COMMITTER, committerItem);\n \t\t\t}\n \t\t});\n-\t\tcommitterItem.setSelection(prefs\n-\t\t\t\t.getBoolean(UIPreferences.FINDTOOLBAR_COMMITTER));\n+\t\tif (selectedPrefsItem == PREFS_FINDIN_COMMITTER) {\n+\t\t\tcommitterItem.setSelection(true);\n+\t\t\tprefsItem.setImage(committerIcon);\n+\t\t\tprefsItem\n+\t\t\t\t\t.setToolTipText(UIText.HistoryPage_findbar_changeto_commit);\n+\t\t}\n+\t}\n+\n+\tprivate void prefsItemChanged(int findin, MenuItem item) {\n+\t\tprefs.setValue(UIPreferences.FINDTOOLBAR_FIND_IN, findin);\n+\t\tActivator.getDefault().savePluginPreferences();\n+\t\tcommitIdItem.setSelection(false);\n+\t\tcommentsItem.setSelection(false);\n+\t\tauthorItem.setSelection(false);\n+\t\tcommitterItem.setSelection(false);\n+\t\titem.setSelection(true);\n+\t\tclear();\n \t}\n \n \t@Override\n@@ -326,6 +398,10 @@ public class FindToolbar extends Composite {\n \t\terrorBackgroundColor.dispose();\n \t\tnextIcon.dispose();\n \t\tpreviousIcon.dispose();\n+\t\tcommitIdIcon.dispose();\n+\t\tcommentsIcon.dispose();\n+\t\tauthorIcon.dispose();\n+\t\tcommitterIcon.dispose();\n \t\tsuper.dispose();\n \t}\n \ndiff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/uitext.properties b/org.spearce.egit.ui/src/org/spearce/egit/ui/uitext.properties\nindex ef9ebee..de9af25 100644\n--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/uitext.properties\n+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/uitext.properties\n@@ -48,6 +48,10 @@ HistoryPage_findbar_commit=Commit\n HistoryPage_findbar_comments=Comments\n HistoryPage_findbar_author=Author\n HistoryPage_findbar_committer=Committer\n+HistoryPage_findbar_changeto_commit=Change to Commit\n+HistoryPage_findbar_changeto_comments=Change to Comments\n+HistoryPage_findbar_changeto_author=Change to Author\n+HistoryPage_findbar_changeto_committer=Change to Committer\n HistoryPage_findbar_exceeded=Results limit exceeded\n HistoryPage_findbar_notFound=String not found\n \n-- \n1.5.4.1\n"}]}