Commit 58209e11 authored by Cosimo Cecchi's avatar Cosimo Cecchi

window: rename functions dealing with mnemonic delayed display

Don't mention "auto mnemonics", since those methods are purely about
scheduling a delayed display, and that makes understanding the code a
bit harder.

https://bugzilla.gnome.org/show_bug.cgi?id=697144
parent 68b437ee
......@@ -1698,7 +1698,7 @@ gtk_main_do_event (GdkEvent *event)
if (GTK_IS_WINDOW (window))
{
if (mnemonics_visible)
_gtk_window_set_auto_mnemonics_visible (GTK_WINDOW (window));
_gtk_window_schedule_mnemonics_visible (GTK_WINDOW (window));
else
gtk_window_set_mnemonics_visible (GTK_WINDOW (window), FALSE);
}
......
......@@ -105,7 +105,7 @@
* </refsect2>
*/
#define AUTO_MNEMONICS_DELAY 300 /* ms */
#define MNEMONICS_DELAY 300 /* ms */
typedef struct _GtkDeviceGrabInfo GtkDeviceGrabInfo;
......@@ -139,7 +139,7 @@ struct _GtkWindowPrivate
guint16 configure_request_count;
guint auto_mnemonics_timeout_id;
guint mnemonics_display_timeout_id;
GtkWidget *title_box;
GtkWidget *title_icon;
......@@ -4962,10 +4962,10 @@ gtk_window_finalize (GObject *object)
g_free (priv->startup_id);
if (priv->auto_mnemonics_timeout_id)
if (priv->mnemonics_display_timeout_id)
{
g_source_remove (priv->auto_mnemonics_timeout_id);
priv->auto_mnemonics_timeout_id = 0;
g_source_remove (priv->mnemonics_display_timeout_id);
priv->mnemonics_display_timeout_id = 0;
}
#ifdef GDK_WINDOWING_X11
......@@ -7152,7 +7152,7 @@ maybe_set_mnemonics_visible (GtkWindow *window)
NULL, &mask);
if (window->priv->mnemonic_modifier == (mask & gtk_accelerator_get_default_mod_mask ()))
{
_gtk_window_set_auto_mnemonics_visible (window);
_gtk_window_schedule_mnemonics_visible (window);
break;
}
}
......@@ -11138,17 +11138,17 @@ gtk_window_set_mnemonics_visible (GtkWindow *window,
g_object_notify (G_OBJECT (window), "mnemonics-visible");
}
if (priv->auto_mnemonics_timeout_id)
if (priv->mnemonics_display_timeout_id)
{
g_source_remove (priv->auto_mnemonics_timeout_id);
priv->auto_mnemonics_timeout_id = 0;
g_source_remove (priv->mnemonics_display_timeout_id);
priv->mnemonics_display_timeout_id = 0;
}
priv->mnemonics_visible_set = TRUE;
}
static gboolean
set_auto_mnemonics_visible_cb (gpointer data)
schedule_mnemonics_visible_cb (gpointer data)
{
GtkWindow *window = data;
......@@ -11160,15 +11160,15 @@ set_auto_mnemonics_visible_cb (gpointer data)
}
void
_gtk_window_set_auto_mnemonics_visible (GtkWindow *window)
_gtk_window_schedule_mnemonics_visible (GtkWindow *window)
{
g_return_if_fail (GTK_IS_WINDOW (window));
if (window->priv->auto_mnemonics_timeout_id)
if (window->priv->mnemonics_display_timeout_id)
return;
window->priv->auto_mnemonics_timeout_id =
gdk_threads_add_timeout (AUTO_MNEMONICS_DELAY, set_auto_mnemonics_visible_cb, window);
window->priv->mnemonics_display_timeout_id =
gdk_threads_add_timeout (MNEMONICS_DELAY, schedule_mnemonics_visible_cb, window);
}
/**
......
......@@ -86,7 +86,7 @@ gboolean _gtk_window_query_nonaccels (GtkWindow *window,
guint accel_key,
GdkModifierType accel_mods);
void _gtk_window_set_auto_mnemonics_visible (GtkWindow *window);
void _gtk_window_schedule_mnemonics_visible (GtkWindow *window);
G_END_DECLS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment