#include <gtk/gtk.h>
Go to the source code of this file.
Functions | |
GtkWidget * | create_flipbar_window (GtkWidget *parent) |
void | load_flipbar_settings () |
void | save_flipbar_settings () |
GtkWidget* create_flipbar_window | ( | GtkWidget * | parent | ) |
Copyright (C) 2008 iRex Technologies B.V. All rights reserved.
Definition at line 118 of file flipbar.c.
References create_flipbar_widgets(), create_settingsview(), create_title(), init_widgets_with_settings(), on_focus_in(), on_focus_out(), on_listview_navigate_cursor(), on_listview_row_activated(), SMALL_SPACING, WINDOW_BORDER_PADDING, WINDOW_BOTTOM_PADDING, WINDOW_H_PADDING, and WINDOW_TOP_ALT_PADDING.
Referenced by create_concrete_win().
00119 { 00120 // create top window 00121 GtkWidget* top_window = parent; 00122 gtk_window_maximize(GTK_WINDOW(top_window)); 00123 gtk_window_set_resizable(GTK_WINDOW(top_window), FALSE); 00124 gtk_container_set_border_width(GTK_CONTAINER(top_window),WINDOW_BORDER_PADDING ); 00125 gtk_window_set_modal(GTK_WINDOW(top_window), TRUE); 00126 00127 // top level vbox (vboxtop) 00128 GtkWidget* vboxtop = gtk_vbox_new(FALSE, 3); 00129 gtk_container_add(GTK_CONTAINER(top_window), vboxtop); 00130 00131 // add header container the title and subtitle of this settings page 00132 create_title(GTK_VBOX(vboxtop), _("Settings"), _("Flipbar Setup")); 00133 00134 // add the back/exit bar below the title 00135 GtkWidget* view = create_settingsview(); 00136 gtk_box_pack_start(GTK_BOX(vboxtop), view, FALSE, FALSE,0 ); 00137 g_signal_connect(view, "row-activated", G_CALLBACK(on_listview_row_activated), NULL ) ; 00138 g_signal_connect(view, "navigate-cursor", G_CALLBACK(on_listview_navigate_cursor), NULL ) ; 00139 g_signal_connect(view, "focus-in-event", G_CALLBACK(on_focus_in), NULL ); 00140 g_signal_connect(view, "focus-out-event", G_CALLBACK(on_focus_out), NULL ); 00141 00142 // add an alignment below the exit bar 00143 GtkWidget* alignment = gtk_alignment_new(0, 0, 1.0, 0.0); 00144 gtk_container_add(GTK_CONTAINER(vboxtop), alignment); 00145 00146 // introdude a frame in the alignment 00147 GtkWidget* frame = gtk_frame_new(NULL); 00148 gtk_widget_set_name(frame, "irex-margins-frame"); 00149 gtk_container_add(GTK_CONTAINER(alignment), frame); 00150 gtk_container_set_border_width(GTK_CONTAINER(frame), 3); 00151 00152 // alignment in frame 00153 GtkWidget* alignment2 = gtk_alignment_new(0.0, 0.0, 1.0, 1.0); 00154 gtk_container_add(GTK_CONTAINER(frame), alignment2); 00155 gtk_alignment_set_padding(GTK_ALIGNMENT(alignment2), 00156 WINDOW_TOP_ALT_PADDING, 00157 WINDOW_BOTTOM_PADDING, 00158 WINDOW_H_PADDING, 00159 WINDOW_H_PADDING); 00160 00161 // vbox in alignment2 00162 GtkWidget* innervbox = gtk_vbox_new(FALSE, SMALL_SPACING); 00163 gtk_container_add(GTK_CONTAINER(alignment2), innervbox); 00164 00165 // The margin settings section. 00166 create_flipbar_widgets(GTK_BOX(innervbox)); 00167 00168 // Update widget with current settings. 00169 init_widgets_with_settings(); 00170 00171 gtk_widget_grab_focus(view); 00172 00173 gtk_widget_show_all(top_window); 00174 return top_window; 00175 }
void load_flipbar_settings | ( | ) |
Definition at line 239 of file flipbar.c.
References GCONF_PAGETURN_INVERTED, get_value_bool(), and FlipBarSettings::pageturn_inverted.
Referenced by create_concrete_win().
00240 { 00241 g_orig_flipbar_settings.pageturn_inverted = get_value_bool(GCONF_PAGETURN_INVERTED); 00242 g_cur_flipbar_settings = g_orig_flipbar_settings; 00243 }
void save_flipbar_settings | ( | ) |
Definition at line 246 of file flipbar.c.
References GCONF_PAGETURN_INVERTED, LOGPRINTF, FlipBarSettings::pageturn_inverted, and set_value_bool().
Referenced by on_listview_row_activated().
00247 { 00248 if (g_cur_flipbar_settings.pageturn_inverted != g_orig_flipbar_settings.pageturn_inverted ) 00249 { 00250 set_value_bool(GCONF_PAGETURN_INVERTED, g_cur_flipbar_settings.pageturn_inverted); 00251 } 00252 LOGPRINTF("Saving flipbar settings, done."); 00253 }