diff --git a/callback.c b/callback.c index 84aa6b8..97e76fb 100644 --- a/callback.c +++ b/callback.c @@ -6,6 +6,13 @@ #include "contain.h" #include "texts.h" +void activate (GtkApplication *self, gpointer user_data) { + GtkWindow *window = GTK_WINDOW (gtk_application_window_new (self)); + window_bar (window, "E coli (with permission from David S. Goodsell, 2009)"); + two_notebooks_in_two_panes (window); + gtk_window_present (GTK_WINDOW (window)); +} + void ui_toggle_run_edit (GtkWidget *btt_run_xor_edit, gpointer data) { printf("window.ui_toggle_run_edit() >>> mode = %d", get_run_edit_mode ()); diff --git a/callback.d b/callback.d deleted file mode 100644 index ad90d78..0000000 --- a/callback.d +++ /dev/null @@ -1,3 +0,0 @@ -callback.o: callback.c hot.h warm.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib.h \ - cold.h display.h contain.h texts.h diff --git a/callback.h b/callback.h index 7fc2582..c77187e 100644 --- a/callback.h +++ b/callback.h @@ -1,3 +1,5 @@ +void activate (GtkApplication *app, gpointer user_data); + void ui_enable_action (const char *name); void ui_disable_action (const char *name); diff --git a/callback.o b/callback.o deleted file mode 100644 index fcac212..0000000 Binary files a/callback.o and /dev/null differ diff --git a/cold.d b/cold.d deleted file mode 100644 index 42ddb86..0000000 --- a/cold.d +++ /dev/null @@ -1 +0,0 @@ -cold.o: cold.c texts.h diff --git a/cold.o b/cold.o deleted file mode 100644 index 4b6fc73..0000000 Binary files a/cold.o and /dev/null differ diff --git a/contain.c b/contain.c index d2aa205..086573b 100644 --- a/contain.c +++ b/contain.c @@ -96,8 +96,8 @@ GtkWidget *get_edit_space_page_new(){ GtkWidget *get_selected_rules_vpaned_new(){ GtkPaned *V_selected_1_vs_2 = GTK_PANED (gtk_paned_new (GTK_ORIENTATION_VERTICAL)); - GtkWidget *règle_sélectionnée_n_1 = gtk_frame_new ("(1)"); - GtkWidget *règle_sélectionnée_n_2 = gtk_frame_new ("(2)"); +// GtkWidget *règle_sélectionnée_n_1 = gtk_frame_new ("(1)"); +// GtkWidget *règle_sélectionnée_n_2 = gtk_frame_new ("(2)"); GtkBox *up_box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2)); gtk_box_append (up_box, GTK_WIDGET (get_image_GLUTAMATE())); @@ -120,8 +120,12 @@ GtkWidget *get_selected_rules_vpaned_new(){ // gtk_paned_set_start_child (V_selected_1_vs_2, GTK_WIDGET (règle_sélectionnée_n_1)); // gtk_paned_set_end_child (V_selected_1_vs_2, GTK_WIDGET (règle_sélectionnée_n_2)); - gtk_box_append ( GTK_BOX (règle_sélectionnée_n_1), GTK_WIDGET (up_box));//, GTK_WIDGET (get_image_GLUTAMATE())); - gtk_box_append ( GTK_BOX (règle_sélectionnée_n_2), GTK_WIDGET (bottom_box));//, GTK_WIDGET (get_image_GLUTAMATE())); + + +// LES DEUX 'Gtk-CRITICAL **: 12:56:16.886: gtk_box_append: assertion 'GTK_IS_BOX (box)' failed' VIENNENT DES DEUX LIGNES SUIVANTES (2024-06-02) +// gtk_box_append ( GTK_BOX (règle_sélectionnée_n_1), GTK_WIDGET (up_box));//, GTK_WIDGET (get_image_GLUTAMATE())); +// gtk_box_append ( GTK_BOX (règle_sélectionnée_n_2), GTK_WIDGET (bottom_box));//, GTK_WIDGET (get_image_GLUTAMATE())); + return GTK_WIDGET (V_selected_1_vs_2); } @@ -303,10 +307,6 @@ GtkButton *get_btt_run_xor_edit() { return run_xor_edit; } -void activate (GtkApplication *self, gpointer user_data) { - GtkWindow *window = GTK_WINDOW (gtk_application_window_new (self)); - window_bar (window, "E coli (with permission from David S. Goodsell, 2009)"); - two_notebooks_in_two_panes (window); - gtk_window_present (GTK_WINDOW (window)); -} +// https://docs.gtk.org/gtk4/getting_started.html (m'aura bien servi, quand même !) + diff --git a/contain.d b/contain.d deleted file mode 100644 index b2577fd..0000000 --- a/contain.d +++ /dev/null @@ -1,3 +0,0 @@ -contain.o: contain.c hot.h warm.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib.h \ - cold.h display.h contain.h texts.h callback.h diff --git a/contain.h b/contain.h index daa8d2f..6156ad2 100644 --- a/contain.h +++ b/contain.h @@ -28,7 +28,7 @@ MyApplication *my_application_new (const char *application_id, GApplicationFlags G_END_DECLS */ +void two_notebooks_in_two_panes (GtkWindow *window); GtkWidget *get_selected_rules_vpaned_new(); -void activate (GtkApplication *app, gpointer user_data); diff --git a/contain.o b/contain.o deleted file mode 100644 index 57555df..0000000 Binary files a/contain.o and /dev/null differ diff --git a/display.d b/display.d deleted file mode 100644 index eab8174..0000000 --- a/display.d +++ /dev/null @@ -1,3 +0,0 @@ -display.o: display.c hot.h warm.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib.h \ - cold.h display.h contain.h texts.h diff --git a/display.o b/display.o deleted file mode 100644 index 4c798aa..0000000 Binary files a/display.o and /dev/null differ diff --git a/hot.c b/hot.c index 387ff3c..fe87b0e 100644 --- a/hot.c +++ b/hot.c @@ -17,7 +17,7 @@ static int run_edit_mode_val = 0; void set_run_edit_mode(int prescribed_mode) {run_edit_mode_val = prescribed_mode;} int get_run_edit_mode () {return run_edit_mode_val;} -static struct TreeNode_t {gchar *text; struct TreeNode_t *child, *next;}; +struct TreeNode_t {gchar *text; struct TreeNode_t *child, *next;}; static void add_child_node (struct TreeNode_t *parent, struct TreeNode_t *child){ if (parent->child) { struct TreeNode_t *cur = parent->child; diff --git a/hot.d b/hot.d deleted file mode 100644 index 0a5b41c..0000000 --- a/hot.d +++ /dev/null @@ -1,3 +0,0 @@ -hot.o: hot.c warm.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib.h \ - cold.h display.h contain.h texts.h diff --git a/hot.o b/hot.o deleted file mode 100644 index e4d6148..0000000 Binary files a/hot.o and /dev/null differ diff --git a/main.c b/main.c index 094f0cc..2f91e81 100644 --- a/main.c +++ b/main.c @@ -8,10 +8,7 @@ /******************************************************************************/ #include "hot.h" -#include "warm.h" -#include "cold.h" -#include "display.h" -#include "contain.h" +#include "callback.h" int main (int argc, char **argv) { @@ -25,3 +22,37 @@ int main (int argc, char **argv) return status; } + + +/* +https://docs.gtk.org/gtk4/class.ApplicationWindow.html + +GtkApplication *app = gtk_application_new ("org.gtk.test", 0); + +GtkBuilder *builder = gtk_builder_new_from_string ( + "" + " " + " " + " _Edit" + " " + " _Copy" + " win.copy" + " " + " " + " _Paste" + " win.paste" + " " + " " + " " + "", + -1); + +GMenuModel *menubar = G_MENU_MODEL (gtk_builder_get_object (builder, "menubar")); +gtk_application_set_menubar (GTK_APPLICATION (app), menubar); +g_object_unref (builder); + +// ... + +GtkWidget *window = gtk_application_window_new (app); + +*/ diff --git a/main.d b/main.d deleted file mode 100644 index 969681a..0000000 --- a/main.d +++ /dev/null @@ -1,89 +0,0 @@ -main.o: main.c hot.h warm.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/galloca.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gtypes.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/lib/glib-2.0/include/glibconfig.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gmacros.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gversionmacros.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/glib-visibility.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/garray.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gasyncqueue.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gthread.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gatomic.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/glib-typeof.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gerror.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gquark.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gutils.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gbacktrace.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gbase64.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gbitlock.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gbookmarkfile.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gdatetime.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gtimezone.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gbytes.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gcharset.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gchecksum.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gconvert.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gdataset.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gdate.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gdir.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/genviron.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gfileutils.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/ggettext.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/ghash.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/glist.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gmem.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gnode.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/ghmac.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gchecksum.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/ghook.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/ghostutils.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/giochannel.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gmain.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gpoll.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gslist.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gstring.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gunicode.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gstrfuncs.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gkeyfile.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gmappedfile.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gmarkup.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gmessages.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gvariant.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gvarianttype.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/goption.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gpathbuf.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gpattern.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gprimes.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gqsort.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gqueue.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/grand.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/grcbox.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/grefcount.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/grefstring.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gmem.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gmacros.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gregex.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gscanner.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gsequence.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gshell.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gslice.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gspawn.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gstringchunk.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gstrvbuilder.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gtestutils.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gthreadpool.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gtimer.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gtrashstack.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gtree.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/guri.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/guuid.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/gversion.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/deprecated/gallocator.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/deprecated/gcache.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/deprecated/gcompletion.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/deprecated/gmain.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/deprecated/grel.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/deprecated/gthread.h \ - /gnu/store/fkmpkdav2zmz1k72989bdgpdrfac7rz1-glib-2.78.0/include/glib-2.0/glib/glib-autocleanups.h \ - cold.h display.h contain.h diff --git a/main.o b/main.o deleted file mode 100644 index 60c997a..0000000 Binary files a/main.o and /dev/null differ diff --git a/myprogram b/myprogram deleted file mode 100755 index 5970210..0000000 Binary files a/myprogram and /dev/null differ diff --git a/texts.d b/texts.d deleted file mode 100644 index 18de62c..0000000 --- a/texts.d +++ /dev/null @@ -1 +0,0 @@ -texts.o: texts.c diff --git a/texts.o b/texts.o deleted file mode 100644 index 8ea2834..0000000 Binary files a/texts.o and /dev/null differ diff --git a/warm.c b/warm.c index ed319da..cc884f8 100644 --- a/warm.c +++ b/warm.c @@ -173,3 +173,4 @@ GtkBox *get_CONTROL_box(){ return CONTROL_box; } */ + diff --git a/warm.d b/warm.d deleted file mode 100644 index ff34cde..0000000 --- a/warm.d +++ /dev/null @@ -1 +0,0 @@ -warm.o: warm.c cold.h display.h contain.h texts.h diff --git a/warm.o b/warm.o deleted file mode 100644 index bffb4fb..0000000 Binary files a/warm.o and /dev/null differ