Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit 'remotes/luckyluke/contacts'
- Loading branch information
Showing
9 changed files
with
456 additions
and
23 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
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 |
---|---|---|
|
@@ -6,3 +6,6 @@ | |
from splash import * | ||
from chat_window import * | ||
from skins import * | ||
from utility import * | ||
from choosers import * | ||
|
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 @@ | ||
|
||
class aMSNFileChooserWindow(object): | ||
""" | ||
This Interface represent a window used to choose a file, | ||
which could be an image for the dp, a file to send, a theme file, etc. | ||
""" | ||
def __init__(self, filter, directory): | ||
""" | ||
@type filter: tuple | ||
@param filter: A tuple containing strings, that will represent the file | ||
formats to filter. | ||
@type directory: str | ||
@param directory: The path to start from. | ||
This will eventually call the related show() method, so the window is | ||
displayed when created. | ||
""" | ||
raise NotImplementedError | ||
|
||
class aMSNDPChooser(object): | ||
""" | ||
This Interface represent a window used to choose a display picture, | ||
should show a list of default dps and the possibility to catch a picture from a webcam. | ||
""" | ||
def __init__(self, default_dps, actions): | ||
""" | ||
@type default_dps: tuple | ||
@params default_dps: a tuple containing strings representing the paths of the default dps. | ||
@type actions: tuple | ||
@param actions: A tuple containing the options between | ||
which the user can choose. Every option is a tuple itself, of the form (name, callback), | ||
where callback is the function that will be called if the option is selected. | ||
This will eventually call the related show() method, so the window is | ||
displayed when created. | ||
""" | ||
raise NotImplementedError | ||
|
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,109 @@ | ||
|
||
class aMSNErrorWindow(object): | ||
""" This Interface represent an error window """ | ||
def __init__(self, error_text): | ||
""" | ||
@type error_text: str | ||
This will eventually call the related show() method, so the window is | ||
displayed when created. | ||
""" | ||
raise NotImplementedError | ||
|
||
class aMSNNotificationWindow(object): | ||
""" | ||
This Interface represent a window used to display a notification message, | ||
generally when an operation has finished succesfully. | ||
""" | ||
def __init__(self, notification_text): | ||
""" | ||
@type notification_text: str | ||
This will eventually call the related show() method, so the window is | ||
displayed when created. | ||
""" | ||
raise NotImplementedError | ||
|
||
class aMSNDialogWindow(object): | ||
""" | ||
This Interface represent a dialog window, used to ask the user | ||
about something to do. | ||
""" | ||
def __init__(self, message, actions): | ||
""" | ||
@type message: str | ||
@type actions: tuple | ||
@param actions: A tuple containing the options between | ||
which the user can choose. Every option is a tuple itself, of the form (name, callback), | ||
where callback is the function that will be called if the option is selected. | ||
This will eventually call the related show() method, so the window is | ||
displayed when created. | ||
""" | ||
raise NotImplementedError | ||
|
||
class aMSNContactInputWindow(object): | ||
""" | ||
This Interface represent a window used to get a new contact. | ||
""" | ||
def __init__(self, message, callback, groups): | ||
""" | ||
@type message: tuple | ||
@param message: A tuple with the messages to be shown in the input window, | ||
of the form (account_string, invite_string). | ||
@type callback: function | ||
@param callback: The function that will be called when the contact info has been filled. | ||
The prototype is callback(email, invite_message, groups). | ||
@type groups: tuple | ||
@param groups: a list of existing groups | ||
""" | ||
raise notImplementedError | ||
|
||
class aMSNGroupInputWindow(object): | ||
""" | ||
This Interface represent a window used to get a new group. | ||
""" | ||
def __init__(self, message, callback, contacts): | ||
""" | ||
@type message: tuple | ||
@param message: A tuple with the messages to be shown in the input window. | ||
@type callback: function | ||
@param callback: The function that will be called when the group info has been filled. | ||
The prototype is callback(name_group, contacts). | ||
@type contacts: tuple | ||
@param contacts: a list of existing contacts | ||
""" | ||
raise notImplementedError | ||
|
||
class aMSNContactDeleteWindow(object): | ||
""" | ||
This Interface represent a window used to delete a contact. | ||
""" | ||
def __init__(self, message, callback, contacts): | ||
""" | ||
@type message: tuple | ||
@param message: A tuple with the messages to be shown in the window. | ||
@type callback: function | ||
@param callback: The function that will be called when the account has been entered. | ||
The prototype is callback(account), where account is the email of the account to delete. | ||
@type contacts: tuple | ||
@param contacts: a tuple with all the contacts that can be removed in the AddressBook. | ||
""" | ||
raise notImplementedError | ||
|
||
class aMSNGroupDeleteWindow(object): | ||
""" | ||
This Interface represent a window used to delete a group. | ||
""" | ||
def __init__(self, message, callback, groups): | ||
""" | ||
@type message: tuple | ||
@param message: A tuple with the messages to be shown in the window. | ||
@type callback: function | ||
@param callback: The function that will be called when the group has been entered. | ||
The prototype is callback(group), where group is the group name. | ||
@type groups: tuple | ||
@param groups: a tuple with all the groups that can be deleted. | ||
""" | ||
raise notImplementedError | ||
|
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,39 @@ | ||
|
||
from amsn2.gui import base | ||
import gtk | ||
|
||
class aMSNFileChooserWindow(base.aMSNFileChooserWindow, gtk.FileChooserDialog): | ||
def __init__(self, filter, directory): | ||
""" | ||
@type filter: tuple | ||
@param filter: A tuple containing strings, that will represent the file | ||
formats to filter. | ||
@type directory: str | ||
@param directory: The path to start from. | ||
This will eventually call the related show() method, so the window is | ||
displayed when created. | ||
""" | ||
raise NotImplementedError | ||
|
||
class aMSNDPChooser(base.aMSNDPChooser, gtk.Window): | ||
def __init__(self, default_dps, actions): | ||
""" | ||
@type default_dps: tuple | ||
@params default_dps: a tuple containing strings representing the paths of the default dps. | ||
@type actions: tuple | ||
@param actions: A tuple containing the options between | ||
which the user can choose. Every option is a tuple itself, of the form (name, callback), | ||
where callback is the function that will be called if the option is selected. | ||
This will eventually call the related show() method, so the window is | ||
displayed when created. | ||
""" | ||
gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL) | ||
self.child = None | ||
self.showed = False | ||
self.set_default_size(550, 450) | ||
self.set_position(gtk.WIN_POS_CENTER) | ||
self.set_title("aMSN - Choose a Display Picture") | ||
self.show() | ||
|
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
Oops, something went wrong.