Added a desktop entry

This commit is contained in:
Pierre Pronchery 2009-08-17 22:22:42 +00:00
parent e2e28e4df2
commit 7b21336993
6 changed files with 50 additions and 8 deletions

View File

@ -1,6 +1,6 @@
PACKAGE = Mailer PACKAGE = Mailer
VERSION = 0.0.0 VERSION = 0.0.0
SUBDIRS = src SUBDIRS = data src
RM = rm -f RM = rm -f
LN = ln -f LN = ln -f
TAR = tar -czvf TAR = tar -czvf
@ -21,6 +21,9 @@ dist:
$(RM) -r $(PACKAGE)-$(VERSION) $(RM) -r $(PACKAGE)-$(VERSION)
$(LN) -s . $(PACKAGE)-$(VERSION) $(LN) -s . $(PACKAGE)-$(VERSION)
@$(TAR) $(PACKAGE)-$(VERSION).tar.gz \ @$(TAR) $(PACKAGE)-$(VERSION).tar.gz \
$(PACKAGE)-$(VERSION)/data/Makefile \
$(PACKAGE)-$(VERSION)/data/mailer.desktop \
$(PACKAGE)-$(VERSION)/data/project.conf \
$(PACKAGE)-$(VERSION)/src/account.c \ $(PACKAGE)-$(VERSION)/src/account.c \
$(PACKAGE)-$(VERSION)/src/callbacks.c \ $(PACKAGE)-$(VERSION)/src/callbacks.c \
$(PACKAGE)-$(VERSION)/src/common.c \ $(PACKAGE)-$(VERSION)/src/common.c \

21
data/Makefile Normal file
View File

@ -0,0 +1,21 @@
PREFIX = /usr/local
DESTDIR =
MKDIR = mkdir -p
INSTALL = install
RM = rm -f
all:
clean:
distclean: clean
install: all
$(MKDIR) $(DESTDIR)$(PREFIX)/share/applications
$(INSTALL) -m 0644 mailer.desktop $(DESTDIR)$(PREFIX)/share/applications/mailer.desktop
uninstall:
$(RM) $(DESTDIR)$(PREFIX)/share/applications/mailer.desktop
.PHONY: all clean distclean install uninstall

7
data/mailer.desktop Normal file
View File

@ -0,0 +1,7 @@
[Desktop Entry]
Name=Mail client
Comment=Read and send e-mails and more
Exec=mailer
Icon=stock_mail
Type=Application
Categories=GTK;

4
data/project.conf Normal file
View File

@ -0,0 +1,4 @@
dist=Makefile,mailer.desktop
[mailer.desktop]
install=$(PREFIX)/share/applications

View File

@ -2,5 +2,5 @@ package=Mailer
version=0.0.0 version=0.0.0
config=h config=h
subdirs=src subdirs=data,src
dist=Makefile,COPYING,config.h dist=Makefile,COPYING,config.h

View File

@ -1,5 +1,5 @@
/* $Id$ */ /* $Id$ */
/* Copyright (c) 2008 Pierre Pronchery <khorben@defora.org> */ /* Copyright (c) 2009 Pierre Pronchery <khorben@defora.org> */
/* This file is part of DeforaOS Desktop Mailer */ /* This file is part of DeforaOS Desktop Mailer */
/* Mailer is free software; you can redistribute it and/or modify it under the /* Mailer is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License version 2 as published by the Free * terms of the GNU General Public License version 2 as published by the Free
@ -156,6 +156,9 @@ Mailer * mailer_new(void)
/* widgets */ /* widgets */
mailer->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); mailer->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_default_size(GTK_WINDOW(mailer->window), 800, 600); gtk_window_set_default_size(GTK_WINDOW(mailer->window), 800, 600);
#if GTK_CHECK_VERSION(2, 6, 0)
gtk_window_set_icon_name(GTK_WINDOW(mailer->window), "stock_mail");
#endif
gtk_window_set_title(GTK_WINDOW(mailer->window), "Mailer"); gtk_window_set_title(GTK_WINDOW(mailer->window), "Mailer");
g_signal_connect(G_OBJECT(mailer->window), "delete-event", G_CALLBACK( g_signal_connect(G_OBJECT(mailer->window), "delete-event", G_CALLBACK(
on_closex), NULL); on_closex), NULL);
@ -362,10 +365,10 @@ static GtkWidget * _new_headers(Mailer * mailer)
GtkWidget ** widget; GtkWidget ** widget;
} widgets[] = } widgets[] =
{ {
{ " Subject: ", &mailer->hdr_subject }, { " Subject: ", NULL },
{ " From: ", &mailer->hdr_from }, { " From: ", NULL },
{ " To: ", &mailer->hdr_to }, { " To: ", NULL },
{ " Date: ", &mailer->hdr_date }, { " Date: ", NULL },
{ NULL, NULL } { NULL, NULL }
}; };
int i; int i;
@ -375,6 +378,10 @@ static GtkWidget * _new_headers(Mailer * mailer)
GtkSizeGroup * group; GtkSizeGroup * group;
PangoFontDescription * bold; PangoFontDescription * bold;
widgets[0].widget = &mailer->hdr_subject;
widgets[1].widget = &mailer->hdr_from;
widgets[2].widget = &mailer->hdr_to;
widgets[3].widget = &mailer->hdr_date;
vbox = gtk_vbox_new(FALSE, 0); vbox = gtk_vbox_new(FALSE, 0);
mailer->hdr_vbox = gtk_vbox_new(FALSE, 0); mailer->hdr_vbox = gtk_vbox_new(FALSE, 0);
group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL); group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);