pull/30/head
parent d7b09366e5
commit b72900aebb

@ -1375,6 +1375,16 @@ void on_cell_renderer_toggle_toggled(GtkWidget *, gchar* path, GtkWidget *table)
}
}
void on_column_resize(GtkTreeViewColumn *,GParamSpec *,main_window *widgets){
GList *list = gtk_tree_view_get_columns(GTK_TREE_VIEW(widgets->WebPublicationTree));
int width_configuration = gtk_tree_view_column_get_width(g_list_nth_data(list,0))+gtk_tree_view_column_get_width(g_list_nth_data(list,1))+gtk_tree_view_column_get_width(g_list_nth_data(list,2))+gtk_tree_view_column_get_width(g_list_nth_data(list,3))+gtk_tree_view_column_get_width(g_list_nth_data(list,4));
// int width_system = gtk_tree_view_column_get_width(g_list_nth_data(list,5))+gtk_tree_view_column_get_width(g_list_nth_data(list,6))+gtk_tree_view_column_get_width(g_list_nth_data(list,7));
g_list_free(list);
gtk_tree_view_column_set_fixed_width(gtk_tree_view_get_column(GTK_TREE_VIEW(widgets->WebPublicationUpperTree),0),width_configuration);
// gtk_tree_view_column_set_fixed_width(gtk_tree_view_get_column(GTK_TREE_VIEW(widgets->WebPublicationUpperTree),1),width_system);
}
/**yon_main_window_complete(main_window *widgets)
* [EN]
*
@ -1428,6 +1438,7 @@ void yon_main_window_complete(main_window *widgets){
widgets->MirrorRemoveButton = yon_gtk_builder_get_widget(builder,"MirrorRemoveButton");
widgets->MirrorConfigureButton = yon_gtk_builder_get_widget(builder,"MirrorConfigureButton");
widgets->BootCheck = yon_gtk_builder_get_widget(builder,"BootCheck");
widgets->WebPublicationUpperTree = yon_gtk_builder_get_widget(builder,"WebPublicationUpperTree");
widgets->UpdateRepoList = GTK_LIST_STORE(gtk_builder_get_object(builder,"UpdateRepoList"));
widgets->ReposList = GTK_LIST_STORE(gtk_builder_get_object(builder,"ReposList"));
widgets->PublicationList = GTK_LIST_STORE(gtk_builder_get_object(builder,"PublicationList"));
@ -1464,6 +1475,12 @@ void yon_main_window_complete(main_window *widgets){
g_signal_connect(G_OBJECT(widgets->UpdateToggleCell),"toggled",G_CALLBACK(on_toggle_cell_toggled),widgets->UpdateRepoList);
g_signal_connect(G_OBJECT(widgets->PublicationToggleCell),"toggled",G_CALLBACK(on_toggle_cell_toggled),widgets->PublicationList);
GList *list = gtk_tree_view_get_columns(GTK_TREE_VIEW(widgets->WebPublicationTree));
for (unsigned int i=0;i<g_list_length(list);i++){
g_signal_connect_after(G_OBJECT(g_list_nth_data(list,i)),"notify::width",G_CALLBACK(on_column_resize),widgets);
yon_window_config_add_listener(g_list_nth_data(list,i),yon_char_append("UserUnitsColumn",yon_char_from_int(i)),"fixed-width",YON_TYPE_INT);
}
}
{
yon_gtk_tree_view_minimal_fixed_size_set_full(GTK_TREE_VIEW(widgets->MirrorTree));

@ -123,6 +123,7 @@ typedef struct {
GtkWidget *WebPublicationEditButton;
GtkWidget *WebPublicationRemoveButton;
GtkWidget *WebPublicationTree;
GtkWidget *WebPublicationUpperTree;
GtkListStore *WebPublicationList;
GtkWidget *MirrorPublicCheck;
@ -308,6 +309,7 @@ mirror_add_window *yon_mirror_add_window_new();
mirror_configure_window *yon_mirror_configure_window_new();
void on_file_chooser_open(GtkWidget *self, GtkEntry *target);
void on_column_resize(GtkTreeViewColumn *,GParamSpec *,main_window *widgets);
void on_web_publish_path_changed(GtkWidget *, web_publication_add_window *window);

@ -1369,169 +1369,170 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</packing>
</child>
<child>
<object class="GtkBox">
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkTreeView">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="model">liststore1</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
<child>
<object class="GtkTreeViewColumn"/>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">Authorization parameters</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkScrolledWindow">
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<property name="can-focus">False</property>
<child>
<object class="GtkTreeView" id="WebPublicationTree">
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="model">WebPublicationList</property>
<property name="enable-grid-lines">both</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkTreeViewColumn">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="title" translatable="yes">Enabled</property>
<object class="GtkTreeView" id="WebPublicationUpperTree">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="model">liststore1</property>
<child>
<object class="GtkCellRendererToggle"/>
<attributes>
<attribute name="active">0</attribute>
</attributes>
<object class="GtkTreeViewColumn"/>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="title" translatable="yes">Storage</property>
<child>
<object class="GtkCellRendererText">
<property name="ellipsize">end</property>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">Authorization parameters</property>
<property name="expand">True</property>
</object>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="title" translatable="yes">Chosen repositories</property>
<object class="GtkTreeView" id="WebPublicationTree">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="model">WebPublicationList</property>
<property name="enable-grid-lines">both</property>
<child>
<object class="GtkCellRendererText">
<property name="ellipsize">end</property>
<object class="GtkTreeViewColumn">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="title" translatable="yes">Enabled</property>
<child>
<object class="GtkCellRendererToggle"/>
<attributes>
<attribute name="active">0</attribute>
</attributes>
</child>
</object>
<attributes>
<attribute name="text">2</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="title" translatable="yes">Reviewer</property>
<child>
<object class="GtkCellRendererToggle"/>
<attributes>
<attribute name="active">3</attribute>
</attributes>
<object class="GtkTreeViewColumn">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="title" translatable="yes">Storage</property>
<child>
<object class="GtkCellRendererText">
<property name="ellipsize">end</property>
</object>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="title" translatable="yes">Chosen repositories</property>
<child>
<object class="GtkCellRendererText">
<property name="ellipsize">end</property>
</object>
<attributes>
<attribute name="text">2</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="title" translatable="yes">Port</property>
<child>
<object class="GtkCellRendererText">
<property name="ellipsize">end</property>
<object class="GtkTreeViewColumn">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="title" translatable="yes">Reviewer</property>
<child>
<object class="GtkCellRendererToggle"/>
<attributes>
<attribute name="active">3</attribute>
</attributes>
</child>
</object>
<attributes>
<attribute name="text">4</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="title" translatable="yes">Name</property>
<child>
<object class="GtkCellRendererText">
<property name="ellipsize">end</property>
<object class="GtkTreeViewColumn">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="title" translatable="yes">Port</property>
<child>
<object class="GtkCellRendererText">
<property name="ellipsize">end</property>
</object>
<attributes>
<attribute name="text">4</attribute>
</attributes>
</child>
</object>
<attributes>
<attribute name="text">5</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="title" translatable="yes">Password/Hash type</property>
<child>
<object class="GtkCellRendererText">
<property name="ellipsize">end</property>
<object class="GtkTreeViewColumn">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="title" translatable="yes">Name</property>
<child>
<object class="GtkCellRendererText">
<property name="ellipsize">end</property>
</object>
<attributes>
<attribute name="text">5</attribute>
</attributes>
</child>
</object>
<attributes>
<attribute name="text">6</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">Password/Password hash</property>
<child>
<object class="GtkCellRendererText">
<property name="ellipsize">end</property>
<object class="GtkTreeViewColumn">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="title" translatable="yes">Password/Hash type</property>
<child>
<object class="GtkCellRendererText">
<property name="ellipsize">end</property>
</object>
<attributes>
<attribute name="text">6</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">Password/Password hash</property>
<child>
<object class="GtkCellRendererText">
<property name="ellipsize">end</property>
</object>
<attributes>
<attribute name="text">7</attribute>
</attributes>
</child>
</object>
<attributes>
<attribute name="text">7</attribute>
</attributes>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>

Loading…
Cancel
Save