From 8b1914aca772752060bf034a5e20ba839cebab73 Mon Sep 17 00:00:00 2001 From: Harbour Date: Sat, 26 Apr 2008 15:06:27 +0300 Subject: [PATCH] The broken commits end --- docs/ru/TODO | 2 +- faraon/scroll.H | 1 + faraon/x11_ui.C | 30 ++++++++---------------------- faraon/x11_ui.H | 2 +- faraon/x11_ui.fl | 11 +++++++---- 5 files changed, 18 insertions(+), 28 deletions(-) diff --git a/docs/ru/TODO b/docs/ru/TODO index 7c700de..7291f21 100644 --- a/docs/ru/TODO +++ b/docs/ru/TODO @@ -41,7 +41,7 @@ ÏÂÝÅÅ : -- ÄÏ×ÅÓÔÉ ÍÏÄÕÌÉ file/notes ÄÏ ÀÚÁÂÅÌØÎÏÇÏ ÓÏÓÔÏÑÎÉÑ +- ÍÏÄÕÌÉ events/contacts/tasks - ÒÁÚÂÉÔØ *.C/*.H ÎÁ ÆÁÊÌÙ ÐÏ ÍÏÄÕÌÑÍ/ËÌÁÓÓÁÍ - ÐÅÒÅÓÍÏÔÒÅÔØ ÉÓÐÏÌØÚÏ×ÁÎÉÅ ÇÌÏÂÁÌØÎÙÈ ÐÅÒÅÍÅÎÎÙÈ - ÕÐÒÏÓÔÉÔØ/ÐÏÄÕÍÁÔØ ÎÁÄ ÐÒÏÔÏËÏÌÏÍ (XMLRPC/BEEP ?/ÐÏÎÑÔÎÁÑ ÔÅËÓÔÏ×ÁÑ ÏÔÌÁÄËÁ diff --git a/faraon/scroll.H b/faraon/scroll.H index 748a25d..16cb4a2 100644 --- a/faraon/scroll.H +++ b/faraon/scroll.H @@ -23,6 +23,7 @@ class Fl_Scroll_Resize : public Fl_Scroll { } // Tell scroll children changed in size init_sizes(); +// init_scrollbars(); Fl_Scroll::resize(X,Y,W,H); } }; diff --git a/faraon/x11_ui.C b/faraon/x11_ui.C index 8deca5f..1191e9d 100644 --- a/faraon/x11_ui.C +++ b/faraon/x11_ui.C @@ -747,30 +747,14 @@ static void cb_files_module_tree_br(Fl_Browser*, void*) { return; sfinx_files_vector_t *tree = (sfinx_files_vector_t *) files_module_tree_br->user_data(); int n = files_module_tree_br->value(); -//debug("selected %s file", tree->files[n - 1]->url.c_str()); if (tree->files[n - 1]->is_directory) { // ÀÚÅÒ ÓÍÅÎÉÌ ÄÉÒÅËÔÏÒÉÀ - // × file_id ÈÒÁÎÉÔÓÑ id ÔÅËÕÝÅÊ ÄÉÒÅËÔÏÒÉÉ-ÓÌÁÊÓÁ × ËÏÔÏÒÏÊ ÎÁÈÏÄÉÍÓÑ/×ÙÂÒÁÌÉ - // × mtag_id - parent_id ÄÉÒÅËÔÏÒÉÉ - // ÚÁÈÏÄÉÍ × ÄÉÒÅËÔÏÒÉÀ - ÔÅËÕÝÁÑ ÓÔÁÎÏ×ÉÔÓÑ parent'ÏÍ current_file.id = tree->files[n - 1]->id; current_file.mtag.id = tree->files[n - 1]->mtag.id; - // × name ÈÒÁÎÉÔÓÑ ×ÅÓØ ÐÕÔØ ÏÔ root location - // × orig_name ÔÏÌØËÏ ÉÍÑ ÔÅËÕÝÅÊ - string t = current_file.name.c_str(); -// current_file.orig_name = tree->files[n - 1]->name; - t += ('/' + tree->files[n - 1]->name); - current_file.name = t; - //debug("requesting dir %s", current_file.c_str()); + current_file.name += ('/' + tree->files[n - 1]->name); app->sfinx.send(current_file); } else { if (!(tree->files[n - 1]->id)) // classify file classify_file_b->do_callback(); - else { - // app->sfinx.send(SFINX_SLICES_MODULE_TREE_REQUEST, (u8_t)0); // prepare for slice_name() calls - sfinx_file_t *file = tree->files[n - 1]; - file->tid(SFINX_FILES_MODULE_EDIT_REQUEST); - app->sfinx.send(file); - } }; } @@ -831,9 +815,10 @@ if (select_files_tree_b->user_data()) { current_file.tid(0); files_module_status_to->value("Sorted Files Tree"); current_file.id = 1; // root id - fill_objects_tree(files_tree, 1 << SFINX_FILE_OBJECT, 0, 0); // fluid bugs if any default params exists ! files_module_tree_br->hide(); + files_tree_scroll->resize(files_tree_scroll->x(), files_tree_scroll->y(), files_module_tree_br->w(), files_module_tree_br->h()); files_module_w->resizable(files_tree_scroll); + fill_objects_tree(files_tree, 1 << SFINX_FILE_OBJECT, 0, 0); // fluid bugs if any default params exists ! files_tree_scroll->show(); }; } @@ -867,7 +852,7 @@ static void cb_Unselect(Fl_Button*, void*) { files_module_tree_br->deselect(); } -Fl_Scroll_Resize *files_tree_scroll=(Fl_Scroll_Resize *)0; +Fl_Scroll *files_tree_scroll=(Fl_Scroll *)0; Fl_Double_Window *classify_file_w=(Fl_Double_Window *)0; @@ -3136,7 +3121,7 @@ void x11_ui::init() { o->labeltype(FL_ENGRAVED_LABEL); o->callback((Fl_Callback*)cb_Unselect); } // Fl_Button* o - { files_tree_scroll = new Fl_Scroll_Resize(7, 45, 716, 255); + { files_tree_scroll = new Fl_Scroll(7, 45, 716, 255); files_tree_scroll->type(7); files_tree_scroll->box(FL_ENGRAVED_FRAME); files_tree_scroll->color((Fl_Color)28); @@ -3153,9 +3138,8 @@ void x11_ui::init() { files_module_w->resizable(files_tree_scroll); files_tree_scroll->resizable(files_tree); files_tree_scroll->end(); - } // Fl_Scroll_Resize* files_tree_scroll + } // Fl_Scroll* files_tree_scroll files_module_w->end(); - files_module_w->resizable(files_module_w); } // Fl_Double_Window* files_module_w { classify_file_w = new Fl_Double_Window(1020, 515, gettext("Classify File")); classify_file_w->color((Fl_Color)31); @@ -3821,6 +3805,8 @@ Fl_Scroll_Resize *tree_scroll = (Fl_Scroll_Resize *) tree->user_data(); if (!tree_scroll) // he, forgot to set ;) bug(); tree->resize(tree->x(), tree->y(), width > tree_scroll->w() ? width : tree_scroll->w(), tree->h()); +//tree->redraw(); +//tree_scroll->redraw(); // try to select previous node //node = slices_tree->find(to_voidp(current_slice_id)); //if (node) diff --git a/faraon/x11_ui.H b/faraon/x11_ui.H index 19c46e6..0215041 100644 --- a/faraon/x11_ui.H +++ b/faraon/x11_ui.H @@ -55,7 +55,7 @@ extern Fl_Output *files_module_status_to; extern Fl_Button *classify_file_b; extern Fl_Browser *files_module_tree_br; extern Fl_Button *select_files_tree_b; -extern Fl_Scroll_Resize *files_tree_scroll; +extern Fl_Scroll *files_tree_scroll; extern Fl_Double_Window *classify_file_w; extern Fl_Input *file_title_i; extern Fl_Input *file_authority_i; diff --git a/faraon/x11_ui.fl b/faraon/x11_ui.fl index 6a1272f..1344afb 100644 --- a/faraon/x11_ui.fl +++ b/faraon/x11_ui.fl @@ -1033,9 +1033,10 @@ if (select_files_tree_b->user_data()) { current_file.tid(0); files_module_status_to->value("Sorted Files Tree"); current_file.id = 1; // root id - fill_objects_tree(files_tree, 1 << SFINX_FILE_OBJECT, 0, 0); // fluid bugs if any default params exists ! files_module_tree_br->hide(); + files_tree_scroll->resize(files_tree_scroll->x(), files_tree_scroll->y(), files_module_tree_br->w(), files_module_tree_br->h()); files_module_w->resizable(files_tree_scroll); + fill_objects_tree(files_tree, 1 << SFINX_FILE_OBJECT, 0, 0); // fluid bugs if any default params exists ! files_tree_scroll->show(); }} xywh {562 10 128 25} labeltype ENGRAVED_LABEL @@ -1079,7 +1080,7 @@ app->sfinx.send(current_file);} code1 {files_tree->callback(files_tree_cb); files_tree->user_data((void *)files_tree_scroll);} code2 {files_module_w->resizable(files_tree_scroll);} code3 {files_tree_scroll->resizable(files_tree);} - class Fl_Scroll_Resize + class Fl_Scroll } {} } Fl_Window classify_file_w { @@ -1734,7 +1735,7 @@ switch (el->tid()) { }} {} } -Function {x11_ui::fill_objects_tree()} {return_type void +Function {x11_ui::fill_objects_tree()} {open return_type void } { code {Fl::lock(); Fl_Toggle_Tree *tree = fill_tree; @@ -1831,6 +1832,8 @@ Fl_Scroll_Resize *tree_scroll = (Fl_Scroll_Resize *) tree->user_data(); if (!tree_scroll) // he, forgot to set ;) bug(); tree->resize(tree->x(), tree->y(), width > tree_scroll->w() ? width : tree_scroll->w(), tree->h()); +//tree->redraw(); +//tree_scroll->redraw(); // try to select previous node //node = slices_tree->find(to_voidp(current_slice_id)); //if (node) @@ -1838,7 +1841,7 @@ tree->resize(tree->x(), tree->y(), width > tree_scroll->w() ? width : tree_scrol Fl::unlock();} {} } -Function {x11_ui::fill_unsorted_files_tree(sfinx_files_vector_t *tree_)} {open return_type void +Function {x11_ui::fill_unsorted_files_tree(sfinx_files_vector_t *tree_)} {return_type void } { code {Fl::lock(); static sfinx_files_vector_t tree; -- 2.11.4.GIT