PROP_TOOLTIP_TEXT_SECONDARY,
PROP_TOOLTIP_MARKUP_PRIMARY,
PROP_TOOLTIP_MARKUP_SECONDARY,
- PROP_IM_MODULE
+ PROP_IM_MODULE,
+ PROP_EDITING_CANCELED
};
static guint signals[LAST_SIGNAL] = { 0 };
quark_cursor_hadjustment = g_quark_from_static_string ("gtk-hadjustment");
quark_capslock_feedback = g_quark_from_static_string ("gtk-entry-capslock-feedback");
+ g_object_class_override_property (gobject_class,
+ PROP_EDITING_CANCELED,
+ "editing-canceled");
+
g_object_class_install_property (gobject_class,
PROP_BUFFER,
g_param_spec_object ("buffer",
GTK_PARAM_READABLE));
/**
- * GtkEntry::progress-border:
+ * GtkEntry:progress-border:
*
* The border around the progress bar in the entry.
*
GTK_PARAM_READABLE));
/**
- * GtkEntry::invisible-char:
+ * GtkEntry:invisible-char:
*
* The invisible character is used when masking entry contents (in
* \"password mode\")"). When it is not explicitly set with the
* This style property allows the theme to prepend a character
* to the list of candidates.
*
- * Since: 2.22
+ * Since: 2.18
*/
gtk_widget_class_install_style_property (widget_class,
g_param_spec_unichar ("invisible-char",
gtk_entry_get_icon_tooltip_markup (entry, GTK_ENTRY_ICON_SECONDARY));
break;
+ case PROP_EDITING_CANCELED:
+ g_value_set_boolean (value,
+ entry->editing_canceled);
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
if (GTK_WIDGET_REALIZED (widget))
realize_icon_info (widget, icon_pos);
- if (GTK_WIDGET_MAPPED (widget))
- gdk_window_show_unraised (icon_info->window);
-
return icon_info;
}
* buffer_notify_text(), buffer_notify_length()
*/
- gtk_entry_buffer_delete_text (GTK_ENTRY_GET_PRIVATE (editable)->buffer, start_pos, end_pos - start_pos);
+ gtk_entry_buffer_delete_text (get_buffer (GTK_ENTRY (editable)), start_pos, end_pos - start_pos);
}
/* GtkEntryBuffer signal handlers
g_object_notify (G_OBJECT (entry), "secondary-icon-pixbuf");
g_object_notify (G_OBJECT (entry), "secondary-icon-storage-type");
}
+
+ if (GTK_WIDGET_MAPPED (entry))
+ gdk_window_show_unraised (icon_info->window);
}
gtk_entry_ensure_pixbuf (entry, icon_pos);
g_object_notify (G_OBJECT (entry), "secondary-icon-stock");
g_object_notify (G_OBJECT (entry), "secondary-icon-storage-type");
}
+
+ if (GTK_WIDGET_MAPPED (entry))
+ gdk_window_show_unraised (icon_info->window);
}
gtk_entry_ensure_pixbuf (entry, icon_pos);
g_object_notify (G_OBJECT (entry), "secondary-icon-name");
g_object_notify (G_OBJECT (entry), "secondary-icon-storage-type");
}
+
+ if (GTK_WIDGET_MAPPED (entry))
+ gdk_window_show_unraised (icon_info->window);
}
gtk_entry_ensure_pixbuf (entry, icon_pos);
g_object_notify (G_OBJECT (entry), "secondary-icon-gicon");
g_object_notify (G_OBJECT (entry), "secondary-icon-storage-type");
}
+
+ if (GTK_WIDGET_MAPPED (entry))
+ gdk_window_show_unraised (icon_info->window);
}
gtk_entry_ensure_pixbuf (entry, icon_pos);
* #GtkWidget::drag-begin signal to set a different icon. Note that you
* have to use g_signal_connect_after() to ensure that your signal handler
* gets executed after the default handler.
+ *
+ * Since: 2.16
*/
void
gtk_entry_set_icon_drag_source (GtkEntry *entry,
*
* Returns: index of the icon which is the source of the current
* DND operation, or -1.
+ *
+ * Since: 2.16
*/
gint
gtk_entry_get_current_icon_drag_source (GtkEntry *entry)
event->keyval == GDK_KP_Enter ||
event->keyval == GDK_Return)
{
+ GtkTreeIter iter;
+ GtkTreeModel *model = NULL;
+ GtkTreeSelection *sel;
gboolean retval = TRUE;
_gtk_entry_reset_im_context (GTK_ENTRY (widget));
if (completion->priv->current_selected < matches)
{
- GtkTreeIter iter;
- GtkTreeModel *model = NULL;
- GtkTreeSelection *sel;
gboolean entry_set;
sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (completion->priv->tree_view));
}
else if (completion->priv->current_selected - matches >= 0)
{
- GtkTreePath *path;
-
- _gtk_entry_reset_im_context (GTK_ENTRY (widget));
-
- path = gtk_tree_path_new_from_indices (completion->priv->current_selected - matches, -1);
+ sel = gtk_tree_view_get_selection (GTK_TREE_VIEW (completion->priv->action_view));
+ if (gtk_tree_selection_get_selected (sel, &model, &iter))
+ {
+ GtkTreePath *path;
- g_signal_emit_by_name (completion, "action-activated",
- gtk_tree_path_get_indices (path)[0]);
- gtk_tree_path_free (path);
+ path = gtk_tree_path_new_from_indices (completion->priv->current_selected - matches, -1);
+ g_signal_emit_by_name (completion, "action-activated",
+ gtk_tree_path_get_indices (path)[0]);
+ gtk_tree_path_free (path);
+ }
+ else
+ retval = FALSE;
}
g_free (completion->priv->completion_prefix);