Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1225)

Unified Diff: chrome/browser/gtk/bookmark_bubble_gtk.cc

Issue 160495: retry r2226, with a fix for a case where we could double free. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/gtk/bookmark_bubble_gtk.cc
===================================================================
--- chrome/browser/gtk/bookmark_bubble_gtk.cc (revision 22239)
+++ chrome/browser/gtk/bookmark_bubble_gtk.cc (working copy)
@@ -118,6 +118,10 @@
const NotificationDetails& details) {
DCHECK(type == NotificationType::BROWSER_THEME_CHANGED);
+ gtk_chrome_link_button_set_use_gtk_theme(
+ GTK_CHROME_LINK_BUTTON(remove_button_),
+ theme_provider_->UseGtkTheme());
+
if (theme_provider_->UseGtkTheme()) {
for (std::vector<GtkWidget*>::iterator it = labels_.begin();
it != labels_.end(); ++it) {
@@ -152,7 +156,7 @@
newly_bookmarked_ ? IDS_BOOMARK_BUBBLE_PAGE_BOOKMARKED :
IDS_BOOMARK_BUBBLE_PAGE_BOOKMARK).c_str());
labels_.push_back(label);
- GtkWidget* remove_button = gtk_chrome_link_button_new(
+ remove_button_ = gtk_chrome_link_button_new(
l10n_util::GetStringUTF8(IDS_BOOMARK_BUBBLE_REMOVE_BOOKMARK).c_str());
GtkWidget* edit_button = gtk_button_new_with_label(
l10n_util::GetStringUTF8(IDS_BOOMARK_BUBBLE_OPTIONS).c_str());
@@ -169,7 +173,7 @@
gtk_misc_set_alignment(GTK_MISC(label), 0, 1);
gtk_box_pack_start(GTK_BOX(top), label,
TRUE, TRUE, 0);
- gtk_box_pack_start(GTK_BOX(top), remove_button,
+ gtk_box_pack_start(GTK_BOX(top), remove_button_,
FALSE, FALSE, 0);
// TODO(deanm): We should show the bookmark bar folder along with the top
@@ -226,7 +230,7 @@
G_CALLBACK(&HandleEditButtonThunk), this);
g_signal_connect(close_button, "clicked",
G_CALLBACK(&HandleCloseButtonThunk), this);
- g_signal_connect(remove_button, "clicked",
+ g_signal_connect(remove_button_, "clicked",
G_CALLBACK(&HandleRemoveButtonThunk), this);
registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,

Powered by Google App Engine
This is Rietveld 408576698