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

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

Issue 2975003: Makes the auto fill dialogs match the mocks. (Closed)
Patch Set: Moves function declarations out of autofill_dialog.h Created 10 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
« no previous file with comments | « chrome/browser/gtk/keyword_editor_view.h ('k') | chrome/browser/gtk/options/content_page_gtk.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/keyword_editor_view.h" 5 #include "chrome/browser/gtk/keyword_editor_view.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "base/gtk_util.h" 10 #include "base/gtk_util.h"
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 // static 410 // static
411 gboolean KeywordEditorView::OnCheckRowIsSeparator(GtkTreeModel* model, 411 gboolean KeywordEditorView::OnCheckRowIsSeparator(GtkTreeModel* model,
412 GtkTreeIter* iter, 412 GtkTreeIter* iter,
413 gpointer user_data) { 413 gpointer user_data) {
414 gboolean is_separator; 414 gboolean is_separator;
415 gtk_tree_model_get(model, iter, COL_IS_SEPARATOR, &is_separator, -1); 415 gtk_tree_model_get(model, iter, COL_IS_SEPARATOR, &is_separator, -1);
416 return is_separator; 416 return is_separator;
417 } 417 }
418 418
419 // static 419 // static
420 gboolean KeywordEditorView::OnSelectionFilter(GtkTreeSelection *selection, 420 gboolean KeywordEditorView::OnSelectionFilter(GtkTreeSelection* selection,
421 GtkTreeModel *model, 421 GtkTreeModel* model,
422 GtkTreePath *path, 422 GtkTreePath* path,
423 gboolean path_currently_selected, 423 gboolean path_currently_selected,
424 gpointer user_data) { 424 gpointer user_data) {
425 GtkTreeIter iter; 425 GtkTreeIter iter;
426 if (!gtk_tree_model_get_iter(model, &iter, path)) { 426 if (!gtk_tree_model_get_iter(model, &iter, path)) {
427 NOTREACHED(); 427 NOTREACHED();
428 return TRUE; 428 return TRUE;
429 } 429 }
430 gboolean is_header; 430 gboolean is_header;
431 gtk_tree_model_get(model, &iter, COL_IS_HEADER, &is_header, -1); 431 gtk_tree_model_get(model, &iter, COL_IS_HEADER, &is_header, -1);
432 return !is_header; 432 return !is_header;
433 } 433 }
434 434
435 // static 435 // static
436 void KeywordEditorView::OnSelectionChanged( 436 void KeywordEditorView::OnSelectionChanged(
437 GtkTreeSelection *selection, KeywordEditorView* editor) { 437 GtkTreeSelection* selection, KeywordEditorView* editor) {
438 editor->EnableControls(); 438 editor->EnableControls();
439 } 439 }
440 440
441 // static 441 // static
442 void KeywordEditorView::OnRowActivated(GtkTreeView* tree_view, 442 void KeywordEditorView::OnRowActivated(GtkTreeView* tree_view,
443 GtkTreePath* path, 443 GtkTreePath* path,
444 GtkTreeViewColumn* column, 444 GtkTreeViewColumn* column,
445 KeywordEditorView* editor) { 445 KeywordEditorView* editor) {
446 OnEditButtonClicked(NULL, editor); 446 OnEditButtonClicked(NULL, editor);
447 } 447 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 int model_row = editor->GetSelectedModelRow(); 493 int model_row = editor->GetSelectedModelRow();
494 if (model_row == -1) { 494 if (model_row == -1) {
495 NOTREACHED(); 495 NOTREACHED();
496 return; 496 return;
497 } 497 }
498 int new_index = editor->controller_->MakeDefaultTemplateURL(model_row); 498 int new_index = editor->controller_->MakeDefaultTemplateURL(model_row);
499 if (new_index > 0) { 499 if (new_index > 0) {
500 editor->SelectModelRow(new_index); 500 editor->SelectModelRow(new_index);
501 } 501 }
502 } 502 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/keyword_editor_view.h ('k') | chrome/browser/gtk/options/content_page_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698