-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2872c76
commit 4650107
Showing
5 changed files
with
94 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
AC_INIT([Gnomato],[1.0.3],[[email protected]]) | ||
AC_INIT([Gnomato],[1.2.0],[[email protected]]) | ||
|
||
AM_INIT_AUTOMAKE(gnomato,1.0.3) | ||
AM_INIT_AUTOMAKE(gnomato,1.2.0) | ||
|
||
AC_PROG_CC | ||
AC_PROG_CXX | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,52 @@ | ||
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 2 -*- */ | ||
/*! | ||
* win_main.h | ||
* Copyright (C) Diego Rubin 2011 <[email protected]> | ||
* | ||
* Gnomato is free software: you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the | ||
* Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Gnomato is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
* See the GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along | ||
* with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* Author: Diego Rubin <[email protected]> | ||
* | ||
*/ | ||
* win_main.h | ||
* Copyright (C) Diego Rubin 2011 <[email protected]> | ||
* | ||
* Gnomato is free software: you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the | ||
* Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Gnomato is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
* See the GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along | ||
* with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* Author: Diego Rubin <[email protected]> | ||
* | ||
*/ | ||
|
||
#ifndef _WIN_MAIN_H_ | ||
#define _WIN_MAIN_H_ | ||
|
||
#include <gtkmm.h> | ||
#include <glibmm/i18n.h> | ||
#include <libnotify/notify.h> | ||
#include <gtkmm.h> | ||
#include <iostream> | ||
#include <libnotify/notify.h> | ||
#include <sstream> | ||
|
||
#include "boost/date_time/posix_time/posix_time.hpp" | ||
#include "boost/date_time/posix_time/posix_time.hpp" | ||
|
||
#include "config.h" | ||
#include "dialog_preferences.h" | ||
#include "dialog_task.h" | ||
#include "python_executor.h" | ||
#include "task.h" | ||
#include "task_list.h" | ||
#include "dialog_task.h" | ||
#include "dialog_preferences.h" | ||
#include "config.h" | ||
#include "utils.h" | ||
#include "python_executor.h" | ||
|
||
using namespace Gtk; | ||
using namespace boost::posix_time; | ||
|
||
const int MINUTE_IN_SECONDS = 60000; | ||
|
||
class WinMain: public Gtk::Window | ||
{ | ||
class WinMain : public Gtk::ShortcutsWindow { | ||
public: | ||
WinMain(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& refGlade); | ||
WinMain(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &refGlade); | ||
virtual ~WinMain(); | ||
|
||
void on_menu_file_new_task(); | ||
|
@@ -64,25 +63,25 @@ class WinMain: public Gtk::Window | |
Glib::ustring get_cycle(); | ||
|
||
private: | ||
|
||
class ModelColumns : public Gtk::TreeModel::ColumnRecord | ||
{ | ||
class ModelColumns : public Gtk::TreeModel::ColumnRecord { | ||
public: | ||
ModelColumns() | ||
{ add(id); add(title); } | ||
Gtk::TreeModelColumn<Glib::ustring> id; | ||
Gtk::TreeModelColumn<Glib::ustring> title; | ||
ModelColumns() { | ||
add(id); | ||
add(title); | ||
} | ||
Gtk::TreeModelColumn<Glib::ustring> id; | ||
Gtk::TreeModelColumn<Glib::ustring> title; | ||
}; | ||
|
||
class TasksView: public Gtk::TreeView | ||
{ | ||
|
||
class TasksView : public Gtk::TreeView { | ||
|
||
public: | ||
TasksView(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& refGlade); | ||
|
||
TasksView(BaseObjectType *cobject, | ||
const Glib::RefPtr<Gtk::Builder> &refGlade); | ||
|
||
void set_win_main_ref(WinMain *win_main); | ||
Glib::RefPtr<Gtk::Builder> m_refGlade; | ||
virtual void on_drag_end(const Glib::RefPtr< Gdk::DragContext >& context); | ||
virtual void on_drag_end(const Glib::RefPtr<Gdk::DragContext> &context); | ||
virtual void on_menu_move_task(); | ||
virtual bool on_button_press_event(GdkEventButton *ev); | ||
|
||
|
@@ -94,13 +93,13 @@ class WinMain: public Gtk::Window | |
bool showed; | ||
bool started; | ||
unsigned int time_elapsed; | ||
unsigned int minutes,seconds; | ||
unsigned int minutes, seconds; | ||
int cycle_number; | ||
|
||
Config configs; | ||
|
||
Task *currentTask; | ||
std::list<TaskList*> lists; | ||
std::list<TaskList *> lists; | ||
|
||
// For pomodoro | ||
sigc::slot<bool> timer; | ||
|
@@ -150,7 +149,7 @@ class WinMain: public Gtk::Window | |
|
||
PythonExecutor *pe; | ||
|
||
//dialogs | ||
// dialogs | ||
DialogTask *dlgTask; | ||
AboutDialog *abtDialog; | ||
|
||
|
@@ -165,7 +164,7 @@ class WinMain: public Gtk::Window | |
void notify_with_green_icon(const char *message); | ||
void notify_with_gray_icon(const char *message); | ||
|
||
Task* get_current_task(); | ||
Task *get_current_task(); | ||
void inc_current_task(); | ||
void execute(string script); | ||
void run_python_script(string script); | ||
|
@@ -188,8 +187,8 @@ class WinMain: public Gtk::Window | |
virtual void on_button_finish_clicked(); | ||
virtual void on_button_cancel_clicked(); | ||
virtual void on_button_clear_list_clicked(); | ||
virtual void on_treeview_tasks_row_activated(const TreeModel::Path& path, | ||
TreeViewColumn* column); | ||
virtual void on_treeview_tasks_row_activated(const TreeModel::Path &path, | ||
TreeViewColumn *column); | ||
virtual void on_button_del_task_clicked(); | ||
virtual bool on_timeout(int timer_number); | ||
virtual bool on_inactive_timeout(int timer_number); | ||
|
@@ -203,7 +202,6 @@ class WinMain: public Gtk::Window | |
|
||
// callback methods - window | ||
virtual void on_resize(); | ||
|
||
}; | ||
|
||
#endif //__WIN_MAIN_H_ |