From a7de2d4816b4ae4727d53f0650d67afbafb01225 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 18 Nov 2016 10:56:50 +0100 Subject: Use slide template for new slides --- src/slide_window.c | 60 ------------------------------------------------------ 1 file changed, 60 deletions(-) (limited to 'src/slide_window.c') diff --git a/src/slide_window.c b/src/slide_window.c index 33a4fe0..be7215a 100644 --- a/src/slide_window.c +++ b/src/slide_window.c @@ -85,66 +85,6 @@ static gint UNUSED add_furniture(GtkWidget *widget, struct menu_pl *pl) } -static void UNUSED update_style_menus(SlideWindow *sw) -{ - //GtkWidget *menu; - SCInterpreter *scin; - struct style_id *styles; - int i, n_sty; - - /* Free old list */ - for ( i=0; in_style_menu; i++ ) { - gtk_widget_destroy(sw->style_menu[i].widget); - free(sw->style_menu[i].style_name); - } - free(sw->style_menu); - - /* Get the list of styles from the style sheet */ - scin = sc_interp_new(NULL, sw->p->lang, NULL); - if ( scin == NULL ) { - fprintf(stderr, "Failed to set up interpreter.\n"); - return; - } - sc_interp_run_stylesheet(scin, sw->p->stylesheet); - - styles = list_styles(scin, &n_sty); - if ( styles == NULL ) return; - - sc_interp_destroy(scin); - - /* Set up list for next time */ - sw->style_menu = calloc(n_sty, sizeof(struct menu_pl)); - if ( sw->style_menu == NULL ) return; - -#if 0 // FIXME - /* Add the styles to the "Insert" menu */ - menu = gtk_ui_manager_get_widget(sw->ui, "/displaywindow/insert"); - menu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(menu)); - - for ( i=0; istyle_menu[i].sw = sw; - sw->style_menu[i].widget = item; - sw->style_menu[i].style_name = styles[i].name; - - g_signal_connect(G_OBJECT(item), "activate", - G_CALLBACK(add_furniture), - &sw->style_menu[i]); - - free(styles[i].friendlyname); - } - - gtk_widget_show_all(menu); - free(styles); -#endif -} - - static void delete_frame_sig(GSimpleAction *action, GVariant *parameter, gpointer vp) { -- cgit v1.2.3