Some style fixes

This commit is contained in:
Marco Pesenti Gritti 2006-10-26 16:43:22 +02:00
parent 1cc46c315d
commit dbd6fcaf3e
2 changed files with 35 additions and 46 deletions

View File

@ -4,6 +4,12 @@
#include "sugar-marshal.h"
#include "sugar-browser-chandler.h"
enum {
HANDLE_CONTENT,
LAST_SIGNAL
};
static guint signals[LAST_SIGNAL] = { 0 };
G_DEFINE_TYPE(SugarBrowserChandler, sugar_browser_chandler, G_TYPE_OBJECT)
SugarBrowserChandler *browserChandler = NULL;
@ -16,7 +22,7 @@ sugar_browser_chandler_init(SugarBrowserChandler *browserChandler)
static void
sugar_browser_chandler_class_init(SugarBrowserChandlerClass *browser_chandler_class)
{
browser_chandler_class->handle_content_signal_id =
signals[HANDLE_CONTENT] =
g_signal_new ("handle-content",
G_OBJECT_CLASS_TYPE (browser_chandler_class),
G_SIGNAL_RUN_LAST,
@ -47,8 +53,7 @@ sugar_browser_chandler_handle_content (SugarBrowserChandler *browser_chandler,
const char *tmp_file_name)
{
g_signal_emit(browser_chandler,
SUGAR_BROWSER_CHANDLER_GET_CLASS(
browser_chandler)->handle_content_signal_id,
signals[HANDLE_CONTENT],
0 /* details */,
url,
suggested_file_name,

View File

@ -9,25 +9,12 @@ G_BEGIN_DECLS
typedef struct _SugarBrowserChandler SugarBrowserChandler;
typedef struct _SugarBrowserChandlerClass SugarBrowserChandlerClass;
#define SUGAR_TYPE_BROWSER_CHANDLER ( \
sugar_browser_chandler_get_type())
#define SUGAR_BROWSER_CHANDLER(object) ( \
G_TYPE_CHECK_INSTANCE_CAST((object), \
SUGAR_TYPE_BROWSER_CHANDLER, SugarBrowserChandler))
#define SUGAR_BROWSER_CHANDLER_CLASS(klass) ( \
G_TYPE_CHECK_CLASS_CAST((klass), \
SUGAR_TYPE_BROWSER_CHANDLER, \
SugarBrowserChandlerClass))
#define SUGAR_IS_BROWSER_CHANDLER(object) ( \
G_TYPE_CHECK_INSTANCE_TYPE((object), \
SUGAR_TYPE_BROWSER_CHANDLER))
#define SUGAR_IS_BROWSER_CHANDLER_CLASS(klass) ( \
G_TYPE_CHECK_CLASS_TYPE((klass), \
SUGAR_TYPE_BROWSER_CHANDLER))
#define SUGAR_BROWSER_CHANDLER_GET_CLASS(object) ( \
G_TYPE_INSTANCE_GET_CLASS((object), \
SUGAR_TYPE_BROWSER_CHANDLER, \
SugarBrowserChandlerClass))
#define SUGAR_TYPE_BROWSER_CHANDLER (sugar_browser_chandler_get_type())
#define SUGAR_BROWSER_CHANDLER(object) (G_TYPE_CHECK_INSTANCE_CAST((object), SUGAR_TYPE_BROWSER_CHANDLER, SugarBrowserChandler))
#define SUGAR_BROWSER_CHANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SUGAR_TYPE_BROWSER_CHANDLER, SugarBrowserChandlerClass))
#define SUGAR_IS_BROWSER_CHANDLER(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), SUGAR_TYPE_BROWSER_CHANDLER))
#define SUGAR_IS_BROWSER_CHANDLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SUGAR_TYPE_BROWSER_CHANDLER))
#define SUGAR_BROWSER_CHANDLER_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), SUGAR_TYPE_BROWSER_CHANDLER, SugarBrowserChandlerClass))
struct _SugarBrowserChandler {
GObject base_instance;
@ -36,16 +23,13 @@ struct _SugarBrowserChandler {
struct _SugarBrowserChandlerClass {
GObjectClass base_class;
guint handle_content_signal_id;
void (* handle_content) (char *url, char *tmp_file_name);
};
GType sugar_browser_chandler_get_type (void);
SugarBrowserChandler *sugar_get_browser_chandler ();
void sugar_browser_chandler_handle_content (
SugarBrowserChandler *browser_chandler,
SugarBrowserChandler *sugar_get_browser_chandler (void);
void sugar_browser_chandler_handle_content (SugarBrowserChandler *chandler,
const char *url,
const char *suggested_file_name,
const char *mime_type,