| OLD | NEW |
| 1 // Copyright (c) 2011 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/bookmarks/bookmark_bar_instructions_gtk.h" | 5 #include "chrome/browser/ui/gtk/bookmarks/bookmark_bar_instructions_gtk.h" |
| 6 | 6 |
| 7 #include "base/observer_list.h" | 7 #include "base/observer_list.h" |
| 8 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h" | 8 #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h" |
| 9 #include "chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.h" | 9 #include "chrome/browser/ui/gtk/gtk_chrome_shrinkable_hbox.h" |
| 10 #include "chrome/browser/ui/gtk/gtk_theme_service.h" | |
| 11 #include "chrome/browser/ui/gtk/gtk_util.h" | 10 #include "chrome/browser/ui/gtk/gtk_util.h" |
| 11 #include "chrome/browser/ui/gtk/theme_service_gtk.h" |
| 12 #include "chrome/common/chrome_notification_types.h" | 12 #include "chrome/common/chrome_notification_types.h" |
| 13 #include "content/public/browser/notification_source.h" | 13 #include "content/public/browser/notification_source.h" |
| 14 #include "grit/generated_resources.h" | 14 #include "grit/generated_resources.h" |
| 15 #include "ui/base/l10n/l10n_util.h" | 15 #include "ui/base/l10n/l10n_util.h" |
| 16 | 16 |
| 17 BookmarkBarInstructionsGtk::BookmarkBarInstructionsGtk(Delegate* delegate, | 17 BookmarkBarInstructionsGtk::BookmarkBarInstructionsGtk(Delegate* delegate, |
| 18 Profile* profile) | 18 Profile* profile) |
| 19 : delegate_(delegate), | 19 : delegate_(delegate), |
| 20 profile_(profile), | 20 profile_(profile), |
| 21 theme_service_(GtkThemeService::GetFrom(profile_)) { | 21 theme_service_(ThemeServiceGtk::GetFrom(profile_)) { |
| 22 instructions_hbox_ = gtk_chrome_shrinkable_hbox_new(FALSE, FALSE, 0); | 22 instructions_hbox_ = gtk_chrome_shrinkable_hbox_new(FALSE, FALSE, 0); |
| 23 gtk_widget_set_size_request(instructions_hbox_, 0, -1); | 23 gtk_widget_set_size_request(instructions_hbox_, 0, -1); |
| 24 | 24 |
| 25 instructions_label_ = gtk_label_new( | 25 instructions_label_ = gtk_label_new( |
| 26 l10n_util::GetStringUTF8(IDS_BOOKMARKS_NO_ITEMS).c_str()); | 26 l10n_util::GetStringUTF8(IDS_BOOKMARKS_NO_ITEMS).c_str()); |
| 27 gtk_misc_set_alignment(GTK_MISC(instructions_label_), 0, 0.5); | 27 gtk_misc_set_alignment(GTK_MISC(instructions_label_), 0, 0.5); |
| 28 gtk_util::CenterWidgetInHBox(instructions_hbox_, instructions_label_, | 28 gtk_util::CenterWidgetInHBox(instructions_hbox_, instructions_label_, |
| 29 false, 1); | 29 false, 1); |
| 30 g_signal_connect(instructions_label_, "map", | 30 g_signal_connect(instructions_label_, "map", |
| 31 G_CALLBACK(gtk_util::InitLabelSizeRequestAndEllipsizeMode), | 31 G_CALLBACK(gtk_util::InitLabelSizeRequestAndEllipsizeMode), |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 ThemeService::GetDefaultColor( | 82 ThemeService::GetDefaultColor( |
| 83 ThemeService::COLOR_BOOKMARK_TEXT)) { | 83 ThemeService::COLOR_BOOKMARK_TEXT)) { |
| 84 gtk_chrome_link_button_set_normal_color( | 84 gtk_chrome_link_button_set_normal_color( |
| 85 GTK_CHROME_LINK_BUTTON(instructions_link_), NULL); | 85 GTK_CHROME_LINK_BUTTON(instructions_link_), NULL); |
| 86 } else { | 86 } else { |
| 87 gtk_chrome_link_button_set_normal_color( | 87 gtk_chrome_link_button_set_normal_color( |
| 88 GTK_CHROME_LINK_BUTTON(instructions_link_), &bookmark_color); | 88 GTK_CHROME_LINK_BUTTON(instructions_link_), &bookmark_color); |
| 89 } | 89 } |
| 90 } | 90 } |
| 91 } | 91 } |
| OLD | NEW |