Added a desktop entry
This commit is contained in:
parent
e2e28e4df2
commit
7b21336993
5
Makefile
5
Makefile
|
@ -1,6 +1,6 @@
|
|||
PACKAGE = Mailer
|
||||
VERSION = 0.0.0
|
||||
SUBDIRS = src
|
||||
SUBDIRS = data src
|
||||
RM = rm -f
|
||||
LN = ln -f
|
||||
TAR = tar -czvf
|
||||
|
@ -21,6 +21,9 @@ dist:
|
|||
$(RM) -r $(PACKAGE)-$(VERSION)
|
||||
$(LN) -s . $(PACKAGE)-$(VERSION)
|
||||
@$(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/callbacks.c \
|
||||
$(PACKAGE)-$(VERSION)/src/common.c \
|
||||
|
|
21
data/Makefile
Normal file
21
data/Makefile
Normal 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
7
data/mailer.desktop
Normal 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
4
data/project.conf
Normal file
|
@ -0,0 +1,4 @@
|
|||
dist=Makefile,mailer.desktop
|
||||
|
||||
[mailer.desktop]
|
||||
install=$(PREFIX)/share/applications
|
|
@ -2,5 +2,5 @@ package=Mailer
|
|||
version=0.0.0
|
||||
config=h
|
||||
|
||||
subdirs=src
|
||||
subdirs=data,src
|
||||
dist=Makefile,COPYING,config.h
|
||||
|
|
17
src/mailer.c
17
src/mailer.c
|
@ -1,5 +1,5 @@
|
|||
/* $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 */
|
||||
/* 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
|
||||
|
@ -156,6 +156,9 @@ Mailer * mailer_new(void)
|
|||
/* widgets */
|
||||
mailer->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||
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");
|
||||
g_signal_connect(G_OBJECT(mailer->window), "delete-event", G_CALLBACK(
|
||||
on_closex), NULL);
|
||||
|
@ -362,10 +365,10 @@ static GtkWidget * _new_headers(Mailer * mailer)
|
|||
GtkWidget ** widget;
|
||||
} widgets[] =
|
||||
{
|
||||
{ " Subject: ", &mailer->hdr_subject },
|
||||
{ " From: ", &mailer->hdr_from },
|
||||
{ " To: ", &mailer->hdr_to },
|
||||
{ " Date: ", &mailer->hdr_date },
|
||||
{ " Subject: ", NULL },
|
||||
{ " From: ", NULL },
|
||||
{ " To: ", NULL },
|
||||
{ " Date: ", NULL },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
int i;
|
||||
|
@ -375,6 +378,10 @@ static GtkWidget * _new_headers(Mailer * mailer)
|
|||
GtkSizeGroup * group;
|
||||
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);
|
||||
mailer->hdr_vbox = gtk_vbox_new(FALSE, 0);
|
||||
group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
|
||||
|
|
Loading…
Reference in New Issue
Block a user