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

Side by Side Diff: chrome/browser/printing/print_dialog_gtk.cc

Issue 6627038: gtk: Rename OnDialogResponse() to OnResponse() to standardize on a consistent naming scheme. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/printing/print_dialog_gtk.h" 5 #include "chrome/browser/printing/print_dialog_gtk.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <gtk/gtkpagesetupunixdialog.h> 8 #include <gtk/gtkpagesetupunixdialog.h>
9 #include <gtk/gtkprintjob.h> 9 #include <gtk/gtkprintjob.h>
10 #include <sys/stat.h> 10 #include <sys/stat.h>
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 gtk_widget_destroy(dialog_); 91 gtk_widget_destroy(dialog_);
92 dialog_ = NULL; 92 dialog_ = NULL;
93 page_setup_ = NULL; 93 page_setup_ = NULL;
94 printer_ = NULL; 94 printer_ = NULL;
95 if (gtk_settings_) { 95 if (gtk_settings_) {
96 g_object_unref(gtk_settings_); 96 g_object_unref(gtk_settings_);
97 gtk_settings_ = NULL; 97 gtk_settings_ = NULL;
98 } 98 }
99 } 99 }
100 100
101 void PrintDialogGtk::OnResponse(GtkWidget* dialog, gint response_id) { 101 void PrintDialogGtk::OnResponse(GtkWidget* dialog, int response_id) {
102 gtk_widget_hide(dialog_); 102 gtk_widget_hide(dialog_);
103 103
104 switch (response_id) { 104 switch (response_id) {
105 case GTK_RESPONSE_OK: { 105 case GTK_RESPONSE_OK: {
106 // |gtk_settings_| is a new object. 106 // |gtk_settings_| is a new object.
107 gtk_settings_ = gtk_print_unix_dialog_get_settings( 107 gtk_settings_ = gtk_print_unix_dialog_get_settings(
108 GTK_PRINT_UNIX_DIALOG(dialog_)); 108 GTK_PRINT_UNIX_DIALOG(dialog_));
109 // |printer_| and |page_setup_| are owned by |dialog_|. 109 // |printer_| and |page_setup_| are owned by |dialog_|.
110 page_setup_ = gtk_print_unix_dialog_get_page_setup( 110 page_setup_ = gtk_print_unix_dialog_get_page_setup(
111 GTK_PRINT_UNIX_DIALOG(dialog_)); 111 GTK_PRINT_UNIX_DIALOG(dialog_));
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 NULL); 212 NULL);
213 // Printing finished. 213 // Printing finished.
214 Release(); 214 Release();
215 } 215 }
216 216
217 void PrintDialogGtk::set_save_document_event(base::WaitableEvent* event) { 217 void PrintDialogGtk::set_save_document_event(base::WaitableEvent* event) {
218 DCHECK(event); 218 DCHECK(event);
219 DCHECK(!save_document_event_); 219 DCHECK(!save_document_event_);
220 save_document_event_ = event; 220 save_document_event_ = event;
221 } 221 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698