diff options
author | Jon Trowbridge <trow@ximian.com> | 2001-07-21 12:46:58 +0800 |
---|---|---|
committer | Jon Trowbridge <trow@src.gnome.org> | 2001-07-21 12:46:58 +0800 |
commit | efb34b1073ffa79827e9a2b2f3d1f04f8ef0a9f3 (patch) | |
tree | 367d6701b0cf56f767078bd55488b96530d641da /widgets | |
parent | a5e0375b3d7c56d2be4f7ca8cfd7c9c3600fa8a7 (diff) | |
download | gsoc2013-evolution-efb34b1073ffa79827e9a2b2f3d1f04f8ef0a9f3.tar.gz gsoc2013-evolution-efb34b1073ffa79827e9a2b2f3d1f04f8ef0a9f3.tar.zst gsoc2013-evolution-efb34b1073ffa79827e9a2b2f3d1f04f8ef0a9f3.zip |
Change window policy to allow the completion window to shrink when the
2001-07-20 Jon Trowbridge <trow@ximian.com>
* gal/e-text/e-entry.c (e_entry_enable_completion_full): Change
window policy to allow the completion window to shrink when the
number of options decreases.
* gal/e-text/e-completion-view.c (e_completion_view_construct):
Removed some obsolete code.
svn path=/trunk/; revision=11292
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/text/e-completion-view.c | 18 | ||||
-rw-r--r-- | widgets/text/e-entry.c | 2 |
2 files changed, 9 insertions, 11 deletions
diff --git a/widgets/text/e-completion-view.c b/widgets/text/e-completion-view.c index 0ff5cddc79..fe38e1fe0f 100644 --- a/widgets/text/e-completion-view.c +++ b/widgets/text/e-completion-view.c @@ -690,16 +690,9 @@ e_completion_view_construct (ECompletionView *cv, ECompletion *completion) e_scroll_frame_set_scrollbar_spacing (E_SCROLL_FRAME (cv->table), 0); e_scroll_frame_set_policy (E_SCROLL_FRAME (cv->table), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); -#if 0 - frame = gtk_frame_new (NULL); - - gtk_container_add (GTK_CONTAINER (cv), frame); - gtk_container_add (GTK_CONTAINER (frame), cv->table); - gtk_widget_show_all (frame); -#else gtk_container_add (GTK_CONTAINER (cv), cv->table); gtk_widget_show_all (cv->table); -#endif + gtk_signal_connect (GTK_OBJECT (e_completion_view_table (cv)), "click", GTK_SIGNAL_FUNC (table_click_cb), @@ -771,7 +764,7 @@ void e_completion_view_set_width (ECompletionView *cv, gint width) { GtkWidget *w; - gint y, r, dummy, line_height; + gint y, r, dummy, line_height, final_height; double drop_room, lines; g_return_if_fail (cv != NULL); @@ -811,7 +804,12 @@ e_completion_view_set_width (ECompletionView *cv, gint width) lines = MIN (lines, drop_room); /* We reduce the total height by a bit; in practice, this seems to work out well. */ - gtk_widget_set_usize (w, width, (gint) floor (line_height * (0.5 + (float)lines) * 0.97)); + final_height = (gint) floor (line_height * (0.5 + (float)lines) * 0.97); + //while (w->parent) + //w = w->parent; + gtk_widget_set_usize (w, width, final_height); + + g_message ("usize: %d %d", width, final_height); } void diff --git a/widgets/text/e-entry.c b/widgets/text/e-entry.c index 648f8603ba..106cd70f73 100644 --- a/widgets/text/e-entry.c +++ b/widgets/text/e-entry.c @@ -782,7 +782,7 @@ e_entry_enable_completion_full (EEntry *entry, ECompletion *completion, gint del gtk_object_ref (GTK_OBJECT (entry->priv->completion_view_popup)); gtk_object_sink (GTK_OBJECT (entry->priv->completion_view_popup)); - gtk_window_set_policy (GTK_WINDOW (entry->priv->completion_view_popup), FALSE, TRUE, FALSE); + gtk_window_set_policy (GTK_WINDOW (entry->priv->completion_view_popup), TRUE, TRUE, TRUE); gtk_container_add (GTK_CONTAINER (entry->priv->completion_view_popup), entry->priv->completion_view); gtk_widget_show (entry->priv->completion_view); |