|
|
|
|
@ -368,21 +368,6 @@ void on_section_settings_open(GtkButton* self,dictionary *cWidgets){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// for (dictionary *pointer=widgets->ICSys->first;pointer!=NULL;pointer=pointer->next){
|
|
|
|
|
// IVGraphicals *IV=(IVGraphicals*)pointer->data;
|
|
|
|
|
// SectionSettingSegment *Sgm=yon_create_section_setting(IV->sectionName,IV->categories);
|
|
|
|
|
// yon_segment_show(widgets,Sgm);
|
|
|
|
|
// dict=yon_dictionary_create_with_data((char*)gtk_label_get_text(GTK_LABEL(Sgm->NameLabel),Sgm);
|
|
|
|
|
// dict->data=Sgm;
|
|
|
|
|
// dict->key=(char*)gtk_label_get_text(GTK_LABEL(Sgm->NameLabel));
|
|
|
|
|
// dict->next=malloc(sizeof(dictionary));
|
|
|
|
|
// dict->next->prev=dict;
|
|
|
|
|
// dict->next->first=dict->first;
|
|
|
|
|
// dict=dict->next;
|
|
|
|
|
// }
|
|
|
|
|
// dict=dict->prev;
|
|
|
|
|
// dict->next=NULL;
|
|
|
|
|
// }
|
|
|
|
|
gtk_window_present(GTK_WINDOW(widgets->SectionSettingsWindow));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -482,41 +467,6 @@ void on_sections_move_up(GtkWidget *button, actionWidgets *widgets){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// for (dictionary *dct=widgets->SettingsSections->first;dct!=NULL;dct=dct->next){
|
|
|
|
|
// SectionSettingSegment *segment=(SectionSettingSegment*)dct->data;
|
|
|
|
|
// if (segment!=NULL){
|
|
|
|
|
// if (button==segment->DragUpButton){
|
|
|
|
|
// if (dct->prev!=NULL){
|
|
|
|
|
// if (dct->prev==dct->first){
|
|
|
|
|
// yon_dictionary_make_first(dct);
|
|
|
|
|
// dct->next->prev=dct->prev;
|
|
|
|
|
// dct->prev->next=dct->next;
|
|
|
|
|
// dct->next=dct->prev;
|
|
|
|
|
// dct->prev=NULL;
|
|
|
|
|
// dct->next->prev=dct;
|
|
|
|
|
// } else if (dct->next==NULL){
|
|
|
|
|
// dct->next=dct->prev;
|
|
|
|
|
// dct->next->next=NULL;
|
|
|
|
|
// dct->next->prev->next=dct;
|
|
|
|
|
// dct->prev=dct->prev->prev;
|
|
|
|
|
// dct->next->prev=dct;
|
|
|
|
|
// } else{
|
|
|
|
|
// dct->next->prev=dct->prev;
|
|
|
|
|
// dct->prev->next=dct->next;
|
|
|
|
|
// dct->next=dct->prev;
|
|
|
|
|
// dct->prev=dct->prev->prev;
|
|
|
|
|
// dct->prev->next=dct;
|
|
|
|
|
// dct->next->prev=dct;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// yon_segments_hide(widgets);
|
|
|
|
|
// yon_segments_show(widgets);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// } else return;
|
|
|
|
|
// }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void on_sections_move_down(GtkWidget *button, actionWidgets *widgets){
|
|
|
|
|
@ -531,39 +481,6 @@ void on_sections_move_down(GtkWidget *button, actionWidgets *widgets){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (dct->next!=NULL){
|
|
|
|
|
// if (dct->next->next==NULL){
|
|
|
|
|
// dct->next->prev=dct->prev;
|
|
|
|
|
// dct->prev->next=dct->next;
|
|
|
|
|
// dct->prev=dct->next;
|
|
|
|
|
// dct->next=NULL;
|
|
|
|
|
// dct->prev->next=dct;
|
|
|
|
|
// } else if (dct->prev==NULL){
|
|
|
|
|
// yon_dictionary_make_first(dct->next);
|
|
|
|
|
// dct->prev=dct->next;
|
|
|
|
|
// dct->next=dct->next->next;
|
|
|
|
|
// dct->prev->prev=NULL;
|
|
|
|
|
// dct->next->prev=dct;
|
|
|
|
|
// dct->prev->next=dct;
|
|
|
|
|
|
|
|
|
|
// } else{
|
|
|
|
|
// dct->next->prev=dct->prev;
|
|
|
|
|
// dct->prev->next=dct->next;
|
|
|
|
|
// dct->prev=dct->next;
|
|
|
|
|
// dct->next=dct->next->next;
|
|
|
|
|
// dct->next->prev=dct;
|
|
|
|
|
// dct->prev->next=dct;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// yon_segments_hide(widgets);
|
|
|
|
|
// yon_segments_show(widgets);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// } else return;
|
|
|
|
|
// }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void on_sections_add(GtkWidget *button, actionWidgets *widgets){
|
|
|
|
|
@ -579,7 +496,6 @@ void on_sections_add(GtkWidget *button, actionWidgets *widgets){
|
|
|
|
|
dictionary *newsec=yon_dictionary_create_empty();
|
|
|
|
|
newsec=yon_section_new(newsec,category_name,category_categories);
|
|
|
|
|
main_config.sections=yon_dictionary_create_with_data_connected(main_config.sections,category_name,newsec->data);
|
|
|
|
|
//if (main_config.sections->prev) main_config.sections->first=main_config.sections->prev->first;
|
|
|
|
|
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(widgets->SectionSettingAddNameEntry),"");
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(widgets->SectionSettingAddCategoriesEntry),"");
|
|
|
|
|
@ -587,20 +503,6 @@ void on_sections_add(GtkWidget *button, actionWidgets *widgets){
|
|
|
|
|
yon_segments_hide(widgets);
|
|
|
|
|
yon_segments_show(widgets);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// dictionary *dict=yon_dictionary_create_empty();
|
|
|
|
|
// dictionary *dct=NULL;
|
|
|
|
|
// SectionSettingSegment *segment=yon_create_section_setting((char*)gtk_entry_get_text(GTK_ENTRY(widgets->SectionSettingAddNameEntry)),(char*)gtk_entry_get_text(GTK_ENTRY(widgets->SectionSettingAddCategoriesEntry)));
|
|
|
|
|
// for (dct=widgets->SettingsSections->first;dct->next!=NULL;dct=dct->next){}
|
|
|
|
|
// dict->data=segment;
|
|
|
|
|
// dict->key=(char*)gtk_label_get_text(GTK_LABEL(segment->NameLabel));
|
|
|
|
|
// dct->next=dict;
|
|
|
|
|
// dict->prev=dct;
|
|
|
|
|
// dict->first=dct->first;
|
|
|
|
|
// yon_segments_hide(widgets);
|
|
|
|
|
// yon_segments_show(widgets);
|
|
|
|
|
// gtk_entry_set_text(GTK_ENTRY(widgets->SectionSettingAddNameEntry),"");
|
|
|
|
|
// gtk_entry_set_text(GTK_ENTRY(widgets->SectionSettingAddCategoriesEntry),"");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void on_sections_new_clear(GtkWidget *button, actionWidgets *widgets){
|
|
|
|
|
@ -613,7 +515,6 @@ void on_sections_close(GtkWidget *button, actionWidgets *widgets){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void on_sections_save(GtkWidget *button, dictionary *widgetsD){
|
|
|
|
|
// main_config.changed=1;
|
|
|
|
|
for (dictionary *dict=widgetsD->first;dict!=NULL;dict=dict->next){
|
|
|
|
|
actionWidgets *widgets=(actionWidgets*)dict->data;
|
|
|
|
|
for (dictionary *ICSys=widgets->ICSys->first;ICSys!=NULL;ICSys=ICSys->next){
|
|
|
|
|
@ -626,46 +527,6 @@ void on_sections_save(GtkWidget *button, dictionary *widgetsD){
|
|
|
|
|
yon_show_icon_views(widgets->ICSys,widgets);
|
|
|
|
|
hide_if_unfound(widgetsD);
|
|
|
|
|
}
|
|
|
|
|
// actionWidgets *widgets=(actionWidgets*)widgetsD->data;
|
|
|
|
|
// GKeyFile *gfile=g_key_file_new();
|
|
|
|
|
// main_config.sections=yon_dictionary_create_empty();
|
|
|
|
|
// for (dictionary *dict=widgets->SettingsSections;dict!=NULL;dict=dict->next){
|
|
|
|
|
// SectionSettingSegment *segment=(SectionSettingSegment*)dict->data;
|
|
|
|
|
// char *nm=(char*)gtk_label_get_text(GTK_LABEL(segment->NameLabel));
|
|
|
|
|
// char *ct=(char*)gtk_label_get_text(GTK_LABEL(segment->CategoriesLabel));
|
|
|
|
|
// main_config.sections=yon_section_new(main_config.sections,nm,ct);
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
// main_config.sections->next=NULL;
|
|
|
|
|
// int curtheme=main_config.WindowTheme;
|
|
|
|
|
// for (dictionary *widgetsd=widgetsD->first;widgetsd!=NULL;widgetsd=widgetsd->next){
|
|
|
|
|
// if (strcmp(widgetsd->key,"Gnome")==0){
|
|
|
|
|
// main_config.WindowTheme=1;
|
|
|
|
|
// main_config.currentThemeIconSize=&main_config.Gnomeiconsize;
|
|
|
|
|
// main_config.currentThemeLabelSize=&main_config.GnomelabelSize;
|
|
|
|
|
// }
|
|
|
|
|
// else{
|
|
|
|
|
// main_config.WindowTheme=0;
|
|
|
|
|
// main_config.currentThemeIconSize=&main_config.Mainiconsize;
|
|
|
|
|
// main_config.currentThemeLabelSize=&main_config.MainlabelSize;
|
|
|
|
|
// }
|
|
|
|
|
// widgets=(actionWidgets*)widgetsd->data;
|
|
|
|
|
// for (dictionary *cur=widgets->ICSys->first; cur!=NULL;cur=cur->next){
|
|
|
|
|
// IVGraphicals *IV=cur->data;
|
|
|
|
|
// gtk_container_remove(GTK_CONTAINER(widgets->icvpack),IV->Box);
|
|
|
|
|
// yon_dictionary_rip(cur);
|
|
|
|
|
// }
|
|
|
|
|
// widgets->ICSys=yon_create_icon_section_list(main_config.sections);
|
|
|
|
|
// for (dictionary *cur=widgets->ICSys->first; cur!=NULL;cur=cur->next){
|
|
|
|
|
// yon_icv_resize_item(widgets->ICSys,widgets->GnomePaned);
|
|
|
|
|
// load_apps_with_clear((IVGraphicals*)cur->data,widgets->applist,widgets->appssize);
|
|
|
|
|
// }
|
|
|
|
|
// yon_show_icon_views(widgets->ICSys,widgets);
|
|
|
|
|
// dictionary *yond=yon_dictionary_create_empty();
|
|
|
|
|
// yond->data=widgets;
|
|
|
|
|
// hide_if_unfound(yond);
|
|
|
|
|
// }
|
|
|
|
|
// main_config.WindowTheme=curtheme;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void on_section_delete(GtkWidget *button, actionWidgets *widgets){
|
|
|
|
|
@ -681,38 +542,6 @@ void on_section_delete(GtkWidget *button, actionWidgets *widgets){
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if (dct->prev==NULL&&dct->next==NULL){
|
|
|
|
|
// }else if (dct->next==NULL){
|
|
|
|
|
// dct->prev->next=NULL;
|
|
|
|
|
// }else if (dct->prev==NULL){
|
|
|
|
|
// dct->next->prev=NULL;
|
|
|
|
|
// } else if (dct->prev==NULL){
|
|
|
|
|
// dct->next->prev=NULL;
|
|
|
|
|
// }else {
|
|
|
|
|
// dct->prev->next=dct->next;
|
|
|
|
|
// dct->next->prev=dct->prev;
|
|
|
|
|
// }
|
|
|
|
|
// if (sectionremoval==NULL){
|
|
|
|
|
// removalsize++;
|
|
|
|
|
// sectionremoval=malloc(removalsize*sizeof(char**));
|
|
|
|
|
// char *nm=(char*)gtk_label_get_text(GTK_LABEL(segment->NameLabel));
|
|
|
|
|
// sectionremoval[0]=malloc(strlen(nm));
|
|
|
|
|
// memset(sectionremoval[0],0,strlen(nm));
|
|
|
|
|
// sprintf(sectionremoval[0],"%s",nm);
|
|
|
|
|
// } else {
|
|
|
|
|
// removalsize++;
|
|
|
|
|
// sectionremoval=realloc(sectionremoval,removalsize*sizeof(char**));
|
|
|
|
|
// char *nm=(char*)gtk_label_get_text(GTK_LABEL(segment->NameLabel));
|
|
|
|
|
// sectionremoval[removalsize-1]=malloc(strlen(nm));
|
|
|
|
|
// memset(sectionremoval[removalsize-1],0,strlen(nm));
|
|
|
|
|
// sprintf(sectionremoval[removalsize-1],"%s",nm);
|
|
|
|
|
// }
|
|
|
|
|
// gtk_container_remove(GTK_CONTAINER(widgets->SectionSettingsPack),segment->MainFrame);
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void on_resized (GtkWidget *window, GdkEventConfigure *event, dictionary *widgetsD){
|
|
|
|
|
|