Exemplo n.º 1
0
/************************ Window ************************/
static void
mud_window_prefs_construct_window(MudWindowPrefs *self)
{
    GladeXML *glade;
    GtkWidget *main_window;
    gint i;

    glade = glade_xml_new(GLADEDIR "/prefs.glade", "preferences_window", NULL);

    self->priv->window = glade_xml_get_widget(glade, "preferences_window");

    self->priv->echo_check     = glade_xml_get_widget(glade, "cb_echo");
    self->priv->keep_check     = glade_xml_get_widget(glade, "cb_keep");
    self->priv->div_entry      = glade_xml_get_widget(glade, "entry_commdev");
    self->priv->encoding_combo = glade_xml_get_widget(glade, "encoding_combo");
    self->priv->scroll_check   = glade_xml_get_widget(glade, "cb_scrollback");
    self->priv->lines_spin     = glade_xml_get_widget(glade, "sb_lines");
    self->priv->font_button    = glade_xml_get_widget(glade, "fp_font");
    self->priv->fore_button    = glade_xml_get_widget(glade, "cb_foreground");
    self->priv->back_button    = glade_xml_get_widget(glade, "cb_background");
    self->priv->proxy_check    = glade_xml_get_widget(glade, "proxy_check");
    self->priv->proxy_entry    = glade_xml_get_widget(glade, "proxy_entry");
    self->priv->proxy_combo    = glade_xml_get_widget(glade, "proxy_combo");
    self->priv->msp_check      = glade_xml_get_widget(glade, "msp_check");
    self->priv->charset_check  = glade_xml_get_widget(glade, "charset_check");

    for(i = 0; i < C_MAX; ++i)
    {
        gchar *cwidget = g_strdup_printf("cb%d", i);

        self->priv->colors[i]  = glade_xml_get_widget(glade, cwidget);

        g_free(cwidget); 
    }

    g_object_get(self->priv->parent, "window", &main_window, NULL);
    gtk_window_set_transient_for(GTK_WINDOW(self->priv->window),
                                 GTK_WINDOW(main_window));

    self->priv->disp_name = gconf_unescape_key(self->priv->name, -1);

    gtk_window_set_title(GTK_WINDOW(self->priv->window),
                         self->priv->disp_name);

    g_signal_connect(self->priv->window,
                     "delete-event",
                     G_CALLBACK(mud_window_prefs_delete_event_cb),
                     self);

    g_object_unref(glade);
}
Exemplo n.º 2
0
gchar *
gm_conf_unescape_key (const gchar *key,
                      gint len)
{
    return gconf_unescape_key (key, len);
}