Commit 3ff5596a authored by Avi Wadhwa's avatar Avi Wadhwa
Browse files

fix sidebar position in stack 2

parent 3d7f628a
No preview for this file type
# ninja log v5
0 14 1549003787 src/organizer.gresource 78c4809cb7171ed0
1 1198 1547124836 data/org.gnome.Organizer.appdata.xml d5833cf89d9d45a7
1 1229 1547124836 data/org.gnome.Organizer.desktop 5eef453bac4365cd
0 2043 0 meson-install 9bd7faa9472bf40f
0 38 1549015121 src/organizer.gresource 78c4809cb7171ed0
1 2553 0 meson-install 9bd7faa9472bf40f
0 37 1549015309 src/organizer.gresource 78c4809cb7171ed0
0 2200 0 meson-install 9bd7faa9472bf40f
0 1775 0 meson-install 9bd7faa9472bf40f
0 1939 0 meson-install 9bd7faa9472bf40f
0 1679 0 meson-install 9bd7faa9472bf40f
0 19 1549022780 src/organizer.gresource 78c4809cb7171ed0
0 2068 0 meson-install 9bd7faa9472bf40f
1 144 1549027139 src/organizer.gresource 78c4809cb7171ed0
0 2188 0 meson-install 9bd7faa9472bf40f
0 1577 0 meson-install 9bd7faa9472bf40f
1 1535 0 meson-install 9bd7faa9472bf40f
0 1506 0 meson-install 9bd7faa9472bf40f
0 17 1549027401 src/organizer.gresource 78c4809cb7171ed0
0 1499 0 meson-install 9bd7faa9472bf40f
0 80 1549028261 src/organizer.gresource 78c4809cb7171ed0
0 2208 0 meson-install 9bd7faa9472bf40f
0 1540 0 meson-install 9bd7faa9472bf40f
0 2131 0 meson-install 9bd7faa9472bf40f
0 1498 0 meson-install 9bd7faa9472bf40f
0 1484 0 meson-install 9bd7faa9472bf40f
0 1511 0 meson-install 9bd7faa9472bf40f
0 1489 0 meson-install 9bd7faa9472bf40f
0 1467 0 meson-install 9bd7faa9472bf40f
0 1526 0 meson-install 9bd7faa9472bf40f
0 1508 0 meson-install 9bd7faa9472bf40f
0 1522 0 meson-install 9bd7faa9472bf40f
0 1465 0 meson-install 9bd7faa9472bf40f
0 1465 0 meson-install 9bd7faa9472bf40f
0 1474 0 meson-install 9bd7faa9472bf40f
0 1464 0 meson-install 9bd7faa9472bf40f
0 1457 0 meson-install 9bd7faa9472bf40f
0 18 1549080980 src/organizer.gresource 78c4809cb7171ed0
1 1198 1547124836 data/org.gnome.Organizer.appdata.xml d5833cf89d9d45a7
0 1555 0 meson-install 9bd7faa9472bf40f
0 1425 0 meson-install 9bd7faa9472bf40f
0 1460 0 meson-install 9bd7faa9472bf40f
0 17 1549030586 src/organizer.gresource 78c4809cb7171ed0
0 1542 0 meson-install 9bd7faa9472bf40f
0 1695 0 meson-install 9bd7faa9472bf40f
0 1605 0 meson-install 9bd7faa9472bf40f
0 1579 0 meson-install 9bd7faa9472bf40f
0 1513 0 meson-install 9bd7faa9472bf40f
0 1560 0 meson-install 9bd7faa9472bf40f
0 1709 0 meson-install 9bd7faa9472bf40f
0 1586 0 meson-install 9bd7faa9472bf40f
0 2514 0 meson-install 9bd7faa9472bf40f
0 1612 0 meson-install 9bd7faa9472bf40f
1 1480 0 meson-install 9bd7faa9472bf40f
0 1619 0 meson-install 9bd7faa9472bf40f
0 1579 0 meson-install 9bd7faa9472bf40f
0 1663 0 meson-install 9bd7faa9472bf40f
0 1561 0 meson-install 9bd7faa9472bf40f
0 68 1549042223 src/organizer.gresource 78c4809cb7171ed0
0 1789 0 meson-install 9bd7faa9472bf40f
0 19 1549042556 src/organizer.gresource 78c4809cb7171ed0
0 1834 0 meson-install 9bd7faa9472bf40f
0 1652 0 meson-install 9bd7faa9472bf40f
0 22 1549043605 src/organizer.gresource 78c4809cb7171ed0
0 1529 0 meson-install 9bd7faa9472bf40f
1 1543 0 meson-install 9bd7faa9472bf40f
0 1464 0 meson-install 9bd7faa9472bf40f
0 1523 0 meson-install 9bd7faa9472bf40f
0 1494 0 meson-install 9bd7faa9472bf40f
0 1479 0 meson-install 9bd7faa9472bf40f
0 1464 0 meson-install 9bd7faa9472bf40f
0 42 1549077850 src/organizer.gresource 78c4809cb7171ed0
0 2010 0 meson-install 9bd7faa9472bf40f
0 1609 0 meson-install 9bd7faa9472bf40f
0 1441 0 meson-install 9bd7faa9472bf40f
0 1486 0 meson-install 9bd7faa9472bf40f
0 1454 0 meson-install 9bd7faa9472bf40f
0 1518 0 meson-install 9bd7faa9472bf40f
0 1559 0 meson-install 9bd7faa9472bf40f
0 1567 0 meson-install 9bd7faa9472bf40f
0 1537 0 meson-install 9bd7faa9472bf40f
0 1511 0 meson-install 9bd7faa9472bf40f
0 1476 0 meson-install 9bd7faa9472bf40f
0 1564 0 meson-install 9bd7faa9472bf40f
0 15 1549087379 src/organizer.gresource 78c4809cb7171ed0
0 1409 0 meson-install 9bd7faa9472bf40f
0 14 1549087471 src/organizer.gresource 78c4809cb7171ed0
0 1424 0 meson-install 9bd7faa9472bf40f
0 15 1549087612 src/organizer.gresource 78c4809cb7171ed0
0 1394 0 meson-install 9bd7faa9472bf40f
0 15 1549087636 src/organizer.gresource 78c4809cb7171ed0
0 1419 0 meson-install 9bd7faa9472bf40f
......@@ -32,20 +32,16 @@ folders = [
os.path.expanduser('~'),
]
#@GtkTemplate("/org/gnome/Organizer/row.ui")
#class file_row(Gtk.ListBoxRow):
# file_row = GtkTemplate.Child()
# filename_label = GtkTemplate.Child()
# def filerow(self, name):
# self.filename_label.set_text(name)
# return(file_row)
@GtkTemplate("/org/gnome/Organizer/window.ui")
class OrganizerWindow(Gtk.ApplicationWindow):
# initializing widgets to be used later
gtk_stack = GtkTemplate.Child()
stack_2 = GtkTemplate.Child()
go_back = GtkTemplate.Child()
start_screen = GtkTemplate.Child()
all_scrolled = GtkTemplate.Child()
all_location_list = GtkTemplate.Child()
__gtype_name__ = 'OrganizerWindow'
......@@ -53,11 +49,24 @@ class OrganizerWindow(Gtk.ApplicationWindow):
super().__init__(**kwargs)
self.init_template()
# Back Button
def go_back_clicked_cb(self, button):
#TODO map this to Alt+left keyboard shortcut
# hide the back button and go to start screen
self.go_back.hide()
self.gtk_stack.set_visible_child(self.start_screen)
# About menu!
# loop and delete all previous file ListBoxRows
children = self.all_location_list.get_children()
children_length = len(children)
for entry in range (0, children_length):
self.all_location_list.remove(children[entry])
# About Menu
def on_about_button_clicked(self, button):
dialog = Gtk.AboutDialog()
......@@ -78,13 +87,16 @@ class OrganizerWindow(Gtk.ApplicationWindow):
dialog.destroy()
# When any location is clicked on homescreen
def row_activated(self, widget, row):
def row_activated(self, widget, row):
# Unhide the back button
self.go_back.show()
row_index = row.get_index()
# Open filechooser if "other" option clicked
if row_index == 7:
directory_chooser = \
Gtk.FileChooserDialog('Please choose a folder', None,
......@@ -106,9 +118,7 @@ class OrganizerWindow(Gtk.ApplicationWindow):
# Get foldername from respective folder array index
directory = folders[row_index]
response_type = True
if response_type:
# TODO: do something with the folder
files = []
label_name = ''
......
......@@ -555,14 +555,16 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="position">200</property>
<property name="position_set">True</property>
<child>
<object class="GtkStackSidebar">
<property name="width_request">200</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stack">file_sorting</property>
</object>
<packing>
<property name="resize">True</property>
<property name="resize">False</property>
<property name="shrink">False</property>
</packing>
</child>
......@@ -678,7 +680,7 @@
</object>
<packing>
<property name="resize">True</property>
<property name="shrink">True</property>
<property name="shrink">False</property>
</packing>
</child>
</object>
......
......@@ -555,14 +555,16 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="position">200</property>
<property name="position_set">True</property>
<child>
<object class="GtkStackSidebar">
<property name="width_request">200</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stack">file_sorting</property>
</object>
<packing>
<property name="resize">True</property>
<property name="resize">False</property>
<property name="shrink">False</property>
</packing>
</child>
......@@ -590,7 +592,6 @@
<property name="vexpand">True</property>
<property name="hscrollbar_policy">never</property>
<property name="shadow_type">in</property>
<property name="min_content_width">225</property>
<property name="propagate_natural_height">True</property>
<child>
<object class="GtkViewport" id="all_viewport_location">
......@@ -678,8 +679,8 @@
</child>
</object>
<packing>
<property name="resize">True</property>
<property name="shrink">True</property>
<property name="resize">False</property>
<property name="shrink">False</property>
</packing>
</child>
</object>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment