| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <gdk/gdkx.h> | 5 #include <gdk/gdkx.h> |
| 6 #include <gtk/gtk.h> | 6 #include <gtk/gtk.h> |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "ui/shell_dialogs/select_file_dialog.h" | 27 #include "ui/shell_dialogs/select_file_dialog.h" |
| 28 #include "ui/strings/grit/ui_strings.h" | 28 #include "ui/strings/grit/ui_strings.h" |
| 29 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" | 29 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" |
| 30 #include "ui/views/widget/desktop_aura/x11_desktop_handler.h" | 30 #include "ui/views/widget/desktop_aura/x11_desktop_handler.h" |
| 31 | 31 |
| 32 namespace { | 32 namespace { |
| 33 | 33 |
| 34 // Makes sure that .jpg also shows .JPG. | 34 // Makes sure that .jpg also shows .JPG. |
| 35 gboolean FileFilterCaseInsensitive(const GtkFileFilterInfo* file_info, | 35 gboolean FileFilterCaseInsensitive(const GtkFileFilterInfo* file_info, |
| 36 std::string* file_extension) { | 36 std::string* file_extension) { |
| 37 return base::EndsWith(file_info->filename, *file_extension, | 37 return base::EndsWith(file_info->filename, *file_extension, false); |
| 38 base::CompareCase::INSENSITIVE_ASCII); | |
| 39 } | 38 } |
| 40 | 39 |
| 41 // Deletes |data| when gtk_file_filter_add_custom() is done with it. | 40 // Deletes |data| when gtk_file_filter_add_custom() is done with it. |
| 42 void OnFileFilterDataDestroyed(std::string* file_extension) { | 41 void OnFileFilterDataDestroyed(std::string* file_extension) { |
| 43 delete file_extension; | 42 delete file_extension; |
| 44 } | 43 } |
| 45 | 44 |
| 46 } // namespace | 45 } // namespace |
| 47 | 46 |
| 48 namespace libgtk2ui { | 47 namespace libgtk2ui { |
| (...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 g_free(filename); | 638 g_free(filename); |
| 640 if (pixbuf) { | 639 if (pixbuf) { |
| 641 gtk_image_set_from_pixbuf(GTK_IMAGE(preview_), pixbuf); | 640 gtk_image_set_from_pixbuf(GTK_IMAGE(preview_), pixbuf); |
| 642 g_object_unref(pixbuf); | 641 g_object_unref(pixbuf); |
| 643 } | 642 } |
| 644 gtk_file_chooser_set_preview_widget_active(GTK_FILE_CHOOSER(chooser), | 643 gtk_file_chooser_set_preview_widget_active(GTK_FILE_CHOOSER(chooser), |
| 645 pixbuf ? TRUE : FALSE); | 644 pixbuf ? TRUE : FALSE); |
| 646 } | 645 } |
| 647 | 646 |
| 648 } // namespace libgtk2ui | 647 } // namespace libgtk2ui |
| OLD | NEW |