~tristan957/harvest-almanac

8cf9740ee44cf6327c197097dd2262720be72a4e — Tristan Partin 1 year, 11 months ago 44f7d94
harvest-almanac: completed first step to adjusting profile workflow
3 files changed, 189 insertions(+), 12 deletions(-)

M data/ui/hal-profile.ui
M data/ui/hal-window.ui
M harvest-almanac/hal-window.c
M data/ui/hal-profile.ui => data/ui/hal-profile.ui +4 -4
@@ 1,7 1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Generated with glade 3.22.1 -->
<interface>
  <requires lib="gtk+" version="3.20"/>
  <requires lib="gtk+" version="3.20" />
  <template class="HalProfile" parent="GtkStack">
    <property name="visible">True</property>
    <property name="can_focus">False</property>


@@ 54,7 54,7 @@
            <property name="valign">center</property>
            <property name="hexpand">True</property>
            <property name="vexpand">True</property>
            <property name="pixel_size">175</property>
            <property name="pixel_size">50</property>
            <property name="icon_name">user-info-symbolic</property>
            <property name="icon_size">6</property>
          </object>


@@ 142,7 142,7 @@
                <property name="label" translatable="yes">Tristan Partin</property>
                <property name="xalign">0</property>
                <attributes>
                  <attribute name="scale" value="1.5"/>
                  <attribute name="scale" value="1.5" />
                </attributes>
              </object>
              <packing>

M data/ui/hal-window.ui => data/ui/hal-window.ui +183 -2
@@ 80,6 80,62 @@
      </packing>
    </child>
  </object>
  <object class="GtkPopoverMenu" id="account_popover">
    <property name="can_focus">False</property>
    <child>
      <object class="GtkBox">
        <property name="visible">True</property>
        <property name="can_focus">False</property>
        <property name="margin_left">3</property>
        <property name="margin_right">3</property>
        <property name="margin_top">3</property>
        <property name="margin_bottom">3</property>
        <property name="orientation">vertical</property>
        <child>
          <object class="GtkModelButton">
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
            <property name="action_name">app.view-account-details</property>
            <property name="text" translatable="yes">Details</property>
          </object>
          <packing>
            <property name="expand">False</property>
            <property name="fill">True</property>
            <property name="position">0</property>
          </packing>
        </child>
        <child>
          <object class="GtkSeparator">
            <property name="visible">True</property>
            <property name="can_focus">False</property>
          </object>
          <packing>
            <property name="expand">False</property>
            <property name="fill">True</property>
            <property name="position">1</property>
          </packing>
        </child>
        <child>
          <object class="GtkModelButton">
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
            <property name="action_name">app.logout</property>
            <property name="text" translatable="yes">Logout</property>
          </object>
          <packing>
            <property name="expand">False</property>
            <property name="fill">True</property>
            <property name="position">2</property>
          </packing>
        </child>
      </object>
      <packing>
        <property name="submenu">main</property>
      </packing>
    </child>
  </object>
  <template class="HalWindow" parent="GtkApplicationWindow">
    <property name="title">Harvest Almanac</property>
    <property name="can_focus">False</property>


