Re: CVS access or Project Progress

Stephen <z35_11-/[email protected]> Fri, 16 Feb 2007 18:03:48 -0800 (PST)
Newsgroups gmane.network.centericq
Message-ID <[email protected]>
centerim, cim sounds fine to me, I agree w/ Tiger!P that cicq has a history, I don't know about a 5.0 release or something, but... whoever is in charge will make a good choice...

I also updated the patch to change the contact menu's width and the log panel's height to reflect the gits sources (which compiled fine on my gentoo 2006.1 machine). The screen drawing works fine now. The only problem I am having now is changing the areas in the chat panel (e.g. while chatting), I think I might just work on a full screen chat mode instead of trying to get that to work, useful for cut and pasts, That way I will not have to run the make-history-readable script...

If using the patch, don't forget to add the correct lines to the keybindings file

Stephen



 
____________________________________________________________________________________
Have a burning question?  
Go to www.Answers.yahoo.com and get answers from real people who know.

_______________________________________________
Cicq mailing list
Cicq-xGejAJT2w6wWP6gT/[email protected]
http://mailman.linuxpl.org/mailman/listinfo/cicq
Questions? Check the FAQ first: http://centericq.de/faq/
cicq-panel_sizing-20070216.patch (application/octet-stream, 11.2 KB)
diff -u src.org/icqconf.cc src/icqconf.cc
--- src.org/icqconf.cc	2007-02-13 17:17:55.000000000 -0500
+++ src/icqconf.cc	2007-02-16 18:46:12.000000000 -0500
@@ -248,6 +248,10 @@
 	    of << "bind contact\t/\tquickfind" << endl << endl;
 	    of << "bind contact\t\\cn\tnext_chat" << endl;
 	    of << "bind contact\t\\cb\tprev_chat" << endl;
+	    of << "bind contact\t[\tleft_panel_move_left" << endl;
+	    of << "bind contact\t]\tleft_panel_move_right" << endl;
+	    of << "bind contact\t{\tlog_panel_move_up" << endl;
+	    of << "bind contact\t}\tlog_panel_move_down" << endl;
 	    of << "bind history\t/\tsearch" << endl;
 	    of << "bind history\ts\tsearch" << endl;
 	    of << "bind history\tn\tsearch_again" << endl;
@@ -262,6 +266,8 @@
 	    of << "bind editor\t\\a?\tinfo" << endl;
 	    of << "bind editor\t<F2>\tshow_urls" << endl;
 	    of << "bind editor\t<F9>\tfullscreen" << endl << endl;
+	    of << "bind editor\t<F4>\tchat_panel_move_up" << endl;
+	    of << "bind editor\t<F5>\tchat_panel_move_down" << endl;
 	    of << "bind info\t<F2>\tshow_urls" << endl;
 	    of << "bind info\t<F6>\tuser_external_action" << endl;
 
@@ -377,8 +383,14 @@
 	    if(param == "show_urls") k.action = key_show_urls; else
 	    if(param == "rss_check") k.action = key_rss_check; else
 	    if(param == "multiple_recipients") k.action = key_multiple_recipients; else
-	    if(param == "user_external_action") k.action = key_user_external_action;
-		else continue;
+	    if(param == "user_external_action") k.action = key_user_external_action; else
+	    if(param == "left_panel_move_left")  k.action = key_left_panel_move_left; else
+	    if(param == "left_panel_move_right") k.action = key_left_panel_move_right; else
+	    if(param == "log_panel_move_up")    k.action = key_log_panel_move_up; else
+	    if(param == "log_panel_move_down")  k.action = key_log_panel_move_down; else
+	    if(param == "chat_panel_move_up")  k.action = key_chat_panel_move_up; else
+	    if(param == "chat_panel_move_down")  k.action = key_chat_panel_move_down; else
+		    continue;
 
 	    keys.push_back(k);
 	}
@@ -475,6 +487,9 @@
 	    if(param == "fromcharset") fromcharset = buf; else
 	    if(param == "tocharset") tocharset = buf; else
 	    if(param == "timestampstothesecond") settimestampstothesecond(true); else
