| 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, false); | 37 return base::EndsWith(file_info->filename, *file_extension, |
| 38 base::CompareCase::INSENSITIVE_ASCII); |
| 38 } | 39 } |
| 39 | 40 |
| 40 // Deletes |data| when gtk_file_filter_add_custom() is done with it. | 41 // Deletes |data| when gtk_file_filter_add_custom() is done with it. |
| 41 void OnFileFilterDataDestroyed(std::string* file_extension) { | 42 void OnFileFilterDataDestroyed(std::string* file_extension) { |
| 42 delete file_extension; | 43 delete file_extension; |
| 43 } | 44 } |
| 44 | 45 |
| 45 } // namespace | 46 } // namespace |
| 46 | 47 |
| 47 namespace libgtk2ui { | 48 namespace libgtk2ui { |
| (...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 g_free(filename); | 639 g_free(filename); |
| 639 if (pixbuf) { | 640 if (pixbuf) { |
| 640 gtk_image_set_from_pixbuf(GTK_IMAGE(preview_), pixbuf); | 641 gtk_image_set_from_pixbuf(GTK_IMAGE(preview_), pixbuf); |
| 641 g_object_unref(pixbuf); | 642 g_object_unref(pixbuf); |
| 642 } | 643 } |
| 643 gtk_file_chooser_set_preview_widget_active(GTK_FILE_CHOOSER(chooser), | 644 gtk_file_chooser_set_preview_widget_active(GTK_FILE_CHOOSER(chooser), |
| 644 pixbuf ? TRUE : FALSE); | 645 pixbuf ? TRUE : FALSE); |
| 645 } | 646 } |
| 646 | 647 |
| 647 } // namespace libgtk2ui | 648 } // namespace libgtk2ui |
| OLD | NEW |