|
|
|
|
@ -122,7 +122,6 @@ void on_gnome_Item_activated(GtkIconView* self, GtkTreePath* path, actionWidgets
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
on_about_system(NULL,applist);
|
|
|
|
|
launch_app(tempapp[0].Exec);
|
|
|
|
|
gtk_widget_destroy(applist->socketbutton);
|
|
|
|
|
}
|
|
|
|
|
@ -275,8 +274,8 @@ void on_paned_move(GtkPaned* self, GtkScrollType* scroll_type, actionWidgets *wi
|
|
|
|
|
int position=gtk_paned_get_position(GTK_PANED(widgets->GnomePaned));
|
|
|
|
|
if (position<200) {position=200; gtk_paned_set_position(GTK_PANED(widgets->GnomePaned),200);}
|
|
|
|
|
main_config.iconSegmentSize=position;
|
|
|
|
|
if (position <70) {position=70;}
|
|
|
|
|
double pos=((double)position);
|
|
|
|
|
// if (position <70) {position=70;}
|
|
|
|
|
double pos=((double)position-35);
|
|
|
|
|
if (pos<70) pos=70;
|
|
|
|
|
for (dictionary *dict=widgets->ICSys;dict!=NULL;dict=dict->next){
|
|
|
|
|
IVGraphicals *IV=(IVGraphicals*)dict->data;
|
|
|
|
|
@ -304,7 +303,7 @@ int on_settingsOpen(GtkWidget *button, actionWidgets *widgets){
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(widgets->settingsSizeInfoLabel),tmp);
|
|
|
|
|
gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->settingsIcon),gtk_icon_info_load_icon(gtk_icon_theme_lookup_icon_for_scale(icthm, AppIconPath,yon_get_icon_size(*main_config.currentThemeIconSize),1,GTK_ICON_LOOKUP_FORCE_SVG),NULL));
|
|
|
|
|
|
|
|
|
|
gtk_window_present(GTK_WINDOW(widgets->SettingsWindow));
|
|
|
|
|
gtk_window_present(GTK_WINDOW(widgets->SettingsWindow));
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
int on_settings_icon_size_changed(GtkWidget* self, actionWidgets *widgets){
|
|
|
|
|
@ -368,7 +367,7 @@ void on_section_settings_open(GtkButton* self,dictionary *cWidgets){
|
|
|
|
|
dict=dict->prev;
|
|
|
|
|
dict->next=NULL;
|
|
|
|
|
}
|
|
|
|
|
gtk_widget_show(widgets->SectionSettingsWindow);
|
|
|
|
|
gtk_window_present(GTK_WINDOW(widgets->SectionSettingsWindow));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void on_sections_edit(GtkWidget *button, actionWidgets *widgets){
|
|
|
|
|
@ -672,18 +671,7 @@ void on_resized_done (GtkWidget *window, GdkEvent *event, dictionary *widgetsD){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void on_about_system(GtkWidget *button, actionWidgets *widgets){
|
|
|
|
|
char arg[100];
|
|
|
|
|
memset(arg,0,100);
|
|
|
|
|
gtk_widget_show(widgets->socketbuttonplace);
|
|
|
|
|
if (button){
|
|
|
|
|
gtk_widget_hide(widgets->appSettings);
|
|
|
|
|
sprintf(arg,"--socket-id=%d --socket-ext-id=%d",gtk_socket_get_id(GTK_SOCKET(widgets->socket)),gtk_socket_get_id(GTK_SOCKET(widgets->socketbutton)));
|
|
|
|
|
}else{
|
|
|
|
|
sprintf(arg,"--socket-id=%d",gtk_socket_get_id(GTK_SOCKET(widgets->socket)));
|
|
|
|
|
}
|
|
|
|
|
launch_app_with_arguments("ubl-settings-info",arg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void on_theme_selection_changed(GtkWidget *self, actionWidgets *widgets){
|
|
|
|
|
int *icsize;
|
|
|
|
|
@ -1614,7 +1602,7 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
|
|
|
|
|
|
|
|
|
|
gtk_style_context_add_class(gtk_widget_get_style_context(curWidgets->icvpack),"iconview");
|
|
|
|
|
curWidgets->socket=GTK_WIDGET(create_socket(curWidgets));
|
|
|
|
|
g_signal_connect(G_OBJECT(curWidgets->MenuItemAboutSystem), "activate", G_CALLBACK(on_about_system),curWidgets);
|
|
|
|
|
// g_signal_connect(G_OBJECT(curWidgets->MenuItemAboutSystem), "activate", G_CALLBACK(on_about_system),curWidgets);
|
|
|
|
|
if (curWidgets->ButtonBackToMain!=NULL)
|
|
|
|
|
gtk_button_set_label(GTK_BUTTON(curWidgets->ButtonBackToMain),_("Back to all settings"));
|
|
|
|
|
gtk_window_set_title(GTK_WINDOW(curWidgets->window),_("UBLinux Settings Manager"));
|
|
|
|
|
@ -1625,7 +1613,7 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
|
|
|
|
|
}
|
|
|
|
|
g_signal_connect(G_OBJECT(curWidgets->window), "configure-event", G_CALLBACK(on_resized), widgets);
|
|
|
|
|
if (strcmp(theme_id,"Gnome")==0){
|
|
|
|
|
on_about_system(NULL,curWidgets);
|
|
|
|
|
// on_about_system(NULL,curWidgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(curWidgets->window), "event-after", G_CALLBACK(on_resized_done), widgets);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
@ -1653,6 +1641,7 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
|
|
|
|
|
curWidgets->settingsCancel=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"settingsCancel"));
|
|
|
|
|
curWidgets->settingsSubmenuLabelSize=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"settingsSubmenuLabelSize"));
|
|
|
|
|
curWidgets->settingsSubmenuLabelTheme=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"settingsSubmenuLabelTheme"));
|
|
|
|
|
curWidgets->settingsSectionsSettingsButton=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"settingsSectionsSettingsButton"));
|
|
|
|
|
curWidgets->SectionSettingAddButton=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"SectionSettingsAddButton"));
|
|
|
|
|
curWidgets->SectionSettingAddNameEntry=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"SectionSettingsAddNameEntry"));
|
|
|
|
|
curWidgets->SectionSettingAddCategoriesEntry=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"SectionSettingsAddCategoriesEntry"));
|
|
|
|
|
@ -1662,6 +1651,8 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
|
|
|
|
|
curWidgets->CautionWindow=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"CautionWindow"));
|
|
|
|
|
curWidgets->CautionUnderstandButton=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"CautionUnderstandButton"));
|
|
|
|
|
curWidgets->infoWarningWindow=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"windowSettings-infoWarning"));
|
|
|
|
|
curWidgets->infoWarningButton=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"buttonSettings-infoWarning"));
|
|
|
|
|
curWidgets->infoWarningLabel=GTK_WIDGET(gtk_builder_get_object(curWidgets->builder,"labelSettings-infoWarning"));
|
|
|
|
|
curWidgets->applist=applist;
|
|
|
|
|
curWidgets->appssize=appsize;
|
|
|
|
|
GtkIconTheme *icthm=gtk_icon_theme_get_default();
|
|
|
|
|
@ -1685,9 +1676,12 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
|
|
|
|
|
g_signal_connect(G_OBJECT(curWidgets->SectionSettingsCloseButton), "clicked", G_CALLBACK(on_sections_close), curWidgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(curWidgets->SectionSettingsSaveButton), "clicked", G_CALLBACK(on_sections_save), curWidgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(curWidgets->CautionUnderstandButton), "clicked", G_CALLBACK(on_caution_understand), curWidgets);
|
|
|
|
|
// g_signal_connect(G_OBJECT(curWidgets->infoWarningButton), "clicked", G_CALLBACK(on_info_warning_closed), curWidgets);
|
|
|
|
|
g_signal_connect(G_OBJECT(curWidgets->settingsSectionsSettingsButton), "clicked", G_CALLBACK(on_section_settings_open), widgets);
|
|
|
|
|
}
|
|
|
|
|
g_signal_connect(G_OBJECT(curWidgets->window), "destroy", G_CALLBACK(yon_main_quit), curWidgets);
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(curWidgets->LabelTitle),_("UBLinux Settings Manager"));
|
|
|
|
|
// gtk_label_set_text(GTK_LABEL(curWidgets->infoWarningLabel),_("Looks like you don't have ubl-settings-info installed on your PC."));
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(curWidgets->settingsSubmenuLabelSize),_("Icon size"));
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(curWidgets->settingsSubmenuLabelTheme),_("Window theme"));
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(curWidgets->helpHeader),_("Would you like to read documentation in the Web?"));
|
|
|
|
|
@ -1699,8 +1693,9 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them
|
|
|
|
|
gtk_button_set_label(GTK_BUTTON(curWidgets->AlwaysOpenDocumentation),_("Always redirect"));
|
|
|
|
|
gtk_menu_item_set_label(GTK_MENU_ITEM(curWidgets->MenuItemSettings),_("Settings"));
|
|
|
|
|
gtk_menu_item_set_label(GTK_MENU_ITEM(curWidgets->MenuItemDocumentation),_("About..."));
|
|
|
|
|
gtk_menu_item_set_label(GTK_MENU_ITEM(curWidgets->MenuItemAboutSystem),_("About system"));
|
|
|
|
|
// gtk_menu_item_set_label(GTK_MENU_ITEM(curWidgets->MenuItemAboutSystem),_("About system"));
|
|
|
|
|
gtk_button_set_label(GTK_BUTTON(curWidgets->CautionUnderstandButton),_("Understood"));
|
|
|
|
|
gtk_button_set_label(GTK_BUTTON(curWidgets->settingsSectionsSettingsButton),_("Sections management"));
|
|
|
|
|
return widgets;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -1712,7 +1707,8 @@ int main(int argc, char *argv[]){
|
|
|
|
|
}
|
|
|
|
|
local=setlocale(LC_ALL, "");
|
|
|
|
|
textdomain (LocaleName);
|
|
|
|
|
actionWidgets *widget=malloc(sizeof(actionWidgets));
|
|
|
|
|
actionWidgets *widget=NULL;
|
|
|
|
|
widget=malloc(sizeof(actionWidgets));
|
|
|
|
|
dictionary *widgets=yon_dictionary_create_empty();
|
|
|
|
|
widgets->data=widget;
|
|
|
|
|
int *size=malloc(sizeof(int));
|
|
|
|
|
|