]> www.fi.muni.cz Git - evince.git/blobdiff - shell/ev-history.c
[dualhead] document model & sidebar testing
[evince.git] / shell / ev-history.c
index c06fa25fa8349b94c44dfcb52a82e49f2d481959..9b59014ca90eb473af6ca40a6739e266c7136f96 100644 (file)
@@ -13,7 +13,7 @@
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
  */
 
 
 #include "ev-history.h"
 
+
+enum
+{
+       HISTORY_CHANGED,
+       N_SIGNALS
+};
+
+static guint signals[N_SIGNALS] = {0, };
+
 struct _EvHistoryPrivate
 {
        GList *links;
@@ -68,6 +77,15 @@ ev_history_class_init (EvHistoryClass *class)
 
        object_class->finalize = ev_history_finalize;
 
+       signals[HISTORY_CHANGED] = 
+                   g_signal_new ("changed",
+                                 G_OBJECT_CLASS_TYPE (object_class),
+                                 G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
+                                 G_STRUCT_OFFSET (EvHistoryClass, changed),
+                                 NULL, NULL,
+                                 g_cclosure_marshal_VOID__VOID,
+                                 G_TYPE_NONE, 0);
+
        g_type_class_add_private (object_class, sizeof (EvHistoryPrivate));
 }
 
@@ -98,6 +116,8 @@ ev_history_add_link (EvHistory *history, EvLink *link)
                history->priv->links = g_list_delete_link (history->priv->links, 
                                                           history->priv->links);
        }
+       
+       g_signal_emit (history, signals[HISTORY_CHANGED], 0);
 }
 
 EvLink *