Branch: refs/heads/master
Author: Jiří Techet <techet(a)gmail.com>
Committer: Jiří Techet <techet(a)gmail.com>
Date: Thu, 25 Feb 2016 23:05:22 UTC
Commit: 1f9bfdf65fd43e80975aeb8eea37a427e379785a
https://github.com/geany/geany/commit/1f9bfdf65fd43e80975aeb8eea37a427e3797…
Log Message:
-----------
Set push_in parameter to false
This behaves a bit strangely when the list is long and when clicked at the
bottom of the screen (the top part of the popup is empty).
Modified Paths:
--------------
src/symbols.c
Modified: src/symbols.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -1892,7 +1892,7 @@ static void goto_popup_position_func(GtkMenu *menu, gint *x, gint *y, gboolean *
*x += pos_x;
*y += pos_y + line_height;
- *push_in = TRUE;
+ *push_in = FALSE;
}
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Jiří Techet <techet(a)gmail.com>
Committer: Jiří Techet <techet(a)gmail.com>
Date: Thu, 25 Feb 2016 23:05:22 UTC
Commit: a168f69887ce29345d6592b8df566629f014ed7f
https://github.com/geany/geany/commit/a168f69887ce29345d6592b8df566629f014e…
Log Message:
-----------
Make sure the mouse cursor is out of the popup
The x coordinate is now taken from the scintilla caret position. However,
when performing ctrl+click, we have to distinguish two cases:
1. the click happens in the second half of a letter - in this case the caret
is placed behind the letter and the popup appears behind it - no problem
2. the click happens in the first part of a letter - caret is placed before
the letter and the popup appears before the position where the click
happened - this means that the mouse cursor is above the popup which causes
that the mouse cursor highlights the item at the position of the cursor
instead of having the first item in the menu highlighted.
The patch calculates offset between caret and the mouse click event
position and uses this value to adjust the popup positioning so it's
outside the mouse cursor.
Modified Paths:
--------------
src/symbols.c
Modified: src/symbols.c
31 lines changed, 25 insertions(+), 6 deletions(-)
===================================================================
@@ -1888,14 +1888,31 @@ static void goto_popup_position_func(GtkMenu *menu, gint *x, gint *y, gboolean *
gint pos_x = scintilla_send_message(sci, SCI_POINTXFROMPOSITION, 0, pos);
gint pos_y = scintilla_send_message(sci, SCI_POINTYFROMPOSITION, 0, pos);
GdkScreen *screen = gtk_widget_get_screen(GTK_WIDGET(menu));
+ gint offset_left = 0;
+ gint offset_right = 0;
gint monitor_num;
GdkRectangle monitor;
GtkRequisition req;
+ GdkEvent *event;
gdk_window_get_origin(window, x, y);
*x += pos_x;
*y += pos_y;
+ event = gtk_get_current_event();
+ if (event && event->type == GDK_BUTTON_PRESS)
+ {
+ GdkEventButton *event_button = (GdkEventButton *) event;
+
+ /* Caret is placed either before or after the letter which was clicked.
+ * Compute offset between the caret and click position and make sure
+ * the popup is shown outside the mouse pointer. */
+ if (event_button->x >= pos_x && pos + 1 < sci_get_length(sci))
+ offset_right = scintilla_send_message(sci, SCI_POINTXFROMPOSITION, 0, pos + 1) - pos_x;
+ else if (event_button->x <= pos_x && pos > 0)
+ offset_left = pos_x - scintilla_send_message(sci, SCI_POINTXFROMPOSITION, 0, pos - 1);
+ }
+
monitor_num = gdk_screen_get_monitor_at_point(screen, *x, *y);
#if GTK_CHECK_VERSION(3, 0, 0)
@@ -1913,17 +1930,19 @@ static void goto_popup_position_func(GtkMenu *menu, gint *x, gint *y, gboolean *
/* put on one size of the X position, but within the monitor */
if (gtk_widget_get_direction(GTK_WIDGET(menu)) == GTK_TEXT_DIR_RTL)
{
- if (*x - req.width >= monitor.x)
- *x -= req.width;
+ if (*x - req.width - offset_left >= monitor.x)
+ *x -= req.width + offset_left;
else if (*x + req.width > monitor.x + monitor.width)
*x = monitor.x;
+ else
+ *x += offset_right;
}
else
{
- if (*x + req.width <= monitor.x + monitor.width)
- *x = MAX(monitor.x, *x);
- else if (*x - req.width >= monitor.x)
- *x -= req.width;
+ if (*x + req.width + offset_right <= monitor.x + monitor.width)
+ *x = MAX(monitor.x, *x + offset_right);
+ else if (*x - req.width - offset_left >= monitor.x)
+ *x -= req.width + offset_left;
else
*x = monitor.x + MAX(0, monitor.width - req.width);
}
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Thomas Martitz <kugel(a)rockbox.org>
Committer: Thomas Martitz <kugel(a)rockbox.org>
Date: Thu, 25 Feb 2016 13:50:25 UTC
Commit: 1f5355200789dbb0ff393bf7f904b053e71a64cb
https://github.com/geany/geany/commit/1f5355200789dbb0ff393bf7f904b053e71a6…
Log Message:
-----------
Undo removal of "can be NULL" remark
Also remove a unecessary empty line.
Modified Paths:
--------------
src/keybindings.c
src/utils.c
Modified: src/keybindings.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -217,7 +217,7 @@ GeanyKeyBinding *keybindings_set_item(GeanyKeyGroup *group, gsize key_id,
* @param kf_name Key name for the configuration file, such as @c "menu_new".
* @param label Label used in the preferences dialog keybindings tab. May contain
* underscores - these won't be displayed.
- * @param menu_item @nullable Optional widget to set an accelerator for.
+ * @param menu_item @nullable Optional widget to set an accelerator for, or @c NULL.
* @param cb @nullable New-style callback to be called when activated, or @c NULL to use the group callback.
* @param pdata Plugin-specific data passed back to the callback @a cb.
* @param destroy_notify Function that is invoked to free the plugin data when not needed anymore.
Modified: src/utils.c
3 lines changed, 1 insertions(+), 2 deletions(-)
===================================================================
@@ -1652,7 +1652,7 @@ const gchar *utils_get_default_dir_utf8(void)
* @param env The child's environment, or @c NULL to inherit parent's.
* @param flags Ignored.
* @param child_setup @girskip Ignored.
- * @param user_data Ignored.
+ * @param user_data @girskip Ignored.
* @param std_out The return location for child output, or @c NULL.
* @param std_err The return location for child error messages, or @c NULL.
* @param exit_status The child exit status, as returned by waitpid(), or @c NULL.
@@ -1955,7 +1955,6 @@ static gboolean str_in_array(const gchar **haystack, const gchar *needle)
*
* The argument list must be @c NULL-terminated.
*
- *
* @param exclude_vars @c NULL-terminated array of variable names to exclude.
* @param first_varname Name of the first variable to copy into the new array.
* @param ... Key-value pairs of variable names and values, @c NULL-terminated.
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Thomas Martitz <kugel(a)rockbox.org>
Committer: Thomas Martitz <kugel(a)rockbox.org>
Date: Thu, 25 Feb 2016 13:49:18 UTC
Commit: 3d51d8f6a64d49ac5b223075cbee530bd678e89c
https://github.com/geany/geany/commit/3d51d8f6a64d49ac5b223075cbee530bd678e…
Log Message:
-----------
GeanyFiletypeGroupID shall be gir-only
Modified Paths:
--------------
src/filetypes.h
Modified: src/filetypes.h
3 lines changed, 2 insertions(+), 1 deletions(-)
===================================================================
@@ -113,7 +113,8 @@ GeanyFiletypeID;
#define filetype_id GeanyFiletypeID /* compat define - should be removed in the future */
-/** Filetype categories
+/** @gironly
+ * Filetype categories
*
* These are used to provide submenus for each category in the GUI */
typedef enum
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).