From edc36405fe75a46db0fc1e0590d87d792a7b961d Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Sat, 3 Mar 2012 20:59:35 +0100 Subject: gtk2: Remove dead code --- src/main-gtk2.c | 100 +------------------------------------------------------- 1 file changed, 1 insertion(+), 99 deletions(-) (limited to 'src/main-gtk2.c') diff --git a/src/main-gtk2.c b/src/main-gtk2.c index 33ccd62c..c0e22c7b 100644 --- a/src/main-gtk2.c +++ b/src/main-gtk2.c @@ -3539,60 +3539,6 @@ static void load_font(term_data *td, cptr fontname) } -/* - * React to OK button press in font selection dialogue - */ -static void font_ok_callback( - GtkWidget *widget, - GtkWidget *font_selector) -{ - gchar *fontname; - term_data *td; - - td = gtk_object_get_data(GTK_OBJECT(font_selector), "term_data"); - - g_assert(td != NULL); - - /* Retrieve font name from player's selection */ - fontname = gtk_font_selection_dialog_get_font_name( - GTK_FONT_SELECTION_DIALOG(font_selector)); - - /* Leave unless selection was valid */ - if (fontname == NULL) return; - - /* Load font and update font size info */ - load_font(td, fontname); - - /* Hack - Hide the window - finally found the trick... */ - gtk_widget_hide_all(td->window); - - /* Resizes the drawing area */ - gtk_drawing_area_size( - GTK_DRAWING_AREA(td->drawing_area), - td->cols * td->font_wid, - td->rows * td->font_hgt); - - /* Update the geometry hints for the window */ - term_data_set_geometry_hints(td); - - /* Reallocate the backing store */ - term_data_set_backing_store(td); - - /* Hack - Show the window */ - gtk_widget_show_all(td->window); - -#ifdef USE_GRAPHICS - - /* We have to resize tiles when we are in graphics mode */ - resize_request = TRUE; - -#endif /* USE_GRAPHICS */ - - /* Hack - force redraw */ - Term_key_push(KTRL('R')); -} - - /* * Process Options-Font-* menu command */ @@ -3601,51 +3547,7 @@ static void change_font_event_handler( guint user_action, GtkWidget *widget) { - GtkWidget *font_selector; - - font_selector = gtk_font_selection_dialog_new("Select font"); -#if 0 // DGDGDGDG - gtk_object_set_data( - GTK_OBJECT(font_selector), - "term_data", - user_data); - - /* Filter to show only fixed-width fonts */ - gtk_font_selection_dialog_set_filter( - GTK_FONT_SELECTION_DIALOG(font_selector), - GTK_FONT_FILTER_BASE, - GTK_FONT_ALL, - NULL, - NULL, - NULL, - NULL, - spacings, - NULL); - - gtk_signal_connect( - GTK_OBJECT(GTK_FONT_SELECTION_DIALOG(font_selector)->ok_button), - "clicked", - font_ok_callback, - (gpointer)font_selector); - - /* - * Ensure that the dialog box is destroyed when the user clicks - * a button. - */ - gtk_signal_connect_object( - GTK_OBJECT(GTK_FONT_SELECTION_DIALOG(font_selector)->ok_button), - "clicked", - GTK_SIGNAL_FUNC(gtk_widget_destroy), - (gpointer)font_selector); - - gtk_signal_connect_object( - GTK_OBJECT(GTK_FONT_SELECTION_DIALOG(font_selector)->cancel_button), - "clicked", - GTK_SIGNAL_FUNC(gtk_widget_destroy), - (gpointer)font_selector); - - gtk_widget_show(GTK_WIDGET(font_selector)); -#endif + /* Not implemented */ } -- cgit v1.2.3