summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 15:49:57 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 15:49:57 +0000
commit0519e110045415c8d674a8a5d0cdd587b9ce8e1f (patch)
tree694e989b739f39c086dbc62bdf276d9c92f10aa7 /chrome/browser/gtk
parenteae033a397da42c049575245c276a6eb6f5be93e (diff)
downloadchromium_src-0519e110045415c8d674a8a5d0cdd587b9ce8e1f.zip
chromium_src-0519e110045415c8d674a8a5d0cdd587b9ce8e1f.tar.gz
chromium_src-0519e110045415c8d674a8a5d0cdd587b9ce8e1f.tar.bz2
Wires up views on linux dialogs to use gtk ones.
BUG=none TEST=none Review URL: http://codereview.chromium.org/254007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27484 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk')
-rw-r--r--chrome/browser/gtk/bookmark_manager_gtk.cc6
-rw-r--r--chrome/browser/gtk/bookmark_manager_gtk.h2
-rw-r--r--chrome/browser/gtk/gtk_theme_provider.cc1
-rw-r--r--chrome/browser/gtk/options/content_page_gtk.cc6
4 files changed, 11 insertions, 4 deletions
diff --git a/chrome/browser/gtk/bookmark_manager_gtk.cc b/chrome/browser/gtk/bookmark_manager_gtk.cc
index 5ee3d53..0e54ccd 100644
--- a/chrome/browser/gtk/bookmark_manager_gtk.cc
+++ b/chrome/browser/gtk/bookmark_manager_gtk.cc
@@ -600,6 +600,7 @@ void BookmarkManagerGtk::ResetOrganizeMenu(bool left) {
else if (parent)
nodes.push_back(parent);
+#if defined(TOOLKIT_GTK)
// We DeleteSoon on the old one to give any reference holders (e.g.
// the event that caused this reset) a chance to release their refs.
BookmarkContextMenu* old_menu = organize_menu_.release();
@@ -609,7 +610,6 @@ void BookmarkManagerGtk::ResetOrganizeMenu(bool left) {
organize_menu_.reset(new BookmarkContextMenu(window_, profile_, NULL, NULL,
parent, nodes, BookmarkContextMenu::BOOKMARK_MANAGER_ORGANIZE_MENU,
NULL));
-#if defined(TOOLKIT_GTK)
gtk_menu_item_set_submenu(GTK_MENU_ITEM(organize_), organize_menu_->menu());
#else
// GTK+Views should implement this somehow.
@@ -1306,11 +1306,15 @@ gboolean BookmarkManagerGtk::OnTreeViewKeyPress(
if (command == -1)
return FALSE;
+#if defined(TOOLKIT_GTK)
if (bm->organize_menu_.get() &&
bm->organize_menu_->IsCommandEnabled(command)) {
bm->organize_menu_->ExecuteCommand(command);
return TRUE;
}
+#else
+ NOTIMPLEMENTED();
+#endif
return FALSE;
}
diff --git a/chrome/browser/gtk/bookmark_manager_gtk.h b/chrome/browser/gtk/bookmark_manager_gtk.h
index d70872e..4c19ba3 100644
--- a/chrome/browser/gtk/bookmark_manager_gtk.h
+++ b/chrome/browser/gtk/bookmark_manager_gtk.h
@@ -327,7 +327,9 @@ class BookmarkManagerGtk : public BookmarkModelObserver,
// The Organize menu item.
GtkWidget* organize_;
// The submenu the item pops up.
+#if defined(TOOLKIT_GTK)
scoped_ptr<BookmarkContextMenu> organize_menu_;
+#endif
// Whether the menu refers to the left selection.
bool organize_is_for_left_;
diff --git a/chrome/browser/gtk/gtk_theme_provider.cc b/chrome/browser/gtk/gtk_theme_provider.cc
index 15d0b77..07a8d38 100644
--- a/chrome/browser/gtk/gtk_theme_provider.cc
+++ b/chrome/browser/gtk/gtk_theme_provider.cc
@@ -23,7 +23,6 @@
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkColor.h"
#include "grit/app_resources.h"
-//#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
namespace {
diff --git a/chrome/browser/gtk/options/content_page_gtk.cc b/chrome/browser/gtk/options/content_page_gtk.cc
index b634b69..8098a1b 100644
--- a/chrome/browser/gtk/options/content_page_gtk.cc
+++ b/chrome/browser/gtk/options/content_page_gtk.cc
@@ -52,8 +52,10 @@ ContentPageGtk::ContentPageGtk(Profile* profile)
profile->GetPrefs(), this);
ask_to_save_form_autofill_.Init(prefs::kFormAutofillEnabled,
profile->GetPrefs(), this);
- use_custom_chrome_frame_.Init(prefs::kUseCustomChromeFrame,
- profile->GetPrefs(), this);
+ if (browser_defaults::kCanToggleSystemTitleBar) {
+ use_custom_chrome_frame_.Init(prefs::kUseCustomChromeFrame,
+ profile->GetPrefs(), this);
+ }
// Load initial values
NotifyPrefChanged(NULL);