|
|
|
@ -40,7 +40,7 @@ int cmld=0;
|
|
|
|
void on_plug_added(GtkSocket* self, actionWidgets *builder){
|
|
|
|
void on_plug_added(GtkSocket* self, actionWidgets *builder){
|
|
|
|
gtk_widget_show(builder->socketbutton);
|
|
|
|
gtk_widget_show(builder->socketbutton);
|
|
|
|
gtk_widget_show(builder->ThirdSocket);
|
|
|
|
gtk_widget_show(builder->ThirdSocket);
|
|
|
|
printf("Plug has been added!\n");
|
|
|
|
// printf("Plug has been added!\n");
|
|
|
|
gtk_widget_set_vexpand(builder->HideWhileLaunch,0);
|
|
|
|
gtk_widget_set_vexpand(builder->HideWhileLaunch,0);
|
|
|
|
gtk_widget_hide(builder->HideWhileLaunch);
|
|
|
|
gtk_widget_hide(builder->HideWhileLaunch);
|
|
|
|
gtk_widget_set_vexpand(GTK_WIDGET(builder->socketplace),1);
|
|
|
|
gtk_widget_set_vexpand(GTK_WIDGET(builder->socketplace),1);
|
|
|
|
@ -57,7 +57,7 @@ void on_plug_removed(GtkSocket* self, actionWidgets *widgets){
|
|
|
|
gtk_widget_show(widgets->HideWhileLaunch);
|
|
|
|
gtk_widget_show(widgets->HideWhileLaunch);
|
|
|
|
gtk_widget_set_vexpand(widgets->socketplace,0);
|
|
|
|
gtk_widget_set_vexpand(widgets->socketplace,0);
|
|
|
|
gtk_widget_set_vexpand(widgets->HideWhileLaunch,1);
|
|
|
|
gtk_widget_set_vexpand(widgets->HideWhileLaunch,1);
|
|
|
|
printf("Plug has been removed!\n\n\n");
|
|
|
|
// printf("Plug has been removed!\n\n\n");
|
|
|
|
if(widgets->socketbutton)
|
|
|
|
if(widgets->socketbutton)
|
|
|
|
gtk_widget_destroy(widgets->socketbutton);
|
|
|
|
gtk_widget_destroy(widgets->socketbutton);
|
|
|
|
if(widgets->ThirdSocket)
|
|
|
|
if(widgets->ThirdSocket)
|
|
|
|
@ -67,19 +67,19 @@ void on_plug_removed(GtkSocket* self, actionWidgets *widgets){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void on_Item_activated(GtkIconView* self, GtkTreePath* path, actionWidgets *applist){
|
|
|
|
void on_Item_activated(GtkIconView* self, GtkTreePath* path, actionWidgets *applist){
|
|
|
|
printf("\n\n\nActivated\n\n\n");
|
|
|
|
// printf("\n\n\nActivated\n\n\n");
|
|
|
|
GtkTreeIter iter;
|
|
|
|
GtkTreeIter iter;
|
|
|
|
char *name;
|
|
|
|
char *name;
|
|
|
|
gtk_tree_model_get_iter(gtk_icon_view_get_model(self),&iter,path);
|
|
|
|
gtk_tree_model_get_iter(gtk_icon_view_get_model(self),&iter,path);
|
|
|
|
gtk_tree_model_get(gtk_icon_view_get_model(self),&iter,1,&name,-1);
|
|
|
|
gtk_tree_model_get(gtk_icon_view_get_model(self),&iter,1,&name,-1);
|
|
|
|
|
|
|
|
|
|
|
|
apps *tempapp=get_app_by_name(applist->applist,name,applist->appssize);
|
|
|
|
apps *tempapp=get_app_by_name(applist->applist,name,applist->appssize);
|
|
|
|
printf("%s\n",tempapp->Name);
|
|
|
|
// printf("%s\n",tempapp->Name);
|
|
|
|
if (!tempapp){}else{
|
|
|
|
if (!tempapp){}else{
|
|
|
|
char arg[100];
|
|
|
|
char arg[100];
|
|
|
|
printf("%s\n",tempapp->Exec);
|
|
|
|
// printf("%s\n",tempapp->Exec);
|
|
|
|
printf("%d\n",tempapp->Type);
|
|
|
|
// printf("%d\n",tempapp->Type);
|
|
|
|
printf("%d\n",tempapp->Pluggable);
|
|
|
|
// printf("%d\n",tempapp->Pluggable);
|
|
|
|
memset(arg,0,100);
|
|
|
|
memset(arg,0,100);
|
|
|
|
printf("%d\n%d\n\n\n\n",gtk_socket_get_id(GTK_SOCKET(applist->socket)),gtk_socket_get_id(GTK_SOCKET(applist->socketbutton)));
|
|
|
|
printf("%d\n%d\n\n\n\n",gtk_socket_get_id(GTK_SOCKET(applist->socket)),gtk_socket_get_id(GTK_SOCKET(applist->socketbutton)));
|
|
|
|
sprintf(arg,"--socket-id=%d",gtk_socket_get_id(GTK_SOCKET(applist->socket)),gtk_socket_get_id(GTK_SOCKET(applist->socketbutton)));
|
|
|
|
sprintf(arg,"--socket-id=%d",gtk_socket_get_id(GTK_SOCKET(applist->socket)),gtk_socket_get_id(GTK_SOCKET(applist->socketbutton)));
|
|
|
|
@ -184,7 +184,7 @@ int on_settings_accept(GtkWidget *button, dictionary **widgetsDs){
|
|
|
|
else if (main_config.WindowTheme==1)
|
|
|
|
else if (main_config.WindowTheme==1)
|
|
|
|
main_config.curThemeName="Gnome";
|
|
|
|
main_config.curThemeName="Gnome";
|
|
|
|
dictionary *widgetsD=yon_dictionary_find(widgetsDs,main_config.curThemeName);
|
|
|
|
dictionary *widgetsD=yon_dictionary_find(widgetsDs,main_config.curThemeName);
|
|
|
|
printf("Saving config...\n");
|
|
|
|
// printf("Saving config...\n");
|
|
|
|
actionWidgets *widgets=(actionWidgets*)widgetsD->data;
|
|
|
|
actionWidgets *widgets=(actionWidgets*)widgetsD->data;
|
|
|
|
int theme=gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->settingsThemeChooser));
|
|
|
|
int theme=gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->settingsThemeChooser));
|
|
|
|
gtk_window_get_position(GTK_WINDOW(widgets->window),&main_config.windowPosX,&main_config.windowPosY);
|
|
|
|
gtk_window_get_position(GTK_WINDOW(widgets->window),&main_config.windowPosX,&main_config.windowPosY);
|
|
|
|
@ -214,7 +214,7 @@ int on_settings_accept(GtkWidget *button, dictionary **widgetsDs){
|
|
|
|
memset(fromint,0,5);
|
|
|
|
memset(fromint,0,5);
|
|
|
|
GError *err=NULL;
|
|
|
|
GError *err=NULL;
|
|
|
|
char *login=getlogin();
|
|
|
|
char *login=getlogin();
|
|
|
|
if (strcmp(login,"root")==0){
|
|
|
|
if (geteuid()==0){
|
|
|
|
login=main_config.lastUser;
|
|
|
|
login=main_config.lastUser;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
main_config.lastUser=login;
|
|
|
|
main_config.lastUser=login;
|
|
|
|
@ -653,7 +653,7 @@ void on_resized_done (GtkWidget *window, GdkEvent *event, dictionary *widgetsD){
|
|
|
|
void on_about_system(GtkWidget *button, actionWidgets *widgets){
|
|
|
|
void on_about_system(GtkWidget *button, actionWidgets *widgets){
|
|
|
|
char arg[100];
|
|
|
|
char arg[100];
|
|
|
|
memset(arg,0,100);
|
|
|
|
memset(arg,0,100);
|
|
|
|
printf("%d\n%d\n\n\n\n",gtk_socket_get_id(GTK_SOCKET(widgets->socket)),gtk_socket_get_id(GTK_SOCKET(widgets->socketbutton)));
|
|
|
|
// printf("%d\n%d\n\n\n\n",gtk_socket_get_id(GTK_SOCKET(widgets->socket)),gtk_socket_get_id(GTK_SOCKET(widgets->socketbutton)));
|
|
|
|
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)));
|
|
|
|
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)));
|
|
|
|
launch_app_with_arguments("ubl-settings-info",arg);
|
|
|
|
launch_app_with_arguments("ubl-settings-info",arg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -666,7 +666,7 @@ void launch_app_with_arguments(char *name, char *args){
|
|
|
|
char *path=yon_char_get_augumented("/bin/",name);
|
|
|
|
char *path=yon_char_get_augumented("/bin/",name);
|
|
|
|
path=yon_char_get_augumented(path," ");
|
|
|
|
path=yon_char_get_augumented(path," ");
|
|
|
|
path=yon_char_get_augumented(path,args);
|
|
|
|
path=yon_char_get_augumented(path,args);
|
|
|
|
printf("%s\n",path);
|
|
|
|
// printf("%s\n",path);
|
|
|
|
pthread_t thread_id;
|
|
|
|
pthread_t thread_id;
|
|
|
|
pthread_create(&thread_id, NULL, (void*)launch, path);
|
|
|
|
pthread_create(&thread_id, NULL, (void*)launch, path);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
@ -1491,7 +1491,7 @@ int main(int argc, char *argv[]){
|
|
|
|
return -1;
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
local=setlocale(LC_ALL, "");
|
|
|
|
local=setlocale(LC_ALL, "");
|
|
|
|
printf("%s\n\n\n",bindtextdomain (LocaleName, LocalePath));
|
|
|
|
// printf("%s\n\n\n",bindtextdomain (LocaleName, LocalePath));
|
|
|
|
textdomain (LocaleName);
|
|
|
|
textdomain (LocaleName);
|
|
|
|
actionWidgets *widget=malloc(sizeof(actionWidgets));
|
|
|
|
actionWidgets *widget=malloc(sizeof(actionWidgets));
|
|
|
|
dictionary *widgets=yon_dictionary_create_empty();
|
|
|
|
dictionary *widgets=yon_dictionary_create_empty();
|
|
|
|
@ -1559,7 +1559,9 @@ int main(int argc, char *argv[]){
|
|
|
|
main_config.WindowTheme=0;
|
|
|
|
main_config.WindowTheme=0;
|
|
|
|
yon_icv_resize_item(widg->ICSys,widg->GnomePaned);
|
|
|
|
yon_icv_resize_item(widg->ICSys,widg->GnomePaned);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (geteuid()==0){
|
|
|
|
|
|
|
|
gtk_widget_set_sensitive(widg->settingsSectionsSettingsButton,1);
|
|
|
|
|
|
|
|
}
|
|
|
|
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widg->settingsThemeChooser),NULL,_("Standard theme"));
|
|
|
|
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widg->settingsThemeChooser),NULL,_("Standard theme"));
|
|
|
|
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widg->settingsThemeChooser),NULL,_("GNOME theme"));
|
|
|
|
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widg->settingsThemeChooser),NULL,_("GNOME theme"));
|
|
|
|
widg=(actionWidgets*)widgets->data;
|
|
|
|
widg=(actionWidgets*)widgets->data;
|
|
|
|
|