|
|
|
|
@ -600,6 +600,16 @@ void on_web_publish_add(GtkWidget *,main_window *widgets){
|
|
|
|
|
g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_web_publish_accept),dict);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void on_scrolled_window_size_allocate(GtkWidget *, GdkRectangle *allocation, repo_add_window *window){
|
|
|
|
|
if (allocation->height<100){
|
|
|
|
|
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(gtk_widget_get_parent(gtk_widget_get_parent(window->SourceListBox))),GTK_POLICY_NEVER,GTK_POLICY_NEVER);
|
|
|
|
|
gtk_widget_set_size_request(gtk_widget_get_parent(gtk_widget_get_parent(window->SourceListBox)),-1,allocation->height);
|
|
|
|
|
} else {
|
|
|
|
|
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(gtk_widget_get_parent(gtk_widget_get_parent(window->SourceListBox))),GTK_POLICY_NEVER,GTK_POLICY_ALWAYS);
|
|
|
|
|
gtk_widget_set_size_request(gtk_widget_get_parent(gtk_widget_get_parent(window->SourceListBox)),-1,100);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void on_repo_add(GtkWidget *, main_window *widgets){
|
|
|
|
|
gtk_tree_selection_unselect_all(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->MirrorTree)));
|
|
|
|
|
repo_add_window *window = yon_repo_add_window_new();
|
|
|
|
|
@ -1359,6 +1369,7 @@ repo_add_window *yon_repo_add_window_new(){
|
|
|
|
|
window->CancelButton = yon_gtk_builder_get_widget(builder,"CancelButton");
|
|
|
|
|
window->HeadLabel = yon_gtk_builder_get_widget(builder,"HeadLabel");
|
|
|
|
|
window->SourceBox = yon_gtk_builder_get_widget(builder,"SourceBox");
|
|
|
|
|
window->SourceListBox = yon_gtk_builder_get_widget(builder,"SourceListBox");
|
|
|
|
|
window->RepoSourceAddButton = yon_gtk_builder_get_widget(builder,"RepoSourceAddButton");
|
|
|
|
|
window->NeverRadio = yon_gtk_builder_get_widget(builder,"NeverRadio");
|
|
|
|
|
window->OptionalRadio = yon_gtk_builder_get_widget(builder,"OptionalRadio");
|
|
|
|
|
@ -1384,6 +1395,7 @@ repo_add_window *yon_repo_add_window_new(){
|
|
|
|
|
g_signal_connect(G_OBJECT(window->UsageDefaultCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->UsageEnableSearchCheck);
|
|
|
|
|
g_signal_connect(G_OBJECT(window->UsageDefaultCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->UsageEnableUpdateCheck);
|
|
|
|
|
g_signal_connect(G_OBJECT(window->UsageDefaultCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->UsageSysupgradeCheck);
|
|
|
|
|
g_signal_connect(G_OBJECT(window->SourceListBox),"size-allocate",G_CALLBACK(on_scrolled_window_size_allocate),window);
|
|
|
|
|
gtk_widget_show(window->Window);
|
|
|
|
|
|
|
|
|
|
return window;
|
|
|
|
|
|