libgtk2ui => libgtkui
This commit is contained in:
parent
820c0827c0
commit
be29ea4dad
11 changed files with 32 additions and 30 deletions
|
@ -9,8 +9,8 @@
|
|||
#include "base/callback.h"
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "chrome/browser/ui/libgtk2ui/gtk2_signal.h"
|
||||
#include "chrome/browser/ui/libgtk2ui/gtk2_util.h"
|
||||
#include "chrome/browser/ui/libgtkui/gtk_signal.h"
|
||||
#include "chrome/browser/ui/libgtkui/gtk_util.h"
|
||||
#include "ui/views/widget/desktop_aura/x11_desktop_handler.h"
|
||||
|
||||
namespace file_dialog {
|
||||
|
@ -61,7 +61,7 @@ class FileChooserDialog {
|
|||
NULL);
|
||||
if (parent_) {
|
||||
parent_->SetEnabled(false);
|
||||
libgtk2ui::SetGtkTransientForAura(dialog_, parent_->GetNativeWindow());
|
||||
libgtkui::SetGtkTransientForAura(dialog_, parent_->GetNativeWindow());
|
||||
gtk_window_set_modal(GTK_WINDOW(dialog_), TRUE);
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,7 @@ class FileChooserDialog {
|
|||
|
||||
// We need to call gtk_window_present after making the widgets visible to
|
||||
// make sure window gets correctly raised and gets focus.
|
||||
int time = views::X11DesktopHandler::get()->wm_user_time_ms();
|
||||
int time = ui::X11EventSource::GetInstance()->GetTimestamp();
|
||||
gtk_window_present_with_time(GTK_WINDOW(dialog_), time);
|
||||
}
|
||||
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
#include "base/callback.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "chrome/browser/ui/libgtk2ui/gtk2_signal.h"
|
||||
#include "chrome/browser/ui/libgtk2ui/gtk2_util.h"
|
||||
#include "chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h"
|
||||
#include "chrome/browser/ui/libgtkui/gtk_signal.h"
|
||||
#include "chrome/browser/ui/libgtkui/gtk_util.h"
|
||||
#include "chrome/browser/ui/libgtkui/skia_utils_gtk.h"
|
||||
#include "ui/views/widget/desktop_aura/x11_desktop_handler.h"
|
||||
|
||||
#define ANSI_FOREGROUND_RED "\x1b[31m"
|
||||
|
@ -54,7 +54,7 @@ class GtkMessageBox : public NativeWindowObserver {
|
|||
|
||||
// Set dialog's icon.
|
||||
if (!icon.isNull()) {
|
||||
GdkPixbuf* pixbuf = libgtk2ui::GdkPixbufFromSkBitmap(*icon.bitmap());
|
||||
GdkPixbuf* pixbuf = libgtkui::GdkPixbufFromSkBitmap(*icon.bitmap());
|
||||
GtkIconSource* iconsource = gtk_icon_source_new();
|
||||
GtkIconSet* iconset = gtk_icon_set_new();
|
||||
gtk_icon_source_set_pixbuf(iconsource, pixbuf);
|
||||
|
@ -80,7 +80,7 @@ class GtkMessageBox : public NativeWindowObserver {
|
|||
if (parent_) {
|
||||
parent_->AddObserver(this);
|
||||
parent_->SetEnabled(false);
|
||||
libgtk2ui::SetGtkTransientForAura(dialog_, parent_->GetNativeWindow());
|
||||
libgtkui::SetGtkTransientForAura(dialog_, parent_->GetNativeWindow());
|
||||
gtk_window_set_modal(GTK_WINDOW(dialog_), TRUE);
|
||||
}
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ class GtkMessageBox : public NativeWindowObserver {
|
|||
gtk_widget_show_all(dialog_);
|
||||
// We need to call gtk_window_present after making the widgets visible to
|
||||
// make sure window gets correctly raised and gets focus.
|
||||
int time = views::X11DesktopHandler::get()->wm_user_time_ms();
|
||||
int time = ui::X11EventSource::GetInstance()->GetTimestamp();
|
||||
gtk_window_present_with_time(GTK_WINDOW(dialog_), time);
|
||||
}
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
#include "atom/browser/browser.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "chrome/browser/ui/libgtk2ui/app_indicator_icon.h"
|
||||
#include "chrome/browser/ui/libgtk2ui/gtk2_status_icon.h"
|
||||
#include "chrome/browser/ui/libgtkui/app_indicator_icon.h"
|
||||
#include "chrome/browser/ui/libgtkui/gtk_status_icon.h"
|
||||
#include "ui/gfx/image/image.h"
|
||||
|
||||
namespace atom {
|
||||
|
@ -33,15 +33,15 @@ void TrayIconGtk::SetImage(const gfx::Image& image) {
|
|||
}
|
||||
|
||||
base::string16 empty;
|
||||
if (libgtk2ui::AppIndicatorIcon::CouldOpen()) {
|
||||
if (libgtkui::AppIndicatorIcon::CouldOpen()) {
|
||||
++indicators_count;
|
||||
icon_.reset(new libgtk2ui::AppIndicatorIcon(
|
||||
icon_.reset(new libgtkui::AppIndicatorIcon(
|
||||
base::StringPrintf(
|
||||
"%s%d", Browser::Get()->GetName().c_str(), indicators_count),
|
||||
image.AsImageSkia(),
|
||||
empty));
|
||||
} else {
|
||||
icon_.reset(new libgtk2ui::Gtk2StatusIcon(image.AsImageSkia(), empty));
|
||||
icon_.reset(new libgtkui::Gtk2StatusIcon(image.AsImageSkia(), empty));
|
||||
}
|
||||
icon_->set_delegate(this);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#if defined(OS_WIN)
|
||||
#include "ui/gfx/color_utils.h"
|
||||
#elif defined(USE_X11)
|
||||
#include "chrome/browser/ui/libgtk2ui/skia_utils_gtk2.h"
|
||||
#include "chrome/browser/ui/libgtkui/skia_utils_gtk.h"
|
||||
#endif
|
||||
|
||||
namespace atom {
|
||||
|
@ -35,11 +35,11 @@ void GetMenuBarColor(SkColor* enabled, SkColor* disabled, SkColor* highlight,
|
|||
GtkWidget* menu_bar = gtk_menu_bar_new();
|
||||
|
||||
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]);
|
||||
*enabled = libgtkui::GdkColorToSkColor(style->fg[GTK_STATE_NORMAL]);
|
||||
*disabled = libgtkui::GdkColorToSkColor(style->fg[GTK_STATE_INSENSITIVE]);
|
||||
*highlight = libgtkui::GdkColorToSkColor(style->fg[GTK_STATE_SELECTED]);
|
||||
*hover = libgtkui::GdkColorToSkColor(style->fg[GTK_STATE_PRELIGHT]);
|
||||
*background = libgtkui::GdkColorToSkColor(style->bg[GTK_STATE_NORMAL]);
|
||||
|
||||
gtk_widget_destroy(menu_bar);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue