Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/chat
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2006-04-26 04:18:21 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2006-04-26 04:18:21 (GMT)
commit7c2531899bff565e144e8c70da1bc52c8f1c315f (patch)
treef96285dd6651e3b77d3fd9272d9ad3474eaaacd1 /chat
parentba744c32dbb74592dbb501d8fc5b16b2ebcfb4df (diff)
Automakeify
Diffstat (limited to 'chat')
-rw-r--r--chat/Makefile.am12
-rw-r--r--chat/chat.glade157
-rwxr-xr-xchat/chat.py8
3 files changed, 16 insertions, 161 deletions
diff --git a/chat/Makefile.am b/chat/Makefile.am
new file mode 100644
index 0000000..b59548d
--- /dev/null
+++ b/chat/Makefile.am
@@ -0,0 +1,12 @@
+sugardir = $(pythondir)/sugar
+sugar_PYTHON = \
+ BuddyList.py \
+ chat.py \
+ network.py \
+ presence.py \
+ richtext.py
+
+icondir = $(pkgdatadir)
+icon_DATA = \
+ bubble.png \
+ bubbleOutline.png
diff --git a/chat/chat.glade b/chat/chat.glade
deleted file mode 100644
index eda4612..0000000
--- a/chat/chat.glade
+++ /dev/null
@@ -1,157 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkWindow" id="mainWindow">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Chat</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="default_width">440</property>
- <property name="default_height">250</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="focus_on_map">True</property>
- <property name="urgency_hint">False</property>
-
- <child>
- <widget class="GtkTable" id="mainTable">
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">0</property>
- <property name="column_spacing">0</property>
-
- <child>
- <widget class="GtkEntry" id="entry">
- <property name="visible">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">•</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options">shrink|fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkTreeView" id="buddyListView">
- <property name="border_width">2</property>
- <property name="width_request">167</property>
- <property name="visible">True</property>
- <property name="headers_visible">False</property>
- <property name="rules_hint">False</property>
- <property name="reorderable">False</property>
- <property name="enable_search">True</property>
- <property name="fixed_height_mode">False</property>
- <property name="hover_selection">False</property>
- <property name="hover_expand">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="chatLabel">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTextView" id="chatView">
- <property name="visible">True</property>
- <property name="editable">False</property>
- <property name="overwrite">False</property>
- <property name="accepts_tab">True</property>
- <property name="justification">GTK_JUSTIFY_LEFT</property>
- <property name="wrap_mode">GTK_WRAP_NONE</property>
- <property name="cursor_visible">True</property>
- <property name="pixels_above_lines">0</property>
- <property name="pixels_below_lines">0</property>
- <property name="pixels_inside_wrap">0</property>
- <property name="left_margin">0</property>
- <property name="right_margin">0</property>
- <property name="indent">0</property>
- <property name="text" translatable="yes"></property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/chat/chat.py b/chat/chat.py
index f5e7315..bb66d8f 100755
--- a/chat/chat.py
+++ b/chat/chat.py
@@ -15,8 +15,6 @@ import pwd
import gc
import socket
-sys.path.append(os.getcwd())
-sys.path.append('../shell/example-activity/')
import activity
import presence
@@ -25,6 +23,8 @@ import network
import richtext
import xmlrpclib
+from sugar_globals import *
+
class Chat(object):
def __init__(self, parent, view, label):
self._parent = parent
@@ -193,8 +193,8 @@ class ChatActivity(activity.Activity):
self._buddy_list_model = gtk.ListStore(gobject.TYPE_STRING, gtk.gdk.Pixbuf, gobject.TYPE_PYOBJECT)
- self._pixbuf_active_chat = gtk.gdk.pixbuf_new_from_file("bubbleOutline.png")
- self._pixbuf_new_message = gtk.gdk.pixbuf_new_from_file("bubble.png")
+ self._pixbuf_active_chat = gtk.gdk.pixbuf_new_from_file(data_dir + "/bubbleOutline.png")
+ self._pixbuf_new_message = gtk.gdk.pixbuf_new_from_file(data_dir + "/bubble.png")
sw = gtk.ScrolledWindow()
sw.set_shadow_type(gtk.SHADOW_IN)