This repository has been archived by the owner on Aug 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored some code, changed some text, exracted some functions
- Loading branch information
Bart Zaalberg
committed
Oct 6, 2017
1 parent
275b35e
commit 62522db
Showing
6 changed files
with
47 additions
and
43 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,5 +1,5 @@ | ||
com.github.bartzaalberg.bookmark-manager (0.0.1) UNSTABLE; urgency=low | ||
com.github.bartzaalberg.bookmark-manager (1.0.0) UNSTABLE; urgency=low | ||
|
||
* First release | ||
|
||
-- Bart Zaalberg <bartzaalberg@gmail.com> Wed, 04 Oct 2017 13:12:00 +0200 | ||
-- Bart Zaalberg <bartzaalberg@gmail.com> Wed, 06 Oct 2017 17:07:00 +0200 |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using Granite.Widgets; | ||
|
||
namespace RepositoriesManager { | ||
public class FileWriter : Object { | ||
|
||
ListManager listManager = ListManager.get_instance(); | ||
|
||
public void writeToFile(){ | ||
var file = getCodeTestFile(); | ||
|
||
try { | ||
if(file.query_exists() == true){ | ||
|
||
file.delete(null); | ||
FileOutputStream fos = file.create (FileCreateFlags.REPLACE_DESTINATION, null); | ||
DataOutputStream dos = new DataOutputStream (fos); | ||
dos.put_string (listManager.getView().buffer.text, null); | ||
} | ||
} catch (Error e) { | ||
new Alert ("An error Occurred", e.message); | ||
} | ||
} | ||
|
||
public File getCodeTestFile(){ | ||
|
||
var file = File.new_for_path ("phptest.php"); | ||
if (!file.query_exists ()) { | ||
try { | ||
file.create (FileCreateFlags.REPLACE_DESTINATION, null); | ||
getCodeTestFile(); | ||
} catch (Error e) { | ||
error ("%s", e.message); | ||
} | ||
} | ||
return file; | ||
} | ||
} | ||
} |
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