fdatetime.h File Reference

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

Go to the source code of this file.

Functions

GtkWidget * create_fdatetime_window (GtkWidget *parent)
void load_fdatetime_settings ()
gboolean save_fdatetime_settings ()
void fdatetime_set_orientation (gboolean is_portrait)

Function Documentation

GtkWidget* create_fdatetime_window ( GtkWidget *  parent  ) 

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

Definition at line 121 of file fdatetime.c.

References create_continue_widget(), create_title(), datetime_base_create_widgets(), g_top_window, DateTimeWidgets::hidden_button, locale_changed(), on_button_focus_in(), DateTimeWidgets::parent, DateTimeWidgets::timezone_button, and WINDOW_BORDER_PADDING.

Referenced by create_concrete_win().

00122 {
00123     // create top window
00124     g_top_window = parent;
00125     gtk_window_fullscreen(GTK_WINDOW(parent));
00126     gtk_window_set_resizable(GTK_WINDOW(parent), FALSE);
00127     gtk_container_set_border_width(GTK_CONTAINER(parent),WINDOW_BORDER_PADDING  );
00128     gtk_window_set_modal(GTK_WINDOW(parent), TRUE);
00129 
00130     // top level vbox (vboxtop)
00131     GtkWidget* vboxtop = gtk_vbox_new(FALSE, 0);
00132     gtk_container_add(GTK_CONTAINER(parent), vboxtop);
00133 
00134     // add header container the title and subtitle of this settings page
00135     create_title(GTK_VBOX(vboxtop), _("Setup"), _("Time & Date"));
00136      
00137     // Time and date.
00138     datetime_base_create_widgets(&g_widgets, &g_settings);
00139     g_signal_connect(G_OBJECT(g_widgets.hidden_button),
00140                     "focus-in-event",
00141                     G_CALLBACK(on_button_focus_in),
00142                     (gpointer)NULL);
00143     gtk_box_pack_start(GTK_BOX(vboxtop), g_widgets.parent, FALSE, FALSE, 0);
00144 
00145     // save button and continue
00146     create_continue_widget(GTK_VBOX(vboxtop));
00147 
00148     // Set the text.
00149     locale_changed();
00150 
00151     gtk_widget_grab_focus(g_widgets.timezone_button);
00152 
00153     gtk_widget_show_all(parent);
00154 
00155     return parent;
00156 }

Here is the call graph for this function:

Here is the caller graph for this function:

void fdatetime_set_orientation ( gboolean  is_portrait  ) 

Definition at line 158 of file fdatetime.c.

References DateTimeWidgets::is_portrait.

00159 {
00160     g_widgets.is_portrait = is_portrait;
00161 }

void load_fdatetime_settings (  ) 

Definition at line 81 of file fdatetime.c.

References datetime_base_load_datetime(), and LOGPRINTF.

Referenced by create_concrete_win().

00082 {
00083     LOGPRINTF("entry");
00084 
00085     datetime_base_load_datetime(&g_settings);
00086 }

Here is the call graph for this function:

Here is the caller graph for this function:

gboolean save_fdatetime_settings (  ) 

Definition at line 89 of file fdatetime.c.

References datetime_base_save_datetime(), g_top_window, and LOGPRINTF.

Referenced by on_continue_button_clicked().

00090 {
00091     LOGPRINTF("entry");
00092     gboolean ret = TRUE;
00093 
00094     if ( ! datetime_base_save_datetime(&g_widgets, &g_settings) )
00095     {
00096         LOGPRINTF("save datetime failed.");
00097         ret = FALSE;
00098 
00099         /* Create a messagebox. */
00100         GtkWidget *dialog = gtk_message_dialog_new(
00101                 GTK_WINDOW(g_top_window),
00102                 GTK_DIALOG_MODAL,
00103                 GTK_MESSAGE_WARNING,
00104                 GTK_BUTTONS_OK,
00105                 _("The date was not saved.") );
00106 
00107         gtk_dialog_run(GTK_DIALOG(dialog));
00108         gtk_widget_destroy(dialog);
00109 
00110     }
00111     return ret;
00112 }

Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  doxygen 1.6.2-20100208