+	    if(param == "left_panel_width")  leftpanelwidth  = atol(buf.c_str()); else
+	    if(param == "log_panel_height") logpanelheight = atol(buf.c_str()); else
+	    if(param == "chat_panel_height") chatpanelheight = atol(buf.c_str()); else
 	    if(param == "ptp") {
 		ptpmin = atoi(getword(buf, "-").c_str());
 		ptpmax = atoi(buf.c_str());
@@ -591,6 +606,10 @@
 	    if(getmakelog()) f << "log" << endl;
 	    if(getproxyconnect()) f << "proxy_connect" << endl;
 	    if(getproxyssl()) f << "proxy_ssl" << endl;
+	    
+	    if(getleftpanelwidth())  f << "left_panel_width\t"  << getleftpanelwidth()  << endl;
+	    if(getlogpanelheight()) f << "log_panel_height\t" << getlogpanelheight() << endl;
+	    if(getchatpanelheight()) f << "chat_panel_height\t" << getchatpanelheight() << endl;
 
 	    vector<imaccount>::iterator ia;
 	    for(ia = accounts.begin(); ia != accounts.end(); ++ia)
diff -u src.org/icqconf.h src/icqconf.h
--- src.org/icqconf.h	2007-02-13 17:17:55.000000000 -0500
+++ src/icqconf.h	2007-02-14 23:55:40.000000000 -0500
@@ -85,7 +85,13 @@
     key_show_urls,
     key_rss_check,
     key_multiple_recipients,
-    key_user_external_action
+    key_user_external_action,
+    key_left_panel_move_right,
+    key_left_panel_move_left,
+    key_log_panel_move_up,
+    key_log_panel_move_down,
+    key_chat_panel_move_up,
+    key_chat_panel_move_down
 };
 
 class icqconf {
@@ -162,6 +168,9 @@
 	regcolor rc;
 	groupmode fgroupmode;
 	colormode cm;
+	int leftpanelwidth;
+	int logpanelheight;
+	int chatpanelheight;
 
 	colorschemer<cicq_colorpairs> schemer;
 
@@ -325,6 +334,13 @@
 
 	bool getxtitles() const { return !notitles; }
 	bool getdebug() const { return debug; }
+	
+	int  getleftpanelwidth() const { return leftpanelwidth; }
+	void setleftpanelwidth(const int width)   { leftpanelwidth  = width; }
+	int  getlogpanelheight() const { return logpanelheight; }
+	void setlogpanelheight(const int height) { logpanelheight = height; }
+	int  getchatpanelheight() const { return chatpanelheight; }
+	void setchatpanelheight(const int height) { chatpanelheight = height; }
 };
 
 extern icqconf conf;
diff -u src.org/icqdialogs.cc src/icqdialogs.cc
--- src.org/icqdialogs.cc	2007-02-13 17:17:55.000000000 -0500
+++ src/icqdialogs.cc	2007-02-16 18:50:45.000000000 -0500
@@ -1087,6 +1087,7 @@
 bool icqface::updateconf(icqconf::regsound &s, icqconf::regcolor &c) {
     bool finished, success, hasany;
     int nopt, n, i, b, nconf, ncomm, aaway, ana, noth, nfeat, ncl;
+    bool needredraw = false;
     protocolname pname;
     string tmp, phidden;
 
@@ -1179,6 +1180,9 @@
 	i = t.addnode(_(" User interface "));
 	t.addleaff(i, 0, 1, _(" Change sound device to : %s "), strregsound(s));
 	t.addleaff(i, 0, 2, _(" Change color scheme to : %s "), strregcolor(c));
+	t.addleaff(i, 0, 51, _(" Left panel width :  %d "), conf.getleftpanelwidth());
+	t.addleaff(i, 0, 52, _(" Log panel height :  %d "), conf.getlogpanelheight());
+	t.addleaff(i, 0, 53, _(" Chat panel height : %d "), conf.getchatpanelheight());
 
     #ifdef USE_FRIBIDI
 	t.addleaff(i, 0, 20, _( " Enable bidirectional languages support : %s "), stryesno(bidi));
@@ -1386,6 +1390,22 @@
 		        break;
  		    case 48:
 		        timestampstothesecond = !timestampstothesecond; break;
+		    case 51:
+			    conf.setleftpanelwidth(atol(inputstr(_("Left panel width: "), 
+    			strint(conf.getleftpanelwidth())).c_str()));
+	    		needredraw = true;
+		    	break;
+		    case 52:
+    			conf.setlogpanelheight(atol(inputstr(_("Log panel height: "), 
+	    		strint(conf.getlogpanelheight())).c_str()));
+		    	needredraw = true;
+			    break;
+		    case 53:
+    			conf.setchatpanelheight(atol(inputstr(_("Chat panel height: "), 
+	    		strint(conf.getchatpanelheight())).c_str()));
+		    	needredraw = true;
+		        break;
+
   		}
   		break;
 	    case 1:
