diff --git a/README.md b/README.md index ceb203b..614905c 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This plugin is now supported in [Godot Extended Library Discord](https://discord A complete GitHub integration for your Godot Editor! Manage your project without even opening your browser. Author: *"Nicolo (fenix) Santilio"* -Version: *1.3.4* +Version: *1.3.5* Wiki: *[supported](https://github.com/fenix-hub/godot-engine.github-integration/wiki)* Godot Version: *3.2.3stable* diff --git a/addons/github-integration/scenes/Notifications.tscn b/addons/github-integration/scenes/Notifications.tscn index 2d3c136..6d491dd 100644 --- a/addons/github-integration/scenes/Notifications.tscn +++ b/addons/github-integration/scenes/Notifications.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=7 format=2] +[gd_scene load_steps=6 format=2] [ext_resource path="res://addons/github-integration/scripts/Notifications.gd" type="Script" id=1] [ext_resource path="res://addons/github-integration/resources/themes/GitHubTheme.tres" type="Theme" id=2] @@ -11,9 +11,7 @@ content_margin_bottom = 4.0 draw_center = false border_width_bottom = 1 -[sub_resource type="StyleBoxFlat" id=3] - -[sub_resource type="StyleBoxEmpty" id=4] +[sub_resource type="StyleBoxEmpty" id=3] content_margin_left = 7.0 [node name="Notifications" type="Control"] @@ -70,9 +68,10 @@ custom_styles/separator = SubResource( 1 ) custom_constants/separation = 10 [node name="Invitations" type="VBoxContainer" parent="NotificationsContainer/NotificationsTabs/Tabs"] +visible = false margin_top = 14.0 margin_right = 820.0 -margin_bottom = 522.0 +margin_bottom = 256.0 size_flags_horizontal = 3 size_flags_vertical = 3 @@ -82,17 +81,16 @@ margin_bottom = 22.0 text = "There are 0 invitations received" [node name="Settings" type="VBoxContainer" parent="NotificationsContainer/NotificationsTabs/Tabs"] -visible = false margin_top = 14.0 margin_right = 820.0 -margin_bottom = 266.0 +margin_bottom = 536.0 size_flags_horizontal = 3 size_flags_vertical = 3 custom_constants/separation = 20 [node name="Notifications" type="VBoxContainer" parent="NotificationsContainer/NotificationsTabs/Tabs/Settings"] margin_right = 820.0 -margin_bottom = 88.0 +margin_bottom = 84.0 custom_constants/separation = 0 [node name="Label" type="Label" parent="NotificationsContainer/NotificationsTabs/Tabs/Settings/Notifications"] @@ -102,31 +100,25 @@ custom_styles/normal = SubResource( 2 ) custom_colors/font_color_shadow = Color( 0, 0, 0, 0.392157 ) text = "Notifications Settings" -[node name="HSeparator" type="HSeparator" parent="NotificationsContainer/NotificationsTabs/Tabs/Settings/Notifications"] -margin_top = 18.0 -margin_right = 820.0 -margin_bottom = 22.0 -custom_styles/separator = SubResource( 3 ) - [node name="AutoUpdateNotificationsChk" type="CheckButton" parent="NotificationsContainer/NotificationsTabs/Tabs/Settings/Notifications"] -margin_top = 22.0 +margin_top = 18.0 margin_right = 820.0 -margin_bottom = 56.0 +margin_bottom = 52.0 rect_min_size = Vector2( 300, 0 ) pressed = true text = "Auto update notifications" [node name="AutoUpdateTimer" type="HBoxContainer" parent="NotificationsContainer/NotificationsTabs/Tabs/Settings/Notifications"] -margin_top = 56.0 +margin_top = 52.0 margin_right = 820.0 -margin_bottom = 88.0 +margin_bottom = 84.0 [node name="Label" type="Label" parent="NotificationsContainer/NotificationsTabs/Tabs/Settings/Notifications/AutoUpdateTimer"] margin_top = 9.0 margin_right = 687.0 margin_bottom = 23.0 size_flags_horizontal = 3 -custom_styles/normal = SubResource( 4 ) +custom_styles/normal = SubResource( 3 ) text = "Auto update notifications timer" [node name="Amount" type="LineEdit" parent="NotificationsContainer/NotificationsTabs/Tabs/Settings/Notifications/AutoUpdateTimer"] @@ -144,9 +136,9 @@ margin_bottom = 27.0 text = "minutes" [node name="Plugin" type="VBoxContainer" parent="NotificationsContainer/NotificationsTabs/Tabs/Settings"] -margin_top = 108.0 +margin_top = 104.0 margin_right = 820.0 -margin_bottom = 232.0 +margin_bottom = 230.0 size_flags_vertical = 3 custom_constants/separation = 0 @@ -157,56 +149,87 @@ custom_styles/normal = SubResource( 2 ) custom_colors/font_color_shadow = Color( 0, 0, 0, 0.392157 ) text = "Plugin Settings" -[node name="HSeparator" type="HSeparator" parent="NotificationsContainer/NotificationsTabs/Tabs/Settings/Plugin"] -margin_top = 18.0 -margin_right = 820.0 -margin_bottom = 22.0 -custom_styles/separator = SubResource( 3 ) - [node name="DebugMessagesChk" type="CheckButton" parent="NotificationsContainer/NotificationsTabs/Tabs/Settings/Plugin"] -margin_top = 22.0 +margin_top = 18.0 margin_right = 820.0 -margin_bottom = 56.0 +margin_bottom = 52.0 rect_min_size = Vector2( 300, 0 ) pressed = true text = "Debug messages in output console" [node name="AutoLoginChk" type="CheckButton" parent="NotificationsContainer/NotificationsTabs/Tabs/Settings/Plugin"] -margin_top = 56.0 +margin_top = 52.0 margin_right = 820.0 -margin_bottom = 90.0 +margin_bottom = 86.0 rect_min_size = Vector2( 300, 0 ) text = "Auto login at plugin startup" [node name="DarkmodeChk" type="CheckButton" parent="NotificationsContainer/NotificationsTabs/Tabs/Settings/Plugin"] -margin_top = 90.0 +margin_top = 86.0 margin_right = 820.0 -margin_bottom = 124.0 +margin_bottom = 120.0 rect_min_size = Vector2( 300, 0 ) +pressed = true text = "Darkmode" -[node name="ResetPluginBtn" type="Button" parent="NotificationsContainer/NotificationsTabs/Tabs/Settings/Plugin"] -margin_top = 370.0 +[node name="Repositories" type="VBoxContainer" parent="NotificationsContainer/NotificationsTabs/Tabs/Settings"] +margin_top = 250.0 +margin_right = 820.0 +margin_bottom = 376.0 +size_flags_vertical = 3 +custom_constants/separation = 0 + +[node name="Label" type="Label" parent="NotificationsContainer/NotificationsTabs/Tabs/Settings/Repositories"] +margin_right = 820.0 +margin_bottom = 18.0 +custom_styles/normal = SubResource( 2 ) +custom_colors/font_color_shadow = Color( 0, 0, 0, 0.392157 ) +text = "Repositories" + +[node name="OwnerAffiliations" type="HBoxContainer" parent="NotificationsContainer/NotificationsTabs/Tabs/Settings/Repositories"] +margin_top = 18.0 +margin_right = 820.0 +margin_bottom = 40.0 +custom_constants/separation = 10 + +[node name="Label" type="Label" parent="NotificationsContainer/NotificationsTabs/Tabs/Settings/Repositories/OwnerAffiliations"] +margin_right = 158.0 +margin_bottom = 22.0 +text = "Filter owner affiliations:" + +[node name="Owner" type="CheckBox" parent="NotificationsContainer/NotificationsTabs/Tabs/Settings/Repositories/OwnerAffiliations"] +margin_left = 470.0 +margin_right = 535.0 +margin_bottom = 22.0 +size_flags_horizontal = 10 +text = "owner" + +[node name="Collaborator" type="CheckBox" parent="NotificationsContainer/NotificationsTabs/Tabs/Settings/Repositories/OwnerAffiliations"] +margin_left = 545.0 +margin_right = 647.0 +margin_bottom = 22.0 +text = "collaborator" + +[node name="OrganizationMember" type="CheckBox" parent="NotificationsContainer/NotificationsTabs/Tabs/Settings/Repositories/OwnerAffiliations"] +margin_left = 657.0 +margin_right = 820.0 +margin_bottom = 22.0 +text = "organization member" + +[node name="ResetPluginBtn" type="Button" parent="NotificationsContainer/NotificationsTabs/Tabs/Settings"] +margin_top = 492.0 margin_right = 127.0 -margin_bottom = 400.0 +margin_bottom = 522.0 size_flags_horizontal = 0 size_flags_vertical = 10 custom_colors/font_color = Color( 1, 0, 0, 1 ) custom_colors/font_color_hover = Color( 0, 0, 0, 1 ) text = "Reset this plugin" -[node name="HSeparator2" type="HSeparator" parent="NotificationsContainer/NotificationsTabs/Tabs"] -margin_top = 526.0 -margin_right = 820.0 -margin_bottom = 536.0 -custom_styles/separator = SubResource( 1 ) -custom_constants/separation = 10 - [node name="Timer" type="Timer" parent="."] wait_time = 300.0 [node name="ResetPluginDialog" type="ConfirmationDialog" parent="."] -visible = true anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 diff --git a/addons/github-integration/scenes/UserPanel.tscn b/addons/github-integration/scenes/UserPanel.tscn index 63cc452..afb1718 100644 --- a/addons/github-integration/scenes/UserPanel.tscn +++ b/addons/github-integration/scenes/UserPanel.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=26 format=2] +[gd_scene load_steps=27 format=2] [ext_resource path="res://addons/github-integration/scripts/NewGist.gd" type="Script" id=1] [ext_resource path="res://addons/github-integration/resources/user/placeholder.png" type="Texture" id=2] @@ -8,6 +8,7 @@ [ext_resource path="res://addons/github-integration/scenes/NormalBtn.tscn" type="PackedScene" id=6] [ext_resource path="res://addons/github-integration/scenes/NewRepo.tscn" type="PackedScene" id=7] [ext_resource path="res://addons/github-integration/resources/styles/List-black.tres" type="StyleBox" id=8] +[ext_resource path="res://addons/github-integration/icons/reload.png" type="Texture" id=9] [sub_resource type="StyleBoxEmpty" id=1] @@ -305,8 +306,7 @@ custom_constants/separation = 10 alignment = 1 [node name="repo" type="Button" parent="Panel/List/repos_buttons"] -margin_left = 426.0 -margin_right = 564.0 +margin_right = 138.0 margin_bottom = 32.0 rect_min_size = Vector2( 120, 0 ) size_flags_horizontal = 5 @@ -325,6 +325,13 @@ __meta__ = { "_edit_use_anchors_": false } +[node name="reload" type="Button" parent="Panel/List/repos_buttons"] +margin_left = 954.0 +margin_right = 990.0 +margin_bottom = 32.0 +size_flags_horizontal = 10 +icon = ExtResource( 9 ) + [node name="SEPARATOR" type="HSeparator" parent="Panel/List"] margin_top = 281.0 margin_right = 990.0 @@ -416,8 +423,7 @@ custom_constants/separation = 10 alignment = 1 [node name="gist" type="Button" parent="Panel/List/gist_buttons"] -margin_left = 435.0 -margin_right = 555.0 +margin_right = 120.0 margin_bottom = 32.0 rect_min_size = Vector2( 120, 0 ) size_flags_horizontal = 5 @@ -436,6 +442,13 @@ __meta__ = { "_edit_use_anchors_": false } +[node name="reload" type="Button" parent="Panel/List/gist_buttons"] +margin_left = 954.0 +margin_right = 990.0 +margin_bottom = 32.0 +size_flags_horizontal = 10 +icon = ExtResource( 9 ) + [node name="HSeparator7" type="HSeparator" parent="Panel"] margin_top = 592.0 margin_right = 990.0 @@ -457,7 +470,6 @@ text = "Reload" icon = SubResource( 16 ) [node name="NewGist" type="WindowDialog" parent="."] -visible = true anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 diff --git a/addons/github-integration/scripts/Notifications.gd b/addons/github-integration/scripts/Notifications.gd index ba044e2..dfd3f1b 100644 --- a/addons/github-integration/scripts/Notifications.gd +++ b/addons/github-integration/scripts/Notifications.gd @@ -13,6 +13,10 @@ onready var auto_update_notifications_amount : LineEdit = $NotificationsContaine onready var debug_messages_chk : CheckButton = $NotificationsContainer/NotificationsTabs/Tabs/Settings/Plugin/DebugMessagesChk onready var auto_login_chk : CheckButton = $NotificationsContainer/NotificationsTabs/Tabs/Settings/Plugin/AutoLoginChk onready var darkmode_chck : CheckButton = $NotificationsContainer/NotificationsTabs/Tabs/Settings/Plugin/DarkmodeChk +onready var owner_check : CheckBox = $NotificationsContainer/NotificationsTabs/Tabs/Settings/Repositories/OwnerAffiliations/Owner +onready var collaborator_check : CheckBox = $NotificationsContainer/NotificationsTabs/Tabs/Settings/Repositories/OwnerAffiliations/Collaborator +onready var organization_member_check : CheckBox = $NotificationsContainer/NotificationsTabs/Tabs/Settings/Repositories/OwnerAffiliations/OrganizationMember + signal add_notifications(amount) @@ -36,8 +40,11 @@ func _connect_signals() -> void: debug_messages_chk.connect("toggled", self, "_on_debug_toggled") auto_login_chk.connect("toggled", self, "_on_autologin_toggled") darkmode_chck.connect("toggled", self, "_on_darkmode_toggled") - $NotificationsContainer/NotificationsTabs/Tabs/Settings/Plugin/ResetPluginBtn.connect("pressed", self, "_on_reset_plugin_pressed") + $NotificationsContainer/NotificationsTabs/Tabs/Settings/ResetPluginBtn.connect("pressed", self, "_on_reset_plugin_pressed") $ResetPluginDialog.connect("confirmed", self, "_on_reset_confirmed") + owner_check.connect("toggled", self, "_on_owner_check_pressed") + collaborator_check.connect("toggled", self, "_on_collaborator_check_pressed") + organization_member_check.connect("toggled", self, "_on_organization_member_check_pressed") func load_settings(): var auto_update_notifications : bool = PluginSettings.auto_update_notifications @@ -50,6 +57,13 @@ func load_settings(): debug_messages_chk.set_pressed(PluginSettings.debug) auto_login_chk.set_pressed(PluginSettings.auto_log) darkmode_chck.set_pressed(darkmode) + var owner_affiliations : Array = PluginSettings.owner_affiliations + load_owner_affiliations(owner_affiliations) + +func load_owner_affiliations(affiliations : Array): + owner_check.set_pressed("OWNER" in affiliations) + collaborator_check.set_pressed("COLLABORATOR" in affiliations) + organization_member_check.set_pressed("ORGANIZATION_MEMBER" in affiliations) func _on_notification_request_failed(requesting : int, error_body : Dictionary): match requesting: @@ -181,3 +195,33 @@ func _on_reset_confirmed(): get_parent().logout() get_parent().SignIn.delete_user() PluginSettings.reset_plugin() + +func _on_owner_check_pressed(toggled : bool): + if toggled: + if not "OWNER" in PluginSettings.owner_affiliations: + PluginSettings.owner_affiliations.append("OWNER") + else: + if "OWNER" in PluginSettings.owner_affiliations: + PluginSettings.owner_affiliations.erase("OWNER") + PluginSettings.set_owner_affiliations(PluginSettings.owner_affiliations) + get_parent().print_debug_message("repositories setting '%s': %s"%["OWNER",toggled]) + +func _on_collaborator_check_pressed(toggled : bool): + if toggled: + if not ("COLLABORATOR" in PluginSettings.owner_affiliations): + PluginSettings.owner_affiliations.append("COLLABORATOR") + else: + if "COLLABORATOR" in PluginSettings.owner_affiliations: + PluginSettings.owner_affiliations.erase("COLLABORATOR") + PluginSettings.set_owner_affiliations(PluginSettings.owner_affiliations) + get_parent().print_debug_message("repositories setting '%s': %s"%["COLLABORATOR",toggled]) + +func _on_organization_member_check_pressed(toggled : bool): + if toggled: + if not "ORGANIZATION_MEMBER" in PluginSettings.owner_affiliations: + PluginSettings.owner_affiliations.append("ORGANIZATION_MEMBER") + else: + if "ORGANIZATION_MEMBER" in PluginSettings.owner_affiliations: + PluginSettings.owner_affiliations.erase("ORGANIZATION_MEMBER") + PluginSettings.set_owner_affiliations(PluginSettings.owner_affiliations) + get_parent().print_debug_message("repositories setting '%s': %s"%["ORGANIZATION_MEMBER",toggled]) diff --git a/addons/github-integration/scripts/PluginSettings.gd b/addons/github-integration/scripts/PluginSettings.gd index 6ced218..503724a 100644 --- a/addons/github-integration/scripts/PluginSettings.gd +++ b/addons/github-integration/scripts/PluginSettings.gd @@ -11,6 +11,7 @@ var auto_log : bool = false var darkmode : bool = false var auto_update_notifications : bool = true var auto_update_timer : float = 300 +var owner_affiliations : Array = ["OWNER","COLLABORATOR","ORGANIZATION_MEMBER"] func _check_plugin_path(): var dir = Directory.new() @@ -29,6 +30,7 @@ func _ready(): darkmode = config_file.get_value("settings","darkmode", darkmode) auto_update_notifications = config_file.get_value("settings","auto_update_notifications", auto_update_notifications) auto_update_timer = config_file.get_value("settings","auto_update_timer",auto_update_timer) + owner_affiliations = config_file.get_value("settings", "owner_affiliations", owner_affiliations) else: config_file.save(plugin_path+setting_file) config_file.set_value("settings","debug",debug) @@ -36,6 +38,7 @@ func _ready(): config_file.set_value("settings","darkmode",darkmode) config_file.set_value("settings","auto_update_notifications", auto_update_notifications) config_file.set_value("settings","auto_update_timer",auto_update_timer) + config_file.set_value("settings","owner_affiliations",owner_affiliations) config_file.save(plugin_path+setting_file) func set_debug(d : bool): @@ -58,6 +61,10 @@ func set_auto_update_timer(timer : float): auto_update_timer = timer save_setting("auto_update_timer", timer) +func set_owner_affiliations(affiliations : Array): + owner_affiliations = affiliations + save_setting("owner_affiliations", owner_affiliations) + func save_setting(key : String, value): _check_plugin_path() var file : ConfigFile = ConfigFile.new() diff --git a/addons/github-integration/scripts/RestHandler.gd b/addons/github-integration/scripts/RestHandler.gd index 159252c..79a7aab 100644 --- a/addons/github-integration/scripts/RestHandler.gd +++ b/addons/github-integration/scripts/RestHandler.gd @@ -24,13 +24,23 @@ signal invitations_list_requested(list) signal invitation_accepted() signal invitation_declined() +var requesting : int = -1 +var notifications_requesting : int = -1 + +var repositories_limit : int = 100 +var gists_limit : int = 100 +var owner_affiliations : String + +var checking_connection : bool = false +var downloading_file : bool = false + onready var client : HTTPRequest = $Client onready var notifications_client : HTTPRequest = $NotificationsClient var loading : Control var session : HTTPClient = HTTPClient.new() var graphql_endpoint : String = "https://api.github.com/graphql" var graphql_queries : Dictionary = { - 'repositories':'{user(login: "%s"){repositories(ownerAffiliations:[OWNER,COLLABORATOR,ORGANIZATION_MEMBER], first:%s, orderBy: {field: NAME, direction: ASC}){ nodes { diskUsage name owner { login } description url isFork isPrivate forkCount stargazerCount isInOrganization collaborators(affiliation: DIRECT, first: 100) { nodes {login name avatarUrl} } mentionableUsers(first: 100){ nodes{ login name avatarUrl } } defaultBranchRef { name } refs(refPrefix: "refs/heads/", first: 100){ nodes{ name target { ... on Commit { oid tree { oid } zipballUrl tarballUrl } } } } } } } }', + 'repositories':'{user(login: "%s"){repositories(ownerAffiliations:%s, first:%s, orderBy: {field: NAME, direction: ASC}){ nodes { diskUsage name owner { login } description url isFork isPrivate forkCount stargazerCount isInOrganization collaborators(affiliation: DIRECT, first: 100) { nodes {login name avatarUrl} } mentionableUsers(first: 100){ nodes{ login name avatarUrl } } defaultBranchRef { name } refs(refPrefix: "refs/heads/", first: 100){ nodes{ name target { ... on Commit { oid tree { oid } zipballUrl tarballUrl } } } } } } } }', 'repository':'{user(login: "%s"){repository(name:"%s"){diskUsage name owner { login } description url isFork isPrivate forkCount stargazerCount isInOrganization collaborators(affiliation: DIRECT, first: 100) { nodes {login name avatarUrl} } mentionableUsers(first: 100){ nodes{ login name avatarUrl } } defaultBranchRef { name } refs(refPrefix: "refs/heads/", first: 100){ nodes{ name target { ... on Commit { oid tree { oid } zipballUrl tarballUrl }}}}}}}', 'gists':'{ user(login: "%s") { gists(first: %s, orderBy: {field: PUSHED_AT, direction: DESC}, privacy: ALL) { nodes { owner { login } id description resourcePath name stargazerCount isPublic isFork files { encodedName encoding extension name size text } } } } }', } @@ -63,20 +73,15 @@ enum REQUESTS { ACCEPT_INVITATION, DECLINE_INVITATION } -var requesting : int = -1 -var notifications_requesting : int = -1 - -var repositories_limit : int = 100 -var gists_limit : int = 100 - -var checking_connection : bool = false -var downloading_file : bool = false # Called when the node enters the scene tree for the first time. func _ready(): client.connect("request_completed",self,"_on_request_completed") notifications_client.connect("request_completed",self,"_on_notification_request_completed") +func load_default_variables(): + pass + func check_connection() -> void: checking_connection = true var connection : int = session.connect_to_host("www.githubstatus.com") @@ -212,7 +217,7 @@ func request_contributor_avatar(avatar_url : String, contributor_class : Contrib func request_user_repositories() -> void: requesting = REQUESTS.USER_REPOSITORIES - var query : String = graphql_queries.repositories % [UserData.USER.login, repositories_limit] + var query : String = graphql_queries.repositories % [UserData.USER.login,PluginSettings.owner_affiliations, repositories_limit] client.request(graphql_endpoint, UserData.header, true, HTTPClient.METHOD_POST, print_query(query)) func request_user_repository(repository_owner : String, repository_name : String) -> void: diff --git a/addons/github-integration/scripts/SignIn.gd b/addons/github-integration/scripts/SignIn.gd index a2d5e77..98385d1 100644 --- a/addons/github-integration/scripts/SignIn.gd +++ b/addons/github-integration/scripts/SignIn.gd @@ -98,7 +98,6 @@ func sign_in() -> void: emit_signal("signed") func _on_completed_loading(): - requesting = REQUESTS.END get_parent().loading(false) hide() diff --git a/addons/github-integration/scripts/UserPanel.gd b/addons/github-integration/scripts/UserPanel.gd index ae78be5..b145372 100644 --- a/addons/github-integration/scripts/UserPanel.gd +++ b/addons/github-integration/scripts/UserPanel.gd @@ -52,6 +52,8 @@ func _connect_signals() -> void: RestHandler.connect("request_failed", self, "_on_request_failed") RestHandler.connect("user_repositories_requested",self,"_on_user_repositories_requested") RestHandler.connect("user_gists_requested", self, "_on_user_gists_requested") + $Panel/List/gist_buttons/reload.connect("pressed", self, "request_gists") + $Panel/List/repos_buttons/reload.connect("pressed", self, "request_repositories") func set_darkmode(darkmode : bool): if darkmode: @@ -90,16 +92,23 @@ func _on_user_gists_requested(body : Dictionary) -> void: func load_panel() -> void: # Repos.text = str(UserData.USER.public_repos) # Gists.text = str(UserData.USER.public_gists) - get_parent().loading(true) - get_parent().print_debug_message("loading repositories, please wait...") - RestHandler.request_user_repositories() + request_repositories() yield(RestHandler, "user_repositories_requested") - get_parent().print_debug_message("loading gists, please wait...") - RestHandler.request_user_gists() + request_gists() yield(RestHandler, "user_gists_requested") emit_signal("completed_loading") show() +func request_gists(): + get_parent().loading(true) + get_parent().print_debug_message("loading gists, please wait...") + RestHandler.request_user_gists() + +func request_repositories(): + get_parent().loading(true) + get_parent().print_debug_message("loading repositories, please wait...") + RestHandler.request_user_repositories() + func load_repositories(repositories : Array) -> void: clear_repo_list() @@ -114,6 +123,7 @@ func load_repositories(repositories : Array) -> void: Repos.text = str(repositories.size()) get_parent().print_debug_message("loaded all repositories...") emit_signal("loaded_repositories") + get_parent().loading(false) func load_gists(gists : Array) -> void: clear_gist_list() @@ -129,6 +139,7 @@ func load_gists(gists : Array) -> void: Gists.text = str(gists.size()) get_parent().print_debug_message("loaded all gists...") emit_signal("loaded_gists") + get_parent().loading(false) func request_completed(result : int, response_code : int, headers : PoolStringArray, body : PoolByteArray ): if result == 0: