Mode changing !
This commit is contained in:
parent
4d65a51e09
commit
bf6db3fa34
|
@ -262,6 +262,7 @@ static void gem_graph_client_window_init(GemGraphClientWindow *self)
|
|||
|
||||
void uiWindowStackChange(const char *mode)
|
||||
{
|
||||
|
||||
if (window->main_stack == NULL) {
|
||||
g_printerr("Can't find self->main_stack !\n");
|
||||
return;
|
||||
|
@ -276,6 +277,28 @@ void uiWindowStackChange(const char *mode)
|
|||
gtk_stack_set_visible_child_full(window->side_stack,
|
||||
mode,
|
||||
GTK_STACK_TRANSITION_TYPE_CROSSFADE);
|
||||
|
||||
// Switch on the first letter of the mode, because switch is soooo simple :)
|
||||
switch(mode[0]) {
|
||||
case 'e':
|
||||
gtk_menu_button_set_icon_name(window->main_button_mode,
|
||||
"document-edit-symbolic");
|
||||
break;
|
||||
case 'r':
|
||||
gtk_menu_button_set_icon_name(window->main_button_mode,
|
||||
"system-run-symbolic");
|
||||
break;
|
||||
case 'p':
|
||||
gtk_menu_button_set_icon_name(window->main_button_mode,
|
||||
"x-office-presentation-symbolic");
|
||||
break;
|
||||
case 'h':
|
||||
gtk_menu_button_set_icon_name(window->main_button_mode,
|
||||
"user-home-symbolic");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void uiWindowSendNotification(const char *message)
|
||||
|
|
Loading…
Reference in New Issue