25 #include "pips_config.h"
48 #define HPFC_COMPILE "Compile an HPF program"
49 #define HPFC_MAKE "Make an HPF program"
50 #define HPFC_RUN "Run an HPF program"
61 GList * compile_menu_children = gtk_container_get_children(GTK_CONTAINER(
63 for (i = 0; i < g_list_length(compile_menu_children); i++) {
64 child = (GtkWidget *) g_list_nth_data(compile_menu_children, i);
65 if (!GTK_IS_MENU_ITEM(child))
67 if (GTK_IS_SEPARATOR(child))
69 function_to_apply_on_each_menu_item(child);
71 g_list_free(compile_menu_children);
94 GtkWidget * menu_item;
100 char *hpfc_directory;
107 gtk_menu_item_remove_submenu(GTK_MENU_ITEM(
114 if (return_code == -1) {
116 "Directory \"%s\" not found... \n"
117 " Have you run the HPFC compiler from the Compile menu?\n",
120 menu_item = gtk_menu_item_new_with_label(
121 "*** No HPFC directory found ! ***");
124 }
else if (file_number == 0) {
126 "No file found in the directory \"%s\"... \n"
127 " Have you run the HPFC compiler from the Compile menu?\n",
131 = gtk_menu_item_new_with_label(
"*** No HPFC file found ! ***");
135 for (i = 0; i < file_number; i++) {
136 menu_item = gtk_menu_item_new_with_label(
gen_array_item(file_names,
139 g_signal_connect(G_OBJECT(menu_item),
"activate", G_CALLBACK(
145 gtk_menu_item_set_submenu(
191 GtkWidget *hpfc_compile_menu_item, *hpfc_make_menu_item,
196 hpfc_compile_menu_item = gtk_menu_item_new_with_label(
HPFC_COMPILE);
197 hpfc_make_menu_item = gtk_menu_item_new_with_label(
HPFC_MAKE);
198 hpfc_run_menu_item = gtk_menu_item_new_with_label(
HPFC_RUN);
200 g_signal_connect(G_OBJECT(hpfc_compile_menu_item),
"activate",
202 g_signal_connect(G_OBJECT(hpfc_make_menu_item),
"activate",
204 g_signal_connect(G_OBJECT(hpfc_run_menu_item),
"activate",
207 gtk_menu_shell_append(GTK_MENU_SHELL(
compile_menu), hpfc_compile_menu_item);
208 gtk_menu_shell_append(GTK_MENU_SHELL(
compile_menu), hpfc_make_menu_item);
209 gtk_menu_shell_append(GTK_MENU_SHELL(
compile_menu), hpfc_run_menu_item);
211 gtk_separator_menu_item_new());
215 "View the HPF Compiler Output");
216 gtk_menu_item_set_submenu(
void user_log(const char *format,...)
string db_get_current_module_name(void)
Also used to check whether set...
void gen_array_full_free(gen_array_t a)
gen_array_t gen_array_make(size_t size)
declarations...
void * gen_array_item(const gen_array_t a, size_t i)
GtkWidget * main_window_menu_bar
void notify_hpfc_file_view(GtkWidget *widget, gpointer data)
static GtkWidget * compile_menu_item
static GtkWidget * dynamic_hpf_output_files_menu
static GtkWidget * dynamic_hpf_output_files_menu_item
void disable_compile_selection()
void generate_a_menu_with_HPF_output_files(GtkWidget *widget, gpointer data)
void apply_on_each_compile_item(void(*function_to_apply_on_each_menu_item)(GtkWidget *))
void hpfc_notify(GtkWidget *menu_item, gpointer data)
void create_compile_menu()
static GtkWidget * compile_menu
void initialize_gpips_hpfc_hack_for_fabien_and_from_fabien()
static bool gpips_hpfc_install_was_performed_hack
quick fix around pipsmake, FC, 23/10/95
void enable_compile_selection()
int alloc_first_initialized_window(bool the_same_as_previous)
Find the first free window if any.
void gpips_file_view(char *file_name, const char *title_module_name, char *title_label, char *icon_name, char *icon_title)
Display a file in a gpips window:
void disable_item(GtkWidget *item)
void enable_item(GtkWidget *item)
void prompt_user(string a_printf_format,...)
const char * gpips_gtk_menu_item_get_label(GtkWidget *w)
#define pips_internal_error
#define user_warning(fn,...)
#define same_string_p(s1, s2)
bool safe_apply(const char *phase_n, const char *module_n)
int hpfc_get_file_list(gen_array_t, char **)
string hpfc_generate_path_name_of_file_name(const char *)
Return the path of an HPFC file name relative to the current PIPS directory.