[SVN-NetXMS] revision 3398

From: NetXMS.org SVN Server <svn_at_DOMAIN_REMOVED>
Date: Sun, 27 Jul 2008 21:03:56 +0300

* { font-family: Consolas, Lucida Console, Courier New; font-size: 100%; }
h1 { font-size: 150%; }
td.linenos { background-color: #f0f0f0; padding-right: 10px; }
span.lineno { background-color: #f0f0f0; padding: 0 5px 0 5px; }
pre { line-height: 100%; width: 100%; }
.highlight span { width: 100%; display:-moz-inline-stack; display:inline-block; zoom:1; *display:inline; }
body { background: #ffffff; }
body .c { color: #999988; font-style: italic } /* Comment */
body .err { color: #a61717; background-color: #e3d2d2 } /* Error */
body .k { font-weight: bold } /* Keyword */
body .o { font-weight: bold } /* Operator */
body .cm { color: #999988; font-style: italic } /* Comment.Multiline */
body .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
body .c1 { color: #999988; font-style: italic } /* Comment.Single */
body .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
body .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
body .ge { font-style: italic } /* Generic.Emph */
body .gr { color: #aa0000 } /* Generic.Error */
body .gh { color: #999999 } /* Generic.Heading */
body .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
body .go { color: #888888 } /* Generic.Output */
body .gp { color: #555555 } /* Generic.Prompt */
body .gs { font-weight: bold } /* Generic.Strong */
body .gu { color: #aaaaaa } /* Generic.Subheading */
body .gt { color: #aa0000 } /* Generic.Traceback */
body .kc { font-weight: bold } /* Keyword.Constant */
body .kd { font-weight: bold } /* Keyword.Declaration */
body .kp { font-weight: bold } /* Keyword.Pseudo */
body .kr { font-weight: bold } /* Keyword.Reserved */
body .kt { color: #445588; font-weight: bold } /* Keyword.Type */
body .m { color: #009999 } /* Literal.Number */
body .s { color: #bb8844 } /* Literal.String */
body .na { color: #008080 } /* Name.Attribute */
body .nb { color: #999999 } /* Name.Builtin */
body .nc { color: #445588; font-weight: bold } /* Name.Class */
body .no { color: #008080 } /* Name.Constant */
body .ni { color: #800080 } /* Name.Entity */
body .ne { color: #990000; font-weight: bold } /* Name.Exception */
body .nf { color: #990000; font-weight: bold } /* Name.Function */
body .nn { color: #555555 } /* Name.Namespace */
body .nt { color: #000080 } /* Name.Tag */
body .nv { color: #008080 } /* Name.Variable */
body .ow { font-weight: bold } /* Operator.Word */
body .w { color: #bbbbbb } /* Text.Whitespace */
body .mf { color: #009999 } /* Literal.Number.Float */
body .mh { color: #009999 } /* Literal.Number.Hex */
body .mi { color: #009999 } /* Literal.Number.Integer */
body .mo { color: #009999 } /* Literal.Number.Oct */
body .sb { color: #bb8844 } /* Literal.String.Backtick */
body .sc { color: #bb8844 } /* Literal.String.Char */
body .sd { color: #bb8844 } /* Literal.String.Doc */
body .s2 { color: #bb8844 } /* Literal.String.Double */
body .se { color: #bb8844 } /* Literal.String.Escape */
body .sh { color: #bb8844 } /* Literal.String.Heredoc */
body .si { color: #bb8844 } /* Literal.String.Interpol */
body .sx { color: #bb8844 } /* Literal.String.Other */
body .sr { color: #808000 } /* Literal.String.Regex */
body .s1 { color: #bb8844 } /* Literal.String.Single */
body .ss { color: #bb8844 } /* Literal.String.Symbol */
body .bp { color: #999999 } /* Name.Builtin.Pseudo */
body .vc { color: #008080 } /* Name.Variable.Class */
body .vg { color: #008080 } /* Name.Variable.Global */
body .vi { color: #008080 } /* Name.Variable.Instance */
body .il { color: #009999 } /* Literal.Number.Integer.Long */

Info

Revision:3398
Author:victor

Date:2008-07-27 21:03:56 +0300 (Sun, 27 Jul 2008)

Comment:minor changes

Changes
U trunk/configure.ac
U trunk/include/nxclapi.h
U trunk/src/client/console/libnxmc/objseldlg.cpp
U trunk/src/client/console/libnxmc/userSelectionDialog.cpp
U trunk/src/libnxcl/main.cpp

Diff
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2008-07-25 13:31:44 UTC (rev 3397)
+++ trunk/configure.ac 2008-07-27 18:03:56 UTC (rev 3398)
@@ -559,6 +559,9 @@
                         ])
         fi
 
+ if test &quot;x$ENABLE_DEBUG&quot; = &quot;xyes&quot;; then
+ CPPFLAGS=&quot;$CPPFLAGS -ggdb3&quot;
+ fi
 fi
 
 
@@ -1587,7 +1590,7 @@
 fi
 if test &quot;x${BUILD_CONSOLE}&quot; = &quot;xyes&quot;; then
         echo &quot;Build Console : YES&quot;
- echo &quot;wxWidgets config :&quot; `$WXCONF --selected-config`
+ echo &quot;wxWidgets config :&quot; `$WXCONF --selected-config --debug=$ENABLE_DEBUG`
 else
         echo &quot;Build Console : NO&quot;
 fi

Modified: trunk/include/nxclapi.h
===================================================================
--- trunk/include/nxclapi.h 2008-07-25 13:31:44 UTC (rev 3397)
+++ trunk/include/nxclapi.h 2008-07-27 18:03:56 UTC (rev 3398)
@@ -397,18 +397,19 @@
 #define RCC_NOT_PUSH_DCI ((DWORD)67)
 #define RCC_NXMP_PARSE_ERROR ((DWORD)68)
 #define RCC_NXMP_VALIDATION_ERROR ((DWORD)69)
-#define RCC_INVALID_GRAPH_ID ((DWORD)70)
+#define RCC_INVALID_GRAPH_ID ((DWORD)70)
 #define RCC_LOCAL_CRYPTO_ERROR ((DWORD)71)
 #define RCC_UNSUPPORTED_AUTH_TYPE ((DWORD)72)
 #define RCC_BAD_CERTIFICATE ((DWORD)73)
 #define RCC_INVALID_CERT_ID ((DWORD)74)
-#define RCC_SNMP_FAILURE ((DWORD)75)
+#define RCC_SNMP_FAILURE ((DWORD)75)
 #define RCC_NO_L2_TOPOLOGY_SUPPORT ((DWORD)76)
 #define RCC_INVALID_SITUATION_ID ((DWORD)77)
 #define RCC_INSTANCE_NOT_FOUND ((DWORD)78)
 #define RCC_INVALID_EVENT_ID ((DWORD)79)
 #define RCC_AGENT_ERROR ((DWORD)80)
 #define RCC_UNKNOWN_VARIABLE ((DWORD)81)
+#define RCC_RESOURCE_NOT_AVAILABLE ((DWORD)82)
 
 
 //

Modified: trunk/src/client/console/libnxmc/objseldlg.cpp
===================================================================
--- trunk/src/client/console/libnxmc/objseldlg.cpp 2008-07-25 13:31:44 UTC (rev 3397)
+++ trunk/src/client/console/libnxmc/objseldlg.cpp 2008-07-27 18:03:56 UTC (rev 3398)
@@ -113,34 +113,12 @@
                 return false;
         }
         
- wxImageList *imgList = NXMCGetImageListCopy(IMAGE_LIST_OBJECTS_SMALL);
- imgList-&gt;Add(wxXmlResource::Get()-&gt;LoadIcon(_T(&quot;icoSortUp&quot;)));
- imgList-&gt;Add(wxXmlResource::Get()-&gt;LoadIcon(_T(&quot;icoSortDown&quot;)));
- wndListCtrl-&gt;AssignImageList(imgList, wxIMAGE_LIST_SMALL);
-
- width = wndListCtrl-&gt;GetClientSize().x;
- if (m_isSelectAddress)
- {
- wndListCtrl-&gt;InsertColumn(0, _T(&quot;Interface&quot;), wxLIST_FORMAT_LEFT,
- width - 150 - wxSystemSettings::GetMetric(wxSYS_VSCROLL_X));
- wndListCtrl-&gt;InsertColumn(1, _T(&quot;IP Address&quot;), wxLIST_FORMAT_LEFT, 150);
- }
- else
- {
- wndListCtrl-&gt;InsertColumn(0, _T(&quot;Name&quot;), wxLIST_FORMAT_LEFT,
- width - 100 - wxSystemSettings::GetMetric(wxSYS_VSCROLL_X));
- wndListCtrl-&gt;InsertColumn(1, _T(&quot;Class&quot;), wxLIST_FORMAT_LEFT, 100);
- }
- if (m_isSingleSelection)
- {
- wndListCtrl-&gt;SetSingleStyle(wxLC_SINGLE_SEL);
- }
-
         // Fill in object list
         if (m_parentObjectId == 0)
         {
                 NXCLockObjectIndex(NXMCGetSession());
                 index = (NXC_OBJECT_INDEX *)NXCGetObjectIndex(NXMCGetSession(), &amp;numObjects);
+ int __counter = 0;
                 for(i = 0; i &lt; numObjects; i++)
                 {
                         if ((classMask[index[i].object-&gt;iClass] &amp; m_allowedClasses) &amp;&amp;
@@ -164,11 +142,13 @@
                                                         continue;
                                                 }
                                         }
- }
+ }/*
+printf(&quot;list=%p %d insert %p name=%p (%S) class=%d\n&quot;,wndListCtrl, i,index[i].object,index[i].object-&gt;szName,index[i].object-&gt;szName,index[i].object-&gt;iClass);
                                 item = wndListCtrl-&gt;InsertItem(0x7FFFFFFF, index[i].object-&gt;szName,
                                         index[i].object-&gt;iClass);
+printf(&quot;%d item=%d\n&quot;,i,item);
                                 wndListCtrl-&gt;SetItem(item, 1, NXMCGetClassName(index[i].object-&gt;iClass));
- wndListCtrl-&gt;SetItemData(item, index[i].object-&gt;dwId);
+ wndListCtrl-&gt;SetItemData(item, index[i].object-&gt;dwId);*/
                         }
                 }
                 NXCUnlockObjectIndex(NXMCGetSession());
@@ -239,12 +219,50 @@
 void nxObjectSelDlg::OnInitDialog(wxInitDialogEvent &amp;event)
 {
         wxWindow *wnd;
+ wxListCtrl *wndListCtrl;
+ int width;
         
         wnd = FindWindowById(wxID_OK, this);
         if (wnd != NULL)
                 ((wxButton *)wnd)-&gt;SetDefault();
         else
                 wxLogDebug(_T(&quot;nxObjectSelDlg::OnInitDialog(): cannot find child with id wxID_OK&quot;));
+
+ wndListCtrl = XRCCTRL(*this, &quot;wndListCtrl&quot;, wxListCtrl);
+ if (wndListCtrl == NULL)
+ {
+ wxLogError(_T(&quot;INTERNAL ERROR: wndListCtrl is NULL in nxObjectSelDlg::OnInitDialog&quot;));
+ return;
+ }
+
+ wxImageList *imgList = NXMCGetImageListCopy(IMAGE_LIST_OBJECTS_SMALL);
+ imgList-&gt;Add(wxXmlResource::Get()-&gt;LoadIcon(_T(&quot;icoSortUp&quot;)));
+ imgList-&gt;Add(wxXmlResource::Get()-&gt;LoadIcon(_T(&quot;icoSortDown&quot;)));
+ wndListCtrl-&gt;AssignImageList(imgList, wxIMAGE_LIST_SMALL);
+
+ width = wndListCtrl-&gt;GetClientSize().GetX();
+printf(&quot;width=%d\n&quot;,width);
+ if (m_isSelectAddress)
+ {
+ wndListCtrl-&gt;InsertColumn(0, _T(&quot;Interface&quot;), wxLIST_FORMAT_LEFT,
+ width - 150 - wxSystemSettings::GetMetric(wxSYS_VSCROLL_X));
+ wndListCtrl-&gt;InsertColumn(1, _T(&quot;IP Address&quot;), wxLIST_FORMAT_LEFT, 150);
+ }
+ else
+ {
+long rc;
+ rc = wndListCtrl-&gt;InsertColumn(0, _T(&quot;Name&quot;), wxLIST_FORMAT_LEFT,
+ width - 100 - wxSystemSettings::GetMetric(wxSYS_VSCROLL_X));
+printf(&quot;rc1=%d, cols=%d\n&quot;,rc,wndListCtrl-&gt;GetColumnCount());
+ rc = wndListCtrl-&gt;InsertColumn(1, _T(&quot;Class&quot;), wxLIST_FORMAT_LEFT, 100);
+printf(&quot;rc2=%d col=%d\n&quot;,rc,wndListCtrl-&gt;GetColumnCount());
+ }
+ if (m_isSingleSelection)
+ {
+ wndListCtrl-&gt;SetSingleStyle(wxLC_SINGLE_SEL);
+ }
+
+
         event.Skip();
 }
 
@@ -342,4 +360,4 @@
         {
                 EndDialog(wxID_OK);
         }
-}
\ No newline at end of file
+}

Modified: trunk/src/client/console/libnxmc/userSelectionDialog.cpp
===================================================================
--- trunk/src/client/console/libnxmc/userSelectionDialog.cpp 2008-07-25 13:31:44 UTC (rev 3397)
+++ trunk/src/client/console/libnxmc/userSelectionDialog.cpp 2008-07-27 18:03:56 UTC (rev 3398)
@@ -206,8 +206,10 @@
         
         // add columns
         int width = list-&gt;GetClientSize().GetX();
- list-&gt;InsertColumn(0, _T(&quot;Name&quot;), wxLIST_FORMAT_LEFT, 200);
- list-&gt;InsertColumn(1, _T(&quot;Full Name&quot;), wxLIST_FORMAT_LEFT, width - 200 - wxSystemSettings::GetMetric(wxSYS_VSCROLL_X));
+ long rc = list-&gt;InsertColumn(0, _T(&quot;Name&quot;), wxLIST_FORMAT_LEFT, 200);
+printf(&quot;user: rc1=%d\n&quot;,rc);
+ rc = list-&gt;InsertColumn(1, _T(&quot;Full Name&quot;), wxLIST_FORMAT_LEFT, width - 200 - wxSystemSettings::GetMetric(wxSYS_VSCROLL_X));
+printf(&quot;user: rc2=%d\n&quot;,rc);
 
         NXMCLoadListCtrlColumns(wxConfig::Get(), *list, _T(&quot;/UserSelDlg/UserList&quot;));
         

Modified: trunk/src/libnxcl/main.cpp
===================================================================
--- trunk/src/libnxcl/main.cpp 2008-07-25 13:31:44 UTC (rev 3397)
+++ trunk/src/libnxcl/main.cpp 2008-07-27 18:03:56 UTC (rev 3398)
@@ -367,9 +367,10 @@
                 _T(&quot;Named instance not found&quot;),
                 _T(&quot;Invalid event ID&quot;),
                 _T(&quot;Operation cannot be completed due to agent error&quot;),
- _T(&quot;Unknown variable&quot;)
+ _T(&quot;Unknown variable&quot;),
+ _T(&quot;Requested resource not available&quot;)
    };
- return ((dwError &gt;= 0) &amp;&amp; (dwError &lt;= RCC_UNKNOWN_VARIABLE)) ? pszErrorText[dwError] : _T(&quot;No text message for this error&quot;);
+ return ((dwError &gt;= 0) &amp;&amp; (dwError &lt;= RCC_RESOURCE_NOT_AVAILABLE)) ? pszErrorText[dwError] : _T(&quot;No text message for this error&quot;);
 }
 
 
Received on Sun Jul 27 2008 - 21:03:56 EEST

This archive was generated by hypermail 2.2.0 : Sun Jul 27 2008 - 21:02:04 EEST