Hi,
The attached patch adds an Owner column to an object's list (for example
"Aggregates" node, "Functions" node, "Tables" node, etc.). So, there's
now three columns : Name, Owner and Comment.
Regards.
--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com
Index: pgadmin/include/schema/pgObject.h
===================================================================
--- pgadmin/include/schema/pgObject.h (révision 7274)
+++ pgadmin/include/schema/pgObject.h (copie de travail)
@@ -134,6 +134,7 @@
wxString qtDbString(const wxString &str);
protected:
+ void CreateList3Columns(ctlListView *properties, const wxString &left=_("Object"), const wxString
&middle=_("Owner"),const wxString &right=_("Value"));
void CreateListColumns(ctlListView *properties, const wxString &left=_("Property"), const wxString
&right=_("Value"));
void AppendMenu(wxMenu *menu, int type=-1);
Index: pgadmin/schema/pgObject.cpp
===================================================================
--- pgadmin/schema/pgObject.cpp (révision 7274)
+++ pgadmin/schema/pgObject.cpp (copie de travail)
@@ -310,6 +310,15 @@
}
}
+void pgObject::CreateList3Columns(ctlListView *list, const wxString &left, const wxString &middle, const wxString
&right)
+{
+ list->ClearAll();
+ list->AddColumn(left, 90);
+ list->AddColumn(middle, 50);
+ list->AddColumn(right, 400);
+}
+
+
void pgObject::CreateListColumns(ctlListView *list, const wxString &left, const wxString &right)
{
list->ClearAll();
Index: pgadmin/schema/pgCollection.cpp
===================================================================
--- pgadmin/schema/pgCollection.cpp (révision 7274)
+++ pgadmin/schema/pgCollection.cpp (copie de travail)
@@ -67,7 +67,7 @@
pgObject *data;
// Setup listview
- CreateListColumns(properties, wxGetTranslation(name), _("Comment"));
+ CreateList3Columns(properties, wxGetTranslation(name), _("Owner"), _("Comment"));
wxTreeItemId item = browser->GetFirstChild(GetId(), cookie);
long pos=0;
@@ -77,7 +77,8 @@
if (IsCollectionFor(data))
{
properties->InsertItem(pos, data->GetFullName(), data->GetIconId());
- properties->SetItem(pos, 1, firstLineOnly(data->GetComment()));
+ properties->SetItem(pos, 1, data->GetOwner());
+ properties->SetItem(pos, 2, firstLineOnly(data->GetComment()));
pos++;
}
// Get the next item