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

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

Issue 159147: 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 | « no previous file | chrome/browser/gtk/browser_window_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/bookmark_manager_gtk.h" 5 #include "chrome/browser/gtk/bookmark_manager_gtk.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 BookmarkManagerGtk::~BookmarkManagerGtk() { 316 BookmarkManagerGtk::~BookmarkManagerGtk() {
317 SaveColumnConfiguration(); 317 SaveColumnConfiguration();
318 model_->RemoveObserver(this); 318 model_->RemoveObserver(this);
319 } 319 }
320 320
321 void BookmarkManagerGtk::InitWidgets() { 321 void BookmarkManagerGtk::InitWidgets() {
322 window_ = gtk_window_new(GTK_WINDOW_TOPLEVEL); 322 window_ = gtk_window_new(GTK_WINDOW_TOPLEVEL);
323 gtk_window_set_title(GTK_WINDOW(window_), 323 gtk_window_set_title(GTK_WINDOW(window_),
324 l10n_util::GetStringUTF8(IDS_BOOKMARK_MANAGER_TITLE).c_str()); 324 l10n_util::GetStringUTF8(IDS_BOOKMARK_MANAGER_TITLE).c_str());
325 325
326 // Add this window to its own unique window group to allow for
327 // window-to-parent modality.
328 gtk_window_group_add_window(gtk_window_group_new(), GTK_WINDOW(window_));
329 g_object_unref(gtk_window_get_group(GTK_WINDOW(window_)));
330
326 // Set the default size of the bookmark manager. 331 // Set the default size of the bookmark manager.
327 int width, height; 332 int width, height;
328 gtk_util::GetWidgetSizeFromResources(window_, 333 gtk_util::GetWidgetSizeFromResources(window_,
329 IDS_BOOKMARK_MANAGER_DIALOG_WIDTH_CHARS, 334 IDS_BOOKMARK_MANAGER_DIALOG_WIDTH_CHARS,
330 IDS_BOOKMARK_MANAGER_DIALOG_HEIGHT_LINES, 335 IDS_BOOKMARK_MANAGER_DIALOG_HEIGHT_LINES,
331 &width, &height); 336 &width, &height);
332 gtk_window_set_default_size(GTK_WINDOW(window_), width, height); 337 gtk_window_set_default_size(GTK_WINDOW(window_), width, height);
333 338
334 // Build the organize and tools menus. 339 // Build the organize and tools menus.
335 organize_ = gtk_menu_item_new_with_label( 340 organize_ = gtk_menu_item_new_with_label(
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
1211 } else if (id == IDS_BOOKMARK_MANAGER_EXPORT_MENU) { 1216 } else if (id == IDS_BOOKMARK_MANAGER_EXPORT_MENU) {
1212 if (g_browser_process->io_thread()) { 1217 if (g_browser_process->io_thread()) {
1213 bookmark_html_writer::WriteBookmarks( 1218 bookmark_html_writer::WriteBookmarks(
1214 g_browser_process->io_thread()->message_loop(), model_, 1219 g_browser_process->io_thread()->message_loop(), model_,
1215 path.ToWStringHack()); 1220 path.ToWStringHack());
1216 } 1221 }
1217 } else { 1222 } else {
1218 NOTREACHED(); 1223 NOTREACHED();
1219 } 1224 }
1220 } 1225 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/gtk/browser_window_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698