+2009-01-02 [colin] 3.7.0cvs8
+
+ * src/addressadd.c
+ * src/addressbook.c
+ * src/addressbook_foldersel.c
+ * src/addressitem.h
+ * src/folderview.c
+ * src/grouplistdialog.c
+ * src/importldif.c
+ * src/mimeview.c
+ * src/summaryview.c
+ * src/gtk/gtkcmclist.c
+ * src/gtk/gtkcmclist.h
+ * src/gtk/gtkcmctree.c
+ * src/gtk/gtkcmctree.h
+ * src/gtk/gtksctree.c
+ * src/gtk/gtksctree.h
+ Implement pixbuf rendering in tree widgets
+ instead of pixmaps
+ * src/plugins/trayicon/trayicon.c
+ * src/noticeview.c
+ * src/prefs_themes.c
+ Use pixbuf rendering here too
+
2008-12-30 [paul] 3.7.0cvs7
* src/textview.c
( cvs diff -u -r 1.382.2.491 -r 1.382.2.492 src/compose.c; ) > 3.7.0cvs5.patchset
( cvs diff -u -r 1.150.2.110 -r 1.150.2.111 src/procmsg.c; ) > 3.7.0cvs6.patchset
( cvs diff -u -r 1.96.2.212 -r 1.96.2.213 src/textview.c; ) > 3.7.0cvs7.patchset
+( cvs diff -u -r 1.9.2.26 -r 1.9.2.27 src/addressadd.c; cvs diff -u -r 1.60.2.126 -r 1.60.2.127 src/addressbook.c; cvs diff -u -r 1.1.2.14 -r 1.1.2.15 src/addressbook_foldersel.c; cvs diff -u -r 1.5.2.12 -r 1.5.2.13 src/addressitem.h; cvs diff -u -r 1.207.2.207 -r 1.207.2.208 src/folderview.c; cvs diff -u -r 1.14.2.22 -r 1.14.2.23 src/grouplistdialog.c; cvs diff -u -r 1.14.2.20 -r 1.14.2.21 src/importldif.c; cvs diff -u -r 1.83.2.149 -r 1.83.2.150 src/mimeview.c; cvs diff -u -r 1.5.2.21 -r 1.5.2.22 src/noticeview.c; cvs diff -u -r 1.3.2.60 -r 1.3.2.61 src/prefs_themes.c; cvs diff -u -r 1.395.2.402 -r 1.395.2.403 src/summaryview.c; cvs diff -u -r 1.1.2.7 -r 1.1.2.8 src/gtk/gtkcmclist.c; cvs diff -u -r 1.1.2.5 -r 1.1.2.6 src/gtk/gtkcmclist.h; cvs diff -u -r 1.1.2.9 -r 1.1.2.10 src/gtk/gtkcmctree.c; cvs diff -u -r 1.1.2.3 -r 1.1.2.4 src/gtk/gtkcmctree.h; cvs diff -u -r 1.1.4.52 -r 1.1.4.53 src/gtk/gtksctree.c; cvs diff -u -r 1.1.4.15 -r 1.1.4.16 src/gtk/gtksctree.h; cvs diff -u -r 1.14.2.66 -r 1.14.2.67 src/plugins/trayicon/trayicon.c; ) > 3.7.0cvs8.patchset
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=7
+EXTRA_VERSION=8
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
FolderInfo *fiSelected;
} addressadd_dlg;
-static GdkPixmap *folderXpm;
-static GdkBitmap *folderXpmMask;
-static GdkPixmap *bookXpm;
-static GdkBitmap *bookXpmMask;
+static GdkPixbuf *folderXpm;
+static GdkPixbuf *bookXpm;
static gboolean addressadd_cancelled;
gtk_widget_show_all( window );
- stock_pixmap_gdk( window, STOCK_PIXMAP_BOOK, &bookXpm, &bookXpmMask );
- stock_pixmap_gdk( window, STOCK_PIXMAP_DIR_OPEN,
- &folderXpm, &folderXpmMask );
+ stock_pixbuf_gdk( window, STOCK_PIXMAP_BOOK, &bookXpm );
+ stock_pixbuf_gdk( window, STOCK_PIXMAP_DIR_OPEN,
+ &folderXpm );
}
static void addressadd_load_folder( GtkCMCTreeNode *parentNode, ItemFolder *parentFolder,
fName = g_strdup( ADDRITEM_NAME(folder) );
name = &fName;
node = gtk_sctree_insert_node( tree, parentNode, NULL, name, FOLDER_SPACING,
- folderXpm, folderXpmMask, folderXpm, folderXpmMask,
+ folderXpm, folderXpm,
FALSE, TRUE );
g_free( fName );
fi = addressadd_create_folderinfo( fiParent->book, folder );
name = &dsName;
node = gtk_cmctree_insert_node( tree, NULL, NULL,
name, FOLDER_SPACING, bookXpm,
- bookXpmMask, bookXpm, bookXpmMask,
+ bookXpm,
FALSE, TRUE );
g_free( dsName );
#define ADDRESSBOOK_MSGBUF_SIZE 2048
-static GdkPixmap *folderxpm;
-static GdkBitmap *folderxpmmask;
-static GdkPixmap *folderopenxpm;
-static GdkBitmap *folderopenxpmmask;
-static GdkPixmap *groupxpm;
-static GdkBitmap *groupxpmmask;
-static GdkPixmap *interfacexpm;
-static GdkBitmap *interfacexpmmask;
-static GdkPixmap *bookxpm;
-static GdkBitmap *bookxpmmask;
-static GdkPixmap *addressxpm;
-static GdkBitmap *addressxpmmask;
-static GdkPixmap *vcardxpm;
-static GdkBitmap *vcardxpmmask;
-static GdkPixmap *jpilotxpm;
-static GdkBitmap *jpilotxpmmask;
-static GdkPixmap *categoryxpm;
-static GdkBitmap *categoryxpmmask;
-static GdkPixmap *ldapxpm;
-static GdkBitmap *ldapxpmmask;
-static GdkPixmap *addrsearchxpm;
-static GdkPixmap *addrsearchxpmmask;
+static GdkPixbuf *folderxpm;
+static GdkPixbuf *folderopenxpm;
+static GdkPixbuf *groupxpm;
+static GdkPixbuf *interfacexpm;
+static GdkPixbuf *bookxpm;
+static GdkPixbuf *addressxpm;
+static GdkPixbuf *vcardxpm;
+static GdkPixbuf *jpilotxpm;
+static GdkPixbuf *categoryxpm;
+static GdkPixbuf *ldapxpm;
+static GdkPixbuf *addrsearchxpm;
/* Message buffer */
static gchar addressbook_msgbuf[ ADDRESSBOOK_MSGBUF_SIZE ];
G_CALLBACK(addressbook_close_clicked), NULL);
/* Build icons for interface */
- stock_pixmap_gdk( window, STOCK_PIXMAP_INTERFACE,
- &interfacexpm, &interfacexpmmask );
+ stock_pixbuf_gdk( window, STOCK_PIXMAP_INTERFACE,
+ &interfacexpm );
/* Build control tables */
addrbookctl_build_map(window);
adapter->treeNode =
gtk_sctree_insert_node( GTK_CMCTREE(ctree),
NULL, NULL, &text, FOLDER_SPACING,
- interfacexpm, interfacexpmmask,
- interfacexpm, interfacexpmmask,
+ interfacexpm,
+ interfacexpm,
FALSE, FALSE );
cm_menu_set_sensitive_full(ui_manager, atci->menuCommand, adapter->haveLibrary );
gtk_cmctree_node_set_row_data_full(
GtkCMCTree *ctree = GTK_CMCTREE(addrbook.ctree);
gchar *text[1];
guint8 spacing;
- GdkPixmap *pix_cl, *pix_op;
- GdkBitmap *mask_cl, *mask_op;
+ GdkPixbuf *pix_cl, *pix_op;
gboolean is_leaf, expanded;
gtk_cmctree_get_node_info(ctree, node, text, &spacing,
- &pix_cl, &mask_cl, &pix_op, &mask_op,
+ &pix_cl, &pix_op,
&is_leaf, &expanded);
gtk_sctree_set_node_info(ctree, node, name, spacing,
- pix_cl, mask_cl, pix_op, mask_op,
+ pix_cl, pix_op,
is_leaf, expanded);
}
nodeEMail = gtk_sctree_insert_node(
clist, NULL, NULL,
text, FOLDER_SPACING,
- atci->iconXpm, atci->maskXpm,
- atci->iconXpmOpen, atci->maskXpmOpen,
+ atci->iconXpm,
+ atci->iconXpmOpen,
FALSE, FALSE );
gtk_cmctree_node_set_row_data( clist, nodeEMail, email );
g_free( str );
nodePerson = gtk_sctree_insert_node(
clist, NULL, NULL,
text, FOLDER_SPACING,
- atci->iconXpm, atci->maskXpm,
- atci->iconXpmOpen, atci->maskXpmOpen,
+ atci->iconXpm,
+ atci->iconXpmOpen,
FALSE, person->isOpened );
g_free( str );
str = NULL;
nodeEMail = gtk_sctree_insert_node(
clist, nodePerson, NULL,
text, FOLDER_SPACING,
- atciMail->iconXpm, atciMail->maskXpm,
- atciMail->iconXpmOpen, atciMail->maskXpmOpen,
+ atciMail->iconXpm,
+ atciMail->iconXpmOpen,
FALSE, TRUE );
gtk_cmctree_node_set_row_data(clist, nodeEMail, email );
}
nodePerson = gtk_sctree_insert_node(
clist, NULL, NULL,
text, FOLDER_SPACING,
- atci->iconXpm, atci->maskXpm,
- atci->iconXpmOpen, atci->maskXpmOpen,
+ atci->iconXpm,
+ atci->iconXpmOpen,
FALSE, person->isOpened );
gtk_cmctree_node_set_row_data(clist, nodePerson, person );
}
text[COL_REMARKS] = "";
nodeGroup = gtk_sctree_insert_node(clist, NULL, NULL,
text, FOLDER_SPACING,
- atci->iconXpm, atci->maskXpm,
- atci->iconXpmOpen, atci->maskXpmOpen,
+ atci->iconXpm,
+ atci->iconXpmOpen,
FALSE, FALSE);
gtk_cmctree_node_set_row_data(clist, nodeGroup, group );
gtk_sctree_sort_node(clist, NULL);
gchar **name;
name = &obj->name;
added = gtk_sctree_insert_node( ctree, node, NULL, name, FOLDER_SPACING,
- atci->iconXpm, atci->maskXpm, atci->iconXpmOpen, atci->maskXpmOpen,
+ atci->iconXpm, atci->iconXpmOpen,
atci->treeLeaf, atci->treeExpand );
gtk_cmctree_node_set_row_data_full( ctree, added, obj,
addressbook_free_treenode );
adapter->itemGroup = itemGroup;
newNode = gtk_sctree_insert_node( ctree, node, NULL, name, FOLDER_SPACING,
- atci->iconXpm, atci->maskXpm, atci->iconXpm, atci->maskXpm,
+ atci->iconXpm, atci->iconXpm,
atci->treeLeaf, atci->treeExpand );
gtk_cmctree_node_set_row_data_full( ctree, newNode, adapter,
addressbook_free_treenode );
name = ADDRITEM_NAME(itemFolder);
newNode = gtk_sctree_insert_node( ctree, node, NULL, &name, FOLDER_SPACING,
- atci->iconXpm, atci->maskXpm, atci->iconXpm, atci->maskXpm,
+ atci->iconXpm, atci->iconXpm,
atci->treeLeaf, atci->treeExpand );
if( newNode ) {
gtk_cmctree_node_set_row_data_full( ctree, newNode, adapter,
AddressTypeControlItem *atci;
/* Build icons */
- stock_pixmap_gdk(window, STOCK_PIXMAP_DIR_CLOSE, &folderxpm, &folderxpmmask);
- stock_pixmap_gdk(window, STOCK_PIXMAP_DIR_OPEN, &folderopenxpm, &folderopenxpmmask);
- stock_pixmap_gdk(window, STOCK_PIXMAP_GROUP, &groupxpm, &groupxpmmask);
- stock_pixmap_gdk(window, STOCK_PIXMAP_VCARD, &vcardxpm, &vcardxpmmask);
- stock_pixmap_gdk(window, STOCK_PIXMAP_BOOK, &bookxpm, &bookxpmmask);
- stock_pixmap_gdk(window, STOCK_PIXMAP_ADDRESS, &addressxpm, &addressxpmmask);
- stock_pixmap_gdk(window, STOCK_PIXMAP_JPILOT, &jpilotxpm, &jpilotxpmmask);
- stock_pixmap_gdk(window, STOCK_PIXMAP_CATEGORY, &categoryxpm, &categoryxpmmask);
- stock_pixmap_gdk(window, STOCK_PIXMAP_LDAP, &ldapxpm, &ldapxpmmask);
- stock_pixmap_gdk(window, STOCK_PIXMAP_ADDRESS_SEARCH, &addrsearchxpm, &addrsearchxpmmask);
+ stock_pixbuf_gdk(window, STOCK_PIXMAP_DIR_CLOSE, &folderxpm);
+ stock_pixbuf_gdk(window, STOCK_PIXMAP_DIR_OPEN, &folderopenxpm);
+ stock_pixbuf_gdk(window, STOCK_PIXMAP_GROUP, &groupxpm);
+ stock_pixbuf_gdk(window, STOCK_PIXMAP_VCARD, &vcardxpm);
+ stock_pixbuf_gdk(window, STOCK_PIXMAP_BOOK, &bookxpm);
+ stock_pixbuf_gdk(window, STOCK_PIXMAP_ADDRESS, &addressxpm);
+ stock_pixbuf_gdk(window, STOCK_PIXMAP_JPILOT, &jpilotxpm);
+ stock_pixbuf_gdk(window, STOCK_PIXMAP_CATEGORY, &categoryxpm);
+ stock_pixbuf_gdk(window, STOCK_PIXMAP_LDAP, &ldapxpm);
+ stock_pixbuf_gdk(window, STOCK_PIXMAP_ADDRESS_SEARCH, &addrsearchxpm);
_addressBookTypeHash_ = g_hash_table_new( g_int_hash, g_int_equal );
_addressBookTypeList_ = NULL;
atci->treeLeaf = FALSE;
atci->displayName = _( "Interface" );
atci->iconXpm = folderxpm;
- atci->maskXpm = folderxpmmask;
atci->iconXpmOpen = folderopenxpm;
- atci->maskXpmOpen = folderopenxpmmask;
atci->menuCommand = NULL;
g_hash_table_insert( _addressBookTypeHash_, &atci->objectType, atci );
_addressBookTypeList_ = g_list_append( _addressBookTypeList_, atci );
atci->treeLeaf = FALSE;
atci->displayName = _( "Address Book" );
atci->iconXpm = bookxpm;
- atci->maskXpm = bookxpmmask;
atci->iconXpmOpen = bookxpm;
- atci->maskXpmOpen = bookxpmmask;
atci->menuCommand = "Menu/Book/NewBook";
g_hash_table_insert( _addressBookTypeHash_, &atci->objectType, atci );
_addressBookTypeList_ = g_list_append( _addressBookTypeList_, atci );
atci->treeLeaf = FALSE;
atci->displayName = _( "Person" );
atci->iconXpm = NULL;
- atci->maskXpm = NULL;
atci->iconXpmOpen = NULL;
- atci->maskXpmOpen = NULL;
atci->menuCommand = NULL;
g_hash_table_insert( _addressBookTypeHash_, &atci->objectType, atci );
_addressBookTypeList_ = g_list_append( _addressBookTypeList_, atci );
atci->treeLeaf = TRUE;
atci->displayName = _( "Email Address" );
atci->iconXpm = addressxpm;
- atci->maskXpm = addressxpmmask;
atci->iconXpmOpen = addressxpm;
- atci->maskXpmOpen = addressxpmmask;
atci->menuCommand = NULL;
g_hash_table_insert( _addressBookTypeHash_, &atci->objectType, atci );
_addressBookTypeList_ = g_list_append( _addressBookTypeList_, atci );
atci->treeLeaf = FALSE;
atci->displayName = _( "Group" );
atci->iconXpm = groupxpm;
- atci->maskXpm = groupxpmmask;
atci->iconXpmOpen = groupxpm;
- atci->maskXpmOpen = groupxpmmask;
atci->menuCommand = NULL;
g_hash_table_insert( _addressBookTypeHash_, &atci->objectType, atci );
_addressBookTypeList_ = g_list_append( _addressBookTypeList_, atci );
atci->treeLeaf = FALSE;
atci->displayName = _( "Folder" );
atci->iconXpm = folderxpm;
- atci->maskXpm = folderxpmmask;
atci->iconXpmOpen = folderopenxpm;
- atci->maskXpmOpen = folderopenxpmmask;
atci->menuCommand = NULL;
g_hash_table_insert( _addressBookTypeHash_, &atci->objectType, atci );
_addressBookTypeList_ = g_list_append( _addressBookTypeList_, atci );
atci->treeLeaf = TRUE;
atci->displayName = _( "vCard" );
atci->iconXpm = vcardxpm;
- atci->maskXpm = vcardxpmmask;
atci->iconXpmOpen = vcardxpm;
- atci->maskXpmOpen = vcardxpmmask;
atci->menuCommand = "Menu/Book/NewVCard";
g_hash_table_insert( _addressBookTypeHash_, &atci->objectType, atci );
_addressBookTypeList_ = g_list_append( _addressBookTypeList_, atci );
atci->treeLeaf = FALSE;
atci->displayName = _( "JPilot" );
atci->iconXpm = jpilotxpm;
- atci->maskXpm = jpilotxpmmask;
atci->iconXpmOpen = jpilotxpm;
- atci->maskXpmOpen = jpilotxpmmask;
atci->menuCommand = "Menu/Book/NewJPilot";
g_hash_table_insert( _addressBookTypeHash_, &atci->objectType, atci );
_addressBookTypeList_ = g_list_append( _addressBookTypeList_, atci );
atci->treeLeaf = TRUE;
atci->displayName = _( "JPilot" );
atci->iconXpm = categoryxpm;
- atci->maskXpm = categoryxpmmask;
atci->iconXpmOpen = categoryxpm;
- atci->maskXpmOpen = categoryxpmmask;
atci->menuCommand = NULL;
g_hash_table_insert( _addressBookTypeHash_, &atci->objectType, atci );
_addressBookTypeList_ = g_list_append( _addressBookTypeList_, atci );
atci->treeLeaf = FALSE;
atci->displayName = _( "LDAP servers" );
atci->iconXpm = ldapxpm;
- atci->maskXpm = ldapxpmmask;
atci->iconXpmOpen = ldapxpm;
- atci->maskXpmOpen = ldapxpmmask;
atci->menuCommand = "Menu/Book/NewLDAPServer";
g_hash_table_insert( _addressBookTypeHash_, &atci->objectType, atci );
_addressBookTypeList_ = g_list_append( _addressBookTypeList_, atci );
atci->treeLeaf = TRUE;
atci->displayName = _( "LDAP Query" );
atci->iconXpm = addrsearchxpm;
- atci->maskXpm = addrsearchxpmmask;
atci->iconXpmOpen = addrsearchxpm;
- atci->maskXpmOpen = addrsearchxpmmask;
atci->menuCommand = NULL;
g_hash_table_insert( _addressBookTypeHash_, &atci->objectType, atci );
_addressBookTypeList_ = g_list_append( _addressBookTypeList_, atci );
FolderInfo *fiSelected;
} addressbook_foldersel_dlg;
-static GdkPixmap *folderXpm;
-static GdkBitmap *folderXpmMask;
-static GdkPixmap *bookXpm;
-static GdkBitmap *bookXpmMask;
+static GdkPixbuf *folderXpm;
+static GdkPixbuf *bookXpm;
static gboolean addressbook_foldersel_cancelled;
gtk_widget_show_all( window );
- stock_pixmap_gdk( window, STOCK_PIXMAP_BOOK, &bookXpm, &bookXpmMask );
- stock_pixmap_gdk( window, STOCK_PIXMAP_DIR_OPEN,
- &folderXpm, &folderXpmMask );
+ stock_pixbuf_gdk( window, STOCK_PIXMAP_BOOK, &bookXpm);
+ stock_pixbuf_gdk( window, STOCK_PIXMAP_DIR_OPEN,
+ &folderXpm);
}
static void addressbook_foldersel_load_folder( GtkCMCTreeNode *parentNode, ItemFolder *parentFolder,
name = &fName;
node = gtk_cmctree_insert_node( tree, parentNode, NULL, name, FOLDER_SPACING,
- folderXpm, folderXpmMask, folderXpm, folderXpmMask,
+ folderXpm, folderXpm,
FALSE, TRUE );
/* match folder name, match pointer will be set to NULL if next recursive call
name = &dsName;
node = gtk_cmctree_insert_node( tree, NULL, NULL,
name, FOLDER_SPACING, bookXpm,
- bookXpmMask, bookXpm, bookXpmMask,
+ bookXpm,
FALSE, TRUE );
g_free( dsName );
gboolean treeExpand;
gboolean treeLeaf;
gchar *menuCommand;
- GdkPixmap *iconXpm;
- GdkBitmap *maskXpm;
- GdkPixmap *iconXpmOpen;
- GdkBitmap *maskXpmOpen;
+ GdkPixbuf *iconXpm;
+ GdkPixbuf *iconXpmOpen;
};
typedef struct _AddressObject AddressObject;
static GtkStyle *bold_color_style;
static GtkStyle *bold_tgtfold_style;
-static GdkPixmap *inboxxpm;
-static GdkBitmap *inboxxpmmask;
-static GdkPixmap *inboxhrmxpm;
-static GdkBitmap *inboxhrmxpmmask;
-static GdkPixmap *inboxopenxpm;
-static GdkBitmap *inboxopenxpmmask;
-static GdkPixmap *inboxopenhrmxpm;
-static GdkBitmap *inboxopenhrmxpmmask;
-static GdkPixmap *outboxxpm;
-static GdkBitmap *outboxxpmmask;
-static GdkPixmap *outboxhrmxpm;
-static GdkBitmap *outboxhrmxpmmask;
-static GdkPixmap *outboxopenxpm;
-static GdkBitmap *outboxopenxpmmask;
-static GdkPixmap *outboxopenhrmxpm;
-static GdkBitmap *outboxopenhrmxpmmask;
-static GdkPixmap *folderxpm;
-static GdkBitmap *folderxpmmask;
-static GdkPixmap *folderhrmxpm;
-static GdkBitmap *folderhrmxpmmask;
-static GdkPixmap *folderopenxpm;
-static GdkBitmap *folderopenxpmmask;
-static GdkPixmap *folderopenhrmxpm;
-static GdkBitmap *folderopenhrmxpmmask;
-static GdkPixmap *trashopenxpm;
-static GdkBitmap *trashopenxpmmask;
-static GdkPixmap *trashopenhrmxpm;
-static GdkBitmap *trashopenhrmxpmmask;
-static GdkPixmap *trashxpm;
-static GdkBitmap *trashxpmmask;
-static GdkPixmap *trashhrmxpm;
-static GdkBitmap *trashhrmxpmmask;
-static GdkPixmap *queuexpm;
-static GdkBitmap *queuexpmmask;
-static GdkPixmap *queuehrmxpm;
-static GdkBitmap *queuehrmxpmmask;
-static GdkPixmap *queueopenxpm;
-static GdkBitmap *queueopenxpmmask;
-static GdkPixmap *queueopenhrmxpm;
-static GdkBitmap *queueopenhrmxpmmask;
-static GdkPixmap *draftsxpm;
-static GdkBitmap *draftsxpmmask;
-static GdkPixmap *draftsopenxpm;
-static GdkBitmap *draftsopenxpmmask;
-static GdkPixmap *noselectxpm;
-static GdkBitmap *noselectxpmmask;
-
-static GdkPixmap *m_inboxxpm;
-static GdkBitmap *m_inboxxpmmask;
-static GdkPixmap *m_inboxhrmxpm;
-static GdkBitmap *m_inboxhrmxpmmask;
-static GdkPixmap *m_inboxopenxpm;
-static GdkBitmap *m_inboxopenxpmmask;
-static GdkPixmap *m_inboxopenhrmxpm;
-static GdkBitmap *m_inboxopenhrmxpmmask;
-static GdkPixmap *m_outboxxpm;
-static GdkBitmap *m_outboxxpmmask;
-static GdkPixmap *m_outboxhrmxpm;
-static GdkBitmap *m_outboxhrmxpmmask;
-static GdkPixmap *m_outboxopenxpm;
-static GdkBitmap *m_outboxopenxpmmask;
-static GdkPixmap *m_outboxopenhrmxpm;
-static GdkBitmap *m_outboxopenhrmxpmmask;
-static GdkPixmap *m_folderxpm;
-static GdkBitmap *m_folderxpmmask;
-static GdkPixmap *m_folderhrmxpm;
-static GdkBitmap *m_folderhrmxpmmask;
-static GdkPixmap *m_folderopenxpm;
-static GdkBitmap *m_folderopenxpmmask;
-static GdkPixmap *m_folderopenhrmxpm;
-static GdkBitmap *m_folderopenhrmxpmmask;
-static GdkPixmap *m_trashopenxpm;
-static GdkBitmap *m_trashopenxpmmask;
-static GdkPixmap *m_trashopenhrmxpm;
-static GdkBitmap *m_trashopenhrmxpmmask;
-static GdkPixmap *m_trashxpm;
-static GdkBitmap *m_trashxpmmask;
-static GdkPixmap *m_trashhrmxpm;
-static GdkBitmap *m_trashhrmxpmmask;
-static GdkPixmap *m_queuexpm;
-static GdkBitmap *m_queuexpmmask;
-static GdkPixmap *m_queuehrmxpm;
-static GdkBitmap *m_queuehrmxpmmask;
-static GdkPixmap *m_queueopenxpm;
-static GdkBitmap *m_queueopenxpmmask;
-static GdkPixmap *m_queueopenhrmxpm;
-static GdkBitmap *m_queueopenhrmxpmmask;
-static GdkPixmap *m_draftsxpm;
-static GdkBitmap *m_draftsxpmmask;
-static GdkPixmap *m_draftsopenxpm;
-static GdkBitmap *m_draftsopenxpmmask;
-
-static GdkPixmap *newxpm;
-static GdkBitmap *newxpmmask;
-static GdkPixmap *unreadxpm;
-static GdkBitmap *unreadxpmmask;
-static GdkPixmap *readxpm;
-static GdkBitmap *readxpmmask;
+static GdkPixbuf *inboxxpm;
+static GdkPixbuf *inboxhrmxpm;
+static GdkPixbuf *inboxopenxpm;
+static GdkPixbuf *inboxopenhrmxpm;
+static GdkPixbuf *outboxxpm;
+static GdkPixbuf *outboxhrmxpm;
+static GdkPixbuf *outboxopenxpm;
+static GdkPixbuf *outboxopenhrmxpm;
+static GdkPixbuf *folderxpm;
+static GdkPixbuf *folderhrmxpm;
+static GdkPixbuf *folderopenxpm;
+static GdkPixbuf *folderopenhrmxpm;
+static GdkPixbuf *trashopenxpm;
+static GdkPixbuf *trashopenhrmxpm;
+static GdkPixbuf *trashxpm;
+static GdkPixbuf *trashhrmxpm;
+static GdkPixbuf *queuexpm;
+static GdkPixbuf *queuehrmxpm;
+static GdkPixbuf *queueopenxpm;
+static GdkPixbuf *queueopenhrmxpm;
+static GdkPixbuf *draftsxpm;
+static GdkPixbuf *draftsopenxpm;
+static GdkPixbuf *noselectxpm;
+
+static GdkPixbuf *m_inboxxpm;
+static GdkPixbuf *m_inboxhrmxpm;
+static GdkPixbuf *m_inboxopenxpm;
+static GdkPixbuf *m_inboxopenhrmxpm;
+static GdkPixbuf *m_outboxxpm;
+static GdkPixbuf *m_outboxhrmxpm;
+static GdkPixbuf *m_outboxopenxpm;
+static GdkPixbuf *m_outboxopenhrmxpm;
+static GdkPixbuf *m_folderxpm;
+static GdkPixbuf *m_folderhrmxpm;
+static GdkPixbuf *m_folderopenxpm;
+static GdkPixbuf *m_folderopenhrmxpm;
+static GdkPixbuf *m_trashopenxpm;
+static GdkPixbuf *m_trashopenhrmxpm;
+static GdkPixbuf *m_trashxpm;
+static GdkPixbuf *m_trashhrmxpm;
+static GdkPixbuf *m_queuexpm;
+static GdkPixbuf *m_queuehrmxpm;
+static GdkPixbuf *m_queueopenxpm;
+static GdkPixbuf *m_queueopenhrmxpm;
+static GdkPixbuf *m_draftsxpm;
+static GdkPixbuf *m_draftsopenxpm;
+
+static GdkPixbuf *newxpm;
+static GdkPixbuf *unreadxpm;
+static GdkPixbuf *readxpm;
static void folderview_select_node (FolderView *folderview,
GtkCMCTreeNode *node);
/* CLAWS: titles for "New" and "Unread" show new & unread pixmaps
* instead text (text overflows making them unreadable and ugly) */
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_NEW,
- &newxpm, &newxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_UNREAD,
- &unreadxpm, &unreadxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_READ,
- &readxpm, &readxpmmask);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_NEW,
+ &newxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_UNREAD,
+ &unreadxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_READ,
+ &readxpm);
label_folder = gtk_label_new(_("Folder"));
- label_new = gtk_image_new_from_pixmap(newxpm, newxpmmask);
- label_unread = gtk_image_new_from_pixmap(unreadxpm, unreadxpmmask);
- label_total = gtk_image_new_from_pixmap(readxpm, readxpmmask);
+ label_new = gtk_image_new_from_pixbuf(newxpm);
+ label_unread = gtk_image_new_from_pixbuf(unreadxpm);
+ label_total = gtk_image_new_from_pixbuf(readxpm);
gtk_cmclist_column_titles_active(GTK_CMCLIST(ctree));
GtkWidget *ctree = folderview->ctree;
GdkColor gdk_color;
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_INBOX_CLOSE, &inboxxpm, &inboxxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_INBOX_CLOSE_HRM, &inboxhrmxpm, &inboxhrmxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_INBOX_OPEN, &inboxopenxpm, &inboxopenxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_INBOX_OPEN_HRM, &inboxopenhrmxpm, &inboxopenhrmxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_OUTBOX_CLOSE, &outboxxpm, &outboxxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_OUTBOX_CLOSE_HRM, &outboxhrmxpm, &outboxhrmxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_OUTBOX_OPEN, &outboxopenxpm, &outboxopenxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_OUTBOX_OPEN_HRM, &outboxopenhrmxpm, &outboxopenhrmxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_DIR_CLOSE, &folderxpm, &folderxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_DIR_CLOSE_HRM, &folderhrmxpm, &folderhrmxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_DIR_OPEN, &folderopenxpm, &folderopenxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_DIR_OPEN_HRM, &folderopenhrmxpm, &folderopenhrmxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_TRASH_OPEN, &trashopenxpm, &trashopenxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_TRASH_OPEN_HRM, &trashopenhrmxpm, &trashopenhrmxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_TRASH_CLOSE, &trashxpm, &trashxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_TRASH_CLOSE_HRM, &trashhrmxpm, &trashhrmxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_QUEUE_CLOSE, &queuexpm, &queuexpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_QUEUE_CLOSE_HRM, &queuehrmxpm, &queuehrmxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_QUEUE_OPEN, &queueopenxpm, &queueopenxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_QUEUE_OPEN_HRM, &queueopenhrmxpm, &queueopenhrmxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_DRAFTS_CLOSE, &draftsxpm, &draftsxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_DRAFTS_OPEN, &draftsopenxpm, &draftsopenxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_DIR_NOSELECT, &noselectxpm, &noselectxpmmask);
-
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_INBOX_CLOSE_MARK, &m_inboxxpm, &m_inboxxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_INBOX_CLOSE_HRM_MARK, &m_inboxhrmxpm, &m_inboxhrmxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_INBOX_OPEN_MARK, &m_inboxopenxpm, &m_inboxopenxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_INBOX_OPEN_HRM_MARK, &m_inboxopenhrmxpm, &m_inboxopenhrmxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_OUTBOX_CLOSE_MARK, &m_outboxxpm, &m_outboxxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_OUTBOX_CLOSE_HRM_MARK, &m_outboxhrmxpm, &m_outboxhrmxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_OUTBOX_OPEN_MARK, &m_outboxopenxpm, &m_outboxopenxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_OUTBOX_OPEN_HRM_MARK, &m_outboxopenhrmxpm, &m_outboxopenhrmxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_DIR_CLOSE_MARK, &m_folderxpm, &m_folderxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_DIR_CLOSE_HRM_MARK, &m_folderhrmxpm, &m_folderhrmxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_DIR_OPEN_MARK, &m_folderopenxpm, &m_folderopenxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_DIR_OPEN_HRM_MARK, &m_folderopenhrmxpm, &m_folderopenhrmxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_TRASH_OPEN_MARK, &m_trashopenxpm, &m_trashopenxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_TRASH_OPEN_HRM_MARK, &m_trashopenhrmxpm, &m_trashopenhrmxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_TRASH_CLOSE_MARK, &m_trashxpm, &m_trashxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_TRASH_CLOSE_HRM_MARK, &m_trashhrmxpm, &m_trashhrmxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_QUEUE_CLOSE_MARK, &m_queuexpm, &m_queuexpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_QUEUE_CLOSE_HRM_MARK, &m_queuehrmxpm, &m_queuehrmxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_QUEUE_OPEN_MARK, &m_queueopenxpm, &m_queueopenxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_QUEUE_OPEN_HRM_MARK, &m_queueopenhrmxpm, &m_queueopenhrmxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_DRAFTS_CLOSE_MARK, &m_draftsxpm, &m_draftsxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_DRAFTS_OPEN_MARK, &m_draftsopenxpm, &m_draftsopenxpmmask);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_INBOX_CLOSE, &inboxxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_INBOX_CLOSE_HRM, &inboxhrmxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_INBOX_OPEN, &inboxopenxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_INBOX_OPEN_HRM, &inboxopenhrmxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_OUTBOX_CLOSE, &outboxxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_OUTBOX_CLOSE_HRM, &outboxhrmxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_OUTBOX_OPEN, &outboxopenxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_OUTBOX_OPEN_HRM, &outboxopenhrmxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_DIR_CLOSE, &folderxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_DIR_CLOSE_HRM, &folderhrmxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_DIR_OPEN, &folderopenxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_DIR_OPEN_HRM, &folderopenhrmxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_TRASH_OPEN, &trashopenxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_TRASH_OPEN_HRM, &trashopenhrmxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_TRASH_CLOSE, &trashxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_TRASH_CLOSE_HRM, &trashhrmxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_QUEUE_CLOSE, &queuexpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_QUEUE_CLOSE_HRM, &queuehrmxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_QUEUE_OPEN, &queueopenxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_QUEUE_OPEN_HRM, &queueopenhrmxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_DRAFTS_CLOSE, &draftsxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_DRAFTS_OPEN, &draftsopenxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_DIR_NOSELECT, &noselectxpm);
+
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_INBOX_CLOSE_MARK, &m_inboxxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_INBOX_CLOSE_HRM_MARK, &m_inboxhrmxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_INBOX_OPEN_MARK, &m_inboxopenxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_INBOX_OPEN_HRM_MARK, &m_inboxopenhrmxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_OUTBOX_CLOSE_MARK, &m_outboxxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_OUTBOX_CLOSE_HRM_MARK, &m_outboxhrmxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_OUTBOX_OPEN_MARK, &m_outboxopenxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_OUTBOX_OPEN_HRM_MARK, &m_outboxopenhrmxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_DIR_CLOSE_MARK, &m_folderxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_DIR_CLOSE_HRM_MARK, &m_folderhrmxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_DIR_OPEN_MARK, &m_folderopenxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_DIR_OPEN_HRM_MARK, &m_folderopenhrmxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_TRASH_OPEN_MARK, &m_trashopenxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_TRASH_OPEN_HRM_MARK, &m_trashopenhrmxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_TRASH_CLOSE_MARK, &m_trashxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_TRASH_CLOSE_HRM_MARK, &m_trashhrmxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_QUEUE_CLOSE_MARK, &m_queuexpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_QUEUE_CLOSE_HRM_MARK, &m_queuehrmxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_QUEUE_OPEN_MARK, &m_queueopenxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_QUEUE_OPEN_HRM_MARK, &m_queueopenhrmxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_DRAFTS_CLOSE_MARK, &m_draftsxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_DRAFTS_OPEN_MARK, &m_draftsopenxpm);
if (!normal_style) {
PangoFontDescription *font_desc;
GtkStyle *style = NULL;
GtkStyle *color_style = NULL;
FolderItem *item;
- GdkPixmap *xpm, *openxpm;
- GdkBitmap *mask, *openmask;
- static GdkPixmap *searchicon;
- static GdkBitmap *searchmask;
+ GdkPixbuf *xpm, *openxpm;
+ static GdkPixbuf *searchicon;
gboolean mark = FALSE;
gchar *name;
gchar *str;
case F_INBOX:
if (item->hide_read_msgs) {
xpm = mark?m_inboxhrmxpm:inboxhrmxpm;
- mask = mark?m_inboxhrmxpmmask:inboxhrmxpmmask;
openxpm = mark?m_inboxopenhrmxpm:inboxopenhrmxpm;
- openmask = mark?m_inboxopenhrmxpmmask:inboxopenhrmxpmmask;
} else {
xpm = mark?m_inboxxpm:inboxxpm;
- mask = mark?m_inboxxpmmask:inboxxpmmask;
openxpm = mark?m_inboxopenxpm:inboxopenxpm;
- openmask = mark?m_inboxopenxpmmask:inboxopenxpmmask;
}
break;
case F_OUTBOX:
if (item->hide_read_msgs) {
xpm = mark?m_outboxhrmxpm:outboxhrmxpm;
- mask = mark?m_outboxhrmxpmmask:outboxhrmxpmmask;
openxpm = mark?m_outboxopenhrmxpm:outboxopenhrmxpm;
- openmask = mark?m_outboxopenhrmxpmmask:outboxopenhrmxpmmask;
} else {
xpm = mark?m_outboxxpm:outboxxpm;
- mask = mark?m_outboxxpmmask:outboxxpmmask;
openxpm = mark?m_outboxopenxpm:outboxopenxpm;
- openmask = mark?m_outboxopenxpmmask:outboxopenxpmmask;
}
break;
case F_QUEUE:
if (item->hide_read_msgs) {
xpm = mark?m_queuehrmxpm:queuehrmxpm;
- mask = mark?m_queuehrmxpmmask:queuehrmxpmmask;
openxpm = mark?m_queueopenhrmxpm:queueopenhrmxpm;
- openmask = mark?m_queueopenhrmxpmmask:queueopenhrmxpmmask;
} else {
xpm = mark?m_queuexpm:queuexpm;
- mask = mark?m_queuexpmmask:queuexpmmask;
openxpm = mark?m_queueopenxpm:queueopenxpm;
- openmask = mark?m_queueopenxpmmask:queueopenxpmmask;
}
break;
case F_TRASH:
if (item->hide_read_msgs) {
xpm = mark?m_trashhrmxpm:trashhrmxpm;
- mask = mark?m_trashhrmxpmmask:trashhrmxpmmask;
openxpm = mark?m_trashopenhrmxpm:trashopenhrmxpm;
- openmask = mark?m_trashopenhrmxpmmask:trashopenhrmxpmmask;
} else {
xpm = mark?m_trashxpm:trashxpm;
- mask = mark?m_trashxpmmask:trashxpmmask;
openxpm = mark?m_trashopenxpm:trashopenxpm;
- openmask = mark?m_trashopenxpmmask:trashopenxpmmask;
}
break;
case F_DRAFT:
xpm = mark?m_draftsxpm:draftsxpm;
- mask = mark?m_draftsxpmmask:draftsxpmmask;
openxpm = mark?m_draftsopenxpm:draftsopenxpm;
- openmask = mark?m_draftsopenxpmmask:draftsopenxpmmask;
break;
default:
if (item->hide_read_msgs) {
xpm = mark?m_folderhrmxpm:folderhrmxpm;
- mask = mark?m_folderhrmxpmmask:folderhrmxpmmask;
openxpm = mark?m_folderopenhrmxpm:folderopenhrmxpm;
- openmask = mark?m_folderopenhrmxpmmask:folderopenhrmxpmmask;
} else {
xpm = mark?m_folderxpm:folderxpm;
- mask = mark?m_folderxpmmask:folderxpmmask;
openxpm = mark?m_folderopenxpm:folderopenxpm;
- openmask = mark?m_folderopenxpmmask:folderopenxpmmask;
}
}
if (item->no_select) {
xpm = openxpm = noselectxpm;
- mask = openmask = noselectxpmmask;
}
name = folder_item_get_name(item);
if (item->search_match) {
if (!searchicon) {
- stock_pixmap_gdk(folderview->ctree, STOCK_PIXMAP_QUICKSEARCH,
- &searchicon, &searchmask);
+ stock_pixbuf_gdk(folderview->ctree, STOCK_PIXMAP_QUICKSEARCH,
+ &searchicon);
}
xpm = openxpm = searchicon;
- mask = openmask = searchmask;
}
str = NULL;
name, (item->unreadmarked_msgs > 0) ? " (!)" : "");
}
gtk_sctree_set_node_info(ctree, node, str, FOLDER_SPACING,
- xpm, mask, openxpm, openmask,
+ xpm, openxpm,
FALSE, GTK_CMCTREE_ROW(node)->expanded);
g_free(str);
g_free(name);
text[col_pos[F_COL_FOLDER]] = item->name;
node = gtk_sctree_insert_node(ctree, parent_node, NULL, text,
FOLDER_SPACING,
- folderxpm, folderxpmmask,
- folderopenxpm, folderopenxpmmask,
+ folderxpm,
+ folderopenxpm,
FALSE, FALSE);
gtk_cmctree_expand(ctree, parent_node);
gtk_cmctree_node_set_row_data(ctree, node, item);
node = parent ? GTK_CMCTREE_ROW(parent)->children
: GTK_CMCTREE_NODE(GTK_CMCLIST(ctree)->row_list);
node = gtk_sctree_insert_node(GTK_CMCTREE(ctree), parent, node,
- cols, 0, NULL, NULL, NULL, NULL,
+ cols, 0, NULL, NULL,
FALSE, FALSE);
if (parent && g_pattern_match_simple(pattern, parent_name) == FALSE)
gtk_cmctree_expand(GTK_CMCTREE(ctree), parent);
node = grouplist_hash_get_branch_node(name);
if (node) {
gtk_sctree_set_node_info(GTK_CMCTREE(ctree), node, cols[0], 0,
- NULL, NULL, NULL, NULL, FALSE, FALSE);
+ NULL, NULL, FALSE, FALSE);
gtk_cmctree_node_set_text(GTK_CMCTREE(ctree), node, 1, cols[1]);
gtk_cmctree_node_set_text(GTK_CMCTREE(ctree), node, 2, cols[2]);
} else {
node = parent ? GTK_CMCTREE_ROW(parent)->children
: GTK_CMCTREE_NODE(GTK_CMCLIST(ctree)->row_list);
node = gtk_sctree_insert_node(GTK_CMCTREE(ctree), parent, node,
- cols, 0, NULL, NULL, NULL, NULL,
+ cols, 0, NULL, NULL,
TRUE, FALSE);
if (parent &&
g_pattern_match_simple(pattern, parent_name) == FALSE)
GtkStyle **style,
GdkGC **fg_gc,
GdkGC **bg_gc);
-static gint draw_cell_pixmap (GdkWindow *window,
+static gint draw_cell_pixbuf (GdkWindow *window,
GdkRectangle *clip_rectangle,
GdkGC *fg_gc,
- GdkPixmap *pixmap,
- GdkBitmap *mask,
+ GdkPixbuf *pixbuf,
gint x,
gint y,
gint width,
GtkCMCellType type,
const gchar *text,
guint8 spacing,
- GdkPixmap *pixmap,
- GdkBitmap *mask);
+ GdkPixbuf *pixbuf);
static gint real_insert_row (GtkCMCList *clist,
gint row,
gchar *text[]);
* gtk_cmclist_get_cell_type
* gtk_cmclist_set_text
* gtk_cmclist_get_text
- * gtk_cmclist_set_pixmap
- * gtk_cmclist_get_pixmap
+ * gtk_cmclist_set_pixbuf
+ * gtk_cmclist_get_pixbuf
* gtk_cmclist_set_pixtext
* gtk_cmclist_get_pixtext
* gtk_cmclist_set_shift
/* if text is null, then the cell is empty */
GTK_CMCLIST_GET_CLASS (clist)->set_cell_contents
- (clist, clist_row, column, GTK_CMCELL_TEXT, text, 0, NULL, NULL);
+ (clist, clist_row, column, GTK_CMCELL_TEXT, text, 0, NULL);
/* redraw the list if it's not frozen */
if (CLIST_UNFROZEN (clist))
}
void
-gtk_cmclist_set_pixmap (GtkCMCList *clist,
+gtk_cmclist_set_pixbuf (GtkCMCList *clist,
gint row,
gint column,
- GdkPixmap *pixmap,
- GdkBitmap *mask)
+ GdkPixbuf *pixbuf)
{
GtkCMCListRow *clist_row;
clist_row = ROW_ELEMENT (clist, row)->data;
- g_object_ref (pixmap);
-
- if (mask) g_object_ref (mask);
+ g_object_ref (pixbuf);
GTK_CMCLIST_GET_CLASS (clist)->set_cell_contents
- (clist, clist_row, column, GTK_CMCELL_PIXMAP, NULL, 0, pixmap, mask);
+ (clist, clist_row, column, GTK_CMCELL_PIXBUF, NULL, 0, pixbuf);
/* redraw the list if it's not frozen */
if (CLIST_UNFROZEN (clist))
}
gint
-gtk_cmclist_get_pixmap (GtkCMCList *clist,
+gtk_cmclist_get_pixbuf (GtkCMCList *clist,
gint row,
gint column,
- GdkPixmap **pixmap,
- GdkBitmap **mask)
+ GdkPixbuf **pixbuf)
{
GtkCMCListRow *clist_row;
clist_row = ROW_ELEMENT (clist, row)->data;
- if (clist_row->cell[column].type != GTK_CMCELL_PIXMAP)
+ if (clist_row->cell[column].type != GTK_CMCELL_PIXBUF)
return 0;
- if (pixmap)
+ if (pixbuf)
{
- *pixmap = GTK_CMCELL_PIXMAP (clist_row->cell[column])->pixmap;
- /* mask can be NULL */
- *mask = GTK_CMCELL_PIXMAP (clist_row->cell[column])->mask;
+ *pixbuf = GTK_CMCELL_PIXBUF (clist_row->cell[column])->pixbuf;
}
return 1;
gint column,
const gchar *text,
guint8 spacing,
- GdkPixmap *pixmap,
- GdkBitmap *mask)
+ GdkPixbuf *pixbuf)
{
GtkCMCListRow *clist_row;
clist_row = ROW_ELEMENT (clist, row)->data;
- g_object_ref (pixmap);
- if (mask) g_object_ref (mask);
+ g_object_ref (pixbuf);
GTK_CMCLIST_GET_CLASS (clist)->set_cell_contents
- (clist, clist_row, column, GTK_CMCELL_PIXTEXT, text, spacing, pixmap, mask);
+ (clist, clist_row, column, GTK_CMCELL_PIXTEXT, text, spacing, pixbuf);
/* redraw the list if it's not frozen */
if (CLIST_UNFROZEN (clist))
gint column,
gchar **text,
guint8 *spacing,
- GdkPixmap **pixmap,
- GdkBitmap **mask)
+ GdkPixbuf **pixbuf)
{
GtkCMCListRow *clist_row;
*text = GTK_CMCELL_PIXTEXT (clist_row->cell[column])->text;
if (spacing)
*spacing = GTK_CMCELL_PIXTEXT (clist_row->cell[column])->spacing;
- if (pixmap)
- *pixmap = GTK_CMCELL_PIXTEXT (clist_row->cell[column])->pixmap;
-
- /* mask can be NULL */
- if (mask)
- *mask = GTK_CMCELL_PIXTEXT (clist_row->cell[column])->mask;
+ if (pixbuf)
+ *pixbuf = GTK_CMCELL_PIXTEXT (clist_row->cell[column])->pixbuf;
return 1;
}
GtkCMCellType type,
const gchar *text,
guint8 spacing,
- GdkPixmap *pixmap,
- GdkBitmap *mask)
+ GdkPixbuf *pixbuf)
{
GtkRequisition requisition;
gchar *old_text = NULL;
- GdkPixmap *old_pixmap = NULL;
- GdkBitmap *old_mask = NULL;
+ GdkPixbuf *old_pixbuf = NULL;
g_return_if_fail (GTK_IS_CMCLIST (clist));
g_return_if_fail (clist_row != NULL);
case GTK_CMCELL_TEXT:
old_text = GTK_CMCELL_TEXT (clist_row->cell[column])->text;
break;
- case GTK_CMCELL_PIXMAP:
- old_pixmap = GTK_CMCELL_PIXMAP (clist_row->cell[column])->pixmap;
- old_mask = GTK_CMCELL_PIXMAP (clist_row->cell[column])->mask;
+ case GTK_CMCELL_PIXBUF:
+ old_pixbuf = GTK_CMCELL_PIXBUF (clist_row->cell[column])->pixbuf;
break;
case GTK_CMCELL_PIXTEXT:
old_text = GTK_CMCELL_PIXTEXT (clist_row->cell[column])->text;
- old_pixmap = GTK_CMCELL_PIXTEXT (clist_row->cell[column])->pixmap;
- old_mask = GTK_CMCELL_PIXTEXT (clist_row->cell[column])->mask;
+ old_pixbuf = GTK_CMCELL_PIXTEXT (clist_row->cell[column])->pixbuf;
break;
case GTK_CMCELL_WIDGET:
/* unimplemented */
clist_row->cell[column].type = GTK_CMCELL_EMPTY;
- /* Note that pixmap and mask were already ref'ed by the caller
+ /* Note that pixbuf and mask were already ref'ed by the caller
*/
switch (type)
{
GTK_CMCELL_TEXT (clist_row->cell[column])->text = g_strdup (text);
}
break;
- case GTK_CMCELL_PIXMAP:
- if (pixmap)
+ case GTK_CMCELL_PIXBUF:
+ if (pixbuf)
{
- clist_row->cell[column].type = GTK_CMCELL_PIXMAP;
- GTK_CMCELL_PIXMAP (clist_row->cell[column])->pixmap = pixmap;
- /* We set the mask even if it is NULL */
- GTK_CMCELL_PIXMAP (clist_row->cell[column])->mask = mask;
+ clist_row->cell[column].type = GTK_CMCELL_PIXBUF;
+ GTK_CMCELL_PIXBUF (clist_row->cell[column])->pixbuf = pixbuf;
}
break;
case GTK_CMCELL_PIXTEXT:
- if (text && pixmap)
+ if (text && pixbuf)
{
clist_row->cell[column].type = GTK_CMCELL_PIXTEXT;
GTK_CMCELL_PIXTEXT (clist_row->cell[column])->text = g_strdup (text);
GTK_CMCELL_PIXTEXT (clist_row->cell[column])->spacing = spacing;
- GTK_CMCELL_PIXTEXT (clist_row->cell[column])->pixmap = pixmap;
- GTK_CMCELL_PIXTEXT (clist_row->cell[column])->mask = mask;
+ GTK_CMCELL_PIXTEXT (clist_row->cell[column])->pixbuf = pixbuf;
}
break;
default:
column_auto_resize (clist, clist_row, column, requisition.width);
g_free (old_text);
- if (old_pixmap)
- g_object_unref (old_pixmap);
- if (old_mask)
- g_object_unref (old_mask);
+ if (old_pixbuf)
+ g_object_unref (old_pixbuf);
}
PangoLayout *
switch (clist_row->cell[column].type)
{
case GTK_CMCELL_PIXTEXT:
- gdk_drawable_get_size (GTK_CMCELL_PIXTEXT (clist_row->cell[column])->pixmap,
- &width, &height);
+ width = gdk_pixbuf_get_width(GTK_CMCELL_PIXTEXT (clist_row->cell[column])->pixbuf);
+ height = gdk_pixbuf_get_height(GTK_CMCELL_PIXTEXT (clist_row->cell[column])->pixbuf);
requisition->width += width;
requisition->height = MAX (requisition->height, height);
break;
- case GTK_CMCELL_PIXMAP:
- gdk_drawable_get_size (GTK_CMCELL_PIXMAP (clist_row->cell[column])->pixmap,
- &width, &height);
+ case GTK_CMCELL_PIXBUF:
+ width = gdk_pixbuf_get_width(GTK_CMCELL_PIXBUF (clist_row->cell[column])->pixbuf);
+ height = gdk_pixbuf_get_height(GTK_CMCELL_PIXBUF (clist_row->cell[column])->pixbuf);
requisition->width += width;
requisition->height = MAX (requisition->height, height);
break;
for (i = 0; i < clist->columns; i++)
if (text[i])
GTK_CMCLIST_GET_CLASS (clist)->set_cell_contents
- (clist, clist_row, i, GTK_CMCELL_TEXT, text[i], 0, NULL ,NULL);
+ (clist, clist_row, i, GTK_CMCELL_TEXT, text[i], 0, NULL);
if (!clist->rows)
{
/* PRIVATE DRAWING FUNCTIONS
* get_cell_style
- * draw_cell_pixmap
+ * draw_cell_pixbuf
* draw_row
* draw_rows
* draw_xor_line
}
static gint
-draw_cell_pixmap (GdkWindow *window,
+draw_cell_pixbuf (GdkWindow *window,
GdkRectangle *clip_rectangle,
GdkGC *fg_gc,
- GdkPixmap *pixmap,
- GdkBitmap *mask,
+ GdkPixbuf *pixbuf,
gint x,
gint y,
gint width,
gint xsrc = 0;
gint ysrc = 0;
- if (mask)
- {
- gdk_gc_set_clip_mask (fg_gc, mask);
- gdk_gc_set_clip_origin (fg_gc, x, y);
- }
+ gdk_gc_set_clip_origin (fg_gc, x, y);
if (x < clip_rectangle->x)
{
if (y + height > clip_rectangle->y + clip_rectangle->height)
height = clip_rectangle->y + clip_rectangle->height - y;
- gdk_draw_drawable (window, fg_gc, pixmap, xsrc, ysrc, x, y, width, height);
+ gdk_draw_pixbuf (window, fg_gc, pixbuf, xsrc, ysrc, x, y, width, height, GDK_RGB_DITHER_NONE, 0, 0);
gdk_gc_set_clip_origin (fg_gc, 0, 0);
- if (mask)
- gdk_gc_set_clip_mask (fg_gc, NULL);
return x + MAX (width, 0);
}
gint width;
gint height;
- gint pixmap_width;
+ gint pixbuf_width;
gint offset = 0;
if (!clist->column[i].visible)
else
width = 0;
- pixmap_width = 0;
+ pixbuf_width = 0;
+ height = 0;
offset = 0;
switch (clist_row->cell[i].type)
{
- case GTK_CMCELL_PIXMAP:
- gdk_drawable_get_size (GTK_CMCELL_PIXMAP (clist_row->cell[i])->pixmap,
- &pixmap_width, &height);
- width += pixmap_width;
+ case GTK_CMCELL_PIXBUF:
+ pixbuf_width = gdk_pixbuf_get_width(GTK_CMCELL_PIXBUF (clist_row->cell[i])->pixbuf);
+ height = gdk_pixbuf_get_height(GTK_CMCELL_PIXBUF (clist_row->cell[i])->pixbuf);
+ width += pixbuf_width;
break;
case GTK_CMCELL_PIXTEXT:
- gdk_drawable_get_size (GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixmap,
- &pixmap_width, &height);
- width += pixmap_width + GTK_CMCELL_PIXTEXT (clist_row->cell[i])->spacing;
+ pixbuf_width = gdk_pixbuf_get_width(GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixbuf);
+ height = gdk_pixbuf_get_height(GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixbuf);
+ width += pixbuf_width + GTK_CMCELL_PIXTEXT (clist_row->cell[i])->spacing;
break;
default:
break;
break;
};
- /* Draw Text and/or Pixmap */
+ /* Draw Text and/or Pixbuf */
switch (clist_row->cell[i].type)
{
- case GTK_CMCELL_PIXMAP:
- draw_cell_pixmap (clist->clist_window, &clip_rectangle, fg_gc,
- GTK_CMCELL_PIXMAP (clist_row->cell[i])->pixmap,
- GTK_CMCELL_PIXMAP (clist_row->cell[i])->mask,
+ case GTK_CMCELL_PIXBUF:
+ draw_cell_pixbuf (clist->clist_window, &clip_rectangle, fg_gc,
+ GTK_CMCELL_PIXBUF (clist_row->cell[i])->pixbuf,
offset,
clip_rectangle.y + clist_row->cell[i].vertical +
(clip_rectangle.height - height) / 2,
- pixmap_width, height);
+ pixbuf_width, height);
break;
case GTK_CMCELL_PIXTEXT:
offset =
- draw_cell_pixmap (clist->clist_window, &clip_rectangle, fg_gc,
- GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixmap,
- GTK_CMCELL_PIXTEXT (clist_row->cell[i])->mask,
+ draw_cell_pixbuf (clist->clist_window, &clip_rectangle, fg_gc,
+ GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixbuf,
offset,
clip_rectangle.y + clist_row->cell[i].vertical+
(clip_rectangle.height - height) / 2,
- pixmap_width, height);
+ pixbuf_width, height);
offset += GTK_CMCELL_PIXTEXT (clist_row->cell[i])->spacing;
/* Fall through */
for (i = 0; i < clist->columns; i++)
{
GTK_CMCLIST_GET_CLASS (clist)->set_cell_contents
- (clist, clist_row, i, GTK_CMCELL_EMPTY, NULL, 0, NULL, NULL);
+ (clist, clist_row, i, GTK_CMCELL_EMPTY, NULL, 0, NULL);
if (clist_row->cell[i].style)
{
if (GTK_WIDGET_REALIZED (clist))
{
GTK_CMCELL_EMPTY,
GTK_CMCELL_TEXT,
- GTK_CMCELL_PIXMAP,
+ GTK_CMCELL_PIXBUF,
GTK_CMCELL_PIXTEXT,
GTK_CMCELL_WIDGET
} GtkCMCellType;
/* pointer casting for cells */
#define GTK_CMCELL_TEXT(cell) (((GtkCMCellText *) &(cell)))
-#define GTK_CMCELL_PIXMAP(cell) (((GtkCMCellPixmap *) &(cell)))
+#define GTK_CMCELL_PIXBUF(cell) (((GtkCMCellPixbuf *) &(cell)))
#define GTK_CMCELL_PIXTEXT(cell) (((GtkCMCellPixText *) &(cell)))
#define GTK_CMCELL_WIDGET(cell) (((GtkCMCellWidget *) &(cell)))
typedef struct _GtkCMCell GtkCMCell;
typedef struct _GtkCMCellText GtkCMCellText;
-typedef struct _GtkCMCellPixmap GtkCMCellPixmap;
+typedef struct _GtkCMCellPixbuf GtkCMCellPixbuf;
typedef struct _GtkCMCellPixText GtkCMCellPixText;
typedef struct _GtkCMCellWidget GtkCMCellWidget;
GtkCMCellType type,
const gchar *text,
guint8 spacing,
- GdkPixmap *pixmap,
- GdkBitmap *mask);
+ GdkPixbuf *pixbuf);
void (*cell_size_request) (GtkCMCList *clist,
GtkCMCListRow *clist_row,
gint column,
gchar *text;
};
-struct _GtkCMCellPixmap
+struct _GtkCMCellPixbuf
{
GtkCMCellType type;
GtkStyle *style;
- GdkPixmap *pixmap;
- GdkBitmap *mask;
+ GdkPixbuf *pixbuf;
};
struct _GtkCMCellPixText
gchar *text;
guint8 spacing;
- GdkPixmap *pixmap;
- GdkBitmap *mask;
+ GdkPixbuf *pixbuf;
};
struct _GtkCMCellWidget
gchar *text;
struct {
- GdkPixmap *pixmap;
- GdkBitmap *mask;
+ GdkPixbuf *pixbuf;
} pm;
struct {
gchar *text;
guint8 spacing;
- GdkPixmap *pixmap;
- GdkBitmap *mask;
+ GdkPixbuf *pixbuf;
} pt;
GtkWidget *widget;
gint column,
gchar **text);
-/* sets a given cell's pixmap, replacing its current contents */
-void gtk_cmclist_set_pixmap (GtkCMCList *clist,
+/* sets a given cell's pixbuf, replacing its current contents */
+void gtk_cmclist_set_pixbuf (GtkCMCList *clist,
gint row,
gint column,
- GdkPixmap *pixmap,
- GdkBitmap *mask);
+ GdkPixbuf *pixbuf);
-gint gtk_cmclist_get_pixmap (GtkCMCList *clist,
+gint gtk_cmclist_get_pixbuf (GtkCMCList *clist,
gint row,
gint column,
- GdkPixmap **pixmap,
- GdkBitmap **mask);
+ GdkPixbuf **pixbuf);
-/* sets a given cell's pixmap and text, replacing its current contents */
+/* sets a given cell's pixbuf and text, replacing its current contents */
void gtk_cmclist_set_pixtext (GtkCMCList *clist,
gint row,
gint column,
const gchar *text,
guint8 spacing,
- GdkPixmap *pixmap,
- GdkBitmap *mask);
+ GdkPixbuf *pixbuf);
gint gtk_cmclist_get_pixtext (GtkCMCList *clist,
gint row,
gint column,
gchar **text,
guint8 *spacing,
- GdkPixmap **pixmap,
- GdkBitmap **mask);
+ GdkPixbuf **pixbuf);
/* sets the foreground color of a row, the color must already
* be allocated
static void ctree_detach_styles (GtkCMCTree *ctree,
GtkCMCTreeNode *node,
gpointer data);
-static gint draw_cell_pixmap (GdkWindow *window,
+static gint draw_cell_pixbuf (GdkWindow *window,
GdkRectangle *clip_rectangle,
GdkGC *fg_gc,
- GdkPixmap *pixmap,
- GdkBitmap *mask,
+ GdkPixbuf *pixbuf,
gint x,
gint y,
gint width,
GtkCMCellType type,
const gchar *text,
guint8 spacing,
- GdkPixmap *pixmap,
- GdkBitmap *mask);
+ GdkPixbuf *pixbuf);
static void set_node_info (GtkCMCTree *ctree,
GtkCMCTreeNode *node,
const gchar *text,
guint8 spacing,
- GdkPixmap *pixmap_closed,
- GdkBitmap *mask_closed,
- GdkPixmap *pixmap_opened,
- GdkBitmap *mask_opened,
+ GdkPixbuf *pixbuf_closed,
+ GdkPixbuf *pixbuf_opened,
gboolean is_leaf,
gboolean expanded);
static GtkCMCTreeRow *row_new (GtkCMCTree *ctree);
}
static gint
-draw_cell_pixmap (GdkWindow *window,
+draw_cell_pixbuf (GdkWindow *window,
GdkRectangle *clip_rectangle,
GdkGC *fg_gc,
- GdkPixmap *pixmap,
- GdkBitmap *mask,
+ GdkPixbuf *pixbuf,
gint x,
gint y,
gint width,
gint xsrc = 0;
gint ysrc = 0;
- if (mask)
- {
- gdk_gc_set_clip_mask (fg_gc, mask);
- gdk_gc_set_clip_origin (fg_gc, x, y);
- }
+ gdk_gc_set_clip_origin (fg_gc, x, y);
if (x < clip_rectangle->x)
{
xsrc = clip_rectangle->x - x;
height = clip_rectangle->y + clip_rectangle->height - y;
if (width > 0 && height > 0)
- gdk_draw_drawable (window, fg_gc, pixmap, xsrc, ysrc, x, y, width, height);
+ gdk_draw_pixbuf (window, fg_gc, pixbuf, xsrc, ysrc, x, y, width, height, GDK_RGB_DITHER_NONE, 0, 0);
- if (mask)
- {
- gdk_gc_set_clip_rectangle (fg_gc, NULL);
- gdk_gc_set_clip_origin (fg_gc, 0, 0);
- }
+ gdk_gc_set_clip_origin (fg_gc, 0, 0);
return x + MAX (width, 0);
}
gint width;
gint height;
- gint pixmap_width;
+ gint pixbuf_width;
gint string_width;
gint old_offset;
cell_rectangle.height = clip_rectangle.height;
string_width = 0;
- pixmap_width = 0;
+ pixbuf_width = 0;
+ height = 0;
if (area && !gdk_rectangle_intersect (area, &cell_rectangle,
&intersect_rectangle))
switch (clist_row->cell[i].type)
{
- case GTK_CMCELL_PIXMAP:
- gdk_drawable_get_size
- (GTK_CMCELL_PIXMAP (clist_row->cell[i])->pixmap, &pixmap_width,
- &height);
- width += pixmap_width;
+ case GTK_CMCELL_PIXBUF:
+ pixbuf_width = gdk_pixbuf_get_width(GTK_CMCELL_PIXBUF (clist_row->cell[i])->pixbuf);
+ height = gdk_pixbuf_get_height(GTK_CMCELL_PIXBUF (clist_row->cell[i])->pixbuf);
+ width += pixbuf_width;
break;
case GTK_CMCELL_PIXTEXT:
- if (GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixmap)
+ if (GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixbuf)
{
- gdk_drawable_get_size
- (GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixmap,
- &pixmap_width, &height);
- width += pixmap_width;
+ pixbuf_width = gdk_pixbuf_get_width(GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixbuf);
+ height = gdk_pixbuf_get_height(GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixbuf);
+ width += pixbuf_width;
}
if (GTK_CMCELL_PIXTEXT (clist_row->cell[i])->text &&
- GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixmap)
+ GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixbuf)
width += GTK_CMCELL_PIXTEXT (clist_row->cell[i])->spacing;
if (i == ctree->tree_column)
offset += clist_row->cell[i].horizontal;
switch (clist_row->cell[i].type)
{
- case GTK_CMCELL_PIXMAP:
- draw_cell_pixmap
+ case GTK_CMCELL_PIXBUF:
+ draw_cell_pixbuf
(clist->clist_window, &clip_rectangle, fg_gc,
- GTK_CMCELL_PIXMAP (clist_row->cell[i])->pixmap,
- GTK_CMCELL_PIXMAP (clist_row->cell[i])->mask,
+ GTK_CMCELL_PIXBUF (clist_row->cell[i])->pixbuf,
offset,
clip_rectangle.y + clist_row->cell[i].vertical +
(clip_rectangle.height - height) / 2,
- pixmap_width, height);
+ pixbuf_width, height);
break;
case GTK_CMCELL_PIXTEXT:
- offset = draw_cell_pixmap
+ offset = draw_cell_pixbuf
(clist->clist_window, &clip_rectangle, fg_gc,
- GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixmap,
- GTK_CMCELL_PIXTEXT (clist_row->cell[i])->mask,
+ GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixbuf,
offset,
clip_rectangle.y + clist_row->cell[i].vertical +
(clip_rectangle.height - height) / 2,
- pixmap_width, height);
+ pixbuf_width, height);
offset += GTK_CMCELL_PIXTEXT (clist_row->cell[i])->spacing;
/* Fall through */
offset += ctree->tree_spacing;
if (clist->column[i].justification == GTK_JUSTIFY_RIGHT)
- offset -= (pixmap_width + clist_row->cell[i].horizontal);
+ offset -= (pixbuf_width + clist_row->cell[i].horizontal);
else
offset += clist_row->cell[i].horizontal;
old_offset = offset;
- offset = draw_cell_pixmap (clist->clist_window, &clip_rectangle, fg_gc,
- GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixmap,
- GTK_CMCELL_PIXTEXT (clist_row->cell[i])->mask,
+ offset = draw_cell_pixbuf (clist->clist_window, &clip_rectangle, fg_gc,
+ GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixbuf,
offset,
clip_rectangle.y + clist_row->cell[i].vertical
+ (clip_rectangle.height - height) / 2,
- pixmap_width, height);
+ pixbuf_width, height);
if (layout)
{
if (clist->column[i].justification == GTK_JUSTIFY_RIGHT)
{
offset = (old_offset - string_width);
- if (GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixmap)
+ if (GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixbuf)
offset -= GTK_CMCELL_PIXTEXT (clist_row->cell[i])->spacing;
}
else
{
- if (GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixmap)
+ if (GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixbuf)
offset += GTK_CMCELL_PIXTEXT (clist_row->cell[i])->spacing;
}
GTK_CMCLIST_GET_CLASS (clist)->cell_size_request
(clist, >K_CMCTREE_ROW (node)->row, ctree->tree_column, &requisition);
- /* unref/unset closed pixmap */
+ /* unref/unset closed pixbuf */
if (GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixmap)
+ (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixbuf)
{
g_object_unref
(GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixmap);
+ (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixbuf);
GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixmap = NULL;
-
- if (GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->mask)
- {
- g_object_unref
- (GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->mask);
- GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->mask = NULL;
- }
+ (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixbuf = NULL;
}
- /* set/ref opened pixmap */
- if (GTK_CMCTREE_ROW (node)->pixmap_opened)
+ /* set/ref opened pixbuf */
+ if (GTK_CMCTREE_ROW (node)->pixbuf_opened)
{
GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixmap =
- g_object_ref (GTK_CMCTREE_ROW (node)->pixmap_opened);
-
- if (GTK_CMCTREE_ROW (node)->mask_opened)
- GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->mask =
- g_object_ref (GTK_CMCTREE_ROW (node)->mask_opened);
+ (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixbuf =
+ g_object_ref (GTK_CMCTREE_ROW (node)->pixbuf_opened);
}
GTK_CMCLIST_GET_CLASS (clist)->cell_size_request
(clist, >K_CMCTREE_ROW (node)->row, ctree->tree_column, &requisition);
- /* unref/unset opened pixmap */
+ /* unref/unset opened pixbuf */
if (GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixmap)
+ (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixbuf)
{
g_object_unref
(GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixmap);
+ (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixbuf);
GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixmap = NULL;
-
- if (GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->mask)
- {
- g_object_unref
- (GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->mask);
- GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->mask = NULL;
- }
+ (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixbuf = NULL;
}
- /* set/ref closed pixmap */
- if (GTK_CMCTREE_ROW (node)->pixmap_closed)
+ /* set/ref closed pixbuf */
+ if (GTK_CMCTREE_ROW (node)->pixbuf_closed)
{
GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixmap =
- g_object_ref (GTK_CMCTREE_ROW (node)->pixmap_closed);
-
- if (GTK_CMCTREE_ROW (node)->mask_closed)
- GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->mask =
- g_object_ref (GTK_CMCTREE_ROW (node)->mask_closed);
+ (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixbuf =
+ g_object_ref (GTK_CMCTREE_ROW (node)->pixbuf_closed);
}
work = GTK_CMCTREE_ROW (node)->children;
switch (clist_row->cell[column].type)
{
case GTK_CMCELL_PIXTEXT:
- if (GTK_CMCELL_PIXTEXT (clist_row->cell[column])->pixmap)
+ if (GTK_CMCELL_PIXTEXT (clist_row->cell[column])->pixbuf)
{
- gdk_drawable_get_size (GTK_CMCELL_PIXTEXT
- (clist_row->cell[column])->pixmap,
- &width, &height);
+ width = gdk_pixbuf_get_width(GTK_CMCELL_PIXTEXT (clist_row->cell[column])->pixbuf);
+ height = gdk_pixbuf_get_height(GTK_CMCELL_PIXTEXT (clist_row->cell[column])->pixbuf);
width += GTK_CMCELL_PIXTEXT (clist_row->cell[column])->spacing;
}
else
requisition->width += 3;
}
break;
- case GTK_CMCELL_PIXMAP:
- gdk_drawable_get_size (GTK_CMCELL_PIXMAP (clist_row->cell[column])->pixmap,
- &width, &height);
+ case GTK_CMCELL_PIXBUF:
+ width = gdk_pixbuf_get_width(GTK_CMCELL_PIXBUF (clist_row->cell[column])->pixbuf);
+ height = gdk_pixbuf_get_height(GTK_CMCELL_PIXBUF (clist_row->cell[column])->pixbuf);
requisition->width += width;
requisition->height = MAX (requisition->height, height);
break;
GtkCMCellType type,
const gchar *text,
guint8 spacing,
- GdkPixmap *pixmap,
- GdkBitmap *mask)
+ GdkPixbuf *pixbuf)
{
gboolean visible = FALSE;
GtkCMCTree *ctree;
GtkRequisition requisition;
gchar *old_text = NULL;
- GdkPixmap *old_pixmap = NULL;
- GdkBitmap *old_mask = NULL;
+ GdkPixbuf *old_pixbuf = NULL;
g_return_if_fail (GTK_IS_CMCTREE (clist));
g_return_if_fail (clist_row != NULL);
case GTK_CMCELL_TEXT:
old_text = GTK_CMCELL_TEXT (clist_row->cell[column])->text;
break;
- case GTK_CMCELL_PIXMAP:
- old_pixmap = GTK_CMCELL_PIXMAP (clist_row->cell[column])->pixmap;
- old_mask = GTK_CMCELL_PIXMAP (clist_row->cell[column])->mask;
+ case GTK_CMCELL_PIXBUF:
+ old_pixbuf = GTK_CMCELL_PIXBUF (clist_row->cell[column])->pixbuf;
break;
case GTK_CMCELL_PIXTEXT:
old_text = GTK_CMCELL_PIXTEXT (clist_row->cell[column])->text;
- old_pixmap = GTK_CMCELL_PIXTEXT (clist_row->cell[column])->pixmap;
- old_mask = GTK_CMCELL_PIXTEXT (clist_row->cell[column])->mask;
+ old_pixbuf = GTK_CMCELL_PIXTEXT (clist_row->cell[column])->pixbuf;
break;
case GTK_CMCELL_WIDGET:
/* unimplemented */
if (column == ctree->tree_column && type != GTK_CMCELL_EMPTY)
type = GTK_CMCELL_PIXTEXT;
- /* Note that pixmap and mask were already ref'ed by the caller
+ /* Note that pixbuf and mask were already ref'ed by the caller
*/
switch (type)
{
GTK_CMCELL_TEXT (clist_row->cell[column])->text = g_strdup (text);
}
break;
- case GTK_CMCELL_PIXMAP:
- if (pixmap)
+ case GTK_CMCELL_PIXBUF:
+ if (pixbuf)
{
- clist_row->cell[column].type = GTK_CMCELL_PIXMAP;
- GTK_CMCELL_PIXMAP (clist_row->cell[column])->pixmap = pixmap;
- /* We set the mask even if it is NULL */
- GTK_CMCELL_PIXMAP (clist_row->cell[column])->mask = mask;
+ clist_row->cell[column].type = GTK_CMCELL_PIXBUF;
+ GTK_CMCELL_PIXBUF (clist_row->cell[column])->pixbuf = pixbuf;
}
break;
case GTK_CMCELL_PIXTEXT:
GTK_CMCELL_PIXTEXT (clist_row->cell[column])->text = g_strdup (text);
else
GTK_CMCELL_PIXTEXT (clist_row->cell[column])->text = NULL;
- if (pixmap)
+ if (pixbuf)
{
- GTK_CMCELL_PIXTEXT (clist_row->cell[column])->pixmap = pixmap;
- GTK_CMCELL_PIXTEXT (clist_row->cell[column])->mask = mask;
+ GTK_CMCELL_PIXTEXT (clist_row->cell[column])->pixbuf = pixbuf;
}
else
{
- GTK_CMCELL_PIXTEXT (clist_row->cell[column])->pixmap = NULL;
- GTK_CMCELL_PIXTEXT (clist_row->cell[column])->mask = NULL;
+ GTK_CMCELL_PIXTEXT (clist_row->cell[column])->pixbuf = NULL;
}
}
- else if (text && pixmap)
+ else if (text && pixbuf)
{
clist_row->cell[column].type = GTK_CMCELL_PIXTEXT;
GTK_CMCELL_PIXTEXT (clist_row->cell[column])->text = g_strdup (text);
GTK_CMCELL_PIXTEXT (clist_row->cell[column])->spacing = spacing;
- GTK_CMCELL_PIXTEXT (clist_row->cell[column])->pixmap = pixmap;
- GTK_CMCELL_PIXTEXT (clist_row->cell[column])->mask = mask;
+ GTK_CMCELL_PIXTEXT (clist_row->cell[column])->pixbuf = pixbuf;
}
break;
default:
column_auto_resize (clist, clist_row, column, requisition.width);
g_free (old_text);
- if (old_pixmap)
- g_object_unref (old_pixmap);
- if (old_mask)
- g_object_unref (old_mask);
+ if (old_pixbuf)
+ g_object_unref (old_pixbuf);
}
static void
GtkCMCTreeNode *node,
const gchar *text,
guint8 spacing,
- GdkPixmap *pixmap_closed,
- GdkBitmap *mask_closed,
- GdkPixmap *pixmap_opened,
- GdkBitmap *mask_opened,
+ GdkPixbuf *pixbuf_closed,
+ GdkPixbuf *pixbuf_opened,
gboolean is_leaf,
gboolean expanded)
{
- if (GTK_CMCTREE_ROW (node)->pixmap_opened)
+ if (GTK_CMCTREE_ROW (node)->pixbuf_opened)
{
- g_object_unref (GTK_CMCTREE_ROW (node)->pixmap_opened);
- if (GTK_CMCTREE_ROW (node)->mask_opened)
- g_object_unref (GTK_CMCTREE_ROW (node)->mask_opened);
+ g_object_unref (GTK_CMCTREE_ROW (node)->pixbuf_opened);
}
- if (GTK_CMCTREE_ROW (node)->pixmap_closed)
+ if (GTK_CMCTREE_ROW (node)->pixbuf_closed)
{
- g_object_unref (GTK_CMCTREE_ROW (node)->pixmap_closed);
- if (GTK_CMCTREE_ROW (node)->mask_closed)
- g_object_unref (GTK_CMCTREE_ROW (node)->mask_closed);
+ g_object_unref (GTK_CMCTREE_ROW (node)->pixbuf_closed);
}
- GTK_CMCTREE_ROW (node)->pixmap_opened = NULL;
- GTK_CMCTREE_ROW (node)->mask_opened = NULL;
- GTK_CMCTREE_ROW (node)->pixmap_closed = NULL;
- GTK_CMCTREE_ROW (node)->mask_closed = NULL;
+ GTK_CMCTREE_ROW (node)->pixbuf_opened = NULL;
+ GTK_CMCTREE_ROW (node)->pixbuf_closed = NULL;
- if (pixmap_closed)
+ if (pixbuf_closed)
{
- GTK_CMCTREE_ROW (node)->pixmap_closed = g_object_ref (pixmap_closed);
- if (mask_closed)
- GTK_CMCTREE_ROW (node)->mask_closed = g_object_ref (mask_closed);
+ GTK_CMCTREE_ROW (node)->pixbuf_closed = g_object_ref (pixbuf_closed);
}
- if (pixmap_opened)
+ if (pixbuf_opened)
{
- GTK_CMCTREE_ROW (node)->pixmap_opened = g_object_ref (pixmap_opened);
- if (mask_opened)
- GTK_CMCTREE_ROW (node)->mask_opened = g_object_ref (mask_opened);
+ GTK_CMCTREE_ROW (node)->pixbuf_opened = g_object_ref (pixbuf_opened);
}
GTK_CMCTREE_ROW (node)->is_leaf = is_leaf;
if (GTK_CMCTREE_ROW (node)->expanded)
gtk_cmctree_node_set_pixtext (ctree, node, ctree->tree_column,
- text, spacing, pixmap_opened, mask_opened);
+ text, spacing, pixbuf_opened);
else
gtk_cmctree_node_set_pixtext (ctree, node, ctree->tree_column,
- text, spacing, pixmap_closed, mask_closed);
+ text, spacing, pixbuf_closed);
}
static void
ctree_row->parent = NULL;
ctree_row->sibling = NULL;
ctree_row->children = NULL;
- ctree_row->pixmap_closed = NULL;
- ctree_row->mask_closed = NULL;
- ctree_row->pixmap_opened = NULL;
- ctree_row->mask_opened = NULL;
+ ctree_row->pixbuf_closed = NULL;
+ ctree_row->pixbuf_opened = NULL;
return ctree_row;
}
for (i = 0; i < clist->columns; i++)
{
GTK_CMCLIST_GET_CLASS (clist)->set_cell_contents
- (clist, &(ctree_row->row), i, GTK_CMCELL_EMPTY, NULL, 0, NULL, NULL);
+ (clist, &(ctree_row->row), i, GTK_CMCELL_EMPTY, NULL, 0, NULL);
if (ctree_row->row.cell[i].style)
{
if (GTK_WIDGET_REALIZED (ctree))
g_object_unref (ctree_row->row.style);
}
- if (ctree_row->pixmap_closed)
+ if (ctree_row->pixbuf_closed)
{
- g_object_unref (ctree_row->pixmap_closed);
- if (ctree_row->mask_closed)
- g_object_unref (ctree_row->mask_closed);
+ g_object_unref (ctree_row->pixbuf_closed);
}
- if (ctree_row->pixmap_opened)
+ if (ctree_row->pixbuf_opened)
{
- g_object_unref (ctree_row->pixmap_opened);
- if (ctree_row->mask_opened)
- g_object_unref (ctree_row->mask_opened);
+ g_object_unref (ctree_row->pixbuf_opened);
}
if (ctree_row->row.destroy)
parent = GTK_CMCTREE_ROW (sibling)->parent;
node = gtk_cmctree_insert_node (GTK_CMCTREE (clist), parent, sibling, text, 5,
- NULL, NULL, NULL, NULL, TRUE, FALSE);
+ NULL, NULL, TRUE, FALSE);
if (GTK_CMCLIST_AUTO_SORT (clist) || !sibling)
return g_list_position (clist->row_list, (GList *) node);
GtkCMCTreeNode *sibling,
gchar *text[],
guint8 spacing,
- GdkPixmap *pixmap_closed,
- GdkBitmap *mask_closed,
- GdkPixmap *pixmap_opened,
- GdkBitmap *mask_opened,
+ GdkPixbuf *pixbuf_closed,
+ GdkPixbuf *pixbuf_opened,
gboolean is_leaf,
gboolean expanded)
{
for (i = 0; i < clist->columns; i++)
if (text[i] && i != ctree->tree_column)
GTK_CMCLIST_GET_CLASS (clist)->set_cell_contents
- (clist, &(new_row->row), i, GTK_CMCELL_TEXT, text[i], 0, NULL, NULL);
+ (clist, &(new_row->row), i, GTK_CMCELL_TEXT, text[i], 0, NULL);
set_node_info (ctree, node, text ?
- text[ctree->tree_column] : NULL, spacing, pixmap_closed,
- mask_closed, pixmap_opened, mask_opened, is_leaf, expanded);
+ text[ctree->tree_column] : NULL, spacing, pixbuf_closed,
+ pixbuf_opened, is_leaf, expanded);
/* sorted insertion */
if (GTK_CMCLIST_AUTO_SORT (clist))
gtk_cmclist_freeze (clist);
- set_node_info (ctree, cnode, "", 0, NULL, NULL, NULL, NULL, TRUE, FALSE);
+ set_node_info (ctree, cnode, "", 0, NULL, NULL, TRUE, FALSE);
if (!func (ctree, depth, gnode, cnode, data))
{
GTK_CMCLIST_GET_CLASS (clist)->set_cell_contents
(clist, &(GTK_CMCTREE_ROW (node)->row), column, GTK_CMCELL_TEXT,
- text, 0, NULL, NULL);
+ text, 0, NULL);
tree_draw_node (ctree, node);
}
void
-gtk_cmctree_node_set_pixmap (GtkCMCTree *ctree,
+gtk_cmctree_node_set_pixbuf (GtkCMCTree *ctree,
GtkCMCTreeNode *node,
gint column,
- GdkPixmap *pixmap,
- GdkBitmap *mask)
+ GdkPixbuf *pixbuf)
{
GtkCMCList *clist;
g_return_if_fail (GTK_IS_CMCTREE (ctree));
g_return_if_fail (node != NULL);
- g_return_if_fail (pixmap != NULL);
+ g_return_if_fail (pixbuf != NULL);
if (column < 0 || column >= GTK_CMCLIST (ctree)->columns)
return;
- g_object_ref (pixmap);
- if (mask)
- g_object_ref (mask);
+ g_object_ref (pixbuf);
clist = GTK_CMCLIST (ctree);
GTK_CMCLIST_GET_CLASS (clist)->set_cell_contents
- (clist, &(GTK_CMCTREE_ROW (node)->row), column, GTK_CMCELL_PIXMAP,
- NULL, 0, pixmap, mask);
+ (clist, &(GTK_CMCTREE_ROW (node)->row), column, GTK_CMCELL_PIXBUF,
+ NULL, 0, pixbuf);
tree_draw_node (ctree, node);
}
gint column,
const gchar *text,
guint8 spacing,
- GdkPixmap *pixmap,
- GdkBitmap *mask)
+ GdkPixbuf *pixbuf)
{
GtkCMCList *clist;
g_return_if_fail (GTK_IS_CMCTREE (ctree));
g_return_if_fail (node != NULL);
if (column != ctree->tree_column)
- g_return_if_fail (pixmap != NULL);
+ g_return_if_fail (pixbuf != NULL);
if (column < 0 || column >= GTK_CMCLIST (ctree)->columns)
return;
clist = GTK_CMCLIST (ctree);
- if (pixmap)
+ if (pixbuf)
{
- g_object_ref (pixmap);
- if (mask)
- g_object_ref (mask);
+ g_object_ref (pixbuf);
}
GTK_CMCLIST_GET_CLASS (clist)->set_cell_contents
(clist, &(GTK_CMCTREE_ROW (node)->row), column, GTK_CMCELL_PIXTEXT,
- text, spacing, pixmap, mask);
+ text, spacing, pixbuf);
tree_draw_node (ctree, node);
}
GtkCMCTreeNode *node,
const gchar *text,
guint8 spacing,
- GdkPixmap *pixmap_closed,
- GdkBitmap *mask_closed,
- GdkPixmap *pixmap_opened,
- GdkBitmap *mask_opened,
+ GdkPixbuf *pixbuf_closed,
+ GdkPixbuf *pixbuf_opened,
gboolean is_leaf,
gboolean expanded)
{
}
}
- set_node_info (ctree, node, text, spacing, pixmap_closed, mask_closed,
- pixmap_opened, mask_opened, is_leaf, expanded);
+ set_node_info (ctree, node, text, spacing, pixbuf_closed,
+ pixbuf_opened, is_leaf, expanded);
if (!is_leaf && !old_leaf)
{
}
gboolean
-gtk_cmctree_node_get_pixmap (GtkCMCTree *ctree,
+gtk_cmctree_node_get_pixbuf (GtkCMCTree *ctree,
GtkCMCTreeNode *node,
gint column,
- GdkPixmap **pixmap,
- GdkBitmap **mask)
+ GdkPixbuf **pixbuf)
{
g_return_val_if_fail (GTK_IS_CMCTREE (ctree), FALSE);
g_return_val_if_fail (node != NULL, FALSE);
if (column < 0 || column >= GTK_CMCLIST (ctree)->columns)
return FALSE;
- if (GTK_CMCTREE_ROW (node)->row.cell[column].type != GTK_CMCELL_PIXMAP)
+ if (GTK_CMCTREE_ROW (node)->row.cell[column].type != GTK_CMCELL_PIXBUF)
return FALSE;
- if (pixmap)
- *pixmap = GTK_CMCELL_PIXMAP (GTK_CMCTREE_ROW (node)->row.cell[column])->pixmap;
- if (mask)
- *mask = GTK_CMCELL_PIXMAP (GTK_CMCTREE_ROW (node)->row.cell[column])->mask;
+ if (pixbuf)
+ *pixbuf = GTK_CMCELL_PIXBUF (GTK_CMCTREE_ROW (node)->row.cell[column])->pixbuf;
return TRUE;
}
gint column,
gchar **text,
guint8 *spacing,
- GdkPixmap **pixmap,
- GdkBitmap **mask)
+ GdkPixbuf **pixbuf)
{
g_return_val_if_fail (GTK_IS_CMCTREE (ctree), FALSE);
g_return_val_if_fail (node != NULL, FALSE);
if (spacing)
*spacing = GTK_CMCELL_PIXTEXT (GTK_CMCTREE_ROW
(node)->row.cell[column])->spacing;
- if (pixmap)
- *pixmap = GTK_CMCELL_PIXTEXT (GTK_CMCTREE_ROW
- (node)->row.cell[column])->pixmap;
- if (mask)
- *mask = GTK_CMCELL_PIXTEXT (GTK_CMCTREE_ROW (node)->row.cell[column])->mask;
+ if (pixbuf)
+ *pixbuf = GTK_CMCELL_PIXTEXT (GTK_CMCTREE_ROW
+ (node)->row.cell[column])->pixbuf;
return TRUE;
}
GtkCMCTreeNode *node,
gchar **text,
guint8 *spacing,
- GdkPixmap **pixmap_closed,
- GdkBitmap **mask_closed,
- GdkPixmap **pixmap_opened,
- GdkBitmap **mask_opened,
+ GdkPixbuf **pixbuf_closed,
+ GdkPixbuf **pixbuf_opened,
gboolean *is_leaf,
gboolean *expanded)
{
if (spacing)
*spacing = GTK_CMCELL_PIXTEXT
(GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->spacing;
- if (pixmap_closed)
- *pixmap_closed = GTK_CMCTREE_ROW (node)->pixmap_closed;
- if (mask_closed)
- *mask_closed = GTK_CMCTREE_ROW (node)->mask_closed;
- if (pixmap_opened)
- *pixmap_opened = GTK_CMCTREE_ROW (node)->pixmap_opened;
- if (mask_opened)
- *mask_opened = GTK_CMCTREE_ROW (node)->mask_opened;
+ if (pixbuf_closed)
+ *pixbuf_closed = GTK_CMCTREE_ROW (node)->pixbuf_closed;
+ if (pixbuf_opened)
+ *pixbuf_opened = GTK_CMCTREE_ROW (node)->pixbuf_opened;
if (is_leaf)
*is_leaf = GTK_CMCTREE_ROW (node)->is_leaf;
if (expanded)
GTK_CMCLIST_SET_FLAG (clist, CMCLIST_USE_DRAG_ICONS);
node = GTK_CMCTREE_NODE (g_list_nth (clist->row_list,
clist->click_cell.row));
- if (node)
- {
- if (GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixmap)
- {
- gtk_drag_set_icon_pixmap
- (context,
- gtk_widget_get_colormap (widget),
- GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixmap,
- GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->mask,
- -2, -2);
- return;
- }
- }
gtk_drag_set_icon_default (context);
}
}
GtkCMCTreeNode *sibling;
GtkCMCTreeNode *children;
- GdkPixmap *pixmap_closed;
- GdkBitmap *mask_closed;
- GdkPixmap *pixmap_opened;
- GdkBitmap *mask_opened;
+ GdkPixbuf *pixbuf_closed;
+ GdkPixbuf *pixbuf_opened;
guint16 level;
GtkCMCTreeNode *sibling,
gchar *text[],
guint8 spacing,
- GdkPixmap *pixmap_closed,
- GdkBitmap *mask_closed,
- GdkPixmap *pixmap_opened,
- GdkBitmap *mask_opened,
+ GdkPixbuf *pixbuf_closed,
+ GdkPixbuf *pixbuf_opened,
gboolean is_leaf,
gboolean expanded);
void gtk_cmctree_remove_node (GtkCMCTree *ctree,
GtkCMCTreeNode *node,
gint column,
const gchar *text);
-void gtk_cmctree_node_set_pixmap (GtkCMCTree *ctree,
+void gtk_cmctree_node_set_pixbuf (GtkCMCTree *ctree,
GtkCMCTreeNode *node,
gint column,
- GdkPixmap *pixmap,
- GdkBitmap *mask);
+ GdkPixbuf *pixbuf);
void gtk_cmctree_node_set_pixtext (GtkCMCTree *ctree,
GtkCMCTreeNode *node,
gint column,
const gchar *text,
guint8 spacing,
- GdkPixmap *pixmap,
- GdkBitmap *mask);
+ GdkPixbuf *pixbuf);
void gtk_cmctree_set_node_info (GtkCMCTree *ctree,
GtkCMCTreeNode *node,
const gchar *text,
guint8 spacing,
- GdkPixmap *pixmap_closed,
- GdkBitmap *mask_closed,
- GdkPixmap *pixmap_opened,
- GdkBitmap *mask_opened,
+ GdkPixbuf *pixbuf_closed,
+ GdkPixbuf *pixbuf_opened,
gboolean is_leaf,
gboolean expanded);
void gtk_cmctree_node_set_shift (GtkCMCTree *ctree,
GtkCMCTreeNode *node,
gint column,
gchar **text);
-gboolean gtk_cmctree_node_get_pixmap (GtkCMCTree *ctree,
+gboolean gtk_cmctree_node_get_pixbuf (GtkCMCTree *ctree,
GtkCMCTreeNode *node,
gint column,
- GdkPixmap **pixmap,
- GdkBitmap **mask);
+ GdkPixbuf **pixbuf);
gboolean gtk_cmctree_node_get_pixtext (GtkCMCTree *ctree,
GtkCMCTreeNode *node,
gint column,
gchar **text,
guint8 *spacing,
- GdkPixmap **pixmap,
- GdkBitmap **mask);
+ GdkPixbuf **pixbuf);
gboolean gtk_cmctree_get_node_info (GtkCMCTree *ctree,
GtkCMCTreeNode *node,
gchar **text,
guint8 *spacing,
- GdkPixmap **pixmap_closed,
- GdkBitmap **mask_closed,
- GdkPixmap **pixmap_opened,
- GdkBitmap **mask_opened,
+ GdkPixbuf **pixbuf_closed,
+ GdkPixbuf **pixbuf_opened,
gboolean *is_leaf,
gboolean *expanded);
void gtk_cmctree_node_set_row_style (GtkCMCTree *ctree,
#include "gtksctree.h"
#include "claws-marshal.h"
-#include "stock_pixmap.h"
#include "prefs_common.h"
#include "utils.h"
LAST_SIGNAL
};
-static GdkPixmap *emptyxpm = NULL;
-static GdkBitmap *emptyxpmmask = NULL;
-
static void gtk_sctree_class_init (GtkSCTreeClass *class);
static void gtk_sctree_init (GtkSCTree *sctree);
}
static gint
-gtk_sctree_draw_cell_pixmap (GdkWindow *window,
+gtk_sctree_draw_cell_pixbuf (GdkWindow *window,
GdkRectangle *clip_rectangle,
GdkGC *fg_gc,
- GdkPixmap *pixmap,
- GdkBitmap *mask,
+ GdkPixbuf *pixbuf,
gint x,
gint y,
gint width,
gint xsrc = 0;
gint ysrc = 0;
- if (mask)
- {
- gdk_gc_set_clip_mask (fg_gc, mask);
- gdk_gc_set_clip_origin (fg_gc, x, y);
- }
+ gdk_gc_set_clip_origin (fg_gc, x, y);
if (x < clip_rectangle->x)
{
xsrc = clip_rectangle->x - x;
height = clip_rectangle->y + clip_rectangle->height - y;
if (width > 0 && height > 0)
- gdk_draw_drawable (window, fg_gc, pixmap, xsrc, ysrc, x, y, width, height);
+ gdk_draw_pixbuf (window, fg_gc, pixbuf, xsrc, ysrc, x, y, width, height, GDK_RGB_DITHER_NONE, 0, 0);
- if (mask)
- {
- gdk_gc_set_clip_rectangle (fg_gc, NULL);
- gdk_gc_set_clip_origin (fg_gc, 0, 0);
- }
+ gdk_gc_set_clip_origin (fg_gc, 0, 0);
return x + MAX (width, 0);
}
gint width;
gint height;
- gint pixmap_width;
+ gint pixbuf_width;
gint string_width;
gint old_offset;
cell_rectangle.height = clip_rectangle.height;
string_width = 0;
- pixmap_width = 0;
+ pixbuf_width = 0;
+ height = 0;
if (area && !gdk_rectangle_intersect (area, &cell_rectangle,
&intersect_rectangle))
switch (clist_row->cell[i].type)
{
- case GTK_CMCELL_PIXMAP:
- gdk_drawable_get_size
- (GTK_CMCELL_PIXMAP (clist_row->cell[i])->pixmap, &pixmap_width,
- &height);
- width += pixmap_width;
+ case GTK_CMCELL_PIXBUF:
+ pixbuf_width = gdk_pixbuf_get_width(GTK_CMCELL_PIXBUF (clist_row->cell[i])->pixbuf);
+ height = gdk_pixbuf_get_height(GTK_CMCELL_PIXBUF (clist_row->cell[i])->pixbuf);
+ width += pixbuf_width;
break;
case GTK_CMCELL_PIXTEXT:
- if (GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixmap)
+ if (GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixbuf)
{
- gdk_drawable_get_size
- (GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixmap,
- &pixmap_width, &height);
- width += pixmap_width;
+ pixbuf_width = gdk_pixbuf_get_width(GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixbuf);
+ height = gdk_pixbuf_get_height(GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixbuf);
+ width += pixbuf_width;
}
if (GTK_CMCELL_PIXTEXT (clist_row->cell[i])->text &&
- GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixmap)
+ GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixbuf)
width += GTK_CMCELL_PIXTEXT (clist_row->cell[i])->spacing;
if (i == ctree->tree_column)
offset += clist_row->cell[i].horizontal;
switch (clist_row->cell[i].type)
{
- case GTK_CMCELL_PIXMAP:
- gtk_sctree_draw_cell_pixmap
+ case GTK_CMCELL_PIXBUF:
+ gtk_sctree_draw_cell_pixbuf
(clist->clist_window, &clip_rectangle, fg_gc,
- GTK_CMCELL_PIXMAP (clist_row->cell[i])->pixmap,
- GTK_CMCELL_PIXMAP (clist_row->cell[i])->mask,
+ GTK_CMCELL_PIXBUF (clist_row->cell[i])->pixbuf,
offset,
clip_rectangle.y + clist_row->cell[i].vertical +
start_y,
- pixmap_width, height);
+ pixbuf_width, height);
break;
case GTK_CMCELL_PIXTEXT:
- offset = gtk_sctree_draw_cell_pixmap
+ offset = gtk_sctree_draw_cell_pixbuf
(clist->clist_window, &clip_rectangle, fg_gc,
- GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixmap,
- GTK_CMCELL_PIXTEXT (clist_row->cell[i])->mask,
+ GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixbuf,
offset,
clip_rectangle.y + clist_row->cell[i].vertical +
start_y,
- pixmap_width, height);
+ pixbuf_width, height);
offset += GTK_CMCELL_PIXTEXT (clist_row->cell[i])->spacing;
/* Fall through */
offset += ctree->tree_spacing;
if (clist->column[i].justification == GTK_JUSTIFY_RIGHT)
- offset -= (pixmap_width + clist_row->cell[i].horizontal);
+ offset -= (pixbuf_width + clist_row->cell[i].horizontal);
else
offset += clist_row->cell[i].horizontal;
old_offset = offset;
- offset = gtk_sctree_draw_cell_pixmap (clist->clist_window, &clip_rectangle, fg_gc,
- GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixmap,
- GTK_CMCELL_PIXTEXT (clist_row->cell[i])->mask,
+ offset = gtk_sctree_draw_cell_pixbuf (clist->clist_window, &clip_rectangle, fg_gc,
+ GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixbuf,
offset,
clip_rectangle.y + clist_row->cell[i].vertical
+ (clip_rectangle.height - height) / 2,
- pixmap_width, height);
+ pixbuf_width, height);
if (layout)
{
if (clist->column[i].justification == GTK_JUSTIFY_RIGHT)
{
offset = (old_offset - string_width);
- if (GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixmap)
+ if (GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixbuf)
offset -= GTK_CMCELL_PIXTEXT (clist_row->cell[i])->spacing;
}
else
{
- if (GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixmap)
+ if (GTK_CMCELL_PIXTEXT (clist_row->cell[i])->pixbuf)
offset += GTK_CMCELL_PIXTEXT (clist_row->cell[i])->spacing;
}
GTK_CMCLIST_GET_CLASS (clist)->cell_size_request
(clist, >K_CMCTREE_ROW (node)->row, ctree->tree_column, &requisition);
- /* unref/unset opened pixmap */
+ /* unref/unset opened pixbuf */
if (GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixmap)
+ (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixbuf)
{
g_object_unref
(GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixmap);
+ (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixbuf);
GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixmap = NULL;
-
- if (GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->mask)
- {
- g_object_unref
- (GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->mask);
- GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->mask = NULL;
- }
+ (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixbuf = NULL;
}
- /* set/ref closed pixmap */
- if (GTK_CMCTREE_ROW (node)->pixmap_closed)
+ /* set/ref closed pixbuf */
+ if (GTK_CMCTREE_ROW (node)->pixbuf_closed)
{
GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixmap =
- g_object_ref (GTK_CMCTREE_ROW (node)->pixmap_closed);
-
- if (GTK_CMCTREE_ROW (node)->mask_closed)
- GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->mask =
- g_object_ref (GTK_CMCTREE_ROW (node)->mask_closed);
+ (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixbuf =
+ g_object_ref (GTK_CMCTREE_ROW (node)->pixbuf_closed);
}
work = GTK_CMCTREE_ROW (node)->children;
return gtk_sctree_last_visible (ctree, work);
}
-/* this wrapper simply replaces NULL pixmaps
- * with a transparent, 1x1 pixmap. This works
- * around a memory problem deep inside gtk,
- * revealed by valgrind.
- */
-/*GtkCMCTreeNode* gtk_sctree_insert_node (GtkCMCTree *ctree,
- GtkCMCTreeNode *parent,
- GtkCMCTreeNode *sibling,
- gchar *text[],
- guint8 spacing,
- GdkPixmap *pixmap_closed,
- GdkBitmap *mask_closed,
- GdkPixmap *pixmap_opened,
- GdkBitmap *mask_opened,
- gboolean is_leaf,
- gboolean expanded)
-{
- if (!emptyxpm) {
- stock_pixmap_gdk(GTK_WIDGET(ctree), STOCK_PIXMAP_EMPTY,
- &emptyxpm, &emptyxpmmask);
- }
- if (!pixmap_closed) {
- pixmap_closed = emptyxpm;
- mask_closed = emptyxpmmask;
- }
- if (!pixmap_opened) {
- pixmap_opened = emptyxpm;
- mask_opened = emptyxpmmask;
- }
- return gtk_cmctree_insert_node(ctree, parent, sibling, text,spacing,
- pixmap_closed, mask_closed, pixmap_opened, mask_opened,
- is_leaf, expanded);
-}*/
-
static void
sset_node_info (GtkCMCTree *ctree,
GtkCMCTreeNode *node,
const gchar *text,
guint8 spacing,
- GdkPixmap *pixmap_closed,
- GdkBitmap *mask_closed,
- GdkPixmap *pixmap_opened,
- GdkBitmap *mask_opened,
+ GdkPixbuf *pixbuf_closed,
+ GdkPixbuf *pixbuf_opened,
gboolean is_leaf,
gboolean expanded)
{
- if (GTK_CMCTREE_ROW (node)->pixmap_opened)
+ if (GTK_CMCTREE_ROW (node)->pixbuf_opened)
{
- g_object_unref (GTK_CMCTREE_ROW (node)->pixmap_opened);
- if (GTK_CMCTREE_ROW (node)->mask_opened)
- g_object_unref (GTK_CMCTREE_ROW (node)->mask_opened);
+ g_object_unref (GTK_CMCTREE_ROW (node)->pixbuf_opened);
}
- if (GTK_CMCTREE_ROW (node)->pixmap_closed)
+ if (GTK_CMCTREE_ROW (node)->pixbuf_closed)
{
- g_object_unref (GTK_CMCTREE_ROW (node)->pixmap_closed);
- if (GTK_CMCTREE_ROW (node)->mask_closed)
- g_object_unref (GTK_CMCTREE_ROW (node)->mask_closed);
+ g_object_unref (GTK_CMCTREE_ROW (node)->pixbuf_closed);
}
- GTK_CMCTREE_ROW (node)->pixmap_opened = NULL;
- GTK_CMCTREE_ROW (node)->mask_opened = NULL;
- GTK_CMCTREE_ROW (node)->pixmap_closed = NULL;
- GTK_CMCTREE_ROW (node)->mask_closed = NULL;
+ GTK_CMCTREE_ROW (node)->pixbuf_opened = NULL;
+ GTK_CMCTREE_ROW (node)->pixbuf_closed = NULL;
- if (pixmap_closed)
+ if (pixbuf_closed)
{
- GTK_CMCTREE_ROW (node)->pixmap_closed = g_object_ref (pixmap_closed);
- if (mask_closed)
- GTK_CMCTREE_ROW (node)->mask_closed = g_object_ref (mask_closed);
+ GTK_CMCTREE_ROW (node)->pixbuf_closed = g_object_ref (pixbuf_closed);
}
- if (pixmap_opened)
+ if (pixbuf_opened)
{
- GTK_CMCTREE_ROW (node)->pixmap_opened = g_object_ref (pixmap_opened);
- if (mask_opened)
- GTK_CMCTREE_ROW (node)->mask_opened = g_object_ref (mask_opened);
+ GTK_CMCTREE_ROW (node)->pixbuf_opened = g_object_ref (pixbuf_opened);
}
GTK_CMCTREE_ROW (node)->is_leaf = is_leaf;
if (GTK_CMCTREE_ROW (node)->expanded)
gtk_cmctree_node_set_pixtext (ctree, node, ctree->tree_column,
- text, spacing, pixmap_opened, mask_opened);
+ text, spacing, pixbuf_opened);
else
gtk_cmctree_node_set_pixtext (ctree, node, ctree->tree_column,
- text, spacing, pixmap_closed, mask_closed);
+ text, spacing, pixbuf_closed);
}
static void
}
}
-/* this wrapper simply replaces NULL pixmaps
- * with a transparent, 1x1 pixmap. This works
+/* this wrapper simply replaces NULL pixbufs
+ * with a transparent, 1x1 pixbuf. This works
* around a memory problem deep inside gtk,
* revealed by valgrind.
*/
GtkCMCTreeNode *node,
const gchar *text,
guint8 spacing,
- GdkPixmap *pixmap_closed,
- GdkBitmap *mask_closed,
- GdkPixmap *pixmap_opened,
- GdkBitmap *mask_opened,
+ GdkPixbuf *pixbuf_closed,
+ GdkPixbuf *pixbuf_opened,
gboolean is_leaf,
gboolean expanded)
{
gboolean old_expanded;
GtkCMCTreeNode *work;
- if (!emptyxpm) {
- stock_pixmap_gdk(GTK_WIDGET(ctree), STOCK_PIXMAP_EMPTY,
- &emptyxpm, &emptyxpmmask);
- }
- if (!pixmap_closed) {
- pixmap_closed = emptyxpm;
- mask_closed = emptyxpmmask;
- }
- if (!pixmap_opened) {
- pixmap_opened = emptyxpm;
- mask_opened = emptyxpmmask;
- }
-
if (!GTK_IS_CMCTREE (ctree) || !node) return;
old_leaf = GTK_CMCTREE_ROW (node)->is_leaf;
}
}
- sset_node_info (ctree, node, text, spacing, pixmap_closed, mask_closed,
- pixmap_opened, mask_opened, is_leaf, expanded);
+ sset_node_info (ctree, node, text, spacing, pixbuf_closed,
+ pixbuf_opened, is_leaf, expanded);
if (!is_leaf && !old_leaf)
{
ctree_row->parent = NULL;
ctree_row->sibling = NULL;
ctree_row->children = NULL;
- ctree_row->pixmap_closed = NULL;
- ctree_row->mask_closed = NULL;
- ctree_row->pixmap_opened = NULL;
- ctree_row->mask_opened = NULL;
+ ctree_row->pixbuf_closed = NULL;
+ ctree_row->pixbuf_opened = NULL;
return ctree_row;
}
for (i = 0; i < clist->columns; i++)
{
GTK_CMCLIST_GET_CLASS (clist)->set_cell_contents
- (clist, &(ctree_row->row), i, GTK_CMCELL_EMPTY, NULL, 0, NULL, NULL);
+ (clist, &(ctree_row->row), i, GTK_CMCELL_EMPTY, NULL, 0, NULL);
if (ctree_row->row.cell[i].style)
{
if (GTK_WIDGET_REALIZED (ctree))
g_object_unref (ctree_row->row.style);
}
- if (ctree_row->pixmap_closed)
+ if (ctree_row->pixbuf_closed)
{
- g_object_unref (ctree_row->pixmap_closed);
- if (ctree_row->mask_closed)
- g_object_unref (ctree_row->mask_closed);
+ g_object_unref (ctree_row->pixbuf_closed);
}
- if (ctree_row->pixmap_opened)
+ if (ctree_row->pixbuf_opened)
{
- g_object_unref (ctree_row->pixmap_opened);
- if (ctree_row->mask_opened)
- g_object_unref (ctree_row->mask_opened);
+ g_object_unref (ctree_row->pixbuf_opened);
}
if (ctree_row->row.destroy)
GTK_CMCLIST_GET_CLASS (clist)->cell_size_request
(clist, >K_CMCTREE_ROW (node)->row, ctree->tree_column, &requisition);
- /* unref/unset closed pixmap */
+ /* unref/unset closed pixbuf */
if (GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixmap)
+ (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixbuf)
{
g_object_unref
(GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixmap);
+ (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixbuf);
GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixmap = NULL;
-
- if (GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->mask)
- {
- g_object_unref
- (GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->mask);
- GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->mask = NULL;
- }
+ (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixbuf = NULL;
}
- /* set/ref opened pixmap */
- if (GTK_CMCTREE_ROW (node)->pixmap_opened)
+ /* set/ref opened pixbuf */
+ if (GTK_CMCTREE_ROW (node)->pixbuf_opened)
{
GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixmap =
- g_object_ref (GTK_CMCTREE_ROW (node)->pixmap_opened);
-
- if (GTK_CMCTREE_ROW (node)->mask_opened)
- GTK_CMCELL_PIXTEXT
- (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->mask =
- g_object_ref (GTK_CMCTREE_ROW (node)->mask_opened);
+ (GTK_CMCTREE_ROW (node)->row.cell[ctree->tree_column])->pixbuf =
+ g_object_ref (GTK_CMCTREE_ROW (node)->pixbuf_opened);
}
GtkCMCTreeNode *sibling,
gchar *text[],
guint8 spacing,
- GdkPixmap *pixmap_closed,
- GdkBitmap *mask_closed,
- GdkPixmap *pixmap_opened,
- GdkBitmap *mask_opened,
+ GdkPixbuf *pixbuf_closed,
+ GdkPixbuf *pixbuf_opened,
gboolean is_leaf,
gboolean expanded)
{
GList *list;
gint i;
- if (!emptyxpm) {
- stock_pixmap_gdk(GTK_WIDGET(ctree), STOCK_PIXMAP_EMPTY,
- &emptyxpm, &emptyxpmmask);
- }
- if (!pixmap_closed) {
- pixmap_closed = emptyxpm;
- mask_closed = emptyxpmmask;
- }
- if (!pixmap_opened) {
- pixmap_opened = emptyxpm;
- mask_opened = emptyxpmmask;
- }
g_return_val_if_fail (GTK_IS_CMCTREE (ctree), NULL);
if (sibling)
g_return_val_if_fail (GTK_CMCTREE_ROW (sibling)->parent == parent, NULL);
for (i = 0; i < clist->columns; i++)
if (text[i] && i != ctree->tree_column)
GTK_CMCLIST_GET_CLASS (clist)->set_cell_contents
- (clist, &(new_row->row), i, GTK_CMCELL_TEXT, text[i], 0, NULL, NULL);
+ (clist, &(new_row->row), i, GTK_CMCELL_TEXT, text[i], 0, NULL);
sset_node_info (ctree, node, text ?
- text[ctree->tree_column] : NULL, spacing, pixmap_closed,
- mask_closed, pixmap_opened, mask_opened, is_leaf, expanded);
+ text[ctree->tree_column] : NULL, spacing, pixbuf_closed,
+ pixbuf_opened, is_leaf, expanded);
/* sorted insertion */
if (GTK_CMCLIST_AUTO_SORT (clist))
gtk_cmclist_freeze (clist);
- sset_node_info (ctree, cnode, "", 0, NULL, NULL, NULL, NULL, TRUE, FALSE);
+ sset_node_info (ctree, cnode, "", 0, NULL, NULL, TRUE, FALSE);
if (!func (ctree, depth, gnode, cnode, data))
{
GtkCMCTreeNode *sibling,
gchar *text[],
guint8 spacing,
- GdkPixmap *pixmap_closed,
- GdkBitmap *mask_closed,
- GdkPixmap *pixmap_opened,
- GdkBitmap *mask_opened,
+ GdkPixbuf *pixbuf_closed,
+ GdkPixbuf *pixbuf_opened,
gboolean is_leaf,
gboolean expanded);
void gtk_sctree_set_node_info (GtkCMCTree *ctree,
GtkCMCTreeNode *node,
const gchar *text,
guint8 spacing,
- GdkPixmap *pixmap_closed,
- GdkBitmap *mask_closed,
- GdkPixmap *pixmap_opened,
- GdkBitmap *mask_opened,
+ GdkPixbuf *pixbuf_closed,
+ GdkPixbuf *pixbuf_opened,
gboolean is_leaf,
gboolean expanded);
GtkCMCTreeNode *
static AddressIndex *_imp_addressIndex_;
static LdifFile *_ldifFile_ = NULL;
-static GdkPixmap *markxpm;
-static GdkBitmap *markxpmmask;
+static GdkPixbuf *markxpm;
/**
* Structure of error message table.
gtk_cmclist_insert( clist, row, text );
}
if( rec->selected ) {
- gtk_cmclist_set_pixmap(
- clist, row, FIELD_COL_SELECT, markxpm, markxpmmask );
+ gtk_cmclist_set_pixbuf(
+ clist, row, FIELD_COL_SELECT, markxpm );
}
if( rec->reserved ) {
- gtk_cmclist_set_pixmap(
- clist, row, FIELD_COL_RESERVED, markxpm, markxpmmask );
+ gtk_cmclist_set_pixbuf(
+ clist, row, FIELD_COL_RESERVED, markxpm );
}
gtk_cmclist_set_row_data( clist, row, rec );
row = gtk_cmclist_append( clist, text );
gtk_cmclist_set_row_data( clist, row, rec );
if( rec->selected ) {
- gtk_cmclist_set_pixmap( clist, row,
- FIELD_COL_SELECT, markxpm, markxpmmask );
+ gtk_cmclist_set_pixbuf( clist, row,
+ FIELD_COL_SELECT, markxpm );
}
if( rec->reserved ) {
- gtk_cmclist_set_pixmap( clist, row,
- FIELD_COL_RESERVED, markxpm, markxpmmask );
+ gtk_cmclist_set_pixbuf( clist, row,
+ FIELD_COL_RESERVED, markxpm );
}
impldif_dlg.rowCount++;
node = g_list_next( node );
gtk_notebook_set_current_page( GTK_NOTEBOOK(impldif_dlg.notebook), PAGE_FILE_INFO );
gtk_widget_set_sensitive( impldif_dlg.btnPrev, FALSE );
gtk_widget_set_sensitive( impldif_dlg.btnNext, TRUE );
- stock_pixmap_gdk( impldif_dlg.window, STOCK_PIXMAP_MARK,
- &markxpm, &markxpmmask );
+ stock_pixbuf_gdk( impldif_dlg.window, STOCK_PIXMAP_MARK,
+ &markxpm );
imp_ldif_message();
gtk_widget_grab_focus(impldif_dlg.entryFile);
str[COL_NAME] = (gchar *) get_part_name(partinfo);
node = gtk_sctree_insert_node(ctree, parent, NULL, str, 0,
- NULL, NULL, NULL, NULL,
+ NULL, NULL,
FALSE, TRUE);
gtk_cmctree_node_set_row_data(ctree, node, partinfo);
void noticeview_set_icon(NoticeView *noticeview, StockPixmap icon)
{
- GdkPixmap *pixmap;
- GdkBitmap *bitmap;
+ GdkPixbuf *pixbuf;
- if (stock_pixmap_gdk(noticeview->window, icon, &pixmap, &bitmap) < 0)
+ if (stock_pixbuf_gdk(noticeview->window, icon, &pixbuf) < 0)
return;
- gtk_image_set_from_pixmap(GTK_IMAGE(noticeview->icon), pixmap, bitmap);
+ gtk_image_set_from_pixbuf(GTK_IMAGE(noticeview->icon), pixbuf);
}
void noticeview_set_icon_clickable(NoticeView *noticeview, gboolean setting)
static guint iconified_hook_id;
static guint theme_hook_id;
-static GdkPixmap *newmail_pixmap[2] = {NULL, NULL};
-static GdkPixmap *newmail_bitmap[2] = {NULL, NULL};
-static GdkPixmap *unreadmail_pixmap[2] = {NULL, NULL};
-static GdkPixmap *unreadmail_bitmap[2] = {NULL, NULL};
-static GdkPixmap *newmarkedmail_pixmap[2] = {NULL, NULL};
-static GdkPixmap *newmarkedmail_bitmap[2] = {NULL, NULL};
-static GdkPixmap *unreadmarkedmail_pixmap[2] = {NULL, NULL};
-static GdkPixmap *unreadmarkedmail_bitmap[2] = {NULL, NULL};
-static GdkPixmap *nomail_pixmap[2] = {NULL, NULL};
-static GdkPixmap *nomail_bitmap[2] = {NULL, NULL};
+static GdkPixbuf *newmail_pixmap[2] = {NULL, NULL};
+static GdkPixbuf *unreadmail_pixmap[2] = {NULL, NULL};
+static GdkPixbuf *newmarkedmail_pixmap[2] = {NULL, NULL};
+static GdkPixbuf *unreadmarkedmail_pixmap[2] = {NULL, NULL};
+static GdkPixbuf *nomail_pixmap[2] = {NULL, NULL};
static EggTrayIcon *trayicon;
static GtkWidget *eventbox;
static void set_trayicon_pixmap(TrayIconType icontype)
{
- GdkPixmap *pixmap = NULL;
- GdkBitmap *bitmap = NULL;
- static GdkPixmap *last_pixmap = NULL;
+ GdkPixbuf *pixmap = NULL;
+ static GdkPixbuf *last_pixmap = NULL;
switch(icontype) {
case TRAYICON_NEW:
pixmap = newmail_pixmap[prefs_common.work_offline];
- bitmap = newmail_bitmap[prefs_common.work_offline];
break;
case TRAYICON_NEWMARKED:
pixmap = newmarkedmail_pixmap[prefs_common.work_offline];
- bitmap = newmarkedmail_bitmap[prefs_common.work_offline];
break;
case TRAYICON_UNREAD:
pixmap = unreadmail_pixmap[prefs_common.work_offline];
- bitmap = unreadmail_bitmap[prefs_common.work_offline];
break;
case TRAYICON_UNREADMARKED:
pixmap = unreadmarkedmail_pixmap[prefs_common.work_offline];
- bitmap = unreadmarkedmail_bitmap[prefs_common.work_offline];
break;
default:
pixmap = nomail_pixmap[prefs_common.work_offline];
- bitmap = nomail_bitmap[prefs_common.work_offline];
break;
}
return;
}
- gtk_image_set_from_pixmap(GTK_IMAGE(image), pixmap, bitmap);
+ gtk_image_set_from_pixbuf(GTK_IMAGE(image), pixmap);
last_pixmap = pixmap;
}
static gboolean trayicon_update_theme(gpointer source, gpointer data)
{
- stock_pixmap_gdk(GTK_WIDGET(trayicon), STOCK_PIXMAP_TRAY_NOMAIL, &nomail_pixmap[0], &nomail_bitmap[0]);
- stock_pixmap_gdk(GTK_WIDGET(trayicon), STOCK_PIXMAP_TRAY_UNREADMAIL, &unreadmail_pixmap[0], &unreadmail_bitmap[0]);
- stock_pixmap_gdk(GTK_WIDGET(trayicon), STOCK_PIXMAP_TRAY_NEWMAIL, &newmail_pixmap[0], &newmail_bitmap[0]);
- stock_pixmap_gdk(GTK_WIDGET(trayicon), STOCK_PIXMAP_TRAY_UNREADMARKEDMAIL, &unreadmarkedmail_pixmap[0], &unreadmarkedmail_bitmap[0]);
- stock_pixmap_gdk(GTK_WIDGET(trayicon), STOCK_PIXMAP_TRAY_NEWMARKEDMAIL, &newmarkedmail_pixmap[0], &newmarkedmail_bitmap[0]);
+ stock_pixbuf_gdk(GTK_WIDGET(trayicon), STOCK_PIXMAP_TRAY_NOMAIL, &nomail_pixmap[0]);
+ stock_pixbuf_gdk(GTK_WIDGET(trayicon), STOCK_PIXMAP_TRAY_UNREADMAIL, &unreadmail_pixmap[0]);
+ stock_pixbuf_gdk(GTK_WIDGET(trayicon), STOCK_PIXMAP_TRAY_NEWMAIL, &newmail_pixmap[0]);
+ stock_pixbuf_gdk(GTK_WIDGET(trayicon), STOCK_PIXMAP_TRAY_UNREADMARKEDMAIL, &unreadmarkedmail_pixmap[0]);
+ stock_pixbuf_gdk(GTK_WIDGET(trayicon), STOCK_PIXMAP_TRAY_NEWMARKEDMAIL, &newmarkedmail_pixmap[0]);
- stock_pixmap_gdk(GTK_WIDGET(trayicon), STOCK_PIXMAP_TRAY_NOMAIL_OFFLINE, &nomail_pixmap[1], &nomail_bitmap[1]);
- stock_pixmap_gdk(GTK_WIDGET(trayicon), STOCK_PIXMAP_TRAY_UNREADMAIL_OFFLINE, &unreadmail_pixmap[1], &unreadmail_bitmap[1]);
- stock_pixmap_gdk(GTK_WIDGET(trayicon), STOCK_PIXMAP_TRAY_NEWMAIL_OFFLINE, &newmail_pixmap[1], &newmail_bitmap[1]);
- stock_pixmap_gdk(GTK_WIDGET(trayicon), STOCK_PIXMAP_TRAY_UNREADMARKEDMAIL_OFFLINE, &unreadmarkedmail_pixmap[1], &unreadmarkedmail_bitmap[1]);
- stock_pixmap_gdk(GTK_WIDGET(trayicon), STOCK_PIXMAP_TRAY_NEWMARKEDMAIL_OFFLINE, &newmarkedmail_pixmap[1], &newmarkedmail_bitmap[1]);
+ stock_pixbuf_gdk(GTK_WIDGET(trayicon), STOCK_PIXMAP_TRAY_NOMAIL_OFFLINE, &nomail_pixmap[1]);
+ stock_pixbuf_gdk(GTK_WIDGET(trayicon), STOCK_PIXMAP_TRAY_UNREADMAIL_OFFLINE, &unreadmail_pixmap[1]);
+ stock_pixbuf_gdk(GTK_WIDGET(trayicon), STOCK_PIXMAP_TRAY_NEWMAIL_OFFLINE, &newmail_pixmap[1]);
+ stock_pixbuf_gdk(GTK_WIDGET(trayicon), STOCK_PIXMAP_TRAY_UNREADMARKEDMAIL_OFFLINE, &unreadmarkedmail_pixmap[1]);
+ stock_pixbuf_gdk(GTK_WIDGET(trayicon), STOCK_PIXMAP_TRAY_NEWMARKEDMAIL_OFFLINE, &newmarkedmail_pixmap[1]);
if (image != NULL)
update(NULL);
gtk_container_set_border_width(GTK_CONTAINER(eventbox), 0);
gtk_container_add(GTK_CONTAINER(trayicon), GTK_WIDGET(eventbox));
- image = gtk_image_new_from_pixmap(nomail_pixmap[0], nomail_bitmap[0]);
+ image = gtk_image_new_from_pixbuf(nomail_pixmap[0]);
gtk_container_add(GTK_CONTAINER(eventbox), image);
destroy_signal_id =
GtkWidget *btn_use;
GtkWidget *btn_remove;
- GdkPixmap *pixmaps[PREVIEW_ICONS];
- GdkBitmap *masks[PREVIEW_ICONS];
+ GdkPixbuf *pixbufs[PREVIEW_ICONS];
/* gchar *theme_path; */
} ThemesPage;
save_prefs_path = prefs_common.pixmap_theme_path;
prefs_common.pixmap_theme_path = tdata->displayed;
for (i = 0; i < PREVIEW_ICONS; ++i) {
- stock_pixmap_gdk(theme->window, prefs_themes_icons[i],
- &(theme->pixmaps[i]), &(theme->masks[i]));
- gtk_image_set_from_pixmap(GTK_IMAGE(theme->icons[i]),
- theme->pixmaps[i], theme->masks[i]);
+ stock_pixbuf_gdk(theme->window, prefs_themes_icons[i],
+ &(theme->pixbufs[i]));
+ gtk_image_set_from_pixbuf(GTK_IMAGE(theme->icons[i]),
+ theme->pixbufs[i]);
}
prefs_common.pixmap_theme_path = save_prefs_path;
static GtkStyle *small_marked_style;
static GtkStyle *small_deleted_style;
-static GdkPixmap *markxpm;
-static GdkBitmap *markxpmmask;
-static GdkPixmap *deletedxpm;
-static GdkBitmap *deletedxpmmask;
-static GdkPixmap *movedxpm;
-static GdkBitmap *movedxpmmask;
-static GdkPixmap *copiedxpm;
-static GdkBitmap *copiedxpmmask;
-
-static GdkPixmap *newxpm;
-static GdkBitmap *newxpmmask;
-static GdkPixmap *unreadxpm;
-static GdkBitmap *unreadxpmmask;
-static GdkPixmap *repliedxpm;
-static GdkBitmap *repliedxpmmask;
-static GdkPixmap *forwardedxpm;
-static GdkBitmap *forwardedxpmmask;
-static GdkPixmap *ignorethreadxpm;
-static GdkBitmap *ignorethreadxpmmask;
-static GdkPixmap *watchthreadxpm;
-static GdkBitmap *watchthreadxpmmask;
-static GdkPixmap *lockedxpm;
-static GdkBitmap *lockedxpmmask;
-static GdkPixmap *spamxpm;
-static GdkBitmap *spamxpmmask;
-
-static GdkPixmap *clipxpm;
-static GdkBitmap *clipxpmmask;
-static GdkPixmap *keyxpm;
-static GdkBitmap *keyxpmmask;
-static GdkPixmap *clipkeyxpm;
-static GdkBitmap *clipkeyxpmmask;
-static GdkPixmap *keysignxpm;
-static GdkBitmap *keysignxpmmask;
-static GdkPixmap *gpgsignedxpm;
-static GdkBitmap *gpgsignedxpmmask;
-static GdkPixmap *clipgpgsignedxpm;
-static GdkBitmap *clipgpgsignedxpmmask;
+static GdkPixbuf *markxpm;
+static GdkPixbuf *deletedxpm;
+static GdkPixbuf *movedxpm;
+static GdkPixbuf *copiedxpm;
+
+static GdkPixbuf *newxpm;
+static GdkPixbuf *unreadxpm;
+static GdkPixbuf *repliedxpm;
+static GdkPixbuf *forwardedxpm;
+static GdkPixbuf *ignorethreadxpm;
+static GdkPixbuf *watchthreadxpm;
+static GdkPixbuf *lockedxpm;
+static GdkPixbuf *spamxpm;
+
+static GdkPixbuf *clipxpm;
+static GdkPixbuf *keyxpm;
+static GdkPixbuf *clipkeyxpm;
+static GdkPixbuf *keysignxpm;
+static GdkPixbuf *gpgsignedxpm;
+static GdkPixbuf *clipgpgsignedxpm;
static void summary_free_msginfo_func (GtkCMCTree *ctree,
GtkCMCTreeNode *node,
GtkWidget *pixmap;
gtk_widget_realize(summaryview->ctree);
- stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_MARK,
- &markxpm, &markxpmmask);
- stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_DELETED,
- &deletedxpm, &deletedxpmmask);
- stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_NEW,
- &newxpm, &newxpmmask);
- stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_UNREAD,
- &unreadxpm, &unreadxpmmask);
- stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_REPLIED,
- &repliedxpm, &repliedxpmmask);
- stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_FORWARDED,
- &forwardedxpm, &forwardedxpmmask);
- stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_CLIP,
- &clipxpm, &clipxpmmask);
- stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_LOCKED,
- &lockedxpm, &lockedxpmmask);
- stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_IGNORETHREAD,
- &ignorethreadxpm, &ignorethreadxpmmask);
- stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_WATCHTHREAD,
- &watchthreadxpm, &watchthreadxpmmask);
- stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_CLIP_KEY,
- &clipkeyxpm, &clipkeyxpmmask);
- stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_KEY_SIGN,
- &keysignxpm, &keysignxpmmask);
- stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_KEY,
- &keyxpm, &keyxpmmask);
- stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_GPG_SIGNED,
- &gpgsignedxpm, &gpgsignedxpmmask);
- stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_CLIP_GPG_SIGNED,
- &clipgpgsignedxpm, &clipgpgsignedxpmmask);
- stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_SPAM,
- &spamxpm, &spamxpmmask);
- stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_MOVED,
- &movedxpm, &movedxpmmask);
- stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_COPIED,
- &copiedxpm, &copiedxpmmask);
+ stock_pixbuf_gdk(summaryview->ctree, STOCK_PIXMAP_MARK,
+ &markxpm);
+ stock_pixbuf_gdk(summaryview->ctree, STOCK_PIXMAP_DELETED,
+ &deletedxpm);
+ stock_pixbuf_gdk(summaryview->ctree, STOCK_PIXMAP_NEW,
+ &newxpm);
+ stock_pixbuf_gdk(summaryview->ctree, STOCK_PIXMAP_UNREAD,
+ &unreadxpm);
+ stock_pixbuf_gdk(summaryview->ctree, STOCK_PIXMAP_REPLIED,
+ &repliedxpm);
+ stock_pixbuf_gdk(summaryview->ctree, STOCK_PIXMAP_FORWARDED,
+ &forwardedxpm);
+ stock_pixbuf_gdk(summaryview->ctree, STOCK_PIXMAP_CLIP,
+ &clipxpm);
+ stock_pixbuf_gdk(summaryview->ctree, STOCK_PIXMAP_LOCKED,
+ &lockedxpm);
+ stock_pixbuf_gdk(summaryview->ctree, STOCK_PIXMAP_IGNORETHREAD,
+ &ignorethreadxpm);
+ stock_pixbuf_gdk(summaryview->ctree, STOCK_PIXMAP_WATCHTHREAD,
+ &watchthreadxpm);
+ stock_pixbuf_gdk(summaryview->ctree, STOCK_PIXMAP_CLIP_KEY,
+ &clipkeyxpm);
+ stock_pixbuf_gdk(summaryview->ctree, STOCK_PIXMAP_KEY_SIGN,
+ &keysignxpm);
+ stock_pixbuf_gdk(summaryview->ctree, STOCK_PIXMAP_KEY,
+ &keyxpm);
+ stock_pixbuf_gdk(summaryview->ctree, STOCK_PIXMAP_GPG_SIGNED,
+ &gpgsignedxpm);
+ stock_pixbuf_gdk(summaryview->ctree, STOCK_PIXMAP_CLIP_GPG_SIGNED,
+ &clipgpgsignedxpm);
+ stock_pixbuf_gdk(summaryview->ctree, STOCK_PIXMAP_SPAM,
+ &spamxpm);
+ stock_pixbuf_gdk(summaryview->ctree, STOCK_PIXMAP_MOVED,
+ &movedxpm);
+ stock_pixbuf_gdk(summaryview->ctree, STOCK_PIXMAP_COPIED,
+ &copiedxpm);
summary_set_fonts(summaryview);
}
if (type == S_COL_MIME) {
- label = gtk_image_new_from_pixmap(clipxpm, clipxpmmask);
+ label = gtk_image_new_from_pixbuf(clipxpm);
gtk_widget_show(label);
gtk_cmclist_set_column_widget(clist, pos, label);
gtk_sctree_set_column_tooltip(GTK_SCTREE(clist), pos, _("Attachment"));
continue;
} else if (type == S_COL_MARK) {
- label = gtk_image_new_from_pixmap(markxpm, markxpmmask);
+ label = gtk_image_new_from_pixbuf(markxpm);
gtk_widget_show(label);
gtk_cmclist_set_column_widget(clist, pos, label);
gtk_sctree_set_column_tooltip(GTK_SCTREE(clist), pos, _("Mark"));
continue;
} else if (type == S_COL_LOCKED) {
- label = gtk_image_new_from_pixmap(lockedxpm, lockedxpmmask);
+ label = gtk_image_new_from_pixbuf(lockedxpm);
gtk_widget_show(label);
gtk_cmclist_set_column_widget(clist, pos, label);
gtk_sctree_set_column_tooltip(GTK_SCTREE(clist), pos, _("Locked"));
summary_set_header(summaryview, text, msginfo);
gtk_sctree_set_node_info(ctree, cnode, text[col_pos[S_COL_SUBJECT]], 2,
- NULL, NULL, NULL, NULL, FALSE, summaryview->threaded && !summaryview->thread_collapsed);
+ NULL, NULL, FALSE, summaryview->threaded && !summaryview->thread_collapsed);
#define SET_TEXT(col) { \
gtk_cmctree_node_set_text(ctree, cnode, col_pos[col], \
text[col_pos[col]]); \
node = gtk_sctree_insert_node
(ctree, NULL, node, text, 2,
- NULL, NULL, NULL, NULL,
+ NULL, NULL,
FALSE, FALSE);
if (vert && prefs_common.two_line_vert)
g_free(text[summaryview->col_pos[S_COL_SUBJECT]]);
/* set new/unread column */
if (MSG_IS_IGNORE_THREAD(flags)) {
- gtk_cmctree_node_set_pixmap(ctree, row, col_pos[S_COL_STATUS],
- ignorethreadxpm, ignorethreadxpmmask);
+ gtk_cmctree_node_set_pixbuf(ctree, row, col_pos[S_COL_STATUS],
+ ignorethreadxpm);
} else if (MSG_IS_WATCH_THREAD(flags)) {
- gtk_cmctree_node_set_pixmap(ctree, row, col_pos[S_COL_STATUS],
- watchthreadxpm, watchthreadxpmmask);
+ gtk_cmctree_node_set_pixbuf(ctree, row, col_pos[S_COL_STATUS],
+ watchthreadxpm);
} else if (MSG_IS_SPAM(flags)) {
- gtk_cmctree_node_set_pixmap(ctree, row, col_pos[S_COL_STATUS],
- spamxpm, spamxpmmask);
+ gtk_cmctree_node_set_pixbuf(ctree, row, col_pos[S_COL_STATUS],
+ spamxpm);
} else if (MSG_IS_NEW(flags)) {
- gtk_cmctree_node_set_pixmap(ctree, row, col_pos[S_COL_STATUS],
- newxpm, newxpmmask);
+ gtk_cmctree_node_set_pixbuf(ctree, row, col_pos[S_COL_STATUS],
+ newxpm);
} else if (MSG_IS_UNREAD(flags)) {
- gtk_cmctree_node_set_pixmap(ctree, row, col_pos[S_COL_STATUS],
- unreadxpm, unreadxpmmask);
+ gtk_cmctree_node_set_pixbuf(ctree, row, col_pos[S_COL_STATUS],
+ unreadxpm);
} else if (MSG_IS_REPLIED(flags)) {
- gtk_cmctree_node_set_pixmap(ctree, row, col_pos[S_COL_STATUS],
- repliedxpm, repliedxpmmask);
+ gtk_cmctree_node_set_pixbuf(ctree, row, col_pos[S_COL_STATUS],
+ repliedxpm);
} else if (MSG_IS_FORWARDED(flags)) {
- gtk_cmctree_node_set_pixmap(ctree, row, col_pos[S_COL_STATUS],
- forwardedxpm, forwardedxpmmask);
+ gtk_cmctree_node_set_pixbuf(ctree, row, col_pos[S_COL_STATUS],
+ forwardedxpm);
} else {
gtk_cmctree_node_set_text(ctree, row, col_pos[S_COL_STATUS],
"");
/* set mark column */
if (MSG_IS_DELETED(flags)) {
- gtk_cmctree_node_set_pixmap(ctree, row, col_pos[S_COL_MARK],
- deletedxpm, deletedxpmmask);
+ gtk_cmctree_node_set_pixbuf(ctree, row, col_pos[S_COL_MARK],
+ deletedxpm);
if (style)
style = bold_deleted_style;
else {
gtk_cmctree_node_set_foreground
(ctree, row, &summaryview->color_dim);
} else if (MSG_IS_MARKED(flags)) {
- gtk_cmctree_node_set_pixmap(ctree, row, col_pos[S_COL_MARK],
- markxpm, markxpmmask);
+ gtk_cmctree_node_set_pixbuf(ctree, row, col_pos[S_COL_MARK],
+ markxpm);
} else if (MSG_IS_MOVE(flags)) {
- gtk_cmctree_node_set_pixmap(ctree, row, col_pos[S_COL_MARK],
- movedxpm, movedxpmmask);
+ gtk_cmctree_node_set_pixbuf(ctree, row, col_pos[S_COL_MARK],
+ movedxpm);
if (style)
style = bold_marked_style;
else {
gtk_cmctree_node_set_foreground
(ctree, row, &summaryview->color_marked);
} else if (MSG_IS_COPY(flags)) {
- gtk_cmctree_node_set_pixmap(ctree, row, col_pos[S_COL_MARK],
- copiedxpm, copiedxpmmask);
+ gtk_cmctree_node_set_pixbuf(ctree, row, col_pos[S_COL_MARK],
+ copiedxpm);
if (style)
style = bold_marked_style;
else {
}
if (MSG_IS_LOCKED(flags)) {
- gtk_cmctree_node_set_pixmap(ctree, row, col_pos[S_COL_LOCKED],
- lockedxpm, lockedxpmmask);
+ gtk_cmctree_node_set_pixbuf(ctree, row, col_pos[S_COL_LOCKED],
+ lockedxpm);
}
else {
gtk_cmctree_node_set_text(ctree, row, col_pos[S_COL_LOCKED], "");
}
if (MSG_IS_WITH_ATTACHMENT(flags) && MSG_IS_SIGNED(flags)) {
- gtk_cmctree_node_set_pixmap(ctree, row, col_pos[S_COL_MIME],
- clipgpgsignedxpm, clipgpgsignedxpmmask);
+ gtk_cmctree_node_set_pixbuf(ctree, row, col_pos[S_COL_MIME],
+ clipgpgsignedxpm);
} else if (MSG_IS_SIGNED(flags)) {
if (MSG_IS_ENCRYPTED(flags)) {
- gtk_cmctree_node_set_pixmap(ctree, row, col_pos[S_COL_MIME],
- keysignxpm, keysignxpmmask);
+ gtk_cmctree_node_set_pixbuf(ctree, row, col_pos[S_COL_MIME],
+ keysignxpm);
} else {
- gtk_cmctree_node_set_pixmap(ctree, row, col_pos[S_COL_MIME],
- gpgsignedxpm, gpgsignedxpmmask);
+ gtk_cmctree_node_set_pixbuf(ctree, row, col_pos[S_COL_MIME],
+ gpgsignedxpm);
}
} else if (MSG_IS_WITH_ATTACHMENT(flags) && MSG_IS_ENCRYPTED(flags)) {
- gtk_cmctree_node_set_pixmap(ctree, row, col_pos[S_COL_MIME],
- clipkeyxpm, clipkeyxpmmask);
+ gtk_cmctree_node_set_pixbuf(ctree, row, col_pos[S_COL_MIME],
+ clipkeyxpm);
} else if (MSG_IS_ENCRYPTED(flags)) {
- gtk_cmctree_node_set_pixmap(ctree, row, col_pos[S_COL_MIME],
- keyxpm, keyxpmmask);
+ gtk_cmctree_node_set_pixbuf(ctree, row, col_pos[S_COL_MIME],
+ keyxpm);
} else if (MSG_IS_WITH_ATTACHMENT(flags)) {
- gtk_cmctree_node_set_pixmap(ctree, row, col_pos[S_COL_MIME],
- clipxpm, clipxpmmask);
+ gtk_cmctree_node_set_pixbuf(ctree, row, col_pos[S_COL_MIME],
+ clipxpm);
} else {
gtk_cmctree_node_set_text(ctree, row, col_pos[S_COL_MIME], "");
}
break;
case GTK_CMCELL_PIXTEXT:
if (gtk_cmctree_node_get_pixtext(ctree, node, column, &text,
- NULL, NULL, NULL) != TRUE)
+ NULL, NULL) != TRUE)
return FALSE;
break;
default:
GtkWidget *ctree = summaryview->ctree;
GtkWidget *pixmap;
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_MARK, &markxpm, &markxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_DELETED, &deletedxpm, &deletedxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_NEW, &newxpm, &newxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_UNREAD, &unreadxpm, &unreadxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_REPLIED, &repliedxpm, &repliedxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_FORWARDED, &forwardedxpm, &forwardedxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_CLIP, &clipxpm, &clipxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_LOCKED, &lockedxpm, &lockedxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_IGNORETHREAD, &ignorethreadxpm, &ignorethreadxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_WATCHTHREAD, &watchthreadxpm, &watchthreadxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_CLIP_KEY, &clipkeyxpm, &clipkeyxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_KEY, &keyxpm, &keyxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_KEY_SIGN, &keysignxpm, &keysignxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_GPG_SIGNED, &gpgsignedxpm, &gpgsignedxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_CLIP_GPG_SIGNED, &clipgpgsignedxpm, &clipgpgsignedxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_SPAM, &spamxpm, &spamxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_MOVED, &movedxpm, &movedxpmmask);
- stock_pixmap_gdk(ctree, STOCK_PIXMAP_COPIED, &copiedxpm, &copiedxpmmask);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_MARK, &markxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_DELETED, &deletedxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_NEW, &newxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_UNREAD, &unreadxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_REPLIED, &repliedxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_FORWARDED, &forwardedxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_CLIP, &clipxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_LOCKED, &lockedxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_IGNORETHREAD, &ignorethreadxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_WATCHTHREAD, &watchthreadxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_CLIP_KEY, &clipkeyxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_KEY, &keyxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_KEY_SIGN, &keysignxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_GPG_SIGNED, &gpgsignedxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_CLIP_GPG_SIGNED, &clipgpgsignedxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_SPAM, &spamxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_MOVED, &movedxpm);
+ stock_pixbuf_gdk(ctree, STOCK_PIXMAP_COPIED, &copiedxpm);
summary_set_folder_pixmap(summaryview, STOCK_PIXMAP_DIR_OPEN);