power.h File Reference

#include <gtk/gtk.h>
Include dependency graph for power.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

GtkWidget * create_power_window (GtkWidget *parent)
void load_power_settings ()
void save_power_settings ()

Function Documentation

GtkWidget* create_power_window ( GtkWidget *  parent  ) 

Copyright (C) 2008 iRex Technologies B.V. All rights reserved.

Definition at line 138 of file power.c.

References create_auto_shutdown_widgets(), create_frame(), create_settingsview(), create_title(), g_power_settings_window, init_widgets_with_settings(), on_focus_in(), on_focus_out(), on_listview_navigate_cursor(), on_listview_row_activated(), and WINDOW_BORDER_PADDING.

Referenced by create_concrete_win().

00139 {
00140     // create top window
00141     GtkWidget* top_window = parent;
00142     gtk_window_maximize(GTK_WINDOW(top_window));
00143     gtk_window_set_resizable(GTK_WINDOW(top_window), FALSE);
00144     gtk_container_set_border_width(GTK_CONTAINER(top_window),WINDOW_BORDER_PADDING  );
00145     gtk_window_set_modal(GTK_WINDOW(top_window), TRUE);
00146 
00147     // top level vbox (vboxtop)
00148     GtkWidget* vboxtop = gtk_vbox_new(FALSE, 0);
00149     gtk_container_add(GTK_CONTAINER(top_window), vboxtop);
00150 
00151     // add header container the title and subtitle of this settings page
00152     create_title(GTK_VBOX(vboxtop), _("Settings"), _("Power Management"));
00153     
00154     // add the back/exit bar below the title 
00155     GtkWidget* view = create_settingsview();
00156     gtk_box_pack_start(GTK_BOX(vboxtop), view, FALSE, FALSE, 0); 
00157     g_signal_connect(view, "row-activated", G_CALLBACK(on_listview_row_activated), NULL ) ;
00158     g_signal_connect(view, "navigate-cursor", G_CALLBACK(on_listview_navigate_cursor), NULL ) ;
00159     g_signal_connect(view, "focus-in-event", G_CALLBACK(on_focus_in), NULL );
00160     g_signal_connect(view, "focus-out-event", G_CALLBACK(on_focus_out), NULL );
00161  
00162     GtkWidget* vbox = GTK_WIDGET( create_frame(GTK_VBOX(vboxtop)) );
00163     create_auto_shutdown_widgets(GTK_BOX(vbox));
00164 
00165 
00166     // Update widget with current settings.
00167     init_widgets_with_settings();
00168 
00169     g_power_settings_window = top_window;
00170 
00171     gtk_widget_grab_focus(view);
00172 
00173     gtk_widget_show_all(top_window);
00174     return top_window;
00175 }

Here is the call graph for this function:

Here is the caller graph for this function:

void load_power_settings (  ) 

Definition at line 112 of file power.c.

References GCONF_MIN_STANDBY, GCONF_STANDBY_IF_PLUGGED, get_value_bool(), get_value_int(), LOGPRINTF, PowerSettings::minutes_standby, and PowerSettings::standby_if_plugged.

Referenced by create_concrete_win().

Here is the call graph for this function:

Here is the caller graph for this function:

void save_power_settings (  ) 

Definition at line 122 of file power.c.

References GCONF_MIN_STANDBY, GCONF_STANDBY_IF_PLUGGED, LOGPRINTF, PowerSettings::minutes_standby, set_value_bool(), set_value_int(), and PowerSettings::standby_if_plugged.

Referenced by on_listview_row_activated().

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  doxygen 1.6.2-20100208