@@ -1435,6 +1455,9 @@
     db.close();
     unblockmainscreen();
 
+    if(needredraw)
+	    icqface::redraw();
+
     return success;
 }
 
diff -u src.org/icqface.cc src/icqface.cc
--- src.org/icqface.cc	2007-02-13 17:17:55.000000000 -0500
+++ src/icqface.cc	2007-02-16 19:22:33.000000000 -0500
@@ -153,16 +153,26 @@
     sizeBigDlg.width = COLS-10;
     sizeBigDlg.height = LINES-7;
 
-    sizeWArea.x1 = (int) (COLS*0.32);
-    if(sizeWArea.x1 < 25)
-	sizeWArea.x1 = 25;
-
-    sizeWArea.x2 = COLS-1;
-    sizeWArea.y1 = 1;
-
-    sizeWArea.y2 = LINES - ((int) (LINES/4));
-    if(sizeWArea.y2 > LINES-6)
-	sizeWArea.y2 = LINES-6;
+	sizeWArea.x1 = conf.getleftpanelwidth();
+	if(sizeWArea.x1 > ((int) (COLS * 0.66))) {
+		sizeWArea.x1 = (int) (COLS * 0.66); 
+		conf.setleftpanelwidth(sizeWArea.x1);}
+	if(sizeWArea.x1 < 10) {
+		sizeWArea.x1 = 10;
+		conf.setleftpanelwidth(sizeWArea.x1);}
+	
+	sizeWArea.x2 = COLS-1;
+	sizeWArea.y1 = 1;
+
+	sizeWArea.y2 = conf.getlogpanelheight();
+	if(sizeWArea.y2 < 5){
+		sizeWArea.y2 = 5 ;
+		conf.setlogpanelheight(sizeWArea.y2);}
+	if(sizeWArea.y2 > LINES - 12) {
+		sizeWArea.y2 = LINES - 12;
+		conf.setlogpanelheight(sizeWArea.y2);}
+
+	sizeWArea.y2 = LINES - sizeWArea.y2;
 
     if(!mcontacts) {
 	mcontacts = new treeview(conf.getcolor(cp_main_menu),
@@ -2701,7 +2711,14 @@
     muins.clear();
     muins.push_back(passinfo);
 
-    chatlines = (int) ((sizeWArea.y2-sizeWArea.y1)*0.75);
+	chatlines = conf.getchatpanelheight();
+	if( chatlines < 5 ){
+		chatlines = 5;
+		conf.setchatpanelheight(chatlines);}
+	if( chatlines < (sizeWArea.y2-sizeWArea.y1)*0.90) {
+		chatlines = (int) ((sizeWArea.y2-sizeWArea.y1)*0.90);
+		conf.setchatpanelheight(chatlines);}
+
 //    workarealine(sizeWArea.y1+chatlines+1);
 
     editor.addscheme(cp_main_text, cp_main_text, 0, 0);
@@ -3074,37 +3091,14 @@
 // ----------------------------------------------------------------------------
 
 void icqface::menuidle(verticalmenu &m) {
-    cicq.idle();
-
-    if(face.dotermresize) {
-	if(&m == &face.mcontacts->menu) {
-	    face.done();
-	    face.init();
-	    face.draw();
-
-	    /*
-	     * Terminal resize specific
-	     */
-
-	    vector<string> flog;
-	    vector<string>::iterator il;
-
-	    face.status("#");
-
-	    flog = face.lastlog;
-	    face.lastlog.clear();
-
-	    bool lts, lo;
-	    conf.getlogoptions(lts, lo);
-	    conf.setlogoptions(false, lo);
+	cicq.idle();
 
-	    for(il = flog.begin(); il != flog.end(); ++il)
-		face.log(*il);
-
-	    conf.setlogoptions(lts, lo);
-	    face.dotermresize = false;
+	if(face.dotermresize) {
+		if(&m == &face.mcontacts->menu) {
+			face.redraw();
+			face.dotermresize = false;
+		}
 	}
-    }
 }
 
 void icqface::dialogidle(dialogbox &caller) {
@@ -3336,6 +3330,22 @@
 	    if(c) face.extk = ACT_IGNORE;
 	    break;
 
+	case key_left_panel_move_right:
+		face.leftpanelwidth_inc(1);
+		break;
+	   
+	case key_left_panel_move_left:
+			face.leftpanelwidth_inc(-1);
+			break;
+
+	case key_log_panel_move_up:
+		face.logpanelheight_inc(1);
+		break;
+	   
+	case key_log_panel_move_down:
+			face.logpanelheight_inc(-1);
+			break;
+
 	case key_quickfind: face.extk = ACT_QUICKFIND; break;
     }
 
@@ -3439,6 +3449,12 @@
 	    if(face.passevent)
 		face.fullscreenize(face.passevent);
 	    break;
+	case key_chat_panel_move_up:
+		face.chatpanelheight_inc(1);
+		break;
+	case key_chat_panel_move_down:
+		face.chatpanelheight_inc(-1);
+		break;
 	case key_quit:
 	    return -1;
     }
@@ -3526,14 +3542,36 @@
 }
 
 void icqface::redraw() {
-    if(!mainscreenblock) {
-	done();
-	init();
-	draw();
-	doredraw = fneedupdate = false;
-    } else {
-	doredraw = fneedupdate = true;
-    }
+	if(!mainscreenblock) {
+		done();
+		init();
+		draw();
+
+		/*
+		 * Terminal resize specific
+		 */
+
+		vector<string> flog;
+		vector<string>::iterator il;
+
+		face.status("#");
+
+		flog = face.lastlog;
+		face.lastlog.clear();
+
+		bool lts, lo;
+		conf.getlogoptions(lts, lo);
+		conf.setlogoptions(false, lo);
+
+		for(il = flog.begin() ; il != flog.end(); ++il)
+			face.log(*il);
+
+		conf.setlogoptions(lts, lo);
+
+		doredraw = fneedupdate = false;
+	} else {
+		doredraw = fneedupdate = true;
+	}
 }
 
 void icqface::xtermtitle(const string &text) {
@@ -3606,3 +3644,21 @@
 void icqface::icqprogress::hide() {
     w->close();
 }
+
+void icqface::leftpanelwidth_inc(const int inc) {
+	conf.setleftpanelwidth(conf.getleftpanelwidth()+inc);
+	redraw();
+}
+
+void icqface::logpanelheight_inc(const int inc) {
+	conf.setlogpanelheight(conf.getlogpanelheight()+inc);
+	redraw();
+}
+
+void icqface::chatpanelheight_inc(const int inc ) {
+	conf.setchatpanelheight(conf.getchatpanelheight()+inc);
+	// This does not work to well, you will have to leave, and re-enter
+	//icqface::restoreworkarea();
+	//icqface::renderchathistory();
+}
+
diff -u src.org/icqface.h src/icqface.h
--- src.org/icqface.h	2007-02-13 17:17:55.000000000 -0500
+++ src/icqface.h	2007-02-14 23:55:40.000000000 -0500
@@ -286,6 +286,9 @@
 	void userinfoexternal(const imcontact &ic);
 
 	bool selectpgpkey(string &keyid, bool secretonly = false);
+	void leftpanelwidth_inc(const int inc);
+	void logpanelheight_inc(const int inc);
+	void chatpanelheight_inc(const int inc);
 };
 
 extern icqface face;