summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Daemon/CrashWatcher.cpp6
-rw-r--r--src/Daemon/Makefile.am2
-rw-r--r--src/Gui/CCDBusBackend.py2
-rw-r--r--src/Gui/CCMainWindow.py6
-rw-r--r--src/Gui/CCReporterDialog.py13
-rw-r--r--src/Gui/cc-gui1
-rw-r--r--src/Gui/ccgui.glade245
7 files changed, 260 insertions, 15 deletions
diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp
index d524e990..c06ad01b 100644
--- a/src/Daemon/CrashWatcher.cpp
+++ b/src/Daemon/CrashWatcher.cpp
@@ -44,7 +44,7 @@ gboolean CCrashWatcher::handle_event_cb(GIOChannel *gio, GIOCondition condition,
//char *buf = malloc(INOTIFY_BUFF_SIZE;
char *buf = new char[INOTIFY_BUFF_SIZE];
gsize len;
- int i = 0;
+ gsize i = 0;
err = g_io_channel_read (gio, buf, INOTIFY_BUFF_SIZE, &len);
if (err != G_IO_ERROR_NONE) {
g_warning ("Error reading inotify fd: %d\n", err);
@@ -52,7 +52,7 @@ gboolean CCrashWatcher::handle_event_cb(GIOChannel *gio, GIOCondition condition,
}
/* reconstruct each event and send message to the dbus */
while (i < len) {
- const char *name;
+ const char *name = NULL;
struct inotify_event *event;
event = (struct inotify_event *) &buf[i];
@@ -220,8 +220,6 @@ void CCrashWatcher::StartWatch()
/* daemon loop with glib */
void CCrashWatcher::GStartWatch()
{
- char action[FILENAME_MAX];
- struct inotify_event *pevent;
g_io_add_watch (m_nGio, G_IO_IN, handle_event_cb, this);
//enter the event loop
g_main_run (m_nMainloop);
diff --git a/src/Daemon/Makefile.am b/src/Daemon/Makefile.am
index a9486bc7..8a88fbc0 100644
--- a/src/Daemon/Makefile.am
+++ b/src/Daemon/Makefile.am
@@ -1,7 +1,7 @@
sbin_PROGRAMS = crash-catcher
crash_catcher_SOURCES = CrashWatcher.cpp CrashWatcher.h Daemon.cpp DBusServerProxy.h \
DBusCommon.h
-crash_catcher_CPPFLAGS = -I../../lib/MiddleWare\
+crash_catcher_CPPFLAGS = -Wall -Werror -I../../lib/MiddleWare\
-I../../lib/DBus \
-DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" $(DBUS_GLIB_CFLAGS) $(DBUSCPP_CFLAGS) \
-DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
diff --git a/src/Gui/CCDBusBackend.py b/src/Gui/CCDBusBackend.py
index 2235e784..f1d6ed1e 100644
--- a/src/Gui/CCDBusBackend.py
+++ b/src/Gui/CCDBusBackend.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
import dbus
import gobject
from dbus.mainloop.glib import DBusGMainLoop
diff --git a/src/Gui/CCMainWindow.py b/src/Gui/CCMainWindow.py
index ab2e171d..0c589f60 100644
--- a/src/Gui/CCMainWindow.py
+++ b/src/Gui/CCMainWindow.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
import sys
import pygtk
pygtk.require("2.0")
@@ -14,7 +12,6 @@ from CCReport import Report
def cb(self, *args):
pass
-
class MainWindow():
def __init__(self):
try:
@@ -146,8 +143,7 @@ class MainWindow():
def on_bQuit_clicked(self, button):
gtk.main_quit()
-
-
+
if __name__ == "__main__":
cc = MainWindow()
cc.hydrate()
diff --git a/src/Gui/CCReporterDialog.py b/src/Gui/CCReporterDialog.py
index 26a6b097..4119d111 100644
--- a/src/Gui/CCReporterDialog.py
+++ b/src/Gui/CCReporterDialog.py
@@ -1,6 +1,6 @@
import pygtk
pygtk.require("2.0")
-import gtk
+import gtk #, pango
import gtk.glade
import sys
from CC_gui_functions import *
@@ -35,6 +35,8 @@ class ReporterDialog():
self.tvReport.append_column(column)
renderer = gtk.CellRendererText()
+ #renderer.props.wrap_mode = pango.WRAP_WORD
+ #renderer.props.wrap_width = 600
column = gtk.TreeViewColumn('Value', renderer, text=1, editable=2)
self.tvReport.append_column(column)
renderer.connect('edited',self.column_edited,self.reportListStore)
@@ -43,8 +45,15 @@ class ReporterDialog():
#self.wTree.get_widget("bApply").connect("clicked", self.on_apply_clicked, self.tvReport)
#self.wTree.get_widget("bCancel").connect("clicked", self.on_cancel_clicked, self.tvReport)
+ self.tvReport.connect_after("size-allocate", self.on_window_resize)
+
self.hydrate()
-
+
+ def on_window_resize(self, treeview, allocation):
+ # multine support
+ pass
+ #print allocation
+
def column_edited(self, cell, path, new_text, model):
# 1 means the second cell
model[path][1] = new_text
diff --git a/src/Gui/cc-gui b/src/Gui/cc-gui
index f11d434f..cd6339f4 100644
--- a/src/Gui/cc-gui
+++ b/src/Gui/cc-gui
@@ -1,3 +1,4 @@
+#! /bin/sh
export PYTHONPATH=/usr/share/crash-catcher
export XLOGNAME=$LOGNAME
exec /usr/bin/python /usr/share/crash-catcher/CCMainWindow.py "$@"
diff --git a/src/Gui/ccgui.glade b/src/Gui/ccgui.glade
index 71bad72c..8fbd9469 100644
--- a/src/Gui/ccgui.glade
+++ b/src/Gui/ccgui.glade
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Thu Feb 26 16:44:05 2009 -->
+<!--Generated with glade3 3.4.5 on Thu Feb 26 21:58:05 2009 -->
<glade-interface>
<widget class="GtkWindow" id="main_window">
<property name="default_width">640</property>
@@ -708,4 +708,247 @@
</widget>
</child>
</widget>
+ <widget class="GtkWindow" id="main_window2">
+ <property name="title" translatable="yes">Crash-catcher</property>
+ <property name="window_position">GTK_WIN_POS_CENTER</property>
+ <child>
+ <widget class="GtkVBox" id="vbox4">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkMenuBar" id="menubar2">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkMenuItem" id="menuitem5">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_File</property>
+ <property name="use_underline">True</property>
+ <child>
+ <widget class="GtkMenu" id="menu4">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkImageMenuItem" id="imagemenuitem11">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">gtk-new</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkImageMenuItem" id="imagemenuitem12">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">gtk-open</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkImageMenuItem" id="imagemenuitem13">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">gtk-save</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkImageMenuItem" id="imagemenuitem14">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">gtk-save-as</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkSeparatorMenuItem" id="separatormenuitem2">
+ <property name="visible">True</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkImageMenuItem" id="imagemenuitem15">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">gtk-quit</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkMenuItem" id="menuitem6">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Edit</property>
+ <property name="use_underline">True</property>
+ <child>
+ <widget class="GtkMenu" id="menu5">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkImageMenuItem" id="imagemenuitem16">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">gtk-cut</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkImageMenuItem" id="imagemenuitem17">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">gtk-copy</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkImageMenuItem" id="imagemenuitem18">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">gtk-paste</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkImageMenuItem" id="imagemenuitem19">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">gtk-delete</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkMenuItem" id="menuitem7">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_View</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkMenuItem" id="menuitem8">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">_Help</property>
+ <property name="use_underline">True</property>
+ <child>
+ <widget class="GtkMenu" id="menu6">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkImageMenuItem" id="imagemenuitem20">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">gtk-about</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox8">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkHBox" id="hbox9">
+ <property name="visible">True</property>
+ <property name="spacing">10</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <widget class="GtkButton" id="bDelet">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="label" translatable="yes">gtk-delete</property>
+ <property name="use_stock">True</property>
+ <property name="response_id">0</property>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkButton" id="button1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="label" translatable="yes">button</property>
+ <property name="response_id">0</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox10">
+ <property name="visible">True</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkButton" id="bQui">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="label" translatable="yes">gtk-quit</property>
+ <property name="use_stock">True</property>
+ <property name="response_id">0</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkTreeView" id="tvDump">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkStatusbar" id="statusbar1">
+ <property name="visible">True</property>
+ <property name="spacing">2</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
</glade-interface>