]> spindle.queued.net Git - midori/commitdiff
Remove the page holder from the core
authorChristian Dywan <christian@twotoasts.de>
Tue, 25 Nov 2008 22:55:54 +0000 (23:55 +0100)
committerChristian Dywan <christian@twotoasts.de>
Tue, 25 Nov 2008 22:55:54 +0000 (23:55 +0100)
katze/katze-array.c
midori/main.c
midori/midori-browser.c
midori/midori-stock.h
midori/midori-websettings.c

index c62121e4e253b881426f524dc8708aa20a4b4837..66dfcc0c9b2669787604dff59fa1ae36793db342 100644 (file)
@@ -226,7 +226,7 @@ katze_array_is_empty (KatzeArray* array)
 }
 
 /**
- * katze_array_get_item_position:
+ * katze_array_get_item_index:
  * @array: a #KatzeArray
  * @item: an item in the array
  *
index a1aaf5604129f6f25f9c10988bc6685c59147635..2d042d71fd1c4c27775f2ae8d5ebd9dd37bfe2ee 100644 (file)
@@ -85,7 +85,6 @@ stock_items_init (void)
         { STOCK_EXTENSIONS,     N_("_Extensions"), 0, 0, GTK_STOCK_CONVERT },
         { STOCK_HISTORY,        N_("_History"), 0, 0, GTK_STOCK_SORT_ASCENDING },
         { 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_STYLES,         N_("User_styles"), 0, 0, GTK_STOCK_SELECT_COLOR },
         { 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));
     gtk_widget_show (toolbar);
     midori_panel_append_page (MIDORI_PANEL (panel), addon,
-                              STOCK_EXTENSIONS, _("_Extensions"), toolbar);
+                              STOCK_EXTENSIONS, _("Extensions"), toolbar);
     #endif
 }
 
index 7abdbc09998beaaac30f19444e1091212f7bff40..cf46217e5bdb81c17a16bde1e6eb3b118a7e63ac 100644 (file)
@@ -52,7 +52,6 @@ struct _MidoriBrowser
     GtkWidget* panel;
     GtkWidget* panel_bookmarks;
     GtkWidget* panel_history;
-    GtkWidget* panel_pageholder;
     GtkWidget* notebook;
 
     GtkWidget* inspector;
@@ -2845,25 +2844,6 @@ _action_panel_activate (GtkToggleAction* action,
     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
 midori_panel_notify_position_cb (GObject*       object,
                                  GParamSpec*    arg1,
@@ -3160,9 +3140,6 @@ static const GtkActionEntry entries[] = {
  { "Homepage", STOCK_HOMEPAGE,
    NULL, "<Alt>Home",
    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,
    N_("Empty Trash"), "",
    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='Location'/>"
     "<menuitem action='Search'/>"
-    "<menuitem action='OpenInPageholder'/>"
     "<menuitem action='Trash'/>"
     /* "<menuitem action='RecentlyVisited'/>" */
    "</menu>"
@@ -3924,16 +3900,6 @@ midori_browser_init (MidoriBrowser* browser)
     midori_panel_append_widget (MIDORI_PANEL (browser->panel),
                                 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 */
     vpaned = gtk_vpaned_new ();
     gtk_paned_pack2 (GTK_PANED (hpaned), vpaned, FALSE, FALSE);
@@ -4181,7 +4147,6 @@ _midori_browser_update_settings (MidoriBrowser* browser)
     MidoriToolbarStyle toolbar_style;
     gchar* toolbar_items;
     gint last_web_search;
-    gchar* last_pageholder_uri;
     gboolean close_buttons_on_tabs;
     GdkScreen* screen;
     gint default_width, default_height;
@@ -4202,7 +4167,6 @@ _midori_browser_update_settings (MidoriBrowser* browser)
                   "toolbar-style", &toolbar_style,
                   "toolbar-items", &toolbar_items,
                   "last-web-search", &last_web_search,
-                  "last-pageholder-uri", &last_pageholder_uri,
                   "close-buttons-on-tabs", &close_buttons_on_tabs,
                   NULL);
 
@@ -4237,8 +4201,6 @@ _midori_browser_update_settings (MidoriBrowser* browser)
     gtk_paned_set_position (GTK_PANED (gtk_widget_get_parent (browser->panel)),
                             last_panel_position);
     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, "Navigationbar", show_navigationbar);
@@ -4247,7 +4209,6 @@ _midori_browser_update_settings (MidoriBrowser* browser)
     _action_set_active (browser, "Statusbar", show_statusbar);
 
     g_free (toolbar_items);
-    g_free (last_pageholder_uri);
 }
 
 static void
index d1b1d6c9a460d4d2b69f6ca6e51d6ff4320cc01e..36bb21293c3ef9e5f4110da483fe5c43c135ded4 100644 (file)
@@ -26,7 +26,6 @@
 #define STOCK_EXTENSIONS         "extension"
 #define STOCK_HISTORY            "document-open-recent"
 #define STOCK_NEWS_FEED          "news-feed"
-#define STOCK_PAGE_HOLDER        GTK_STOCK_ORIENTATION_PORTRAIT
 #define STOCK_STYLE              "gnome-settings-theme"
 #define STOCK_STYLES             "gnome-settings-theme"
 #define STOCK_TRANSFER           "package"
index e548710483603a95d4f891a39d911223d024fec8..42eb570d92b5db1732db0f33d534ba38a6b602b6 100644 (file)
@@ -26,7 +26,6 @@ struct _MidoriWebSettings
     gint last_panel_position;
     gint last_panel_page;
     gint last_web_search;
-    gchar* last_pageholder_uri;
 
     gboolean show_menubar;
     gboolean show_navigationbar;
@@ -80,7 +79,6 @@ enum
     PROP_LAST_PANEL_POSITION,
     PROP_LAST_PANEL_PAGE,
     PROP_LAST_WEB_SEARCH,
-    PROP_LAST_PAGEHOLDER_URI,
 
     PROP_SHOW_MENUBAR,
     PROP_SHOW_NAVIGATIONBAR,
@@ -295,15 +293,6 @@ midori_web_settings_class_init (MidoriWebSettingsClass* class)
                                      0, G_MAXINT, 0,
                                      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,
                                      PROP_SHOW_MENUBAR,
@@ -679,9 +668,6 @@ midori_web_settings_set_property (GObject*      object,
     case PROP_LAST_WEB_SEARCH:
         web_settings->last_web_search = g_value_get_int (value);
         break;
-    case PROP_LAST_PAGEHOLDER_URI:
-        katze_assign (web_settings->last_pageholder_uri, g_value_dup_string (value));
-        break;
 
     case PROP_SHOW_MENUBAR:
         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:
         g_value_set_int (value, web_settings->last_web_search);
         break;
-    case PROP_LAST_PAGEHOLDER_URI:
-        g_value_set_string (value, web_settings->last_pageholder_uri);
-        break;
 
     case PROP_SHOW_MENUBAR:
         g_value_set_boolean (value, web_settings->show_menubar);