window.c: first hello in a box
This commit is contained in:
parent
d3a64462db
commit
d353bf1188
|
@ -128,3 +128,5 @@ void onTreeViewRowActivated (GtkTreeView *view, GtkTreePath *path,
|
|||
|
||||
void tree_c_test(void);
|
||||
|
||||
GtkWidget *create_tree_label(void);
|
||||
|
||||
|
|
|
@ -32,8 +32,6 @@
|
|||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
tree_c_test();
|
||||
|
||||
g_autoptr(GemGraphClientApplication) app = NULL;
|
||||
int res;
|
||||
|
||||
|
|
|
@ -81,15 +81,6 @@
|
|||
<property name="child">
|
||||
<object class="GtkBox" id="runlib_objects">
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label_runlib_objects">
|
||||
<property name="justify">center</property>
|
||||
<property name="label" translatable="yes"><b>Here must be a label (then a tree)</b></property>
|
||||
<property name="use-markup">True</property>
|
||||
<property name="margin-top">50</property>
|
||||
<property name="margin-bottom">50</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
|
|
|
@ -119,12 +119,22 @@ void ui_set_stack(const char *mode)
|
|||
|
||||
// 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_paned_set_position(window->main_paned, 0);
|
||||
gtk_menu_button_set_icon_name(window->main_button_mode, "user-home-symbolic"); break;
|
||||
default: break;
|
||||
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");
|
||||
create_tree_label();
|
||||
break;
|
||||
case 'p':
|
||||
gtk_menu_button_set_icon_name(window->main_button_mode, "x-office-presentation-symbolic");
|
||||
break;
|
||||
case 'h':
|
||||
gtk_paned_set_position(window->main_paned, 0);
|
||||
gtk_menu_button_set_icon_name(window->main_button_mode, "user-home-symbolic");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -220,3 +230,16 @@ void ui_toggle_sidebar(void)
|
|||
else gtk_paned_set_position(window->main_paned, 400);
|
||||
}
|
||||
|
||||
GtkWidget *create_tree_label(void)
|
||||
{
|
||||
GtkWidget *label, *slider;
|
||||
GtkAdjustment *adj;
|
||||
const char *text = "HELLO !";
|
||||
|
||||
label = gtk_label_new(text);
|
||||
gtk_box_append(GTK_BOX(window->runlib_objects), label);
|
||||
gtk_widget_show(label);
|
||||
|
||||
return label;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue