summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjaromil <jaromil@949728d9-16ea-0310-a75c-cbdf8430a4b8>2006-08-15 15:27:11 (GMT)
committer jaromil <jaromil@949728d9-16ea-0310-a75c-cbdf8430a4b8>2006-08-15 15:27:11 (GMT)
commit3a056dab06e698918cb8bf1ec0a542ae75086731 (patch)
treeb6298df1f19b2634b6bcb704816aa2f41e1d02b6
parent7d16e6d0090690c1464b6433f1d27fd7629ad183 (diff)
fix to GUI configuration mode,
fix in Makefile for optimized compilation, more debugging messages git-svn-id: svn://dyne.org/montevideo/ivysync@65 949728d9-16ea-0310-a75c-cbdf8430a4b8
-rw-r--r--Makefile4
-rw-r--r--cmdline.cpp8
-rw-r--r--gui.cpp13
3 files changed, 19 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 5112672..21b25d7 100644
--- a/Makefile
+++ b/Makefile
@@ -12,9 +12,9 @@ GTKFLAGS = `pkg-config --cflags gtk+-2.0`
GTKLIBS = `pkg-config --libs gtk+-2.0`
# debugging flags:
-#CPPFLAGS = -I. -Ixmlrpc++ -Wall -g -ggdb $(GTKFLAGS)
+CPPFLAGS = -I. -Ixmlrpc++ -Wall -g -ggdb $(GTKFLAGS)
# optimized flags:
-CPPFLAGS = -I. -Ixmlrpc++ -Wall -O2 -fomit-frame-pointer -ffast-math
+#CPPFLAGS = -I. -Ixmlrpc++ -Wall -O2 -fomit-frame-pointer -ffast-math $(GTKFLAGS)
diff --git a/cmdline.cpp b/cmdline.cpp
index 47e8a97..a8c5f10 100644
--- a/cmdline.cpp
+++ b/cmdline.cpp
@@ -292,6 +292,7 @@ int main(int argc, char **argv) {
}
if(graphical) {
+ A("activating graphical user interface for playlist configuration");
// gtk_set_locale();
gtk_init(&argc,&argv);
// add_pixmap_directory(PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps");
@@ -308,6 +309,7 @@ int main(int argc, char **argv) {
////////////////////////////////
/// setup the XMLRPC interface
if(rpcdaemon) {
+ A("activating XMLRPC daemon listener for remote network control");
xmlrpc = new XmlRpcServer();
@@ -328,7 +330,7 @@ int main(int argc, char **argv) {
delete xmlrpc;
rpcdaemon = false;
} else
- N("XMLRPC daemon listening for commands on port %u",
+ A("XMLRPC daemon listening for commands on port %u",
rpcdaemonport);
}
@@ -338,6 +340,8 @@ int main(int argc, char **argv) {
////////////////////////////////
/// Syncstart!
+
+ N("Proceeding to syncstart");
dec = (Decoder*)decoders.begin();
while(dec) {
@@ -355,7 +359,7 @@ int main(int argc, char **argv) {
}
if( ! rpcdaemon ) {
- N("Syncing %i players...",decoders.len());
+ A("Syncing %i players...",decoders.len());
jsleep(0,500);
A("Start!");
diff --git a/gui.cpp b/gui.cpp
index 5180682..6464e60 100644
--- a/gui.cpp
+++ b/gui.cpp
@@ -524,6 +524,7 @@ int Playlist::refresh() {
Gui::Gui() {
+ D("instantiating Gui class");
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_widget_set_name (window, "window");
gtk_widget_set_size_request (window, 400, 300);
@@ -535,12 +536,14 @@ Gui::Gui() {
gtk_widget_show (vbox);
gtk_container_add(GTK_CONTAINER(window), vbox);
+ D("gtk_notebook_new");
notebook = gtk_notebook_new ();
gtk_widget_set_name (notebook, "notebook");
gtk_widget_show (notebook);
gtk_box_pack_start (GTK_BOX (vbox), notebook, TRUE, TRUE, 0);
//gtk_container_add (GTK_CONTAINER (vbox), notebook);
-
+
+ D("syncbutton");
syncbutton = gtk_toggle_button_new_with_mnemonic ("gtk-media-play");
gtk_button_set_use_stock (GTK_BUTTON (syncbutton), TRUE);
gtk_widget_set_name (syncbutton, "sync_button");
@@ -563,26 +566,32 @@ bool Gui::init(Linklist *devices) {
int c;
c = 1;
+
+ D("Gui::init");
+
dec = (Decoder*)devices->begin();
while(dec) {
dec->syncstart = &syncstart;
+ D("new Playlist(%i)",c);
pl = new Playlist(c);
pl->decoder = dec; // store the decoder pointer in the playlist
dec->gui = pl; // store the GUI pointer in the decoder (cross reference)
+ D("refresh the playlist");
pl->refresh(); // refresh with the filenames
playlist.push_back(pl); // store the playlist in the gui array
+ D("add to the container");
gtk_container_add(GTK_CONTAINER(notebook), pl->widget);
char tmp[256];
snprintf(tmp,255,"/dev/video%u",dec->device_num);
gtk_notebook_set_tab_label_text ((GtkNotebook*)notebook,
gtk_notebook_get_nth_page((GtkNotebook*)notebook,
c-1), tmp);
-
+ dec = (Decoder*)dec->next;
c++;
}
return true;