From a40c636ba76d5178fb266ec5cbdfe6e036bce5f6 Mon Sep 17 00:00:00 2001 From: tchernobog Date: Wed, 5 Dec 2007 10:44:09 +0000 Subject: [PATCH] - Migrate Glade files to GtkBuilder XML - Update code to adapt to GtkBuilder git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1324 3ecf2c5c-341e-0410-92b4-d18e462d057c --- Makefile.am | 31 +- NEWS | 9 + configure.ac | 6 +- glade/add-request-dialog.glade | 318 -------- glade/add-resource-dialog.glade | 188 ----- glade/add-thread-dialog.glade | 286 ------- glade/configure-dialog.glade | 706 ------------------ glade/main-window.glade | 525 ------------- src/add_request_dialog.cc | 19 +- src/add_request_dialog.hh | 10 +- src/graphical_preferences_editor.cc | 5 +- src/graphical_preferences_editor.hh | 6 +- src/gui_builder.cc | 24 +- src/gui_builder.hh | 6 +- src/jump_to_dialog.cc | 7 +- src/jump_to_dialog.hh | 4 +- src/resources_widget.cc | 11 +- src/resources_widget.hh | 8 +- src/schedulables_tree_widget.cc | 39 +- src/schedulables_tree_widget.hh | 1 - src/simulation_controller.cc | 3 +- src/simulation_controller.hh | 4 +- src/statistics_container_window.cc | 5 +- src/statistics_container_window.hh | 6 +- .../add-process-dialog.ui | 123 +-- ui/add-request-dialog.ui | 315 ++++++++ ui/add-resource-dialog.ui | 186 +++++ ui/add-thread-dialog.ui | 296 ++++++++ .../configure-cpu-policy-dialog.ui | 41 +- ui/configure-dialog.ui | 645 ++++++++++++++++ .../jump-to-dialog.ui | 35 +- ui/main-window.ui | 471 ++++++++++++ .../statistics-window.ui | 23 +- 33 files changed, 2136 insertions(+), 2226 deletions(-) delete mode 100644 glade/add-request-dialog.glade delete mode 100644 glade/add-resource-dialog.glade delete mode 100644 glade/add-thread-dialog.glade delete mode 100644 glade/configure-dialog.glade delete mode 100644 glade/main-window.glade rename glade/add-process-dialog.glade => ui/add-process-dialog.ui (64%) create mode 100644 ui/add-request-dialog.ui create mode 100644 ui/add-resource-dialog.ui create mode 100644 ui/add-thread-dialog.ui rename glade/configure-cpu-policy-dialog.glade => ui/configure-cpu-policy-dialog.ui (72%) create mode 100644 ui/configure-dialog.ui rename glade/jump-to-dialog.glade => ui/jump-to-dialog.ui (78%) create mode 100644 ui/main-window.ui rename glade/statistics-window.glade => ui/statistics-window.ui (73%) diff --git a/Makefile.am b/Makefile.am index 20a38ae..d670c74 100644 --- a/Makefile.am +++ b/Makefile.am @@ -41,7 +41,7 @@ sharedir = $(pkgdatadir) examplesdir = $(sharedir)/examples policiesdir = $(sharedir)/policies plugindir = $(sharedir)/plugins -gladedir = $(sharedir)/glade +uidir = $(sharedir)/ui applicationsdir = @datadir@/applications iconsdir = @datadir@/pixmaps @@ -153,8 +153,8 @@ text_images = \ convert "$<" "$(top_srcdir)/$@" EXTRA_DIST += $(gif_images:%.gif=%.eps) \ - $(gif_images:%.gif=%.pdf) \ - $(text_images) + $(gif_images:%.gif=%.pdf) \ + $(text_images) apidox : test -d 'doc/API' || mkdir -p -- 'doc/API' @@ -352,7 +352,7 @@ sgpemv2_CPPFLAGS = \ -I@top_srcdir@/src/backend \ -DLOCALEDIR="\"$(localedir)\"" \ -DSHAREDIR="\"$(sharedir)\"" \ - -DGLADEDIR="\"$(gladedir)\"" \ + -DUIDIR="\"$(uidir)\"" \ $(CAIRO_CFLAGS) \ $(GTKMM_CFLAGS) \ $(LIBGLADEMM_CFLAGS) \ @@ -365,7 +365,6 @@ sgpemv2_LDADD = \ src/backend/libbackend.la \ $(CAIRO_LIBS) \ $(GTKMM_LIBS) \ - $(LIBGLADEMM_LIBS) \ $(GTHREAD_LIBS) # Please keep this in sorted order: @@ -414,20 +413,20 @@ noinst_HEADERS += \ src/statistics_container_window.hh \ src/text_simulation.hh -# ---------- glade files ----------- +# ---------- gtkbuilder xml files ----------- -glade_DATA = \ +ui_DATA = \ data/logo.png \ - glade/add-process-dialog.glade \ - glade/add-request-dialog.glade \ - glade/add-resource-dialog.glade \ - glade/add-thread-dialog.glade \ - glade/configure-dialog.glade \ - glade/jump-to-dialog.glade \ - glade/main-window.glade \ - glade/statistics-window.glade + ui/add-process-dialog.ui \ + ui/add-request-dialog.ui \ + ui/add-resource-dialog.ui \ + ui/add-thread-dialog.ui \ + ui/configure-dialog.ui \ + ui/jump-to-dialog.ui \ + ui/main-window.ui \ + ui/statistics-window.ui -EXTRA_DIST += $(glade_DATA) +EXTRA_DIST += $(ui_DATA) # ############################################################ # diff --git a/NEWS b/NEWS index 632410c..70b2288 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,15 @@ See the end of file for copying conditions. Please send SGPEMv2 bug reports to . +Version 1.1 + +* List of features: + +** Drop libglademm dep, upgrade gtkmm dep to 2.12.1 and use +Gtkbuilder instead of Glade::XML + +* Misc bugfixes + Version 1.0 diff --git a/configure.ac b/configure.ac index 41bb2f3..ace655d 100644 --- a/configure.ac +++ b/configure.ac @@ -56,8 +56,7 @@ AM_GNU_GETTEXT_VERSION([0.14.1]) dnl various requisites SIGCPP_VERSION=2.0.10 -GTKMM_VERSION=2.8.0 -LIBGLADEMM_VERSION=2.6.0 +GTKMM_VERSION=2.12.1 CAIRO_VERSION=1.0.0 dnl c++ compiler and flags @@ -121,9 +120,6 @@ PKG_CHECK_MODULES([GLIBMM], PKG_CHECK_MODULES([GTKMM], [gtkmm-2.4 >= $GTKMM_VERSION], :, AC_MSG_ERROR([$GTKMM_PKG_ERRORS])) -PKG_CHECK_MODULES([LIBGLADEMM], - [libglademm-2.4 >= $LIBGLADEMM_VERSION], - :, AC_MSG_ERROR([$LIBGLADEMM_PKG_ERRORS])) dnl check for Doxygen AC_CHECK_PROG([HAVE_DOXYGEN],[doxygen],[yes]) diff --git a/glade/add-request-dialog.glade b/glade/add-request-dialog.glade deleted file mode 100644 index 554915c..0000000 --- a/glade/add-request-dialog.glade +++ /dev/null @@ -1,318 +0,0 @@ - - - - - - - 300 - Add Request - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_MOUSE - True - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - False - True - - - - True - False - 0 - - - - True - GTK_BUTTONBOX_SPREAD - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - True - -6 - - - - - - True - True - True - True - gtk-ok - True - GTK_RELIEF_NORMAL - True - -5 - - - - - 0 - False - True - GTK_PACK_END - - - - - - 4 - True - False - 6 - - - - True - False - 6 - - - - True - Instant - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - True - 1 - 0 - True - GTK_UPDATE_ALWAYS - False - False - 0 0 65536 1 0 0 - - - 0 - True - True - - - - - 0 - False - False - - - - - - True - True - GTK_POLICY_NEVER - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - 140 - True - True - True - False - True - True - False - False - False - - - - - 0 - True - True - - - - - - True - 2 - 2 - False - 6 - 6 - - - - True - Duration - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 1 - 2 - - - - - - - - True - Resource - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - - - - - - - - True - True - 1 - 0 - True - GTK_UPDATE_ALWAYS - False - False - 1 1 65536 1 0 0 - - - 1 - 2 - 1 - 2 - - - - - - - True - False - True - - - 1 - 2 - 0 - 1 - fill - - - - - - 0 - False - False - - - - - - 6 - True - GTK_BUTTONBOX_SPREAD - 0 - - - - True - True - gtk-add - True - GTK_RELIEF_NORMAL - True - - - - - - True - gtk-remove - True - GTK_RELIEF_NORMAL - True - - - - - 0 - False - True - - - - - 0 - True - True - - - - - - - diff --git a/glade/add-resource-dialog.glade b/glade/add-resource-dialog.glade deleted file mode 100644 index f1b78bf..0000000 --- a/glade/add-resource-dialog.glade +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - Add Resource - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_MOUSE - True - False - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - False - True - - - - True - False - 0 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - True - -6 - - - - - - True - True - True - True - gtk-ok - True - GTK_RELIEF_NORMAL - True - -5 - - - - - - 0 - False - True - GTK_PACK_END - - - - - - 6 - True - 2 - 2 - False - 11 - 9 - - - - True - True - 1 - 0 - True - GTK_UPDATE_ALWAYS - False - False - 1 1 65536 1 0 0 - - - 1 - 2 - 1 - 2 - - - - - - - True - Places - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 1 - 2 - - - - - - - - True - True - True - True - 0 - - True - - False - 17 - - - 1 - 2 - 0 - 1 - - - - - - - True - Name - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - - - - - - - 0 - True - True - - - - - - - diff --git a/glade/add-thread-dialog.glade b/glade/add-thread-dialog.glade deleted file mode 100644 index 6b53895..0000000 --- a/glade/add-thread-dialog.glade +++ /dev/null @@ -1,286 +0,0 @@ - - - - - - - Add Thread - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_MOUSE - True - False - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - False - True - - - - True - False - 0 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - True - -6 - - - - - - True - True - True - True - gtk-ok - True - GTK_RELIEF_NORMAL - True - -5 - - - - - - 0 - False - True - GTK_PACK_END - - - - - - 6 - True - 4 - 2 - False - 11 - 9 - - - - True - True - 1 - 0 - True - GTK_UPDATE_ALWAYS - False - False - 0 0 65536 1 0 0 - - - 1 - 2 - 3 - 4 - - - - - - - True - True - 1 - 0 - True - GTK_UPDATE_ALWAYS - False - False - 0 0 65536 1 0 0 - - - 1 - 2 - 2 - 3 - - - - - - - True - True - 1 - 0 - True - GTK_UPDATE_ALWAYS - False - False - 1 1 65536 1 0 0 - - - 1 - 2 - 1 - 2 - - - - - - - True - Cpu Time - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 1 - 2 - - - - - - - - True - Arrival Time - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 2 - 3 - - - - - - - - True - Base Priority - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 3 - 4 - - - - - - - - True - True - True - True - 0 - - True - - False - 17 - - - 1 - 2 - 0 - 1 - - - - - - - True - Name - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - - - - - - - 0 - True - True - - - - - - - diff --git a/glade/configure-dialog.glade b/glade/configure-dialog.glade deleted file mode 100644 index 1621521..0000000 --- a/glade/configure-dialog.glade +++ /dev/null @@ -1,706 +0,0 @@ - - - - - - - 0 - SGPEMv2 Preferences - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER_ON_PARENT - True - 500 - 300 - True - False - gtk-preferences - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - False - True - - - - True - False - 0 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - True - gtk-close - True - GTK_RELIEF_NORMAL - True - -7 - - - - - 0 - False - True - GTK_PACK_END - - - - - - True - True - True - False - GTK_POS_TOP - False - False - - - - 5 - True - False - 5 - - - - True - 0 - 0 - GTK_SHADOW_NONE - - - - 6 - True - 0 - 0 - 1 - 1 - 0 - 0 - 12 - 0 - - - - True - True - GTK_POLICY_ALWAYS - GTK_POLICY_ALWAYS - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - 200 - True - True - True - False - False - True - False - False - False - - - - - - - - - - True - <b>Loaded Plugins</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - True - True - - - - - - True - 0 - 0 - GTK_SHADOW_NONE - - - - 6 - True - 0 - 0 - 1 - 1 - 0 - 0 - 12 - 0 - - - - True - False - 10 - - - - True - True - GTK_POLICY_ALWAYS - GTK_POLICY_ALWAYS - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - 300 - 100 - True - True - True - False - False - True - False - False - False - - - - - 0 - True - True - - - - - - True - GTK_BUTTONBOX_START - 4 - - - - True - True - True - gtk-add - True - GTK_RELIEF_NORMAL - True - - - - - - True - True - True - gtk-remove - True - GTK_RELIEF_NORMAL - True - - - - - 3 - False - False - GTK_PACK_END - - - - - - - - - - True - <b>Additional Plugin Directories</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - True - True - - - - - False - True - - - - - - True - Plugins - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - - - - 5 - True - False - 5 - - - - True - 0 - 0 - GTK_SHADOW_NONE - - - - 6 - True - 0 - 0 - 1 - 1 - 0 - 0 - 12 - 0 - - - - True - True - GTK_POLICY_ALWAYS - GTK_POLICY_ALWAYS - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - 200 - True - True - True - False - False - True - False - False - False - - - - - - - - - - True - <b>Loaded Policies</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - True - True - - - - - - True - 0 - 0 - GTK_SHADOW_NONE - - - - 6 - True - 0 - 0 - 1 - 1 - 0 - 0 - 12 - 0 - - - - True - False - 10 - - - - True - True - GTK_POLICY_ALWAYS - GTK_POLICY_ALWAYS - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - 300 - 100 - True - True - True - False - False - True - False - False - False - - - - - 0 - True - True - - - - - - True - GTK_BUTTONBOX_START - 4 - - - - True - True - True - gtk-add - True - GTK_RELIEF_NORMAL - True - - - - - - True - True - True - gtk-remove - True - GTK_RELIEF_NORMAL - True - - - - - 3 - False - False - GTK_PACK_END - - - - - - - - - - True - <b>Additional Policies Directories</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - True - True - - - - - False - True - - - - - - True - Policies - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - - - - True - False - 0 - - - - 5 - True - 0 - 0 - GTK_SHADOW_NONE - - - - True - 0 - 0 - 1 - 1 - 0 - 0 - 12 - 0 - - - - True - False - 0 - - - - True - Simulation step speed (milliseconds) - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_END - -1 - False - 0 - - - 0 - True - True - - - - - - True - True - 2 - 0 - True - GTK_UPDATE_IF_VALID - False - False - 1200 1 9999 50 500 0 - - - 0 - False - False - - - - - - - - - - True - <b>Simulation speed</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - False - False - - - - - False - True - - - - - - True - Speed - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - - - 0 - True - True - - - - - - - diff --git a/glade/main-window.glade b/glade/main-window.glade deleted file mode 100644 index b31ddd8..0000000 --- a/glade/main-window.glade +++ /dev/null @@ -1,525 +0,0 @@ - - - - - - SGPEMv2 - 800 - 600 - scc-sgpemv2 - - - True - - - True - - - True - _File - True - - - - - True - gtk-new - True - True - - - - - True - gtk-open - True - True - - - - - True - gtk-save - True - True - - - - - True - gtk-save-as - True - True - - - - - True - - - - - True - gtk-quit - True - True - - - - - - - - - True - _Edit - True - - - - - True - gtk-preferences - True - True - - - - - - - - - True - _View - True - - - - - True - Enable/disable threads visualization in Graphs - Show/Hide _Threads - True - - - True - 0,000000 - 0,000000 - gtk-select-font - 1 - - - - - - - True - Show/Hide holt graph window - Show/Hide _Holt Graph - True - - - True - 0,000000 - 0,000000 - gtk-convert - 1 - - - - - - - True - Show/Hide statistics window - Show/Hide _Statistics - True - - - True - 0,000000 - 0,000000 - gtk-justify-left - 1 - - - - - - - - - - - True - _Simulation - True - - - - - True - gtk-media-play - True - True - - - - - - True - False - gtk-media-pause - True - True - - - - - - True - False - gtk-media-stop - True - True - - - - - - - True - - - - - True - True - Continuous mode - True - - - - - - - - - True - _Help - True - - - - - True - gtk-about - True - True - - - - - - - - - False - - - - - True - GTK_TOOLBAR_BOTH - - - True - gtk-open - - - - - True - gtk-save - - - - - True - - - - - True - gtk-media-play - Start the simulation - - - - - True - False - gtk-media-pause - - - - - True - False - gtk-media-stop - - - - - True - - - - - True - Scheduling Policy - True - gtk-convert - - - - - True - - - - - True - Resource Scheduling - True - gtk-select-color - - - - - False - 1 - - - - - True - True - 1 - 200 - - - True - - - True - 0,000000 - 0,000000 - GTK_SHADOW_NONE - - - True - 0,000000 - 0,000000 - 12 - - - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_OUT - - - - - - - - - - True - 0,000000 - 0,000000 - 2 - <i>Schedulables</i> - True - - - label_item - - - - - False - - - - - True - 0,000000 - 0,000000 - GTK_SHADOW_NONE - - - True - 0,000000 - 0,000000 - 12 - - - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_OUT - - - True - True - - - - - - - - - True - 0,000000 - 0,000000 - 2 - <i>Resources</i> - True - - - label_item - - - - - False - - - - - False - False - - - - - True - True - GTK_POLICY_AUTOMATIC - - - - - - - - 3 - - - - - True - - - True - gtk-jump-to - True - - - False - GTK_PACK_END - 2 - - - - - True - True - 0 0 65536 1 10 10 - 1 - - - False - 3 - GTK_PACK_END - 1 - - - - - True - - - False - GTK_PACK_END - 1 - - - - - False - 4 - - - - - True - - - False - GTK_PACK_END - 2 - - - - - - - University of Padova, dept. of Pure and Applied Mathematics - An educational simulator for process scheduling policies in a monoprocessor computer. - SGPEMv2 comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under the terms of the GNU General Public License; for details see file COPYING contained in the source package. - Filippo Paparella <ironpipp@gmail.com> -Paolo Santi <psanti@studenti.math.unipd.it> -Matteo Settenvini <matteo@member.fsf.org> -Marco Trevisan <mtrevisa@studenti.math.unipd.it> -Djina Verbanac <betalgez@yahoo.com> -Luca Vezzaro <lvezzaro@studenti.math.unipd.it> - Giovanni Giacobbi <ggiacobb@studenti.math.unipd.it> -Filippo Paparella <ironpipp@gmail.com> -Paolo Santi <psanti@studenti.math.unipd.it> -Matteo Settenvini <matteo@member.fsf.org> -Marco Trevisan <mtrevisa@studenti.math.unipd.it> -Djina Verbanac <betalgez@yahoo.com> -Luca Vezzaro <lvezzaro@studenti.math.unipd.it> - translator-credits - - - True - 12 - - - - - - True - GTK_BUTTONBOX_END - - - False - GTK_PACK_END - - - - - - diff --git a/src/add_request_dialog.cc b/src/add_request_dialog.cc index efd175c..d61cd85 100644 --- a/src/add_request_dialog.cc +++ b/src/add_request_dialog.cc @@ -38,19 +38,18 @@ using namespace sgpem; using namespace Gtk; using namespace Glib; -using Gnome::Glade::Xml; using std::vector; -AddRequestDialog::AddRequestDialog(BaseObjectType* cobject, const RefPtr& glade) : - Dialog(cobject), _glade(glade) +AddRequestDialog::AddRequestDialog(BaseObjectType* cobject, const RefPtr& ui) : + Dialog(cobject), _ui(ui) { - _glade->get_widget("SubRequests.View", _list); - _glade->get_widget("Add", _add_button); - _glade->get_widget("Remove", _remove_button); - _glade->get_widget("Resource.Combo", _resource_combo); - _glade->get_widget("OK.Button", _ok_button); - _glade->get_widget("Instant.Spin", _instant_spin); - _glade->get_widget("Duration.Spin", _duration_spin); + _ui->get_widget("SubRequests.View", _list); + _ui->get_widget("Add", _add_button); + _ui->get_widget("Remove", _remove_button); + _ui->get_widget("Resource.Combo", _resource_combo); + _ui->get_widget("OK.Button", _ok_button); + _ui->get_widget("Instant.Spin", _instant_spin); + _ui->get_widget("Duration.Spin", _duration_spin); /** ATTACH SIGNAL HANDLERS FOR BUTTONS **/ diff --git a/src/add_request_dialog.hh b/src/add_request_dialog.hh index 1ba0bdf..5c45853 100644 --- a/src/add_request_dialog.hh +++ b/src/add_request_dialog.hh @@ -33,11 +33,11 @@ namespace sgpem #include #include #include -#include +#include namespace sgpem { - /** \brief A dialog derived from add-request-dialog.glade + /** \brief A dialog derived from add-request-dialog.ui * * Manages the list of subrequests, ensures only "nonempty" requests * are created, and supports also editing. @@ -45,9 +45,9 @@ namespace sgpem class AddRequestDialog : public Gtk::Dialog { public: - /** \brief Constructor required by libglademm + /** \brief Constructor required by gtkbuilder */ - AddRequestDialog(BaseObjectType* cobject, const Glib::RefPtr& glade); + AddRequestDialog(BaseObjectType* cobject, const Glib::RefPtr& ui); /** \brief Attemts to show the dialog, and constructs a new request * if response is OK @@ -103,7 +103,7 @@ namespace sgpem */ void _on_combo_selection_changed(); - Glib::RefPtr _glade; + Glib::RefPtr _ui; Gtk::TreeView* _list; Glib::RefPtr _list_model; Gtk::TreeModelColumnRecord _list_columns; diff --git a/src/graphical_preferences_editor.cc b/src/graphical_preferences_editor.cc index 1465acb..689f29b 100644 --- a/src/graphical_preferences_editor.cc +++ b/src/graphical_preferences_editor.cc @@ -37,10 +37,9 @@ #endif using namespace sgpem; -using Gnome::Glade::Xml; -PreferencesEditor::PreferencesEditor(const std::string& gladefile) - : _refXml(Xml::create(gladefile)), +PreferencesEditor::PreferencesEditor(const std::string& uifile) + : _refXml(Gtk::Builder::create_from_file(uifile)), preferences_dialog(NULL), plugins_dirs_treeview(NULL), plugins_treeview(NULL), policies_dirs_treeview(NULL), policies_treeview(NULL), diff --git a/src/graphical_preferences_editor.hh b/src/graphical_preferences_editor.hh index d5b3065..f03917b 100644 --- a/src/graphical_preferences_editor.hh +++ b/src/graphical_preferences_editor.hh @@ -25,7 +25,7 @@ #include -#include +#include #include #include #include @@ -41,7 +41,7 @@ namespace sgpem public: - explicit PreferencesEditor(const std::string& gladefile = GLADEDIR "/configure-dialog.glade"); + explicit PreferencesEditor(const std::string& uifile = UIDIR "/configure-dialog.ui"); void @@ -73,7 +73,7 @@ namespace sgpem void update_plugins(); - Glib::RefPtr _refXml; + Glib::RefPtr _refXml; Gtk::Dialog* preferences_dialog; Gtk::TreeView* plugins_dirs_treeview; diff --git a/src/gui_builder.cc b/src/gui_builder.cc index ce1b62e..cfbe9cb 100644 --- a/src/gui_builder.cc +++ b/src/gui_builder.cc @@ -71,8 +71,6 @@ #include using namespace sgpem; -using Gnome::Glade::Xml; - void GuiBuilder::on_edit_preferences_activate() @@ -83,17 +81,15 @@ GuiBuilder::on_edit_preferences_activate() void GuiBuilder::on_simulation_jump_to_clicked() { - using Gnome::Glade::Xml; - // JumpTo spinbox Gtk::SpinButton* jump_to_spin; _refXml->get_widget("BottomHBox.JumpToSpin", jump_to_spin); int target_instant = jump_to_spin->get_value_as_int(); assert(target_instant >= 0); - Glib::RefPtr jump_to_dialog_glade = Xml::create(GLADEDIR "/jump-to-dialog.glade"); + Glib::RefPtr jump_to_dialog_ui = Gtk::Builder::create_from_file(UIDIR "/jump-to-dialog.ui"); JumpToDialog* jump_to_dialog = NULL; - jump_to_dialog_glade->get_widget_derived("JumpToDialog", jump_to_dialog); + jump_to_dialog_ui->get_widget_derived("JumpToDialog", jump_to_dialog); jump_to_dialog->set_transient_for(get_initial_window()); jump_to_dialog->set_target_instant(target_instant); @@ -226,7 +222,8 @@ GuiBuilder::on_file_open_activate() } if(!msg.empty()) { - Gtk::Statusbar* sbar = _refXml->get_widget("MainStatusBar", sbar); + Gtk::Statusbar* sbar; + _refXml->get_widget("MainStatusBar", sbar); sbar->push(msg); } } @@ -274,7 +271,8 @@ GuiBuilder::on_file_save_activate() if(!msg.empty()) { - Gtk::Statusbar* sbar = _refXml->get_widget("MainStatusBar", sbar); + Gtk::Statusbar* sbar; + _refXml->get_widget("MainStatusBar", sbar); sbar->push(msg); } } @@ -351,7 +349,8 @@ GuiBuilder::on_file_saveas_activate() if(!msg.empty()) { - Gtk::Statusbar* sbar = _refXml->get_widget("MainStatusBar", sbar); + Gtk::Statusbar* sbar; + _refXml->get_widget("MainStatusBar", sbar); sbar->push(msg); } } @@ -529,6 +528,7 @@ GuiBuilder::on_selected_resource_policy(ResourcePolicy* pol) sbar->push(_("Selected resource policy ") + pol->get_name()); } + void GuiBuilder::on_toggle_simulation_mode() { @@ -572,8 +572,8 @@ GuiBuilder::set_filename(const std::string& filename) } -GuiBuilder::GuiBuilder(const std::string& gladefile) - : _refXml(Xml::create(gladefile)), _controller(Simulation::get_instance(), _refXml), +GuiBuilder::GuiBuilder(const std::string& uifile) + : _refXml(Gtk::Builder::create_from_file(uifile)), _controller(Simulation::get_instance(), _refXml), _holt_container(Simulation::get_instance()), _show_threads(true) { @@ -674,7 +674,7 @@ GuiBuilder::GuiBuilder(const std::string& gladefile) _refXml->get_widget("AboutDialog", about_dialog); help_about->signal_activate().connect(sigc::mem_fun(*about_dialog, &Window::show)); about_dialog->set_wrap_license(true); - about_dialog->set_logo(Gdk::Pixbuf::create_from_file(GLADEDIR "/logo.png")); + about_dialog->set_logo(Gdk::Pixbuf::create_from_file(UIDIR "/logo.png")); // Insert the schedulables TreeView custom widget diff --git a/src/gui_builder.hh b/src/gui_builder.hh index 19aa649..e7337fd 100644 --- a/src/gui_builder.hh +++ b/src/gui_builder.hh @@ -33,7 +33,7 @@ #include #include -#include +#include #include @@ -46,7 +46,7 @@ namespace sgpem class GuiBuilder { public: - GuiBuilder(const std::string& gladefile = GLADEDIR "/main-window.glade"); + GuiBuilder(const std::string& uifile = UIDIR "/main-window.ui"); ~GuiBuilder(); Gtk::Window& get_initial_window() const; @@ -76,7 +76,7 @@ namespace sgpem void populate_with_resource_policies(Gtk::Menu& menu); private: - Glib::RefPtr _refXml; + Glib::RefPtr _refXml; SimulationController _controller; // Used to store the loaded snapshot filename, when !empty diff --git a/src/jump_to_dialog.cc b/src/jump_to_dialog.cc index 2974b01..44a7c2d 100644 --- a/src/jump_to_dialog.cc +++ b/src/jump_to_dialog.cc @@ -38,15 +38,14 @@ using namespace sgpem; using namespace Gtk; using namespace Glib; -using Gnome::Glade::Xml; -JumpToDialog::JumpToDialog(BaseObjectType* cobject, const RefPtr& glade) : +JumpToDialog::JumpToDialog(BaseObjectType* cobject, const RefPtr& ui) : Dialog(cobject), _target_instant(0) { Button* stop_button; - glade->get_widget("Button.Stop", stop_button); - glade->get_widget("ProgressBar", _progress); + ui->get_widget("Button.Stop", stop_button); + ui->get_widget("ProgressBar", _progress); // Attach signal handlers stop_button->signal_clicked().connect(sigc::mem_fun(*this, &JumpToDialog::_on_stop)); diff --git a/src/jump_to_dialog.hh b/src/jump_to_dialog.hh index 2bab01c..005e1b3 100644 --- a/src/jump_to_dialog.hh +++ b/src/jump_to_dialog.hh @@ -27,14 +27,14 @@ #include #include -#include +#include namespace sgpem { class JumpToDialog : public Gtk::Dialog, public SimulationObserver { public: - JumpToDialog(BaseObjectType* cobject, const Glib::RefPtr& glade); + JumpToDialog(BaseObjectType* cobject, const Glib::RefPtr& ui); unsigned int set_target_instant(unsigned int new_target = 0); unsigned int get_target_instant() const; diff --git a/src/resources_widget.cc b/src/resources_widget.cc index e2c4638..6922276 100644 --- a/src/resources_widget.cc +++ b/src/resources_widget.cc @@ -44,7 +44,6 @@ using namespace sgpem; using namespace Gtk; using namespace Glib; -using Gnome::Glade::Xml; PropertyProxy_Base ResourcesWidget::CellRendererTextMarkup::_property_renderable() @@ -52,9 +51,9 @@ ResourcesWidget::CellRendererTextMarkup::_property_renderable() return Glib::PropertyProxy_Base(this, "markup"); } -ResourcesWidget::ResourcesWidget(BaseObjectType* cobject, const RefPtr& glade) : +ResourcesWidget::ResourcesWidget(BaseObjectType* cobject, const RefPtr& ui) : TreeView(cobject), - _add_resource_dialog_glade(Xml::create(GLADEDIR "/add-resource-dialog.glade")) + _add_resource_dialog_ui(Builder::create_from_file(UIDIR "/add-resource-dialog.ui")) { _columns.add(_key_column); _columns.add(_main_column); @@ -68,7 +67,7 @@ ResourcesWidget::ResourcesWidget(BaseObjectType* cobject, const RefPtr& gla tvc->set_cell_data_func(_cell_renderer, sigc::mem_fun(*this, &ResourcesWidget::_on_cell_name_data)); /** DIALOGS **/ - _add_resource_dialog_glade->get_widget("AddResourceDialog", _add_resource_dialog); + _add_resource_dialog_ui->get_widget("AddResourceDialog", _add_resource_dialog); set_headers_visible(false); @@ -195,8 +194,8 @@ ResourcesWidget::add_edit_resource(bool adding) Resource* resource = NULL; - _add_resource_dialog_glade->get_widget("Name.Entry", name_entry); - _add_resource_dialog_glade->get_widget("Places.Spin", places_spin); + _add_resource_dialog_ui->get_widget("Name.Entry", name_entry); + _add_resource_dialog_ui->get_widget("Places.Spin", places_spin); if(adding) { diff --git a/src/resources_widget.hh b/src/resources_widget.hh index 0ff1c74..f16edaf 100644 --- a/src/resources_widget.hh +++ b/src/resources_widget.hh @@ -34,7 +34,7 @@ namespace sgpem #include #include #include -#include +#include #include @@ -53,9 +53,9 @@ namespace sgpem class ResourcesWidget : public Gtk::TreeView, public HistoryObserver { public: - /** \brief Constructor required by libglademm + /** \brief Constructor required by gtkbuilder */ - ResourcesWidget(BaseObjectType* cobject, const Glib::RefPtr& glade); + ResourcesWidget(BaseObjectType* cobject, const Glib::RefPtr& ui); /// \brief Standard virtual destructor. /// @@ -133,7 +133,7 @@ namespace sgpem Gtk::TreeModelColumn _handles_column; Glib::RefPtr _UIManager; - Glib::RefPtr _add_resource_dialog_glade; + Glib::RefPtr _add_resource_dialog_ui; Gtk::Dialog* _add_resource_dialog; CellRendererTextMarkup _cell_renderer; diff --git a/src/schedulables_tree_widget.cc b/src/schedulables_tree_widget.cc index 2de16db..5caad1e 100644 --- a/src/schedulables_tree_widget.cc +++ b/src/schedulables_tree_widget.cc @@ -40,12 +40,11 @@ #include #include #include - +#include using namespace sgpem; using namespace Gtk; using namespace Glib; -using Gnome::Glade::Xml; PropertyProxy_Base SchedulablesTreeWidget::CellRendererTextMarkup::_property_renderable() @@ -355,20 +354,20 @@ SchedulablesTreeWidget::add_edit_process(bool adding) /** This is ugly, I know, we should be using derived widgets, but I also believe we * have little time, and I'm not going to waste too much of it on the frontend */ - RefPtr glade(Xml::create(GLADEDIR "/add-process-dialog.glade")); + RefPtr ui(Builder::create_from_file(UIDIR "/add-process-dialog.ui")); Dialog* add_process_dialog; - glade->get_widget("AddProcessDialog", add_process_dialog); + ui->get_widget("AddProcessDialog", add_process_dialog); Entry* name_entry; SpinButton* arrival_time_spin; SpinButton* duration_spin; SpinButton* base_priority_spin; - glade->get_widget("Name.Entry", name_entry); - glade->get_widget("ArrivalTime.Spin", arrival_time_spin); - glade->get_widget("Duration.Spin", duration_spin); - glade->get_widget("BasePriority.Spin", base_priority_spin); + ui->get_widget("Name.Entry", name_entry); + ui->get_widget("ArrivalTime.Spin", arrival_time_spin); + ui->get_widget("Duration.Spin", duration_spin); + ui->get_widget("BasePriority.Spin", base_priority_spin); Process* selection = NULL; @@ -430,20 +429,20 @@ SchedulablesTreeWidget::add_edit_thread(bool adding) /** This is ugly, I know, we should be using derived widgets, but I also believe we * have little time, and I'm not going to waste too much of it on the frontend */ - RefPtr glade(Xml::create(GLADEDIR "/add-thread-dialog.glade")); + RefPtr ui(Builder::create_from_file(UIDIR "/add-thread-dialog.ui")); Dialog* add_thread_dialog; - glade->get_widget("AddThreadDialog", add_thread_dialog); + ui->get_widget("AddThreadDialog", add_thread_dialog); Entry* name_entry; SpinButton* cpu_time_spin; SpinButton* arrival_time_spin; SpinButton* base_priority_spin; - glade->get_widget("Name.Entry", name_entry); - glade->get_widget("CpuTime.Spin", cpu_time_spin); - glade->get_widget("ArrivalTime.Spin", arrival_time_spin); - glade->get_widget("BasePriority.Spin", base_priority_spin); + ui->get_widget("Name.Entry", name_entry); + ui->get_widget("CpuTime.Spin", cpu_time_spin); + ui->get_widget("ArrivalTime.Spin", arrival_time_spin); + ui->get_widget("BasePriority.Spin", base_priority_spin); Thread* t = NULL; @@ -490,12 +489,12 @@ SchedulablesTreeWidget::add_edit_thread(bool adding) void SchedulablesTreeWidget::_on_add_request() { - RefPtr glade(Xml::create(GLADEDIR "/add-request-dialog.glade")); + RefPtr ui(Builder::create_from_file(UIDIR "/add-request-dialog.ui")); AddRequestDialog* add_request_dialog; // NOTE This is *not* reflective programming! AddRequestDialog is the name of - // the base widget in the glade file. - glade->get_widget_derived("AddRequestDialog", add_request_dialog); + // the base widget in the xml ui file. + ui->get_widget_derived("AddRequestDialog", add_request_dialog); Thread* t = get_selected(); assert(t != NULL); @@ -508,12 +507,12 @@ SchedulablesTreeWidget::_on_edit_request() { using std::vector; - RefPtr glade(Xml::create(GLADEDIR "/add-request-dialog.glade")); + RefPtr ui(Builder::create_from_file(UIDIR "/add-request-dialog.ui")); AddRequestDialog* add_request_dialog; // NOTE This is *not* reflective programming! AddRequestDialog is the name of - // the base widget in the glade file. - glade->get_widget_derived("AddRequestDialog", add_request_dialog); + // the base widget in the xml ui file. + ui->get_widget_derived("AddRequestDialog", add_request_dialog); Request* r = get_selected(); assert(r != NULL); diff --git a/src/schedulables_tree_widget.hh b/src/schedulables_tree_widget.hh index cda1ff8..bad15bb 100644 --- a/src/schedulables_tree_widget.hh +++ b/src/schedulables_tree_widget.hh @@ -38,7 +38,6 @@ namespace sgpem #include #include #include -#include #include #include diff --git a/src/simulation_controller.cc b/src/simulation_controller.cc index fa0025f..ce9e490 100644 --- a/src/simulation_controller.cc +++ b/src/simulation_controller.cc @@ -44,10 +44,9 @@ #endif using namespace sgpem; -using Gnome::Glade::Xml; -SimulationController::SimulationController(Simulation& simulation, Glib::RefPtr refXml) +SimulationController::SimulationController(Simulation& simulation, Glib::RefPtr refXml) : _sim(simulation), _break_requested(false) { using namespace Gtk; diff --git a/src/simulation_controller.hh b/src/simulation_controller.hh index 98fad51..411c5fe 100644 --- a/src/simulation_controller.hh +++ b/src/simulation_controller.hh @@ -27,7 +27,7 @@ #include #include -#include +#include namespace sgpem { @@ -41,7 +41,7 @@ namespace sgpem class SimulationController : public SimulationObserver { public: - SimulationController(Simulation& simulation, Glib::RefPtr main_window); + SimulationController(Simulation& simulation, Glib::RefPtr main_window); virtual ~SimulationController(); /** \brief Update sensitivities of toolbar buttons and menu items diff --git a/src/statistics_container_window.cc b/src/statistics_container_window.cc index c72aede..faa49d3 100644 --- a/src/statistics_container_window.cc +++ b/src/statistics_container_window.cc @@ -25,12 +25,11 @@ using namespace Gtk; -using Gnome::Glade::Xml; using namespace sgpem; using namespace std; -StatisticsContainerWindow::StatisticsContainerWindow(const std::string& gladefile) - : _refXml(Xml::create(gladefile)) +StatisticsContainerWindow::StatisticsContainerWindow(const std::string& uifile) + : _refXml(Builder::create_from_file(uifile)) { _refXml->get_widget("StatisticsWindow", _main_win); // This just sets the title of our new window. diff --git a/src/statistics_container_window.hh b/src/statistics_container_window.hh index 8a8f7d8..f671155 100644 --- a/src/statistics_container_window.hh +++ b/src/statistics_container_window.hh @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include @@ -45,7 +45,7 @@ namespace sgpem class StatisticsContainerWindow { public: - explicit StatisticsContainerWindow(const std::string& gladefile = GLADEDIR "/statistics-window.glade"); + explicit StatisticsContainerWindow(const std::string& uifile = UIDIR "/statistics-window.ui"); virtual ~StatisticsContainerWindow(); void make_child(Gtk::Window&); @@ -54,7 +54,7 @@ namespace sgpem Gtk::Window* get_main_window(); protected: - Glib::RefPtr _refXml; + Glib::RefPtr _refXml; Gtk::Window* _main_win; TabularSchedulableStatisticsWidget* _tab_sched; TabularSimulationStatisticsWidget* _tab_sim; diff --git a/glade/add-process-dialog.glade b/ui/add-process-dialog.ui similarity index 64% rename from glade/add-process-dialog.glade rename to ui/add-process-dialog.ui index 5248bdd..679e069 100644 --- a/glade/add-process-dialog.glade +++ b/ui/add-process-dialog.ui @@ -1,23 +1,46 @@ - - + - - + + + 65536 + 1 + 10 + 1 + 10 + 1 + + + 65536 + 0 + 0 + 0 + 0 + 1 + + + 65536 + 0 + 0 + 0 + 0 + 1 + + Add Process False True GTK_WIN_POS_MOUSE GDK_WINDOW_TYPE_HINT_DIALOG - + True - + True 6 4 @@ -25,156 +48,158 @@ 9 11 - + True True - 1 1 65536 1 10 10 - + adjustment1 + 1 2 2 3 - + - + True Duration - + 2 3 - + - + True True - 0 0 65536 1 0 0 + adjustment2 1 True - + 1 2 3 4 - + - + True True - 0 0 65536 1 0 0 + adjustment3 1 True - + 1 2 1 2 - + - + True True - + 17 - + 1 2 - + - + True 0 0 Arrival Time - + 1 2 - - + + - + True 0 0 Base Priority - + 3 4 - - + + - + True 0 0 Name - + - - + + - + 2 - + True GTK_BUTTONBOX_END - + True True True gtk-cancel True - -6 - + - + True True True True gtk-ok True - -5 - + 1 - + False GTK_PACK_END - + - - + + Cancel.Button + OK.Button + + + diff --git a/ui/add-request-dialog.ui b/ui/add-request-dialog.ui new file mode 100644 index 0000000..796cfb4 --- /dev/null +++ b/ui/add-request-dialog.ui @@ -0,0 +1,315 @@ + + + + + 65536 + 0 + 0 + 0 + 0 + 1 + + + 65536 + 1 + 0 + 1 + 0 + 1 + + + 300 + Add Request + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_MOUSE + True + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + False + True + + + True + False + 0 + + + True + GTK_BUTTONBOX_SPREAD + + + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + + + + + True + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + True + + + + + 0 + False + True + GTK_PACK_END + + + + + 4 + True + False + 6 + + + True + False + 6 + + + True + Instant + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + + + + True + True + 1 + 0 + True + GTK_UPDATE_ALWAYS + False + False + adjustment1 + + + 0 + True + True + + + + + 0 + False + False + + + + + True + True + GTK_POLICY_NEVER + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + 140 + True + True + True + False + True + True + False + False + False + + + + + 0 + True + True + + + + + True + 2 + 2 + False + 6 + 6 + + + True + Duration + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + + + + + + + True + Resource + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + + + + + + + True + True + 1 + 0 + True + GTK_UPDATE_ALWAYS + False + False + adjustment2 + + + 1 + 2 + 1 + 2 + + + + + + True + False + True + + + 1 + 2 + 0 + 1 + fill + + + + + + 0 + False + False + + + + + 6 + True + GTK_BUTTONBOX_SPREAD + 0 + + + True + True + gtk-add + True + GTK_RELIEF_NORMAL + True + + + + + True + gtk-remove + True + GTK_RELIEF_NORMAL + True + + + + + 0 + False + True + + + + + 0 + True + True + + + + + + Cancel.Button + OK.Button + + + diff --git a/ui/add-resource-dialog.ui b/ui/add-resource-dialog.ui new file mode 100644 index 0000000..7b6dfcb --- /dev/null +++ b/ui/add-resource-dialog.ui @@ -0,0 +1,186 @@ + + + + + 65536 + 1 + 0 + 1 + 0 + 1 + + + Add Resource + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_MOUSE + True + False + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + False + True + + + True + False + 0 + + + True + GTK_BUTTONBOX_END + + + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + + + + + True + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + True + + + + + + 0 + False + True + GTK_PACK_END + + + + + 6 + True + 2 + 2 + False + 11 + 9 + + + True + True + 1 + 0 + True + GTK_UPDATE_ALWAYS + False + False + adjustment1 + + + 1 + 2 + 1 + 2 + + + + + + True + Places + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + + + + + + + True + True + True + True + 0 + + True + + False + 17 + + + 1 + 2 + 0 + 1 + + + + + + True + Name + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + + + + + + + 0 + True + True + + + + + + Cancel.Button + OK.Button + + + diff --git a/ui/add-thread-dialog.ui b/ui/add-thread-dialog.ui new file mode 100644 index 0000000..a31ba77 --- /dev/null +++ b/ui/add-thread-dialog.ui @@ -0,0 +1,296 @@ + + + + + 65536 + 0 + 0 + 0 + 0 + 1 + + + 65536 + 0 + 0 + 0 + 0 + 1 + + + 65536 + 1 + 0 + 1 + 0 + 1 + + + Add Thread + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_MOUSE + True + False + False + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + False + True + + + True + False + 0 + + + True + GTK_BUTTONBOX_END + + + True + True + True + gtk-cancel + True + GTK_RELIEF_NORMAL + True + + + + + True + True + True + True + gtk-ok + True + GTK_RELIEF_NORMAL + True + + + + + + 0 + False + True + GTK_PACK_END + + + + + 6 + True + 4 + 2 + False + 11 + 9 + + + True + True + 1 + 0 + True + GTK_UPDATE_ALWAYS + False + False + adjustment1 + + + 1 + 2 + 3 + 4 + + + + + + True + True + 1 + 0 + True + GTK_UPDATE_ALWAYS + False + False + adjustment2 + + + 1 + 2 + 2 + 3 + + + + + + True + True + 1 + 0 + True + GTK_UPDATE_ALWAYS + False + False + adjustment3 + + + 1 + 2 + 1 + 2 + + + + + + True + Cpu Time + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 1 + 2 + + + + + + + True + Arrival Time + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 2 + 3 + + + + + + + True + Base Priority + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 3 + 4 + + + + + + + True + True + True + True + 0 + + True + + False + 17 + + + 1 + 2 + 0 + 1 + + + + + + True + Name + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + 1 + 0 + 1 + + + + + + + 0 + True + True + + + + + + Cancel.Button + OK.Button + + + diff --git a/glade/configure-cpu-policy-dialog.glade b/ui/configure-cpu-policy-dialog.ui similarity index 72% rename from glade/configure-cpu-policy-dialog.glade rename to ui/configure-cpu-policy-dialog.ui index 245459f..31d30b4 100644 --- a/glade/configure-cpu-policy-dialog.glade +++ b/ui/configure-cpu-policy-dialog.ui @@ -1,72 +1,73 @@ - - + - - + + 0 Configure the CPU Policy True GTK_WIN_POS_MOUSE GDK_WINDOW_TYPE_HINT_DIALOG - + True - + True True GTK_SHADOW_IN - + True True - + - + 2 - + True GTK_BUTTONBOX_SPREAD - + True True True gtk-cancel True - -6 - + - + True True True True gtk-ok True - -5 - + 1 - + False GTK_PACK_END - + - - + + Cancel.Button + OK.Button + + + diff --git a/ui/configure-dialog.ui b/ui/configure-dialog.ui new file mode 100644 index 0000000..5bd8e46 --- /dev/null +++ b/ui/configure-dialog.ui @@ -0,0 +1,645 @@ + + + + + 9999 + 1 + 500 + 1200 + 0 + 50 + + + 0 + SGPEMv2 Preferences + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_CENTER_ON_PARENT + True + 500 + 300 + True + False + gtk-preferences + True + False + False + GDK_WINDOW_TYPE_HINT_DIALOG + GDK_GRAVITY_NORTH_WEST + True + False + True + + + True + False + 0 + + + True + GTK_BUTTONBOX_END + + + True + True + True + True + gtk-close + True + GTK_RELIEF_NORMAL + True + + + + + 0 + False + True + GTK_PACK_END + + + + + True + True + True + False + GTK_POS_TOP + False + False + + + 5 + True + False + 5 + + + True + 0 + 0 + GTK_SHADOW_NONE + + + 6 + True + 0 + 0 + 1 + 1 + 0 + 0 + 12 + 0 + + + True + True + GTK_POLICY_ALWAYS + GTK_POLICY_ALWAYS + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + 200 + True + True + True + False + False + True + False + False + False + + + + + + + + + True + <b>Loaded Plugins</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + + + 0 + True + True + + + + + True + 0 + 0 + GTK_SHADOW_NONE + + + 6 + True + 0 + 0 + 1 + 1 + 0 + 0 + 12 + 0 + + + True + False + 10 + + + True + True + GTK_POLICY_ALWAYS + GTK_POLICY_ALWAYS + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + 300 + 100 + True + True + True + False + False + True + False + False + False + + + + + 0 + True + True + + + + + True + GTK_BUTTONBOX_START + 4 + + + True + True + True + gtk-add + True + GTK_RELIEF_NORMAL + True + + + + + True + True + True + gtk-remove + True + GTK_RELIEF_NORMAL + True + + + + + 3 + False + False + GTK_PACK_END + + + + + + + + + True + <b>Additional Plugin Directories</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + + + 0 + True + True + + + + + False + True + + + + + True + Plugins + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + + + 5 + True + False + 5 + + + True + 0 + 0 + GTK_SHADOW_NONE + + + 6 + True + 0 + 0 + 1 + 1 + 0 + 0 + 12 + 0 + + + True + True + GTK_POLICY_ALWAYS + GTK_POLICY_ALWAYS + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + 200 + True + True + True + False + False + True + False + False + False + + + + + + + + + True + <b>Loaded Policies</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + + + 0 + True + True + + + + + True + 0 + 0 + GTK_SHADOW_NONE + + + 6 + True + 0 + 0 + 1 + 1 + 0 + 0 + 12 + 0 + + + True + False + 10 + + + True + True + GTK_POLICY_ALWAYS + GTK_POLICY_ALWAYS + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + 300 + 100 + True + True + True + False + False + True + False + False + False + + + + + 0 + True + True + + + + + True + GTK_BUTTONBOX_START + 4 + + + True + True + True + gtk-add + True + GTK_RELIEF_NORMAL + True + + + + + True + True + True + gtk-remove + True + GTK_RELIEF_NORMAL + True + + + + + 3 + False + False + GTK_PACK_END + + + + + + + + + True + <b>Additional Policies Directories</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + + + 0 + True + True + + + + + False + True + + + + + True + Policies + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + + + True + False + 0 + + + 5 + True + 0 + 0 + GTK_SHADOW_NONE + + + True + 0 + 0 + 1 + 1 + 0 + 0 + 12 + 0 + + + True + False + 0 + + + True + Simulation step speed (milliseconds) + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_END + -1 + False + 0 + + + 0 + True + True + + + + + True + True + 2 + 0 + True + GTK_UPDATE_IF_VALID + False + False + adjustment1 + + + 0 + False + False + + + + + + + + + True + <b>Simulation speed</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 0 + 0 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + + + 0 + False + False + + + + + False + True + + + + + True + Speed + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + + + 0 + True + True + + + + + + Close + + + diff --git a/glade/jump-to-dialog.glade b/ui/jump-to-dialog.ui similarity index 78% rename from glade/jump-to-dialog.glade rename to ui/jump-to-dialog.ui index 007e37f..5cac6cb 100644 --- a/glade/jump-to-dialog.glade +++ b/ui/jump-to-dialog.ui @@ -1,56 +1,55 @@ - - + - - + + Jump To... True GTK_WIN_POS_MOUSE GDK_WINDOW_TYPE_HINT_DIALOG - + True - + True 4 6 - + True <b>Please wait...</b> while we advance the simulation to fulfill your request: True GTK_JUSTIFY_CENTER True - + - + True 0 - + 1 - + False 2 - + True GTK_BUTTONBOX_END - + True True True @@ -60,15 +59,15 @@ while we advance the simulation to fulfill your request: True gtk-media-stop True - + - + False GTK_PACK_END - + - - + + diff --git a/ui/main-window.ui b/ui/main-window.ui new file mode 100644 index 0000000..6cd8e29 --- /dev/null +++ b/ui/main-window.ui @@ -0,0 +1,471 @@ + + + + + 65536 + 0 + 10 + 0 + 10 + 1 + + + + + + + MenuItem.File + _File + + + + + gtk-new + MenuItem.File.New + + + + + gtk-open + MenuItem.File.Open + + + + + gtk-save + MenuItem.File.Save + + + + + gtk-save-as + MenuItem.File.SaveAs + + + + + gtk-quit + MenuItem.File.Quit + + + + + MenuItem.Edit + _Edit + + + + + gtk-preferences + MenuItem.Edit.Preferences + + + + + MenuItem.View + _View + + + + + gtk-select-font + MenuItem.View.ShowThreads + + + + + gtk-convert + MenuItem.View.ShowHoltGraph + + + + + gtk-justify-left + MenuItem.View.ShowStatistics + + + + + MenuItem.Simulation + _Simulation + + + + + gtk-media-play + MenuItem.Simulation.Play + + + + + + gtk-media-pause + MenuItem.Simulation.Pause + + + + + + gtk-media-stop + MenuItem.Simulation.Stop + + + + + + + True + MenuItem.Simulation.ContinuousMode + Continuous mode + + + + + MenuItem.Help + _Help + + + + + gtk-about + MenuItem.Help.About + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SGPEMv2 + 800 + 600 + scc-sgpemv2 + + + True + + + True + + + False + + + + + True + GTK_TOOLBAR_BOTH + + + True + gtk-open + + + + + True + gtk-save + + + + + True + + + + + True + gtk-media-play + Start the simulation + + + + + True + False + gtk-media-pause + + + + + True + False + gtk-media-stop + + + + + True + + + + + True + Scheduling Policy + True + gtk-convert + + + + + True + + + + + True + Resource Scheduling + True + gtk-select-color + + + + + False + 1 + + + + + True + True + 1 + 200 + + + True + + + True + 0,000000 + 0,000000 + GTK_SHADOW_NONE + + + True + 0,000000 + 0,000000 + 12 + + + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_OUT + + + + + + + + + + True + 0,000000 + 0,000000 + 2 + <i>Schedulables</i> + True + + + + + False + + + + + True + 0,000000 + 0,000000 + GTK_SHADOW_NONE + + + True + 0,000000 + 0,000000 + 12 + + + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_OUT + + + True + True + + + + + + + + + True + 0,000000 + 0,000000 + 2 + <i>Resources</i> + True + + + + + False + + + + + False + False + + + + + True + True + GTK_POLICY_AUTOMATIC + + + + + + + + 3 + + + + + True + + + True + gtk-jump-to + True + + + False + GTK_PACK_END + 2 + + + + + True + True + adjustment1 + 1 + + + False + 3 + GTK_PACK_END + 1 + + + + + True + + + False + GTK_PACK_END + 1 + + + + + False + 4 + + + + + True + + + False + GTK_PACK_END + 2 + + + + + + + University of Padova, dept. of Pure and Applied Mathematics + An educational simulator for process scheduling policies in a monoprocessor computer. + SGPEMv2 comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under the terms of the GNU General Public License; for details see file COPYING contained in the source package. + Filippo Paparella <ironpipp@gmail.com> +Paolo Santi <psanti@studenti.math.unipd.it> +Matteo Settenvini <matteo@member.fsf.org> +Marco Trevisan <mtrevisa@studenti.math.unipd.it> +Djina Verbanac <betalgez@yahoo.com> +Luca Vezzaro <lvezzaro@studenti.math.unipd.it> + Giovanni Giacobbi <ggiacobb@studenti.math.unipd.it> +Filippo Paparella <ironpipp@gmail.com> +Paolo Santi <psanti@studenti.math.unipd.it> +Matteo Settenvini <matteo@member.fsf.org> +Marco Trevisan <mtrevisa@studenti.math.unipd.it> +Djina Verbanac <betalgez@yahoo.com> +Luca Vezzaro <lvezzaro@studenti.math.unipd.it> + translator-credits + + + True + 12 + + + + + + True + GTK_BUTTONBOX_END + + + False + GTK_PACK_END + + + + + + diff --git a/glade/statistics-window.glade b/ui/statistics-window.ui similarity index 73% rename from glade/statistics-window.glade rename to ui/statistics-window.ui index 7e43237..0de2f25 100644 --- a/glade/statistics-window.glade +++ b/ui/statistics-window.ui @@ -1,13 +1,12 @@ - - + - - + + 400 250 Statistics @@ -15,34 +14,34 @@ GDK_WINDOW_TYPE_HINT_UTILITY GDK_GRAVITY_SOUTH_EAST - + True True - + True True - + False - + True True - + False - + - - + +