X-Git-Url: https://git.stderr.nl/gitweb?p=rodin%2Fchimara.git;a=blobdiff_plain;f=player%2Fpreferences.c;fp=player%2Fpreferences.c;h=b7cc3adf678e6600f5d344bdd756b183f0031f0f;hp=0000000000000000000000000000000000000000;hb=e2aad0fc9a4c2bc75db8f0b3f1d2d3c70e55e7bb;hpb=490f0a12cc09054e98d99ddc195859099223e597 diff --git a/player/preferences.c b/player/preferences.c new file mode 100644 index 0000000..b7cc3ad --- /dev/null +++ b/player/preferences.c @@ -0,0 +1,237 @@ +/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */ +/* + * callbacks.c + * Copyright (C) Philip en Marijn 2008 <> + * + * preferences.c is free software copyrighted by Philip en Marijn. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name ``Philip en Marijn'' nor the name of any other + * contributor may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * preferences.c IS PROVIDED BY Philip en Marijn ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL Philip en Marijn OR ANY OTHER CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include "error.h" + +GObject *load_object(const gchar *name); +static GtkTextTag *current_tag; + +static void style_tree_select_callback(GtkTreeSelection *selection, ChimaraGlk *glk); + +/* Create the preferences dialog. */ +void +preferences_create(ChimaraGlk *glk) +{ + /* Initialize the tree of style names */ + GtkTreeStore *style_list = gtk_tree_store_new(1, G_TYPE_STRING); + GtkTreeIter buffer, grid, buffer_child, grid_child; + + gtk_tree_store_append(style_list, &buffer, NULL); + gtk_tree_store_append(style_list, &grid, NULL); + gtk_tree_store_set(style_list, &buffer, 0, "Text buffer", -1); + gtk_tree_store_set(style_list, &grid, 0, "Text grid", -1); + + int i; + gint num_tags = chimara_glk_get_num_tag_names(glk); + const gchar **tag_names = chimara_glk_get_tag_names(glk); + for(i=0; i