]> saetta.ns0.it Git - zakautho/gui/commitdiff
Using of images for allow/deny in treeview.
authorAndrea Zagli <a.zagli@comune.scandicci.fi.it>
Thu, 6 Dec 2012 10:23:25 +0000 (11:23 +0100)
committerAndrea Zagli <a.zagli@comune.scandicci.fi.it>
Thu, 6 Dec 2012 10:23:25 +0000 (11:23 +0100)
data/autoz-gui/gui/autoz-gui.ui
src/authorizations.c

index 65f360948e447f5ffadf7b68f38af549d7fd95fd..6079a9837f428a770607da0f9e66d68a795ce49a 100644 (file)
@@ -48,7 +48,7 @@
       <column type="gchararray"/>
       <!-- column-name resource -->
       <column type="gchararray"/>
-      <!-- column-name allow_deny -->
+      <!-- column-name allow_deny_stock_pixbuf -->
       <column type="gchararray"/>
     </columns>
   </object>
                 </child>
                 <child>
                   <object class="GtkTreeViewColumn" id="treeviewcolumn4">
+                    <property name="sizing">autosize</property>
                     <property name="title">Allow/Deny</property>
+                    <property name="expand">True</property>
                     <property name="clickable">True</property>
+                    <property name="alignment">0.5</property>
                     <property name="sort_column_id">3</property>
                     <child>
-                      <object class="GtkCellRendererText" id="cellrenderertext5"/>
+                      <object class="GtkCellRendererPixbuf" id="cellrenderertext5"/>
                       <attributes>
-                        <attribute name="text">3</attribute>
+                        <attribute name="stock-id">3</attribute>
                       </attributes>
                     </child>
                   </object>
index 74df47f311f9872b80d70f56d76fc3de203cbed2..aadec65bbd1fc4923134d19342d3aa1b7895090d 100644 (file)
@@ -208,7 +208,7 @@ authorizations_load (Authorizations *authorizations)
                                                            COL_ID, g_value_get_int (gda_data_model_get_value_at (dm, 0, row, NULL)),
                                                            COL_ROLE, gda_value_stringify (gda_data_model_get_value_at (dm, 1, row, NULL)),
                                                            COL_RESOURCE, gda_value_stringify (gda_data_model_get_value_at (dm, 2, row, NULL)),
-                                                           COL_TYPE, gda_value_stringify (gda_data_model_get_value_at (dm, 3, row, NULL)),
+                                                           COL_TYPE, g_value_get_int (gda_data_model_get_value_at (dm, 3, row, NULL)) == 1 ? "gtk-yes" : "gtk-no",
                                                            -1);
                                }