Remove the page holder from the core

This commit is contained in:
Christian Dywan 2008-11-25 23:55:54 +01:00
parent 11d67dc326
commit 2bc42bfd8d
5 changed files with 2 additions and 60 deletions

View file

@ -226,7 +226,7 @@ katze_array_is_empty (KatzeArray* array)
} }
/** /**
* katze_array_get_item_position: * katze_array_get_item_index:
* @array: a #KatzeArray * @array: a #KatzeArray
* @item: an item in the array * @item: an item in the array
* *

View file

@ -85,7 +85,6 @@ stock_items_init (void)
{ STOCK_EXTENSIONS, N_("_Extensions"), 0, 0, GTK_STOCK_CONVERT }, { STOCK_EXTENSIONS, N_("_Extensions"), 0, 0, GTK_STOCK_CONVERT },
{ STOCK_HISTORY, N_("_History"), 0, 0, GTK_STOCK_SORT_ASCENDING }, { STOCK_HISTORY, N_("_History"), 0, 0, GTK_STOCK_SORT_ASCENDING },
{ STOCK_HOMEPAGE, N_("_Homepage"), 0, 0, GTK_STOCK_HOME }, { STOCK_HOMEPAGE, N_("_Homepage"), 0, 0, GTK_STOCK_HOME },
{ STOCK_PAGE_HOLDER, N_("_Pageholder"), 0, 0, GTK_STOCK_ORIENTATION_PORTRAIT },
{ STOCK_SCRIPTS, N_("_Userscripts"), 0, 0, GTK_STOCK_EXECUTE }, { STOCK_SCRIPTS, N_("_Userscripts"), 0, 0, GTK_STOCK_EXECUTE },
{ STOCK_STYLES, N_("User_styles"), 0, 0, GTK_STOCK_SELECT_COLOR }, { STOCK_STYLES, N_("User_styles"), 0, 0, GTK_STOCK_SELECT_COLOR },
{ STOCK_TAB_NEW, N_("New _Tab"), 0, 0, GTK_STOCK_ADD }, { STOCK_TAB_NEW, N_("New _Tab"), 0, 0, GTK_STOCK_ADD },
@ -1049,7 +1048,7 @@ midori_app_add_browser_cb (MidoriApp* app,
toolbar = midori_addons_get_toolbar (MIDORI_ADDONS (addon)); toolbar = midori_addons_get_toolbar (MIDORI_ADDONS (addon));
gtk_widget_show (toolbar); gtk_widget_show (toolbar);
midori_panel_append_page (MIDORI_PANEL (panel), addon, midori_panel_append_page (MIDORI_PANEL (panel), addon,
STOCK_EXTENSIONS, _("_Extensions"), toolbar); STOCK_EXTENSIONS, _("Extensions"), toolbar);
#endif #endif
} }

View file

@ -52,7 +52,6 @@ struct _MidoriBrowser
GtkWidget* panel; GtkWidget* panel;
GtkWidget* panel_bookmarks; GtkWidget* panel_bookmarks;
GtkWidget* panel_history; GtkWidget* panel_history;
GtkWidget* panel_pageholder;
GtkWidget* notebook; GtkWidget* notebook;
GtkWidget* inspector; GtkWidget* inspector;
@ -2845,25 +2844,6 @@ _action_panel_activate (GtkToggleAction* action,
sokoke_widget_set_visible (browser->panel, active); sokoke_widget_set_visible (browser->panel, active);
} }
static void
_action_open_in_panel_activate (GtkAction* action,
MidoriBrowser* browser)
{
GtkWidget* view;
const gchar* uri;
gint n;
view = midori_browser_get_current_tab (browser);
uri = midori_view_get_display_uri (MIDORI_VIEW (view));
/* FIXME: Don't assign the uri here, update it properly while navigating */
g_object_set (browser->settings, "last-pageholder-uri", uri, NULL);
n = midori_panel_page_num (MIDORI_PANEL (browser->panel),
browser->panel_pageholder);
midori_panel_set_current_page (MIDORI_PANEL (browser->panel), n);
gtk_widget_show (browser->panel);
midori_view_set_uri (MIDORI_VIEW (browser->panel_pageholder), uri);
}
static void static void
midori_panel_notify_position_cb (GObject* object, midori_panel_notify_position_cb (GObject* object,
GParamSpec* arg1, GParamSpec* arg1,
@ -3160,9 +3140,6 @@ static const GtkActionEntry entries[] = {
{ "Homepage", STOCK_HOMEPAGE, { "Homepage", STOCK_HOMEPAGE,
NULL, "<Alt>Home", NULL, "<Alt>Home",
N_("Go to your homepage"), G_CALLBACK (_action_homepage_activate) }, N_("Go to your homepage"), G_CALLBACK (_action_homepage_activate) },
{ "OpenInPageholder", GTK_STOCK_JUMP_TO,
N_("Open in Page_holder..."), "",
N_("Open the current page in the pageholder"), G_CALLBACK (_action_open_in_panel_activate) },
{ "TrashEmpty", GTK_STOCK_CLEAR, { "TrashEmpty", GTK_STOCK_CLEAR,
N_("Empty Trash"), "", N_("Empty Trash"), "",
N_("Delete the contents of the trash"), G_CALLBACK (_action_trash_empty_activate) }, N_("Delete the contents of the trash"), G_CALLBACK (_action_trash_empty_activate) },
@ -3360,7 +3337,6 @@ static const gchar* ui_markup =
"<menuitem action='Homepage'/>" "<menuitem action='Homepage'/>"
"<menuitem action='Location'/>" "<menuitem action='Location'/>"
"<menuitem action='Search'/>" "<menuitem action='Search'/>"
"<menuitem action='OpenInPageholder'/>"
"<menuitem action='Trash'/>" "<menuitem action='Trash'/>"
/* "<menuitem action='RecentlyVisited'/>" */ /* "<menuitem action='RecentlyVisited'/>" */
"</menu>" "</menu>"
@ -3924,16 +3900,6 @@ midori_browser_init (MidoriBrowser* browser)
midori_panel_append_widget (MIDORI_PANEL (browser->panel), midori_panel_append_widget (MIDORI_PANEL (browser->panel),
box, STOCK_HISTORY, _("History"), toolbar); box, STOCK_HISTORY, _("History"), toolbar);
/* Pageholder */
browser->panel_pageholder = midori_view_new (browser->net);
midori_view_set_settings (MIDORI_VIEW (browser->panel_pageholder),
browser->settings);
gtk_widget_show (browser->panel_pageholder);
midori_panel_append_widget (MIDORI_PANEL (browser->panel),
browser->panel_pageholder,
/* i18n: A panel showing a user specified web page */
STOCK_PAGE_HOLDER, _("Pageholder"), NULL);
/* Notebook, containing all views */ /* Notebook, containing all views */
vpaned = gtk_vpaned_new (); vpaned = gtk_vpaned_new ();
gtk_paned_pack2 (GTK_PANED (hpaned), vpaned, FALSE, FALSE); gtk_paned_pack2 (GTK_PANED (hpaned), vpaned, FALSE, FALSE);
@ -4181,7 +4147,6 @@ _midori_browser_update_settings (MidoriBrowser* browser)
MidoriToolbarStyle toolbar_style; MidoriToolbarStyle toolbar_style;
gchar* toolbar_items; gchar* toolbar_items;
gint last_web_search; gint last_web_search;
gchar* last_pageholder_uri;
gboolean close_buttons_on_tabs; gboolean close_buttons_on_tabs;
GdkScreen* screen; GdkScreen* screen;
gint default_width, default_height; gint default_width, default_height;
@ -4202,7 +4167,6 @@ _midori_browser_update_settings (MidoriBrowser* browser)
"toolbar-style", &toolbar_style, "toolbar-style", &toolbar_style,
"toolbar-items", &toolbar_items, "toolbar-items", &toolbar_items,
"last-web-search", &last_web_search, "last-web-search", &last_web_search,
"last-pageholder-uri", &last_pageholder_uri,
"close-buttons-on-tabs", &close_buttons_on_tabs, "close-buttons-on-tabs", &close_buttons_on_tabs,
NULL); NULL);
@ -4237,8 +4201,6 @@ _midori_browser_update_settings (MidoriBrowser* browser)
gtk_paned_set_position (GTK_PANED (gtk_widget_get_parent (browser->panel)), gtk_paned_set_position (GTK_PANED (gtk_widget_get_parent (browser->panel)),
last_panel_position); last_panel_position);
midori_panel_set_current_page (MIDORI_PANEL (browser->panel), last_panel_page); midori_panel_set_current_page (MIDORI_PANEL (browser->panel), last_panel_page);
midori_view_set_uri (MIDORI_VIEW (browser->panel_pageholder),
last_pageholder_uri);
_action_set_active (browser, "Menubar", show_menubar); _action_set_active (browser, "Menubar", show_menubar);
_action_set_active (browser, "Navigationbar", show_navigationbar); _action_set_active (browser, "Navigationbar", show_navigationbar);
@ -4247,7 +4209,6 @@ _midori_browser_update_settings (MidoriBrowser* browser)
_action_set_active (browser, "Statusbar", show_statusbar); _action_set_active (browser, "Statusbar", show_statusbar);
g_free (toolbar_items); g_free (toolbar_items);
g_free (last_pageholder_uri);
} }
static void static void

View file

@ -26,7 +26,6 @@
#define STOCK_EXTENSIONS "extension" #define STOCK_EXTENSIONS "extension"
#define STOCK_HISTORY "document-open-recent" #define STOCK_HISTORY "document-open-recent"
#define STOCK_NEWS_FEED "news-feed" #define STOCK_NEWS_FEED "news-feed"
#define STOCK_PAGE_HOLDER GTK_STOCK_ORIENTATION_PORTRAIT
#define STOCK_STYLE "gnome-settings-theme" #define STOCK_STYLE "gnome-settings-theme"
#define STOCK_STYLES "gnome-settings-theme" #define STOCK_STYLES "gnome-settings-theme"
#define STOCK_TRANSFER "package" #define STOCK_TRANSFER "package"

View file

@ -26,7 +26,6 @@ struct _MidoriWebSettings
gint last_panel_position; gint last_panel_position;
gint last_panel_page; gint last_panel_page;
gint last_web_search; gint last_web_search;
gchar* last_pageholder_uri;
gboolean show_menubar; gboolean show_menubar;
gboolean show_navigationbar; gboolean show_navigationbar;
@ -80,7 +79,6 @@ enum
PROP_LAST_PANEL_POSITION, PROP_LAST_PANEL_POSITION,
PROP_LAST_PANEL_PAGE, PROP_LAST_PANEL_PAGE,
PROP_LAST_WEB_SEARCH, PROP_LAST_WEB_SEARCH,
PROP_LAST_PAGEHOLDER_URI,
PROP_SHOW_MENUBAR, PROP_SHOW_MENUBAR,
PROP_SHOW_NAVIGATIONBAR, PROP_SHOW_NAVIGATIONBAR,
@ -295,15 +293,6 @@ midori_web_settings_class_init (MidoriWebSettingsClass* class)
0, G_MAXINT, 0, 0, G_MAXINT, 0,
flags)); flags));
g_object_class_install_property (gobject_class,
PROP_LAST_PAGEHOLDER_URI,
g_param_spec_string (
"last-pageholder-uri",
_("Last pageholder URI"),
_("The URI last opened in the pageholder"),
"",
flags));
g_object_class_install_property (gobject_class, g_object_class_install_property (gobject_class,
PROP_SHOW_MENUBAR, PROP_SHOW_MENUBAR,
@ -679,9 +668,6 @@ midori_web_settings_set_property (GObject* object,
case PROP_LAST_WEB_SEARCH: case PROP_LAST_WEB_SEARCH:
web_settings->last_web_search = g_value_get_int (value); web_settings->last_web_search = g_value_get_int (value);
break; break;
case PROP_LAST_PAGEHOLDER_URI:
katze_assign (web_settings->last_pageholder_uri, g_value_dup_string (value));
break;
case PROP_SHOW_MENUBAR: case PROP_SHOW_MENUBAR:
web_settings->show_menubar = g_value_get_boolean (value); web_settings->show_menubar = g_value_get_boolean (value);
@ -839,9 +825,6 @@ midori_web_settings_get_property (GObject* object,
case PROP_LAST_WEB_SEARCH: case PROP_LAST_WEB_SEARCH:
g_value_set_int (value, web_settings->last_web_search); g_value_set_int (value, web_settings->last_web_search);
break; break;
case PROP_LAST_PAGEHOLDER_URI:
g_value_set_string (value, web_settings->last_pageholder_uri);
break;
case PROP_SHOW_MENUBAR: case PROP_SHOW_MENUBAR:
g_value_set_boolean (value, web_settings->show_menubar); g_value_set_boolean (value, web_settings->show_menubar);