diff options
author | mdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-30 01:33:24 +0000 |
---|---|---|
committer | mdm@chromium.org <mdm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-30 01:33:24 +0000 |
commit | 63302a8b9faec92f1b956737057205acc2b44907 (patch) | |
tree | 4ced0044147ef7e0d2e525c37b7922dfca195e9f /chrome/browser | |
parent | 21a00fd62cb2760b12912697e9af1fb95aaf613c (diff) | |
download | chromium_src-63302a8b9faec92f1b956737057205acc2b44907.zip chromium_src-63302a8b9faec92f1b956737057205acc2b44907.tar.gz chromium_src-63302a8b9faec92f1b956737057205acc2b44907.tar.bz2 |
Linux: convert namespace gtk_util to class GtkUtil to meet style guidelines.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/160371
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22036 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
51 files changed, 170 insertions, 172 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc index d44f8f0..ab5f8d0 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc +++ b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc @@ -133,7 +133,7 @@ void AutocompleteEditViewGtk::Init() { const double kFontSize = 13.4; // 13.4px == 10pt @ 96dpi // On Windows, popups have a font size 5/6 the size of non-popups. const double kPopupWindowFontSize = kFontSize * 5.0 / 6.0; - gtk_util::ForceFontSizePixels(text_view_, + GtkUtil::ForceFontSizePixels(text_view_, popup_window_mode_ ? kPopupWindowFontSize : kFontSize); } @@ -592,7 +592,7 @@ void AutocompleteEditViewGtk::HandlePopulatePopup(GtkMenu* menu) { // Search Engine menu item. GtkWidget* search_engine_menuitem = gtk_menu_item_new_with_mnemonic( - gtk_util::ConvertAcceleratorsFromWindowsStyle( + GtkUtil::ConvertAcceleratorsFromWindowsStyle( l10n_util::GetStringUTF8(IDS_EDIT_SEARCH_ENGINES)).c_str()); gtk_menu_shell_append(GTK_MENU_SHELL(menu), search_engine_menuitem); g_signal_connect(search_engine_menuitem, "activate", @@ -601,7 +601,7 @@ void AutocompleteEditViewGtk::HandlePopulatePopup(GtkMenu* menu) { // Paste and Go menu item. GtkWidget* paste_go_menuitem = gtk_menu_item_new_with_mnemonic( - gtk_util::ConvertAcceleratorsFromWindowsStyle( + GtkUtil::ConvertAcceleratorsFromWindowsStyle( l10n_util::GetStringUTF8(model_->is_paste_and_search() ? IDS_PASTE_AND_SEARCH : IDS_PASTE_AND_GO)).c_str()); gtk_menu_shell_append(GTK_MENU_SHELL(menu), paste_go_menuitem); diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index 302385d..ff550f4 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -381,7 +381,7 @@ int BrowserMain(const MainFunctionParams& parameters) { #if defined(TOOLKIT_GTK) // It is important for this to happen before the first run dialog, as it // styles the dialog as well. - gtk_util::InitRCStyles(); + GtkUtil::InitRCStyles(); #elif defined(TOOLKIT_VIEWS) // The delegate needs to be set before any UI is created so that windows // display the correct icon. diff --git a/chrome/browser/dock_info_gtk.cc b/chrome/browser/dock_info_gtk.cc index 403b65d..49db540 100644 --- a/chrome/browser/dock_info_gtk.cc +++ b/chrome/browser/dock_info_gtk.cc @@ -100,7 +100,7 @@ class TopMostFinder : public BaseWindowFinder { target_(window), screen_loc_(screen_loc), is_top_most_(false) { - gtk_util::EnumerateTopLevelWindows(this); + GtkUtil::EnumerateTopLevelWindows(this); } // The window we're looking for. @@ -163,7 +163,7 @@ class LocalProcessWindowFinder : public BaseWindowFinder { : BaseWindowFinder(ignore), screen_loc_(screen_loc), result_(0) { - gtk_util::EnumerateTopLevelWindows(this); + GtkUtil::EnumerateTopLevelWindows(this); } // Position of the mouse. diff --git a/chrome/browser/gtk/about_chrome_dialog.cc b/chrome/browser/gtk/about_chrome_dialog.cc index e0aa1ab..2043d7e 100644 --- a/chrome/browser/gtk/about_chrome_dialog.cc +++ b/chrome/browser/gtk/about_chrome_dialog.cc @@ -106,7 +106,7 @@ void ShowAboutDialogForProfile(GtkWindow* parent, Profile* profile) { GTK_DIALOG_MODAL, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); - // Pick up the style set in gtk_util.cc:InitRCStyles(). + // Pick up the style set in GtkUtil::InitRCStyles(). // The layout of this dialog is special because the logo should be flush // with the edges of the window. gtk_widget_set_name(dialog, "about-dialog"); @@ -154,9 +154,9 @@ void ShowAboutDialogForProfile(GtkWindow* parent, Profile* profile) { // We use a separate box for the licensing etc. text. See the comment near // the top of this function about using a special layout for this dialog. - GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); + GtkWidget* vbox = gtk_vbox_new(FALSE, GtkUtil::kControlSpacing); gtk_container_set_border_width(GTK_CONTAINER(vbox), - gtk_util::kContentAreaBorder); + GtkUtil::kContentAreaBorder); GtkWidget* copyright_label = MakeMarkupLabel( kSmaller, l10n_util::GetStringUTF8(IDS_ABOUT_VERSION_COPYRIGHT)); diff --git a/chrome/browser/gtk/back_forward_button_gtk.cc b/chrome/browser/gtk/back_forward_button_gtk.cc index 009be74..bd09dbe 100644 --- a/chrome/browser/gtk/back_forward_button_gtk.cc +++ b/chrome/browser/gtk/back_forward_button_gtk.cc @@ -70,7 +70,7 @@ BackForwardButtonGtk::BackForwardButtonGtk(Browser* browser, bool is_forward) g_object_set_data(G_OBJECT(widget()), "left-align-popup", reinterpret_cast<void*>(true)); - gtk_util::SetButtonTriggersNavigation(widget()); + GtkUtil::SetButtonTriggersNavigation(widget()); } BackForwardButtonGtk::~BackForwardButtonGtk() { diff --git a/chrome/browser/gtk/blocked_popup_container_view_gtk.cc b/chrome/browser/gtk/blocked_popup_container_view_gtk.cc index 8ada0f0..cfb55e5 100644 --- a/chrome/browser/gtk/blocked_popup_container_view_gtk.cc +++ b/chrome/browser/gtk/blocked_popup_container_view_gtk.cc @@ -173,11 +173,11 @@ void BlockedPopupContainerViewGtk::Init() { GtkWidget* hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(hbox), menu_button_, FALSE, FALSE, kSmallPadding); - gtk_util::CenterWidgetInHBox(hbox, close_button_->widget(), true, 0); + GtkUtil::CenterWidgetInHBox(hbox, close_button_->widget(), true, 0); g_signal_connect(close_button_->widget(), "clicked", G_CALLBACK(OnCloseButtonClicked), this); - container_.Own(gtk_util::CreateGtkBorderBin(hbox, NULL, + container_.Own(GtkUtil::CreateGtkBorderBin(hbox, NULL, kSmallPadding, kSmallPadding, kSmallPadding, kSmallPadding)); // Manually paint the event box. gtk_widget_set_app_paintable(container_.get(), TRUE); diff --git a/chrome/browser/gtk/bookmark_bar_gtk.cc b/chrome/browser/gtk/bookmark_bar_gtk.cc index 5e2c736..2278f59 100644 --- a/chrome/browser/gtk/bookmark_bar_gtk.cc +++ b/chrome/browser/gtk/bookmark_bar_gtk.cc @@ -356,7 +356,7 @@ void BookmarkBarGtk::SetInstructionState() { } void BookmarkBarGtk::RemoveAllBookmarkButtons() { - gtk_util::RemoveAllChildren(bookmark_toolbar_.get()); + GtkUtil::RemoveAllChildren(bookmark_toolbar_.get()); } int BookmarkBarGtk::GetBookmarkButtonCount() { diff --git a/chrome/browser/gtk/bookmark_bubble_gtk.cc b/chrome/browser/gtk/bookmark_bubble_gtk.cc index 67c9dc6..28c3ebd 100644 --- a/chrome/browser/gtk/bookmark_bubble_gtk.cc +++ b/chrome/browser/gtk/bookmark_bubble_gtk.cc @@ -185,7 +185,7 @@ BookmarkBubbleGtk::BookmarkBubbleGtk(GtkWindow* transient_toplevel, // We use a table to allow the labels to line up with each other, along // with the entry and folder combo lining up. - GtkWidget* table = gtk_util::CreateLabeledControlsGroup( + GtkWidget* table = GtkUtil::CreateLabeledControlsGroup( &labels_, l10n_util::GetStringUTF8(IDS_BOOMARK_BUBBLE_TITLE_TEXT).c_str(), name_entry_, diff --git a/chrome/browser/gtk/bookmark_editor_gtk.cc b/chrome/browser/gtk/bookmark_editor_gtk.cc index 8b449a4..07a9ac9 100644 --- a/chrome/browser/gtk/bookmark_editor_gtk.cc +++ b/chrome/browser/gtk/bookmark_editor_gtk.cc @@ -124,7 +124,7 @@ void BookmarkEditorGtk::Init(GtkWindow* parent_window) { // |+-------------------------------------------------------------+| // +---------------------------------------------------------------+ GtkWidget* content_area = GTK_DIALOG(dialog_)->vbox; - gtk_box_set_spacing(GTK_BOX(content_area), gtk_util::kContentAreaSpacing); + gtk_box_set_spacing(GTK_BOX(content_area), GtkUtil::kContentAreaSpacing); GtkWidget* vbox = gtk_vbox_new(FALSE, 12); @@ -142,7 +142,7 @@ void BookmarkEditorGtk::Init(GtkWindow* parent_window) { G_CALLBACK(OnEntryChanged), this); gtk_entry_set_activates_default(GTK_ENTRY(url_entry_), TRUE); - GtkWidget* table = gtk_util::CreateLabeledControlsGroup(NULL, + GtkWidget* table = GtkUtil::CreateLabeledControlsGroup(NULL, l10n_util::GetStringUTF8(IDS_BOOMARK_EDITOR_NAME_LABEL).c_str(), name_entry_, l10n_util::GetStringUTF8(IDS_BOOMARK_EDITOR_URL_LABEL).c_str(), diff --git a/chrome/browser/gtk/bookmark_manager_gtk.cc b/chrome/browser/gtk/bookmark_manager_gtk.cc index e1f39d27..06c86c0 100644 --- a/chrome/browser/gtk/bookmark_manager_gtk.cc +++ b/chrome/browser/gtk/bookmark_manager_gtk.cc @@ -321,7 +321,7 @@ BookmarkManagerGtk::BookmarkManagerGtk(Profile* profile) sending_delayed_mousedown_(false), ignore_rightclicks_(false) { InitWidgets(); - gtk_util::SetWindowIcon(GTK_WINDOW(window_)); + GtkUtil::SetWindowIcon(GTK_WINDOW(window_)); model_->AddObserver(this); if (model_->IsLoaded()) @@ -364,13 +364,13 @@ void BookmarkManagerGtk::InitWidgets() { l10n_util::GetStringUTF8(IDS_BOOKMARK_MANAGER_ORGANIZE_MENU).c_str()); GtkWidget* import_item = gtk_menu_item_new_with_mnemonic( - gtk_util::ConvertAcceleratorsFromWindowsStyle( + GtkUtil::ConvertAcceleratorsFromWindowsStyle( l10n_util::GetStringUTF8(IDS_BOOKMARK_MANAGER_IMPORT_MENU)).c_str()); g_signal_connect(import_item, "activate", G_CALLBACK(OnImportItemActivated), this); GtkWidget* export_item = gtk_menu_item_new_with_mnemonic( - gtk_util::ConvertAcceleratorsFromWindowsStyle( + GtkUtil::ConvertAcceleratorsFromWindowsStyle( l10n_util::GetStringUTF8(IDS_BOOKMARK_MANAGER_EXPORT_MENU)).c_str()); g_signal_connect(export_item, "activate", G_CALLBACK(OnExportItemActivated), this); @@ -570,7 +570,7 @@ void BookmarkManagerGtk::SetInitialWindowSize() { // Otherwise, just set a default size (GTK will override this if it's not // large enough to hold the window's contents). int width = 1, height = 1; - gtk_util::GetWidgetSizeFromResources( + GtkUtil::GetWidgetSizeFromResources( window_, IDS_BOOKMARK_MANAGER_DIALOG_WIDTH_CHARS, IDS_BOOKMARK_MANAGER_DIALOG_HEIGHT_LINES, diff --git a/chrome/browser/gtk/browser_toolbar_gtk.cc b/chrome/browser/gtk/browser_toolbar_gtk.cc index f10d605..4993832 100644 --- a/chrome/browser/gtk/browser_toolbar_gtk.cc +++ b/chrome/browser/gtk/browser_toolbar_gtk.cc @@ -182,7 +182,7 @@ void BrowserToolbarGtk::Init(Profile* profile, home_.reset(BuildToolbarButton(IDR_HOME, IDR_HOME_P, IDR_HOME_H, 0, l10n_util::GetStringUTF8(IDS_TOOLTIP_HOME), GTK_STOCK_HOME)); - gtk_util::SetButtonTriggersNavigation(home_->widget()); + GtkUtil::SetButtonTriggersNavigation(home_->widget()); SetUpDragForHomeButton(); // Group the start, omnibox, and go button into an hbox. @@ -672,9 +672,9 @@ void BrowserToolbarGtk::OnDragDataReceived(GtkWidget* widget, // static gboolean BrowserToolbarGtk::OnPageAppMenuMouseMotion(GtkWidget* menu, GdkEventMotion* event, BrowserToolbarGtk* toolbar) { - if (gtk_util::WidgetContainsCursor(menu == toolbar->app_menu_->widget() ? - toolbar->page_menu_button_.get() : - toolbar->app_menu_button_.get())) { + if (GtkUtil::WidgetContainsCursor(menu == toolbar->app_menu_->widget() ? + toolbar->page_menu_button_.get() : + toolbar->app_menu_button_.get())) { toolbar->ChangeActiveMenu(menu, event->time); return TRUE; } diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc index 983b519d..c5786dda 100644 --- a/chrome/browser/gtk/browser_window_gtk.cc +++ b/chrome/browser/gtk/browser_window_gtk.cc @@ -400,7 +400,7 @@ BrowserWindowGtk::BrowserWindowGtk(Browser* browser) gtk_window_group_add_window(gtk_window_group_new(), window_); g_object_unref(gtk_window_get_group(window_)); - gtk_util::SetWindowIcon(window_); + GtkUtil::SetWindowIcon(window_); SetBackgroundColor(); SetGeometryHints(); ConnectHandlersToSignals(); diff --git a/chrome/browser/gtk/clear_browsing_data_dialog_gtk.cc b/chrome/browser/gtk/clear_browsing_data_dialog_gtk.cc index 4d0451c..18188cd 100644 --- a/chrome/browser/gtk/clear_browsing_data_dialog_gtk.cc +++ b/chrome/browser/gtk/clear_browsing_data_dialog_gtk.cc @@ -33,9 +33,9 @@ ClearBrowsingDataDialogGtk::ClearBrowsingDataDialogGtk(GtkWindow* parent, NULL); GtkWidget* content_area = GTK_DIALOG(dialog)->vbox; - gtk_box_set_spacing(GTK_BOX(content_area), gtk_util::kContentAreaSpacing); + gtk_box_set_spacing(GTK_BOX(content_area), GtkUtil::kContentAreaSpacing); - GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); + GtkWidget* vbox = gtk_vbox_new(FALSE, GtkUtil::kControlSpacing); gtk_container_add(GTK_CONTAINER(content_area), vbox); // Label on top of the checkboxes. @@ -99,7 +99,7 @@ ClearBrowsingDataDialogGtk::ClearBrowsingDataDialogGtk(GtkWindow* parent, G_CALLBACK(HandleOnClickedWidget), this); // Create a horizontal layout for the combo box and label. - GtkWidget* combo_hbox = gtk_hbox_new(FALSE, gtk_util::kLabelSpacing); + GtkWidget* combo_hbox = gtk_hbox_new(FALSE, GtkUtil::kLabelSpacing); GtkWidget* time_period_label_ = gtk_label_new( l10n_util::GetStringUTF8(IDS_CLEAR_BROWSING_DATA_TIME_LABEL).c_str()); gtk_box_pack_start(GTK_BOX(combo_hbox), time_period_label_, FALSE, FALSE, 0); diff --git a/chrome/browser/gtk/constrained_window_gtk.cc b/chrome/browser/gtk/constrained_window_gtk.cc index 1f53a59..2d9e164 100644 --- a/chrome/browser/gtk/constrained_window_gtk.cc +++ b/chrome/browser/gtk/constrained_window_gtk.cc @@ -23,8 +23,8 @@ ConstrainedWindowGtk::ConstrainedWindowGtk( gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_OUT); GtkWidget* alignment = gtk_alignment_new(0.0, 0.0, 1.0, 1.0); gtk_alignment_set_padding(GTK_ALIGNMENT(alignment), - gtk_util::kContentAreaBorder, gtk_util::kContentAreaBorder, - gtk_util::kContentAreaBorder, gtk_util::kContentAreaBorder); + GtkUtil::kContentAreaBorder, GtkUtil::kContentAreaBorder, + GtkUtil::kContentAreaBorder, GtkUtil::kContentAreaBorder); gtk_container_add(GTK_CONTAINER(alignment), dialog); gtk_container_add(GTK_CONTAINER(frame), alignment); gtk_container_add(GTK_CONTAINER(ebox), frame); diff --git a/chrome/browser/gtk/custom_button.cc b/chrome/browser/gtk/custom_button.cc index f27e01b..afd08e7 100644 --- a/chrome/browser/gtk/custom_button.cc +++ b/chrome/browser/gtk/custom_button.cc @@ -72,7 +72,7 @@ gboolean CustomDrawButtonBase::OnExpose(GtkWidget* widget, GdkEventExpose* e) { // The widget might be larger than the pixbuf. Paint the pixbuf flush with the // start of the widget (left for LTR, right for RTL). gfx::Rect bounds = gfx::Rect(0, 0, gdk_pixbuf_get_width(pixbuf), 0); - int x = gtk_util::MirroredLeftPointForRect(widget, bounds); + int x = GtkUtil::MirroredLeftPointForRect(widget, bounds); if (background_image_) { gdk_cairo_set_source_pixbuf(cairo_context, background_image_, x, 0); diff --git a/chrome/browser/gtk/download_item_gtk.cc b/chrome/browser/gtk/download_item_gtk.cc index 78a0b46..ece9424 100644 --- a/chrome/browser/gtk/download_item_gtk.cc +++ b/chrome/browser/gtk/download_item_gtk.cc @@ -211,8 +211,8 @@ DownloadItemGtk::DownloadItemGtk(DownloadShelfGtk* parent_shelf, gtk_misc_set_alignment(GTK_MISC(name_label_), 0, 0.5); gtk_misc_set_alignment(GTK_MISC(status_label_), 0, 0.5); // Until we switch to vector graphics, force the font size. - gtk_util::ForceFontSizePixels(name_label_, 13.4); // 13.4px == 10pt @ 96dpi - gtk_util::ForceFontSizePixels(status_label_, 13.4); // 13.4px == 10pt @ 96dpi + GtkUtil::ForceFontSizePixels(name_label_, 13.4); // 13.4px == 10pt @ 96dpi + GtkUtil::ForceFontSizePixels(status_label_, 13.4); // 13.4px == 10pt @ 96dpi // Stack the labels on top of one another. GtkWidget* text_stack = gtk_vbox_new(FALSE, 0); @@ -298,7 +298,7 @@ DownloadItemGtk::DownloadItemGtk(DownloadShelfGtk* parent_shelf, GtkWidget* dangerous_label = gtk_label_new(NULL); // Until we switch to vector graphics, force the font size. // 13.4px == 10pt @ 96dpi - gtk_util::ForceFontSizePixels(dangerous_label, 13.4); + GtkUtil::ForceFontSizePixels(dangerous_label, 13.4); gtk_label_set_markup(GTK_LABEL(dangerous_label), label_markup); gtk_label_set_line_wrap(GTK_LABEL(dangerous_label), TRUE); // We pass TRUE, TRUE so that the label will condense to less than its @@ -313,14 +313,14 @@ DownloadItemGtk::DownloadItemGtk(DownloadShelfGtk* parent_shelf, l10n_util::GetStringUTF8(IDS_SAVE_DOWNLOAD).c_str()); g_signal_connect(dangerous_accept, "clicked", G_CALLBACK(OnDangerousAccept), this); - gtk_util::CenterWidgetInHBox(dangerous_hbox_, dangerous_accept, false, 0); + GtkUtil::CenterWidgetInHBox(dangerous_hbox_, dangerous_accept, false, 0); // Create the nevermind button. GtkWidget* dangerous_decline = gtk_button_new_with_label( l10n_util::GetStringUTF8(IDS_DISCARD_DOWNLOAD).c_str()); g_signal_connect(dangerous_decline, "clicked", G_CALLBACK(OnDangerousDecline), this); - gtk_util::CenterWidgetInHBox(dangerous_hbox_, dangerous_decline, false, 0); + GtkUtil::CenterWidgetInHBox(dangerous_hbox_, dangerous_decline, false, 0); // Put it in an alignment so that padding will be added on the left and // right. diff --git a/chrome/browser/gtk/download_request_dialog_delegate_gtk.cc b/chrome/browser/gtk/download_request_dialog_delegate_gtk.cc index 8903ee2..921684c 100644 --- a/chrome/browser/gtk/download_request_dialog_delegate_gtk.cc +++ b/chrome/browser/gtk/download_request_dialog_delegate_gtk.cc @@ -29,7 +29,7 @@ DownloadRequestDialogDelegateGtk::DownloadRequestDialogDelegateGtk( : DownloadRequestDialogDelegate(host), responded_(false) { // Create dialog. - root_.Own(gtk_vbox_new(NULL, gtk_util::kContentAreaBorder)); + root_.Own(gtk_vbox_new(NULL, GtkUtil::kContentAreaBorder)); GtkWidget* label = gtk_label_new( l10n_util::GetStringUTF8(IDS_MULTI_DOWNLOAD_WARNING).c_str()); gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5); diff --git a/chrome/browser/gtk/download_shelf_gtk.cc b/chrome/browser/gtk/download_shelf_gtk.cc index 8d83f84..5295f34 100644 --- a/chrome/browser/gtk/download_shelf_gtk.cc +++ b/chrome/browser/gtk/download_shelf_gtk.cc @@ -89,7 +89,7 @@ DownloadShelfGtk::DownloadShelfGtk(Browser* browser, GtkWidget* parent) // Create and pack the close button. close_button_.reset(CustomDrawButton::CloseButton(theme_provider_)); - gtk_util::CenterWidgetInHBox(hbox_.get(), close_button_->widget(), true, 0); + GtkUtil::CenterWidgetInHBox(hbox_.get(), close_button_->widget(), true, 0); g_signal_connect(close_button_->widget(), "clicked", G_CALLBACK(OnButtonClick), this); @@ -101,8 +101,8 @@ DownloadShelfGtk::DownloadShelfGtk(Browser* browser, GtkWidget* parent) G_CALLBACK(OnButtonClick), this); // Until we switch to vector graphics, force the font size. // 13.4px == 10pt @ 96dpi - gtk_util::ForceFontSizePixels(GTK_CHROME_LINK_BUTTON(link_button)->label, - 13.4); + GtkUtil::ForceFontSizePixels(GTK_CHROME_LINK_BUTTON(link_button)->label, + 13.4); // Make the download arrow icon. ResourceBundle& rb = ResourceBundle::GetSharedInstance(); @@ -111,8 +111,8 @@ DownloadShelfGtk::DownloadShelfGtk(Browser* browser, GtkWidget* parent) // Pack the link and the icon in an hbox. link_hbox_ = gtk_hbox_new(FALSE, 5); - gtk_util::CenterWidgetInHBox(link_hbox_, download_image, false, 0); - gtk_util::CenterWidgetInHBox(link_hbox_, link_button, false, 0); + GtkUtil::CenterWidgetInHBox(link_hbox_, download_image, false, 0); + GtkUtil::CenterWidgetInHBox(link_hbox_, link_button, false, 0); gtk_box_pack_end(GTK_BOX(hbox_.get()), link_hbox_, FALSE, FALSE, 0); slide_widget_.reset(new SlideAnimatorGtk(shelf_.get(), diff --git a/chrome/browser/gtk/edit_search_engine_dialog.cc b/chrome/browser/gtk/edit_search_engine_dialog.cc index 509d538..6752623 100644 --- a/chrome/browser/gtk/edit_search_engine_dialog.cc +++ b/chrome/browser/gtk/edit_search_engine_dialog.cc @@ -27,7 +27,7 @@ std::string GetDisplayURL(const TemplateURL& turl) { } GtkWidget* CreateEntryImageHBox(GtkWidget* entry, GtkWidget* image) { - GtkWidget* hbox = gtk_hbox_new(FALSE, gtk_util::kControlSpacing); + GtkWidget* hbox = gtk_hbox_new(FALSE, GtkUtil::kControlSpacing); gtk_box_pack_start(GTK_BOX(hbox), entry, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(hbox), image, FALSE, FALSE, 0); return hbox; @@ -139,7 +139,7 @@ void EditSearchEngineDialog::Init(GtkWindow* parent_window) { controller_->template_url()->prepopulate_id() == 0); } - GtkWidget* controls = gtk_util::CreateLabeledControlsGroup(NULL, + GtkWidget* controls = GtkUtil::CreateLabeledControlsGroup(NULL, l10n_util::GetStringUTF8( IDS_SEARCH_ENGINES_EDITOR_DESCRIPTION_LABEL).c_str(), CreateEntryImageHBox(title_entry_, title_image_), @@ -177,7 +177,7 @@ void EditSearchEngineDialog::Init(GtkWindow* parent_window) { FALSE, FALSE, 0); gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog_)->vbox), - gtk_util::kContentAreaSpacing); + GtkUtil::kContentAreaSpacing); EnableControls(); diff --git a/chrome/browser/gtk/find_bar_gtk.cc b/chrome/browser/gtk/find_bar_gtk.cc index a0179d0..5f17d0c 100644 --- a/chrome/browser/gtk/find_bar_gtk.cc +++ b/chrome/browser/gtk/find_bar_gtk.cc @@ -136,7 +136,7 @@ void FindBarGtk::InitWidgets() { // lateral position. We put that fixed in a SlideAnimatorGtk in order to get // the slide effect. GtkWidget* hbox = gtk_hbox_new(false, 0); - container_ = gtk_util::CreateGtkBorderBin(hbox, NULL, + container_ = GtkUtil::CreateGtkBorderBin(hbox, NULL, kBarPaddingTopBottom, kBarPaddingTopBottom, kEntryPaddingLeft, kBarPaddingRight); gtk_widget_set_app_paintable(container_, TRUE); @@ -157,8 +157,8 @@ void FindBarGtk::InitWidgets() { gtk_widget_set_size_request(widget(), -1, 0); close_button_.reset(CustomDrawButton::CloseButton(NULL)); - gtk_util::CenterWidgetInHBox(hbox, close_button_->widget(), true, - kCloseButtonPaddingLeft); + GtkUtil::CenterWidgetInHBox(hbox, close_button_->widget(), true, + kCloseButtonPaddingLeft); g_signal_connect(G_OBJECT(close_button_->widget()), "clicked", G_CALLBACK(OnClicked), this); gtk_widget_set_tooltip_text(close_button_->widget(), @@ -209,8 +209,8 @@ void FindBarGtk::InitWidgets() { gtk_entry_set_has_frame(GTK_ENTRY(text_entry_), FALSE); // Until we switch to vector graphics, force the font size. - gtk_util::ForceFontSizePixels(text_entry_, 13.4); // 13.4px == 10pt @ 96dpi - gtk_util::ForceFontSizePixels(match_count_centerer, 13.4); + GtkUtil::ForceFontSizePixels(text_entry_, 13.4); // 13.4px == 10pt @ 96dpi + GtkUtil::ForceFontSizePixels(match_count_centerer, 13.4); gtk_box_pack_end(GTK_BOX(content_hbox), match_count_centerer, FALSE, FALSE, 0); @@ -227,13 +227,13 @@ void FindBarGtk::InitWidgets() { gtk_container_add(GTK_CONTAINER(content_event_box), content_hbox); // We fake anti-aliasing by having two borders. - GtkWidget* border_bin = gtk_util::CreateGtkBorderBin(content_event_box, - &kTextBorderColor, - 1, 1, 1, 0); - GtkWidget* border_bin_aa = gtk_util::CreateGtkBorderBin(border_bin, - &kTextBorderColorAA, - 1, 1, 1, 0); - gtk_util::CenterWidgetInHBox(hbox, border_bin_aa, true, 0); + GtkWidget* border_bin = GtkUtil::CreateGtkBorderBin(content_event_box, + &kTextBorderColor, + 1, 1, 1, 0); + GtkWidget* border_bin_aa = GtkUtil::CreateGtkBorderBin(border_bin, + &kTextBorderColorAA, + 1, 1, 1, 0); + GtkUtil::CenterWidgetInHBox(hbox, border_bin_aa, true, 0); // We take care to avoid showing the slide animator widget. gtk_widget_show_all(container_); diff --git a/chrome/browser/gtk/first_run_bubble.cc b/chrome/browser/gtk/first_run_bubble.cc index 12127bd..4c3a502 100644 --- a/chrome/browser/gtk/first_run_bubble.cc +++ b/chrome/browser/gtk/first_run_bubble.cc @@ -110,7 +110,7 @@ FirstRunBubble::FirstRunBubble(Profile* profile, content_ = gtk_vbox_new(FALSE, 5); int width, height; - gtk_util::GetWidgetSizeFromResources(content_, + GtkUtil::GetWidgetSizeFromResources(content_, IDS_FIRSTRUNBUBBLE_DIALOG_WIDTH_CHARS, IDS_FIRSTRUNBUBBLE_DIALOG_HEIGHT_LINES, &width, &height); diff --git a/chrome/browser/gtk/first_run_dialog.cc b/chrome/browser/gtk/first_run_dialog.cc index 50f2321..2758a96 100644 --- a/chrome/browser/gtk/first_run_dialog.cc +++ b/chrome/browser/gtk/first_run_dialog.cc @@ -37,10 +37,10 @@ FirstRunDialog::FirstRunDialog(Profile* profile, int& response) NULL); gtk_window_set_resizable(GTK_WINDOW(dialog_), FALSE); int width, height; - gtk_util::GetWidgetSizeFromResources(dialog_, - IDS_FIRSTRUN_DIALOG_WIDTH_CHARS, - IDS_FIRSTRUN_DIALOG_HEIGHT_LINES, - &width, &height); + GtkUtil::GetWidgetSizeFromResources(dialog_, + IDS_FIRSTRUN_DIALOG_WIDTH_CHARS, + IDS_FIRSTRUN_DIALOG_HEIGHT_LINES, + &width, &height); gtk_window_set_default_size(GTK_WINDOW(dialog_), width, height); g_signal_connect(G_OBJECT(dialog_), "delete-event", G_CALLBACK(gtk_widget_hide_on_delete), NULL); @@ -80,7 +80,7 @@ FirstRunDialog::FirstRunDialog(Profile* profile, int& response) l10n_util::GetStringUTF8(IDS_FR_CUSTOMIZE_DEFAULT_BROWSER).c_str()); gtk_box_pack_start(GTK_BOX(vbox), make_default_, FALSE, FALSE, 0); - GtkWidget* combo_hbox = gtk_hbox_new(FALSE, gtk_util::kLabelSpacing); + GtkWidget* combo_hbox = gtk_hbox_new(FALSE, GtkUtil::kLabelSpacing); import_data_ = gtk_check_button_new_with_label( l10n_util::GetStringUTF8(IDS_FR_CUSTOMIZE_IMPORT).c_str()); gtk_box_pack_start(GTK_BOX(combo_hbox), import_data_, FALSE, FALSE, 0); diff --git a/chrome/browser/gtk/hung_renderer_dialog_gtk.cc b/chrome/browser/gtk/hung_renderer_dialog_gtk.cc index 6ddf34c..f48e01b 100644 --- a/chrome/browser/gtk/hung_renderer_dialog_gtk.cc +++ b/chrome/browser/gtk/hung_renderer_dialog_gtk.cc @@ -74,7 +74,7 @@ void HungRendererDialogGtk::Init() { l10n_util::GetStringUTF8(IDS_BROWSER_HANGMONITOR_RENDERER_WAIT).c_str(), GTK_RESPONSE_OK, NULL)); - gtk_util::SetWindowIcon(GTK_WINDOW(dialog_)); + GtkUtil::SetWindowIcon(GTK_WINDOW(dialog_)); gtk_dialog_set_default_response(dialog_, GTK_RESPONSE_OK); g_signal_connect(dialog_, "response", G_CALLBACK(OnDialogResponseThunk), this); @@ -96,7 +96,7 @@ void HungRendererDialogGtk::Init() { // | kill button wait button| // ·-----------------------------------· GtkWidget* contents_vbox = dialog_->vbox; - gtk_box_set_spacing(GTK_BOX(contents_vbox), gtk_util::kContentAreaSpacing); + gtk_box_set_spacing(GTK_BOX(contents_vbox), GtkUtil::kContentAreaSpacing); GtkWidget* hbox = gtk_hbox_new(FALSE, 12); gtk_box_pack_start(GTK_BOX(contents_vbox), hbox, TRUE, TRUE, 0); @@ -109,7 +109,7 @@ void HungRendererDialogGtk::Init() { GtkWidget* icon = gtk_image_new_from_pixbuf(icon_pixbuf); gtk_box_pack_start(GTK_BOX(icon_vbox), icon, FALSE, FALSE, 0); - GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); + GtkWidget* vbox = gtk_vbox_new(FALSE, GtkUtil::kControlSpacing); gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 0); GtkWidget* text = gtk_label_new( diff --git a/chrome/browser/gtk/import_dialog_gtk.cc b/chrome/browser/gtk/import_dialog_gtk.cc index 33a12cb..11b732e 100644 --- a/chrome/browser/gtk/import_dialog_gtk.cc +++ b/chrome/browser/gtk/import_dialog_gtk.cc @@ -48,9 +48,9 @@ ImportDialogGtk::ImportDialogGtk(GtkWindow* parent, Profile* profile) : gtk_widget_set_size_request(dialog_, 300, -1); GtkWidget* content_area = GTK_DIALOG(dialog_)->vbox; - gtk_box_set_spacing(GTK_BOX(content_area), gtk_util::kContentAreaSpacing); + gtk_box_set_spacing(GTK_BOX(content_area), GtkUtil::kContentAreaSpacing); - GtkWidget* combo_hbox = gtk_hbox_new(FALSE, gtk_util::kLabelSpacing); + GtkWidget* combo_hbox = gtk_hbox_new(FALSE, GtkUtil::kLabelSpacing); GtkWidget* from = gtk_label_new( l10n_util::GetStringUTF8(IDS_IMPORT_FROM_LABEL).c_str()); gtk_box_pack_start(GTK_BOX(combo_hbox), from, FALSE, FALSE, 0); @@ -60,7 +60,7 @@ ImportDialogGtk::ImportDialogGtk(GtkWindow* parent, Profile* profile) : gtk_box_pack_start(GTK_BOX(content_area), combo_hbox, FALSE, FALSE, 0); - GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); + GtkWidget* vbox = gtk_vbox_new(FALSE, GtkUtil::kControlSpacing); GtkWidget* description = gtk_label_new( l10n_util::GetStringUTF8(IDS_IMPORT_ITEMS_LABEL).c_str()); diff --git a/chrome/browser/gtk/import_lock_dialog_gtk.cc b/chrome/browser/gtk/import_lock_dialog_gtk.cc index 465ccea..cc536cd 100644 --- a/chrome/browser/gtk/import_lock_dialog_gtk.cc +++ b/chrome/browser/gtk/import_lock_dialog_gtk.cc @@ -31,7 +31,7 @@ ImportLockDialogGtk::ImportLockDialogGtk(GtkWindow* parent, NULL); GtkWidget* content_area = GTK_DIALOG(dialog_)->vbox; - gtk_box_set_spacing(GTK_BOX(content_area), gtk_util::kContentAreaSpacing); + gtk_box_set_spacing(GTK_BOX(content_area), GtkUtil::kContentAreaSpacing); GtkWidget* label = gtk_label_new( l10n_util::GetStringUTF8(IDS_IMPORTER_LOCK_TEXT).c_str()); gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); diff --git a/chrome/browser/gtk/import_progress_dialog_gtk.cc b/chrome/browser/gtk/import_progress_dialog_gtk.cc index d44aac4..2a3c4d6 100644 --- a/chrome/browser/gtk/import_progress_dialog_gtk.cc +++ b/chrome/browser/gtk/import_progress_dialog_gtk.cc @@ -125,7 +125,7 @@ ImportProgressDialogGtk::ImportProgressDialogGtk(const string16& source_profile, importer_host_->set_parent_window(GTK_WINDOW(dialog_)); GtkWidget* content_area = GTK_DIALOG(dialog_)->vbox; - gtk_box_set_spacing(GTK_BOX(content_area), gtk_util::kContentAreaSpacing); + gtk_box_set_spacing(GTK_BOX(content_area), GtkUtil::kContentAreaSpacing); GtkWidget* import_info = gtk_label_new( l10n_util::GetStringFUTF8(IDS_IMPORT_PROGRESS_INFO, diff --git a/chrome/browser/gtk/infobar_container_gtk.cc b/chrome/browser/gtk/infobar_container_gtk.cc index 9489026..0cc648d 100644 --- a/chrome/browser/gtk/infobar_container_gtk.cc +++ b/chrome/browser/gtk/infobar_container_gtk.cc @@ -64,7 +64,7 @@ void InfoBarContainerGtk::ChangeTabContents(TabContents* contents) { if (tab_contents_) registrar_.RemoveAll(); - gtk_util::RemoveAllChildren(widget()); + GtkUtil::RemoveAllChildren(widget()); tab_contents_ = contents; if (tab_contents_) { diff --git a/chrome/browser/gtk/infobar_gtk.cc b/chrome/browser/gtk/infobar_gtk.cc index 4acc96f..aa9456f 100644 --- a/chrome/browser/gtk/infobar_gtk.cc +++ b/chrome/browser/gtk/infobar_gtk.cc @@ -80,8 +80,8 @@ InfoBar::InfoBar(InfoBarDelegate* delegate) // The -1 on the kInfoBarHeight is to account for the border. gtk_widget_set_size_request(bg_box, -1, kInfoBarHeight - 1); - border_bin_.Own(gtk_util::CreateGtkBorderBin(bg_box, &kBorderColor, - 0, 1, 0, 0)); + border_bin_.Own(GtkUtil::CreateGtkBorderBin(bg_box, &kBorderColor, + 0, 1, 0, 0)); // Add the icon on the left, if any. SkBitmap* icon = delegate->GetIcon(); @@ -94,7 +94,7 @@ InfoBar::InfoBar(InfoBarDelegate* delegate) // TODO(erg): GTK theme the info bar. close_button_.reset(CustomDrawButton::CloseButton(NULL)); - gtk_util::CenterWidgetInHBox(hbox_, close_button_->widget(), true, 0); + GtkUtil::CenterWidgetInHBox(hbox_, close_button_->widget(), true, 0); g_signal_connect(close_button_->widget(), "clicked", G_CALLBACK(OnCloseButton), this); @@ -207,7 +207,7 @@ class LinkInfoBar : public InfoBar { // this hbox that doesn't use kElementPadding. GtkWidget* hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(hbox), initial_label, FALSE, FALSE, 0); - gtk_util::CenterWidgetInHBox(hbox, link_button, false, 0); + GtkUtil::CenterWidgetInHBox(hbox, link_button, false, 0); gtk_box_pack_start(GTK_BOX(hbox), trailing_label, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(hbox_), hbox, FALSE, FALSE, 0); } @@ -252,7 +252,7 @@ class ConfirmInfoBar : public AlertInfoBar { if (delegate_->AsConfirmInfoBarDelegate()->GetButtons() & type) { GtkWidget* button = gtk_button_new_with_label(WideToUTF8( delegate_->AsConfirmInfoBarDelegate()->GetButtonLabel(type)).c_str()); - gtk_util::CenterWidgetInHBox(hbox_, button, true, 0); + GtkUtil::CenterWidgetInHBox(hbox_, button, true, 0); g_signal_connect(button, "clicked", G_CALLBACK(type == ConfirmInfoBarDelegate::BUTTON_OK ? OnOkButton : OnCancelButton), diff --git a/chrome/browser/gtk/keyword_editor_view.cc b/chrome/browser/gtk/keyword_editor_view.cc index a2e098e..002ede5 100644 --- a/chrome/browser/gtk/keyword_editor_view.cc +++ b/chrome/browser/gtk/keyword_editor_view.cc @@ -91,14 +91,14 @@ void KeywordEditorView::Init() { GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE, NULL); - gtk_util::SetWindowIcon(GTK_WINDOW(dialog_)); + GtkUtil::SetWindowIcon(GTK_WINDOW(dialog_)); gtk_window_set_default_size(GTK_WINDOW(dialog_), kDialogDefaultWidth, kDialogDefaultHeight); gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog_)->vbox), - gtk_util::kContentAreaSpacing); + GtkUtil::kContentAreaSpacing); - GtkWidget* hbox = gtk_hbox_new(FALSE, gtk_util::kControlSpacing); + GtkWidget* hbox = gtk_hbox_new(FALSE, GtkUtil::kControlSpacing); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog_)->vbox), hbox); GtkWidget* scroll_window = gtk_scrolled_window_new(NULL, NULL); @@ -159,7 +159,7 @@ void KeywordEditorView::Init() { g_signal_connect(G_OBJECT(selection_), "changed", G_CALLBACK(OnSelectionChanged), this); - GtkWidget* button_box = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); + GtkWidget* button_box = gtk_vbox_new(FALSE, GtkUtil::kControlSpacing); gtk_box_pack_start(GTK_BOX(hbox), button_box, FALSE, FALSE, 0); add_button_ = gtk_button_new_with_label( diff --git a/chrome/browser/gtk/location_bar_view_gtk.cc b/chrome/browser/gtk/location_bar_view_gtk.cc index 8988f47f..8682c5a 100644 --- a/chrome/browser/gtk/location_bar_view_gtk.cc +++ b/chrome/browser/gtk/location_bar_view_gtk.cc @@ -168,8 +168,8 @@ void LocationBarViewGtk::Init(bool popup_window_mode) { // This crazy stack of alignments and event boxes creates a box around the // keyword text with a border, background color, and padding around the text. gtk_container_add(GTK_CONTAINER(tab_to_search_), - gtk_util::CreateGtkBorderBin( - gtk_util::CreateGtkBorderBin( + GtkUtil::CreateGtkBorderBin( + GtkUtil::CreateGtkBorderBin( tab_to_search_label_, &kKeywordBackgroundColor, 1, 1, 2, 2), &kKeywordBorderColor, 1, 1, 1, 1)); diff --git a/chrome/browser/gtk/menu_gtk.cc b/chrome/browser/gtk/menu_gtk.cc index f0a85d8..1548e44 100644 --- a/chrome/browser/gtk/menu_gtk.cc +++ b/chrome/browser/gtk/menu_gtk.cc @@ -13,8 +13,6 @@ #include "chrome/common/gtk_util.h" #include "third_party/skia/include/core/SkBitmap.h" -using gtk_util::ConvertAcceleratorsFromWindowsStyle; - MenuGtk::MenuGtk(MenuGtk::Delegate* delegate, const MenuCreateMaterial* menu_data, GtkAccelGroup* accel_group) @@ -47,9 +45,9 @@ void MenuGtk::ConnectSignalHandlers() { void MenuGtk::AppendMenuItemWithLabel(int command_id, const std::string& label) { - std::string converted_label = ConvertAcceleratorsFromWindowsStyle(label); + std::string converted = GtkUtil::ConvertAcceleratorsFromWindowsStyle(label); GtkWidget* menu_item = - gtk_menu_item_new_with_mnemonic(converted_label.c_str()); + gtk_menu_item_new_with_mnemonic(converted.c_str()); AppendMenuItem(command_id, menu_item); } @@ -62,9 +60,9 @@ void MenuGtk::AppendMenuItemWithIcon(int command_id, void MenuGtk::AppendCheckMenuItemWithLabel(int command_id, const std::string& label) { - std::string converted_label = ConvertAcceleratorsFromWindowsStyle(label); + std::string converted = GtkUtil::ConvertAcceleratorsFromWindowsStyle(label); GtkWidget* menu_item = - gtk_check_menu_item_new_with_mnemonic(converted_label.c_str()); + gtk_check_menu_item_new_with_mnemonic(converted.c_str()); AppendMenuItem(command_id, menu_item); } @@ -135,7 +133,7 @@ void MenuGtk::BuildMenuIn(GtkWidget* menu, DCHECK(!label.empty()); } - label = ConvertAcceleratorsFromWindowsStyle(label); + label = GtkUtil::ConvertAcceleratorsFromWindowsStyle(label); switch (menu_data->type) { case MENU_RADIO: @@ -195,9 +193,9 @@ void MenuGtk::BuildMenuIn(GtkWidget* menu, GtkWidget* MenuGtk::BuildMenuItemWithImage(const std::string& label, const SkBitmap& icon) { - std::string converted_label = ConvertAcceleratorsFromWindowsStyle(label); + std::string converted = GtkUtil::ConvertAcceleratorsFromWindowsStyle(label); GtkWidget* menu_item = - gtk_image_menu_item_new_with_mnemonic(converted_label.c_str()); + gtk_image_menu_item_new_with_mnemonic(converted.c_str()); GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(&icon); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item), diff --git a/chrome/browser/gtk/options/advanced_contents_gtk.cc b/chrome/browser/gtk/options/advanced_contents_gtk.cc index 4e615e5..96ab10e 100644 --- a/chrome/browser/gtk/options/advanced_contents_gtk.cc +++ b/chrome/browser/gtk/options/advanced_contents_gtk.cc @@ -149,7 +149,7 @@ class DownloadSection : public OptionsPageBase { DownloadSection::DownloadSection(Profile* profile) : OptionsPageBase(profile), initializing_(true) { - page_ = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); + page_ = gtk_vbox_new(FALSE, GtkUtil::kControlSpacing); // Download location options. download_location_button_ = gtk_file_chooser_button_new( @@ -174,7 +174,7 @@ DownloadSection::DownloadSection(Profile* profile) } } - GtkWidget* download_location_control = gtk_util::CreateLabeledControlsGroup( + GtkWidget* download_location_control = GtkUtil::CreateLabeledControlsGroup( NULL, l10n_util::GetStringUTF8( IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE).c_str(), @@ -313,7 +313,7 @@ class NetworkSection : public OptionsPageBase { NetworkSection::NetworkSection(Profile* profile) : OptionsPageBase(profile) { - page_ = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); + page_ = gtk_vbox_new(FALSE, GtkUtil::kControlSpacing); GtkWidget* proxy_description_label = CreateWrappedLabel( IDS_OPTIONS_PROXIES_LABEL); @@ -472,7 +472,7 @@ class PrivacySection : public OptionsPageBase { PrivacySection::PrivacySection(Profile* profile) : OptionsPageBase(profile), initializing_(true) { - page_ = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); + page_ = gtk_vbox_new(FALSE, GtkUtil::kControlSpacing); GtkWidget* section_description_label = CreateWrappedLabel( IDS_OPTIONS_DISABLE_SERVICES); @@ -533,7 +533,7 @@ PrivacySection::PrivacySection(Profile* profile) gtk_misc_set_alignment(GTK_MISC(cookie_description_label), 0, 0); gtk_box_pack_start(GTK_BOX(page_), cookie_description_label, FALSE, FALSE, 0); - GtkWidget* cookie_controls = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); + GtkWidget* cookie_controls = gtk_vbox_new(FALSE, GtkUtil::kControlSpacing); gtk_box_pack_start(GTK_BOX(page_), OptionsLayoutBuilderGtk::IndentWidget(cookie_controls), FALSE, FALSE, 0); @@ -792,7 +792,7 @@ class SecuritySection : public OptionsPageBase { SecuritySection::SecuritySection(Profile* profile) : OptionsPageBase(profile) { - page_ = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); + page_ = gtk_vbox_new(FALSE, GtkUtil::kControlSpacing); GtkWidget* manage_certificates_label = CreateWrappedLabel( IDS_OPTIONS_CERTIFICATES_LABEL); @@ -850,7 +850,7 @@ class WebContentSection : public OptionsPageBase { WebContentSection::WebContentSection(Profile* profile) : OptionsPageBase(profile) { - page_ = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); + page_ = gtk_vbox_new(FALSE, GtkUtil::kControlSpacing); GtkWidget* fonts_and_languages_label = CreateWrappedLabel( IDS_OPTIONS_FONTSETTINGS_INFO); diff --git a/chrome/browser/gtk/options/advanced_page_gtk.cc b/chrome/browser/gtk/options/advanced_page_gtk.cc index 517669a..f1cbd99 100644 --- a/chrome/browser/gtk/options/advanced_page_gtk.cc +++ b/chrome/browser/gtk/options/advanced_page_gtk.cc @@ -20,9 +20,9 @@ AdvancedPageGtk::~AdvancedPageGtk() { } void AdvancedPageGtk::Init() { - page_ = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); + page_ = gtk_vbox_new(FALSE, GtkUtil::kControlSpacing); gtk_container_set_border_width(GTK_CONTAINER(page_), - gtk_util::kContentAreaBorder); + GtkUtil::kContentAreaBorder); GtkWidget* scroll_window = gtk_scrolled_window_new(NULL, NULL); gtk_container_add(GTK_CONTAINER(page_), scroll_window); diff --git a/chrome/browser/gtk/options/content_page_gtk.cc b/chrome/browser/gtk/options/content_page_gtk.cc index 3d8d9f6..5e19dc6 100644 --- a/chrome/browser/gtk/options/content_page_gtk.cc +++ b/chrome/browser/gtk/options/content_page_gtk.cc @@ -82,7 +82,7 @@ void ContentPageGtk::NotifyPrefChanged(const std::wstring* pref_name) { // ContentPageGtk, private: GtkWidget* ContentPageGtk::InitPasswordSavingGroup() { - GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); + GtkWidget* vbox = gtk_vbox_new(FALSE, GtkUtil::kControlSpacing); // Ask to save radio button. passwords_asktosave_radio_ = gtk_radio_button_new_with_label(NULL, @@ -103,7 +103,7 @@ GtkWidget* ContentPageGtk::InitPasswordSavingGroup() { // Add the exceptions button into its own horizontal box so it does not // depend on the spacing above. - GtkWidget* button_hbox = gtk_hbox_new(FALSE, gtk_util::kLabelSpacing); + GtkWidget* button_hbox = gtk_hbox_new(FALSE, GtkUtil::kLabelSpacing); gtk_container_add(GTK_CONTAINER(vbox), button_hbox); GtkWidget* passwords_exceptions_button = gtk_button_new_with_label( l10n_util::GetStringUTF8(IDS_OPTIONS_PASSWORDS_EXCEPTIONS).c_str()); @@ -116,7 +116,7 @@ GtkWidget* ContentPageGtk::InitPasswordSavingGroup() { } GtkWidget* ContentPageGtk::InitFormAutofillGroup() { - GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); + GtkWidget* vbox = gtk_vbox_new(FALSE, GtkUtil::kControlSpacing); // Ask to save radio button. form_autofill_asktosave_radio_ = gtk_radio_button_new_with_label(NULL, @@ -139,7 +139,7 @@ GtkWidget* ContentPageGtk::InitFormAutofillGroup() { } GtkWidget* ContentPageGtk::InitBrowsingDataGroup() { - GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); + GtkWidget* vbox = gtk_vbox_new(FALSE, GtkUtil::kControlSpacing); // Browsing data label. GtkWidget* browsing_data_label = gtk_label_new( @@ -149,7 +149,7 @@ GtkWidget* ContentPageGtk::InitBrowsingDataGroup() { gtk_box_pack_start(GTK_BOX(vbox), browsing_data_label, FALSE, FALSE, 0); // Horizontal two button layout. - GtkWidget* button_hbox = gtk_hbox_new(FALSE, gtk_util::kControlSpacing); + GtkWidget* button_hbox = gtk_hbox_new(FALSE, GtkUtil::kControlSpacing); gtk_container_add(GTK_CONTAINER(vbox), button_hbox); // Import button. @@ -170,7 +170,7 @@ GtkWidget* ContentPageGtk::InitBrowsingDataGroup() { } GtkWidget* ContentPageGtk::InitThemesGroup() { - GtkWidget* hbox = gtk_hbox_new(FALSE, gtk_util::kLabelSpacing); + GtkWidget* hbox = gtk_hbox_new(FALSE, GtkUtil::kLabelSpacing); // GTK theme button. GtkWidget* gtk_theme_button = gtk_button_new_with_label( diff --git a/chrome/browser/gtk/options/cookies_view.cc b/chrome/browser/gtk/options/cookies_view.cc index 12087ec..4821e4e 100644 --- a/chrome/browser/gtk/options/cookies_view.cc +++ b/chrome/browser/gtk/options/cookies_view.cc @@ -75,7 +75,7 @@ void CookiesView::Init() { remove_button_ = gtk_dialog_add_button( GTK_DIALOG(dialog_), - gtk_util::ConvertAcceleratorsFromWindowsStyle( + GtkUtil::ConvertAcceleratorsFromWindowsStyle( l10n_util::GetStringUTF8(IDS_COOKIES_REMOVE_LABEL)).c_str(), RESPONSE_REMOVE); gtk_button_box_set_child_secondary( @@ -85,7 +85,7 @@ void CookiesView::Init() { remove_all_button_ = gtk_dialog_add_button( GTK_DIALOG(dialog_), - gtk_util::ConvertAcceleratorsFromWindowsStyle( + GtkUtil::ConvertAcceleratorsFromWindowsStyle( l10n_util::GetStringUTF8(IDS_COOKIES_REMOVE_ALL_LABEL)).c_str(), RESPONSE_REMOVE_ALL); gtk_button_box_set_child_secondary( @@ -97,12 +97,12 @@ void CookiesView::Init() { gtk_window_set_default_size(GTK_WINDOW(dialog_), kDialogDefaultWidth, kDialogDefaultHeight); gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog_)->vbox), - gtk_util::kContentAreaSpacing); + GtkUtil::kContentAreaSpacing); g_signal_connect(dialog_, "response", G_CALLBACK(OnResponse), this); g_signal_connect(dialog_, "destroy", G_CALLBACK(OnWindowDestroy), this); // Filtering controls. - GtkWidget* filter_hbox = gtk_hbox_new(FALSE, gtk_util::kControlSpacing); + GtkWidget* filter_hbox = gtk_hbox_new(FALSE, GtkUtil::kControlSpacing); filter_entry_ = gtk_entry_new(); g_signal_connect(G_OBJECT(filter_entry_), "activate", G_CALLBACK(OnFilterEntryActivated), this); @@ -111,21 +111,21 @@ void CookiesView::Init() { gtk_box_pack_start(GTK_BOX(filter_hbox), filter_entry_, TRUE, TRUE, 0); filter_clear_button_ = gtk_button_new_with_mnemonic( - gtk_util::ConvertAcceleratorsFromWindowsStyle( + GtkUtil::ConvertAcceleratorsFromWindowsStyle( l10n_util::GetStringUTF8(IDS_COOKIES_CLEAR_SEARCH_LABEL)).c_str()); g_signal_connect(G_OBJECT(filter_clear_button_), "clicked", G_CALLBACK(OnFilterClearButtonClicked), this); gtk_box_pack_start(GTK_BOX(filter_hbox), filter_clear_button_, FALSE, FALSE, 0); - GtkWidget* filter_controls = gtk_util::CreateLabeledControlsGroup(NULL, + GtkWidget* filter_controls = GtkUtil::CreateLabeledControlsGroup(NULL, l10n_util::GetStringUTF8(IDS_COOKIES_SEARCH_LABEL).c_str(), filter_hbox, NULL); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog_)->vbox), filter_controls, FALSE, FALSE, 0); // Cookie list. - GtkWidget* cookie_list_vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); + GtkWidget* cookie_list_vbox = gtk_vbox_new(FALSE, GtkUtil::kControlSpacing); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog_)->vbox), cookie_list_vbox, TRUE, TRUE, 0); @@ -194,7 +194,7 @@ void CookiesView::Init() { cookie_details_table_ = gtk_table_new(7, 2, FALSE); gtk_container_add(GTK_CONTAINER(details_frame), cookie_details_table_); gtk_table_set_col_spacing(GTK_TABLE(cookie_details_table_), 0, - gtk_util::kLabelSpacing); + GtkUtil::kLabelSpacing); // Realize a label so that its style gets initialized. gtk_widget_realize(description_label); diff --git a/chrome/browser/gtk/options/exceptions_page_gtk.cc b/chrome/browser/gtk/options/exceptions_page_gtk.cc index ecdbf60..ceb310f 100644 --- a/chrome/browser/gtk/options/exceptions_page_gtk.cc +++ b/chrome/browser/gtk/options/exceptions_page_gtk.cc @@ -44,7 +44,7 @@ ExceptionsPageGtk::ExceptionsPageGtk(Profile* profile) g_signal_connect(G_OBJECT(remove_all_button_), "clicked", G_CALLBACK(OnRemoveAllButtonClicked), this); - GtkWidget* buttons = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); + GtkWidget* buttons = gtk_vbox_new(FALSE, GtkUtil::kControlSpacing); gtk_box_pack_start(GTK_BOX(buttons), remove_button_, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(buttons), remove_all_button_, FALSE, FALSE, 0); @@ -58,9 +58,9 @@ ExceptionsPageGtk::ExceptionsPageGtk(Profile* profile) InitExceptionTree(); gtk_container_add(GTK_CONTAINER(scroll_window), exception_tree_); - page_ = gtk_hbox_new(FALSE, gtk_util::kControlSpacing); + page_ = gtk_hbox_new(FALSE, GtkUtil::kControlSpacing); gtk_container_set_border_width(GTK_CONTAINER(page_), - gtk_util::kContentAreaBorder); + GtkUtil::kContentAreaBorder); gtk_box_pack_end(GTK_BOX(page_), buttons, FALSE, FALSE, 0); gtk_box_pack_end(GTK_BOX(page_), scroll_window, TRUE, TRUE, 0); } diff --git a/chrome/browser/gtk/options/fonts_languages_window_gtk.cc b/chrome/browser/gtk/options/fonts_languages_window_gtk.cc index 255a495..5192b90 100644 --- a/chrome/browser/gtk/options/fonts_languages_window_gtk.cc +++ b/chrome/browser/gtk/options/fonts_languages_window_gtk.cc @@ -15,7 +15,7 @@ #include "grit/generated_resources.h" /////////////////////////////////////////////////////////////////////////////// -// FontsLanguagesWindowGtk +// FontsLanguagesWindowGtk // // The contents of the Options dialog window. @@ -69,7 +69,7 @@ FontsLanguagesWindowGtk::FontsLanguagesWindowGtk(Profile* profile) NULL); gtk_window_set_default_size(GTK_WINDOW(dialog_), 500, -1); gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog_)->vbox), - gtk_util::kContentAreaSpacing); + GtkUtil::kContentAreaSpacing); notebook_ = gtk_notebook_new(); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog_)->vbox), notebook_); diff --git a/chrome/browser/gtk/options/fonts_page_gtk.cc b/chrome/browser/gtk/options/fonts_page_gtk.cc index e75369a..a46b6ff 100644 --- a/chrome/browser/gtk/options/fonts_page_gtk.cc +++ b/chrome/browser/gtk/options/fonts_page_gtk.cc @@ -54,7 +54,7 @@ void FontsPageGtk::Init() { g_signal_connect(fixed_font_button_, "font-set", G_CALLBACK(OnFixedFontSet), this); - GtkWidget* font_controls = gtk_util::CreateLabeledControlsGroup(NULL, + GtkWidget* font_controls = GtkUtil::CreateLabeledControlsGroup(NULL, l10n_util::GetStringUTF8( IDS_FONT_LANGUAGE_SETTING_FONT_SELECTOR_SERIF_LABEL).c_str(), serif_font_button_, @@ -73,7 +73,7 @@ void FontsPageGtk::Init() { InitDefaultEncodingComboBox(); std::string encoding_group_description = l10n_util::GetStringUTF8( IDS_FONT_LANGUAGE_SETTING_FONT_DEFAULT_ENCODING_SELECTOR_LABEL); - GtkWidget* encoding_controls = gtk_util::CreateLabeledControlsGroup(NULL, + GtkWidget* encoding_controls = GtkUtil::CreateLabeledControlsGroup(NULL, encoding_group_description.c_str(), default_encoding_combobox_, NULL); diff --git a/chrome/browser/gtk/options/general_page_gtk.cc b/chrome/browser/gtk/options/general_page_gtk.cc index 636d2e0..7036ff1 100644 --- a/chrome/browser/gtk/options/general_page_gtk.cc +++ b/chrome/browser/gtk/options/general_page_gtk.cc @@ -171,7 +171,7 @@ void GeneralPageGtk::HighlightGroup(OptionsGroup highlight_group) { // GeneralPageGtk, private: GtkWidget* GeneralPageGtk::InitStartupGroup() { - GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); + GtkWidget* vbox = gtk_vbox_new(FALSE, GtkUtil::kControlSpacing); startup_homepage_radio_ = gtk_radio_button_new_with_label(NULL, l10n_util::GetStringUTF8( @@ -196,7 +196,7 @@ GtkWidget* GeneralPageGtk::InitStartupGroup() { gtk_box_pack_start(GTK_BOX(vbox), startup_custom_radio_, FALSE, FALSE, 0); GtkWidget* url_list_container = gtk_hbox_new(FALSE, - gtk_util::kControlSpacing); + GtkUtil::kControlSpacing); gtk_box_pack_start(GTK_BOX(vbox), url_list_container, TRUE, TRUE, 0); GtkWidget* scroll_window = gtk_scrolled_window_new(NULL, NULL); @@ -238,26 +238,26 @@ GtkWidget* GeneralPageGtk::InitStartupGroup() { profile(), &fav_icon_consumer_)); - GtkWidget* url_list_buttons = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); + GtkWidget* url_list_buttons = gtk_vbox_new(FALSE, GtkUtil::kControlSpacing); gtk_box_pack_end(GTK_BOX(url_list_container), url_list_buttons, FALSE, FALSE, 0); startup_add_custom_page_button_ = gtk_button_new_with_mnemonic( - gtk_util::ConvertAcceleratorsFromWindowsStyle( + GtkUtil::ConvertAcceleratorsFromWindowsStyle( l10n_util::GetStringUTF8(IDS_OPTIONS_STARTUP_ADD_BUTTON)).c_str()); g_signal_connect(G_OBJECT(startup_add_custom_page_button_), "clicked", G_CALLBACK(OnStartupAddCustomPageClicked), this); gtk_box_pack_start(GTK_BOX(url_list_buttons), startup_add_custom_page_button_, FALSE, FALSE, 0); startup_remove_custom_page_button_ = gtk_button_new_with_mnemonic( - gtk_util::ConvertAcceleratorsFromWindowsStyle( + GtkUtil::ConvertAcceleratorsFromWindowsStyle( l10n_util::GetStringUTF8(IDS_OPTIONS_STARTUP_REMOVE_BUTTON)).c_str()); g_signal_connect(G_OBJECT(startup_remove_custom_page_button_), "clicked", G_CALLBACK(OnStartupRemoveCustomPageClicked), this); gtk_box_pack_start(GTK_BOX(url_list_buttons), startup_remove_custom_page_button_, FALSE, FALSE, 0); startup_use_current_page_button_ = gtk_button_new_with_mnemonic( - gtk_util::ConvertAcceleratorsFromWindowsStyle( + GtkUtil::ConvertAcceleratorsFromWindowsStyle( l10n_util::GetStringUTF8(IDS_OPTIONS_STARTUP_USE_CURRENT)).c_str()); g_signal_connect(G_OBJECT(startup_use_current_page_button_), "clicked", G_CALLBACK(OnStartupUseCurrentPageClicked), this); @@ -268,7 +268,7 @@ GtkWidget* GeneralPageGtk::InitStartupGroup() { } GtkWidget* GeneralPageGtk::InitHomepageGroup() { - GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); + GtkWidget* vbox = gtk_vbox_new(FALSE, GtkUtil::kControlSpacing); homepage_use_newtab_radio_ = gtk_radio_button_new_with_label(NULL, l10n_util::GetStringUTF8(IDS_OPTIONS_HOMEPAGE_USE_NEWTAB).c_str()); @@ -276,7 +276,7 @@ GtkWidget* GeneralPageGtk::InitHomepageGroup() { G_CALLBACK(OnNewTabIsHomePageToggled), this); gtk_container_add(GTK_CONTAINER(vbox), homepage_use_newtab_radio_); - GtkWidget* homepage_hbox = gtk_hbox_new(FALSE, gtk_util::kLabelSpacing); + GtkWidget* homepage_hbox = gtk_hbox_new(FALSE, GtkUtil::kLabelSpacing); gtk_container_add(GTK_CONTAINER(vbox), homepage_hbox); homepage_use_url_radio_ = gtk_radio_button_new_with_label_from_widget( @@ -302,7 +302,7 @@ GtkWidget* GeneralPageGtk::InitHomepageGroup() { } GtkWidget* GeneralPageGtk::InitDefaultSearchGroup() { - GtkWidget* hbox = gtk_hbox_new(FALSE, gtk_util::kControlSpacing); + GtkWidget* hbox = gtk_hbox_new(FALSE, GtkUtil::kControlSpacing); default_search_engines_model_ = gtk_list_store_new(SEARCH_ENGINES_COL_COUNT, G_TYPE_UINT, @@ -340,7 +340,7 @@ GtkWidget* GeneralPageGtk::InitDefaultSearchGroup() { } GtkWidget* GeneralPageGtk::InitDefaultBrowserGroup() { - GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); + GtkWidget* vbox = gtk_vbox_new(FALSE, GtkUtil::kControlSpacing); // TODO(mattm): the label should be created with a text like "checking for // default" to be displayed while we wait for the check to complete. diff --git a/chrome/browser/gtk/options/options_layout_gtk.cc b/chrome/browser/gtk/options/options_layout_gtk.cc index a2507fe..b837a84a 100644 --- a/chrome/browser/gtk/options/options_layout_gtk.cc +++ b/chrome/browser/gtk/options/options_layout_gtk.cc @@ -14,9 +14,9 @@ const char kGroupTitleMarkup[] = } OptionsLayoutBuilderGtk::OptionsLayoutBuilderGtk() { - page_ = gtk_vbox_new(FALSE, gtk_util::kContentAreaSpacing); + page_ = gtk_vbox_new(FALSE, GtkUtil::kContentAreaSpacing); gtk_container_set_border_width(GTK_CONTAINER(page_), - gtk_util::kContentAreaBorder); + GtkUtil::kContentAreaBorder); } void OptionsLayoutBuilderGtk::AddOptionGroup(const std::string& title, @@ -33,7 +33,7 @@ void OptionsLayoutBuilderGtk::AddOptionGroup(const std::string& title, GtkWidget* content_alignment = IndentWidget(content); - GtkWidget* group = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); + GtkWidget* group = gtk_vbox_new(FALSE, GtkUtil::kControlSpacing); gtk_box_pack_start(GTK_BOX(group), title_alignment, FALSE, FALSE, 0); gtk_container_add(GTK_CONTAINER(group), content_alignment); @@ -44,7 +44,7 @@ void OptionsLayoutBuilderGtk::AddOptionGroup(const std::string& title, GtkWidget* OptionsLayoutBuilderGtk::IndentWidget(GtkWidget* content) { GtkWidget* content_alignment = gtk_alignment_new(0.0, 0.5, 1.0, 1.0); gtk_alignment_set_padding(GTK_ALIGNMENT(content_alignment), 0, 0, - gtk_util::kGroupIndent, 0); + GtkUtil::kGroupIndent, 0); gtk_container_add(GTK_CONTAINER(content_alignment), content); return content_alignment; } diff --git a/chrome/browser/gtk/options/options_window_gtk.cc b/chrome/browser/gtk/options/options_window_gtk.cc index 86e188a..7aaa065 100644 --- a/chrome/browser/gtk/options/options_window_gtk.cc +++ b/chrome/browser/gtk/options/options_window_gtk.cc @@ -99,8 +99,8 @@ OptionsWindowGtk::OptionsWindowGtk(Profile* profile) NULL); gtk_window_set_default_size(GTK_WINDOW(dialog_), 500, -1); gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog_)->vbox), - gtk_util::kContentAreaSpacing); - gtk_util::SetWindowIcon(GTK_WINDOW(dialog_)); + GtkUtil::kContentAreaSpacing); + GtkUtil::SetWindowIcon(GTK_WINDOW(dialog_)); notebook_ = gtk_notebook_new(); diff --git a/chrome/browser/gtk/options/passwords_exceptions_window_gtk.cc b/chrome/browser/gtk/options/passwords_exceptions_window_gtk.cc index 195a662..db5ccb8 100644 --- a/chrome/browser/gtk/options/passwords_exceptions_window_gtk.cc +++ b/chrome/browser/gtk/options/passwords_exceptions_window_gtk.cc @@ -80,8 +80,8 @@ PasswordsExceptionsWindowGtk::PasswordsExceptionsWindowGtk(Profile* profile) gtk_window_set_default_size(GTK_WINDOW(dialog_), kPasswordsExceptionsWindowInitialWidth, -1); gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog_)->vbox), - gtk_util::kContentAreaSpacing); - gtk_util::SetWindowIcon(GTK_WINDOW(dialog_)); + GtkUtil::kContentAreaSpacing); + GtkUtil::SetWindowIcon(GTK_WINDOW(dialog_)); notebook_ = gtk_notebook_new(); diff --git a/chrome/browser/gtk/options/passwords_page_gtk.cc b/chrome/browser/gtk/options/passwords_page_gtk.cc index 7a3ef2e..02ab15c 100644 --- a/chrome/browser/gtk/options/passwords_page_gtk.cc +++ b/chrome/browser/gtk/options/passwords_page_gtk.cc @@ -71,7 +71,7 @@ PasswordsPageGtk::PasswordsPageGtk(Profile* profile) password_ = gtk_label_new(""); - GtkWidget* buttons = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); + GtkWidget* buttons = gtk_vbox_new(FALSE, GtkUtil::kControlSpacing); gtk_box_pack_start(GTK_BOX(buttons), remove_button_, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(buttons), remove_all_button_, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(buttons), show_password_button_, FALSE, FALSE, 0); @@ -87,9 +87,9 @@ PasswordsPageGtk::PasswordsPageGtk(Profile* profile) InitPasswordTree(); gtk_container_add(GTK_CONTAINER(scroll_window), password_tree_); - page_ = gtk_hbox_new(FALSE, gtk_util::kControlSpacing); + page_ = gtk_hbox_new(FALSE, GtkUtil::kControlSpacing); gtk_container_set_border_width(GTK_CONTAINER(page_), - gtk_util::kContentAreaBorder); + GtkUtil::kContentAreaBorder); gtk_box_pack_end(GTK_BOX(page_), buttons, FALSE, FALSE, 0); gtk_box_pack_end(GTK_BOX(page_), scroll_window, TRUE, TRUE, 0); } diff --git a/chrome/browser/gtk/options/url_picker_dialog_gtk.cc b/chrome/browser/gtk/options/url_picker_dialog_gtk.cc index 3e4d9a6..786ce0d 100644 --- a/chrome/browser/gtk/options/url_picker_dialog_gtk.cc +++ b/chrome/browser/gtk/options/url_picker_dialog_gtk.cc @@ -60,10 +60,10 @@ UrlPickerDialogGtk::UrlPickerDialogGtk(UrlPickerCallback* callback, gtk_window_set_default_size(GTK_WINDOW(dialog_), kDialogDefaultWidth, kDialogDefaultHeight); gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog_)->vbox), - gtk_util::kContentAreaSpacing); + GtkUtil::kContentAreaSpacing); // URL entry. - GtkWidget* url_hbox = gtk_hbox_new(FALSE, gtk_util::kLabelSpacing); + GtkWidget* url_hbox = gtk_hbox_new(FALSE, GtkUtil::kLabelSpacing); GtkWidget* url_label = gtk_label_new( l10n_util::GetStringUTF8(IDS_ASI_URL).c_str()); gtk_box_pack_start(GTK_BOX(url_hbox), url_label, @@ -78,7 +78,7 @@ UrlPickerDialogGtk::UrlPickerDialogGtk(UrlPickerCallback* callback, FALSE, FALSE, 0); // Recent history description label. - GtkWidget* history_vbox = gtk_vbox_new(FALSE, gtk_util::kLabelSpacing); + GtkWidget* history_vbox = gtk_vbox_new(FALSE, GtkUtil::kLabelSpacing); gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog_)->vbox), history_vbox); GtkWidget* history_label = gtk_label_new(NULL); char* markup = g_markup_printf_escaped(kHistoryLabelMarkup, diff --git a/chrome/browser/gtk/status_bubble_gtk.cc b/chrome/browser/gtk/status_bubble_gtk.cc index fb5fcc3..492d279 100644 --- a/chrome/browser/gtk/status_bubble_gtk.cc +++ b/chrome/browser/gtk/status_bubble_gtk.cc @@ -144,7 +144,7 @@ void StatusBubbleGtk::InitWidgets() { bg_box_ = gtk_event_box_new(); gtk_container_add(GTK_CONTAINER(bg_box_), padding); - container_.Own(gtk_util::CreateGtkBorderBin(bg_box_, &kFrameBorderColor, + container_.Own(GtkUtil::CreateGtkBorderBin(bg_box_, &kFrameBorderColor, kBorderPadding, kBorderPadding, kBorderPadding, kBorderPadding)); gtk_widget_set_name(container_.get(), "status-bubble"); gtk_widget_set_app_paintable(container_.get(), TRUE); diff --git a/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc b/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc index ae12223..6da76e8 100644 --- a/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc +++ b/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc @@ -386,7 +386,7 @@ void DraggedTabControllerGtk::AdjustDragPointForPinnedTabs( // be pinned. Make sure the dragged tab does not go before the first // non-pinned tab. gfx::Rect tabstrip_bounds = - gtk_util::GetWidgetScreenBounds(attached_tabstrip_->tabstrip_.get()); + GtkUtil::GetWidgetScreenBounds(attached_tabstrip_->tabstrip_.get()); dragged_tab_point->set_x(std::max(dragged_tab_point->x(), tabstrip_bounds.x() + tab_bounds.x())); } @@ -432,7 +432,7 @@ TabStripGtk* DraggedTabControllerGtk::GetTabStripIfItContains( // Make sure the specified screen point is actually within the bounds of the // specified tabstrip... gfx::Rect tabstrip_bounds = - gtk_util::GetWidgetScreenBounds(tabstrip->tabstrip_.get()); + GtkUtil::GetWidgetScreenBounds(tabstrip->tabstrip_.get()); if (screen_point.x() < tabstrip_bounds.right() && screen_point.x() >= tabstrip_bounds.x()) { // TODO(beng): make this be relative to the start position of the mouse for @@ -643,7 +643,7 @@ gfx::Point DraggedTabControllerGtk::GetDraggedTabPoint( // If we're not attached, we just use x and y from above. if (attached_tabstrip_) { gfx::Rect tabstrip_bounds = - gtk_util::GetWidgetScreenBounds(attached_tabstrip_->tabstrip_.get()); + GtkUtil::GetWidgetScreenBounds(attached_tabstrip_->tabstrip_.get()); // Snap the dragged tab to the tabstrip if we are attached, detaching // only when the mouse position (screen_point) exceeds the screen bounds // of the tabstrip. @@ -835,7 +835,7 @@ gfx::Rect DraggedTabControllerGtk::GetTabScreenBounds(TabGtk* tab) { gfx::Rect bounds = tab->GetRequisition(); GtkWidget* widget = tab->widget(); GtkWidget* parent = gtk_widget_get_parent(widget); - gfx::Point point = gtk_util::GetWidgetScreenPosition(parent); + gfx::Point point = GtkUtil::GetWidgetScreenPosition(parent); bounds.Offset(point); return gfx::Rect(bounds.x(), bounds.y(), bounds.width(), bounds.height()); diff --git a/chrome/browser/gtk/tabs/dragged_tab_gtk.cc b/chrome/browser/gtk/tabs/dragged_tab_gtk.cc index 2ddb607..09b1192 100644 --- a/chrome/browser/gtk/tabs/dragged_tab_gtk.cc +++ b/chrome/browser/gtk/tabs/dragged_tab_gtk.cc @@ -87,7 +87,7 @@ void DraggedTabGtk::Attach(int selected_width) { attached_ = true; Resize(selected_width); - if (gtk_util::IsScreenComposited()) + if (GtkUtil::IsScreenComposited()) gdk_window_set_opacity(container_->window, kOpaqueAlpha); } @@ -118,7 +118,7 @@ void DraggedTabGtk::Detach(GtkWidget* contents, BackingStore* backing_store) { backing_store_ = backing_store; ResizeContainer(); - if (gtk_util::IsScreenComposited()) + if (GtkUtil::IsScreenComposited()) gdk_window_set_opacity(container_->window, kTransparentAlpha); } @@ -288,7 +288,7 @@ gboolean DraggedTabGtk::OnExposeEvent(GtkWidget* widget, GdkEventExpose* event, DraggedTabGtk* dragged_tab) { GdkPixbuf* pixbuf = dragged_tab->PaintTab(); - if (gtk_util::IsScreenComposited()) { + if (GtkUtil::IsScreenComposited()) { dragged_tab->SetContainerTransparency(); } else { dragged_tab->SetContainerShapeMask(pixbuf); diff --git a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc index 0fa5d39..d21a9fe 100644 --- a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc +++ b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc @@ -65,8 +65,8 @@ SkBitmap* crashed_fav_icon = NULL; // Gets the bounds of |widget| relative to |parent|. gfx::Rect GetWidgetBoundsRelativeToParent(GtkWidget* parent, GtkWidget* widget) { - gfx::Point parent_pos = gtk_util::GetWidgetScreenPosition(parent); - gfx::Point widget_pos = gtk_util::GetWidgetScreenPosition(widget); + gfx::Point parent_pos = GtkUtil::GetWidgetScreenPosition(parent); + gfx::Point widget_pos = GtkUtil::GetWidgetScreenPosition(widget); return gfx::Rect(widget_pos.x() - parent_pos.x(), widget_pos.y() - parent_pos.y(), widget->allocation.width, widget->allocation.height); @@ -389,7 +389,7 @@ gfx::Rect TabRendererGtk::GetNonMirroredBounds(GtkWidget* parent) const { // is relative to the browser titlebar. We need the bounds relative to the // tabstrip. gfx::Rect bounds = GetWidgetBoundsRelativeToParent(parent, widget()); - bounds.set_x(gtk_util::MirroredLeftPointForRect(parent, bounds)); + bounds.set_x(GtkUtil::MirroredLeftPointForRect(parent, bounds)); return bounds; } @@ -567,11 +567,11 @@ void TabRendererGtk::Layout() { } favicon_bounds_.set_x( - gtk_util::MirroredLeftPointForRect(tab_.get(), favicon_bounds_)); + GtkUtil::MirroredLeftPointForRect(tab_.get(), favicon_bounds_)); close_button_bounds_.set_x( - gtk_util::MirroredLeftPointForRect(tab_.get(), close_button_bounds_)); + GtkUtil::MirroredLeftPointForRect(tab_.get(), close_button_bounds_)); title_bounds_.set_x( - gtk_util::MirroredLeftPointForRect(tab_.get(), title_bounds_)); + GtkUtil::MirroredLeftPointForRect(tab_.get(), title_bounds_)); MoveCloseButtonWidget(); } diff --git a/chrome/browser/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/gtk/tabs/tab_strip_gtk.cc index 3af798a..69a8a74 100644 --- a/chrome/browser/gtk/tabs/tab_strip_gtk.cc +++ b/chrome/browser/gtk/tabs/tab_strip_gtk.cc @@ -1248,7 +1248,7 @@ void TabStripGtk::LayoutNewTabButton(double last_tab_right, } else { bounds.set_x(Round(last_tab_right - kTabHOffset) + kNewTabButtonHOffset); } - bounds.set_x(gtk_util::MirroredLeftPointForRect(tabstrip_.get(), bounds)); + bounds.set_x(GtkUtil::MirroredLeftPointForRect(tabstrip_.get(), bounds)); gtk_fixed_move(GTK_FIXED(tabstrip_.get()), newtab_button_->widget(), bounds.x(), bounds.y()); @@ -1390,7 +1390,7 @@ void TabStripGtk::ResizeLayoutTabs() { bool TabStripGtk::IsCursorInTabStripZone() const { gfx::Point tabstrip_topleft; - gtk_util::ConvertWidgetPointToScreen(tabstrip_.get(), &tabstrip_topleft); + GtkUtil::ConvertWidgetPointToScreen(tabstrip_.get(), &tabstrip_topleft); gfx::Rect bds = bounds(); bds.set_origin(tabstrip_topleft); @@ -1438,12 +1438,12 @@ gfx::Rect TabStripGtk::GetDropBounds(int drop_index, center_x = bounds.x() + bounds.width() + (kTabHOffset / 2); } - center_x = gtk_util::MirroredXCoordinate(tabstrip_.get(), center_x); + center_x = GtkUtil::MirroredXCoordinate(tabstrip_.get(), center_x); // Determine the screen bounds. gfx::Point drop_loc(center_x - drop_indicator_width / 2, -drop_indicator_height); - gtk_util::ConvertWidgetPointToScreen(tabstrip_.get(), &drop_loc); + GtkUtil::ConvertWidgetPointToScreen(tabstrip_.get(), &drop_loc); gfx::Rect drop_bounds(drop_loc.x(), drop_loc.y(), drop_indicator_width, drop_indicator_height); @@ -1460,7 +1460,7 @@ void TabStripGtk::UpdateDropIndex(GdkDragContext* context, gint x, gint y) { // If the UI layout is right-to-left, we need to mirror the mouse // coordinates since we calculate the drop index based on the // original (and therefore non-mirrored) positions of the tabs. - x = gtk_util::MirroredXCoordinate(tabstrip_.get(), x); + x = GtkUtil::MirroredXCoordinate(tabstrip_.get(), x); for (int i = 0; i < GetTabCount(); ++i) { TabGtk* tab = GetTabAt(i); gfx::Rect bounds = tab->GetNonMirroredBounds(tabstrip_.get()); @@ -1565,7 +1565,7 @@ TabStripGtk::DropInfo::~DropInfo() { gboolean TabStripGtk::DropInfo::OnExposeEvent(GtkWidget* widget, GdkEventExpose* event, DropInfo* drop_info) { - if (gtk_util::IsScreenComposited()) { + if (GtkUtil::IsScreenComposited()) { drop_info->SetContainerTransparency(); } else { drop_info->SetContainerShapeMask(); @@ -1892,7 +1892,7 @@ void TabStripGtk::OnNewTabClicked(GtkWidget* widget, TabStripGtk* tabstrip) { void TabStripGtk::SetTabBounds(TabGtk* tab, const gfx::Rect& bounds) { gfx::Rect bds = bounds; - bds.set_x(gtk_util::MirroredLeftPointForRect(tabstrip_.get(), bounds)); + bds.set_x(GtkUtil::MirroredLeftPointForRect(tabstrip_.get(), bounds)); tab->SetBounds(bds); gtk_fixed_move(GTK_FIXED(tabstrip_.get()), tab->widget(), bds.x(), bds.y()); diff --git a/chrome/browser/gtk/task_manager_gtk.cc b/chrome/browser/gtk/task_manager_gtk.cc index f1cb25b..34cae0f 100644 --- a/chrome/browser/gtk/task_manager_gtk.cc +++ b/chrome/browser/gtk/task_manager_gtk.cc @@ -338,8 +338,8 @@ void TaskManagerGtk::Init() { ConnectAccelerators(); gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog_)->vbox), - gtk_util::kContentAreaSpacing); - gtk_util::SetWindowIcon(GTK_WINDOW(dialog_)); + GtkUtil::kContentAreaSpacing); + GtkUtil::SetWindowIcon(GTK_WINDOW(dialog_)); g_signal_connect(G_OBJECT(dialog_), "response", G_CALLBACK(OnResponse), this); g_signal_connect(G_OBJECT(dialog_), "button-release-event", @@ -635,7 +635,7 @@ gboolean TaskManagerGtk::OnButtonReleaseEvent(GtkWidget* widget, GdkEventButton* event, TaskManagerGtk* task_manager) { // We don't want to open the context menu in the treeview. - if (gtk_util::WidgetContainsCursor(task_manager->treeview_)) + if (GtkUtil::WidgetContainsCursor(task_manager->treeview_)) return FALSE; if (event->button == 3) diff --git a/chrome/browser/login_prompt_gtk.cc b/chrome/browser/login_prompt_gtk.cc index ef98d26..416378b 100644 --- a/chrome/browser/login_prompt_gtk.cc +++ b/chrome/browser/login_prompt_gtk.cc @@ -58,7 +58,7 @@ class LoginHandlerGtk : public LoginHandler, std::wstring explanation) { DCHECK(MessageLoop::current() == ui_loop_); - root_.Own(gtk_vbox_new(NULL, gtk_util::kContentAreaBorder)); + root_.Own(gtk_vbox_new(NULL, GtkUtil::kContentAreaBorder)); GtkWidget* label = gtk_label_new(WideToUTF8(explanation).c_str()); gtk_label_set_line_wrap(GTK_LABEL(label), TRUE); gtk_box_pack_start(GTK_BOX(root_.get()), label, FALSE, FALSE, 0); @@ -70,7 +70,7 @@ class LoginHandlerGtk : public LoginHandler, gtk_entry_set_activates_default(GTK_ENTRY(password_entry_), TRUE); gtk_entry_set_visibility(GTK_ENTRY(password_entry_), FALSE); - GtkWidget* table = gtk_util::CreateLabeledControlsGroup(NULL, + GtkWidget* table = GtkUtil::CreateLabeledControlsGroup(NULL, l10n_util::GetStringUTF8(IDS_LOGIN_DIALOG_USERNAME_FIELD).c_str(), username_entry_, l10n_util::GetStringUTF8(IDS_LOGIN_DIALOG_PASSWORD_FIELD).c_str(), |