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

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

Issue 141025: gtk EditKeywordController properly enables controls when created without a TemplateURL (Closed)
Patch Set: Created 11 years, 6 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 | « no previous file | no next file » | 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/edit_keyword_controller.h" 5 #include "chrome/browser/gtk/edit_keyword_controller.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 reversed_percent); 174 reversed_percent);
175 } 175 }
176 176
177 GtkWidget* description_label = gtk_label_new(description.c_str()); 177 GtkWidget* description_label = gtk_label_new(description.c_str());
178 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog_)->vbox), description_label, 178 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog_)->vbox), description_label,
179 FALSE, FALSE, 0); 179 FALSE, FALSE, 0);
180 180
181 gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog_)->vbox), 181 gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog_)->vbox),
182 gtk_util::kContentAreaSpacing); 182 gtk_util::kContentAreaSpacing);
183 183
184 EnableControls();
185
184 gtk_widget_show_all(dialog_); 186 gtk_widget_show_all(dialog_);
185 187
186 g_signal_connect(dialog_, "response", G_CALLBACK(OnResponse), this); 188 g_signal_connect(dialog_, "response", G_CALLBACK(OnResponse), this);
187 g_signal_connect(dialog_, "destroy", G_CALLBACK(OnWindowDestroy), this); 189 g_signal_connect(dialog_, "destroy", G_CALLBACK(OnWindowDestroy), this);
188 } 190 }
189 191
190 std::wstring EditKeywordController::GetURLInput() const { 192 std::wstring EditKeywordController::GetURLInput() const {
191 return UTF8ToWide(gtk_entry_get_text(GTK_ENTRY(url_entry_))); 193 return UTF8ToWide(gtk_entry_get_text(GTK_ENTRY(url_entry_)));
192 } 194 }
193 195
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 window->CleanUpCancelledAdd(); 243 window->CleanUpCancelledAdd();
242 } 244 }
243 gtk_widget_destroy(window->dialog_); 245 gtk_widget_destroy(window->dialog_);
244 } 246 }
245 247
246 // static 248 // static
247 void EditKeywordController::OnWindowDestroy( 249 void EditKeywordController::OnWindowDestroy(
248 GtkWidget* widget, EditKeywordController* window) { 250 GtkWidget* widget, EditKeywordController* window) {
249 MessageLoop::current()->DeleteSoon(FROM_HERE, window); 251 MessageLoop::current()->DeleteSoon(FROM_HERE, window);
250 } 252 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698