mirror of
https://github.com/MidnightCommander/mc
synced 2025-02-23 02:34:14 +03:00
Amazing. GTK broke the API once again
This commit is contained in:
parent
3065734c22
commit
1bc1eea3d0
@ -1,3 +1,8 @@
|
||||
1999-01-18 Miguel de Icaza <miguel@nuclecu.unam.mx>
|
||||
|
||||
* gtkdtree.c (gtk_dtree_construct): And the GTK+ people broke the
|
||||
API again.
|
||||
|
||||
1999-01-18 Jonathan Blandford <jrb@redhat.com>
|
||||
|
||||
* gscreen.c (x_create_panel): chnaged padding on the Filter label
|
||||
|
@ -7,7 +7,9 @@
|
||||
|
||||
#include <config.h>
|
||||
#include <gnome.h>
|
||||
#include <sys/stat.h>
|
||||
#include "gdesktop-icon.h"
|
||||
#include "dir.h"
|
||||
#include "gdesktop.h"
|
||||
|
||||
|
||||
|
@ -571,7 +571,7 @@ select_icon (DesktopIconInfo *dii, int event_state)
|
||||
}
|
||||
|
||||
/* Creates a file entry structure and fills it with information appropriate to the specified file. */
|
||||
static file_entry *
|
||||
file_entry *
|
||||
file_entry_from_file (char *filename)
|
||||
{
|
||||
file_entry *fe;
|
||||
@ -603,7 +603,7 @@ file_entry_from_file (char *filename)
|
||||
}
|
||||
|
||||
/* Frees a file entry structure */
|
||||
static void
|
||||
void
|
||||
file_entry_free (file_entry *fe)
|
||||
{
|
||||
if (fe->fname)
|
||||
|
@ -64,5 +64,7 @@ typedef struct {
|
||||
char *pathname;
|
||||
} desktop_icon_t;
|
||||
|
||||
file_entry *file_entry_from_file (char *filename);
|
||||
void file_entry_free (file_entry *fe);
|
||||
|
||||
#endif
|
||||
|
@ -292,7 +292,7 @@ gicon_get_icon_for_file (file_entry *fe)
|
||||
return gicon_get_icon_for_file_speed (fe, TRUE);
|
||||
}
|
||||
|
||||
typedef struct lookup_name_closure_t {
|
||||
typedef struct {
|
||||
char *name;
|
||||
void *image;
|
||||
} lookup_name_closure_t;
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "gdesktop.h"
|
||||
#include "gdesktop-icon.h"
|
||||
#include "gpageprop.h"
|
||||
#include "gicon.h"
|
||||
|
||||
static int prop_dialog_result;
|
||||
|
||||
@ -93,8 +94,19 @@ item_properties (GtkWidget *parent, char *fname, DesktopIconInfo *dii)
|
||||
name = gprop_filename_new (fname, base);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), name->top, FALSE, FALSE, 0);
|
||||
if (dii) {
|
||||
gnome_metadata_get (fname, "icon-filename", &size, &icon_filename);
|
||||
gene = gprop_general_new(fname, icon_filename);
|
||||
GdkImlibImage *icon;
|
||||
file_entry *fe;
|
||||
char *name;
|
||||
|
||||
fe = file_entry_from_file (fname);
|
||||
icon = gicon_get_icon_for_file_speed (fe, FALSE);
|
||||
file_entry_free (fe);
|
||||
icon_filename = gicon_image_to_name (icon);
|
||||
if (icon_filename == NULL)
|
||||
icon_filename = g_strdup (ICONDIR "i-regular.png");
|
||||
|
||||
gene = gprop_general_new (fname, icon_filename);
|
||||
|
||||
gtk_box_pack_start (GTK_BOX (vbox), gene->top, FALSE, FALSE, 0);
|
||||
}
|
||||
|
||||
|
@ -484,9 +484,6 @@ gprop_general_new (char *title, char *icon_filename)
|
||||
|
||||
g_return_val_if_fail (title != NULL, NULL);
|
||||
|
||||
if (!icon_filename)
|
||||
icon_filename = ICONDIR "i-regular.png";
|
||||
|
||||
gp = g_new (GpropGeneral, 1);
|
||||
|
||||
gp->top = gtk_vbox_new (FALSE, 6);
|
||||
|
Loading…
x
Reference in New Issue
Block a user