Skip to content

Commit

Permalink
change icon and implement toggle show/hide
Browse files Browse the repository at this point in the history
  • Loading branch information
Hemant Kumar committed May 7, 2008
1 parent dffce62 commit 984c314
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
6 changes: 5 additions & 1 deletion lib/swat.rb
Expand Up @@ -31,7 +31,11 @@ def initialize
end

def show_task_list
@todo_window.show_window
if @todo_window.status
@todo_window.hide_window
else
@todo_window.show_window
end
end

# creates configuration files if they don't exist
Expand Down
9 changes: 7 additions & 2 deletions lib/todo_window.rb
@@ -1,7 +1,7 @@
module Swat
class TodoWindow
include Swat::ListHelper
attr_accessor :todo_data,:glade,:todo_window,:todo_notebook
attr_accessor :todo_data,:glade,:todo_window,:todo_notebook,:status

TreeItem = Struct.new('TreeItem',:description, :priority,:category)
@@todo_file_location = nil
Expand Down Expand Up @@ -104,6 +104,7 @@ def initialize path
layout_done_view
layout_trac_view
@list_view.expand_all
@status = false
@todo_window.hide
end

Expand Down Expand Up @@ -194,9 +195,13 @@ def show_window
@todo_window = @glade.get_widget("todo_window")
@todo_window.present
@todo_window.show
@status = true
end

def hide_window; @todo_window.hide; end
def hide_window;
@todo_window.hide
@status = false
end

def on_sync_button_clicked
system("svn up #{@@todo_file_location}")
Expand Down
Binary file modified resources/todo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 984c314

Please sign in to comment.