Merge pull request 'master' (#96) from YanTheKaller/ubl-settings-manager:master into master

Reviewed-on: #96
pull/97/head^2 v2.16
Dmitry Razumov 2 months ago
commit 1565bc6c2f

@ -64,7 +64,7 @@ settings_window *yon_settings_window_new(){
}
char *theme_id = NULL;
if (yon_window_config_get_parameter(settings_section,theme_parameter,&theme_id,YON_TYPE_STRING)){
gtk_combo_box_set_active_id(GTK_COMBO_BOX(window->ThemeCombo),theme_id);
gtk_combo_box_set_active_id(GTK_COMBO_BOX(window->ThemeCombo),_(theme_id));
} else {
gtk_combo_box_set_active_id(GTK_COMBO_BOX(window->ThemeCombo),MAIN_THEME_LABEL);
}

@ -12,6 +12,7 @@ void yon_gnome_section_search_show(gnome_section *section, const char *string);
void on_gnome_plug_connected(GtkWidget *,gnome_theme_struct *theme){
gtk_widget_show(theme->SocketBox);
gtk_widget_set_sensitive(theme->AppsTree,1);
gtk_widget_hide(theme->HideBox);
}
@ -34,9 +35,11 @@ void on_gnome_activate(GtkWidget *,GtkListBoxRow *self, gnome_theme_struct *them
char *load_socket = yon_get_load_socket();
char *main_socket_id = yon_char_from_long((long)gtk_socket_get_id(GTK_SOCKET(theme->Socket)));
command_args = launch_args_command(main_socket_id,load_socket,save_socket);
gtk_widget_set_sensitive(theme->AppsTree,0);
} else if (cur_app->Pluggable){
char *main_socket_id = yon_char_from_long((long)gtk_socket_get_id(GTK_SOCKET(theme->Socket)));
command_args = yon_char_unite("--socket-id=",main_socket_id,NULL);
gtk_widget_set_sensitive(theme->AppsTree,0);
}
char *file_param = NULL;

@ -3,7 +3,7 @@
theme_struct *yon_theme_update(main_window *widgets){
char *theme_id;
if (!yon_window_config_get_parameter(settings_section,theme_parameter,&theme_id,YON_TYPE_STRING)||!g_hash_table_contains(main_config.themes,theme_id)){
theme_id = yon_char_new("MAIN_THEME_LABEL");
theme_id = yon_char_new(MAIN_THEME_LABEL);
}
theme_struct *theme = ((theme_struct*(*)())g_hash_table_lookup(main_config.themes,theme_id))();
@ -27,6 +27,6 @@ theme_struct *yon_theme_update(main_window *widgets){
void yon_theme_init(){
// theme_struct *gnome_struct = (theme_struct*)yon_gnome_theme_new();
// theme_struct *main_struct = (theme_struct*)yon_main_theme_new();
g_hash_table_insert(main_config.themes,yon_char_new("GNOME_THEME_LABEL"),yon_gnome_theme_new);
g_hash_table_insert(main_config.themes,yon_char_new("MAIN_THEME_LABEL"),yon_main_theme_new);
g_hash_table_insert(main_config.themes,yon_char_new(GNOME_THEME_LABEL),yon_gnome_theme_new);
g_hash_table_insert(main_config.themes,yon_char_new(MAIN_THEME_LABEL),yon_main_theme_new);
}

@ -6,13 +6,13 @@ void on_reveal_banner(GtkWidget *, main_window *widgets){
if (gtk_revealer_get_reveal_child(GTK_REVEALER(widgets->BannerRevealer))){
gtk_revealer_set_transition_type(GTK_REVEALER(widgets->BannerRevealer),GTK_REVEALER_TRANSITION_TYPE_SLIDE_LEFT);
gtk_revealer_set_reveal_child(GTK_REVEALER(widgets->BannerRevealer),0);
gtk_menu_button_set_direction(GTK_MENU_BUTTON(widgets->BannerArrow),GTK_ARROW_RIGHT);
gtk_image_set_from_icon_name(GTK_IMAGE(widgets->BannerArrow),arrow_right_icon_path,GTK_ICON_SIZE_BUTTON);
int banner = 1;
yon_window_config_add_instant_parameter(hide_banner_parameter,settings_section,&banner,YON_TYPE_BOOLEAN);
} else {
gtk_revealer_set_transition_type(GTK_REVEALER(widgets->BannerRevealer),GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT);
gtk_revealer_set_reveal_child(GTK_REVEALER(widgets->BannerRevealer),1);
gtk_menu_button_set_direction(GTK_MENU_BUTTON(widgets->BannerArrow),GTK_ARROW_LEFT);
gtk_image_set_from_icon_name(GTK_IMAGE(widgets->BannerArrow),arrow_left_icon_path,GTK_ICON_SIZE_BUTTON);
int banner = 0;
yon_window_config_add_instant_parameter(hide_banner_parameter,settings_section,&banner,YON_TYPE_BOOLEAN);
}
@ -214,7 +214,7 @@ main_window *yon_main_window_setup(){
yon_window_config_get_parameter(settings_section,hide_banner_parameter, &banner_hidden,YON_TYPE_BOOLEAN);
gtk_revealer_set_transition_type(GTK_REVEALER(widgets->BannerRevealer),!banner_hidden?GTK_REVEALER_TRANSITION_TYPE_SLIDE_LEFT:GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT);
gtk_revealer_set_reveal_child(GTK_REVEALER(widgets->BannerRevealer),!banner_hidden);
gtk_menu_button_set_direction(GTK_MENU_BUTTON(widgets->BannerArrow),!banner_hidden?GTK_ARROW_LEFT:GTK_ARROW_RIGHT);
gtk_image_set_from_icon_name(GTK_IMAGE(widgets->BannerArrow),arrow_left_icon_path,GTK_ICON_SIZE_BUTTON);
}
gtk_widget_show(widgets->Window);
yon_interface_update(widgets);

@ -43,6 +43,8 @@
#define CssPath "/com/ublinux/css/ubl-settings-manager.css"
#define GlobalConfigPath "/etc/xdg/ubl-settings-manager/ubl-settings-manager.conf"
#define UserConfigPath "/.config/ubl-settings-manager/ubl-settings-manager.conf"
#define arrow_right_icon_path "com.ublinux.libublsettingsui-gtk3.pan-right-symbolic"
#define arrow_left_icon_path "com.ublinux.libublsettingsui-gtk3.pan-left-symbolic"
#define icon_path "com.ublinux.ubl-settings-manager"
#define AppBannerPath "/com/ublinux/images/ubl-settings-manager-banner.png"
#define DesktopPath "/usr/share/applications/"

@ -97,23 +97,10 @@
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<child>
<object class="GtkMenuButton" id="BannerArrow">
<object class="GtkImage" id="BannerArrow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="focus-on-click">False</property>
<property name="receives-default">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="direction">left</property>
<child>
<placeholder/>
</child>
<style>
<class name="thin"/>
<class name="noborder"/>
<class name="nobackground"/>
<class name="instant"/>
</style>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.pan-left-symbolic</property>
</object>
</child>
<style>

Loading…
Cancel
Save