aboutsummaryrefslogtreecommitdiffstats
path: root/lib/widgets
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2004-01-23 03:23:06 +0800
committerChris Lahey <clahey@src.gnome.org>2004-01-23 03:23:06 +0800
commit8205e18cb651de99de58b7ea5779bc3fbaea69b5 (patch)
tree175904ff2446561fcbf509e06f977c1510802569 /lib/widgets
parent416aef90dd0cc909929d6a7357107158cdf138f5 (diff)
downloadgsoc2013-epiphany-8205e18cb651de99de58b7ea5779bc3fbaea69b5.tar
gsoc2013-epiphany-8205e18cb651de99de58b7ea5779bc3fbaea69b5.tar.gz
gsoc2013-epiphany-8205e18cb651de99de58b7ea5779bc3fbaea69b5.tar.bz2
gsoc2013-epiphany-8205e18cb651de99de58b7ea5779bc3fbaea69b5.tar.lz
gsoc2013-epiphany-8205e18cb651de99de58b7ea5779bc3fbaea69b5.tar.xz
gsoc2013-epiphany-8205e18cb651de99de58b7ea5779bc3fbaea69b5.tar.zst
gsoc2013-epiphany-8205e18cb651de99de58b7ea5779bc3fbaea69b5.zip
New function to get temp directory and moved ephy_shell_delete_on_exit to
2004-01-22 Christopher James Lahey <clahey@ximian.com> * lib/ephy-file-helpers.c, lib/ephy-file-helpers.h (ephy_file_tmp_directory, ephy_file_delete_on_exit): New function to get temp directory and moved ephy_shell_delete_on_exit to here. * lib/widgets/ephy-location-entry.c: Changed how this goes about showing itself when hidden and activated. * src/ephy-shell.c, src/ephy-shell.h (ephy_shell_delete_on_exit): Moved to ephy_file_delete_on_exit. * src/window-commands.c: Changed ephy_shell_delete_on_exit to ephy_file_delete_on_exit. Used ephy_file_tmp_directory to save source files for viewing in a directory that isn't world readable.
Diffstat (limited to 'lib/widgets')
-rw-r--r--lib/widgets/ephy-location-entry.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index b991c6065..8d0a95bf1 100644
--- a/lib/widgets/ephy-location-entry.c
+++ b/lib/widgets/ephy-location-entry.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright (C) 2002 Ricardo Fernández Pascual
* Copyright (C) 2003 Marco Pesenti Gritti
@@ -40,7 +41,7 @@ struct _EphyLocationEntryPrivate
GtkWidget *entry;
char *before_completion;
gboolean user_changed;
- gboolean activation_mode;
+ GtkWidget *shown_widget;
guint text_col;
guint action_col;
@@ -153,15 +154,10 @@ ephy_location_entry_class_init (EphyLocationEntryClass *klass)
static void
ephy_location_entry_activation_finished (EphyLocationEntry *entry)
{
- if (entry->priv->activation_mode)
+ if (entry->priv->shown_widget)
{
- GtkWidget *toolbar;
-
- entry->priv->activation_mode = FALSE;
-
- toolbar = gtk_widget_get_ancestor (GTK_WIDGET (entry),
- GTK_TYPE_TOOLBAR);
- gtk_widget_hide (toolbar);
+ gtk_widget_hide (entry->priv->shown_widget);
+ entry->priv->shown_widget = NULL;
}
}
@@ -309,7 +305,7 @@ ephy_location_entry_init (EphyLocationEntry *le)
le->priv = p;
p->user_changed = TRUE;
- p->activation_mode = FALSE;
+ p->shown_widget = NULL;
ephy_location_entry_construct_contents (le);
@@ -407,15 +403,16 @@ ephy_location_entry_get_location (EphyLocationEntry *le)
void
ephy_location_entry_activate (EphyLocationEntry *le)
{
- GtkWidget *toplevel, *toolbar;
-
- toolbar = gtk_widget_get_ancestor (GTK_WIDGET (le), GTK_TYPE_TOOLBAR);
+ GtkWidget *toplevel, *widget;
- if (!GTK_WIDGET_VISIBLE (toolbar))
+ for (widget = GTK_WIDGET (le); widget != NULL; widget = widget->parent)
{
- le->priv->activation_mode = TRUE;
-
- gtk_widget_show (toolbar);
+ if (!GTK_WIDGET_VISIBLE (widget))
+ {
+ le->priv->shown_widget = widget;
+ gtk_widget_show (le->priv->shown_widget);
+ break;
+ }
}
toplevel = gtk_widget_get_toplevel (le->priv->entry);