Skip to content

Commit

Permalink
Merge pull request #37 from UncleBill/master
Browse files Browse the repository at this point in the history
If max_gists is greater than 100, set it 100
Move the error message to status bar, avoiding a noisy dialog window
Saperate menu for Gist
  • Loading branch information
condemil committed Oct 6, 2012
2 parents 7104328 + c1a022f commit e9ce129
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 22 deletions.
38 changes: 17 additions & 21 deletions Main.sublime-menu
@@ -1,29 +1,25 @@
[
{
"caption": "Tools",
"caption": "Gist",
"mnemonic": "T",
"id": "tools",
"id": "root",
"children":
[
{
"caption": "Gist",
"children":
[
{ "command": "gist", "caption": "Create Public Gist…" },
{ "command": "gist_private", "caption": "Create Private Gist…" },
{ "command": "gist_list", "caption": "Open Gist…" },
{ "command": "insert_gist_list", "caption": "Insert Gist…" },
{ "command": "gist_add_file", "caption": "Add File to Gist…" },
{ "caption": "-" },
{ "command": "gist_copy_url", "caption": "Copy Gist URL" },
{ "command": "gist_open_browser", "caption": "Open Gist in Browser"},
{ "command": "gist_update_file", "caption": "Update File" },
{ "command": "gist_rename_file", "caption": "Rename File…" },
{ "command": "gist_delete_file", "caption": "Delete File" },
{ "command": "gist_change_description", "caption": "Change Gist Description…" },
{ "command": "gist_delete", "caption": "Delete Gist" }
]
}

{ "command": "gist", "caption": "Create Public Gist…" },
{ "command": "gist_private", "caption": "Create Private Gist…" },
{ "command": "gist_list", "caption": "Open Gist…" },
{ "command": "insert_gist_list", "caption": "Insert Gist…" },
{ "command": "gist_add_file", "caption": "Add File to Gist…" },
{ "caption": "-" },
{ "command": "gist_copy_url", "caption": "Copy Gist URL" },
{ "command": "gist_open_browser", "caption": "Open Gist in Browser"},
{ "command": "gist_update_file", "caption": "Update File" },
{ "command": "gist_rename_file", "caption": "Rename File…" },
{ "command": "gist_delete_file", "caption": "Delete File" },
{ "command": "gist_change_description", "caption": "Change Gist Description…" },
{ "command": "gist_delete", "caption": "Delete Gist" }


]
},
Expand Down
3 changes: 2 additions & 1 deletion gist.py
Expand Up @@ -30,7 +30,8 @@
if settings.get('max_gists') <= 100:
GISTS_URL += '?per_page=%d' % settings.get('max_gists');
else:
sublime.error_message("Gist: GitHub API does not support a value of higher than 100")
settings.set( "max_gists",100 )
sublime.status_message("Gist: GitHub API does not support a value of higher than 100")

class MissingCredentialsException(Exception):
pass
Expand Down

0 comments on commit e9ce129

Please sign in to comment.