aboutsummaryrefslogtreecommitdiffstats
path: root/lib/widgets
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@src.gnome.org>2003-08-30 01:17:42 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-08-30 01:17:42 +0800
commit07f0c900d6ade15ceb7ef418aa0ea7dabd1909c4 (patch)
treeffa40aa822515f159aa944d613b711bc921e6522 /lib/widgets
parent322e9bc21fbd27e9ee920b1908d04ba4302381df (diff)
downloadgsoc2013-epiphany-07f0c900d6ade15ceb7ef418aa0ea7dabd1909c4.tar
gsoc2013-epiphany-07f0c900d6ade15ceb7ef418aa0ea7dabd1909c4.tar.gz
gsoc2013-epiphany-07f0c900d6ade15ceb7ef418aa0ea7dabd1909c4.tar.bz2
gsoc2013-epiphany-07f0c900d6ade15ceb7ef418aa0ea7dabd1909c4.tar.lz
gsoc2013-epiphany-07f0c900d6ade15ceb7ef418aa0ea7dabd1909c4.tar.xz
gsoc2013-epiphany-07f0c900d6ade15ceb7ef418aa0ea7dabd1909c4.tar.zst
gsoc2013-epiphany-07f0c900d6ade15ceb7ef418aa0ea7dabd1909c4.zip
Part of gtk 2.3 port, changelog too long to paste it
Diffstat (limited to 'lib/widgets')
-rw-r--r--lib/widgets/ephy-arrow-toolbutton.c10
-rw-r--r--lib/widgets/ephy-arrow-toolbutton.h7
-rw-r--r--lib/widgets/ephy-location-entry.c8
-rw-r--r--lib/widgets/ephy-location-entry.h7
-rw-r--r--lib/widgets/ephy-node-view.c46
-rw-r--r--lib/widgets/ephy-zoom-action.c12
-rw-r--r--lib/widgets/ephy-zoom-action.h6
-rw-r--r--lib/widgets/ephy-zoom-control.c12
-rw-r--r--lib/widgets/ephy-zoom-control.h6
9 files changed, 53 insertions, 61 deletions
diff --git a/lib/widgets/ephy-arrow-toolbutton.c b/lib/widgets/ephy-arrow-toolbutton.c
index 36fd99847..e40237f5f 100644
--- a/lib/widgets/ephy-arrow-toolbutton.c
+++ b/lib/widgets/ephy-arrow-toolbutton.c
@@ -71,7 +71,7 @@ ephy_arrow_toolbutton_get_type (void)
(GInstanceInitFunc) ephy_arrow_toolbutton_init
};
- ephy_arrow_toolbutton_type = g_type_register_static (EGG_TYPE_TOOL_BUTTON,
+ ephy_arrow_toolbutton_type = g_type_register_static (GTK_TYPE_TOOL_BUTTON,
"EphyArrowToolButton",
&our_info, 0);
}
@@ -81,7 +81,7 @@ ephy_arrow_toolbutton_get_type (void)
static gboolean
-ephy_arrow_toolbutton_set_tooltip (EggToolItem *tool_item,
+ephy_arrow_toolbutton_set_tooltip (GtkToolItem *tool_item,
GtkTooltips *tooltips,
const char *tip_text,
const char *tip_private)
@@ -99,7 +99,7 @@ static void
ephy_arrow_toolbutton_class_init (EphyArrowToolButtonClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- EggToolItemClass *tool_item_class = EGG_TOOL_ITEM_CLASS (klass);
+ GtkToolItemClass *tool_item_class = GTK_TOOL_ITEM_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
@@ -204,11 +204,11 @@ ephy_arrow_toolbutton_init (EphyArrowToolButton *arrowtb)
arrowtb->priv = g_new (EphyArrowToolButtonPrivate, 1);
- egg_tool_item_set_homogeneous (EGG_TOOL_ITEM (arrowtb), FALSE);
+ gtk_tool_item_set_homogeneous (GTK_TOOL_ITEM (arrowtb), FALSE);
hbox = gtk_hbox_new (FALSE, 0);
gtk_widget_show (hbox);
- real_button = EGG_TOOL_BUTTON (arrowtb)->button;
+ real_button = GTK_BIN (arrowtb)->child;
g_object_ref (real_button);
gtk_container_remove (GTK_CONTAINER (arrowtb), real_button);
gtk_container_add (GTK_CONTAINER (hbox), real_button);
diff --git a/lib/widgets/ephy-arrow-toolbutton.h b/lib/widgets/ephy-arrow-toolbutton.h
index 7352d6c1a..f1452f585 100644
--- a/lib/widgets/ephy-arrow-toolbutton.h
+++ b/lib/widgets/ephy-arrow-toolbutton.h
@@ -21,8 +21,7 @@
#include <glib.h>
#include <gtk/gtkmenushell.h>
-
-#include "eggtoolbutton.h"
+#include <gtk/gtktoolbutton.h>
G_BEGIN_DECLS
@@ -39,13 +38,13 @@ typedef struct EphyArrowToolButtonPrivate EphyArrowToolButtonPrivate;
struct EphyArrowToolButton
{
- EggToolButton parent;
+ GtkToolButton parent;
EphyArrowToolButtonPrivate *priv;
};
struct EphyArrowToolButtonClass
{
- EggToolButtonClass parent_class;
+ GtkToolButtonClass parent_class;
void (*menu_activated) (EphyArrowToolButton *b);
};
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index f13c87e88..1d9d2172f 100644
--- a/lib/widgets/ephy-location-entry.c
+++ b/lib/widgets/ephy-location-entry.c
@@ -135,7 +135,7 @@ ephy_location_entry_get_type (void)
(GInstanceInitFunc) ephy_location_entry_init
};
- ephy_location_entry_type = g_type_register_static (EGG_TYPE_TOOL_ITEM,
+ ephy_location_entry_type = g_type_register_static (GTK_TYPE_TOOL_ITEM,
"EphyLocationEntry",
&our_info, 0);
}
@@ -144,7 +144,7 @@ ephy_location_entry_get_type (void)
}
static gboolean
-ephy_location_entry_set_tooltip (EggToolItem *tool_item,
+ephy_location_entry_set_tooltip (GtkToolItem *tool_item,
GtkTooltips *tooltips,
const char *tip_text,
const char *tip_private)
@@ -162,7 +162,7 @@ static void
ephy_location_entry_class_init (EphyLocationEntryClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- EggToolItemClass *tool_item_class = EGG_TOOL_ITEM_CLASS (klass);
+ GtkToolItemClass *tool_item_class = GTK_TOOL_ITEM_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
@@ -224,7 +224,7 @@ ephy_location_entry_init (EphyLocationEntry *w)
ephy_location_entry_construct_contents (w);
- egg_tool_item_set_expand (EGG_TOOL_ITEM (w), TRUE);
+ gtk_tool_item_set_expand (GTK_TOOL_ITEM (w), TRUE);
g_signal_connect (w->priv->entry,
"focus_out_event",
diff --git a/lib/widgets/ephy-location-entry.h b/lib/widgets/ephy-location-entry.h
index 44dea2608..8af364cd7 100644
--- a/lib/widgets/ephy-location-entry.h
+++ b/lib/widgets/ephy-location-entry.h
@@ -20,7 +20,8 @@
#ifndef EPHY_LOCATION_ENTRY_H
#define EPHY_LOCATION_ENTRY_H
-#include "eggtoolitem.h"
+#include <gtk/gtktoolitem.h>
+
#include "ephy-autocompletion.h"
/* object forward declarations */
@@ -45,7 +46,7 @@ typedef struct _EphyLocationEntryPrivate EphyLocationEntryPrivate;
struct _EphyLocationEntryClass
{
- EggToolItemClass parent_class;
+ GtkToolItemClass parent_class;
/* signals */
void (*activated) (EphyLocationEntry *w,
@@ -60,7 +61,7 @@ struct _EphyLocationEntryClass
/* Remember: fields are public read-only */
struct _EphyLocationEntry
{
- EggToolItem parent_object;
+ GtkToolItem parent_object;
EphyLocationEntryPrivate *priv;
};
diff --git a/lib/widgets/ephy-node-view.c b/lib/widgets/ephy-node-view.c
index 8b1f09e0c..19af1961a 100644
--- a/lib/widgets/ephy-node-view.c
+++ b/lib/widgets/ephy-node-view.c
@@ -22,11 +22,11 @@
#include <gtk/gtktreeviewcolumn.h>
#include <gtk/gtkcellrenderertext.h>
#include <gtk/gtkcellrendererpixbuf.h>
+#include <gtk/gtktreemodelfilter.h>
#include <gtk/gtkwindow.h>
#include <gdk/gdkkeysyms.h>
#include <libgnomevfs/gnome-vfs-uri.h>
-#include "eggtreemodelfilter.h"
#include "ephy-node-view.h"
#include "ephy-tree-model-sort.h"
#include "eggtreemultidnd.h"
@@ -236,8 +236,8 @@ get_node_from_path (EphyNodeView *view, GtkTreePath *path)
gtk_tree_model_get_iter (view->priv->sortmodel, &iter, path);
gtk_tree_model_sort_convert_iter_to_child_iter
(GTK_TREE_MODEL_SORT (view->priv->sortmodel), &iter2, &iter);
- egg_tree_model_filter_convert_iter_to_child_iter
- (EGG_TREE_MODEL_FILTER (view->priv->filtermodel), &iter, &iter2);
+ gtk_tree_model_filter_convert_iter_to_child_iter
+ (GTK_TREE_MODEL_FILTER (view->priv->filtermodel), &iter, &iter2);
node = ephy_tree_model_node_node_from_iter (view->priv->nodemodel, &iter);
return node;
@@ -591,8 +591,8 @@ ephy_node_view_row_activated_cb (GtkTreeView *treeview,
gtk_tree_model_get_iter (view->priv->sortmodel, &iter, path);
gtk_tree_model_sort_convert_iter_to_child_iter
(GTK_TREE_MODEL_SORT (view->priv->sortmodel), &iter2, &iter);
- egg_tree_model_filter_convert_iter_to_child_iter
- (EGG_TREE_MODEL_FILTER (view->priv->filtermodel), &iter, &iter2);
+ gtk_tree_model_filter_convert_iter_to_child_iter
+ (GTK_TREE_MODEL_FILTER (view->priv->filtermodel), &iter, &iter2);
node = ephy_tree_model_node_node_from_iter (view->priv->nodemodel, &iter);
@@ -957,9 +957,9 @@ ephy_node_view_construct (EphyNodeView *view)
view->priv->nodemodel = ephy_tree_model_node_new (view->priv->root,
view->priv->filter);
- view->priv->filtermodel = egg_tree_model_filter_new (GTK_TREE_MODEL (view->priv->nodemodel),
+ view->priv->filtermodel = gtk_tree_model_filter_new (GTK_TREE_MODEL (view->priv->nodemodel),
NULL);
- egg_tree_model_filter_set_visible_column (EGG_TREE_MODEL_FILTER (view->priv->filtermodel),
+ gtk_tree_model_filter_set_visible_column (GTK_TREE_MODEL_FILTER (view->priv->filtermodel),
EPHY_TREE_MODEL_NODE_COL_VISIBLE);
view->priv->sortmodel = ephy_tree_model_sort_new (view->priv->filtermodel);
gtk_tree_view_set_model (GTK_TREE_VIEW (view), GTK_TREE_MODEL (view->priv->sortmodel));
@@ -1026,8 +1026,8 @@ cell_renderer_edited (GtkCellRendererText *cell,
gtk_tree_model_get_iter (view->priv->sortmodel, &iter, path);
gtk_tree_model_sort_convert_iter_to_child_iter
(GTK_TREE_MODEL_SORT (view->priv->sortmodel), &iter2, &iter);
- egg_tree_model_filter_convert_iter_to_child_iter
- (EGG_TREE_MODEL_FILTER (view->priv->filtermodel), &iter, &iter2);
+ gtk_tree_model_filter_convert_iter_to_child_iter
+ (GTK_TREE_MODEL_FILTER (view->priv->filtermodel), &iter, &iter2);
node = ephy_tree_model_node_node_from_iter (view->priv->nodemodel, &iter);
g_value_init (&value, G_TYPE_STRING);
@@ -1317,24 +1317,13 @@ static void
get_selection (GtkTreeModel *model,
GtkTreePath *path,
GtkTreeIter *iter,
- void **data)
+ gpointer *data)
{
- GtkTreeModelSort *sortmodel = GTK_TREE_MODEL_SORT (model);
- EggTreeModelFilter *filtermodel = EGG_TREE_MODEL_FILTER (sortmodel->child_model);
- EphyTreeModelNode *nodemodel = EPHY_TREE_MODEL_NODE (filtermodel->child_model);
- GList **list = (GList **) data;
- GtkTreeIter *iter2 = gtk_tree_iter_copy (iter);
- GtkTreeIter iter3;
- GtkTreeIter iter4;
+ GList **list = data[0];
+ EphyNodeView *view = EPHY_NODE_VIEW (data);
EphyNode *node;
- gtk_tree_model_sort_convert_iter_to_child_iter (GTK_TREE_MODEL_SORT (model),
- &iter3, iter2);
- egg_tree_model_filter_convert_iter_to_child_iter (filtermodel, &iter4, &iter3);
-
- node = ephy_tree_model_node_node_from_iter (nodemodel, &iter4);
-
- gtk_tree_iter_free (iter2);
+ node = get_node_from_path (view, path);
*list = g_list_prepend (*list, node);
}
@@ -1344,13 +1333,16 @@ ephy_node_view_get_selection (EphyNodeView *view)
{
GList *list = NULL;
GtkTreeSelection *selection;
+ gpointer data[2];
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (view));
+ data[0] = &list;
+ data[1] = view;
gtk_tree_selection_selected_foreach
(selection,
(GtkTreeSelectionForeachFunc) get_selection,
- (gpointer) &list);
+ (gpointer) data);
return list;
}
@@ -1375,7 +1367,7 @@ ephy_node_view_remove (EphyNodeView *view)
node = g_list_first (list)->data;
ephy_tree_model_node_iter_from_node (EPHY_TREE_MODEL_NODE (view->priv->nodemodel),
node, &iter);
- egg_tree_model_filter_convert_child_iter_to_iter (EGG_TREE_MODEL_FILTER (view->priv->filtermodel),
+ gtk_tree_model_filter_convert_child_iter_to_iter (GTK_TREE_MODEL_FILTER (view->priv->filtermodel),
&iter2, &iter);
gtk_tree_model_sort_convert_child_iter_to_iter (GTK_TREE_MODEL_SORT (view->priv->sortmodel),
&iter, &iter2);
@@ -1437,7 +1429,7 @@ ephy_node_view_select_node (EphyNodeView *view,
g_value_unset (&val);
if (visible == FALSE) return;
- egg_tree_model_filter_convert_child_iter_to_iter (EGG_TREE_MODEL_FILTER (view->priv->filtermodel),
+ gtk_tree_model_filter_convert_child_iter_to_iter (GTK_TREE_MODEL_FILTER (view->priv->filtermodel),
&iter2, &iter);
gtk_tree_model_sort_convert_child_iter_to_iter (GTK_TREE_MODEL_SORT (view->priv->sortmodel),
&iter, &iter2);
diff --git a/lib/widgets/ephy-zoom-action.c b/lib/widgets/ephy-zoom-action.c
index 248d6c74e..c952a1a08 100644
--- a/lib/widgets/ephy-zoom-action.c
+++ b/lib/widgets/ephy-zoom-action.c
@@ -73,7 +73,7 @@ ephy_zoom_action_get_type (void)
(GInstanceInitFunc) ephy_zoom_action_init,
};
- ephy_zoom_action_type = g_type_register_static (EGG_TYPE_ACTION,
+ ephy_zoom_action_type = g_type_register_static (GTK_TYPE_ACTION,
"EphyZoomAction",
&our_info, 0);
}
@@ -92,7 +92,7 @@ zoom_to_level_cb (EphyZoomControl *control,
}
static void
-sync_zoom_cb (EggAction *action, GParamSpec *pspec, GtkWidget *proxy)
+sync_zoom_cb (GtkAction *action, GParamSpec *pspec, GtkWidget *proxy)
{
EphyZoomAction *zoom_action = EPHY_ZOOM_ACTION (action);
@@ -100,14 +100,14 @@ sync_zoom_cb (EggAction *action, GParamSpec *pspec, GtkWidget *proxy)
}
static void
-connect_proxy (EggAction *action, GtkWidget *proxy)
+connect_proxy (GtkAction *action, GtkWidget *proxy)
{
g_signal_connect_object (action, "notify::zoom",
G_CALLBACK (sync_zoom_cb), proxy, 0);
g_signal_connect (proxy, "zoom_to_level", GTK_SIGNAL_FUNC(zoom_to_level_cb), action);
- EGG_ACTION_CLASS (parent_class)->connect_proxy (action, proxy);
+ GTK_ACTION_CLASS (parent_class)->connect_proxy (action, proxy);
}
static void
@@ -150,7 +150,7 @@ ephy_zoom_action_get_property (GObject *object,
static void
ephy_zoom_action_class_init (EphyZoomActionClass *class)
{
- EggActionClass *action_class;
+ GtkActionClass *action_class;
GObjectClass *object_class = G_OBJECT_CLASS (class);
object_class->set_property = ephy_zoom_action_set_property;
@@ -158,7 +158,7 @@ ephy_zoom_action_class_init (EphyZoomActionClass *class)
object_class->finalize = ephy_zoom_action_finalize;
parent_class = g_type_class_peek_parent (class);
- action_class = EGG_ACTION_CLASS (class);
+ action_class = GTK_ACTION_CLASS (class);
action_class->toolbar_item_type = EPHY_TYPE_ZOOM_CONTROL;
action_class->connect_proxy = connect_proxy;
diff --git a/lib/widgets/ephy-zoom-action.h b/lib/widgets/ephy-zoom-action.h
index 04e2d4e9b..3bced02f2 100644
--- a/lib/widgets/ephy-zoom-action.h
+++ b/lib/widgets/ephy-zoom-action.h
@@ -20,7 +20,7 @@
#ifndef EPHY_ZOOM_ACTION_H
#define EPHY_ZOOM_ACTION_H
-#include <egg-action.h>
+#include <gtk/gtkaction.h>
G_BEGIN_DECLS
@@ -37,14 +37,14 @@ typedef struct _EphyZoomActionPrivate EphyZoomActionPrivate;
struct _EphyZoomAction
{
- EggAction parent;
+ GtkAction parent;
EphyZoomActionPrivate *priv;
};
struct _EphyZoomActionClass
{
- EggActionClass parent_class;
+ GtkActionClass parent_class;
void (* zoom_to_level) (EphyZoomAction *action, float level);
};
diff --git a/lib/widgets/ephy-zoom-control.c b/lib/widgets/ephy-zoom-control.c
index ccd193a7d..91c611012 100644
--- a/lib/widgets/ephy-zoom-control.c
+++ b/lib/widgets/ephy-zoom-control.c
@@ -85,7 +85,7 @@ ephy_zoom_control_get_type (void)
(GInstanceInitFunc) ephy_zoom_control_init,
};
- ephy_zoom_control_type = g_type_register_static (EGG_TYPE_TOOL_ITEM,
+ ephy_zoom_control_type = g_type_register_static (GTK_TYPE_TOOL_ITEM,
"EphyZoomControl",
&our_info, 0);
}
@@ -116,7 +116,7 @@ proxy_menu_activate_cb (GtkMenuItem *menu_item, gpointer data)
}
static gboolean
-ephy_zoom_control_create_menu_proxy (EggToolItem *item)
+ephy_zoom_control_create_menu_proxy (GtkToolItem *item)
{
EphyZoomControl *control = EPHY_ZOOM_CONTROL (item);
EphyZoomControlPrivate *p = control->priv;
@@ -150,7 +150,7 @@ ephy_zoom_control_create_menu_proxy (EggToolItem *item)
g_object_ref (menu_item);
gtk_object_sink (GTK_OBJECT (menu_item));
- egg_tool_item_set_proxy_menu_item (item, MENU_ID, menu_item);
+ gtk_tool_item_set_proxy_menu_item (item, MENU_ID, menu_item);
g_object_unref (menu_item);
return TRUE;
@@ -272,7 +272,7 @@ ephy_zoom_control_get_property (GObject *object,
}
static gboolean
-ephy_zoom_control_set_tooltip (EggToolItem *tool_item,
+ephy_zoom_control_set_tooltip (GtkToolItem *tool_item,
GtkTooltips *tooltips,
const char *tip_text,
const char *tip_private)
@@ -290,12 +290,12 @@ static void
ephy_zoom_control_class_init (EphyZoomControlClass *klass)
{
GObjectClass *object_class;
- EggToolItemClass *tool_item_class;
+ GtkToolItemClass *tool_item_class;
parent_class = g_type_class_peek_parent (klass);
object_class = (GObjectClass *)klass;
- tool_item_class = (EggToolItemClass *)klass;
+ tool_item_class = (GtkToolItemClass *)klass;
object_class->set_property = ephy_zoom_control_set_property;
object_class->get_property = ephy_zoom_control_get_property;
diff --git a/lib/widgets/ephy-zoom-control.h b/lib/widgets/ephy-zoom-control.h
index 8b0fa0e46..a451bbd0d 100644
--- a/lib/widgets/ephy-zoom-control.h
+++ b/lib/widgets/ephy-zoom-control.h
@@ -19,7 +19,7 @@
#ifndef EPHY_ZOOM_CONTROL_H
#define EPHY_ZOOM_CONTROL_H
-#include "eggtoolitem.h"
+#include <gtk/gtktoolitem.h>
G_BEGIN_DECLS
@@ -42,7 +42,7 @@ typedef struct _EphyZoomControlPrivate EphyZoomControlPrivate;
struct _EphyZoomControlClass
{
- EggToolItemClass parent_class;
+ GtkToolItemClass parent_class;
/* signals */
void (*zoom_to_level) (EphyZoomControl *control, float level);
@@ -50,7 +50,7 @@ struct _EphyZoomControlClass
struct _EphyZoomControl
{
- EggToolItem parent_object;
+ GtkToolItem parent_object;
EphyZoomControlPrivate *priv;
};