Evince
Evince is a document viewer capable of displaying multiple and single page document formats like PDF and Postscript.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ev-properties-dialog.c File Reference
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include "ev-document-fonts.h"
#include "ev-properties-dialog.h"
#include "ev-properties-fonts.h"
#include "ev-properties-view.h"
#include "ev-properties-license.h"
+ Include dependency graph for ev-properties-dialog.c:

Go to the source code of this file.

Data Structures

struct  _EvPropertiesDialog
 
struct  _EvPropertiesDialogClass
 

Functions

static void ev_properties_dialog_class_init (EvPropertiesDialogClass *properties_class)
 
static void ev_properties_dialog_init (EvPropertiesDialog *properties)
 
void ev_properties_dialog_set_document (EvPropertiesDialog *properties, const gchar *uri, EvDocument *document)
 
GtkWidget * ev_properties_dialog_new (void)
 

Function Documentation

static void ev_properties_dialog_class_init ( EvPropertiesDialogClass properties_class)
static

Definition at line 51 of file ev-properties-dialog.c.

52 {
53 }
static void ev_properties_dialog_init ( EvPropertiesDialog properties)
static

Definition at line 56 of file ev-properties-dialog.c.

57 {
58  GtkBox *content_area;
59 
60  content_area = GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (properties)));
61  gtk_container_set_border_width (GTK_CONTAINER (content_area), 0);
62 
63  gtk_window_set_title (GTK_WINDOW (properties), _("Properties"));
64  gtk_window_set_destroy_with_parent (GTK_WINDOW (properties), TRUE);
65 
66  properties->notebook = gtk_notebook_new ();
67  gtk_notebook_set_show_border (GTK_NOTEBOOK (properties->notebook), FALSE);
68  gtk_box_pack_start (content_area, properties->notebook, TRUE, TRUE, 0);
69  gtk_widget_show (properties->notebook);
70 }
GtkWidget* ev_properties_dialog_new ( void  )

Definition at line 121 of file ev-properties-dialog.c.

122 {
124 
125  properties = g_object_new (EV_TYPE_PROPERTIES_DIALOG,
126  "use-header-bar", TRUE, NULL);
127 
128  return GTK_WIDGET (properties);
129 }

+ Here is the caller graph for this function:

void ev_properties_dialog_set_document ( EvPropertiesDialog properties,
const gchar *  uri,
EvDocument document 
)

Definition at line 73 of file ev-properties-dialog.c.

76 {
77  GtkWidget *label;
78  const EvDocumentInfo *info;
79 
80  properties->document = document;
81 
82  info = ev_document_get_info (document);
83 
84  if (properties->general_page == NULL) {
85  label = gtk_label_new (_("General"));
86  properties->general_page = ev_properties_view_new (document);
87  gtk_notebook_append_page (GTK_NOTEBOOK (properties->notebook),
88  properties->general_page, label);
89  gtk_widget_show (properties->general_page);
90  }
92 
93  if (EV_IS_DOCUMENT_FONTS (document)) {
94  if (properties->fonts_page == NULL) {
95  label = gtk_label_new (_("Fonts"));
96  properties->fonts_page = ev_properties_fonts_new ();
97  gtk_notebook_append_page (GTK_NOTEBOOK (properties->notebook),
98  properties->fonts_page, label);
99  gtk_widget_show (properties->fonts_page);
100  }
101 
103  (EV_PROPERTIES_FONTS (properties->fonts_page), document);
104  }
105 
106  if (info->fields_mask & EV_DOCUMENT_INFO_LICENSE && info->license) {
107  if (properties->license_page == NULL) {
108  label = gtk_label_new (_("Document License"));
109  properties->license_page = ev_properties_license_new ();
110  gtk_notebook_append_page (GTK_NOTEBOOK (properties->notebook),
111  properties->license_page, label);
112  gtk_widget_show (properties->license_page);
113  }
114 
116  (EV_PROPERTIES_LICENSE (properties->license_page), info->license);
117  }
118 }

+ Here is the caller graph for this function: