aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-07-11 20:31:01 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-07-11 20:31:01 +0800
commitd65595a4ba6e55cd0109fc0af1f3a5b4df88e51e (patch)
treebbe4a9cc7815915e02b23e8bbf00d7a70884071b
parent61dae461c456c8b4ed807bc576c23aa2ec89a74b (diff)
downloadgsoc2013-epiphany-d65595a4ba6e55cd0109fc0af1f3a5b4df88e51e.tar
gsoc2013-epiphany-d65595a4ba6e55cd0109fc0af1f3a5b4df88e51e.tar.gz
gsoc2013-epiphany-d65595a4ba6e55cd0109fc0af1f3a5b4df88e51e.tar.bz2
gsoc2013-epiphany-d65595a4ba6e55cd0109fc0af1f3a5b4df88e51e.tar.lz
gsoc2013-epiphany-d65595a4ba6e55cd0109fc0af1f3a5b4df88e51e.tar.xz
gsoc2013-epiphany-d65595a4ba6e55cd0109fc0af1f3a5b4df88e51e.tar.zst
gsoc2013-epiphany-d65595a4ba6e55cd0109fc0af1f3a5b4df88e51e.zip
Fix actions
2003-07-11 Marco Pesenti Gritti <marco@it.gnome.org> * lib/widgets/ephy-autocompletion-window.c: (move_selection), (ephy_autocompletion_window_key_press_hack), (ephy_autocompletion_window_hide): Fix actions * src/bookmarks/ephy-bookmarks-import.c: (parse_rdf_item): Actually use smartlink prop when importing
-rw-r--r--ChangeLog12
-rw-r--r--lib/widgets/ephy-autocompletion-window.c24
-rw-r--r--src/bookmarks/ephy-bookmarks-import.c5
3 files changed, 30 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 46466a34c..5c79cce40 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2003-07-11 Marco Pesenti Gritti <marco@it.gnome.org>
+
+ * lib/widgets/ephy-autocompletion-window.c: (move_selection),
+ (ephy_autocompletion_window_key_press_hack),
+ (ephy_autocompletion_window_hide):
+
+ Fix actions
+
+ * src/bookmarks/ephy-bookmarks-import.c: (parse_rdf_item):
+
+ Actually use smartlink prop when importing
+
2003-07-11 Lee Willis <lee@lee-and-claire.co.uk>
* src/bookmarks.ephy-bookmarks-export.c: (ephy_bookmarks_export_rdf):
diff --git a/lib/widgets/ephy-autocompletion-window.c b/lib/widgets/ephy-autocompletion-window.c
index a4a873610..1326fe7b5 100644
--- a/lib/widgets/ephy-autocompletion-window.c
+++ b/lib/widgets/ephy-autocompletion-window.c
@@ -57,6 +57,7 @@ struct _EphyAutocompletionWindowPrivate {
GtkTreeView *action_tree_view;
GtkTreeViewColumn *action_col1;
int sel_index;
+ gboolean action;
char *selected;
@@ -616,7 +617,7 @@ ephy_autocompletion_window_button_press_event_cb (GtkWidget *widget,
}
static void
-move_selection (EphyAutocompletionWindow *aw, int dir, gboolean *action)
+move_selection (EphyAutocompletionWindow *aw, int dir)
{
int new_index;
int n_compl, n_actions, n_items;
@@ -669,7 +670,7 @@ move_selection (EphyAutocompletionWindow *aw, int dir, gboolean *action)
path, NULL, FALSE, 0, 0);
gtk_tree_path_free (path);
- *action = TRUE;
+ aw->priv->action = TRUE;
}
else if (new_index <= n_compl)
{
@@ -686,7 +687,7 @@ move_selection (EphyAutocompletionWindow *aw, int dir, gboolean *action)
path, NULL, FALSE, 0, 0);
gtk_tree_path_free (path);
- *action = FALSE;
+ aw->priv->action = FALSE;
}
else
{
@@ -700,28 +701,27 @@ static gboolean
ephy_autocompletion_window_key_press_hack (EphyAutocompletionWindow *aw,
guint keyval)
{
- gboolean action = FALSE;
-
switch (keyval)
{
case GDK_Up:
- move_selection (aw, -1, &action);
+ move_selection (aw, -1);
break;
case GDK_Down:
- move_selection (aw, +1, &action);
+ move_selection (aw, +1);
break;
case GDK_Page_Down:
- move_selection (aw, +5, &action);
+ move_selection (aw, +5);
break;
case GDK_Page_Up:
- move_selection (aw, -5, &action);
+ move_selection (aw, -5);
break;
case GDK_Return:
case GDK_space:
if (aw->priv->selected)
{
g_signal_emit (aw, EphyAutocompletionWindowSignals
- [ACTIVATED], 0, aw->priv->selected, action);
+ [ACTIVATED], 0, aw->priv->selected,
+ aw->priv->action);
}
break;
}
@@ -735,7 +735,8 @@ ephy_autocompletion_window_key_press_hack (EphyAutocompletionWindow *aw,
if (aw->priv->selected)
{
g_signal_emit (aw, EphyAutocompletionWindowSignals
- [SELECTED], 0, aw->priv->selected, action);
+ [SELECTED], 0, aw->priv->selected,
+ aw->priv->action);
}
break;
default:
@@ -780,6 +781,7 @@ ephy_autocompletion_window_hide (EphyAutocompletionWindow *aw)
ephy_autocompletion_window_unselect (aw);
g_signal_emit (aw, EphyAutocompletionWindowSignals[EPHY_AUTOCOMPLETION_WINDOW_HIDDEN], 0);
aw->priv->sel_index = 0;
+ aw->priv->action = FALSE;
}
g_free (aw->priv->selected);
aw->priv->selected = NULL;
diff --git a/src/bookmarks/ephy-bookmarks-import.c b/src/bookmarks/ephy-bookmarks-import.c
index 31791fd81..3ebffe624 100644
--- a/src/bookmarks/ephy-bookmarks-import.c
+++ b/src/bookmarks/ephy-bookmarks-import.c
@@ -524,6 +524,11 @@ parse_rdf_item (EphyBookmarks *bookmarks,
{
parse_rdf_subjects (child, &subjects);
}
+ else if (xmlStrEqual (child->name, "smartlink"))
+ {
+ if (link) xmlFree (link);
+ link = xmlNodeGetContent (child);
+ }
child = child->next;
}