[jkota commit] r140 - in branches/GTK/src/com/googlecode/jkota: . gtk swing

0 views
Skip to first unread message

codesite...@google.com

unread,
Nov 30, 2008, 7:09:09 AM11/30/08
to jkota-...@googlegroups.com
Author: serkankaba
Date: Sun Nov 30 04:08:02 2008
New Revision: 140

Modified:
branches/GTK/src/com/googlecode/jkota/BaseKota.java
branches/GTK/src/com/googlecode/jkota/DownloadNotificationAdapter.java
branches/GTK/src/com/googlecode/jkota/gtk/GtkKota.java
branches/GTK/src/com/googlecode/jkota/swing/SwingAbout.java
branches/GTK/src/com/googlecode/jkota/swing/SwingKota.java
branches/GTK/src/com/googlecode/jkota/swing/SwingSettings.java
branches/GTK/src/com/googlecode/jkota/swing/SwingStats.java
branches/GTK/src/com/googlecode/jkota/swing/SwingUtil.java

Log:
* Gtk hata mesajı kodu eklendi.
* Çeşitli düzenlemeler.


Modified: branches/GTK/src/com/googlecode/jkota/BaseKota.java
==============================================================================
--- branches/GTK/src/com/googlecode/jkota/BaseKota.java (original)
+++ branches/GTK/src/com/googlecode/jkota/BaseKota.java Sun Nov 30 04:08:02
2008
@@ -24,6 +24,7 @@
settings.readSettings();
} catch (IOException e) {
showError(e);
+ System.exit(-1);
}
}

BaseDownloader.getInstance(settings.getSetting("updater")).addDownloadNotificationListener(this);

Modified:
branches/GTK/src/com/googlecode/jkota/DownloadNotificationAdapter.java
==============================================================================
--- branches/GTK/src/com/googlecode/jkota/DownloadNotificationAdapter.java
(original)
+++ branches/GTK/src/com/googlecode/jkota/DownloadNotificationAdapter.java
Sun Nov 30 04:08:02 2008
@@ -1,7 +1,6 @@
package com.googlecode.jkota;

-public class DownloadNotificationAdapter implements
-DownloadNotificationListener {
+public class DownloadNotificationAdapter implements
DownloadNotificationListener {

@Override
public void notification(DownloadNotificationEvent e) {

Modified: branches/GTK/src/com/googlecode/jkota/gtk/GtkKota.java
==============================================================================
--- branches/GTK/src/com/googlecode/jkota/gtk/GtkKota.java (original)
+++ branches/GTK/src/com/googlecode/jkota/gtk/GtkKota.java Sun Nov 30
04:08:02 2008
@@ -66,8 +66,7 @@

@Override
public void showError(Exception e) {
- // TODO Auto-generated method stub
-
+ GtkUtil.error(null, e, "HATA");
}

@Override

Modified: branches/GTK/src/com/googlecode/jkota/swing/SwingAbout.java
==============================================================================
--- branches/GTK/src/com/googlecode/jkota/swing/SwingAbout.java (original)
+++ branches/GTK/src/com/googlecode/jkota/swing/SwingAbout.java Sun Nov 30
04:08:02 2008
@@ -39,7 +39,7 @@
getContentPane().add(tabs,BorderLayout.CENTER);
setSize(400,200);
setResizable(false);
- SwingUtil.center(this);
+ setLocationRelativeTo(null);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
setVisible(true);
}

Modified: branches/GTK/src/com/googlecode/jkota/swing/SwingKota.java
==============================================================================
--- branches/GTK/src/com/googlecode/jkota/swing/SwingKota.java (original)
+++ branches/GTK/src/com/googlecode/jkota/swing/SwingKota.java Sun Nov 30
04:08:02 2008
@@ -136,7 +136,7 @@

@Override
public void showError(Exception e) {
- SwingUtil.error(null, e,"Ayarlar okunurken hata");
+ SwingUtil.error(null, e,"HATA");
}

@Override

Modified: branches/GTK/src/com/googlecode/jkota/swing/SwingSettings.java
==============================================================================
--- branches/GTK/src/com/googlecode/jkota/swing/SwingSettings.java
(original)
+++ branches/GTK/src/com/googlecode/jkota/swing/SwingSettings.java Sun Nov
30 04:08:02 2008
@@ -62,7 +62,7 @@
getContentPane().add(ok,BorderLayout.SOUTH);
setSize(300,200);
setResizable(false);
- SwingUtil.center(this);
+ setLocationRelativeTo(null);
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
setVisible(true);
}

Modified: branches/GTK/src/com/googlecode/jkota/swing/SwingStats.java
==============================================================================
--- branches/GTK/src/com/googlecode/jkota/swing/SwingStats.java (original)
+++ branches/GTK/src/com/googlecode/jkota/swing/SwingStats.java Sun Nov 30
04:08:02 2008
@@ -55,7 +55,7 @@
contentPane.add(chartPanel,BorderLayout.PAGE_START);
contentPane.add(scroller,BorderLayout.CENTER);
setSize(780,580);
- SwingUtil.center(this);
+ setLocationRelativeTo(null);
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
setVisible(true);
}

Modified: branches/GTK/src/com/googlecode/jkota/swing/SwingUtil.java
==============================================================================
--- branches/GTK/src/com/googlecode/jkota/swing/SwingUtil.java (original)
+++ branches/GTK/src/com/googlecode/jkota/swing/SwingUtil.java Sun Nov 30
04:08:02 2008
@@ -1,7 +1,5 @@
package com.googlecode.jkota.swing;
import java.awt.Component;
-import java.awt.Dimension;
-import java.awt.Toolkit;
import java.io.PrintWriter;
import java.io.StringWriter;

@@ -17,13 +15,5 @@
e.printStackTrace(new PrintWriter(out));
out.flush();
error(parent,out.getBuffer().toString(),title);
- }
-
- public static void center(Component component) {
- Toolkit toolkit = Toolkit.getDefaultToolkit();
- Dimension screenSize = toolkit.getScreenSize();
- int x = (screenSize.width - component.getWidth()) / 2;
- int y = (screenSize.height - component.getHeight()) / 2;
- component.setLocation(x, y);
}
}
Reply all
Reply to author
Forward
0 new messages