set the icon here.
2002-07-10 Jody Goldberg <jody@gnome.org> * mime-edit-dialog.c (mime_edit_dialog_init) : set the icon here.
This commit is contained in:
parent
7bb012af08
commit
f71755edc4
6 changed files with 26 additions and 20 deletions
|
@ -1,3 +1,7 @@
|
|||
2002-07-10 Jody Goldberg <jody@gnome.org>
|
||||
|
||||
* mime-edit-dialog.c (mime_edit_dialog_init) : set the icon here.
|
||||
|
||||
2002-07-09 Jody Goldberg <jody@gnome.org>
|
||||
|
||||
* file-types-properties.glade : disable the use of category defaults
|
||||
|
|
|
@ -48,7 +48,7 @@ add_mime_cb (GtkButton *button, GladeXML *dialog)
|
|||
{
|
||||
GtkTreeView *treeview;
|
||||
GtkTreeModel *model;
|
||||
GtkWidget *add_dialog;
|
||||
GObject *add_dialog;
|
||||
|
||||
treeview = GTK_TREE_VIEW (WID ("mime_types_tree"));
|
||||
model = gtk_tree_view_get_model (treeview);
|
||||
|
@ -71,7 +71,7 @@ add_service_cb (GtkButton *button, GladeXML *dialog)
|
|||
add_dialog = service_add_dialog_new (model);
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
static GObject *
|
||||
launch_edit_dialog (GtkTreeModel *model, GtkTreeIter *iter)
|
||||
{
|
||||
ModelEntry *entry;
|
||||
|
@ -277,7 +277,6 @@ main (int argc, char **argv)
|
|||
char const *mime_type = NULL;
|
||||
char const *file_name = NULL;
|
||||
GtkTreeModel *model;
|
||||
GtkWidget *mime_dialog;
|
||||
GnomeProgram *program;
|
||||
poptContext popt_ctxt = 0;
|
||||
|
||||
|
@ -303,11 +302,15 @@ main (int argc, char **argv)
|
|||
}
|
||||
|
||||
if (mime_type == NULL) {
|
||||
GladeXML *dialog = create_dialog ();
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (WID ("main_dialog")), GTK_RESPONSE_CLOSE);
|
||||
mime_dialog = WID ("main_dialog");
|
||||
GladeXML *dialog = create_dialog ();
|
||||
GtkWidget *mime_dialog = WID ("main_dialog");
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (mime_dialog),
|
||||
GTK_RESPONSE_CLOSE);
|
||||
capplet_set_icon (mime_dialog, "gnome-ccmime.png");
|
||||
gtk_widget_show_all (mime_dialog);
|
||||
} else {
|
||||
MimeTypeInfo *info = NULL;
|
||||
GObject *mime_dialog;
|
||||
|
||||
model = GTK_TREE_MODEL (mime_types_model_new (FALSE));
|
||||
if (strcmp (GNOME_VFS_MIME_TYPE_UNKNOWN, mime_type)) {
|
||||
|
@ -315,12 +318,10 @@ main (int argc, char **argv)
|
|||
mime_dialog = mime_edit_dialog_new (model, info);
|
||||
} else
|
||||
mime_dialog = mime_add_dialog_new (model, NULL, file_name);
|
||||
g_signal_connect (G_OBJECT (mime_dialog),
|
||||
g_signal_connect (mime_dialog,
|
||||
"done", (GCallback) dialog_done_cb, info);
|
||||
}
|
||||
|
||||
capplet_set_icon (mime_dialog, "gnome-ccmime.png");
|
||||
gtk_widget_show_all (mime_dialog);
|
||||
gtk_main ();
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -31,11 +31,13 @@
|
|||
#include <libgnomevfs/gnome-vfs-application-registry.h>
|
||||
#include <libgnomevfs/gnome-vfs-utils.h>
|
||||
|
||||
#include "capplet-util.h"
|
||||
#include "mime-edit-dialog.h"
|
||||
#include "mime-types-model.h"
|
||||
|
||||
#include "libuuid/uuid.h"
|
||||
|
||||
#undef WID(x)
|
||||
#define WID(x) (glade_xml_get_widget (dialog->p->dialog_xml, x))
|
||||
|
||||
enum {
|
||||
|
@ -191,6 +193,7 @@ mime_edit_dialog_init (MimeEditDialog *dialog, MimeEditDialogClass *class)
|
|||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
|
||||
GTK_STOCK_OK, GTK_RESPONSE_OK,
|
||||
NULL);
|
||||
capplet_set_icon (dialog->p->dialog_win, "gnome-ccmime.png");
|
||||
gtk_dialog_set_default_response (GTK_DIALOG (dialog->p->dialog_win),
|
||||
GTK_RESPONSE_OK);
|
||||
|
||||
|
@ -363,17 +366,16 @@ mime_edit_dialog_finalize (GObject *object)
|
|||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
GObject *
|
||||
mime_edit_dialog_new (GtkTreeModel *model, MimeTypeInfo *info)
|
||||
{
|
||||
GObject *res = g_object_new (mime_edit_dialog_get_type (),
|
||||
return g_object_new (mime_edit_dialog_get_type (),
|
||||
"model", model,
|
||||
"mime-type-info", info,
|
||||
NULL);
|
||||
return GTK_WIDGET (res);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
GObject *
|
||||
mime_add_dialog_new (GtkTreeModel *model, GtkWindow *parent,
|
||||
char const *file_name)
|
||||
{
|
||||
|
@ -409,7 +411,7 @@ mime_add_dialog_new (GtkTreeModel *model, GtkWindow *parent,
|
|||
}
|
||||
}
|
||||
|
||||
return GTK_WIDGET (dialog);
|
||||
return dialog;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -54,9 +54,9 @@ struct _MimeEditDialogClass
|
|||
|
||||
GType mime_edit_dialog_get_type (void);
|
||||
|
||||
GtkWidget *mime_edit_dialog_new (GtkTreeModel *model,
|
||||
GObject *mime_edit_dialog_new (GtkTreeModel *model,
|
||||
MimeTypeInfo *info);
|
||||
GtkWidget *mime_add_dialog_new (GtkTreeModel *model, GtkWindow *parent,
|
||||
GObject *mime_add_dialog_new (GtkTreeModel *model, GtkWindow *parent,
|
||||
char const *file_name);
|
||||
|
||||
void mime_edit_dialog_get_app (GladeXML *glade, char const *mime_type,
|
||||
|
|
|
@ -301,14 +301,13 @@ service_edit_dialog_finalize (GObject *object)
|
|||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
GObject *
|
||||
service_edit_dialog_new (GtkTreeModel *model, ServiceInfo *info)
|
||||
{
|
||||
GObject *res = g_object_new (service_edit_dialog_get_type (),
|
||||
return g_object_new (service_edit_dialog_get_type (),
|
||||
"model", model,
|
||||
"service-info", info,
|
||||
NULL);
|
||||
return GTK_WIDGET (res);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
|
|
|
@ -52,7 +52,7 @@ struct _ServiceEditDialogClass
|
|||
|
||||
GType service_edit_dialog_get_type (void);
|
||||
|
||||
GtkWidget *service_edit_dialog_new (GtkTreeModel *model,
|
||||
GObject *service_edit_dialog_new (GtkTreeModel *model,
|
||||
ServiceInfo *info);
|
||||
GtkWidget *service_add_dialog_new (GtkTreeModel *model);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue