[gtk/wip/matthiasc/context-menu] cell renderer: remove populate-popup
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/context-menu] cell renderer: remove populate-popup
- Date: Tue, 5 Feb 2019 10:55:04 +0000 (UTC)
commit 16bbdbd2547b1e4abd79d24a71b0796cf16ce7c6
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Feb 5 03:52:03 2019 -0500
cell renderer: remove populate-popup
gtk/gtkcellrenderertext.c | 53 -----------------------------------------------
1 file changed, 53 deletions(-)
---
diff --git a/gtk/gtkcellrenderertext.c b/gtk/gtkcellrenderertext.c
index f7ee9aaee2..41e00e44be 100644
--- a/gtk/gtkcellrenderertext.c
+++ b/gtk/gtkcellrenderertext.c
@@ -202,7 +202,6 @@ struct _GtkCellRendererTextPrivate
guint align_set : 1;
gulong focus_out_id;
- gulong populate_popup_id;
gulong entry_menu_popdown_timeout;
};
@@ -1777,12 +1776,6 @@ gtk_cell_renderer_text_editing_done (GtkCellEditable *entry,
priv->focus_out_id = 0;
}
- if (priv->populate_popup_id > 0)
- {
- g_signal_handler_disconnect (entry, priv->populate_popup_id);
- priv->populate_popup_id = 0;
- }
-
if (priv->entry_menu_popdown_timeout)
{
g_source_remove (priv->entry_menu_popdown_timeout);
@@ -1818,44 +1811,6 @@ popdown_timeout (gpointer data)
return FALSE;
}
-static void
-gtk_cell_renderer_text_popup_unmap (GtkMenu *menu,
- gpointer data)
-{
- GtkCellRendererTextPrivate *priv;
-
- priv = GTK_CELL_RENDERER_TEXT (data)->priv;
-
- priv->in_entry_menu = FALSE;
-
- if (priv->entry_menu_popdown_timeout)
- return;
-
- priv->entry_menu_popdown_timeout = g_timeout_add (500, popdown_timeout, data);
- g_source_set_name_by_id (priv->entry_menu_popdown_timeout, "[gtk+] popdown_timeout");
-}
-
-static void
-gtk_cell_renderer_text_populate_popup (GtkEntry *entry,
- GtkMenu *menu,
- gpointer data)
-{
- GtkCellRendererTextPrivate *priv;
-
- priv = GTK_CELL_RENDERER_TEXT (data)->priv;
-
- if (priv->entry_menu_popdown_timeout)
- {
- g_source_remove (priv->entry_menu_popdown_timeout);
- priv->entry_menu_popdown_timeout = 0;
- }
-
- priv->in_entry_menu = TRUE;
-
- g_signal_connect (menu, "unmap",
- G_CALLBACK (gtk_cell_renderer_text_popup_unmap), data);
-}
-
static void
gtk_cell_renderer_text_focus_changed (GtkWidget *entry,
GParamSpec *pspec,
@@ -1868,9 +1823,6 @@ gtk_cell_renderer_text_focus_changed (GtkWidget *entry,
if (gtk_widget_has_focus (entry))
return;
- if (priv->in_entry_menu)
- return;
-
g_object_set (entry,
"editing-canceled", TRUE,
NULL);
@@ -1927,11 +1879,6 @@ gtk_cell_renderer_text_start_editing (GtkCellRenderer *cell,
priv->focus_out_id = g_signal_connect_after (priv->entry, "notify::has-focus",
G_CALLBACK (gtk_cell_renderer_text_focus_changed),
celltext);
- priv->populate_popup_id =
- g_signal_connect (priv->entry, "populate-popup",
- G_CALLBACK (gtk_cell_renderer_text_populate_popup),
- celltext);
-
gtk_widget_show (priv->entry);
return GTK_CELL_EDITABLE (priv->entry);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]