main.c (grpn-1.5.1) | : | main.c (grpn-1.5.2) | ||
---|---|---|---|---|
skipping to change at line 66 | skipping to change at line 66 | |||
GtkWidget *main_w; | GtkWidget *main_w; | |||
int main(int argc, char *argv[]) | int main(int argc, char *argv[]) | |||
{ | { | |||
int n; | int n; | |||
int rows, cols; | int rows, cols; | |||
int drawButtons; | int drawButtons; | |||
char *btn_font, *disp_font; | char *btn_font, *disp_font; | |||
/* GtkWidget *main_w; */ | /* GtkWidget *main_w; */ | |||
GtkWidget *vbox; | GtkWidget *vbox; | |||
GtkWidget *menu; | ||||
GtkWidget *mdisp; | ||||
GtkWidget *lcd; | ||||
GtkWidget *btns; | ||||
GdkFont *new_font; | ||||
GtkStyle *default_style, *new_style; | ||||
GdkBitmap *icon_bitmap; | GdkBitmap *icon_bitmap; | |||
#ifdef USE_GNOME | #ifdef USE_GNOME | |||
GnomeAppBar *appbar; | GnomeAppBar *appbar; | |||
#endif | #endif | |||
setlocale(LC_ALL, "C"); | setlocale(LC_ALL, "C"); | |||
#ifdef USE_GNOME | #ifdef USE_GNOME | |||
gnome_init("grpn", "1.0", argc, argv); | gnome_init("grpn", "1.0", argc, argv); | |||
gnome_app_new("grpn", "grpn"); | gnome_app_new("grpn", "grpn"); | |||
#else | #else | |||
skipping to change at line 200 | skipping to change at line 194 | |||
/* the main window contains the work area and the menubar */ | /* the main window contains the work area and the menubar */ | |||
main_w = gtk_window_new(GTK_WINDOW_TOPLEVEL); | main_w = gtk_window_new(GTK_WINDOW_TOPLEVEL); | |||
gtk_widget_set_name(main_w, "grpn"); | gtk_widget_set_name(main_w, "grpn"); | |||
/*create the box that everyone goes in */ | /*create the box that everyone goes in */ | |||
vbox = gtk_vbox_new(FALSE, 0); | vbox = gtk_vbox_new(FALSE, 0); | |||
gtk_container_add(GTK_CONTAINER(main_w), vbox); | gtk_container_add(GTK_CONTAINER(main_w), vbox); | |||
gtk_widget_show(vbox); | gtk_widget_show(vbox); | |||
/* set up the menu bar */ | /* set up the menu bar */ | |||
menu = setup_menu(vbox); | setup_menu(vbox); | |||
#endif | #endif | |||
/* handle window manager close */ | /* handle window manager close */ | |||
gtk_signal_connect(GTK_OBJECT(main_w), "delete_event", | gtk_signal_connect(GTK_OBJECT(main_w), "delete_event", | |||
GTK_SIGNAL_FUNC(delete_event), NULL); | GTK_SIGNAL_FUNC(delete_event), NULL); | |||
gtk_signal_connect(GTK_OBJECT(main_w), "destroy", | gtk_signal_connect(GTK_OBJECT(main_w), "destroy", | |||
GTK_SIGNAL_FUNC(destroy), NULL); | GTK_SIGNAL_FUNC(destroy), NULL); | |||
/* create the varrious subsystems */ | /* create the varrious subsystems */ | |||
mdisp = setupModeDisplay(vbox); | setupModeDisplay(vbox); | |||
if(drawButtons) btns = setupButtons(vbox, btn_font); | if (drawButtons) | |||
lcd = setupLCD(vbox, rows, cols, disp_font); | setupButtons(vbox, btn_font); | |||
setupLCD(vbox, rows, cols, disp_font); | ||||
/* Create pixmap of depth 1 (bitmap) for icon */ | /* Create pixmap of depth 1 (bitmap) for icon */ | |||
gtk_widget_realize(main_w); | gtk_widget_realize(main_w); | |||
icon_bitmap = gdk_bitmap_create_from_data(main_w->window, | icon_bitmap = gdk_bitmap_create_from_data(main_w->window, | |||
icon_bitmap_bits, icon_bitmap_width, icon_bitmap_height); | icon_bitmap_bits, icon_bitmap_width, icon_bitmap_height); | |||
gdk_window_set_icon(main_w->window, NULL, icon_bitmap, NULL); | gdk_window_set_icon(main_w->window, NULL, icon_bitmap, NULL); | |||
gtk_widget_show(main_w); | gtk_widget_show(main_w); | |||
gtk_main(); | gtk_main(); | |||
End of changes. 3 change blocks. | ||||
10 lines changed or deleted | 5 lines changed or added |