aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--src/bookmarks/ephy-bookmarks.h2
-rw-r--r--src/bookmarks/ephy-node-view.c25
-rw-r--r--src/ephy-window.c18
4 files changed, 49 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 399039286..37bd76c1f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2003-04-05 Marco Pesenti Gritti <marco@it.gnome.org>
+
+ * src/bookmarks/ephy-bookmarks.h:
+ * src/bookmarks/ephy-node-view.c: (drag_motion_cb), (drag_drop_cb),
+ (drag_data_received_cb):
+ * src/ephy-window.c: (ephy_window_show):
+
+ Have a decent size for popups that doesnt specify it.
+ Do not allow to drag on special topics.
+
2003-04-05 Christian Persch <chpe@stud.uni-saarland.de>
* src/ephy-favicon-action.c: (create_tool_item), (connect_proxy):
diff --git a/src/bookmarks/ephy-bookmarks.h b/src/bookmarks/ephy-bookmarks.h
index 4c521fa2d..e31831c6f 100644
--- a/src/bookmarks/ephy-bookmarks.h
+++ b/src/bookmarks/ephy-bookmarks.h
@@ -52,7 +52,7 @@ typedef enum
EPHY_BOOKMARKS_KEYWORD_ALL_PRIORITY,
EPHY_BOOKMARKS_KEYWORD_SPECIAL_PRIORITY,
EPHY_BOOKMARKS_KEYWORD_NORMAL_PRIORITY
-} EphBookmarksKeywordPriority;
+} EphyBookmarksKeywordPriority;
struct EphyBookmarks
{
diff --git a/src/bookmarks/ephy-node-view.c b/src/bookmarks/ephy-node-view.c
index 62184dd2e..d03de5a09 100644
--- a/src/bookmarks/ephy-node-view.c
+++ b/src/bookmarks/ephy-node-view.c
@@ -752,18 +752,34 @@ drag_motion_cb (GtkWidget *widget,
guint time,
EphyNodeView *view)
{
+ EphyNode *node;
GtkTreePath *path = NULL;
GtkTreeViewDropPosition pos;
+ gboolean res;
+ EphyBookmarksKeywordPriority priority;
g_signal_stop_emission_by_name (widget, "drag_motion");
- if (gtk_tree_view_get_dest_row_at_pos (GTK_TREE_VIEW (widget),
- x, y, &path, &pos))
+ res = gtk_tree_view_get_dest_row_at_pos (GTK_TREE_VIEW (widget),
+ x, y, &path, &pos);
+ if (!res) return TRUE;
+
+ node = get_node_from_path (view, path);
+
+ priority = ephy_node_get_property_int (node, EPHY_NODE_KEYWORD_PROP_PRIORITY);
+
+ if (priority != EPHY_BOOKMARKS_KEYWORD_ALL_PRIORITY &&
+ priority != EPHY_BOOKMARKS_KEYWORD_SPECIAL_PRIORITY)
+
{
gtk_tree_view_set_drag_dest_row (GTK_TREE_VIEW (widget), path,
GTK_TREE_VIEW_DROP_INTO_OR_AFTER);
gdk_drag_status (context, context->suggested_action, time);
}
+ else
+ {
+ gdk_drag_status (context, 0, time);
+ }
return TRUE;
}
@@ -778,6 +794,8 @@ drag_drop_cb (GtkWidget *widget,
{
GdkAtom target;
+ g_signal_stop_emission_by_name (widget, "drag_drop");
+
target = gtk_drag_dest_find_target (widget, context,
view->priv->drag_targets);
@@ -786,8 +804,6 @@ drag_drop_cb (GtkWidget *widget,
gtk_drag_get_data (widget, context, target, time);
}
- g_signal_stop_emission_by_name (widget, "drag_drop");
-
return TRUE;
}
@@ -822,6 +838,7 @@ drag_data_received_cb (GtkWidget *widget,
node, src_nodes);
g_list_free (src_nodes);
+
}
return TRUE;
diff --git a/src/ephy-window.c b/src/ephy-window.c
index e3a60f6a4..e5dfa26d4 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -938,11 +938,27 @@ ephy_window_show (GtkWidget *widget)
!(window->priv->chrome_mask & EMBED_CHROME_OPENASFULLSCREEN) &&
!GTK_WIDGET_VISIBLE (widget))
{
- ephy_state_add_window (GTK_WIDGET(window),
+ ephy_state_add_window (widget,
"main_window",
600, 500);
}
+ if ((window->priv->chrome_mask & EMBED_CHROME_OPENASPOPUP) &&
+ !GTK_WIDGET_VISIBLE (widget))
+ {
+ EphyTab *tab;
+ int width, height;
+
+ tab = ephy_window_get_active_tab (EPHY_WINDOW (window));
+ g_return_if_fail (tab != NULL);
+
+ ephy_tab_get_size (tab, &width, &height);
+ if (width == -1 && height == -1)
+ {
+ gtk_window_resize (GTK_WINDOW (window), 600, 500);
+ }
+ }
+
GTK_WIDGET_CLASS (parent_class)->show (widget);
}