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

Side by Side Diff: chrome/browser/gtk/browser_window_gtk.cc

Issue 155518: Make GTK file dialog box modal for parent window, instead of for the entire... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 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
« no previous file with comments | « chrome/browser/gtk/bookmark_manager_gtk.cc ('k') | chrome/browser/gtk/dialogs_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/gtk/browser_window_gtk.h" 5 #include "chrome/browser/gtk/browser_window_gtk.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 #include <X11/XF86keysym.h> 8 #include <X11/XF86keysym.h>
9 9
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 #endif 377 #endif
378 frame_cursor_(NULL), 378 frame_cursor_(NULL),
379 is_active_(true) { 379 is_active_(true) {
380 use_custom_frame_.Init(prefs::kUseCustomChromeFrame, 380 use_custom_frame_.Init(prefs::kUseCustomChromeFrame,
381 browser_->profile()->GetPrefs(), this); 381 browser_->profile()->GetPrefs(), this);
382 window_ = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL)); 382 window_ = GTK_WINDOW(gtk_window_new(GTK_WINDOW_TOPLEVEL));
383 g_object_set_data(G_OBJECT(window_), kBrowserWindowKey, this); 383 g_object_set_data(G_OBJECT(window_), kBrowserWindowKey, this);
384 gtk_widget_add_events(GTK_WIDGET(window_), GDK_BUTTON_PRESS_MASK | 384 gtk_widget_add_events(GTK_WIDGET(window_), GDK_BUTTON_PRESS_MASK |
385 GDK_POINTER_MOTION_MASK); 385 GDK_POINTER_MOTION_MASK);
386 386
387 // Add this window to its own unique window group to allow for
388 // window-to-parent modality.
389 gtk_window_group_add_window(gtk_window_group_new(), window_);
390 g_object_unref(gtk_window_get_group(window_));
391
387 SetWindowIcon(); 392 SetWindowIcon();
388 SetBackgroundColor(); 393 SetBackgroundColor();
389 SetGeometryHints(); 394 SetGeometryHints();
390 ConnectHandlersToSignals(); 395 ConnectHandlersToSignals();
391 ConnectAccelerators(); 396 ConnectAccelerators();
392 bounds_ = GetInitialWindowBounds(window_); 397 bounds_ = GetInitialWindowBounds(window_);
393 398
394 InitWidgets(); 399 InitWidgets();
395 HideUnsupportedWindowFeatures(); 400 HideUnsupportedWindowFeatures();
396 401
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after
1439 *edge = GDK_WINDOW_EDGE_NORTH_EAST; 1444 *edge = GDK_WINDOW_EDGE_NORTH_EAST;
1440 } else if (y < bounds_.height() - kResizeAreaCornerSize) { 1445 } else if (y < bounds_.height() - kResizeAreaCornerSize) {
1441 *edge = GDK_WINDOW_EDGE_EAST; 1446 *edge = GDK_WINDOW_EDGE_EAST;
1442 } else { 1447 } else {
1443 *edge = GDK_WINDOW_EDGE_SOUTH_EAST; 1448 *edge = GDK_WINDOW_EDGE_SOUTH_EAST;
1444 } 1449 }
1445 return true; 1450 return true;
1446 } 1451 }
1447 NOTREACHED(); 1452 NOTREACHED();
1448 } 1453 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/bookmark_manager_gtk.cc ('k') | chrome/browser/gtk/dialogs_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698