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

Side by Side Diff: chrome/browser/gtk/extension_installed_bubble_gtk.cc

Issue 5880003: fix a couple of close buttons (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 10 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/resources/options/options_page.css » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/gtk/extension_installed_bubble_gtk.h" 5 #include "chrome/browser/gtk/extension_installed_bubble_gtk.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 gtk_label_set_line_wrap(GTK_LABEL(manage_label), TRUE); 235 gtk_label_set_line_wrap(GTK_LABEL(manage_label), TRUE);
236 gtk_widget_set_size_request(manage_label, kTextColumnWidth, -1); 236 gtk_widget_set_size_request(manage_label, kTextColumnWidth, -1);
237 gtk_box_pack_start(GTK_BOX(text_column), manage_label, FALSE, FALSE, 0); 237 gtk_box_pack_start(GTK_BOX(text_column), manage_label, FALSE, FALSE, 0);
238 238
239 // Create and pack the close button. 239 // Create and pack the close button.
240 GtkWidget* close_column = gtk_vbox_new(FALSE, 0); 240 GtkWidget* close_column = gtk_vbox_new(FALSE, 0);
241 gtk_box_pack_start(GTK_BOX(bubble_content), close_column, FALSE, FALSE, 0); 241 gtk_box_pack_start(GTK_BOX(bubble_content), close_column, FALSE, FALSE, 0);
242 close_button_.reset(CustomDrawButton::CloseButton(theme_provider)); 242 close_button_.reset(CustomDrawButton::CloseButton(theme_provider));
243 g_signal_connect(close_button_->widget(), "clicked", 243 g_signal_connect(close_button_->widget(), "clicked",
244 G_CALLBACK(OnButtonClick), this); 244 G_CALLBACK(OnButtonClick), this);
245 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
246 close_button_->SetBackground(
247 theme_provider->GetColor(BrowserThemeProvider::COLOR_TAB_TEXT),
248 rb.GetBitmapNamed(IDR_CLOSE_BAR),
249 rb.GetBitmapNamed(IDR_CLOSE_BAR_MASK));
250 gtk_box_pack_start(GTK_BOX(close_column), close_button_->widget(), 245 gtk_box_pack_start(GTK_BOX(close_column), close_button_->widget(),
251 FALSE, FALSE, 0); 246 FALSE, FALSE, 0);
252 247
253 InfoBubbleGtk::ArrowLocationGtk arrow_location = 248 InfoBubbleGtk::ArrowLocationGtk arrow_location =
254 !base::i18n::IsRTL() ? 249 !base::i18n::IsRTL() ?
255 InfoBubbleGtk::ARROW_LOCATION_TOP_RIGHT : 250 InfoBubbleGtk::ARROW_LOCATION_TOP_RIGHT :
256 InfoBubbleGtk::ARROW_LOCATION_TOP_LEFT; 251 InfoBubbleGtk::ARROW_LOCATION_TOP_LEFT;
257 252
258 gfx::Rect bounds = gtk_util::WidgetBounds(reference_widget); 253 gfx::Rect bounds = gtk_util::WidgetBounds(reference_widget);
259 if (type_ == OMNIBOX_KEYWORD) { 254 if (type_ == OMNIBOX_KEYWORD) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 // the window before we call Release() because close_button_ depends 301 // the window before we call Release() because close_button_ depends
307 // on all references being cleared before it is destroyed. 302 // on all references being cleared before it is destroyed.
308 MessageLoopForUI::current()->PostTask(FROM_HERE, NewRunnableMethod(this, 303 MessageLoopForUI::current()->PostTask(FROM_HERE, NewRunnableMethod(this,
309 &ExtensionInstalledBubbleGtk::Close)); 304 &ExtensionInstalledBubbleGtk::Close));
310 } 305 }
311 306
312 void ExtensionInstalledBubbleGtk::Close() { 307 void ExtensionInstalledBubbleGtk::Close() {
313 Release(); // Balanced in ctor. 308 Release(); // Balanced in ctor.
314 info_bubble_ = NULL; 309 info_bubble_ = NULL;
315 } 310 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/options/options_page.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698