@@ 180,11 236,136 @@
        <property name="mode_transition_type">slide</property>
        <property name="child_transition_type">slide</property>
        <child>
          <object class="GtkStackSidebar" id="sidebar">
          <object class="GtkBox" id="sidebar">
            <property name="width_request">270</property>
            <property name="visible">True</property>
            <property name="can_focus">False</property>
            <property name="stack">stack</property>
            <property name="orientation">vertical</property>
            <property name="hexpand">False</property>
            <child>
              <object class="GtkBox">
                <property name="visible">True</property>
                <property name="can_focus">False</property>
                <property name="valign">start</property>
                <property name="vexpand">False</property>
                <property name="margin_left">15</property>
                <property name="margin_right">15</property>
                <property name="margin_top">15</property>
                <property name="margin_bottom">15</property>
                <property name="spacing">15</property>
                <child>
                  <object class="GtkImage">
                    <property name="visible">True</property>
                    <property name="can_focus">False</property>
                    <property name="pixel_size">40</property>
                    <property name="icon_name">user-info-symbolic</property>
                  </object>
                  <packing>
                    <property name="expand">False</property>
                    <property name="fill">True</property>
                    <property name="position">0</property>
                  </packing>
                </child>
                <child>
                  <object class="GtkBox">
                    <property name="visible">True</property>
                    <property name="can_focus">False</property>
                    <property name="orientation">vertical</property>
                    <property name="spacing">3</property>
                    <child>
                      <object class="GtkLabel">
                        <property name="visible">True</property>
                        <property name="can_focus">False</property>
                        <property name="valign">end</property>
                        <property name="vexpand">True</property>
                        <property name="label" translatable="yes">Tristan Partin</property>
                        <property name="xalign">0</property>
                      </object>
                      <packing>
                        <property name="expand">False</property>
                        <property name="fill">True</property>
                        <property name="position">0</property>
                      </packing>
                    </child>
                    <child>
                      <object class="GtkLabel">
                        <property name="visible">True</property>
                        <property name="can_focus">False</property>
                        <property name="valign">start</property>
                        <property name="vexpand">True</property>
                        <property name="label" translatable="yes">Expero, Inc.</property>
                        <property name="xalign">0</property>
                      </object>
                      <packing>
                        <property name="expand">False</property>
                        <property name="fill">True</property>
                        <property name="position">1</property>
                      </packing>
                    </child>
                  </object>
                  <packing>
                    <property name="expand">False</property>
                    <property name="fill">True</property>
                    <property name="position">1</property>
                  </packing>
                </child>
                <child>
                  <object class="GtkMenuButton">
                    <property name="visible">True</property>
                    <property name="can_focus">True</property>
                    <property name="receives_default">True</property>
                    <property name="valign">center</property>
                    <property name="popover">account_popover</property>
                    <child>
                      <object class="GtkImage">
                        <property name="visible">True</property>
                        <property name="can_focus">False</property>
                        <property name="icon_name">view-more-symbolic</property>
                      </object>
                    </child>
                    <style>
                      <class name="flat" />
                    </style>
                  </object>
                  <packing>
                    <property name="expand">False</property>
                    <property name="fill">True</property>
                    <property name="pack_type">end</property>
                    <property name="position">2</property>
                  </packing>
                </child>
              </object>
              <packing>
                <property name="expand">False</property>
                <property name="fill">False</property>
                <property name="position">0</property>
              </packing>
            </child>
            <child>
              <object class="GtkSeparator">
                <property name="visible">True</property>
                <property name="can_focus">False</property>
                <property name="orientation">vertical</property>
                <style>
                  <class name="sidebar" />
                </style>
              </object>
              <packing>
                <property name="position">1</property>
              </packing>
            </child>
            <child>
              <object class="GtkStackSidebar" id="stack_sidebar">
                <property name="visible">True</property>
                <property name="can_focus">False</property>
                <property name="stack">stack</property>
              </object>
              <packing>
                <property name="expand">True</property>
                <property name="fill">True</property>
                <property name="position">2</property>
              </packing>
            </child>
          </object>
          <packing>
            <property name="name">sidebar</property>

M harvest-almanac/hal-window.c => harvest-almanac/hal-window.c +2 -6
@@ 22,8 22,8 @@ typedef struct HalWindowPrivate
	HdyLeaflet *header_leaflet;
	GtkHeaderBar *header_bar;
	GtkHeaderBar *sub_header_bar;
	GtkStackSidebar *stack_sidebar;
	GtkStack *stack;
	GtkStackSidebar *sidebar;
	GtkButton *back_button;
	HalTimeTracker *time_tracker;
	HalProfile *profile;


@@ 131,8 131,8 @@ hal_window_class_init(HalWindowClass *klass)
	gtk_widget_class_bind_template_child_private(wid_class, HalWindow, header_leaflet);
	gtk_widget_class_bind_template_child_private(wid_class, HalWindow, header_bar);
	gtk_widget_class_bind_template_child_private(wid_class, HalWindow, sub_header_bar);
	gtk_widget_class_bind_template_child_private(wid_class, HalWindow, stack_sidebar);
	gtk_widget_class_bind_template_child_private(wid_class, HalWindow, stack);
	gtk_widget_class_bind_template_child_private(wid_class, HalWindow, sidebar);
	gtk_widget_class_bind_template_child_private(wid_class, HalWindow, back_button);
	gtk_widget_class_bind_template_callback(wid_class, header_leaflet_notify_fold_cb);
	gtk_widget_class_bind_template_callback(wid_class, header_leaflet_notify_visible_child_cb);


@@ 152,10 152,6 @@ hal_window_init(HalWindow *self)

	gtk_stack_add_titled(priv->stack, GTK_WIDGET(priv->profile), "profile", "Profile");
	gtk_stack_add_titled(priv->stack, GTK_WIDGET(priv->time_tracker), "time-tracker", "Time");
	gtk_container_child_set(GTK_CONTAINER(priv->stack), GTK_WIDGET(priv->profile), "icon-name",
		"user-info-symbolic", NULL);
	gtk_container_child_set(GTK_CONTAINER(priv->stack), GTK_WIDGET(priv->time_tracker), "icon-name",
		"document-open-recent-symbolic", NULL);

	update_header_bar_title(self);