static void prop_dialog_make_curtable(PropDialog *dialog) { GtkWidget *table = gtk_table_new(1,2,FALSE); gtk_table_set_row_spacings(GTK_TABLE(table), 2); gtk_table_set_col_spacings(GTK_TABLE(table), 5); gtk_widget_show(table); prop_dialog_add_raw(dialog,table); dialog->currow = 0; dialog->curtable = table; }
static WIDGET * multicol_beginprop_get_widget(MulticolProperty *prop, PropDialog *dialog) { GtkWidget *multicol = gtk_hbox_new(FALSE,1); gtk_container_set_border_width (GTK_CONTAINER(multicol), 2); gtk_widget_show(multicol); prop_dialog_add_raw(dialog,multicol); prop_dialog_container_push(dialog,multicol); prop_dialog_container_push(dialog,NULL); /* there must be a _COLUMN soon */ return NULL; /* there is no single widget to add with a label next to it. */ }
static WIDGET * notebook_beginprop_get_widget(NotebookProperty *prop, PropDialog *dialog) { GtkWidget *notebook = gtk_notebook_new(); gtk_notebook_set_tab_pos(GTK_NOTEBOOK(notebook),GTK_POS_TOP); gtk_container_set_border_width (GTK_CONTAINER(notebook), 1); gtk_widget_show(notebook); prop_dialog_add_raw(dialog,notebook); prop_dialog_container_push(dialog,notebook); prop_dialog_container_push(dialog,NULL); /* there must be a _PAGE soon */ return NULL; /* there is no single widget to add with a label next to it. */ }
static WIDGET * multicol_columnprop_get_widget(MulticolProperty *prop, PropDialog *dialog) { GtkWidget *col = gtk_vbox_new(FALSE,1); gtk_container_set_border_width (GTK_CONTAINER(col), 2); gtk_widget_show(col); prop_dialog_container_pop(dialog); /* NULL or the previous column */ gtk_box_pack_start(GTK_BOX(dialog->lastcont),col,TRUE,TRUE,0); prop_dialog_add_raw(dialog,NULL); /* to reset the internal table system */ prop_dialog_container_push(dialog,col); return NULL; }
static WIDGET * notebook_pageprop_get_widget(NotebookProperty *prop, PropDialog *dialog) { GtkWidget *page = gtk_vbox_new(FALSE,1); GtkWidget *label = gtk_label_new(_(prop->common.descr->description)); gtk_container_set_border_width (GTK_CONTAINER(page), 2); gtk_widget_show(page); gtk_widget_show(label); prop_dialog_container_pop(dialog); /* NULL or the previous page */ gtk_notebook_append_page(GTK_NOTEBOOK(dialog->lastcont),page,label); prop_dialog_add_raw(dialog,NULL); /* to reset the internal table system */ prop_dialog_container_push(dialog,page); return NULL; }
static WIDGET * frame_beginprop_get_widget(FrameProperty *prop, PropDialog *dialog) { gchar *foldstring = g_strdup_printf("%s <<<", _(prop->common.descr->description)); gchar *unfoldstring = g_strdup_printf("%s >>>", _(prop->common.descr->description)); GtkWidget *frame = gtk_frame_new(NULL); GtkWidget *vbox = gtk_vbox_new(FALSE,2); GtkWidget *foldbutton = gtk_button_new_with_label(foldstring); GtkWidget *unfoldbutton = gtk_button_new_with_label(unfoldstring); struct FoldButtonInfo *info = g_new(struct FoldButtonInfo, 1); g_free(foldstring); g_free(unfoldstring); info->frame = frame; info->unfoldbutton = unfoldbutton; gtk_frame_set_label_widget(GTK_FRAME(frame), foldbutton); gtk_container_set_border_width (GTK_CONTAINER(frame), 2); gtk_container_add(GTK_CONTAINER(frame),vbox); gtk_widget_set_sensitive (unfoldbutton, FALSE); gtk_widget_show(foldbutton); gtk_widget_show(frame); gtk_widget_show(vbox); prop_dialog_add_raw(dialog, frame); prop_dialog_add_raw_with_flags(dialog, unfoldbutton, FALSE, FALSE); g_signal_connect(G_OBJECT (foldbutton), "clicked", G_CALLBACK (frame_fold_unfold), info); g_signal_connect(G_OBJECT (unfoldbutton), "clicked", G_CALLBACK (frame_fold_unfold), info); prop_dialog_container_push(dialog,vbox); return NULL; /* there is no single widget to add with a label next to it. */ }