| OLD | NEW |
| 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/ui/gtk/task_manager_gtk.h" | 5 #include "chrome/browser/ui/gtk/task_manager_gtk.h" |
| 6 | 6 |
| 7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 850 // Compare by the first-in-group rows so that the groups will stay together. | 850 // Compare by the first-in-group rows so that the groups will stay together. |
| 851 return model_->CompareValues(group_range1.first, group_range2.first, id); | 851 return model_->CompareValues(group_range1.first, group_range2.first, id); |
| 852 } | 852 } |
| 853 } | 853 } |
| 854 | 854 |
| 855 void TaskManagerGtk::OnDestroy(GtkWidget* dialog) { | 855 void TaskManagerGtk::OnDestroy(GtkWidget* dialog) { |
| 856 instance_ = NULL; | 856 instance_ = NULL; |
| 857 delete this; | 857 delete this; |
| 858 } | 858 } |
| 859 | 859 |
| 860 void TaskManagerGtk::OnResponse(GtkWidget* dialog, gint response_id) { | 860 void TaskManagerGtk::OnResponse(GtkWidget* dialog, int response_id) { |
| 861 if (response_id == GTK_RESPONSE_DELETE_EVENT) { | 861 if (response_id == GTK_RESPONSE_DELETE_EVENT) { |
| 862 // Store the dialog's size so we can restore it the next time it's opened. | 862 // Store the dialog's size so we can restore it the next time it's opened. |
| 863 if (g_browser_process->local_state()) { | 863 if (g_browser_process->local_state()) { |
| 864 gfx::Rect dialog_bounds = gtk_util::GetDialogBounds(GTK_WIDGET(dialog)); | 864 gfx::Rect dialog_bounds = gtk_util::GetDialogBounds(GTK_WIDGET(dialog)); |
| 865 | 865 |
| 866 DictionaryValue* placement_pref = | 866 DictionaryValue* placement_pref = |
| 867 g_browser_process->local_state()->GetMutableDictionary( | 867 g_browser_process->local_state()->GetMutableDictionary( |
| 868 prefs::kTaskManagerWindowPlacement); | 868 prefs::kTaskManagerWindowPlacement); |
| 869 // Note that we store left/top for consistency with Windows, but that we | 869 // Note that we store left/top for consistency with Windows, but that we |
| 870 // *don't* restore them. | 870 // *don't* restore them. |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 985 guint keyval, | 985 guint keyval, |
| 986 GdkModifierType modifier) { | 986 GdkModifierType modifier) { |
| 987 if (keyval == GDK_w && modifier == GDK_CONTROL_MASK) { | 987 if (keyval == GDK_w && modifier == GDK_CONTROL_MASK) { |
| 988 // The GTK_RESPONSE_DELETE_EVENT response must be sent before the widget | 988 // The GTK_RESPONSE_DELETE_EVENT response must be sent before the widget |
| 989 // is destroyed. The deleted object will receive gtk signals otherwise. | 989 // is destroyed. The deleted object will receive gtk signals otherwise. |
| 990 gtk_dialog_response(GTK_DIALOG(dialog_), GTK_RESPONSE_DELETE_EVENT); | 990 gtk_dialog_response(GTK_DIALOG(dialog_), GTK_RESPONSE_DELETE_EVENT); |
| 991 } | 991 } |
| 992 | 992 |
| 993 return TRUE; | 993 return TRUE; |
| 994 } | 994 } |
| OLD | NEW |