After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 702979 - Search entry: the options menu should appear below the icon
Search entry: the options menu should appear below the icon
Status: RESOLVED FIXED
Product: gedit
Classification: Applications
Component: search and replace
3.9.x
Other Linux
: Normal minor
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2013-06-24 13:45 UTC by Sébastien Wilmet
Modified: 2014-02-22 15:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
The patch displays the Search Options Menu below the Search Icon when clicked. (1.56 KB, patch)
2014-02-16 13:43 UTC, Lourdes Roashan
needs-work Details | Review

Description Sébastien Wilmet 2013-06-24 13:45:51 UTC
Currently, when we click on the left icon in the search entry, to show the menu containing the search options (e.g. case sensitive), the menu is displayed at the mouse position.

It would be nice to display the menu below the icon instead.
Comment 1 Lourdes Roashan 2014-02-16 13:43:06 UTC
Created attachment 269301 [details] [review]
The patch displays the Search Options Menu below the Search Icon when clicked.

The patch displays the Search Options Menu below the Search Icon when clicked.
Before, it was displayed on the mouse pointer.
Comment 2 Sébastien Wilmet 2014-02-17 13:34:42 UTC
Review of attachment 269301 [details] [review]:

Here are my comments:
- The function parameters are not well aligned (see other functions to see how it is done).
- Add a space after commas.
- Some trailing spaces are added. You must avoid trailspaces, and avoid modifying other lines not related to the commit.

::: gedit/gedit-view-frame.c
@@ +903,3 @@
+		    gpointer user_data)
+{
+	user_data = NULL;

user_data is not an out parameter, you don't need to set it to NULL

@@ +904,3 @@
+{
+	user_data = NULL;
+	*y+= 25;

25 is hardcoded, this is a bad practice. With bigger or smaller widgets it won't work.
Comment 3 Sébastien Wilmet 2014-02-17 15:16:02 UTC
Review of attachment 269301 [details] [review]:

::: gedit/gedit-view-frame.c
@@ +897,3 @@
 }
+static void
+menu_pos (GtkMenu   *menu,

don't use abbreviation for function names, here it's better "menu_position" or "menu_position_cb"
Comment 4 Paolo Borelli 2014-02-22 15:50:45 UTC
we actually have an utility in gedit-utils which does the right thing.

I amended the patch to use that