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

Unified Diff: chrome/browser/ui/libgtkui/menu_util.cc

Issue 2707313002: Gtk: Change NULL to nullptr (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « chrome/browser/ui/libgtkui/gtk_util.cc ('k') | chrome/browser/ui/libgtkui/native_theme_gtk2.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/libgtkui/menu_util.cc
diff --git a/chrome/browser/ui/libgtkui/menu_util.cc b/chrome/browser/ui/libgtkui/menu_util.cc
index e2c95e96bd5335abc69320e4f1b98b886c245802..5ce8aafd8f19950e7ee195809a3752797a013289 100644
--- a/chrome/browser/ui/libgtkui/menu_util.cc
+++ b/chrome/browser/ui/libgtkui/menu_util.cc
@@ -73,7 +73,7 @@ GtkWidget* AppendMenuItemToMenu(int index,
bool GetMenuItemID(GtkWidget* menu_item, int* menu_id) {
gpointer id_ptr = g_object_get_data(G_OBJECT(menu_item), "menu-id");
- if (id_ptr != NULL) {
+ if (id_ptr != nullptr) {
*menu_id = GPOINTER_TO_INT(id_ptr) - 1;
return true;
}
@@ -99,7 +99,7 @@ void BuildSubmenuFromModel(ui::MenuModel* model,
bool* block_activation,
void* this_ptr) {
std::map<int, GtkWidget*> radio_groups;
- GtkWidget* menu_item = NULL;
+ GtkWidget* menu_item = nullptr;
for (int i = 0; i < model->GetItemCount(); ++i) {
gfx::Image icon;
std::string label = ui::ConvertAcceleratorsFromWindowsStyle(
@@ -122,7 +122,7 @@ void BuildSubmenuFromModel(ui::MenuModel* model,
if (iter == radio_groups.end()) {
menu_item =
- gtk_radio_menu_item_new_with_mnemonic(NULL, label.c_str());
+ gtk_radio_menu_item_new_with_mnemonic(nullptr, label.c_str());
radio_groups[model->GetGroupIdAt(i)] = menu_item;
} else {
menu_item = gtk_radio_menu_item_new_with_mnemonic_from_widget(
@@ -170,9 +170,7 @@ void BuildSubmenuFromModel(ui::MenuModel* model,
ui::Accelerator accelerator;
if (model->GetAcceleratorAt(i, &accelerator)) {
- gtk_widget_add_accelerator(menu_item,
- "activate",
- NULL,
+ gtk_widget_add_accelerator(menu_item, "activate", nullptr,
GetGdkKeyCodeForAccelerator(accelerator),
GetGdkModifierForAccelerator(accelerator),
GTK_ACCEL_VISIBLE);
@@ -187,7 +185,7 @@ void BuildSubmenuFromModel(ui::MenuModel* model,
item_activated_cb,
this_ptr);
- menu_item = NULL;
+ menu_item = nullptr;
}
}
@@ -243,7 +241,7 @@ void SetMenuItemInfo(GtkWidget* widget, void* block_activation_ptr) {
gtk_image_new_from_pixbuf(pixbuf));
g_object_unref(pixbuf);
} else {
- gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(widget), NULL);
+ gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(widget), nullptr);
}
}
}
« no previous file with comments | « chrome/browser/ui/libgtkui/gtk_util.cc ('k') | chrome/browser/ui/libgtkui/native_theme_gtk2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698