diff --git a/source/ubinstall-gtk-components.c b/source/ubinstall-gtk-components.c index 0407c06..413b5f5 100644 --- a/source/ubinstall-gtk-components.c +++ b/source/ubinstall-gtk-components.c @@ -191,7 +191,7 @@ os_row *yon_os_row_new(){ row->RowBox = yon_gtk_builder_get_widget(builder,"TableRow"); row->InstallCheck = yon_gtk_builder_get_widget(builder,"InstallCheck"); row->NameLabel = yon_gtk_builder_get_widget(builder,"NameLabel"); - row->NameEvent = yon_gtk_builder_get_widget(builder,"NameEvent"); + row->RowOverlay = yon_gtk_builder_get_widget(builder,"RowOverlay"); row->TagsBox = yon_gtk_builder_get_widget(builder,"TagsBox"); row->VersionLabel = yon_gtk_builder_get_widget(builder,"VersionLabel"); row->DescriptionLabel = yon_gtk_builder_get_widget(builder,"DescriptionLabel"); @@ -201,7 +201,8 @@ os_row *yon_os_row_new(){ row->modules=NULL; row->version=NULL; - g_signal_connect(G_OBJECT(row->NameEvent),"button-press-event",G_CALLBACK(on_os_components_info),row); + gtk_overlay_add_overlay(GTK_OVERLAY(row->RowOverlay),row->NameLabel); + g_signal_connect(G_OBJECT(row->NameLabel),"activate-link",G_CALLBACK(on_os_components_info),row); row->row = yon_gtk_builder_get_widget(builder,"MainRow"); gtk_widget_show(row->row); g_object_set_data(G_OBJECT(row->InstallCheck),"kernel_row",row); diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index bb6fdc0..c8705de 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -1029,10 +1029,6 @@ main_window *yon_main_window_complete(){ } int main(int argc, char *argv[]){ - GApplication *app = (GApplication*)gtk_application_new("com.ublinux.ubinstall-gtk",G_APPLICATION_DEFAULT_FLAGS); - GError *err = NULL; - int reg = g_application_register(app,NULL,&err); - int remote = g_application_get_is_remote(app); main_config.argv=argv; main_config.argc = argc; config_str unfound = NULL; @@ -1042,25 +1038,6 @@ int main(int argc, char *argv[]){ textdomain(LocaleName); config_init(); gtk_init(&argc,&argv); - - if (!reg||remote){ - yon_window *window = yon_window_new(); - gtk_widget_set_size_request(window->Window,300,125); - yon_gtk_window_setup(GTK_WINDOW(window->Window),NULL,WARNING_TITLE_LABEL,icon_path,NULL); - GtkWidget *box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5); - GtkWidget *image = gtk_image_new(); - GtkWidget *label = gtk_label_new(ALREADY_RUNNING_LABEL); - gtk_image_set_from_icon_name(GTK_IMAGE(image),warning_icon_path,0); - gtk_image_set_pixel_size(GTK_IMAGE(image),48); - gtk_box_pack_start(GTK_BOX(box),image,1,1,0); - gtk_box_pack_start(GTK_BOX(box),label,1,1,0); - gtk_box_pack_start(GTK_BOX(window->MainBox),box,1,1,0); - gtk_widget_show_all(box); - g_signal_connect(G_OBJECT(window->Window),"destroy",G_CALLBACK(gtk_main_quit),NULL); - gtk_widget_show(window->Window); - gtk_main(); - exit(1); - } yon_ubl_window_init(TITLE_LABEL,"",LocaleName,CssPath,LocaleName,version_application,WIKI_LINK); yon_ubl_setup_arguments(argc,argv,&unfound,&size,ADDITIONAL_ARGS); if (size) { diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index fae96a2..7d9a6e4 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -128,6 +128,8 @@ #define network_value(ip, mask, gateway, dns) g_strdup_printf("ipv4.method manual ipv4.addr %s/%s ipv4.gateway %s ipv4.dns %s", ip, mask, gateway, dns) #define network_value_auto "ipv4.method auto" +#define check_open_command "command -v wmctrl &>/dev/null && command -v xdotool &>/dev/null && UBLPID=$(pidof ubinstall-gtk) && wmctrl -i -a $(xdotool search --pid ${UBLPID} | tail -1)" + #define get_layouts_command "xkbcli list --load-exotic | awk \"\ layout && /description:/ {\ match(\\$0, /: *(.*)/, matches);\ @@ -1062,7 +1064,7 @@ typedef struct char *version; char *tags; char *description; - GtkWidget *NameEvent; + GtkWidget *RowOverlay; } os_row; typedef struct diff --git a/ubinstall-gtk-os-row.glade b/ubinstall-gtk-os-row.glade index 6234eee..ddb91a1 100644 --- a/ubinstall-gtk-os-row.glade +++ b/ubinstall-gtk-os-row.glade @@ -16,51 +16,60 @@ 1 5 - + True - True - False + False 5 10 3 5 - True - + True - False - 5 - 5 + True + False + True True False - 1 - vertical + 5 5 True False - 7 + 1 + vertical + 5 - + True False - True + 7 - + True - True - Name - 0 - False - 0 - - - + False + center + start + 3 + 5 + 2 + + + + + False + True + end + 2 + + False @@ -69,69 +78,58 @@ - + True False - center - start - 3 - 5 - 2 - - - False True - end - 2 + 1 - - - - False - True - 0 - - - - - True - False - - - False - True - 1 - - - - - True - False - 5 True False - start - vertical 5 True False + start + vertical 5 - + True False - Source: - 0 + 5 + + + True + False + Source: + 0 + + + False + True + 0 + + + + + True + False + 0 + + + False + True + 1 + + False @@ -140,79 +138,105 @@ - - True - False - 0 - - - False - True - 1 - - - - - False - True - 0 - - - - - True - False - start - 5 - - + True False - Version: - 0 + start + 5 + + + True + False + Version: + 0 + + + True + True + 0 + + + + + True + False + start + True + False + 0 + + + False + True + 1 + + True True - 0 + 1 - + True False start - True - False - 0 + 5 + + + True + False + Description + True + 0 + 0 + + + False + True + 0 + + + + + True + False + + + False + True + 1 + + - False + True True - 1 + 2 - True + False True - 1 + 0 True False - start + start 5 - + True False - Description - True + start + Size: 0 - 0 False @@ -221,9 +245,10 @@ - + True False + 0 False @@ -232,48 +257,10 @@ - - True - True - 2 - - - - - False - True - 0 - - - - - True - False - start - 5 - - - True - False - start - Size: - 0 - - - False - True - 0 - - - - - True - False - 0 - False True + end 1 @@ -281,25 +268,22 @@ False True - end - 1 + 2 - False + True True - 2 + 0 - - True - True - 0 - + + -1 + @@ -315,4 +299,17 @@ + + True + True + start + 20 + Name + 0 + False + 0 + + + +