hello-world/settings/main.h File Reference

#include <gtk/gtk.h>
Include dependency graph for hello-world/settings/main.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void main_set_locale (const char *locale)
void main_quit (void)
void run_error_dialog (const gchar *msg)

Variables

G_BEGIN_DECLS GtkWidget * g_main_window

Function Documentation

void main_quit ( void   ) 

Definition at line 73 of file ctb/src/main.c.

00074 {
00075     gtk_main_quit();
00076 }

void main_set_locale ( const char *  locale  ) 

Definition at line 52 of file ctb/src/main.c.

References fileview_update_screen_texts(), LOGPRINTF, main_set_text(), and menu_set_text().

Referenced by main(), and on_changed_locale().

00053 {
00054     LOGPRINTF("entry: locale [%s]", locale);
00055 
00056     const char *old_locale = g_getenv("LANG");
00057     
00058     if (!old_locale || (strcmp(old_locale, locale) != 0))
00059     {
00060         LOGPRINTF("Locale has changed to %s", locale);
00061 
00062         // set locale in environment 
00063         g_setenv("LANG", locale, TRUE);
00064         setlocale(LC_ALL, "");
00065         
00066         // update text and refresh
00067         menu_set_text();
00068         fileview_update_screen_texts();
00069     }
00070 }

Here is the call graph for this function:

Here is the caller graph for this function:

void run_error_dialog ( const gchar *  msg  ) 

Definition at line 534 of file hello-world/settings/main.c.

References ERRORPRINTF, and g_main_window.

00535 {
00536     GtkWidget   *dialog = NULL;
00537 
00538     ERRORPRINTF("entry: msg [%s]", msg);
00539 
00540     dialog = gtk_message_dialog_new( GTK_WINDOW(g_main_window),
00541                                      GTK_DIALOG_DESTROY_WITH_PARENT,
00542                                      GTK_MESSAGE_ERROR,
00543                                      GTK_BUTTONS_OK,
00544                                      msg );
00545 
00546     gtk_dialog_run( GTK_DIALOG(dialog) );
00547     gtk_widget_destroy( dialog );
00548 }


Variable Documentation

G_BEGIN_DECLS GtkWidget* g_main_window

File Name : main.h

Description: Main module of the application Copyright (C) 2009 iRex Technologies B.V. All rights reserved.

Definition at line 66 of file hello-world/settings/main.h.

Generated by  doxygen 1.6.2-20100208