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

Unified Diff: chrome/views/controls/button/native_button.cc

Issue 113123: Fleshes out WidgetGTK and WindowGTK a bit more. This is still vary... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/views/controls/button/native_button.cc
===================================================================
--- chrome/views/controls/button/native_button.cc (revision 15583)
+++ chrome/views/controls/button/native_button.cc (working copy)
@@ -4,6 +4,10 @@
#include "chrome/views/controls/button/native_button.h"
+#if defined(OS_LINUX)
+#include <gdk/gdkkeysyms.h>
+#endif
+
#include "app/l10n_util.h"
#include "base/logging.h"
@@ -69,10 +73,15 @@
void NativeButton::SetIsDefault(bool is_default) {
if (is_default == is_default_)
return;
+#if defined(OS_WIN)
+ int return_code = VK_RETURN;
+#else
+ int return_code = GDK_Return;
+#endif
if (is_default)
- AddAccelerator(Accelerator(VK_RETURN, false, false, false));
+ AddAccelerator(Accelerator(return_code, false, false, false));
else
- RemoveAccelerator(Accelerator(VK_RETURN, false, false, false));
+ RemoveAccelerator(Accelerator(return_code, false, false, false));
SetAppearsAsDefault(is_default);
}
@@ -106,6 +115,7 @@
// Clamp the size returned to at least the minimum size.
if (!ignore_minimum_size_) {
+#if defined(OS_WIN)
if (minimum_size_.width()) {
int min_width = font_.horizontal_dlus_to_pixels(minimum_size_.width());
sz.set_width(std::max(static_cast<int>(sz.width()), min_width));
@@ -114,6 +124,10 @@
int min_height = font_.vertical_dlus_to_pixels(minimum_size_.height());
sz.set_height(std::max(static_cast<int>(sz.height()), min_height));
}
+#else
+ if (minimum_size_.width() || minimum_size_.height())
+ NOTIMPLEMENTED();
+#endif
}
return sz;

Powered by Google App Engine
This is Rietveld 408576698