aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-05-03 19:04:23 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-05-03 19:04:23 +0800
commite6ca8c61b8e17f5774d7a4ccd249d40d99712a31 (patch)
tree088e28d115492bd82ccd2192b92c5554bb3ab546
parentb31b537149199df4562bc482dd7fff28f94c7494 (diff)
downloadgsoc2013-epiphany-e6ca8c61b8e17f5774d7a4ccd249d40d99712a31.tar
gsoc2013-epiphany-e6ca8c61b8e17f5774d7a4ccd249d40d99712a31.tar.gz
gsoc2013-epiphany-e6ca8c61b8e17f5774d7a4ccd249d40d99712a31.tar.bz2
gsoc2013-epiphany-e6ca8c61b8e17f5774d7a4ccd249d40d99712a31.tar.lz
gsoc2013-epiphany-e6ca8c61b8e17f5774d7a4ccd249d40d99712a31.tar.xz
gsoc2013-epiphany-e6ca8c61b8e17f5774d7a4ccd249d40d99712a31.tar.zst
gsoc2013-epiphany-e6ca8c61b8e17f5774d7a4ccd249d40d99712a31.zip
Update for the release.
2003-05-03 Marco Pesenti Gritti <marco@it.gnome.org> * NEWS: * configure.in: Update for the release. * lib/egg/egg-editable-toolbar.c: * lib/egg/egg-editable-toolbar.h: * lib/egg/egg-toolbar-editor.c: Update.
-rw-r--r--ChangeLog13
-rw-r--r--NEWS78
-rw-r--r--configure.in2
-rwxr-xr-xlib/egg/egg-editable-toolbar.c154
-rwxr-xr-xlib/egg/egg-editable-toolbar.h4
-rwxr-xr-xlib/egg/egg-toolbar-editor.c38
6 files changed, 275 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index d25d44a4d..72ad92e9c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2003-05-03 Marco Pesenti Gritti <marco@it.gnome.org>
+
+ * NEWS:
+ * configure.in:
+
+ Update for the release.
+
+ * lib/egg/egg-editable-toolbar.c:
+ * lib/egg/egg-editable-toolbar.h:
+ * lib/egg/egg-toolbar-editor.c:
+
+ Update.
+
2003-05-02 Xan Lopez <xan@masilla.org>
* data/glade/epiphany.glade:
diff --git a/NEWS b/NEWS
index 980a3fe8b..900eb19ab 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,82 @@
==============
+Epiphany 0.6.0
+==============
+
+Code changes
+
+ * Abstract implementation of EphyNodeView and EphyNodeTreeModel,
+ so they can be shared by history and bookmarks (Marco, Jorn Baayen)
+ * Rewrite toolbar editor: more flexible model, do not use xml to build
+ toolbars internally but EggAction directly (Marco)
+ * EphyDnd, EphyShell, Session cleanups (Christian Persch)
+
+Interface improvements
+
+ * Update smart bookmarks explanation (Marco)
+ * Remove "Epiphany" from desktop files (Marco)
+ * Always show tab bar if the user choose to default to tabs (Frank Belew)
+ * Add Help menu to the bookmarks editor (David Bordoley)
+ * All bookmarks menu on the bookmarks toolbar (Marco)
+ * Change the start page uri to home: (Marco)
+ * Not categorized special topic (Marco)
+ * Ever open tab as last on File->New tab and similars (Marco)
+ * Hidden pref for middle click open url, it can be confusing (Marco)
+ * "Intelligent" selection when an item is removed
+ for history and bookmarks. (Xan Lopez)
+ * Rework the design of the history dialog, not completed,
+ but it's already more usable (Marco, Dave Bordoley)
+ * Fix Pause/Resume buttons of the downloader (Xan Lopez)
+ * Open view source next to the current tab (Xan Lopez)
+ * Update View, Zoom, Tabs main menu bar items sensitivity according
+ to the state (Marco)
+ * Default bookmarks toolbar. Do not allow to drag items to the
+ other toolbars because it can be confusing. Accessible and more visible
+ way to add bookmarks to the toolbar, in addition to drag and drop (Marco)
+ * Add tooltips to all the history and bookmarks menus (Dave Bordoley)
+ * Respect user selected font sizes in the home page (Xan Lopez)
+ * Add a down arrow to topics in bookmarks toolbars (Dave Bordoley)
+ * Save page content by default (Christian Persch)
+ * Make new bookmark dialog transient instead of modal (Dave Bordoley)
+ * Use epiphany logo in the about window (Xan Lopez)
+ * Add and help button to toolbar editor (Dave Bordoley)
+ * Allow to resize the two views in bookmarks editor and history using
+ a pane (Dave Bordoley)
+ * Save the position of windows on the screen (Dave Bordoley)
+ * Consistent use of the term "Bookmarks Bar" in the code, ui and schema.
+ (Dave Bordoley)
+ * New default toolbar layout (Dave Bordoley)
+ * In the history and bookmarks view pack the icon in the same
+ column of the title (Marco)
+ * Respect View menu toggles also in fullscreen (Lee Willis)
+
+Bugfixes
+ * Add bugzilla info (Mark Finlay)
+ * Fix a compilation bug on 2.95 (Vincent Untz)
+ * Fix select all for the bookmarks view (Dave Bordoley)
+ * Paste is only sensitive when in a text entry (Dave Bordoley)
+ * Fix bookmarks editor context menus to ever refer to the right view (Marco)
+ * Update bookmarksmenus sensitivity when the context change
+ rather than after the menu is showed (Marco)
+ * Fix crash when opening popups (Marco)
+ * Fix crash when accessing secure sites (Dave Camp)
+ * Fix back and forward buttons prelighting randomly (Marco)
+ * Fix translation of some menus (Christian Neumair)
+ * Fix the downloader to remove/pause only current download, not all
+ (Xan Lopez)
+
+Updated translations
+
+ * da (Ole Laursen)
+ * es (Francisco Javier Fernandez)
+ * ms (Hasbullah Bin Pit)
+ * nl (Vincent van Adrighem)
+ * no (Kjartan Maraas)
+ * pt (Duarte Loreto)
+ * pt_BR (Evandro Fernandes Giovanini)
+ * sv (Christian Rose)
+ * zh_TW (Abel Cheung)
+
+==============
Epiphany 0.5.0
==============
diff --git a/configure.in b/configure.in
index 742e8593b..fdb628705 100644
--- a/configure.in
+++ b/configure.in
@@ -30,7 +30,7 @@ AC_SUBST(LIBBONOBOUI_REQUIRED)
AC_ENABLE_SHARED(yes)
AC_ENABLE_STATIC(no)
-AM_INIT_AUTOMAKE(epiphany, 0.5.0)
+AM_INIT_AUTOMAKE(epiphany, 0.6.0)
AM_CONFIG_HEADER(config.h)
AM_PROG_LIBTOOL
diff --git a/lib/egg/egg-editable-toolbar.c b/lib/egg/egg-editable-toolbar.c
index 92d3a3834..174b775fe 100755
--- a/lib/egg/egg-editable-toolbar.c
+++ b/lib/egg/egg-editable-toolbar.c
@@ -291,7 +291,6 @@ create_toolbar (EggEditableToolbar *t)
toolbar = egg_toolbar_new ();
egg_toolbar_set_show_arrow (EGG_TOOLBAR (toolbar), TRUE);
- gtk_widget_set_sensitive (toolbar, TRUE);
gtk_widget_show (toolbar);
gtk_drag_dest_set (toolbar, GTK_DEST_DEFAULT_DROP,
dest_drag_types, n_dest_drag_types,
@@ -314,6 +313,8 @@ create_item (EggEditableToolbar *t,
EggAction *action;
const char *action_name;
gboolean is_separator;
+ GtkWidget *icon;
+ GtkImageType type;
action_name = egg_toolbars_model_item_nth
(model, toolbar_position, position,
@@ -322,6 +323,7 @@ create_item (EggEditableToolbar *t,
if (is_separator)
{
item = GTK_WIDGET (egg_separator_tool_item_new ());
+ icon = _egg_editable_toolbar_new_separator_image ();
}
else
{
@@ -329,6 +331,10 @@ create_item (EggEditableToolbar *t,
0, action_name);
action = find_action (t, action_name);
item = egg_action_create_tool_item (action);
+ gtk_widget_set_sensitive (item, TRUE);
+ icon = gtk_image_new_from_stock
+ (action->stock_id ? action->stock_id : GTK_STOCK_DND,
+ GTK_ICON_SIZE_LARGE_TOOLBAR);
}
gtk_widget_show (item);
@@ -340,6 +346,19 @@ create_item (EggEditableToolbar *t,
g_signal_connect (item, "drag_data_delete",
G_CALLBACK (drag_data_delete_cb), t);
+ type = gtk_image_get_storage_type (GTK_IMAGE (icon));
+ if (type == GTK_IMAGE_STOCK)
+ {
+ gchar *stock_id;
+ gtk_image_get_stock (GTK_IMAGE (icon), &stock_id, NULL);
+ gtk_drag_source_set_icon_stock (item, stock_id);
+ }
+ else if (type == GTK_IMAGE_PIXBUF)
+ {
+ GdkPixbuf *pixbuf = gtk_image_get_pixbuf (GTK_IMAGE (icon));
+ gtk_drag_source_set_icon_pixbuf (item, pixbuf);
+ }
+
if (t->priv->edit_mode)
{
egg_tool_item_set_use_drag_window (EGG_TOOL_ITEM (item), TRUE);
@@ -701,3 +720,136 @@ egg_editable_toolbar_set_drag_dest (EggEditableToolbar *etoolbar,
}
}
+#define DEFAULT_ICON_HEIGHT 20
+#define DEFAULT_ICON_WIDTH 0
+
+static void
+fake_expose_widget (GtkWidget *widget,
+ GdkPixmap *pixmap)
+{
+ GdkWindow *tmp_window;
+ GdkEventExpose event;
+
+ event.type = GDK_EXPOSE;
+ event.window = pixmap;
+ event.send_event = FALSE;
+ event.area = widget->allocation;
+ event.region = NULL;
+ event.count = 0;
+
+ tmp_window = widget->window;
+ widget->window = pixmap;
+ gtk_widget_send_expose (widget, (GdkEvent *) &event);
+ widget->window = tmp_window;
+}
+
+/* We should probably experiment some more with this.
+ * Right now the rendered icon is pretty good for most
+ * themes. However, the icon is slightly large for themes
+ * with large toolbar icons.
+ */
+static GdkPixbuf *
+new_pixbuf_from_widget (GtkWidget *widget)
+{
+ GtkWidget *window;
+ GdkPixbuf *pixbuf;
+ GtkRequisition requisition;
+ GtkAllocation allocation;
+ GdkPixmap *pixmap;
+ GdkVisual *visual;
+ gint icon_width;
+ gint icon_height;
+
+ icon_width = DEFAULT_ICON_WIDTH;
+
+ if (!gtk_icon_size_lookup_for_settings (gtk_settings_get_default (),
+ GTK_ICON_SIZE_LARGE_TOOLBAR,
+ NULL,
+ &icon_height))
+ {
+ icon_height = DEFAULT_ICON_HEIGHT;
+ }
+
+ window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+
+ gtk_container_add (GTK_CONTAINER (window), widget);
+ gtk_widget_realize (window);
+ gtk_widget_show (widget);
+ gtk_widget_realize (widget);
+ gtk_widget_map (widget);
+
+ /* Gtk will never set the width or height of a window to 0. So setting the width to
+ * 0 and than getting it will provide us with the minimum width needed to render
+ * the icon correctly, without any additional window background noise.
+ * This is needed mostly for pixmap based themes.
+ */
+ gtk_window_set_default_size (GTK_WINDOW (window), icon_width, icon_height);
+ gtk_window_get_size (GTK_WINDOW (window),&icon_width, &icon_height);
+
+ gtk_widget_size_request (window, &requisition);
+ allocation.x = 0;
+ allocation.y = 0;
+ allocation.width = icon_width;
+ allocation.height = icon_height;
+ gtk_widget_size_allocate (window, &allocation);
+ gtk_widget_size_request (window, &requisition);
+
+ /* Create a pixmap */
+ visual = gtk_widget_get_visual (window);
+ pixmap = gdk_pixmap_new (NULL, icon_width, icon_height, gdk_visual_get_best_depth());
+ gdk_drawable_set_colormap (GDK_DRAWABLE (pixmap), gtk_widget_get_colormap (window));
+
+ /* Draw the window */
+ gtk_widget_ensure_style (window);
+ g_assert (window->style);
+ g_assert (window->style->font_desc);
+
+ fake_expose_widget (window, pixmap);
+ fake_expose_widget (widget, pixmap);
+
+ pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, icon_width, icon_height);
+ gdk_pixbuf_get_from_drawable (pixbuf, pixmap, NULL, 0, 0, 0, 0, icon_width, icon_height);
+
+ return pixbuf;
+}
+
+static GdkPixbuf *
+new_separator_pixbuf ()
+{
+ GtkWidget *separator;
+ GdkPixbuf *pixbuf;
+
+ separator = gtk_vseparator_new ();
+ pixbuf = new_pixbuf_from_widget (separator);
+ gtk_widget_destroy (separator);
+ return pixbuf;
+}
+
+static void
+update_separator_image (GtkImage *image)
+{
+ GdkPixbuf *pixbuf = new_separator_pixbuf ();
+ gtk_image_set_from_pixbuf (GTK_IMAGE (image), pixbuf);
+ g_object_unref (pixbuf);
+}
+
+static gboolean
+style_set_cb (GtkWidget *widget,
+ GtkStyle *previous_style,
+ GtkImage *image)
+{
+
+ update_separator_image (image);
+ return FALSE;
+}
+
+GtkWidget *
+_egg_editable_toolbar_new_separator_image ()
+{
+ GtkWidget *image = gtk_image_new ();
+ update_separator_image (GTK_IMAGE (image));
+ g_signal_connect (G_OBJECT (image), "style_set",
+ G_CALLBACK (style_set_cb), GTK_IMAGE (image));
+
+ return image;
+}
diff --git a/lib/egg/egg-editable-toolbar.h b/lib/egg/egg-editable-toolbar.h
index a46b513f7..28b9976a2 100755
--- a/lib/egg/egg-editable-toolbar.h
+++ b/lib/egg/egg-editable-toolbar.h
@@ -69,6 +69,10 @@ void egg_editable_toolbar_set_drag_dest (EggEditableToolbar *etoolbar,
gint n_targets,
const char *toolbar_name);
+/* Private Functions */
+
+GtkWidget *_egg_editable_toolbar_new_separator_image ();
+
G_END_DECLS
#endif
diff --git a/lib/egg/egg-toolbar-editor.c b/lib/egg/egg-toolbar-editor.c
index aa047c195..fd032cdd6 100755
--- a/lib/egg/egg-toolbar-editor.c
+++ b/lib/egg/egg-toolbar-editor.c
@@ -361,15 +361,15 @@ elide_underscores (const gchar *original)
static GtkWidget *
editor_create_item (EggToolbarEditor *editor,
- const char *stock_id,
- const char *label_text,
- GdkDragAction action)
+ GtkImage *icon,
+ const char *label_text,
+ GdkDragAction action)
{
GtkWidget *event_box;
GtkWidget *vbox;
- GtkWidget *icon;
GtkWidget *label;
gchar *label_no_mnemonic = NULL;
+ GtkImageType type;
event_box = gtk_event_box_new ();
gtk_widget_show (event_box);
@@ -381,15 +381,25 @@ editor_create_item (EggToolbarEditor *editor,
g_signal_connect (event_box, "drag_data_delete",
G_CALLBACK (editor_drag_data_delete_cb), editor);
+ type = gtk_image_get_storage_type (icon);
+ if (type == GTK_IMAGE_STOCK)
+ {
+ gchar *stock_id;
+ gtk_image_get_stock (icon, &stock_id, NULL);
+ gtk_drag_source_set_icon_stock (event_box, stock_id);
+ }
+ else if (type == GTK_IMAGE_PIXBUF)
+ {
+ GdkPixbuf *pixbuf = gtk_image_get_pixbuf (icon);
+ gtk_drag_source_set_icon_pixbuf (event_box, pixbuf);
+ }
+
vbox = gtk_vbox_new (0, FALSE);
gtk_widget_show (vbox);
gtk_container_add (GTK_CONTAINER (event_box), vbox);
- icon = gtk_image_new_from_stock
- (stock_id ? stock_id : GTK_STOCK_DND,
- GTK_ICON_SIZE_LARGE_TOOLBAR);
- gtk_widget_show (icon);
- gtk_box_pack_start (GTK_BOX (vbox), icon, FALSE, TRUE, 0);
+ gtk_widget_show (GTK_WIDGET (icon));
+ gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (icon), FALSE, TRUE, 0);
label_no_mnemonic = elide_underscores (label_text);
label = gtk_label_new (label_no_mnemonic);
g_free (label_no_mnemonic);
@@ -408,6 +418,7 @@ update_editor_sheet (EggToolbarEditor *editor)
GtkWidget *table;
GtkWidget *viewport;
GtkWidget *item;
+ GtkWidget *icon;
g_return_if_fail (IS_EGG_TOOLBAR_EDITOR (editor));
@@ -436,8 +447,10 @@ update_editor_sheet (EggToolbarEditor *editor)
for (l = to_drag; l != NULL; l = l->next)
{
EggAction *action = (l->data);
-
- item = editor_create_item (editor, action->stock_id,
+ icon = gtk_image_new_from_stock
+ (action->stock_id ? action->stock_id : GTK_STOCK_DND,
+ GTK_ICON_SIZE_LARGE_TOOLBAR);
+ item = editor_create_item (editor, GTK_IMAGE (icon),
action->short_label, GDK_ACTION_MOVE);
g_object_set_data (G_OBJECT (item), "egg-action", action);
gtk_table_attach_defaults (GTK_TABLE (editor->priv->table),
@@ -451,7 +464,8 @@ update_editor_sheet (EggToolbarEditor *editor)
}
}
- item = editor_create_item (editor, NULL, _("Separator"),
+ icon = _egg_editable_toolbar_new_separator_image ();
+ item = editor_create_item (editor, GTK_IMAGE (icon), _("Separator"),
GDK_ACTION_COPY);
gtk_table_attach_defaults (GTK_TABLE (editor->priv->table),
item, x, x + 1, y, y + 1);