diff options
author | Xan Lopez <xan@src.gnome.org> | 2003-04-09 07:13:37 +0800 |
---|---|---|
committer | Xan Lopez <xan@src.gnome.org> | 2003-04-09 07:13:37 +0800 |
commit | 6869072199d751b46f6f7757aee792a9f0eca7fe (patch) | |
tree | c693ac5274c53a931337a1df812a32a2fb50336f /src/bookmarks/ephy-bookmarks-editor.c | |
parent | b934ed62cfeb93b86c0f655eff39ff0de63ef7df (diff) | |
download | gsoc2013-epiphany-6869072199d751b46f6f7757aee792a9f0eca7fe.tar gsoc2013-epiphany-6869072199d751b46f6f7757aee792a9f0eca7fe.tar.gz gsoc2013-epiphany-6869072199d751b46f6f7757aee792a9f0eca7fe.tar.bz2 gsoc2013-epiphany-6869072199d751b46f6f7757aee792a9f0eca7fe.tar.lz gsoc2013-epiphany-6869072199d751b46f6f7757aee792a9f0eca7fe.tar.xz gsoc2013-epiphany-6869072199d751b46f6f7757aee792a9f0eca7fe.tar.zst gsoc2013-epiphany-6869072199d751b46f6f7757aee792a9f0eca7fe.zip |
Allow to launch the BME alone, rework some CORBA code, add a .desktop file
Allow to launch the BME alone, rework some CORBA code, add a .desktop
file for the BME. Fixes #102477.
Diffstat (limited to 'src/bookmarks/ephy-bookmarks-editor.c')
-rw-r--r-- | src/bookmarks/ephy-bookmarks-editor.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c index 4786c9d67..7307570d6 100644 --- a/src/bookmarks/ephy-bookmarks-editor.c +++ b/src/bookmarks/ephy-bookmarks-editor.c @@ -25,6 +25,7 @@ #include <gtk/gtkvbox.h> #include <gdk/gdkkeysyms.h> #include <libgnome/gnome-i18n.h> +#include <libgnome/gnome-program.h> #include <string.h> #include "ephy-bookmarks-editor.h" @@ -446,17 +447,25 @@ ephy_bookmarks_editor_node_activated_cb (GtkWidget *view, EphyBookmarksEditor *editor) { const char *location; - GtkWindow *window; + EphyWindow *window; g_return_if_fail (EPHY_IS_NODE (node)); location = ephy_node_get_property_string (node, EPHY_NODE_BMK_PROP_LOCATION); g_return_if_fail (location != NULL); - window = GTK_WINDOW (get_target_window (editor)); - g_return_if_fail (IS_EPHY_WINDOW (window)); - ephy_window_load_url (EPHY_WINDOW (window), location); - gtk_window_present (GTK_WINDOW (window)); + window = EPHY_WINDOW (get_target_window (editor)); + if (window != NULL) + { + ephy_window_load_url (EPHY_WINDOW (window), location); + gtk_window_present (GTK_WINDOW (window)); + } + else + { + /* We have to create a browser window */ + ephy_shell_new_tab (ephy_shell, NULL, NULL, location, + EPHY_NEW_TAB_IN_NEW_WINDOW); + } } static void @@ -770,7 +779,8 @@ ephy_bookmarks_editor_construct (EphyBookmarksEditor *editor) gtk_window_set_title (GTK_WINDOW (editor), _("Bookmarks")); - icon_path = ephy_file ("epiphany-bookmarks.png"); + icon_path = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_APP_PIXMAP, + "epiphany-bookmarks.png", TRUE, NULL); gtk_window_set_icon_from_file (GTK_WINDOW (editor), icon_path, NULL); g_signal_connect (editor, "delete_event", |