00001 /* 00002 lkmonitor (Linux Kernel Monitor) 00003 00004 Application for monitoring and tuning a Linux kernel. 00005 00006 Copyright (C) 2005-2006 Fernando ApesteguĂa 00007 00008 This program is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU General Public License 00010 as published by the Free Software Foundation; either version 2 00011 of the License, or (at your option) any later version. 00012 00013 This program is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with this program; if not, write to the Free Software 00020 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00021 */ 00022 #ifdef HAVE_CONFIG_H 00023 # include <config.h> 00024 #endif 00025 00026 #include <gtk/gtk.h> 00027 00028 #include "callbacks.h" 00029 #include "interface.h" 00030 #include "support.h" 00031 #include "lininfo.h" 00032 #include "others.h" 00033 #include "lkmonitor.h" 00034 #include "update.h" 00035 00036 00037 void 00038 on_about1_activate (GtkMenuItem *menuitem, 00039 gpointer user_data) 00040 { 00041 gtk_widget_show(create_about()); 00042 } 00043 00044 00045 void 00046 on_quit1_activate (GtkMenuItem *menuitem, 00047 gpointer user_data) 00048 { 00049 lkmonitor_exit(); 00050 gtk_main_quit(); 00051 00052 } 00053 00054 gboolean 00055 on_window1_delete_event (GtkWidget *widget, 00056 GdkEvent *event, 00057 gpointer user_data) 00058 { 00059 extern gboolean is_icon; 00060 00061 is_icon=TRUE; 00062 gtk_widget_hide(widget); 00063 return TRUE; //With TRUE the signal is not propagated up. 00064 00065 } 00066 00067 void 00068 on_btn_load_clicked (GtkButton *button, 00069 gpointer user_data) 00070 { 00071 update_settings(); 00072 00073 } 00074 00075 void 00076 on_btn_write_clicked (GtkButton *button, 00077 gpointer user_data) 00078 { 00079 lkmonitor_write_settings(); 00080 //Now, we should read settings again to properly update the data. 00081 update_settings(); 00082 } 00083 00084 void 00085 on_btn_dev_load_clicked (GtkButton *button, 00086 gpointer user_data) 00087 { 00088 update_devs(); 00089 }