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

Side by Side Diff: chrome/browser/ui/gtk/extensions/media_galleries_dialog_gtk.cc

Issue 10911242: make media gallery directory tooltips in media gallery config dialog absolute paths (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: +! Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/browser/ui/gtk/extensions/media_galleries_dialog_gtk.h" 5 #include "chrome/browser/ui/gtk/extensions/media_galleries_dialog_gtk.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/media_gallery/media_galleries_preferences.h" 9 #include "chrome/browser/media_gallery/media_galleries_preferences.h"
10 #include "chrome/browser/ui/gtk/gtk_util.h" 10 #include "chrome/browser/ui/gtk/gtk_util.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 const MediaGalleryPrefInfo* gallery, 95 const MediaGalleryPrefInfo* gallery,
96 bool permitted) { 96 bool permitted) {
97 CheckboxMap::iterator iter = checkbox_map_.find(gallery); 97 CheckboxMap::iterator iter = checkbox_map_.find(gallery);
98 98
99 GtkWidget* widget = NULL; 99 GtkWidget* widget = NULL;
100 if (iter != checkbox_map_.end()) { 100 if (iter != checkbox_map_.end()) {
101 widget = iter->second; 101 widget = iter->second;
102 } else { 102 } else {
103 widget = gtk_check_button_new_with_label( 103 widget = gtk_check_button_new_with_label(
104 UTF16ToUTF8(gallery->display_name).c_str()); 104 UTF16ToUTF8(gallery->display_name).c_str());
105 gtk_widget_set_tooltip_text(widget,
106 UTF16ToUTF8(gallery->AbsolutePath().LossyDisplayName()).c_str());
105 g_signal_connect(widget, "toggled", G_CALLBACK(OnToggledThunk), this); 107 g_signal_connect(widget, "toggled", G_CALLBACK(OnToggledThunk), this);
106 gtk_box_pack_start(GTK_BOX(checkbox_container_), widget, FALSE, FALSE, 0); 108 gtk_box_pack_start(GTK_BOX(checkbox_container_), widget, FALSE, FALSE, 0);
107 gtk_widget_show(widget); 109 gtk_widget_show(widget);
108 checkbox_map_[gallery] = widget; 110 checkbox_map_[gallery] = widget;
109 } 111 }
110 112
111 AutoReset<bool> reset(&ignore_toggles_, true); 113 AutoReset<bool> reset(&ignore_toggles_, true);
112 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), permitted); 114 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), permitted);
113 } 115 }
114 116
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 161
160 // MediaGalleriesDialogController ---------------------------------------------- 162 // MediaGalleriesDialogController ----------------------------------------------
161 163
162 // static 164 // static
163 MediaGalleriesDialog* MediaGalleriesDialog::Create( 165 MediaGalleriesDialog* MediaGalleriesDialog::Create(
164 MediaGalleriesDialogController* controller) { 166 MediaGalleriesDialogController* controller) {
165 return new MediaGalleriesDialogGtk(controller); 167 return new MediaGalleriesDialogGtk(controller);
166 } 168 }
167 169
168 } // namespace chrome 170 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698