aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-02-23 10:49:10 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-02-23 10:49:10 +0800
commit5a5bd9910fde9c324be25cc254af31fdab24037e (patch)
treecec39d4d80a1202ec8403cbbbf0e1d0ec2201b5e
parentdb0e48d09abcc0134efac3ce2717c42a216b18e3 (diff)
downloadgsoc2013-epiphany-5a5bd9910fde9c324be25cc254af31fdab24037e.tar.gz
gsoc2013-epiphany-5a5bd9910fde9c324be25cc254af31fdab24037e.tar.zst
gsoc2013-epiphany-5a5bd9910fde9c324be25cc254af31fdab24037e.zip
Revert unwanted checkin
2003-02-23 Marco Pesenti Gritti <marco@it.gnome.org> * lib/widgets/ephy-editable-toolbar.c: (drag_data_delete_cb), (drag_data_get_cb), (do_merge), (editor_close_cb), (button_press_cb), (ephy_editable_toolbar_edit): * src/ephy-window.c: (add_widget): Revert unwanted checkin
-rw-r--r--ChangeLog9
-rwxr-xr-xlib/widgets/ephy-editable-toolbar.c92
-rw-r--r--src/ephy-window.c5
3 files changed, 16 insertions, 90 deletions
diff --git a/ChangeLog b/ChangeLog
index be33ad480..ebcf81d45 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2003-02-23 Marco Pesenti Gritti <marco@it.gnome.org>
+ * lib/widgets/ephy-editable-toolbar.c: (drag_data_delete_cb),
+ (drag_data_get_cb), (do_merge), (editor_close_cb),
+ (button_press_cb), (ephy_editable_toolbar_edit):
+ * src/ephy-window.c: (add_widget):
+
+ Revert unwanted checkin
+
+2003-02-23 Marco Pesenti Gritti <marco@it.gnome.org>
+
* lib/widgets/ephy-autocompletion-window.c:
(ephy_autocompletion_window_class_init),
(ephy_autocompletion_window_key_press_hack):
diff --git a/lib/widgets/ephy-editable-toolbar.c b/lib/widgets/ephy-editable-toolbar.c
index 9861f4bf4..eddb39bd9 100755
--- a/lib/widgets/ephy-editable-toolbar.c
+++ b/lib/widgets/ephy-editable-toolbar.c
@@ -258,22 +258,8 @@ drag_data_delete_cb (GtkWidget *widget,
g_return_if_fail (IS_EPHY_EDITABLE_TOOLBAR (etoolbar));
node = (EphyToolbarsItem *)g_object_get_data (G_OBJECT (widget), "item_data");
- if (node)
- {
- ephy_toolbars_group_remove_item (etoolbar->priv->group, node);
- }
- else
- {
- EphyToolbarsToolbar *toolbar;
- GtkWidget *child = GTK_BIN (widget)->child;
-
- g_return_if_fail (child != NULL);
- toolbar = (EphyToolbarsToolbar *)g_object_get_data
- (G_OBJECT (child), "toolbar_data");
- g_return_if_fail (toolbar != NULL);
-
- ephy_toolbars_group_remove_toolbar (etoolbar->priv->group, toolbar);
- }
+ g_return_if_fail (node != NULL);
+ ephy_toolbars_group_remove_item (etoolbar->priv->group, node);
etoolbar->priv->toolbars_dirty = TRUE;
queue_ui_update (etoolbar);
@@ -293,7 +279,7 @@ drag_data_get_cb (GtkWidget *widget,
g_return_if_fail (IS_EPHY_EDITABLE_TOOLBAR (etoolbar));
action = EGG_ACTION (g_object_get_data (G_OBJECT (widget), "egg-action"));
- target = action ? action->name : "Toolbar";
+ target = action->name;
LOG ("Drag data get %s", action->name);
@@ -366,49 +352,6 @@ disconnect_item_drag_source (EphyToolbarsItem *item, EphyEditableToolbar *etoolb
}
static void
-connect_toolbar_drag_source (EphyToolbarsToolbar *toolbar, EphyEditableToolbar *etoolbar)
-{
- GtkWidget *widget;
-
- g_return_if_fail (IS_EPHY_EDITABLE_TOOLBAR (etoolbar));
- g_return_if_fail (toolbar != NULL);
-
- widget = get_item_widget (etoolbar, toolbar);
-
- if (!g_object_get_data (G_OBJECT (widget), "drag_source_set"))
- {
- g_object_set_data (G_OBJECT (widget), "drag_source_set",
- GINT_TO_POINTER (TRUE));
- g_signal_connect (widget->parent, "drag_data_get",
- G_CALLBACK (drag_data_get_cb),
- etoolbar);
- g_signal_connect (widget->parent, "drag_data_delete",
- G_CALLBACK (drag_data_delete_cb),
- etoolbar);
- }
-}
-
-static void
-disconnect_toolbar_drag_source (EphyToolbarsToolbar *toolbar, EphyEditableToolbar *etoolbar)
-{
- GtkWidget *widget;
-
- g_return_if_fail (IS_EPHY_EDITABLE_TOOLBAR (etoolbar));
- g_return_if_fail (toolbar != NULL);
-
- widget = get_item_widget (etoolbar, toolbar);
-
- if (g_object_get_data (G_OBJECT (widget), "drag_source_set"))
- {
- g_object_set_data (G_OBJECT (widget), "drag_source_set",
- GINT_TO_POINTER (FALSE));
- g_signal_handlers_disconnect_by_func (widget->parent,
- G_CALLBACK (drag_data_delete_cb),
- etoolbar);
- }
-}
-
-static void
setup_toolbar (EphyToolbarsToolbar *toolbar, EphyEditableToolbar *etoolbar)
{
GtkWidget *widget;
@@ -527,9 +470,6 @@ do_merge (EphyEditableToolbar *t)
ephy_toolbars_group_foreach_item (t->priv->group,
(EphyToolbarsGroupForeachItemFunc)
connect_item_drag_source, t);
- ephy_toolbars_group_foreach_toolbar (t->priv->group,
- (EphyToolbarsGroupForeachToolbarFunc)
- connect_toolbar_drag_source, t);
}
ephy_toolbars_group_foreach_toolbar (t->priv->group,
@@ -793,10 +733,6 @@ editor_close_cb (GtkWidget *button, EphyEditableToolbar *etoolbar)
(EphyToolbarsGroupForeachItemFunc)
disconnect_item_drag_source,
etoolbar);
- ephy_toolbars_group_foreach_toolbar (etoolbar->priv->group,
- (EphyToolbarsGroupForeachToolbarFunc)
- disconnect_toolbar_drag_source,
- etoolbar);
hide_editor (etoolbar);
}
@@ -1039,29 +975,19 @@ button_press_cb (GtkWidget *w,
EphyEditableToolbar *etoolbar)
{
GtkWidget *widget;
- GtkWidget *drag_widget;
- GtkWidget *child;
+ GtkWidget *toolitem;
g_return_val_if_fail (IS_EPHY_EDITABLE_TOOLBAR (etoolbar), FALSE);
widget = gtk_get_event_widget (event);
- child = GTK_BIN (widget)->child;
-
- if (EGG_IS_TOOLBAR (child))
- {
- drag_widget = widget;
- }
- else
- {
- drag_widget = gtk_widget_get_ancestor (widget, EGG_TYPE_TOOL_ITEM);
- }
+ toolitem = gtk_widget_get_ancestor (widget, EGG_TYPE_TOOL_ITEM);
- if (drag_widget == NULL) return FALSE;
+ if (toolitem == NULL) return FALSE;
switch (event->type)
{
case GDK_BUTTON_PRESS:
- gtk_drag_begin (drag_widget,
+ gtk_drag_begin (toolitem,
gtk_target_list_new (source_drag_types, 1),
GDK_ACTION_MOVE, 1, event);
return TRUE;
@@ -1112,10 +1038,6 @@ ephy_editable_toolbar_edit (EphyEditableToolbar *etoolbar)
ephy_toolbars_group_foreach_item (etoolbar->priv->group,
(EphyToolbarsGroupForeachItemFunc)
connect_item_drag_source, etoolbar);
- ephy_toolbars_group_foreach_toolbar (etoolbar->priv->group,
- (EphyToolbarsGroupForeachToolbarFunc)
- connect_toolbar_drag_source,
- etoolbar);
ephy_toolbars_group_foreach_item (etoolbar->priv->group,
(EphyToolbarsGroupForeachItemFunc)
set_action_sensitive, etoolbar);
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 11ebc7d15..a1d29a28b 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -421,11 +421,6 @@ add_widget (EggMenuMerge *merge, GtkWidget *widget, EphyWindow *window)
}
else
{
- GtkWidget *event_box;
-
- event_box = gtk_event_box_new ();
- gtk_container_add (GTK_CONTAINER (event_box), widget);
- widget = event_box;
window->priv->toolbars = g_list_append
(window->priv->toolbars, widget);
}