datetime.h File Reference

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

Go to the source code of this file.

Functions

GtkWidget * create_datetime_window (GtkWidget *parent)
void load_datetime_settings ()
void save_datetime_settings ()
void datetime_set_orientation (gboolean is_portrait)
void datetime_set_main_focus (void)

Function Documentation

GtkWidget* create_datetime_window ( GtkWidget *  parent  ) 

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

Definition at line 103 of file datetime.c.

References create_settingsview_for_type(), create_title(), datetime_base_create_widgets(), g_list_view, g_top_window, DateTimeWidgets::hidden_button, locale_changed(), LOGPRINTF, on_button_focus_in(), DateTimeWidgets::parent, SETTING_DATETIME, and WINDOW_BORDER_PADDING.

Referenced by create_concrete_win().

00104 {
00105     LOGPRINTF("entry");
00106     // create top window
00107     g_top_window = parent;
00108     gtk_window_maximize(GTK_WINDOW(parent));
00109     gtk_window_set_resizable(GTK_WINDOW(parent), FALSE);
00110     gtk_container_set_border_width(GTK_CONTAINER(parent),WINDOW_BORDER_PADDING  );
00111     gtk_window_set_modal(GTK_WINDOW(parent), TRUE);
00112 
00113     // top level vbox (vboxtop)
00114     GtkWidget* vboxtop = gtk_vbox_new(FALSE, 0);
00115     gtk_container_add(GTK_CONTAINER(parent), vboxtop);
00116 
00117     // add header container the title and subtitle of this settings page
00118     create_title(GTK_VBOX(vboxtop), _("Settings"), _("Time & Date"));
00119     
00120     // add the back/exit bar below the title 
00121     g_list_view = create_settingsview_for_type( SETTING_DATETIME );
00122     gtk_box_pack_start(GTK_BOX(vboxtop), g_list_view, FALSE, FALSE, 0); 
00123 
00124     // Time and date.
00125     datetime_base_create_widgets(&g_widgets, &g_settings);
00126     g_signal_connect(G_OBJECT(g_widgets.hidden_button),
00127                     "focus-in-event",
00128                     G_CALLBACK(on_button_focus_in),
00129                     (gpointer) NULL );
00130     gtk_box_pack_start(GTK_BOX(vboxtop), g_widgets.parent, FALSE, FALSE, 0);
00131 
00132     // Set the text.
00133     locale_changed();
00134 
00135     gtk_widget_grab_focus(g_list_view);
00136 
00137     gtk_widget_show_all(parent);
00138 
00139     return parent;
00140 }

Here is the call graph for this function:

Here is the caller graph for this function:

void datetime_set_main_focus ( void   ) 

Definition at line 142 of file datetime.c.

References DateTimeWidgets::timezone_button.

Referenced by setting_set_focus().

00143 {
00144     gtk_widget_grab_focus(GTK_WIDGET(g_widgets.timezone_button));
00145 }

Here is the caller graph for this function:

void datetime_set_orientation ( gboolean  is_portrait  ) 

Definition at line 147 of file datetime.c.

References DateTimeWidgets::is_portrait, and LOGPRINTF.

Referenced by on_changed_orientation().

00148 {
00149     LOGPRINTF("entry");
00150     g_widgets.is_portrait = is_portrait;
00151 }

Here is the caller graph for this function:

void load_datetime_settings (  ) 

Definition at line 69 of file datetime.c.

References datetime_base_load_datetime(), and LOGPRINTF.

Referenced by create_concrete_win().

00070 {
00071     LOGPRINTF("entry");
00072 
00073     datetime_base_load_datetime(&g_settings);
00074 }

Here is the call graph for this function:

Here is the caller graph for this function:

void save_datetime_settings (  ) 

Definition at line 76 of file datetime.c.

References datetime_base_save_datetime(), g_top_window, and LOGPRINTF.

Referenced by on_listview_row_activated().

00077 {
00078     LOGPRINTF("entry");
00079 
00080     if ( ! datetime_base_save_datetime(&g_widgets, &g_settings) )
00081     {
00082         LOGPRINTF("save datetime failed.");
00083         /* Create a messagebox. */
00084         GtkWidget *dialog = gtk_message_dialog_new(
00085                 GTK_WINDOW(g_top_window), 
00086                 GTK_DIALOG_MODAL,
00087                 GTK_MESSAGE_WARNING, 
00088                 GTK_BUTTONS_OK,
00089                 _("The date was not saved.") );
00090 
00091         gtk_dialog_run(GTK_DIALOG(dialog));
00092         gtk_widget_destroy(dialog);
00093     }
00094 }

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  doxygen 1.6.2-20100208