Fix up Chrome47 changes
authorPaul Betts <paul@paulbetts.org>
Mon, 7 Dec 2015 21:27:05 +0000 (13:27 -0800)
committerPaul Betts <paul@paulbetts.org>
Mon, 7 Dec 2015 21:27:05 +0000 (13:27 -0800)
atom/browser/ui/file_dialog_gtk.cc
atom/browser/ui/views/menu_bar.cc

index 5885ffe..ed79449 100644 (file)
@@ -22,7 +22,9 @@ gboolean FileFilterCaseInsensitive(const GtkFileFilterInfo* file_info,
   // Makes .* file extension matches all file types.
   if (*file_extension == ".*")
     return true;
-  return base::EndsWith(file_info->filename, *file_extension, false);
+  return base::EndsWith(
+    file_info->filename,
+    *file_extension, base::CompareCase::INSENSITIVE_ASCII);
 }
 
 // Deletes |data| when gtk_file_filter_add_custom() is done with it.
index d3059a5..b771292 100644 (file)
@@ -17,7 +17,6 @@
 #if defined(OS_WIN)
 #include "ui/gfx/color_utils.h"
 #elif defined(USE_X11)
-#include "chrome/browser/ui/libgtk2ui/owned_widget_gtk2.h"
 #include "chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h"
 #endif
 
@@ -33,15 +32,16 @@ const SkColor kDefaultColor = SkColorSetARGB(255, 233, 233, 233);
 #if defined(USE_X11)
 void GetMenuBarColor(SkColor* enabled, SkColor* disabled, SkColor* highlight,
                      SkColor* hover, SkColor* background) {
-  libgtk2ui::OwnedWidgetGtk fake_menu_bar;
-  fake_menu_bar.Own(gtk_menu_bar_new());
+  GtkWidget* menu_bar = gtk_menu_bar_new();
 
-  GtkStyle* style = gtk_rc_get_style(fake_menu_bar.get());
+  GtkStyle* style = gtk_rc_get_style(menu_bar);
   *enabled = libgtk2ui::GdkColorToSkColor(style->fg[GTK_STATE_NORMAL]);
   *disabled = libgtk2ui::GdkColorToSkColor(style->fg[GTK_STATE_INSENSITIVE]);
   *highlight = libgtk2ui::GdkColorToSkColor(style->fg[GTK_STATE_SELECTED]);
   *hover = libgtk2ui::GdkColorToSkColor(style->fg[GTK_STATE_PRELIGHT]);
   *background = libgtk2ui::GdkColorToSkColor(style->bg[GTK_STATE_NORMAL]);
+
+  gtk_widget_destroy(menu_bar);
 }
 #endif