Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Interfaces Pgadmin Hackers > Adding owner to...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 4541 of 4769
Post > Topic >>

Adding owner to objects' lists

by guillaume@[EMAIL PROTECTED] (Guillaume Lelarge) May 5, 2008 at 02:25 PM

This is a multi-part message in MIME format.
--------------090401040002040808080800
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

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

--------------090401040002040808080800
Content-Type: text/x-patch;
 name="ownerlist.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: inline;
 filename="ownerlist.patch"

Index: pgadmin/include/schema/pgObject.h
===================================================================
--- pgadmin/include/schema/pgObject.h	(révision 7274)
+++ pgadmin/include/schema/pgObject.h	(copie de travail)
@[EMAIL PROTECTED]
 -134,6 +134,7 @[EMAIL PROTECTED]
 	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)
@[EMAIL PROTECTED]
 -310,6 +310,15 @[EMAIL PROTECTED]
     }
 }
 
+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)
@[EMAIL PROTECTED]
 -67,7 +67,7 @[EMAIL PROTECTED]
         pgObject *data;
 
         // Setup listview
-        CreateListColumns(properties, wxGetTranslation(name),
_("Comment"));
+        CreateList3Columns(properties, wxGetTranslation(name),
_("Owner"), _("Comment"));
 
         wxTreeItemId item = browser->GetFirstChild(GetId(), cookie);
         long pos=0;
@[EMAIL PROTECTED]
 -77,7 +77,8 @[EMAIL PROTECTED]
             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

--------------090401040002040808080800
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0


-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

--------------090401040002040808080800--
 




 3 Posts in Topic:
Adding owner to objects' lists
guillaume@[EMAIL PROTECTE  2008-05-05 14:25:46 
Re: Adding owner to objects' lists
guillaume@[EMAIL PROTECTE  2008-05-06 13:16:32 
Re: Adding owner to objects' lists
dpage@[EMAIL PROTECTED]   2008-05-06 11:47:05 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Sep 6 15:36:59 CDT 2008.